@chili-publish/studio-sdk 1.31.0 → 1.33.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 (70) hide show
  1. package/_bundles/main.es.js +1013 -967
  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/lib/editor-engine.json +1 -1
  6. package/lib/package.json +2 -1
  7. package/lib/src/controllers/BrandKitController.d.ts +2 -0
  8. package/lib/src/controllers/BrandKitController.js +22 -1
  9. package/lib/src/controllers/BrandKitController.js.map +1 -1
  10. package/lib/src/controllers/FontController.d.ts +9 -1
  11. package/lib/src/controllers/FontController.js +13 -0
  12. package/lib/src/controllers/FontController.js.map +1 -1
  13. package/lib/src/controllers/FrameController.d.ts +45 -0
  14. package/lib/src/controllers/FrameController.js +74 -0
  15. package/lib/src/controllers/FrameController.js.map +1 -1
  16. package/lib/src/controllers/GradientStyleController.d.ts +62 -0
  17. package/lib/src/controllers/GradientStyleController.js +114 -0
  18. package/lib/src/controllers/GradientStyleController.js.map +1 -0
  19. package/lib/src/controllers/LayoutController.d.ts +10 -2
  20. package/lib/src/controllers/LayoutController.js +18 -2
  21. package/lib/src/controllers/LayoutController.js.map +1 -1
  22. package/lib/src/controllers/VariableController.d.ts +7 -0
  23. package/lib/src/controllers/VariableController.js +10 -0
  24. package/lib/src/controllers/VariableController.js.map +1 -1
  25. package/lib/src/index.d.ts +8 -5
  26. package/lib/src/index.js +4 -2
  27. package/lib/src/index.js.map +1 -1
  28. package/lib/src/sdk.d.ts +2 -0
  29. package/lib/src/sdk.js +3 -0
  30. package/lib/src/sdk.js.map +1 -1
  31. package/lib/src/tests/__mocks__/Brandkit.js +11 -0
  32. package/lib/src/tests/__mocks__/Brandkit.js.map +1 -1
  33. package/lib/src/tests/controllers/BrandKitController.test.js +17 -1
  34. package/lib/src/tests/controllers/BrandKitController.test.js.map +1 -1
  35. package/lib/src/tests/controllers/FontController.test.js +11 -0
  36. package/lib/src/tests/controllers/FontController.test.js.map +1 -1
  37. package/lib/src/tests/controllers/FrameController.test.js +55 -0
  38. package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
  39. package/lib/src/tests/controllers/GradientStyleController.test.js +82 -0
  40. package/lib/src/tests/controllers/GradientStyleController.test.js.map +1 -0
  41. package/lib/src/tests/controllers/LayoutController.test.js +14 -4
  42. package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
  43. package/lib/src/tests/controllers/VariableController.test.js +7 -0
  44. package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
  45. package/lib/src/types/BrandKitTypes.d.ts +2 -0
  46. package/lib/src/types/DocumentTypes.d.ts +5 -1
  47. package/lib/src/types/DocumentTypes.js +4 -0
  48. package/lib/src/types/DocumentTypes.js.map +1 -1
  49. package/lib/src/types/EngineEditModeTypes.d.ts +2 -1
  50. package/lib/src/types/EngineEditModeTypes.js +1 -0
  51. package/lib/src/types/EngineEditModeTypes.js.map +1 -1
  52. package/lib/src/types/FontTypes.d.ts +6 -0
  53. package/lib/src/types/FrameTypes.d.ts +7 -0
  54. package/lib/src/types/FrameTypes.js.map +1 -1
  55. package/lib/src/types/GradientStyleTypes.d.ts +70 -0
  56. package/lib/src/types/GradientStyleTypes.js +16 -0
  57. package/lib/src/types/GradientStyleTypes.js.map +1 -0
  58. package/lib/src/types/LayoutTypes.d.ts +8 -0
  59. package/lib/src/types/ParagraphStyleTypes.d.ts +48 -0
  60. package/lib/src/types/ShapeTypes.d.ts +1 -0
  61. package/lib/src/types/ShapeTypes.js.map +1 -1
  62. package/lib/src/types/TextStyleTypes.d.ts +12 -1
  63. package/lib/src/types/TextStyleTypes.js +9 -0
  64. package/lib/src/types/TextStyleTypes.js.map +1 -1
  65. package/lib/src/types/VariableTypes.d.ts +1 -0
  66. package/lib/src/types/VariableTypes.js.map +1 -1
  67. package/lib/src/utils/Enums.d.ts +5 -1
  68. package/lib/src/utils/Enums.js +4 -0
  69. package/lib/src/utils/Enums.js.map +1 -1
  70. package/package.json +2 -1
@@ -1,39 +1,39 @@
1
- var Pe = (s) => {
1
+ var Fe = (s) => {
2
2
  throw TypeError(s);
3
3
  };
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.14.latest", ls = {
7
- current: vs
8
- }, As = "1.31.0", ds = {
9
- version: As
4
+ var Ee = (s, o, t) => o.has(s) || Fe("Cannot " + t);
5
+ var a = (s, o, t) => (Ee(s, o, "read from private field"), t ? t.call(s) : o.get(s)), u = (s, o, t) => o.has(s) ? Fe("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, t), g = (s, o, t, e) => (Ee(s, o, "write to private field"), e ? e.call(s, t) : o.set(s, t), t);
6
+ const Ps = "2.16.latest", us = {
7
+ current: Ps
8
+ }, Fs = "1.33.0", gs = {
9
+ version: Fs
10
10
  };
11
11
  var $;
12
12
  (function(s) {
13
13
  s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
14
14
  })($ || ($ = {}));
15
- var lt;
15
+ var dt;
16
16
  (function(s) {
17
17
  s.Fulfilled = "fulfilled", s.Rejected = "rejected";
18
- })(lt || (lt = {}));
19
- var Mt;
18
+ })(dt || (dt = {}));
19
+ var Rt;
20
20
  (function(s) {
21
21
  s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
22
- })(Mt || (Mt = {}));
23
- var Qt;
22
+ })(Rt || (Rt = {}));
23
+ var Xt;
24
24
  (function(s) {
25
25
  s.DataCloneError = "DataCloneError";
26
- })(Qt || (Qt = {}));
27
- var ht;
26
+ })(Xt || (Xt = {}));
27
+ var lt;
28
28
  (function(s) {
29
29
  s.Message = "message";
30
- })(ht || (ht = {}));
31
- const Ps = (s, i) => {
30
+ })(lt || (lt = {}));
31
+ const Es = (s, o) => {
32
32
  const t = [];
33
33
  let e = !1;
34
34
  return {
35
35
  destroy(r) {
36
- e || (e = !0, i(`${s}: Destroying connection`), t.forEach((n) => {
36
+ e || (e = !0, o(`${s}: Destroying connection`), t.forEach((n) => {
37
37
  n(r);
38
38
  }));
39
39
  },
@@ -41,156 +41,156 @@ const Ps = (s, i) => {
41
41
  e ? r() : t.push(r);
42
42
  }
43
43
  };
44
- }, Fs = (s) => (...i) => {
45
- s && console.log("[Penpal]", ...i);
46
- }, Es = {
44
+ }, Ls = (s) => (...o) => {
45
+ s && console.log("[Penpal]", ...o);
46
+ }, Os = {
47
47
  "http:": "80",
48
48
  "https:": "443"
49
- }, Ds = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Ls = ["file:", "data:"], Os = (s) => {
50
- if (s && Ls.find((l) => s.startsWith(l)))
49
+ }, Ds = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Ns = ["file:", "data:"], Ms = (s) => {
50
+ if (s && Ns.find((d) => s.startsWith(d)))
51
51
  return "null";
52
- const i = document.location, t = Ds.exec(s);
52
+ const o = document.location, t = Ds.exec(s);
53
53
  let e, r, n;
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 !== Es[e] ? `:${n}` : "";
54
+ t ? (e = t[1] ? t[1] : o.protocol, r = t[2], n = t[4]) : (e = o.protocol, r = o.hostname, n = o.port);
55
+ const c = n && n !== Os[e] ? `:${n}` : "";
56
56
  return `${e}//${r}${c}`;
57
- }, Ee = ({ name: s, message: i, stack: t }) => ({
57
+ }, Le = ({ name: s, message: o, stack: t }) => ({
58
58
  name: s,
59
- message: i,
59
+ message: o,
60
60
  stack: t
61
- }), Ns = (s) => {
62
- const i = new Error();
63
- return Object.keys(s).forEach((t) => i[t] = s[t]), i;
64
- }, xs = (s, i, t) => {
65
- const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: l } = s;
61
+ }), xs = (s) => {
62
+ const o = new Error();
63
+ return Object.keys(s).forEach((t) => o[t] = s[t]), o;
64
+ }, Rs = (s, o, t) => {
65
+ const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: d } = s;
66
66
  let h = !1;
67
- const y = (p) => {
68
- if (p.source !== n || p.data.penpal !== $.Call)
67
+ const p = (y) => {
68
+ if (y.source !== n || y.data.penpal !== $.Call)
69
69
  return;
70
- if (p.origin !== l) {
71
- t(`${e} received message from origin ${p.origin} which did not match expected origin ${l}`);
70
+ if (y.origin !== d) {
71
+ t(`${e} received message from origin ${y.origin} which did not match expected origin ${d}`);
72
72
  return;
73
73
  }
74
- const I = p.data, { methodName: S, args: f, id: b } = I;
74
+ const I = y.data, { methodName: S, args: b, id: A } = I;
75
75
  t(`${e}: Received ${S}() call`);
76
- const A = (v) => (N) => {
76
+ const v = (f) => (M) => {
77
77
  if (t(`${e}: Sending ${S}() reply`), h) {
78
78
  t(`${e}: Unable to send ${S}() reply due to destroyed connection`);
79
79
  return;
80
80
  }
81
- const x = {
81
+ const E = {
82
82
  penpal: $.Reply,
83
- id: b,
84
- resolution: v,
85
- returnValue: N
83
+ id: A,
84
+ resolution: f,
85
+ returnValue: M
86
86
  };
87
- v === lt.Rejected && N instanceof Error && (x.returnValue = Ee(N), x.returnValueIsError = !0);
87
+ f === dt.Rejected && M instanceof Error && (E.returnValue = Le(M), E.returnValueIsError = !0);
88
88
  try {
89
- n.postMessage(x, c);
89
+ n.postMessage(E, c);
90
90
  } catch (P) {
91
- if (P.name === Qt.DataCloneError) {
92
- const K = {
91
+ if (P.name === Xt.DataCloneError) {
92
+ const z = {
93
93
  penpal: $.Reply,
94
- id: b,
95
- resolution: lt.Rejected,
96
- returnValue: Ee(P),
94
+ id: A,
95
+ resolution: dt.Rejected,
96
+ returnValue: Le(P),
97
97
  returnValueIsError: !0
98
98
  };
99
- n.postMessage(K, c);
99
+ n.postMessage(z, c);
100
100
  }
101
101
  throw P;
102
102
  }
103
103
  };
104
- new Promise((v) => v(i[S].apply(i, f))).then(A(lt.Fulfilled), A(lt.Rejected));
104
+ new Promise((f) => f(o[S].apply(o, b))).then(v(dt.Fulfilled), v(dt.Rejected));
105
105
  };
106
- return r.addEventListener(ht.Message, y), () => {
107
- h = !0, r.removeEventListener(ht.Message, y);
106
+ return r.addEventListener(lt.Message, p), () => {
107
+ h = !0, r.removeEventListener(lt.Message, p);
108
108
  };
109
109
  };
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
- }, Js = (s, i, t) => {
115
- const e = gs(i);
110
+ let Vs = 0;
111
+ const Gs = () => ++Vs, ys = ".", ps = (s) => s ? s.split(ys) : [], Bs = (s) => s.join(ys), Js = (s, o) => {
112
+ const t = ps(o || "");
113
+ return t.push(s), Bs(t);
114
+ }, ks = (s, o, t) => {
115
+ const e = ps(o);
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
- }, ys = (s, i) => {
117
+ }, Cs = (s, o) => {
118
118
  const t = {};
119
119
  return Object.keys(s).forEach((e) => {
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);
120
+ const r = s[e], n = Js(e, o);
121
+ typeof r == "object" && Object.assign(t, Cs(r, n)), typeof r == "function" && (t[n] = r);
122
122
  }), t;
123
- }, ks = (s) => {
124
- const i = {};
123
+ }, Us = (s) => {
124
+ const o = {};
125
125
  for (const t in s)
126
- Js(i, t, s[t]);
127
- return i;
128
- }, Us = (s, i, t, e, r) => {
129
- const { localName: n, local: c, remote: l, originForSending: h, originForReceiving: y } = i;
130
- let p = !1;
126
+ ks(o, t, s[t]);
127
+ return o;
128
+ }, _s = (s, o, t, e, r) => {
129
+ const { localName: n, local: c, remote: d, originForSending: h, originForReceiving: p } = o;
130
+ let y = !1;
131
131
  r(`${n}: Connecting call sender`);
132
- const I = (f) => (...b) => {
133
- r(`${n}: Sending ${f}() call`);
134
- let A;
132
+ const I = (b) => (...A) => {
133
+ r(`${n}: Sending ${b}() call`);
134
+ let v;
135
135
  try {
136
- l.closed && (A = !0);
136
+ d.closed && (v = !0);
137
137
  } catch {
138
- A = !0;
138
+ v = !0;
139
139
  }
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;
140
+ if (v && e(), y) {
141
+ const f = new Error(`Unable to send ${b}() call due to destroyed connection`);
142
+ throw f.code = Rt.ConnectionDestroyed, f;
143
143
  }
144
- return new Promise((v, N) => {
145
- const x = Rs(), P = (z) => {
146
- if (z.source !== l || z.data.penpal !== $.Reply || z.data.id !== x)
144
+ return new Promise((f, M) => {
145
+ const E = Gs(), P = (W) => {
146
+ if (W.source !== d || W.data.penpal !== $.Reply || W.data.id !== E)
147
147
  return;
148
- if (z.origin !== y) {
149
- r(`${n} received message from origin ${z.origin} which did not match expected origin ${y}`);
148
+ if (W.origin !== p) {
149
+ r(`${n} received message from origin ${W.origin} which did not match expected origin ${p}`);
150
150
  return;
151
151
  }
152
- const mt = z.data;
153
- r(`${n}: Received ${f}() reply`), c.removeEventListener(ht.Message, P);
154
- let wt = mt.returnValue;
155
- mt.returnValueIsError && (wt = Ns(wt)), (mt.resolution === lt.Fulfilled ? v : N)(wt);
152
+ const wt = W.data;
153
+ r(`${n}: Received ${b}() reply`), c.removeEventListener(lt.Message, P);
154
+ let ft = wt.returnValue;
155
+ wt.returnValueIsError && (ft = xs(ft)), (wt.resolution === dt.Fulfilled ? f : M)(ft);
156
156
  };
157
- c.addEventListener(ht.Message, P);
158
- const K = {
157
+ c.addEventListener(lt.Message, P);
158
+ const z = {
159
159
  penpal: $.Call,
160
- id: x,
161
- methodName: f,
162
- args: b
160
+ id: E,
161
+ methodName: b,
162
+ args: A
163
163
  };
164
- l.postMessage(K, h);
164
+ d.postMessage(z, h);
165
165
  });
166
- }, S = t.reduce((f, b) => (f[b] = I(b), f), {});
167
- return Object.assign(s, ks(S)), () => {
168
- p = !0;
166
+ }, S = t.reduce((b, A) => (b[A] = I(A), b), {});
167
+ return Object.assign(s, Us(S)), () => {
168
+ y = !0;
169
169
  };
170
- }, Gs = (s, i, t, e, r) => {
170
+ }, Hs = (s, o, t, e, r) => {
171
171
  const { destroy: n, onDestroy: c } = e;
172
- let l, h;
173
- const y = {};
174
- return (p) => {
175
- if (p.origin !== i) {
176
- r(`Parent: Handshake - Received ACK message from origin ${p.origin} which did not match expected origin ${i}`);
172
+ let d, h;
173
+ const p = {};
174
+ return (y) => {
175
+ if (y.origin !== o) {
176
+ r(`Parent: Handshake - Received ACK message from origin ${y.origin} which did not match expected origin ${o}`);
177
177
  return;
178
178
  }
179
179
  r("Parent: Handshake - Received ACK");
180
180
  const I = {
181
181
  localName: "Parent",
182
182
  local: window,
183
- remote: p.source,
183
+ remote: y.source,
184
184
  originForSending: t,
185
- originForReceiving: i
185
+ originForReceiving: o
186
186
  };
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;
187
+ d && d(), d = Rs(I, s, r), c(d), h && h.forEach((b) => {
188
+ delete p[b];
189
+ }), h = y.data.methodNames;
190
+ const S = _s(p, I, h, n, r);
191
+ return c(S), p;
192
192
  };
193
- }, Ts = (s, i, t, e) => (r) => {
193
+ }, Ts = (s, o, 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;
@@ -198,63 +198,63 @@ const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s
198
198
  s("Parent: Handshake - Received SYN, responding with SYN-ACK");
199
199
  const n = {
200
200
  penpal: $.SynAck,
201
- methodNames: Object.keys(i)
201
+ methodNames: Object.keys(o)
202
202
  };
203
203
  r.source.postMessage(n, e);
204
- }, Hs = 6e4, _s = (s, i) => {
205
- const { destroy: t, onDestroy: e } = i, r = setInterval(() => {
204
+ }, Ks = 6e4, $s = (s, o) => {
205
+ const { destroy: t, onDestroy: e } = o, r = setInterval(() => {
206
206
  s.isConnected || (clearInterval(r), t());
207
- }, Hs);
207
+ }, Ks);
208
208
  e(() => {
209
209
  clearInterval(r);
210
210
  });
211
- }, $s = (s, i) => {
211
+ }, zs = (s, o) => {
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 = Mt.ConnectionTimeout, i(e);
215
+ e.code = Rt.ConnectionTimeout, o(e);
216
216
  }, s)), () => {
217
217
  clearTimeout(t);
218
218
  };
219
- }, Ks = (s) => {
219
+ }, Ws = (s) => {
220
220
  if (!s.src && !s.srcdoc) {
221
- const i = new Error("Iframe must have src or srcdoc property defined.");
222
- throw i.code = Mt.NoIframeSrc, i;
223
- }
224
- }, zs = (s) => {
225
- let { iframe: i, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
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);
221
+ const o = new Error("Iframe must have src or srcdoc property defined.");
222
+ throw o.code = Rt.NoIframeSrc, o;
223
+ }
224
+ }, js = (s) => {
225
+ let { iframe: o, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
226
+ const c = Ls(n), d = Es("Parent", c), { onDestroy: h, destroy: p } = d;
227
+ e || (Ws(o), e = Ms(o.src));
228
+ const y = e === "null" ? "*" : e, I = Cs(t), S = Ts(c, I, e, y), b = Hs(I, e, y, d, c);
229
229
  return {
230
- promise: new Promise((A, v) => {
231
- const N = $s(r, y), x = (P) => {
232
- if (!(P.source !== i.contentWindow || !P.data)) {
230
+ promise: new Promise((v, f) => {
231
+ const M = zs(r, p), E = (P) => {
232
+ if (!(P.source !== o.contentWindow || !P.data)) {
233
233
  if (P.data.penpal === $.Syn) {
234
234
  S(P);
235
235
  return;
236
236
  }
237
237
  if (P.data.penpal === $.Ack) {
238
- const K = f(P);
239
- K && (N(), A(K));
238
+ const z = b(P);
239
+ z && (M(), v(z));
240
240
  return;
241
241
  }
242
242
  }
243
243
  };
244
- window.addEventListener(ht.Message, x), c("Parent: Awaiting handshake"), _s(i, l), h((P) => {
245
- window.removeEventListener(ht.Message, x), P && v(P);
244
+ window.addEventListener(lt.Message, E), c("Parent: Awaiting handshake"), $s(o, d), h((P) => {
245
+ window.removeEventListener(lt.Message, E), P && f(P);
246
246
  });
247
247
  }),
248
248
  destroy() {
249
- y();
249
+ p();
250
250
  }
251
251
  };
252
- }, Ws = (s) => {
253
- const i = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
252
+ }, qs = (s) => {
253
+ const o = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
254
254
  let t = "";
255
- return i.test(s) ? t = s : s.indexOf("/index.html") > -1 ? t = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (t = `${s}/`), t;
256
- }, js = (s, i, t) => {
257
- const e = Ws(i), n = `<html>
255
+ return o.test(s) ? t = s : s.indexOf("/index.html") > -1 ? t = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (t = `${s}/`), t;
256
+ }, Ys = (s, o, t) => {
257
+ const e = qs(o), n = `<html>
258
258
  <head>
259
259
  <base href="/" />
260
260
  <meta charset="UTF-8"/>
@@ -275,69 +275,69 @@ const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s
275
275
  </html>
276
276
  `;
277
277
  s.srcdoc = n;
278
- }, qs = (s, i, t, e = "chili-editor", r) => {
278
+ }, Zs = (s, o, 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 l = () => {
281
+ const d = () => {
282
282
  const h = document.querySelector(n);
283
- h && (h == null || h.appendChild(c), js(c, s, r));
283
+ h && (h == null || h.appendChild(c), Ys(c, s, r));
284
284
  };
285
- document.readyState === "complete" || document.readyState === "interactive" ? l() : document.addEventListener("DOMContentLoaded", () => {
286
- l();
285
+ document.readyState === "complete" || document.readyState === "interactive" ? d() : document.addEventListener("DOMContentLoaded", () => {
286
+ d();
287
287
  }), t(
288
- zs({
288
+ js({
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
292
292
  // f.e. stateChange(documentJson)
293
293
  methods: {
294
- actionsChanged: i.onActionsChanged,
295
- stateChanged: i.onStateChanged,
296
- documentLoaded: i.onDocumentLoaded,
297
- authExpired: i.onAuthExpired,
298
- viewportRequested: i.onViewportRequested,
299
- selectedFramesContent: i.onSelectedFramesContentChanged,
300
- selectedFramesLayout: i.onSelectedFramesLayoutChanged,
301
- allFramesLayout: i.onFramesLayoutChanged,
302
- selectedLayoutProperties: i.onSelectedLayoutPropertiesChanged,
303
- openLayoutPropertiesPanel: i.onPageSelectionChanged,
304
- selectedLayoutUnit: i.onSelectedLayoutUnitChanged,
305
- scrubberPositionChanged: i.onScrubberPositionChanged,
306
- frameAnimationsChanged: i.onFrameAnimationsChanged,
307
- selectedToolChanged: i.onSelectedToolChanged,
308
- variableListChanged: i.onVariableListChanged,
309
- undoStackStateChanged: i.onUndoStateChanged,
310
- selectedLayoutFramesChanged: i.onSelectedLayoutFramesChanged,
311
- selectedTextStyleChanged: i.onSelectedTextStyleChanged,
312
- colorsChanged: i.onColorsChanged,
313
- paragraphStylesChanged: i.onParagraphStylesChanged,
314
- characterStylesChanged: i.onCharacterStylesChanged,
315
- fontFamiliesChanged: i.onFontFamiliesChanged,
316
- selectedLayoutId: i.onSelectedLayoutIdChanged,
317
- layoutListChanged: i.onLayoutsChanged,
318
- connectorEvent: i.onConnectorEvent,
319
- connectorsChanged: i.onConnectorsChanged,
320
- zoomChanged: i.onZoomChanged,
321
- pageSnapshotInvalidated: i.onPageSnapshotInvalidated,
322
- pagesChanged: i.onPagesChanged,
323
- pageSizeChanged: i.onPageSizeChanged,
324
- shapeCornerRadiusChanged: i.onShapeCornerRadiusChanged,
325
- cropActiveFrameIdChanged: i.onCropActiveFrameIdChanged,
326
- asyncError: i.onAsyncError,
327
- viewModeChanged: i.onViewModeChanged,
328
- barcodeValidationChanged: i.onBarcodeValidationChanged,
329
- selectedPageIdChanged: i.onSelectedPageIdChanged,
330
- dataSourceIdChanged: i.onDataSourceIdChanged,
331
- documentIssueListChanged: i.onDocumentIssueListChanged,
332
- customUndoDataChanged: i.onCustomUndoDataChanged,
333
- engineEditingModeChanged: i.onEngineEditModeChanged,
334
- brandKitMediaChanged: i.onBrandKitMediaChanged
294
+ actionsChanged: o.onActionsChanged,
295
+ stateChanged: o.onStateChanged,
296
+ documentLoaded: o.onDocumentLoaded,
297
+ authExpired: o.onAuthExpired,
298
+ viewportRequested: o.onViewportRequested,
299
+ selectedFramesContent: o.onSelectedFramesContentChanged,
300
+ selectedFramesLayout: o.onSelectedFramesLayoutChanged,
301
+ allFramesLayout: o.onFramesLayoutChanged,
302
+ selectedLayoutProperties: o.onSelectedLayoutPropertiesChanged,
303
+ openLayoutPropertiesPanel: o.onPageSelectionChanged,
304
+ selectedLayoutUnit: o.onSelectedLayoutUnitChanged,
305
+ scrubberPositionChanged: o.onScrubberPositionChanged,
306
+ frameAnimationsChanged: o.onFrameAnimationsChanged,
307
+ selectedToolChanged: o.onSelectedToolChanged,
308
+ variableListChanged: o.onVariableListChanged,
309
+ undoStackStateChanged: o.onUndoStateChanged,
310
+ selectedLayoutFramesChanged: o.onSelectedLayoutFramesChanged,
311
+ selectedTextStyleChanged: o.onSelectedTextStyleChanged,
312
+ colorsChanged: o.onColorsChanged,
313
+ paragraphStylesChanged: o.onParagraphStylesChanged,
314
+ characterStylesChanged: o.onCharacterStylesChanged,
315
+ fontFamiliesChanged: o.onFontFamiliesChanged,
316
+ selectedLayoutId: o.onSelectedLayoutIdChanged,
317
+ layoutListChanged: o.onLayoutsChanged,
318
+ connectorEvent: o.onConnectorEvent,
319
+ connectorsChanged: o.onConnectorsChanged,
320
+ zoomChanged: o.onZoomChanged,
321
+ pageSnapshotInvalidated: o.onPageSnapshotInvalidated,
322
+ pagesChanged: o.onPagesChanged,
323
+ pageSizeChanged: o.onPageSizeChanged,
324
+ shapeCornerRadiusChanged: o.onShapeCornerRadiusChanged,
325
+ cropActiveFrameIdChanged: o.onCropActiveFrameIdChanged,
326
+ asyncError: o.onAsyncError,
327
+ viewModeChanged: o.onViewModeChanged,
328
+ barcodeValidationChanged: o.onBarcodeValidationChanged,
329
+ selectedPageIdChanged: o.onSelectedPageIdChanged,
330
+ dataSourceIdChanged: o.onDataSourceIdChanged,
331
+ documentIssueListChanged: o.onDocumentIssueListChanged,
332
+ customUndoDataChanged: o.onCustomUndoDataChanged,
333
+ engineEditingModeChanged: o.onEngineEditModeChanged,
334
+ brandKitMediaChanged: o.onBrandKitMediaChanged
335
335
  }
336
336
  })
337
337
  );
338
338
  };
339
- var Q = /* @__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))(Q || {});
340
- const Ys = {
339
+ var X = /* @__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))(X || {});
340
+ const Qs = {
341
341
  shortcutOptions: {
342
342
  debugPanel: { enabled: !1 },
343
343
  ellipse: { enabled: !1 },
@@ -352,25 +352,25 @@ const Ys = {
352
352
  viewMode: { enabled: !1 }
353
353
  }
354
354
  };
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 = {
355
+ var Xs = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(Xs || {}), ms = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s.component = "component", s))(ms || {});
356
+ const tr = 404075;
357
+ function ws(s) {
358
+ const o = s.error ?? "Yikes, something went wrong", t = {
359
359
  cause: {
360
360
  name: String(s.status),
361
361
  message: s.error ?? "Yikes, something went wrong"
362
362
  }
363
363
  };
364
- if (s.status === Qs) {
364
+ if (s.status === tr) {
365
365
  const r = JSON.parse(s.data).statusCode;
366
- throw new Xs(r, i, t);
366
+ throw new er(r, o, t);
367
367
  } else
368
- throw new Error(i, t);
368
+ throw new Error(o, t);
369
369
  }
370
- function o(s, i = !0) {
370
+ function i(s, o = !0) {
371
371
  try {
372
- s.success || Cs(s);
373
- const t = s.data && i;
372
+ s.success || ws(s);
373
+ const t = s.data && o;
374
374
  return {
375
375
  ...s,
376
376
  parsedData: t ? JSON.parse(s.data) : s.data
@@ -379,52 +379,52 @@ function o(s, i = !0) {
379
379
  throw console.error(t), t;
380
380
  }
381
381
  }
382
- class Xs extends Error {
383
- constructor(i, t, e) {
384
- super(t, e), this.statusCode = i;
382
+ class er extends Error {
383
+ constructor(o, t, e) {
384
+ super(t, e), this.statusCode = o;
385
385
  }
386
386
  }
387
- var O;
388
- class De {
387
+ var N;
388
+ class Oe {
389
389
  /**
390
390
  * @ignore
391
391
  */
392
- constructor(i) {
392
+ constructor(o) {
393
393
  /**
394
394
  * @ignore
395
395
  */
396
- u(this, O);
397
- this.getAll = async () => (await a(this, O)).getActions().then((e) => o(e)), this.getById = async (t) => (await a(this, O)).getActionById(t).then((r) => o(r)), this.create = async () => (await a(this, O)).createAction().then((e) => o(e)), this.duplicate = async (t) => (await a(this, O)).duplicateAction(t).then((r) => o(r)), this.remove = async (t) => (await a(this, O)).removeAction(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, O)).updateAction(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => this.update(t, { name: e }), this.updateScript = async (t, e) => this.update(t, { script: e }), this.updateTriggers = async (t, e) => this.update(t, { triggers: e }), this.move = async (t, e) => (await a(this, O)).moveActions(t, e).then((n) => o(n)), this.setTypeError = async (t, e) => this.update(t, { hasTypeError: e }), this.disable = async () => (await a(this, O)).disableActions().then((e) => o(e)), this.enable = async () => (await a(this, O)).enableActions().then((e) => o(e)), g(this, O, i);
396
+ u(this, N);
397
+ this.getAll = async () => (await a(this, N)).getActions().then((e) => i(e)), this.getById = async (t) => (await a(this, N)).getActionById(t).then((r) => i(r)), this.create = async () => (await a(this, N)).createAction().then((e) => i(e)), this.duplicate = async (t) => (await a(this, N)).duplicateAction(t).then((r) => i(r)), this.remove = async (t) => (await a(this, N)).removeAction(t).then((r) => i(r)), this.update = async (t, e) => (await a(this, N)).updateAction(t, JSON.stringify(e)).then((n) => i(n)), this.rename = async (t, e) => this.update(t, { name: e }), this.updateScript = async (t, e) => this.update(t, { script: e }), this.updateTriggers = async (t, e) => this.update(t, { triggers: e }), this.move = async (t, e) => (await a(this, N)).moveActions(t, e).then((n) => i(n)), this.setTypeError = async (t, e) => this.update(t, { hasTypeError: e }), this.disable = async () => (await a(this, N)).disableActions().then((e) => i(e)), this.enable = async () => (await a(this, N)).enableActions().then((e) => i(e)), g(this, N, o);
398
398
  }
399
399
  }
400
- O = new WeakMap();
401
- var D;
402
- class Le {
400
+ N = new WeakMap();
401
+ var O;
402
+ class De {
403
403
  /**
404
404
  * @ignore
405
405
  */
406
- constructor(i) {
406
+ constructor(o) {
407
407
  /**
408
408
  * @ignore
409
409
  */
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(
412
- (r) => o({ ...r, data: JSON.stringify(t) })
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);
410
+ u(this, O);
411
+ this.getAllOnSelectedLayout = async () => (await a(this, O)).getAnimationsOnSelectedLayout().then((e) => i(e)), this.getByFrameId = async (t, e) => (await a(this, O)).getAnimationByFrameId(t, e).then((n) => i(n)), this.getByLayoutId = async (t) => (await a(this, O)).getAnimationsByLayoutId(t).then((r) => i(r)), this.setFrameAnimation = async (t) => (await a(this, O)).setFrameAnimation(JSON.stringify(t)).then(
412
+ (r) => i({ ...r, data: JSON.stringify(t) })
413
+ ), this.play = async () => (await a(this, O)).playAnimation().then((e) => i(e)), this.pause = async () => (await a(this, O)).pauseAnimation().then((e) => i(e)), this.setScrubberPosition = async (t) => (await a(this, O)).setScrubberPosition(t).then((r) => i(r)), this.setDuration = async (t) => (await a(this, O)).setAnimationDuration(t).then((r) => i(r)), this.resetFrameAnimation = async (t) => (await a(this, O)).resetFrameAnimation(t).then((r) => i(r)), this.reset = async () => (await a(this, O)).resetAnimation().then((e) => i(e)), g(this, O, o);
414
414
  }
415
415
  }
416
- D = new WeakMap();
417
- var H = /* @__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))(H || {}), 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 || {}), Z = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(Z || {}), 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 {
416
+ O = 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 || {}), Nt = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Nt || {}), St = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(St || {}), sr = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(sr || {}), Q = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(Q || {}), rr = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(rr || {}), nr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(nr || {}), ar = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(ar || {}), ir = /* @__PURE__ */ ((s) => (s.locked = "locked", s.range = "range", s.none = "none", s))(ir || {}), U;
418
+ class Ne {
419
419
  /**
420
420
  * @ignore
421
421
  */
422
- constructor(i) {
422
+ constructor(o) {
423
423
  /**
424
424
  * @ignore
425
425
  */
426
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
+ this.setBarcodeProperties = async (t, e) => (await a(this, U)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => i(n)), this.setEnableBackground = async (t, e) => {
428
428
  const r = { enableBackground: e };
429
429
  return this.setBarcodeProperties(t, r);
430
430
  }, this.setBackgroundColor = async (t, e) => {
@@ -436,7 +436,7 @@ class Oe {
436
436
  }, this.setBarColor = async (t, e) => {
437
437
  const r = { barColor: e };
438
438
  return this.setBarcodeProperties(t, r);
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
+ }, this.setBarcodeSource = async (t, e) => (await a(this, U)).setBarcodeSource(t, JSON.stringify(e)).then((n) => i(n)), this.removeBarcodeSource = async (t) => (await a(this, U)).setBarcodeSource(t, null).then((r) => i(r)), this.setEnableText = async (t, e) => {
440
440
  const r = { enableText: e };
441
441
  return this.setBarcodeProperties(t, r);
442
442
  }, this.setBarHeight = async (t, e) => {
@@ -447,53 +447,53 @@ class Oe {
447
447
  return this.setBarcodeProperties(t, r);
448
448
  }, this.setQuietZoneValue = async (t, e, r) => {
449
449
  const n = r ? {
450
- left: r === Z.left ? e : void 0,
451
- top: r === Z.top ? e : void 0,
452
- right: r === Z.right ? e : void 0,
453
- bottom: r === Z.bottom ? e : void 0
450
+ left: r === Q.left ? e : void 0,
451
+ top: r === Q.top ? e : void 0,
452
+ right: r === Q.right ? e : void 0,
453
+ bottom: r === Q.bottom ? e : void 0
454
454
  } : { left: e, top: e, right: e, bottom: e };
455
- return (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((l) => o(l));
455
+ return (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((d) => i(d));
456
456
  }, this.setAreQuietZoneValuesCombined = async (t, e) => {
457
457
  const r = { areQuietZoneValuesCombined: 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) => {
458
+ return (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => i(c));
459
+ }, this.setErrorCorrectionLevel = async (t, e) => (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => i(n)), this.setCharacterSet = async (t, e) => (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => i(n)), this.setDrawLightMarginIndicator = async (t, e) => {
460
460
  const r = { drawStartStopChars: e };
461
461
  return this.setBarcodeProperties(t, r);
462
462
  }, this.setDrawStartStopChars = async (t, e) => {
463
463
  const r = { drawStartStopChars: e };
464
464
  return this.setBarcodeProperties(t, r);
465
465
  }, this.getBarcodeConfigationOptions = (t) => {
466
- let e = !0, r = !0, n = !0, c, l, h = !1, y = !1, p = !1;
466
+ let e = !0, r = !0, n = !0, c, d, h = !1, p = !1, y = !1;
467
467
  switch (t) {
468
- case H.qr:
469
- c = [ft.iso8859_1, ft.utf8], l = [
470
- Ot.low,
471
- Ot.medium,
472
- Ot.quartile,
473
- Ot.high
468
+ case T.qr:
469
+ c = [St.iso8859_1, St.utf8], d = [
470
+ Nt.low,
471
+ Nt.medium,
472
+ Nt.quartile,
473
+ Nt.high
474
474
  ];
475
- case H.dataMatrix:
475
+ case T.dataMatrix:
476
476
  e = !1, r = !1, n = !1, h = !0;
477
477
  break;
478
- case H.ean13:
479
- e = !1, y = !0;
478
+ case T.ean13:
479
+ e = !1, p = !0;
480
480
  break;
481
- case H.ean8:
482
- y = !0;
483
- case H.upca:
484
- case H.upce:
481
+ case T.ean8:
482
+ p = !0;
483
+ case T.upca:
484
+ case T.upce:
485
485
  e = !1;
486
486
  break;
487
- case H.code128:
488
- case H.gs1128:
487
+ case T.code128:
488
+ case T.gs1128:
489
489
  c = [
490
- ft.code128a,
491
- ft.code128b,
492
- ft.code128c
490
+ St.code128a,
491
+ St.code128b,
492
+ St.code128c
493
493
  ];
494
494
  break;
495
- case H.code39:
496
- p = !0;
495
+ case T.code39:
496
+ y = !0;
497
497
  break;
498
498
  }
499
499
  return {
@@ -501,48 +501,48 @@ class Oe {
501
501
  allowBarHeight: r,
502
502
  allowQuietZone: !0,
503
503
  allowedCharacterSets: c,
504
- allowedErrorCorrectionLevels: l,
504
+ allowedErrorCorrectionLevels: d,
505
505
  allowToggleText: e,
506
506
  quietZoneAlwaysCombined: h,
507
- allowToggleLightMarginIndicator: y,
508
- allowToggleDrawStartAndEndChar: p
507
+ allowToggleLightMarginIndicator: p,
508
+ allowToggleDrawStartAndEndChar: y
509
509
  };
510
- }, g(this, U, i);
510
+ }, g(this, U, o);
511
511
  }
512
512
  }
513
513
  U = new WeakMap();
514
- var T = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(T || {}), W = /* @__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))(W || {}), Xt = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(Xt || {});
515
- const Ne = (s) => s.type === T.hex, te = (s) => s.type === T.spotHex, ar = (s) => s.type === T.spotRgb, ir = (s) => s.type === T.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 },
514
+ var H = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(H || {}), j = /* @__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))(j || {}), te = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(te || {});
515
+ const Me = (s) => s.type === H.hex, ee = (s) => s.type === H.spotHex, or = (s) => s.type === H.spotRgb, cr = (s) => s.type === H.spotCmyk, hr = (s) => or(s) || cr(s) || ee(s), lr = (s) => {
516
+ const o = dr(s.type);
517
+ return hr(s) ? {
518
+ ...ee(s) && { value: s.displayValue },
519
+ ...!ee(s) && { ...s.displayValue },
520
520
  spotName: s.value,
521
- type: i
521
+ type: o
522
522
  } : {
523
- ...Ne(s) && { value: s.value },
524
- ...!Ne(s) && { ...s.value },
525
- type: i
523
+ ...Me(s) && { value: s.value },
524
+ ...!Me(s) && { ...s.value },
525
+ type: o
526
526
  };
527
- }, xe = (s, i, t, e) => {
527
+ }, xe = (s, o, t, e) => {
528
528
  const {
529
529
  brandKitColorGuid: r,
530
530
  brandKitFontFamilyGuid: n,
531
531
  fontStyleId: c,
532
- textStrokeColorGuid: l,
532
+ textStrokeColorGuid: d,
533
533
  textStrokeColorApplied: h,
534
- textStrokeWidth: y,
535
- ...p
534
+ textStrokeWidth: p,
535
+ ...y
536
536
  } = s;
537
537
  return {
538
- ...Object.keys(p).reduce((S, f) => ({ ...S, [f]: { value: s[f] } }), {}),
539
- ...i && {
538
+ ...Object.keys(y).reduce((S, b) => ({ ...S, [b]: { value: s[b] } }), {}),
539
+ ...o && {
540
540
  color: {
541
541
  value: {
542
- id: i.id,
543
- color: i.color,
544
- type: Xt.brandKit,
545
- isApplied: p.fillColorApplied
542
+ id: o.id,
543
+ color: o.color,
544
+ type: te.brandKit,
545
+ isApplied: y.fillColorApplied
546
546
  }
547
547
  }
548
548
  },
@@ -551,7 +551,7 @@ const Ne = (s) => s.type === T.hex, te = (s) => s.type === T.spotHex, ar = (s) =
551
551
  value: {
552
552
  id: t.id,
553
553
  color: t.color,
554
- type: Xt.brandKit,
554
+ type: te.brandKit,
555
555
  isApplied: h || !1
556
556
  }
557
557
  },
@@ -559,85 +559,89 @@ const Ne = (s) => s.type === T.hex, te = (s) => s.type === T.spotHex, ar = (s) =
559
559
  value: h || !1
560
560
  },
561
561
  strokeWidth: {
562
- value: y != null ? y.toString() : y
562
+ value: p != null ? p.toString() : p
563
563
  }
564
564
  },
565
565
  fontKey: {
566
566
  value: e ?? null
567
567
  }
568
568
  };
569
- }, hr = (s) => {
569
+ }, dr = (s) => {
570
570
  switch (s) {
571
- case T.rgb:
572
- return W.rgb;
573
- case T.cmyk:
574
- return W.cmyk;
575
- case T.hex:
576
- return W.hex;
577
- case T.spotRgb:
578
- return W.spotRGB;
579
- case T.spotCmyk:
580
- return W.spotCMYK;
581
- case T.spotHex:
582
- return W.spotHEX;
583
- }
584
- }, Wt = (s, i) => {
585
- if (!(s === null || i === void 0))
586
- return (s || []).find((t) => t.id === i);
587
- }, Me = (s, i, t) => {
571
+ case H.rgb:
572
+ return j.rgb;
573
+ case H.cmyk:
574
+ return j.cmyk;
575
+ case H.hex:
576
+ return j.hex;
577
+ case H.spotRgb:
578
+ return j.spotRGB;
579
+ case H.spotCmyk:
580
+ return j.spotCMYK;
581
+ case H.spotHex:
582
+ return j.spotHEX;
583
+ }
584
+ }, jt = (s, o) => {
585
+ if (!(s === null || o === void 0))
586
+ return (s || []).find((t) => t.id === o);
587
+ }, Re = (s, o, t) => {
588
588
  var e, r;
589
- if (!(s === null || i === void 0 || t === void 0))
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;
589
+ if (!(s === null || o === void 0 || t === void 0))
590
+ return (r = (e = (s || []).find((n) => n.id === o)) == null ? void 0 : e.fontStyles.find((n) => n.fontStyleId === t)) == null ? void 0 : r.id;
591
591
  };
592
- var L;
593
- class Re {
592
+ var D;
593
+ class Ve {
594
594
  /**
595
595
  * @ignore
596
596
  */
597
- constructor(i, t) {
597
+ constructor(o, t) {
598
598
  /**
599
599
  * @ignore
600
600
  */
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([
601
+ u(this, D);
602
+ this.getId = async () => (await a(this, D)).getBrandKitId().then((r) => i(r)), this.getVersion = async () => (await a(this, D)).getBrandKitVersion().then((r) => i(r)), this.getName = async () => (await a(this, D)).getBrandKitName().then((r) => i(r)), this.rename = async (e) => (await a(this, D)).renameBrandKit(e).then((n) => i(n)), this.updateIdAndVersion = async (e, r) => (await a(this, D)).updateBrandKitIdAndVersion(e, r).then((c) => i(c)), this.get = async () => {
603
+ const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), d = this.gradientStyleController.getAll(), h = this.fontController.getFontFamilies(), p = this.characterStyleController.getAll(), y = this.paragraphStyleController.getAll(), I = this.getAllMedia(), [S, b, A, v, f, M] = await Promise.all([
604
604
  c,
605
- l,
606
- y,
605
+ d,
607
606
  h,
608
- p
609
- ]), v = {
607
+ y,
608
+ p,
609
+ I
610
+ ]), E = {
610
611
  id: e.parsedData,
611
612
  brandKit: {
612
613
  id: e.parsedData,
613
614
  name: n.parsedData,
614
615
  lastModifiedDate: r.parsedData,
615
- colors: I.parsedData,
616
- fonts: S.parsedData,
617
- paragraphStyles: f.parsedData,
618
- characterStyles: b.parsedData,
619
- media: A.parsedData
616
+ colors: S.parsedData,
617
+ gradients: b.parsedData,
618
+ fonts: A.parsedData,
619
+ paragraphStyles: v.parsedData,
620
+ characterStyles: f.parsedData,
621
+ media: M.parsedData
620
622
  }
621
- }, N = {
623
+ }, P = {
622
624
  success: !0,
623
- data: JSON.stringify(v),
624
- parsedData: v,
625
+ data: JSON.stringify(E),
626
+ parsedData: E,
625
627
  status: 200
626
628
  };
627
- return o(N);
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) => {
631
- for (const b of r)
632
- await f.colorStyle.remove(b.id);
633
- for (const b of c)
634
- await f.paragraphStyle.remove(b.id);
635
- for (const b of h)
636
- await f.characterStyle.remove(b.id);
637
- for (const b of p)
638
- await f.font.removeFontFamily(b.id);
639
- for (const b of S)
640
- await this.removeMedia(b.name);
629
+ return i(P);
630
+ }, this.getAllMedia = async () => (await a(this, D)).getAllBrandKitMedia().then((r) => i(r)), this.addMedia = async (e, r, n) => (await a(this, D)).addBrandKitMedia(e, r, n).then((d) => i(d)), this.updateMedia = async (e, r, n) => (await a(this, D)).updateBrandKitMedia(e, r, n).then((d) => i(d)), this.renameMedia = async (e, r) => (await a(this, D)).renameBrandKitMedia(e, r).then((c) => i(c)), this.removeMedia = async (e) => (await a(this, D)).removeBrandKitMedia(e).then((n) => i(n)), this.remove = async () => {
631
+ const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [], h = (await this.paragraphStyleController.getAll()).parsedData || [], y = (await this.characterStyleController.getAll()).parsedData || [], S = (await this.fontController.getFontFamilies()).parsedData || [], A = (await this.getAllMedia()).parsedData || [];
632
+ await this.undoManagerController.record("brandKit.remove", async (v) => {
633
+ for (const f of r)
634
+ await v.colorStyle.remove(f.id);
635
+ for (const f of c)
636
+ await v.gradientStyle.remove(f.id);
637
+ for (const f of h)
638
+ await v.paragraphStyle.remove(f.id);
639
+ for (const f of y)
640
+ await v.characterStyle.remove(f.id);
641
+ for (const f of S)
642
+ await v.font.removeFontFamily(f.id);
643
+ for (const f of A)
644
+ await this.removeMedia(f.name);
641
645
  });
642
646
  }, this.set = async (e) => {
643
647
  let r = {
@@ -648,6 +652,7 @@ class Re {
648
652
  version: e.brandKit.lastModifiedDate,
649
653
  name: e.brandKit.name,
650
654
  colors: [],
655
+ gradients: [],
651
656
  fonts: [],
652
657
  paragraphStyles: [],
653
658
  characterStyles: [],
@@ -655,19 +660,21 @@ class Re {
655
660
  }
656
661
  };
657
662
  return await this.undoManagerController.record("brandKit.set", async (n) => {
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();
663
+ const c = await this.setColors(e, n);
664
+ await this.setGradients(e, n);
665
+ const d = await this.setFonts(e, n), { parsedData: h = [] } = await n.colorStyle.getAll(), { parsedData: p = [] } = await n.gradientStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
659
666
  await this.setParagraphStyles(e, n, {
660
667
  localColors: h,
661
668
  localFonts: y,
662
669
  localColorGuidMap: c,
663
- localFontGuidMap: l
670
+ localFontGuidMap: d
664
671
  }), await this.setCharacterStyles(e, n, {
665
672
  localColors: h,
666
673
  localFonts: y,
667
674
  localColorGuidMap: c,
668
- localFontGuidMap: l
675
+ localFontGuidMap: d
669
676
  }), await this.setMedia(e);
670
- const { parsedData: p } = await n.paragraphStyle.getAll(), { parsedData: I } = await n.characterStyle.getAll(), { parsedData: S } = await this.getAllMedia();
677
+ const { parsedData: I } = await n.paragraphStyle.getAll(), { parsedData: S } = await n.characterStyle.getAll(), { parsedData: b } = await this.getAllMedia();
671
678
  await n.brandKit.updateIdAndVersion(e.id, e.brandKit.lastModifiedDate), await n.brandKit.rename(e.brandKit.name), r = {
672
679
  success: !0,
673
680
  status: 200,
@@ -676,139 +683,144 @@ class Re {
676
683
  version: e.brandKit.lastModifiedDate,
677
684
  name: e.brandKit.name,
678
685
  colors: h || [],
686
+ gradients: p || [],
679
687
  fonts: y || [],
680
- paragraphStyles: p || [],
681
- characterStyles: I || [],
682
- media: S || []
688
+ paragraphStyles: I || [],
689
+ characterStyles: S || [],
690
+ media: b || []
683
691
  }
684
692
  };
685
693
  }), r;
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;
694
+ }, g(this, D, o), this.colorStyleController = t.colorStyle, this.gradientStyleController = t.gradientStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
687
695
  }
688
- async setColors(i, t) {
696
+ async setColors(o, t) {
689
697
  const e = /* @__PURE__ */ new Map();
690
- for (const r of i.brandKit.colors || []) {
698
+ for (const r of o.brandKit.colors || []) {
691
699
  const { parsedData: n } = await t.colorStyle.create();
692
700
  if (!n) continue;
693
701
  e.set(r.guid, n);
694
- const c = cr(r);
702
+ const c = lr(r);
695
703
  await t.colorStyle.rename(n, r.name), await t.colorStyle.update(n, c);
696
704
  }
697
705
  return e;
698
706
  }
699
- async setFonts(i, t) {
700
- const e = i.fontConnectorId, r = /* @__PURE__ */ new Map();
701
- for (const n of i.brandKit.fonts || []) {
707
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
708
+ async setGradients(o, t) {
709
+ return /* @__PURE__ */ new Map();
710
+ }
711
+ async setFonts(o, t) {
712
+ const e = o.fontConnectorId, r = /* @__PURE__ */ new Map();
713
+ for (const n of o.brandKit.fonts || []) {
702
714
  const { parsedData: c = [] } = await t.fontConnector.detail(e, n.fontFamilyId);
703
715
  if (!(c != null && c[0])) throw new Error(`No font styles for family ID: ${n.fontFamilyId}`);
704
- const { parsedData: l } = await t.font.addFontFamily(e, {
716
+ const { parsedData: d } = await t.font.addFontFamily(e, {
705
717
  name: c[0].familyName,
706
718
  fontFamilyId: n.fontFamilyId
707
719
  });
708
- l && r.set(n.fontFamilyBrandKitGuid, l);
720
+ d && r.set(n.fontFamilyBrandKitGuid, d);
709
721
  }
710
722
  return r;
711
723
  }
712
- async setParagraphStyles(i, t, e) {
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);
724
+ async setParagraphStyles(o, t, e) {
725
+ const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: d } = e;
726
+ for (const h of o.brandKit.paragraphStyles || []) {
727
+ const p = c.get(h.brandKitColorGuid), y = c.get(h.textStrokeColorGuid), I = d.get(h.brandKitFontFamilyGuid), S = Re(n, I, h.fontStyleId);
716
728
  if (!I || !S)
717
729
  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(
730
+ const b = jt(r, p), A = jt(r, y);
731
+ if (!b) throw new Error(`Paragraph style could not be created with an empty color: ${h.name}`);
732
+ const { parsedData: v } = await t.paragraphStyle.create(), f = xe(
721
733
  h,
722
- f,
723
734
  b,
735
+ A,
724
736
  `${S}`
725
737
  );
726
- await t.paragraphStyle.rename(A, h.name), await t.paragraphStyle.update(A, v);
738
+ await t.paragraphStyle.rename(v, h.name), await t.paragraphStyle.update(v, f);
727
739
  }
728
740
  }
729
- async setCharacterStyles(i, t, e) {
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(
741
+ async setCharacterStyles(o, t, e) {
742
+ const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: d } = e;
743
+ for (const h of o.brandKit.characterStyles || []) {
744
+ const p = h.brandKitColorGuid ? c.get(h.brandKitColorGuid) : void 0, y = h.textStrokeColorGuid ? c.get(h.textStrokeColorGuid) : void 0, I = h.brandKitFontFamilyGuid ? d.get(h.brandKitFontFamilyGuid) : void 0, S = jt(r, p), b = jt(r, y), A = Re(n, I, h.fontStyleId), { parsedData: v } = await t.characterStyle.create(), f = xe(
733
745
  h,
734
746
  S,
735
- f,
736
- b
747
+ b,
748
+ A
737
749
  );
738
- await t.characterStyle.rename(A, h.name), await t.characterStyle.update(A, v);
750
+ await t.characterStyle.rename(v, h.name), await t.characterStyle.update(v, f);
739
751
  }
740
752
  }
741
- async setMedia(i) {
742
- for (const t of i.brandKit.media || [])
753
+ async setMedia(o) {
754
+ for (const t of o.brandKit.media || [])
743
755
  await this.addMedia(t.name, t.mediaConnectorId, t.mediaId);
744
756
  }
745
757
  }
746
- L = new WeakMap();
747
- var tt;
748
- class ee {
758
+ D = new WeakMap();
759
+ var et;
760
+ class se {
749
761
  /**
750
762
  * @ignore
751
763
  */
752
- constructor(i) {
764
+ constructor(o) {
753
765
  /**
754
766
  * @ignore
755
767
  */
756
- u(this, tt);
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, tt)).zoomToPage(e, r, n, c).then((h) => o(h))), this.getZoomPercentage = async () => (await a(this, tt)).getZoomPercentage().then((e) => o(e)), this.setZoomPercentage = async (t) => (await a(this, tt)).setZoomPercentage(t).then((r) => o(r)), this.setViewMode = async (t) => (await a(this, tt)).setViewMode(t).then((r) => o(r)), g(this, tt, i);
768
+ u(this, et);
769
+ 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, et)).zoomToPage(e, r, n, c).then((h) => i(h))), this.getZoomPercentage = async () => (await a(this, et)).getZoomPercentage().then((e) => i(e)), this.setZoomPercentage = async (t) => (await a(this, et)).setZoomPercentage(t).then((r) => i(r)), this.setViewMode = async (t) => (await a(this, et)).setViewMode(t).then((r) => i(r)), g(this, et, o);
758
770
  }
759
771
  }
760
- tt = new WeakMap();
772
+ et = new WeakMap();
761
773
  var R;
762
- class Ve {
774
+ class Ge {
763
775
  /**
764
776
  * @ignore
765
777
  */
766
- constructor(i) {
778
+ constructor(o) {
767
779
  /**
768
780
  * @ignore
769
781
  */
770
782
  u(this, R);
771
- this.getAll = async () => (await a(this, R)).getCharacterStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, R)).getCharacterStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, R)).createCharacterStyle().then((e) => o(e)), this.update = async (t, e) => (await a(this, R)).updateCharacterStyle(t, JSON.stringify(e)).then((n) => o(n)), this.remove = async (t) => (await a(this, R)).removeCharacterStyle(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, R)).duplicateCharacterStyle(t).then((r) => o(r)), this.rename = async (t, e) => (await a(this, R)).renameCharacterStyle(t, e).then((n) => o(n)), this.move = async (t, e) => (await a(this, R)).moveCharacterStyles(t, e).then((n) => o(n)), g(this, R, i);
783
+ this.getAll = async () => (await a(this, R)).getCharacterStyles().then((e) => i(e)), this.getById = async (t) => (await a(this, R)).getCharacterStyleById(t).then((r) => i(r)), this.create = async () => (await a(this, R)).createCharacterStyle().then((e) => i(e)), this.update = async (t, e) => (await a(this, R)).updateCharacterStyle(t, JSON.stringify(e)).then((n) => i(n)), this.remove = async (t) => (await a(this, R)).removeCharacterStyle(t).then((r) => i(r)), this.duplicate = async (t) => (await a(this, R)).duplicateCharacterStyle(t).then((r) => i(r)), this.rename = async (t, e) => (await a(this, R)).renameCharacterStyle(t, e).then((n) => i(n)), this.move = async (t, e) => (await a(this, R)).moveCharacterStyles(t, e).then((n) => i(n)), g(this, R, o);
772
784
  }
773
785
  }
774
786
  R = new WeakMap();
775
- var et;
787
+ var st;
776
788
  class Be {
777
789
  /**
778
790
  * @ignore
779
791
  */
780
- constructor(i) {
792
+ constructor(o) {
781
793
  /**
782
794
  * @ignore
783
795
  */
784
- u(this, et);
796
+ u(this, st);
785
797
  this.copyFrames = async (t) => {
786
- const r = await (await a(this, et)).copyFrames(t);
787
- return r.data && await navigator.clipboard.writeText(r.data), o(r);
798
+ const r = await (await a(this, st)).copyFrames(t);
799
+ return r.data && await navigator.clipboard.writeText(r.data), i(r);
788
800
  }, this.cutFrames = async (t) => {
789
- const r = await (await a(this, et)).cutFrames(t);
790
- return r.data && await navigator.clipboard.writeText(r.data), o(r);
801
+ const r = await (await a(this, st)).cutFrames(t);
802
+ return r.data && await navigator.clipboard.writeText(r.data), i(r);
791
803
  }, this.pasteFrames = async () => {
792
- const t = await a(this, et), e = await navigator.clipboard.readText(), r = await t.pasteFrames(e);
793
- return o(r);
804
+ const t = await a(this, st), e = await navigator.clipboard.readText(), r = await t.pasteFrames(e);
805
+ return i(r);
794
806
  }, this.getContentType = async () => {
795
- const t = await a(this, et), e = await navigator.clipboard.readText(), r = await t.getClipboardContentType(e);
796
- return o(r);
797
- }, g(this, et, i);
807
+ const t = await a(this, st), e = await navigator.clipboard.readText(), r = await t.getClipboardContentType(e);
808
+ return i(r);
809
+ }, g(this, st, o);
798
810
  }
799
811
  }
800
- et = new WeakMap();
812
+ st = new WeakMap();
801
813
  var Jt;
802
814
  class Je {
803
815
  /**
804
816
  * @ignore
805
817
  */
806
- constructor(i) {
818
+ constructor(o) {
807
819
  /**
808
820
  * @ignore
809
821
  */
810
822
  u(this, Jt);
811
- this.convertToRgb = async (t) => (await a(this, Jt)).colorToRgb(JSON.stringify(t)).then((r) => o(r)), g(this, Jt, i);
823
+ this.convertToRgb = async (t) => (await a(this, Jt)).colorToRgb(JSON.stringify(t)).then((r) => i(r)), g(this, Jt, o);
812
824
  }
813
825
  }
814
826
  Jt = new WeakMap();
@@ -817,119 +829,119 @@ class ke {
817
829
  /**
818
830
  * @ignore
819
831
  */
820
- constructor(i) {
832
+ constructor(o) {
821
833
  /**
822
834
  * @ignore
823
835
  */
824
836
  u(this, V);
825
- this.getAll = async () => (await a(this, V)).getColors().then((e) => o(e)), this.getById = async (t) => (await a(this, V)).getColorById(t).then((r) => o(r)), this.create = async () => (await a(this, V)).createColor().then((e) => o(e)), this.duplicate = async (t) => (await a(this, V)).duplicateColor(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, V)).moveColors(t, e).then((n) => o(n)), this.rename = async (t, e) => (await a(this, V)).renameColor(t, e).then((n) => o(n)), this.update = async (t, e) => {
837
+ this.getAll = async () => (await a(this, V)).getColors().then((e) => i(e)), this.getById = async (t) => (await a(this, V)).getColorById(t).then((r) => i(r)), this.create = async () => (await a(this, V)).createColor().then((e) => i(e)), this.duplicate = async (t) => (await a(this, V)).duplicateColor(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, V)).moveColors(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, V)).renameColor(t, e).then((n) => i(n)), this.update = async (t, e) => {
826
838
  const r = await a(this, V), n = e;
827
- return n.type === W.spot && (n.type = W.spotCMYK), r.updateColor(t, JSON.stringify(n)).then((c) => o(c));
828
- }, this.remove = async (t) => (await a(this, V)).removeColor(t).then((r) => o(r)), g(this, V, i);
839
+ return n.type === j.spot && (n.type = j.spotCMYK), r.updateColor(t, JSON.stringify(n)).then((c) => i(c));
840
+ }, this.remove = async (t) => (await a(this, V)).removeColor(t).then((r) => i(r)), g(this, V, o);
829
841
  }
830
842
  }
831
843
  V = new WeakMap();
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 {
834
- constructor(i, t, e, r = "engineToConnector") {
835
- this.direction = "engineToConnector", this.name = i, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
844
+ var Vt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Vt || {}), re = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(re || {}), Gt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Gt || {}), ur = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s))(ur || {}), gr = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(gr || {}), yr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(yr || {}), pr = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(pr || {}), Cr = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(Cr || {}), Mt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Mt || {});
845
+ class On {
846
+ constructor(o, t, e, r = "engineToConnector") {
847
+ this.direction = "engineToConnector", this.name = o, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
836
848
  }
837
849
  }
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 = {
850
+ var mr = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(mr || {}), wr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(wr || {}), ne = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(ne || {}), fr = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(fr || {});
851
+ const Dn = {
840
852
  url: "grafx-media.json",
841
853
  source: "local"
842
854
  /* local */
843
855
  };
844
- class Fn {
845
- constructor(i) {
846
- this.type = "grafxToken", this.token = i;
856
+ class Nn {
857
+ constructor(o) {
858
+ this.type = "grafxToken", this.token = o;
847
859
  }
848
860
  }
849
- class En {
861
+ class Mn {
850
862
  constructor() {
851
863
  this.type = "refreshed";
852
864
  }
853
865
  }
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 {
856
- constructor(i, t) {
857
- super(i), this.type = t;
866
+ var Sr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(br || {}), fs = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(fs || {});
867
+ class Ir extends Error {
868
+ constructor(o, t) {
869
+ super(o), this.type = t;
858
870
  }
859
871
  }
860
- class oe {
872
+ class ce {
861
873
  constructor() {
862
- this.makeConnectorSourceForwardsCompatible = (i) => {
863
- if (i.source != Nt.grafx || this.isSourceMigrated(i))
864
- return i;
865
- let t = i.url;
874
+ this.makeConnectorSourceForwardsCompatible = (o) => {
875
+ if (o.source != Mt.grafx || this.isSourceMigrated(o))
876
+ return o;
877
+ let t = o.url;
866
878
  for (; t.endsWith("/"); )
867
879
  t = t.substring(0, t.length - 1);
868
880
  const e = t.split("/");
869
- return { id: e[e.length - 1], source: Nt.grafx };
870
- }, this.makeMultipleConnectorsBackwardsCompatible = (i, t) => i.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (i, t) => i.source.source != Nt.grafx ? i : {
871
- id: i.id,
872
- name: i.name,
873
- iconUrl: i.iconUrl,
874
- source: this.makeConnectorSourceBackwardsCompatible(i.source, t)
875
- }, this.makeConnectorSourceBackwardsCompatible = (i, t) => {
881
+ return { id: e[e.length - 1], source: Mt.grafx };
882
+ }, this.makeMultipleConnectorsBackwardsCompatible = (o, t) => o.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (o, t) => o.source.source != Mt.grafx ? o : {
883
+ id: o.id,
884
+ name: o.name,
885
+ iconUrl: o.iconUrl,
886
+ source: this.makeConnectorSourceBackwardsCompatible(o.source, t)
887
+ }, this.makeConnectorSourceBackwardsCompatible = (o, t) => {
876
888
  let e = t;
877
889
  for (; e != null && e.endsWith("/"); )
878
890
  e = e.substring(0, e.length - 1);
879
891
  return {
880
- url: `${e}/connectors/${i.id}`,
881
- source: Nt.grafx
892
+ url: `${e}/connectors/${o.id}`,
893
+ source: Mt.grafx
882
894
  };
883
- }, this.isSourceMigrated = (i) => "id" in i;
895
+ }, this.isSourceMigrated = (o) => "id" in o;
884
896
  }
885
897
  }
886
- var B, St, dt, os;
887
- let Ue = (os = class {
898
+ var G, bt, ut, hs;
899
+ let Ue = (hs = class {
888
900
  /**
889
901
  * @ignore
890
902
  */
891
- constructor(i, t) {
903
+ constructor(o, t) {
892
904
  /**
893
905
  * @ignore
894
906
  */
895
- u(this, B);
896
- u(this, St);
897
- u(this, dt);
898
- this.getById = async (e) => (await a(this, B)).getConnectorById(e).then((n) => o(n)).then((n) => {
907
+ u(this, G);
908
+ u(this, bt);
909
+ u(this, ut);
910
+ this.getById = async (e) => (await a(this, G)).getConnectorById(e).then((n) => i(n)).then((n) => {
899
911
  const c = { ...n, parsedData: null };
900
- return n.parsedData && (c.parsedData = a(this, dt).makeSingleConnectorBackwardsCompatible(
912
+ return n.parsedData && (c.parsedData = a(this, ut).makeSingleConnectorBackwardsCompatible(
901
913
  n.parsedData,
902
- a(this, St).get(Q.GraFxStudioEnvironmentApiUrl)
914
+ a(this, bt).get(X.GraFxStudioEnvironmentApiUrl)
903
915
  )), c;
904
- }), this.getAllByType = async (e) => (await a(this, B)).getConnectors(e).then((n) => o(n)).then((n) => {
916
+ }), this.getAllByType = async (e) => (await a(this, G)).getConnectors(e).then((n) => i(n)).then((n) => {
905
917
  const c = { ...n, parsedData: null };
906
- return n.parsedData && (c.parsedData = a(this, dt).makeMultipleConnectorsBackwardsCompatible(
918
+ return n.parsedData && (c.parsedData = a(this, ut).makeMultipleConnectorsBackwardsCompatible(
907
919
  n.parsedData,
908
- a(this, St).get(Q.GraFxStudioEnvironmentApiUrl)
920
+ a(this, bt).get(X.GraFxStudioEnvironmentApiUrl)
909
921
  )), c;
910
922
  }), this.register = async (e) => {
911
- const r = await a(this, B), n = a(this, dt).makeConnectorSourceForwardsCompatible(e);
912
- return r.registerConnector(JSON.stringify(n)).then((c) => o(c));
913
- }, this.unregister = async (e) => (await a(this, B)).unregisterConnector(e).then((n) => o(n)), this.configure = async (e, r) => {
914
- const n = await a(this, B);
915
- return await this.waitToBeReady(e), await r(new br(e, n)), n.updateConnectorConfiguration(e).then((c) => o(c));
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) => {
923
+ const r = await a(this, G), n = a(this, ut).makeConnectorSourceForwardsCompatible(e);
924
+ return r.registerConnector(JSON.stringify(n)).then((c) => i(c));
925
+ }, this.unregister = async (e) => (await a(this, G)).unregisterConnector(e).then((n) => i(n)), this.configure = async (e, r) => {
926
+ const n = await a(this, G);
927
+ return await this.waitToBeReady(e), await r(new vr(e, n)), n.updateConnectorConfiguration(e).then((c) => i(c));
928
+ }, this.getState = async (e) => (await a(this, G)).getConnectorState(e).then((n) => i(n)), this.getOptions = async (e) => (await a(this, G)).getConnectorOptions(e).then((n) => i(n)), this.waitToBeReady = async (e, r = 2e3) => {
917
929
  let n = Math.max(r, 500);
918
930
  n = Math.min(n, 5e3);
919
931
  const c = 100;
920
- let l = 0;
932
+ let d = 0;
921
933
  try {
922
- for (; l * c < n; ) {
934
+ for (; d * c < n; ) {
923
935
  const h = await this.getState(e);
924
- if (h.success && h.parsedData && (h.parsedData.type === re.running || h.parsedData.type === re.ready))
925
- return o(
936
+ if (h.success && h.parsedData && (h.parsedData.type === ne.running || h.parsedData.type === ne.ready))
937
+ return i(
926
938
  { data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
927
939
  !1
928
940
  );
929
- await new Promise((y) => setTimeout(y, c)), l++;
941
+ await new Promise((p) => setTimeout(p, c)), d++;
930
942
  }
931
943
  } catch (h) {
932
- return o(
944
+ return i(
933
945
  {
934
946
  data: null,
935
947
  success: !1,
@@ -940,7 +952,7 @@ let Ue = (os = class {
940
952
  !1
941
953
  );
942
954
  }
943
- return o(
955
+ return i(
944
956
  {
945
957
  data: null,
946
958
  success: !1,
@@ -951,16 +963,16 @@ let Ue = (os = class {
951
963
  !1
952
964
  );
953
965
  }, this.updateMappings = async (e, r) => await this.configure(e, async (n) => {
954
- const { parsedData: c } = await this.getMappings(e), l = (c == null ? void 0 : c.filter(
955
- (p) => !r.some(
956
- (I) => I.name === p.name && I.direction === p.direction
966
+ const { parsedData: c } = await this.getMappings(e), d = (c == null ? void 0 : c.filter(
967
+ (y) => !r.some(
968
+ (I) => I.name === y.name && I.direction === y.direction
957
969
  )
958
- )) ?? [], h = r.filter((p) => p.name !== "" && p.value !== ""), y = [...l, ...h];
959
- await n.setMappings(y);
960
- }), g(this, B, i), g(this, St, t), g(this, dt, new oe());
970
+ )) ?? [], h = r.filter((y) => y.name !== "" && y.value !== ""), p = [...d, ...h];
971
+ await n.setMappings(p);
972
+ }), g(this, G, o), g(this, bt, t), g(this, ut, new ce());
961
973
  }
962
- async getMappings(i, t) {
963
- return (await a(this, B)).getConnectorMappings(i).then((r) => o(r)).then(
974
+ async getMappings(o, t) {
975
+ return (await a(this, G)).getConnectorMappings(o).then((r) => i(r)).then(
964
976
  (r) => {
965
977
  var n;
966
978
  return t ? {
@@ -970,176 +982,176 @@ let Ue = (os = class {
970
982
  }
971
983
  );
972
984
  }
973
- }, B = new WeakMap(), St = new WeakMap(), dt = new WeakMap(), os);
974
- var ut, gt;
975
- class br {
985
+ }, G = new WeakMap(), bt = new WeakMap(), ut = new WeakMap(), hs);
986
+ var gt, yt;
987
+ class vr {
976
988
  /**
977
989
  * @ignore
978
990
  */
979
- constructor(i, t) {
991
+ constructor(o, t) {
980
992
  /**
981
993
  * @ignore
982
994
  */
983
- u(this, ut);
984
995
  u(this, gt);
985
- this.setOptions = async (e) => a(this, gt).setConnectorOptions(a(this, ut), JSON.stringify(e)).then((r) => o(r)), this.setMappings = async (e) => {
986
- const r = await a(this, gt).setConnectorMappings(
987
- a(this, ut),
996
+ u(this, yt);
997
+ this.setOptions = async (e) => a(this, yt).setConnectorOptions(a(this, gt), JSON.stringify(e)).then((r) => i(r)), this.setMappings = async (e) => {
998
+ const r = await a(this, yt).setConnectorMappings(
999
+ a(this, gt),
988
1000
  e.map(function(n) {
989
1001
  return JSON.stringify(n);
990
1002
  })
991
1003
  );
992
- return o(r);
993
- }, this.setHttpHeader = async (e, r) => a(this, gt).connectorAuthenticationSetHttpHeader(a(this, ut), e, r).then((n) => o(n)), g(this, ut, i), g(this, gt, t);
1004
+ return i(r);
1005
+ }, this.setHttpHeader = async (e, r) => a(this, yt).connectorAuthenticationSetHttpHeader(a(this, gt), e, r).then((n) => i(n)), g(this, gt, o), g(this, yt, t);
994
1006
  }
995
1007
  }
996
- ut = new WeakMap(), gt = new WeakMap();
997
- var st, kt;
998
- class Ge {
1008
+ gt = new WeakMap(), yt = new WeakMap();
1009
+ var rt, kt;
1010
+ class _e {
999
1011
  /**
1000
1012
  * @ignore
1001
1013
  */
1002
- constructor(i, t) {
1014
+ constructor(o, t) {
1003
1015
  /**
1004
1016
  * @ignore
1005
1017
  */
1006
- u(this, st);
1018
+ u(this, rt);
1007
1019
  u(this, kt);
1008
- this.getPage = async (e, r, n = {}) => (await a(this, st)).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, kt).mapEngineToDataItem(y)
1020
+ this.getPage = async (e, r, n = {}) => (await a(this, rt)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((d) => i(d)).then((d) => {
1021
+ const h = { ...d, parsedData: null };
1022
+ return d.parsedData && (h.parsedData = {
1023
+ data: d.parsedData.data.map(
1024
+ (p) => a(this, kt).mapEngineToDataItem(p)
1013
1025
  ),
1014
- continuationToken: l.parsedData.continuationToken
1026
+ continuationToken: d.parsedData.continuationToken
1015
1027
  }), h;
1016
- }), this.getModel = async (e, r = {}) => (await a(this, st)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => o(c)), this.getConfigurationOptions = async (e) => (await a(this, st)).dataConnectorGetConfigurationOptions(e).then((n) => o(n)), this.getCapabilities = async (e) => (await a(this, st)).dataConnectorGetCapabilities(e).then((n) => o(n)), g(this, st, i), g(this, kt, t);
1028
+ }), this.getModel = async (e, r = {}) => (await a(this, rt)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => i(c)), this.getConfigurationOptions = async (e) => (await a(this, rt)).dataConnectorGetConfigurationOptions(e).then((n) => i(n)), this.getCapabilities = async (e) => (await a(this, rt)).dataConnectorGetCapabilities(e).then((n) => i(n)), g(this, rt, o), g(this, kt, t);
1017
1029
  }
1018
1030
  }
1019
- st = new WeakMap(), kt = new WeakMap();
1020
- var rt, Ut;
1021
- class Te {
1031
+ rt = new WeakMap(), kt = new WeakMap();
1032
+ var nt, Ut;
1033
+ class He {
1022
1034
  /**
1023
1035
  * @ignore
1024
1036
  */
1025
- constructor(i, t) {
1037
+ constructor(o, t) {
1026
1038
  /**
1027
1039
  * @ignore
1028
1040
  */
1029
- u(this, rt);
1041
+ u(this, nt);
1030
1042
  u(this, Ut);
1031
- this.setDataSource = async (e) => (await a(this, rt)).setDataSource(e).then((n) => o(n)), this.getDataSource = async () => (await a(this, rt)).getDataSource().then((r) => o(r)), this.removeDataSource = async () => (await a(this, rt)).removeDataSource().then((r) => o(r)), this.setDataRow = async (e) => {
1032
- const r = await a(this, rt), n = a(this, Ut).mapDataItemToEngine(e);
1033
- return r.setDataRow(JSON.stringify(n)).then((c) => o(c));
1034
- }, g(this, rt, i), g(this, Ut, t);
1043
+ this.setDataSource = async (e) => (await a(this, nt)).setDataSource(e).then((n) => i(n)), this.getDataSource = async () => (await a(this, nt)).getDataSource().then((r) => i(r)), this.removeDataSource = async () => (await a(this, nt)).removeDataSource().then((r) => i(r)), this.setDataRow = async (e) => {
1044
+ const r = await a(this, nt), n = a(this, Ut).mapDataItemToEngine(e);
1045
+ return r.setDataRow(JSON.stringify(n)).then((c) => i(c));
1046
+ }, g(this, nt, o), g(this, Ut, t);
1035
1047
  }
1036
1048
  }
1037
- rt = new WeakMap(), Ut = new WeakMap();
1038
- var nt;
1039
- class He {
1049
+ nt = new WeakMap(), Ut = new WeakMap();
1050
+ var at;
1051
+ class Te {
1040
1052
  /**
1041
1053
  * @ignore
1042
1054
  */
1043
- constructor(i) {
1055
+ constructor(o) {
1044
1056
  /**
1045
1057
  * @ignore
1046
1058
  */
1047
- u(this, nt);
1048
- this.getAllLogs = async () => (await a(this, nt)).getLogs().then((e) => o(e)), this.toggleDebugPanel = async () => (await a(this, nt)).toggleDebugPanel().then((e) => o(e)), this.enableDebug = async () => (await a(this, nt)).enableDebug().then((e) => o(e)), this.disableDebug = async () => (await a(this, nt)).disableDebug().then((e) => o(e)), g(this, nt, i);
1059
+ u(this, at);
1060
+ this.getAllLogs = async () => (await a(this, at)).getLogs().then((e) => i(e)), this.toggleDebugPanel = async () => (await a(this, at)).toggleDebugPanel().then((e) => i(e)), this.enableDebug = async () => (await a(this, at)).enableDebug().then((e) => i(e)), this.disableDebug = async () => (await a(this, at)).disableDebug().then((e) => i(e)), g(this, at, o);
1049
1061
  }
1050
1062
  }
1051
- nt = new WeakMap();
1052
- var yt;
1053
- class _e {
1063
+ at = new WeakMap();
1064
+ var pt;
1065
+ class Ke {
1054
1066
  /**
1055
1067
  * @ignore
1056
1068
  */
1057
- constructor(i) {
1069
+ constructor(o) {
1058
1070
  /**
1059
1071
  * @ignore
1060
1072
  */
1061
- u(this, yt);
1062
- this.getCurrentState = async () => (await a(this, yt)).getCurrentDocumentState().then((e) => o(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
1063
- const r = await a(this, yt), n = typeof t != "string" ? JSON.stringify(t) : t;
1064
- return r.loadDocument(n, JSON.stringify(e)).then((c) => o(c));
1073
+ u(this, pt);
1074
+ this.getCurrentState = async () => (await a(this, pt)).getCurrentDocumentState().then((e) => i(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
1075
+ const r = await a(this, pt), n = typeof t != "string" ? JSON.stringify(t) : t;
1076
+ return r.loadDocument(n, JSON.stringify(e)).then((c) => i(c));
1065
1077
  }, this.createAndLoad = async (t) => {
1066
- const e = await a(this, yt), r = JSON.stringify(t);
1067
- return e.createAndLoadDocument(r).then((n) => o(n));
1068
- }, g(this, yt, i);
1078
+ const e = await a(this, pt), r = JSON.stringify(t);
1079
+ return e.createAndLoadDocument(r).then((n) => i(n));
1080
+ }, g(this, pt, o);
1069
1081
  }
1070
1082
  }
1071
- yt = new WeakMap();
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 {
1083
+ pt = new WeakMap();
1084
+ var Ar = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(Ar || {}), qt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(qt || {}), Pr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(Pr || {}), Fr = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Er || {}), Lr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(Lr || {}), Or = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Or || {}), 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 || {}), Nr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Nr || {}), Mr = /* @__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))(Mr || {}), xr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(xr || {}), Rr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Rr || {}), Vr = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Vr || {}), Gr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Gr || {});
1085
+ class Rn {
1074
1086
  constructor() {
1075
1087
  this.type = "page";
1076
1088
  }
1077
1089
  }
1078
- class On {
1079
- constructor(i, t) {
1080
- this.type = "frame", this.frameId = i, this.edge = t;
1090
+ class Vn {
1091
+ constructor(o, t) {
1092
+ this.type = "frame", this.frameId = o, this.edge = t;
1081
1093
  }
1082
1094
  }
1083
- var ws = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(ws || {}), J;
1095
+ var Ss = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Ss || {}), B;
1084
1096
  class $e {
1085
1097
  /**
1086
1098
  * @ignore
1087
1099
  */
1088
- constructor(i) {
1100
+ constructor(o) {
1089
1101
  /**
1090
1102
  * @ignore
1091
1103
  */
1092
- u(this, J);
1104
+ u(this, B);
1093
1105
  this.insertImageVariableToFrame = async (t, e) => {
1094
- const r = await a(this, J), n = { id: e, type: jt.variable };
1095
- return r.setImageSource(t, JSON.stringify(n)).then((c) => o(c));
1096
- }, 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);
1106
+ const r = await a(this, B), n = { id: e, type: qt.variable };
1107
+ return r.setImageSource(t, JSON.stringify(n)).then((c) => i(c));
1108
+ }, this.insertTextVariable = async (t) => (await a(this, B)).insertTextVariable(t).then((r) => i(r)), this.enterTextEditMode = async (t) => (await a(this, B)).enterTextEditMode(t).then((r) => i(r)), this.exitTextEditMode = async () => (await a(this, B)).exitTextEditMode().then((e) => i(e)), this.getText = async (t, e) => (await a(this, B)).getTextByFrameId(t, e).then((n) => i(n)), this.setText = async (t, e) => (await a(this, B)).setTextByFrameId(t, e).then((n) => i(n)), this.selectText = async (t, e, r) => (await a(this, B)).selectTextById(t, e, r).then((c) => i(c)), this.addCustomUndoData = async (t, e, r) => (await a(this, B)).setCustomUndoData(t, e, r ?? !1).then((c) => i(c)), g(this, B, o);
1097
1109
  }
1098
1110
  }
1099
- J = new WeakMap();
1100
- var at, bt;
1101
- class Ke {
1111
+ B = new WeakMap();
1112
+ var it, It;
1113
+ class ze {
1102
1114
  /**
1103
1115
  * @ignore
1104
1116
  */
1105
- constructor(i) {
1117
+ constructor(o) {
1106
1118
  /**
1107
1119
  * @ignore
1108
1120
  */
1109
- u(this, at);
1110
- u(this, bt);
1111
- this.query = async (t, e, r = {}) => (await a(this, at)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, at)).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, at)).fontConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, at)).fontConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedFontType = (t) => {
1112
- if (t === Rt.file) return Vt.file;
1113
- if (t === Rt.collection) return Vt.collection;
1114
- }, g(this, at, i), g(this, bt, i);
1121
+ u(this, it);
1122
+ u(this, It);
1123
+ this.query = async (t, e, r = {}) => (await a(this, it)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.detail = async (t, e, r = {}) => (await a(this, it)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => i(c)), this.download = async (t, e, r = {}) => (await a(this, It)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await a(this, It)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((d) => d ?? d), this.getConfigurationOptions = async (t) => (await a(this, it)).fontConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, it)).fontConnectorGetCapabilities(t).then((r) => i(r)), this.parseDeprecatedFontType = (t) => {
1124
+ if (t === Vt.file) return Gt.file;
1125
+ if (t === Vt.collection) return Gt.collection;
1126
+ }, g(this, it, o), g(this, It, o);
1115
1127
  }
1116
1128
  }
1117
- at = new WeakMap(), bt = new WeakMap();
1129
+ it = new WeakMap(), It = new WeakMap();
1118
1130
  var F;
1119
- class ze {
1131
+ class We {
1120
1132
  /**
1121
1133
  * @ignore
1122
1134
  */
1123
- constructor(i) {
1135
+ constructor(o) {
1124
1136
  /**
1125
1137
  * @ignore
1126
1138
  */
1127
1139
  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);
1140
+ this.addFontFamily = async (t, e) => (await a(this, F)).addFontFamily(t, JSON.stringify(e)).then((n) => i(n)), this.removeFontFamily = async (t) => (await a(this, F)).removeFontFamily(t).then((r) => i(r)), this.addFontStyle = async (t, e) => (await a(this, F)).addFontStyle(t, JSON.stringify(e)).then((n) => i(n)), this.removeFontStyle = async (t) => (await a(this, F)).removeFontStyle(t).then((r) => i(r)), this.getFontFamilies = async () => (await a(this, F)).getFontFamilies().then((e) => i(e)), this.getFontStyles = async (t) => (await a(this, F)).getFontStyles(t).then((r) => i(r)), this.getFontFamilyById = async (t) => (await a(this, F)).getFontFamilyById(t).then((r) => i(r)), this.getFontStyleById = async (t) => (await a(this, F)).getFontStyleById(t).then((r) => i(r)), this.getDefaultFontStyle = async () => (await a(this, F)).getDefaultFontStyle().then((e) => i(e)), this.getDefaultFontFamily = async () => (await a(this, F)).getDefaultFontFamily().then((e) => i(e)), this.isFontFamilyUsed = async (t) => (await a(this, F)).isFontFamilyUsed(t).then((r) => i(r)), this.isFontStyleUsed = async (t) => (await a(this, F)).isFontStyleUsed(t).then((r) => i(r)), this.moveFontFamilies = async (t, e) => (await a(this, F)).moveFontFamilies(t, e).then((n) => i(n)), this.getPreviewsOfCharacterStrings = async (t, e) => (await a(this, F)).getPreviewsOfCharacterStrings(t, JSON.stringify(e)).then((n) => i(n)), g(this, F, o);
1129
1141
  }
1130
1142
  }
1131
1143
  F = new WeakMap();
1132
- var It;
1133
- class ne {
1144
+ var vt;
1145
+ class ae {
1134
1146
  /**
1135
1147
  * @ignore
1136
1148
  */
1137
- constructor(i) {
1149
+ constructor(o) {
1138
1150
  /**
1139
1151
  * @ignore
1140
1152
  */
1141
- u(this, It);
1142
- this.setShapeProperties = async (t, e) => (await a(this, It)).setShapeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableFill = async (t, e) => {
1153
+ u(this, vt);
1154
+ this.setShapeProperties = async (t, e) => (await a(this, vt)).setShapeProperties(t, JSON.stringify(e)).then((n) => i(n)), this.setEnableFill = async (t, e) => {
1143
1155
  const r = { enableFill: e };
1144
1156
  return this.setShapeProperties(t, r);
1145
1157
  }, this.setFillColor = async (t, e) => {
@@ -1157,7 +1169,7 @@ class ne {
1157
1169
  }, this.setFlagAllCornersSame = async (t, e) => {
1158
1170
  const r = { allCornersSame: e };
1159
1171
  return this.setShapeProperties(t, r);
1160
- }, this.setShapeCorners = async (t, e) => (await a(this, It)).setShapeCorners(t, JSON.stringify(e)).then((n) => o(n)), this.setRadiusAll = async (t, e) => {
1172
+ }, this.setShapeCorners = async (t, e) => (await a(this, vt)).setShapeCorners(t, JSON.stringify(e)).then((n) => i(n)), this.setRadiusAll = async (t, e) => {
1161
1173
  const r = { radiusAll: e };
1162
1174
  return this.setShapeCorners(t, r);
1163
1175
  }, this.setRadiusTopLeft = async (t, e) => {
@@ -1172,187 +1184,201 @@ class ne {
1172
1184
  }, this.setRadiusBottomRight = async (t, e) => {
1173
1185
  const r = { bottomRight: e };
1174
1186
  return this.setShapeCorners(t, r);
1175
- }, g(this, It, i);
1187
+ }, g(this, vt, o);
1176
1188
  }
1177
1189
  }
1178
- It = new WeakMap();
1179
- var d;
1180
- class We {
1190
+ vt = new WeakMap();
1191
+ var l;
1192
+ class je {
1181
1193
  /**
1182
1194
  * @ignore
1183
1195
  */
1184
- constructor(i) {
1196
+ constructor(o) {
1185
1197
  /**
1186
1198
  * @ignore
1187
1199
  */
1188
- u(this, d);
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) => {
1190
- const r = await a(this, d), n = e !== null ? JSON.stringify(e) : null;
1191
- return r.setImageSource(t, n).then((c) => o(c));
1200
+ u(this, l);
1201
+ this.getAll = async () => (await a(this, l)).getFrames().then((e) => i(e)), this.getSelected = async () => (await a(this, l)).getSelectedFrames().then((e) => i(e)), this.getAllByPageId = async (t) => (await a(this, l)).getFramesByPageId(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, l)).getFrameByName(t).then((r) => i(r)), this.getById = async (t) => (await a(this, l)).getFrameById(t).then((r) => i(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, l)).getFramePropertiesOnSelectedLayout().then((e) => i(e)), this.getLayoutProperties = async (t, e) => (await a(this, l)).getFramePropertiesByFrameId(t, e).then((n) => i(n)), this.getAllLayoutProperties = async (t) => (await a(this, l)).getFramesProperties(t).then((r) => i(r)), this.resetTransformation = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetSize = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.select = async (t) => (await a(this, l)).selectFrames([t]).then((r) => i(r)), this.selectMultiple = async (t) => (await a(this, l)).selectFrames(t).then((r) => i(r)), this.deselectAll = async () => (await a(this, l)).deselectFrames().then((e) => i(e)), this.reorderFrames = async (t, e) => (await a(this, l)).reorderFrames(t, e).then((n) => i(n)), this.setZIndex = async (t, e) => (await a(this, l)).setFrameZIndex(t, e).then((n) => i(n)), this.setHeight = async (t, e) => (await a(this, l)).setFrameHeight(t, e).then((n) => i(n)), this.setRotation = async (t, e) => (await a(this, l)).setFrameRotation(t, e).then((n) => i(n)), this.setWidth = async (t, e) => (await a(this, l)).setFrameWidth(t, e).then((n) => i(n)), this.setX = async (t, e) => (await a(this, l)).setFrameX(t, e).then((n) => i(n)), this.setY = async (t, e) => (await a(this, l)).setFrameY(t, e).then((n) => i(n)), this.setOpacity = async (t, e) => (await a(this, l)).setFrameOpacity(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, l)).renameFrame(t, e).then((n) => i(n)), this.reset = async (t) => (await a(this, l)).resetFrame(t).then((r) => i(r)), this.resetX = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetY = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetRotation = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetWidth = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetHeight = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetImageFrameFitMode = async (t) => (await a(this, l)).resetImageFrameFitMode(t).then((r) => i(r)), this.setVisibility = async (t, e) => (await a(this, l)).setFrameIsVisible(t, e).then((n) => i(n)), this.setIsVisible = async (t, e) => (await a(this, l)).setFrameIsVisible(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, l)).removeFrames([t]).then((r) => i(r)), this.removeFrames = async (t) => (await a(this, l)).removeFrames(t).then((r) => i(r)), this.create = async (t, e, r, n, c) => (await a(this, l)).addFrame(t, e, r, n, c).then((h) => i(h)), this.createShapeFrame = async (t, e, r, n, c) => (await a(this, l)).addFrame(t, e, r, n, c).then((h) => i(h)), this.createBarcodeFrame = async (t, e) => (await a(this, l)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => i(n)), this.duplicateFrames = async (t) => (await a(this, l)).duplicateFrames(t).then((r) => i(r)), this.updateImageSource = async (t, e) => {
1202
+ const r = await a(this, l), n = e !== null ? JSON.stringify(e) : null;
1203
+ return r.setImageSource(t, n).then((c) => i(c));
1192
1204
  }, this.removeImageSource = async (t) => this.updateImageSource(t, null), this.setImageFromConnector = async (t, e, r) => {
1193
1205
  const n = {
1194
1206
  id: e,
1195
1207
  assetId: r,
1196
- type: jt.connector
1208
+ type: qt.connector
1197
1209
  };
1198
1210
  return this.updateImageSource(t, n);
1199
1211
  }, this.setImageFromUrl = async (t, e) => {
1200
- const r = { url: e, type: jt.url };
1212
+ const r = { url: e, type: qt.url };
1201
1213
  return this.updateImageSource(t, r);
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({
1214
+ }, this.setImageFrameFitMode = async (t, e) => (await a(this, l)).setImageFrameFitMode(t, e).then((n) => i(n)), this.setImageFrameFitModePosition = async (t, e) => (await a(this, l)).setImageFrameFitModePosition(t, e).then((n) => i(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), i({
1203
1215
  success: !1,
1204
1216
  status: 0,
1205
1217
  error: "setFrameConstrainProportions is not supported anymore",
1206
1218
  parsedData: null
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({
1219
+ })), this.setVerticalAlign = async (t, e) => (await a(this, l)).setVerticalAlignment(t, e).then((n) => i(n)), this.setMinCopyfitting = async (t, e) => (await a(this, l)).setMinCopyfitting(t, e).then((n) => i(n)), this.setMaxCopyfitting = async (t, e) => (await a(this, l)).setMaxCopyfitting(t, e).then((n) => i(n)), this.setEnableCopyfitting = async (t, e) => (await a(this, l)).setEnableCopyfitting(t, e).then((n) => i(n)), this.resetMinCopyfitting = async (t) => (await a(this, l)).resetMinCopyfitting(t).then((r) => i(r)), this.resetMaxCopyfitting = async (t) => (await a(this, l)).resetMaxCopyfitting(t).then((r) => i(r)), this.resetEnableCopyfitting = async (t) => (await a(this, l)).resetEnableCopyfitting(t).then((r) => i(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, l)).setFrameBlendMode(t, e).then((n) => i(n)), this.enterCropMode = async (t, e = Ss.frameCrop) => (await a(this, l)).enterCropMode(t, e).then((n) => i(n)), this.applyCropMode = async () => (await a(this, l)).applyCropMode().then((e) => i(e)), this.exitCropMode = async () => (await a(this, l)).cancelCropMode().then((e) => i(e)), this.enterSubjectMode = async (t) => (await a(this, l)).enterSubjectMode(t).then((r) => i(r)), this.applySubjectMode = async () => (await a(this, l)).applySubjectMode().then((e) => i(e)), this.exitSubjectMode = async () => (await a(this, l)).cancelSubjectMode().then((e) => i(e)), this.enterGradientMode = async (t) => (await a(this, l)).enterGradientMode(t).then((r) => i(r)), this.applyGradientMode = async () => (await a(this, l)).applyGradientMode().then((e) => i(e)), this.cancelGradientMode = async () => (await a(this, l)).cancelGradientMode().then((e) => i(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), i({
1208
1220
  success: !1,
1209
1221
  status: 0,
1210
1222
  error: "resetCropMode is not supported anymore",
1211
1223
  parsedData: null
1212
1224
  })), this.setEnableAutoGrow = async (t, e) => {
1213
1225
  const r = { enabled: { value: e } };
1214
- return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1226
+ return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
1215
1227
  }, this.setAutoGrowMinWidth = async (t, e) => {
1216
1228
  const r = { minWidth: { value: e } };
1217
- return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1229
+ return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
1218
1230
  }, this.setAutoGrowMaxWidth = async (t, e) => {
1219
1231
  const r = { maxWidth: { value: e } };
1220
- return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1232
+ return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
1221
1233
  }, this.setAutoGrowMinHeight = async (t, e) => {
1222
1234
  const r = { minHeight: { value: e } };
1223
- return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1235
+ return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
1224
1236
  }, this.setAutoGrowMaxHeight = async (t, e) => {
1225
1237
  const r = { maxHeight: { value: e } };
1226
- return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1238
+ return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
1227
1239
  }, this.setAutoGrowDirections = async (t, e) => {
1228
1240
  const r = { directions: { value: e } };
1229
- return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1230
- }, this.resetAutoGrowSettingsEnabled = async (t) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), o({
1241
+ return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
1242
+ }, this.resetAutoGrowSettingsEnabled = async (t) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), i({
1231
1243
  success: !1,
1232
1244
  status: 0,
1233
1245
  error: "resetAutoGrowSettingsEnabled is not supported anymore",
1234
1246
  parsedData: null
1235
- })), this.resetAutoGrowMinWidth = async (t) => (console.error("resetAutoGrowMinWidth is not supported anymore"), o({
1247
+ })), this.resetAutoGrowMinWidth = async (t) => (console.error("resetAutoGrowMinWidth is not supported anymore"), i({
1236
1248
  success: !1,
1237
1249
  status: 0,
1238
1250
  error: "resetAutoGrowMinWidth is not supported anymore",
1239
1251
  parsedData: null
1240
- })), this.resetAutoGrowMaxWidth = async (t) => (console.error("resetAutoGrowMaxWidth is not supported anymore"), o({
1252
+ })), this.resetAutoGrowMaxWidth = async (t) => (console.error("resetAutoGrowMaxWidth is not supported anymore"), i({
1241
1253
  success: !1,
1242
1254
  status: 0,
1243
1255
  error: "resetAutoGrowMaxWidth is not supported anymore",
1244
1256
  parsedData: null
1245
- })), this.resetAutoGrowMinHeight = async (t) => (console.error("resetAutoGrowMinHeight is not supported anymore"), o({
1257
+ })), this.resetAutoGrowMinHeight = async (t) => (console.error("resetAutoGrowMinHeight is not supported anymore"), i({
1246
1258
  success: !1,
1247
1259
  status: 0,
1248
1260
  error: "resetAutoGrowMinHeight is not supported anymore",
1249
1261
  parsedData: null
1250
- })), this.resetAutoGrowMaxHeight = async (t) => (console.error("resetAutoGrowMaxHeight is not supported anymore"), o({
1262
+ })), this.resetAutoGrowMaxHeight = async (t) => (console.error("resetAutoGrowMaxHeight is not supported anymore"), i({
1251
1263
  success: !1,
1252
1264
  status: 0,
1253
1265
  error: "resetAutoGrowMaxHeight is not supported anymore",
1254
1266
  parsedData: null
1255
- })), this.resetAutoGrowDirections = async (t) => (console.error("resetAutoGrowDirections is not supported anymore"), o({
1267
+ })), this.resetAutoGrowDirections = async (t) => (console.error("resetAutoGrowDirections is not supported anymore"), i({
1256
1268
  success: !1,
1257
1269
  status: 0,
1258
1270
  error: "resetAutoGrowDirections is not supported anymore",
1259
1271
  parsedData: null
1260
- })), this.resetAutoGrow = async (t) => (console.error("resetAutoGrow is not supported anymore"), o({
1272
+ })), this.resetAutoGrow = async (t) => (console.error("resetAutoGrow is not supported anymore"), i({
1261
1273
  success: !1,
1262
1274
  status: 0,
1263
1275
  error: "resetAutoGrow is not supported anymore",
1264
1276
  parsedData: null
1265
1277
  })), this.setShadowEnabled = async (t, e) => {
1266
1278
  const r = { enabled: { value: e } };
1267
- return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
1279
+ return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
1268
1280
  }, this.setShadowDistance = async (t, e) => {
1269
1281
  const r = { distance: { value: e } };
1270
- return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
1282
+ return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
1271
1283
  }, this.setShadowAngleDegrees = async (t, e) => {
1272
1284
  const r = { angleDegrees: { value: e } };
1273
- return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
1285
+ return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
1274
1286
  }, this.setShadowBlurRadius = async (t, e) => {
1275
1287
  const r = { blurRadius: { value: e } };
1276
- return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
1288
+ return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
1277
1289
  }, this.setShadowColor = async (t, e) => {
1278
1290
  const r = { color: { value: e } };
1279
- return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
1291
+ return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
1280
1292
  }, this.setAnchor = async (t, e, r, n, c) => {
1281
- const l = {
1293
+ const d = {
1282
1294
  horizontal: e,
1283
1295
  type: r,
1284
1296
  target: n,
1285
1297
  endTarget: c
1286
1298
  };
1287
- return (await a(this, d)).setAnchorProperties(t, JSON.stringify(l)).then((y) => o(y));
1288
- }, 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));
1299
+ return (await a(this, l)).setAnchorProperties(t, JSON.stringify(d)).then((p) => i(p));
1300
+ }, 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, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetVisibility = async (t) => (await a(this, l)).setFrameIsVisible(t, null).then((r) => i(r)), this.getConfiguration = async (t) => (await a(this, l)).getFrameConfiguration(t).then((r) => i(r)), this.resetAssetCropOverride = async (t) => (await a(this, l)).resetAssetCropOverride(t).then((r) => i(r)), this.resetAllAssetCropOverrides = async (t) => (await a(this, l)).resetAllAssetCropOverrides(t).then((r) => i(r)), this.setGradientApplied = async (t, e) => {
1301
+ const r = { isApplied: e };
1302
+ return (await a(this, l)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
1303
+ }, this.setLocalGradient = async (t, e) => {
1304
+ const r = { gradient: e };
1305
+ return (await a(this, l)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
1306
+ }, this.setBrandKitGradient = async (t, e) => {
1307
+ const r = { id: e };
1308
+ return (await a(this, l)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
1309
+ }, g(this, l, o), this.shapeController = new ae(a(this, l));
1289
1310
  }
1290
1311
  }
1291
- d = new WeakMap();
1292
- class je {
1312
+ l = new WeakMap();
1313
+ class qe {
1293
1314
  constructor() {
1294
- this.currentEngineVersion = ls.current, this.currentSDKVersion = ds.version;
1315
+ this.currentEngineVersion = us.current, this.currentSDKVersion = gs.version;
1295
1316
  }
1296
1317
  }
1297
- var w, Gt;
1298
- class qe {
1318
+ var w, _t;
1319
+ class Ye {
1299
1320
  /**
1300
1321
  * @ignore
1301
1322
  */
1302
- constructor(i) {
1323
+ constructor(o) {
1303
1324
  /**
1304
1325
  * @ignore
1305
1326
  */
1306
1327
  u(this, w);
1307
- u(this, Gt);
1308
- 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) => {
1328
+ u(this, _t);
1329
+ this.getAll = async () => (await a(this, w)).getLayouts().then((e) => i(e)), this.getById = async (t) => (await a(this, w)).getLayoutById(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, w)).getLayoutByName(t).then((r) => i(r)), this.getSelected = async () => (await a(this, w)).getSelectedLayout().then((e) => i(e)), this.remove = async (t) => (await a(this, w)).removeLayout(t).then((r) => i(r)), this.create = async (t, e) => {
1309
1330
  const r = await a(this, w);
1310
- return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => o(n)) : r.addLayout(t).then((n) => o(n));
1311
- }, 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) => {
1331
+ return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => i(n)) : r.addLayout(t).then((n) => i(n));
1332
+ }, this.rename = async (t, e) => (await a(this, w)).renameLayout(t, e).then((n) => i(n)), this.select = async (t) => (await a(this, w)).selectLayoutWithOptions(t, null).then((r) => i(r)), this.selectWithPageSize = async (t, e) => {
1333
+ const r = await a(this, w), n = {
1334
+ pageSize: e
1335
+ };
1336
+ return r.selectLayoutWithOptions(t, JSON.stringify(n)).then((c) => i(c));
1337
+ }, this.duplicate = async (t) => (await a(this, w)).duplicateLayout(t).then((r) => i(r)), this.reset = async (t) => (await a(this, w)).resetLayout(t).then((r) => i(r)), this.setHeight = async (t, e) => (await a(this, w)).setLayoutHeight(t, e).then((n) => i(n)), this.setWidth = async (t, e) => (await a(this, w)).setLayoutWidth(t, e).then((n) => i(n)), this.setUnit = async (t, e) => (await a(this, w)).setLayoutUnit(t, e).then((n) => i(n)), this.resetHeight = async (t) => (await a(this, w)).resetLayoutHeight(t).then((r) => i(r)), this.resetWidth = async (t) => (await a(this, w)).resetLayoutWidth(t).then((r) => i(r)), this.resetUnit = async (t) => (await a(this, w)).resetLayoutUnit(t).then((r) => i(r)), this.getSelectedSnapshot = async () => (await a(this, _t)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, w)).setLayoutIntent(t, e).then((n) => i(n)), this.resetIntent = async (t) => (await a(this, w)).resetLayoutIntent(t).then((r) => i(r)), this.setFillColor = async (t, e) => (await a(this, w)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => i(n)), this.setFillColorEnabled = async (t, e) => (await a(this, w)).setLayoutFillColorEnabled(t, e).then((n) => i(n)), this.resetFillColor = async (t) => (await a(this, w)).resetLayoutFillColor(t).then((r) => i(r)), this.setBleedValue = async (t, e, r) => {
1312
1338
  const n = r ? {
1313
- left: r === Z.left ? e : void 0,
1314
- top: r === Z.top ? e : void 0,
1315
- right: r === Z.right ? e : void 0,
1316
- bottom: r === Z.bottom ? e : void 0
1339
+ left: r === Q.left ? e : void 0,
1340
+ top: r === Q.top ? e : void 0,
1341
+ right: r === Q.right ? e : void 0,
1342
+ bottom: r === Q.bottom ? e : void 0
1317
1343
  } : { left: e, top: e, right: e, bottom: e };
1318
- return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(n)).then((l) => o(l));
1344
+ return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(n)).then((d) => i(d));
1319
1345
  }, this.setAreBleedValuesCombined = async (t, e) => {
1320
1346
  const r = { areBleedValuesCombined: e };
1321
- return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => o(c));
1322
- }, 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);
1347
+ return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => i(c));
1348
+ }, this.resetBleedValues = async (t) => (await a(this, w)).updateLayoutBleed(t, null).then((r) => i(r)), this.setPrivateData = async (t, e) => (await a(this, w)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => i(n)), this.getPrivateData = async (t) => (await a(this, w)).getLayoutPrivateData(t).then((r) => i(r)), this.setDisplayName = async (t, e) => (await a(this, w)).setLayoutDisplayName(t, e).then((n) => i(n)), this.getDisplayName = async (t) => (await a(this, w)).getLayoutDisplayName(t).then((r) => i(r)), this.resetDisplayName = async (t) => (await a(this, w)).setLayoutDisplayName(t, null).then((r) => i(r)), this.setAvailableForUser = async (t, e) => (await a(this, w)).setLayoutAvailableForUser(t, e).then((n) => i(n)), this.setSelectedByUser = async (t, e) => (await a(this, w)).setLayoutSelectedByUser(t, e).then((n) => i(n)), this.setResizableByUser = async (t, e) => (await a(this, w)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => i(n)), g(this, w, o), g(this, _t, o);
1323
1349
  }
1324
1350
  }
1325
- w = new WeakMap(), Gt = new WeakMap();
1326
- 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 || {}), j, Tt;
1327
- class Ye {
1351
+ w = new WeakMap(), _t = new WeakMap();
1352
+ var ie = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(ie || {}), bs = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(bs || {}), q, Ht;
1353
+ class Ze {
1328
1354
  /**
1329
1355
  * @ignore
1330
1356
  */
1331
- constructor(i) {
1357
+ constructor(o) {
1332
1358
  /**
1333
1359
  * @ignore
1334
1360
  */
1335
- u(this, j);
1336
- u(this, Tt);
1337
- this.query = async (t, e, r = {}) => (await a(this, j)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, j)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r, n = {}) => {
1361
+ u(this, q);
1362
+ u(this, Ht);
1363
+ this.query = async (t, e, r = {}) => (await a(this, q)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.detail = async (t, e, r = {}) => (await a(this, q)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => i(c)), this.download = async (t, e, r, n = {}) => {
1338
1364
  const c = this.parseDeprecatedMediaDownloadType(
1339
1365
  r
1340
1366
  );
1341
- return (await a(this, Tt)).mediaConnectorDownload(
1367
+ return (await a(this, Ht)).mediaConnectorDownload(
1342
1368
  t,
1343
1369
  e,
1344
1370
  c,
1345
- fs.web,
1371
+ bs.web,
1346
1372
  JSON.stringify(n)
1347
1373
  ).then((h) => {
1348
1374
  if (h instanceof Uint8Array)
1349
1375
  return h;
1350
- throw typeof h == "object" && h !== null && "success" in h && !h.success && Cs(h), new Error(`Unexpected response type: ${typeof h}.`);
1376
+ throw typeof h == "object" && h !== null && "success" in h && !h.success && ws(h), new Error(`Unexpected response type: ${typeof h}.`);
1351
1377
  });
1352
- }, this.getConfigurationOptions = async (t) => (await a(this, j)).mediaConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, j)).mediaConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedMediaType = (t) => {
1353
- if (t === Rt.file) return Vt.file;
1354
- if (t === Rt.collection) return Vt.collection;
1355
- }, this.upload = async (t, e, r = {}) => (await a(this, j)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), g(this, j, i), g(this, Tt, i);
1378
+ }, this.getConfigurationOptions = async (t) => (await a(this, q)).mediaConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, q)).mediaConnectorGetCapabilities(t).then((r) => i(r)), this.parseDeprecatedMediaType = (t) => {
1379
+ if (t === Vt.file) return Gt.file;
1380
+ if (t === Vt.collection) return Gt.collection;
1381
+ }, this.upload = async (t, e, r = {}) => (await a(this, q)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), g(this, q, o), g(this, Ht, o);
1356
1382
  }
1357
1383
  /**
1358
1384
  * This method will parse the deprecatedMediaDownloadType to the new media download type.
@@ -1360,66 +1386,66 @@ class Ye {
1360
1386
  * @param deprecatedMediaDownloadType legacy download type
1361
1387
  * @returns MediaDownloadType
1362
1388
  */
1363
- parseDeprecatedMediaDownloadType(i) {
1364
- switch (i) {
1365
- case se.HighResolutionWeb:
1366
- return ae.highres;
1367
- case se.LowResolutionWeb:
1368
- return ae.thumbnail;
1389
+ parseDeprecatedMediaDownloadType(o) {
1390
+ switch (o) {
1391
+ case re.HighResolutionWeb:
1392
+ return ie.highres;
1393
+ case re.LowResolutionWeb:
1394
+ return ie.thumbnail;
1369
1395
  default:
1370
- return i;
1396
+ return o;
1371
1397
  }
1372
1398
  }
1373
1399
  }
1374
- j = new WeakMap(), Tt = new WeakMap();
1375
- var E, Ht, cs;
1376
- let Ze = (cs = class {
1400
+ q = new WeakMap(), Ht = new WeakMap();
1401
+ var L, Tt, ls;
1402
+ let Qe = (ls = class {
1377
1403
  /**
1378
1404
  * @ignore
1379
1405
  */
1380
- constructor(i) {
1406
+ constructor(o) {
1381
1407
  /**
1382
1408
  * @ignore
1383
1409
  */
1384
- u(this, E);
1410
+ u(this, L);
1385
1411
  /**
1386
1412
  * @ignore
1387
1413
  */
1388
- u(this, Ht);
1389
- 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);
1414
+ u(this, Tt);
1415
+ this.add = async () => (await a(this, L)).addPage().then((e) => i(e)), this.remove = async (t) => (await a(this, L)).removePage(t).then((r) => i(r)), this.select = async (t) => (await a(this, L)).selectPage(t).then((r) => i(r)), this.setVisibility = async (t, e) => (await a(this, L)).setPageIsVisible(t, e).then((n) => i(n)), this.duplicate = async (t) => (await a(this, L)).duplicatePage(t).then((r) => i(r)), this.getAll = async () => (await a(this, L)).getPages().then((e) => i(e)), this.getById = async (t) => (await a(this, L)).getPageById(t).then((r) => i(r)), this.getSnapshot = async (t, e) => (await a(this, Tt)).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, L)).setPageWidth(e).then((n) => i(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, L)).setPageHeight(e).then((n) => i(n))), this.setSize = async (t, e) => (await a(this, L)).setPageSize(t, e).then((n) => i(n)), this.move = async (t, e) => (await a(this, L)).reorderPages(t, e).then((n) => i(n)), g(this, L, o), g(this, Tt, o);
1390
1416
  }
1391
- }, E = new WeakMap(), Ht = new WeakMap(), cs);
1392
- var k;
1393
- class Qe {
1417
+ }, L = new WeakMap(), Tt = new WeakMap(), ls);
1418
+ var J;
1419
+ class Xe {
1394
1420
  /**
1395
1421
  * @ignore
1396
1422
  */
1397
- constructor(i) {
1423
+ constructor(o) {
1398
1424
  /**
1399
1425
  * @ignore
1400
1426
  */
1401
- u(this, k);
1402
- this.getAll = async () => (await a(this, k)).getParagraphStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, k)).getParagraphStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, k)).createParagraphStyle().then((e) => o(e)), this.duplicate = async (t) => (await a(this, k)).duplicateParagraphStyle(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, k)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => (await a(this, k)).renameParagraphStyle(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, k)).removeParagraphStyle(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, k)).moveParagraphStyles(t, e).then((n) => o(n)), g(this, k, i);
1427
+ u(this, J);
1428
+ this.getAll = async () => (await a(this, J)).getParagraphStyles().then((e) => i(e)), this.getById = async (t) => (await a(this, J)).getParagraphStyleById(t).then((r) => i(r)), this.create = async () => (await a(this, J)).createParagraphStyle().then((e) => i(e)), this.duplicate = async (t) => (await a(this, J)).duplicateParagraphStyle(t).then((r) => i(r)), this.update = async (t, e) => (await a(this, J)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => i(n)), this.rename = async (t, e) => (await a(this, J)).renameParagraphStyle(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, J)).removeParagraphStyle(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, J)).moveParagraphStyles(t, e).then((n) => i(n)), g(this, J, o);
1403
1429
  }
1404
1430
  }
1405
- k = new WeakMap();
1406
- 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 || {});
1407
- class Vr {
1408
- constructor(i, t, e, r) {
1409
- this.type = "action", this.message = i, this.id = t, this.event = e, this.eventChain = r;
1431
+ J = new WeakMap();
1432
+ var x = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(x || {}), Is = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(Is || {}), Bt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Bt || {});
1433
+ class Br {
1434
+ constructor(o, t, e, r) {
1435
+ this.type = "action", this.message = o, this.id = t, this.event = e, this.eventChain = r;
1410
1436
  }
1411
1437
  }
1412
- class Br {
1413
- constructor(i, t, e) {
1414
- this.type = "dataRow", this.count = i, this.message = t, this.exceptions = e;
1438
+ class Jr {
1439
+ constructor(o, t, e) {
1440
+ this.type = "dataRow", this.count = o, this.message = t, this.exceptions = e;
1415
1441
  }
1416
1442
  }
1417
- 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 || {}), Jr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Jr || {}), kr = /* @__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))(kr || {}), 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 || {});
1443
+ var he = /* @__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))(he || {}), 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 || {}), Ur = /* @__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))(Ur || {}), xt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(xt || {}), _r = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(_r || {}), Hr = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Hr || {});
1418
1444
  let Tr = class {
1419
1445
  /**
1420
1446
  * @ignore
1421
1447
  */
1422
- constructor(i, t) {
1448
+ constructor(o, t) {
1423
1449
  this.onActionsChanged = (e) => {
1424
1450
  this.config.events.onActionsChanged.trigger(JSON.parse(e));
1425
1451
  }, this.onAnimationChanged = (e) => {
@@ -1458,13 +1484,13 @@ let Tr = class {
1458
1484
  }, this.onVariableListChanged = (e) => {
1459
1485
  const n = JSON.parse(e).map(
1460
1486
  (c) => {
1461
- var l;
1462
- return c.type === ce.list ? {
1487
+ var d;
1488
+ return c.type === he.list ? {
1463
1489
  ...c,
1464
1490
  items: c.items.map(
1465
1491
  (h) => h.value
1466
1492
  ),
1467
- selected: (l = c.selected) == null ? void 0 : l.value
1493
+ selected: (d = c.selected) == null ? void 0 : d.value
1468
1494
  } : c;
1469
1495
  }
1470
1496
  );
@@ -1496,9 +1522,9 @@ let Tr = class {
1496
1522
  }, this.onConnectorEvent = (e) => {
1497
1523
  this.config.events.onConnectorEvent.trigger(JSON.parse(e));
1498
1524
  }, this.onConnectorsChanged = (e) => {
1499
- const n = new oe().makeMultipleConnectorsBackwardsCompatible(
1525
+ const n = new ce().makeMultipleConnectorsBackwardsCompatible(
1500
1526
  JSON.parse(e),
1501
- this.localConfig.get(Q.GraFxStudioEnvironmentApiUrl)
1527
+ this.localConfig.get(X.GraFxStudioEnvironmentApiUrl)
1502
1528
  );
1503
1529
  this.config.events.onConnectorsChanged.trigger(n);
1504
1530
  }, this.onSelectedPageIdChanged = (e) => {
@@ -1516,14 +1542,14 @@ let Tr = class {
1516
1542
  }, this.onAsyncError = (e) => {
1517
1543
  const r = JSON.parse(e);
1518
1544
  if ((r == null ? void 0 : r.type) === "dataRow") {
1519
- const n = new Br(
1545
+ const n = new Jr(
1520
1546
  r.count,
1521
1547
  r.message,
1522
1548
  r.exceptions
1523
1549
  );
1524
1550
  this.config.events.onAsyncError.trigger(n);
1525
1551
  } else if ((r == null ? void 0 : r.type) === "action") {
1526
- const n = new Vr(
1552
+ const n = new Br(
1527
1553
  r.message,
1528
1554
  r.id,
1529
1555
  r.event,
@@ -1544,137 +1570,137 @@ let Tr = class {
1544
1570
  this.config.events.onEngineEditModeChanged.trigger(JSON.parse(e));
1545
1571
  }, this.onBrandKitMediaChanged = (e) => {
1546
1572
  this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(e));
1547
- }, this.config = i, this.localConfig = t;
1573
+ }, this.config = o, this.localConfig = t;
1548
1574
  }
1549
1575
  };
1550
- var pt;
1551
- class Xe {
1576
+ var Ct;
1577
+ class ts {
1552
1578
  /**
1553
1579
  * @ignore
1554
1580
  */
1555
- constructor(i) {
1581
+ constructor(o) {
1556
1582
  /**
1557
1583
  * @ignore
1558
1584
  */
1559
- u(this, pt);
1560
- this.set = async (t) => (await a(this, pt)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => o(r)), this.removeSelected = async () => (await a(this, pt)).selectedTextStyleClean().then((e) => o(e)), this.getSelected = async () => (await a(this, pt)).getSelectedTextStyle().then((e) => o(e)), g(this, pt, i);
1585
+ u(this, Ct);
1586
+ this.set = async (t) => (await a(this, Ct)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => i(r)), this.removeSelected = async () => (await a(this, Ct)).selectedTextStyleClean().then((e) => i(e)), this.getSelected = async () => (await a(this, Ct)).getSelectedTextStyle().then((e) => i(e)), g(this, Ct, o);
1561
1587
  }
1562
1588
  }
1563
- pt = new WeakMap();
1564
- 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 || {}), _ = /* @__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))(_ || {}), $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;
1565
- class ts {
1589
+ Ct = new WeakMap();
1590
+ var Kr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(Kr || {}), $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 || {}), K = /* @__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))(K || {}), zr = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s.HTML = "html", s))(zr || {}), oe = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(oe || {}), At;
1591
+ class es {
1566
1592
  /**
1567
1593
  * @ignore
1568
1594
  */
1569
- constructor(i) {
1595
+ constructor(o) {
1570
1596
  /**
1571
1597
  * @ignore
1572
1598
  */
1573
- u(this, vt);
1574
- this.setTool = async (t) => (await a(this, vt)).setTool(t).then((r) => o(r)), this.getSelected = async () => (await a(this, vt)).getSelectedTool().then((e) => o(e)), this.setPointer = async () => this.setTool(_.SELECT), this.setSelect = async () => this.setTool(_.SELECT), this.setHand = async () => this.setTool(_.HAND), this.setZoom = async () => this.setTool(_.ZOOM), this.setTextFrame = async () => this.setTool(_.TEXT_FRAME), this.setImageFrame = async () => this.setTool(_.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(_.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(_.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(_.SHAPE_POLYGON), g(this, vt, i);
1599
+ u(this, At);
1600
+ this.setTool = async (t) => (await a(this, At)).setTool(t).then((r) => i(r)), this.getSelected = async () => (await a(this, At)).getSelectedTool().then((e) => i(e)), this.setPointer = async () => this.setTool(K.SELECT), this.setSelect = async () => this.setTool(K.SELECT), this.setHand = async () => this.setTool(K.HAND), this.setZoom = async () => this.setTool(K.ZOOM), this.setTextFrame = async () => this.setTool(K.TEXT_FRAME), this.setImageFrame = async () => this.setTool(K.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(K.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(K.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(K.SHAPE_POLYGON), g(this, At, o);
1575
1601
  }
1576
1602
  }
1577
- vt = new WeakMap();
1578
- var q, G, _t;
1579
- class es {
1603
+ At = new WeakMap();
1604
+ var Y, _, Kt;
1605
+ class ss {
1580
1606
  /**
1581
1607
  * @ignore
1582
1608
  */
1583
- constructor(i, t) {
1609
+ constructor(o, t) {
1584
1610
  /**
1585
1611
  * @ignore
1586
1612
  */
1587
- u(this, q);
1588
- u(this, G);
1589
- u(this, _t);
1590
- 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) => {
1613
+ u(this, Y);
1614
+ u(this, _);
1615
+ u(this, Kt);
1616
+ this.undo = async () => (await a(this, Y)).undo().then((r) => i(r)), this.redo = async () => (await a(this, Y)).redo().then((r) => i(r)), this.addCustomData = async (e, r) => (await a(this, Y)).setCustomUndoData(e, r, !1).then((c) => i(c)), this.record = async (e, r) => {
1591
1617
  try {
1592
- await a(this, G).beginIfNoneActive(e), await r(a(this, _t)), await a(this, G).end();
1618
+ await a(this, _).beginIfNoneActive(e), await r(a(this, Kt)), await a(this, _).end();
1593
1619
  } catch (n) {
1594
- throw await a(this, G).abort(), n;
1620
+ throw await a(this, _).abort(), n;
1595
1621
  }
1596
- }, this.pause = async () => (await a(this, q)).pause().then((r) => o(r)), this.resume = async () => (await a(this, q)).resume().then((r) => o(r)), this.advanced = {
1622
+ }, this.pause = async () => (await a(this, Y)).pause().then((r) => i(r)), this.resume = async () => (await a(this, Y)).resume().then((r) => i(r)), this.advanced = {
1597
1623
  /**
1598
1624
  * This will start a new undo operation.
1599
1625
  * This will throw an exception when there is already an undo operation recording.
1600
1626
  * @experimental This method is experimental and may change in future versions.
1601
1627
  * @returns
1602
1628
  */
1603
- begin: async (e) => a(this, G).begin(e),
1629
+ begin: async (e) => a(this, _).begin(e),
1604
1630
  /**
1605
1631
  * This will start a new undo operation if there is no other undo operation recording.
1606
1632
  * This does not throw.
1607
1633
  * @experimental This method is experimental and may change in future versions.
1608
1634
  * @returns
1609
1635
  */
1610
- beginIfNoneActive: async (e) => a(this, G).beginIfNoneActive(e),
1636
+ beginIfNoneActive: async (e) => a(this, _).beginIfNoneActive(e),
1611
1637
  /**
1612
1638
  * Ends the currently active recording operation.
1613
1639
  * If there is no recording operation currently running this will throw an exception.
1614
1640
  * @experimental This method is experimental and may change in future versions.
1615
1641
  * @returns
1616
1642
  */
1617
- end: async () => a(this, G).end(),
1643
+ end: async () => a(this, _).end(),
1618
1644
  /**
1619
1645
  * Aborts the currently active recording operation.
1620
1646
  * If there is no recording operation currently running this will throw an exception.
1621
1647
  * @experimental This method is experimental and may change in future versions.
1622
1648
  * @returns
1623
1649
  */
1624
- abort: async () => a(this, G).abort()
1625
- }, g(this, q, i), g(this, _t, t), g(this, G, new Kr(i));
1650
+ abort: async () => a(this, _).abort()
1651
+ }, g(this, Y, o), g(this, Kt, t), g(this, _, new Wr(o));
1626
1652
  }
1627
1653
  }
1628
- q = new WeakMap(), G = new WeakMap(), _t = new WeakMap();
1629
- var it;
1630
- class Kr {
1654
+ Y = new WeakMap(), _ = new WeakMap(), Kt = new WeakMap();
1655
+ var ot;
1656
+ class Wr {
1631
1657
  /**
1632
1658
  * @ignore
1633
1659
  */
1634
- constructor(i) {
1660
+ constructor(o) {
1635
1661
  /**
1636
1662
  * @ignore
1637
1663
  */
1638
- u(this, it);
1639
- this.begin = async (t) => (await a(this, it)).begin(t).then((r) => o(r)), this.beginIfNoneActive = async (t) => (await a(this, it)).beginIfNoneActive(t).then((r) => o(r)), this.end = async () => (await a(this, it)).end().then((e) => o(e)), this.abort = async () => (await a(this, it)).abort().then((e) => o(e)), g(this, it, i);
1664
+ u(this, ot);
1665
+ this.begin = async (t) => (await a(this, ot)).begin(t).then((r) => i(r)), this.beginIfNoneActive = async (t) => (await a(this, ot)).beginIfNoneActive(t).then((r) => i(r)), this.end = async () => (await a(this, ot)).end().then((e) => i(e)), this.abort = async () => (await a(this, ot)).abort().then((e) => i(e)), g(this, ot, o);
1640
1666
  }
1641
1667
  }
1642
- it = new WeakMap();
1643
- const zr = (s, i = 2) => {
1644
- const t = Math.pow(10, i);
1668
+ ot = new WeakMap();
1669
+ const jr = (s, o = 2) => {
1670
+ const t = Math.pow(10, o);
1645
1671
  return Math.round(s * t) / t;
1646
1672
  };
1647
- var $t, At;
1648
- class ss {
1673
+ var $t, Pt;
1674
+ class rs {
1649
1675
  /**
1650
1676
  * @ignore
1651
1677
  */
1652
- constructor(i, t) {
1678
+ constructor(o, t) {
1653
1679
  /**
1654
1680
  * @ignore
1655
1681
  */
1656
1682
  u(this, $t);
1657
- u(this, At);
1658
- this.round = (e, r) => o({
1659
- data: String(zr(e, r)),
1683
+ u(this, Pt);
1684
+ this.round = (e, r) => i({
1685
+ data: String(jr(e, r)),
1660
1686
  success: !0,
1661
1687
  status: 200,
1662
1688
  parsedData: null
1663
1689
  }), this.createEnvironmentBaseURL = (e) => {
1664
- const { type: r = ie.SANDBOX, environment: n = "ft-nostress", version: c = "1" } = e, l = r == ie.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
1665
- return `https://${n}.${l}.online/grafx/api/v${c}/environment/${n}`;
1690
+ const { type: r = oe.SANDBOX, environment: n = "ft-nostress", version: c = "1" } = e, d = r == oe.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
1691
+ return `https://${n}.${d}.online/grafx/api/v${c}/environment/${n}`;
1666
1692
  }, this.stageFiles = async (e, r, n) => {
1667
- const c = a(this, At).get(Q.GraFxStudioEnvironmentApiUrl);
1693
+ const c = a(this, Pt).get(X.GraFxStudioEnvironmentApiUrl);
1668
1694
  if (!c)
1669
1695
  throw new Error("GraFx Studio Environment API URL is not set");
1670
- const l = `${c}connectors/${r}/stage`, h = a(this, At).get(Q.GraFxStudioAuthToken);
1696
+ const d = `${c}connectors/${r}/stage`, h = a(this, Pt).get(X.GraFxStudioAuthToken);
1671
1697
  if (!h)
1672
1698
  throw new Error("GraFx Studio Auth Token is not set");
1673
- const y = new FormData();
1674
- e.forEach((S, f) => {
1675
- const b = S instanceof File ? S.name : `blob-${f}`;
1676
- y.append("files", S, b);
1677
- }), n && y.append(
1699
+ const p = new FormData();
1700
+ e.forEach((S, b) => {
1701
+ const A = S instanceof File ? S.name : `blob-${b}`;
1702
+ p.append("files", S, A);
1703
+ }), n && p.append(
1678
1704
  "validationJson",
1679
1705
  JSON.stringify({
1680
1706
  allowedMimeTypes: n.mimeTypes,
@@ -1684,28 +1710,28 @@ class ss {
1684
1710
  }
1685
1711
  })
1686
1712
  );
1687
- const p = await fetch(l, {
1713
+ const y = await fetch(d, {
1688
1714
  method: "POST",
1689
- body: y,
1715
+ body: p,
1690
1716
  headers: {
1691
1717
  Authorization: `Bearer ${h}`
1692
1718
  }
1693
1719
  });
1694
- if (p.status === 422) {
1695
- const S = await p.json();
1696
- throw new Sr(S.message, ms.minDimension);
1720
+ if (y.status === 422) {
1721
+ const S = await y.json();
1722
+ throw new Ir(S.message, fs.minDimension);
1697
1723
  }
1698
- if (!p.ok)
1724
+ if (!y.ok)
1699
1725
  throw new Error("Failed to stage files");
1700
- return await p.json();
1701
- }, this.unitEvaluate = async (e, r) => (await a(this, $t)).unitEvaluate(e, r).then((c) => o(c)), g(this, $t, i), g(this, At, t);
1726
+ return await y.json();
1727
+ }, this.unitEvaluate = async (e, r) => (await a(this, $t)).unitEvaluate(e, r).then((c) => i(c)), g(this, $t, o), g(this, Pt, t);
1702
1728
  }
1703
1729
  }
1704
- $t = new WeakMap(), At = new WeakMap();
1705
- var Kt;
1706
- class Wr {
1707
- constructor(i) {
1708
- u(this, Kt);
1730
+ $t = new WeakMap(), Pt = new WeakMap();
1731
+ var zt;
1732
+ class qr {
1733
+ constructor(o) {
1734
+ u(this, zt);
1709
1735
  this.setMinimum = async (t, e) => {
1710
1736
  const r = { minValue: { value: e } };
1711
1737
  return this.applyPropertiesUpdate(t, r);
@@ -1730,18 +1756,18 @@ class Wr {
1730
1756
  }, this.setNumberOfDecimals = async (t, e) => {
1731
1757
  const r = { numberOfDecimals: { value: e } };
1732
1758
  return this.applyPropertiesUpdate(t, r);
1733
- }, g(this, Kt, i);
1759
+ }, g(this, zt, o);
1734
1760
  }
1735
- async applyPropertiesUpdate(i, t) {
1736
- const r = await (await a(this, Kt)).updateNumberVariableProperties(i, JSON.stringify(t));
1737
- return o(r);
1761
+ async applyPropertiesUpdate(o, t) {
1762
+ const r = await (await a(this, zt)).updateNumberVariableProperties(o, JSON.stringify(t));
1763
+ return i(r);
1738
1764
  }
1739
1765
  }
1740
- Kt = new WeakMap();
1741
- var zt;
1742
- class jr {
1743
- constructor(i) {
1744
- u(this, zt);
1766
+ zt = new WeakMap();
1767
+ var Wt;
1768
+ class Yr {
1769
+ constructor(o) {
1770
+ u(this, Wt);
1745
1771
  this.setDisplayFormat = async (t, e) => {
1746
1772
  const r = { displayFormat: { value: e } };
1747
1773
  return this.applyPropertiesUpdate(t, r);
@@ -1757,48 +1783,48 @@ class jr {
1757
1783
  }, this.setExcludedDays = async (t, e) => {
1758
1784
  const r = { excludedDays: { value: e } };
1759
1785
  return this.applyPropertiesUpdate(t, r);
1760
- }, g(this, zt, i);
1786
+ }, g(this, Wt, o);
1761
1787
  }
1762
- async applyPropertiesUpdate(i, t) {
1763
- const r = await (await a(this, zt)).updateDateVariableProperties(i, JSON.stringify(t));
1764
- return o(r);
1788
+ async applyPropertiesUpdate(o, t) {
1789
+ const r = await (await a(this, Wt)).updateDateVariableProperties(o, JSON.stringify(t));
1790
+ return i(r);
1765
1791
  }
1766
1792
  }
1767
- zt = new WeakMap();
1768
- var m, Pt, Ft, hs;
1769
- let rs = (hs = class {
1793
+ Wt = new WeakMap();
1794
+ var m, Ft, Et, ds;
1795
+ let ns = (ds = class {
1770
1796
  /**
1771
1797
  * @ignore
1772
1798
  */
1773
- constructor(i) {
1799
+ constructor(o) {
1774
1800
  /**
1775
1801
  * @ignore
1776
1802
  */
1777
1803
  u(this, m);
1778
- u(this, Pt);
1779
1804
  u(this, Ft);
1780
- this.getAll = async () => (await a(this, m)).getVariables().then((e) => o(e)).then((e) => {
1805
+ u(this, Et);
1806
+ this.getAll = async () => (await a(this, m)).getVariables().then((e) => i(e)).then((e) => {
1781
1807
  const r = e;
1782
1808
  return r.parsedData && (r.parsedData = this.makeVariablesBackwardsCompatible(r.parsedData)), r;
1783
- }), this.getById = async (t) => (await a(this, m)).getVariableById(t).then((r) => o(r)).then((r) => {
1809
+ }), this.getById = async (t) => (await a(this, m)).getVariableById(t).then((r) => i(r)).then((r) => {
1784
1810
  const n = r;
1785
1811
  return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
1786
- }), this.getByName = async (t) => (await a(this, m)).getVariableByName(t).then((r) => o(r)).then((r) => {
1812
+ }), this.getByName = async (t) => (await a(this, m)).getVariableByName(t).then((r) => i(r)).then((r) => {
1787
1813
  const n = r;
1788
1814
  return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
1789
- }), 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(
1815
+ }), this.create = async (t, e) => (await a(this, m)).addVariable(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, m)).removeVariables(t).then((r) => i(r)), this.rename = async (t, e) => (await a(this, m)).setVariableName(t, e).then((n) => i(n)), this.setLabel = async (t, e) => (await a(this, m)).setVariableLabel(t, e).then((n) => i(n)), g(this, Ft, async (t, e) => (await a(this, m)).setVariablePlaceholder(t, e).then((n) => i(n))), this.setPlaceholder = async (t, e) => a(this, Ft).call(this, t, e), this.resetPlaceholder = async (t) => a(this, Ft).call(this, t, null), g(this, Et, async (t, e) => (await a(this, m)).setVariableHelpText(t, e).then((n) => i(n))), this.setHelpText = async (t, e) => a(this, Et).call(this, t, e), this.resetHelpText = async (t) => a(this, Et).call(this, t, null), this.setType = async (t, e) => (await a(this, m)).setVariableType(t, e).then((n) => i(n)), this.setListVariable = async (t, e) => (await a(this, m)).setListVariableItems(
1790
1816
  t,
1791
1817
  e.map((n) => JSON.stringify({ value: n }))
1792
- ).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) => {
1818
+ ).then((n) => i(n)), this.setValue = async (t, e) => (await a(this, m)).setVariableValue(t, e).then((n) => i(n)), this.duplicate = async (t) => (await a(this, m)).duplicateVariable(t).then((r) => i(r)), this.groupVariables = async (t, e) => (await a(this, m)).groupVariables(t, e).then((n) => i(n)), this.ungroupVariables = async (t) => (await a(this, m)).ungroupVariable(t).then((r) => i(r)), this.move = async (t, e, r) => (await a(this, m)).moveVariable(e, r, t).then((c) => i(c)), this.moveVariables = async (t, e, r) => (await a(this, m)).moveVariables(e, r, t).then((c) => i(c)), this.setIsVisible = async (t, e) => {
1793
1819
  const r = e ? { type: xt.visible } : { type: xt.invisible };
1794
1820
  return this.setVariableVisibility(t, r);
1795
1821
  }, this.setIsHidden = async (t, e) => {
1796
1822
  const r = e ? { type: xt.invisible } : { type: xt.visible };
1797
1823
  return this.setVariableVisibility(t, r);
1798
- }, 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) => {
1799
- const r = await a(this, m), c = new oe().makeConnectorSourceForwardsCompatible(e);
1800
- return r.setImageVariableConnector(t, JSON.stringify(c)).then((l) => o(l));
1801
- }, 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) => {
1824
+ }, this.setVariableVisibility = async (t, e) => (await a(this, m)).setVariableVisibility(t, JSON.stringify(e)).then((n) => i(n)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, m)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => i(r)), this.setIsRequired = async (t, e) => (await a(this, m)).setVariableIsRequired(t, e).then((n) => i(n)), this.setRemoveParagraphIfEmpty = async (t, e) => (await a(this, m)).setVariableRemoveParagraphIfEmpty(t, e).then((n) => i(n)), this.setIsReadonly = async (t, e) => (await a(this, m)).setVariableIsReadonly(t, e).then((n) => i(n)), this.getImageVariableConnectorId = async (t) => (await a(this, m)).getImageVariableConnectorId(t).then((r) => i(r)), this.setImageVariableConnector = async (t, e) => {
1825
+ const r = await a(this, m), c = new ce().makeConnectorSourceForwardsCompatible(e);
1826
+ return r.setImageVariableConnector(t, JSON.stringify(c)).then((d) => i(d));
1827
+ }, this.setImageVariableValueWithContext = async (t, e, r) => (await a(this, m)).setImageVariableValueWithContext(t, e, JSON.stringify(r)).then((c) => i(c)), this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, e) => {
1802
1828
  const r = { prefix: { value: e } };
1803
1829
  return this.applyPrefixSuffixDeltaUpdate(t, r);
1804
1830
  }, this.setSuffix = async (t, e) => {
@@ -1810,28 +1836,28 @@ let rs = (hs = class {
1810
1836
  }, this.setSuffixCharacterStyle = async (t, e) => {
1811
1837
  const r = { suffixCharacterStyleId: { value: e } };
1812
1838
  return this.applyPrefixSuffixDeltaUpdate(t, r);
1813
- }, 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));
1839
+ }, this.setPrivateData = async (t, e) => (await a(this, m)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => i(n)), this.getPrivateData = async (t) => (await a(this, m)).getVariablePrivateData(t).then((r) => i(r)), this.setAllowImageQuery = async (t, e) => (await a(this, m)).setImageVariableAllowQuery(t, e).then((n) => i(n)), this.setAllowImageUpload = async (t, e) => (await a(this, m)).setImageVariableAllowUpload(t, e).then((n) => i(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, m)).setImageVariableUploadMinSize(t, e, r).then((c) => i(c)), this.setIsDontBreak = async (t, e) => (await a(this, m)).setVariableIsDontBreak(t, e).then((n) => i(n)), g(this, m, o), this.number = new qr(a(this, m)), this.date = new Yr(a(this, m));
1814
1840
  }
1815
- makeVariablesBackwardsCompatible(i) {
1816
- return i.map((t) => this.makeVariableBackwardsCompatible(t));
1841
+ makeVariablesBackwardsCompatible(o) {
1842
+ return o.map((t) => this.makeVariableBackwardsCompatible(t));
1817
1843
  }
1818
- makeVariableBackwardsCompatible(i) {
1819
- return i.type !== ce.list ? i : this.makeListVariableBackwardsCompatible(i);
1844
+ makeVariableBackwardsCompatible(o) {
1845
+ return o.type !== he.list ? o : this.makeListVariableBackwardsCompatible(o);
1820
1846
  }
1821
- makeListVariableBackwardsCompatible(i) {
1822
- const t = i, e = i.items, r = i.selected, n = e.map((c) => c.value);
1847
+ makeListVariableBackwardsCompatible(o) {
1848
+ const t = o, e = o.items, r = o.selected, n = e.map((c) => c.value);
1823
1849
  return t.items = n, t.selected = r == null ? void 0 : r.value, t;
1824
1850
  }
1825
- async applyPrefixSuffixDeltaUpdate(i, t) {
1826
- const r = await (await a(this, m)).updateVariablePrefixSuffixProperties(i, JSON.stringify(t));
1827
- return o(r);
1851
+ async applyPrefixSuffixDeltaUpdate(o, t) {
1852
+ const r = await (await a(this, m)).updateVariablePrefixSuffixProperties(o, JSON.stringify(t));
1853
+ return i(r);
1828
1854
  }
1829
- }, m = new WeakMap(), Pt = new WeakMap(), Ft = new WeakMap(), hs);
1830
- class qr {
1855
+ }, m = new WeakMap(), Ft = new WeakMap(), Et = new WeakMap(), ds);
1856
+ class Zr {
1831
1857
  /**
1832
1858
  * @ignore
1833
1859
  */
1834
- constructor(i) {
1860
+ constructor(o) {
1835
1861
  this.onVariableListChanged = (t) => {
1836
1862
  this.config.events.onVariableListChanged.trigger(JSON.parse(t));
1837
1863
  }, this.onConnectorsChanged = (t) => {
@@ -1840,101 +1866,101 @@ class qr {
1840
1866
  this.config.events.onPageSizeChanged.trigger(JSON.parse(t));
1841
1867
  }, this.onEngineEditModeChanged = (t) => {
1842
1868
  this.config.events.onEngineEditModeChanged.trigger(JSON.parse(t));
1843
- }, this.config = i;
1869
+ }, this.config = o;
1844
1870
  }
1845
1871
  }
1846
- var ot;
1847
- class Yr {
1872
+ var ct;
1873
+ class Qr {
1848
1874
  /**
1849
1875
  * @ignore
1850
1876
  */
1851
- constructor(i) {
1877
+ constructor(o) {
1852
1878
  /**
1853
1879
  * @ignore
1854
1880
  */
1855
- u(this, ot);
1856
- this.getAll = async () => (await a(this, ot)).getVariables().then((e) => o(e)), this.getById = async (t) => (await a(this, ot)).getVariableById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, ot)).getVariableByName(t).then((r) => o(r)), this.setListVariable = async (t, e) => (await a(this, ot)).setListVariableItems(
1881
+ u(this, ct);
1882
+ this.getAll = async () => (await a(this, ct)).getVariables().then((e) => i(e)), this.getById = async (t) => (await a(this, ct)).getVariableById(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, ct)).getVariableByName(t).then((r) => i(r)), this.setListVariable = async (t, e) => (await a(this, ct)).setListVariableItems(
1857
1883
  t,
1858
1884
  e.map((n) => JSON.stringify(n))
1859
- ).then((n) => o(n)), g(this, ot, i), this.image = new Zr(i);
1885
+ ).then((n) => i(n)), g(this, ct, o), this.image = new Xr(o);
1860
1886
  }
1861
1887
  }
1862
- ot = new WeakMap();
1863
- var Y;
1864
- class Zr {
1865
- constructor(i) {
1866
- u(this, Y);
1867
- this.setAllowQuery = async (t, e) => (await a(this, Y)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await a(this, Y)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, Y)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), this.setConnector = async (t, e) => (await a(this, Y)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), this.setConnectorContext = async (t, e) => (await a(this, Y)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => o(n)), g(this, Y, i);
1888
+ ct = new WeakMap();
1889
+ var Z;
1890
+ class Xr {
1891
+ constructor(o) {
1892
+ u(this, Z);
1893
+ this.setAllowQuery = async (t, e) => (await a(this, Z)).setImageVariableAllowQuery(t, e).then((n) => i(n)), this.setAllowUpload = async (t, e) => (await a(this, Z)).setImageVariableAllowUpload(t, e).then((n) => i(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, Z)).setImageVariableUploadMinSize(t, e, r).then((c) => i(c)), this.setConnector = async (t, e) => (await a(this, Z)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => i(n)), this.setConnectorContext = async (t, e) => (await a(this, Z)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => i(n)), g(this, Z, o);
1868
1894
  }
1869
1895
  }
1870
- Y = new WeakMap();
1871
- var Ct;
1872
- class Qr {
1896
+ Z = new WeakMap();
1897
+ var mt;
1898
+ class tn {
1873
1899
  /**
1874
1900
  * @ignore
1875
1901
  */
1876
- constructor(i) {
1902
+ constructor(o) {
1877
1903
  /**
1878
1904
  * @ignore
1879
1905
  */
1880
- u(this, Ct);
1881
- this.register = async (t) => (await a(this, Ct)).registerConnector(JSON.stringify(t)).then((r) => o(r)), this.getById = async (t) => (await a(this, Ct)).getConnectorById(t).then((r) => o(r)), this.getAllByType = async (t) => (await a(this, Ct)).getConnectors(t).then((r) => o(r)), g(this, Ct, i);
1906
+ u(this, mt);
1907
+ this.register = async (t) => (await a(this, mt)).registerConnector(JSON.stringify(t)).then((r) => i(r)), this.getById = async (t) => (await a(this, mt)).getConnectorById(t).then((r) => i(r)), this.getAllByType = async (t) => (await a(this, mt)).getConnectors(t).then((r) => i(r)), g(this, mt, o);
1882
1908
  }
1883
1909
  }
1884
- Ct = new WeakMap();
1885
- var Et, qt;
1886
- class Xr {
1910
+ mt = new WeakMap();
1911
+ var Lt, Yt;
1912
+ class en {
1887
1913
  /**
1888
1914
  * @ignore
1889
1915
  */
1890
- constructor(i) {
1916
+ constructor(o) {
1891
1917
  /**
1892
1918
  * @ignore
1893
1919
  */
1894
- u(this, Et);
1920
+ u(this, Lt);
1895
1921
  /**
1896
1922
  * @ignore
1897
1923
  */
1898
- u(this, qt);
1899
- 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);
1924
+ u(this, Yt);
1925
+ this.setWidth = async (t) => (await a(this, Lt)).setPageWidth(t).then((r) => i(r)), this.setHeight = async (t) => (await a(this, Lt)).setPageHeight(t).then((r) => i(r)), g(this, Lt, o), g(this, Yt, o);
1900
1926
  }
1901
1927
  }
1902
- Et = new WeakMap(), qt = new WeakMap();
1903
- class ns {
1928
+ Lt = new WeakMap(), Yt = new WeakMap();
1929
+ class as {
1904
1930
  /**
1905
1931
  * The next initiator is a split off on SDK level to tag next features
1906
1932
  * The SDK should be configured clientside and it exposes all controllers to work with in other applications
1907
1933
  * @param config The configuration object where the SDK and editor can get configured
1908
1934
  */
1909
- constructor(i, t, e) {
1910
- 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);
1935
+ constructor(o, t, e) {
1936
+ this.config = o, this.connection = t, this.editorAPI = e, this.subscriber = new Zr(o), this.variable = new Qr(this.editorAPI), this.connector = new tn(this.editorAPI), this.page = new en(this.editorAPI), this.canvas = new se(this.editorAPI);
1911
1937
  }
1912
1938
  }
1913
- class bs {
1914
- constructor(i) {
1915
- this.logger = i;
1939
+ class vs {
1940
+ constructor(o) {
1941
+ this.logger = o;
1916
1942
  }
1917
- createEventHandlerFn(i, t) {
1943
+ createEventHandlerFn(o, t) {
1918
1944
  return (...r) => {
1919
1945
  try {
1920
- const n = i(...r);
1921
- return n instanceof Promise ? n.catch((c) => this.handleError(c, t, i.name)) : n;
1946
+ const n = o(...r);
1947
+ return n instanceof Promise ? n.catch((c) => this.handleError(c, t, o.name)) : n;
1922
1948
  } catch (n) {
1923
- this.handleError(n, t, i.name);
1949
+ this.handleError(n, t, o.name);
1924
1950
  }
1925
1951
  };
1926
1952
  }
1927
- handleError(i, t, e) {
1953
+ handleError(o, t, e) {
1928
1954
  var r;
1929
1955
  if (t === Bt.log)
1930
- (r = this.logger) == null || r.call(this, M.error, Ss.event, `Error in callback ${e}: ${i}`);
1956
+ (r = this.logger) == null || r.call(this, x.error, Is.event, `Error in callback ${e}: ${o}`);
1931
1957
  else
1932
- throw i;
1958
+ throw o;
1933
1959
  }
1934
1960
  }
1935
- class as extends bs {
1936
- constructor(i, t) {
1937
- super(t), this.handler = i;
1961
+ class is extends vs {
1962
+ constructor(o, t) {
1963
+ super(t), this.handler = o;
1938
1964
  }
1939
1965
  /**
1940
1966
  * Executes the defined handler with the provided arguments.
@@ -1942,15 +1968,15 @@ class as extends bs {
1942
1968
  * @param args The arguments to pass to the callbacks.
1943
1969
  * @returns The result of executing the callbacks.
1944
1970
  */
1945
- trigger(...i) {
1971
+ trigger(...o) {
1946
1972
  const t = this.handler();
1947
1973
  if (t)
1948
- return this.createEventHandlerFn(t, Bt.throw)(...i);
1974
+ return this.createEventHandlerFn(t, Bt.throw)(...o);
1949
1975
  }
1950
1976
  }
1951
- class C extends bs {
1952
- constructor(i, t) {
1953
- super(t), this.legacyHandler = i, this.subscriptions = /* @__PURE__ */ new Set();
1977
+ class C extends vs {
1978
+ constructor(o, t) {
1979
+ super(t), this.legacyHandler = o, this.subscriptions = /* @__PURE__ */ new Set();
1954
1980
  }
1955
1981
  /**
1956
1982
  * Executes the registered callbacks with provided arguments
@@ -1958,11 +1984,11 @@ class C extends bs {
1958
1984
  * @param args The arguments to pass to the callbacks.
1959
1985
  * @returns The result of executing the callbacks.
1960
1986
  */
1961
- trigger(...i) {
1987
+ trigger(...o) {
1962
1988
  const t = this.legacyHandler();
1963
- t && this.createEventHandlerFn(t, Bt.log)(...i);
1989
+ t && this.createEventHandlerFn(t, Bt.log)(...o);
1964
1990
  for (const e of this.subscriptions)
1965
- e(...i);
1991
+ e(...o);
1966
1992
  }
1967
1993
  /**
1968
1994
  * Registers a callback function.
@@ -1974,49 +2000,49 @@ class C extends bs {
1974
2000
  * - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others
1975
2001
  * @returns A function to unsubscribe the callback, preventing it from being invoked in the future.
1976
2002
  */
1977
- registerCallback(i, t = Bt.log) {
1978
- const e = this.createEventHandlerFn(i, t);
2003
+ registerCallback(o, t = Bt.log) {
2004
+ const e = this.createEventHandlerFn(o, t);
1979
2005
  return this.subscriptions.add(e), () => {
1980
2006
  this.subscriptions.delete(e);
1981
2007
  };
1982
2008
  }
1983
2009
  }
1984
- class he {
2010
+ class le {
1985
2011
  /**
1986
2012
  * Creates a runtime configuration object from the provided configuration object.
1987
2013
  *
1988
2014
  * @param config The configuration object to create the runtime configuration object from.
1989
2015
  * @returns The runtime configuration object.
1990
2016
  */
1991
- static createRuntimeConfig(i) {
1992
- var e, r, n, c, l, h, y, p, I, S, f, b, A, v, N, x, P, K, z, mt, wt, le, de, ue, ge, ye, pe, Ce, me, we, fe, Se, be, Ie, ve;
1993
- const t = { ...i };
2017
+ static createRuntimeConfig(o) {
2018
+ var e, r, n, c, d, h, p, y, I, S, b, A, v, f, M, E, P, z, W, wt, ft, de, ue, ge, ye, pe, Ce, me, we, fe, Se, be, Ie, ve, Ae;
2019
+ const t = { ...o };
1994
2020
  return t.logging = {
1995
- logLevel: ((e = i.logging) == null ? void 0 : e.logLevel) || M.error,
1996
- logger: ((r = i.logging) == null ? void 0 : r.logger) || ((Lt, Yt, Zt) => {
1997
- var Ae;
1998
- if (he.isLoggingEnabled(Lt, ((Ae = t.logging) == null ? void 0 : Ae.logLevel) ?? M.error))
1999
- switch (Lt) {
2000
- case M.error:
2001
- console.error(`[${Yt}] [${Lt}] ${Zt}`);
2021
+ logLevel: ((e = o.logging) == null ? void 0 : e.logLevel) || x.error,
2022
+ logger: ((r = o.logging) == null ? void 0 : r.logger) || ((Dt, Zt, Qt) => {
2023
+ var Pe;
2024
+ if (le.isLoggingEnabled(Dt, ((Pe = t.logging) == null ? void 0 : Pe.logLevel) ?? x.error))
2025
+ switch (Dt) {
2026
+ case x.error:
2027
+ console.error(`[${Zt}] [${Dt}] ${Qt}`);
2002
2028
  break;
2003
- case M.warn:
2004
- console.warn(`[${Yt}] [${Lt}] ${Zt}`);
2029
+ case x.warn:
2030
+ console.warn(`[${Zt}] [${Dt}] ${Qt}`);
2005
2031
  break;
2006
2032
  default:
2007
- console.log(`[${Yt}] [${Lt}] ${Zt}`);
2033
+ console.log(`[${Zt}] [${Dt}] ${Qt}`);
2008
2034
  }
2009
2035
  })
2010
2036
  }, t.handlers = {
2011
- onAuthExpired: new as(() => t.onAuthExpired, (n = t.logging) == null ? void 0 : n.logger),
2012
- onViewportRequested: new as(
2037
+ onAuthExpired: new is(() => t.onAuthExpired, (n = t.logging) == null ? void 0 : n.logger),
2038
+ onViewportRequested: new is(
2013
2039
  () => t.onViewportRequested,
2014
2040
  (c = t.logging) == null ? void 0 : c.logger
2015
2041
  )
2016
2042
  }, t.events = {
2017
2043
  onActionsChanged: new C(
2018
2044
  () => t.onActionsChanged,
2019
- (l = t.logging) == null ? void 0 : l.logger
2045
+ (d = t.logging) == null ? void 0 : d.logger
2020
2046
  ),
2021
2047
  onStateChanged: new C(
2022
2048
  () => t.onStateChanged,
@@ -2024,11 +2050,11 @@ class he {
2024
2050
  ),
2025
2051
  onDocumentLoaded: new C(
2026
2052
  () => t.onDocumentLoaded,
2027
- (y = t.logging) == null ? void 0 : y.logger
2053
+ (p = t.logging) == null ? void 0 : p.logger
2028
2054
  ),
2029
2055
  onSelectedFramesLayoutChanged: new C(
2030
2056
  () => t.onSelectedFramesLayoutChanged,
2031
- (p = t.logging) == null ? void 0 : p.logger
2057
+ (y = t.logging) == null ? void 0 : y.logger
2032
2058
  ),
2033
2059
  onFramesLayoutChanged: new C(
2034
2060
  () => t.onFramesLayoutChanged,
@@ -2040,27 +2066,27 @@ class he {
2040
2066
  ),
2041
2067
  onPageSelectionChanged: new C(
2042
2068
  () => t.onPageSelectionChanged,
2043
- (f = t.logging) == null ? void 0 : f.logger
2069
+ (b = t.logging) == null ? void 0 : b.logger
2044
2070
  ),
2045
2071
  onSelectedLayoutPropertiesChanged: new C(
2046
2072
  () => t.onSelectedLayoutPropertiesChanged,
2047
- (b = t.logging) == null ? void 0 : b.logger
2073
+ (A = t.logging) == null ? void 0 : A.logger
2048
2074
  ),
2049
2075
  onSelectedLayoutUnitChanged: new C(
2050
2076
  () => t.onSelectedLayoutUnitChanged,
2051
- (A = t.logging) == null ? void 0 : A.logger
2077
+ (v = t.logging) == null ? void 0 : v.logger
2052
2078
  ),
2053
2079
  onScrubberPositionChanged: new C(
2054
2080
  () => t.onScrubberPositionChanged,
2055
- (v = t.logging) == null ? void 0 : v.logger
2081
+ (f = t.logging) == null ? void 0 : f.logger
2056
2082
  ),
2057
2083
  onFrameAnimationsChanged: new C(
2058
2084
  () => t.onFrameAnimationsChanged,
2059
- (N = t.logging) == null ? void 0 : N.logger
2085
+ (M = t.logging) == null ? void 0 : M.logger
2060
2086
  ),
2061
2087
  onVariableListChanged: new C(
2062
2088
  () => t.onVariableListChanged,
2063
- (x = t.logging) == null ? void 0 : x.logger
2089
+ (E = t.logging) == null ? void 0 : E.logger
2064
2090
  ),
2065
2091
  onSelectedToolChanged: new C(
2066
2092
  () => t.onSelectedToolChanged,
@@ -2068,51 +2094,51 @@ class he {
2068
2094
  ),
2069
2095
  onUndoStackStateChanged: new C(
2070
2096
  () => t.onUndoStackStateChanged,
2071
- (K = t.logging) == null ? void 0 : K.logger
2097
+ (z = t.logging) == null ? void 0 : z.logger
2072
2098
  ),
2073
2099
  onSelectedLayoutFramesChanged: new C(
2074
2100
  () => t.onSelectedLayoutFramesChanged,
2075
- (z = t.logging) == null ? void 0 : z.logger
2101
+ (W = t.logging) == null ? void 0 : W.logger
2076
2102
  ),
2077
2103
  onSelectedTextStyleChanged: new C(
2078
2104
  () => t.onSelectedTextStyleChanged,
2079
- (mt = t.logging) == null ? void 0 : mt.logger
2105
+ (wt = t.logging) == null ? void 0 : wt.logger
2080
2106
  ),
2081
2107
  onColorsChanged: new C(
2082
2108
  () => t.onColorsChanged,
2083
- (wt = t.logging) == null ? void 0 : wt.logger
2109
+ (ft = t.logging) == null ? void 0 : ft.logger
2084
2110
  ),
2085
2111
  onParagraphStylesChanged: new C(
2086
2112
  () => t.onParagraphStylesChanged,
2087
- (le = t.logging) == null ? void 0 : le.logger
2113
+ (de = t.logging) == null ? void 0 : de.logger
2088
2114
  ),
2089
2115
  onCharacterStylesChanged: new C(
2090
2116
  () => t.onCharacterStylesChanged,
2091
- (de = t.logging) == null ? void 0 : de.logger
2117
+ (ue = t.logging) == null ? void 0 : ue.logger
2092
2118
  ),
2093
2119
  onFontFamiliesChanged: new C(
2094
2120
  () => t.onFontFamiliesChanged,
2095
- (ue = t.logging) == null ? void 0 : ue.logger
2121
+ (ge = t.logging) == null ? void 0 : ge.logger
2096
2122
  ),
2097
2123
  onSelectedLayoutIdChanged: new C(
2098
2124
  () => t.onSelectedLayoutIdChanged,
2099
- (ge = t.logging) == null ? void 0 : ge.logger
2125
+ (ye = t.logging) == null ? void 0 : ye.logger
2100
2126
  ),
2101
2127
  onLayoutsChanged: new C(
2102
2128
  () => t.onLayoutsChanged,
2103
- (ye = t.logging) == null ? void 0 : ye.logger
2129
+ (pe = t.logging) == null ? void 0 : pe.logger
2104
2130
  ),
2105
2131
  onConnectorEvent: new C(
2106
2132
  () => t.onConnectorEvent,
2107
- (pe = t.logging) == null ? void 0 : pe.logger
2133
+ (Ce = t.logging) == null ? void 0 : Ce.logger
2108
2134
  ),
2109
2135
  onConnectorsChanged: new C(
2110
2136
  () => t.onConnectorsChanged,
2111
- (Ce = t.logging) == null ? void 0 : Ce.logger
2137
+ (me = t.logging) == null ? void 0 : me.logger
2112
2138
  ),
2113
2139
  onZoomChanged: new C(
2114
2140
  () => t.onZoomChanged,
2115
- (me = t.logging) == null ? void 0 : me.logger
2141
+ (we = t.logging) == null ? void 0 : we.logger
2116
2142
  ),
2117
2143
  onSelectedPageIdChanged: new C(
2118
2144
  () => t.onSelectedPageIdChanged,
@@ -2128,25 +2154,25 @@ class he {
2128
2154
  ),
2129
2155
  onPageSizeChanged: new C(
2130
2156
  () => t.onPageSizeChanged,
2131
- (we = t.logging) == null ? void 0 : we.logger
2157
+ (fe = t.logging) == null ? void 0 : fe.logger
2132
2158
  ),
2133
2159
  onShapeCornerRadiusChanged: new C(
2134
2160
  () => t.onShapeCornerRadiusChanged,
2135
- (fe = t.logging) == null ? void 0 : fe.logger
2161
+ (Se = t.logging) == null ? void 0 : Se.logger
2136
2162
  ),
2137
2163
  onCropActiveFrameIdChanged: new C(
2138
2164
  () => t.onCropActiveFrameIdChanged,
2139
- (Se = t.logging) == null ? void 0 : Se.logger
2165
+ (be = t.logging) == null ? void 0 : be.logger
2140
2166
  ),
2141
2167
  onAsyncError: new C(
2142
2168
  () => t.onAsyncError,
2143
- (be = t.logging) == null ? void 0 : be.logger
2169
+ (Ie = t.logging) == null ? void 0 : Ie.logger
2144
2170
  ),
2145
2171
  onViewModeChanged: new C(
2146
2172
  () => t.onViewModeChanged,
2147
- (Ie = t.logging) == null ? void 0 : Ie.logger
2173
+ (ve = t.logging) == null ? void 0 : ve.logger
2148
2174
  ),
2149
- onBarcodeValidationChanged: new C(() => t.onBarcodeValidationChanged, (ve = t.logging) == null ? void 0 : ve.logger),
2175
+ onBarcodeValidationChanged: new C(() => t.onBarcodeValidationChanged, (Ae = t.logging) == null ? void 0 : Ae.logger),
2150
2176
  onDataSourceIdChanged: new C(
2151
2177
  () => t.onDataSourceIdChanged,
2152
2178
  t.logging.logger
@@ -2169,19 +2195,19 @@ class he {
2169
2195
  )
2170
2196
  }, t;
2171
2197
  }
2172
- static isLoggingEnabled(i, t) {
2173
- return t == M.info || t == M.warn && (i == M.warn || i == M.error) ? !0 : t == M.error && i == M.error;
2198
+ static isLoggingEnabled(o, t) {
2199
+ return t == x.info || t == x.warn && (o == x.warn || o == x.error) ? !0 : t == x.error && o == x.error;
2174
2200
  }
2175
2201
  }
2176
- class tn {
2202
+ class sn {
2177
2203
  /**
2178
2204
  * Checks if the given value is a `DatePropertyWrapper`.
2179
2205
  *
2180
2206
  * @param value The value to check.
2181
2207
  * @returns `true` if the value is a `DatePropertyWrapper`, otherwise `false`.
2182
2208
  */
2183
- isDatePropertyWrapper(i) {
2184
- return typeof i == "object" && (i == null ? void 0 : i.type) === "date";
2209
+ isDatePropertyWrapper(o) {
2210
+ return typeof o == "object" && (o == null ? void 0 : o.type) === "date";
2185
2211
  }
2186
2212
  /**
2187
2213
  * Checks if the given value is a `Date` object instance.
@@ -2189,8 +2215,8 @@ class tn {
2189
2215
  * @param value The value to check.
2190
2216
  * @returns `true` if the value is a `Date` object, otherwise `false`.
2191
2217
  */
2192
- isDateObject(i) {
2193
- return i instanceof Date;
2218
+ isDateObject(o) {
2219
+ return o instanceof Date;
2194
2220
  }
2195
2221
  /**
2196
2222
  * Transforms an `EngineDataItem` into a `DataItem`.
@@ -2201,9 +2227,9 @@ class tn {
2201
2227
  * @param dataItem the EngineDataItem to transform.
2202
2228
  * @returns the resulting `DataItem` with parsed date properties.
2203
2229
  */
2204
- mapEngineToDataItem(i) {
2230
+ mapEngineToDataItem(o) {
2205
2231
  const t = {};
2206
- return Object.entries(i).forEach(([e, r]) => {
2232
+ return Object.entries(o).forEach(([e, r]) => {
2207
2233
  t[e] = this.isDatePropertyWrapper(r) ? new Date(r.value) : r;
2208
2234
  }), t;
2209
2235
  }
@@ -2216,59 +2242,59 @@ class tn {
2216
2242
  * @param dataItem the `DataItem` to transform.
2217
2243
  * @returns the resulting `EngineDataItem` with parsed date properties.
2218
2244
  */
2219
- mapDataItemToEngine(i) {
2245
+ mapDataItemToEngine(o) {
2220
2246
  const t = {};
2221
- return Object.entries(i).forEach(([e, r]) => {
2247
+ return Object.entries(o).forEach(([e, r]) => {
2222
2248
  t[e] = this.isDateObject(r) ? { value: r.getTime(), type: "date" } : r;
2223
2249
  }), t;
2224
2250
  }
2225
2251
  }
2226
- var ct;
2227
- class en {
2252
+ var ht;
2253
+ class rn {
2228
2254
  /**
2229
2255
  * @ignore
2230
2256
  */
2231
- constructor(i) {
2257
+ constructor(o) {
2232
2258
  /**
2233
2259
  * @ignore
2234
2260
  */
2235
- u(this, ct);
2236
- g(this, ct, i);
2261
+ u(this, ht);
2262
+ g(this, ht, o);
2237
2263
  }
2238
2264
  /**
2239
2265
  * This method returns the value for a given configuration key. If a value was not found in the configuration store
2240
2266
  * this method returns an error. The key cannot be null.
2241
2267
  * @returns value for a given configuration key
2242
2268
  */
2243
- async getValue(i) {
2244
- return (await a(this, ct)).getConfigValue(i).then((e) => o(e));
2269
+ async getValue(o) {
2270
+ return (await a(this, ht)).getConfigValue(o).then((e) => i(e));
2245
2271
  }
2246
2272
  /**
2247
2273
  * This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
2248
2274
  * using them will result in an error.
2249
2275
  * @returns
2250
2276
  */
2251
- async setValue(i, t) {
2252
- return (await a(this, ct)).setConfigValue(i, t).then((r) => o(r));
2277
+ async setValue(o, t) {
2278
+ return (await a(this, ht)).setConfigValue(o, t).then((r) => i(r));
2253
2279
  }
2254
2280
  /**
2255
2281
  * This method updates the studio options. Only defined options are updated, null values are ignored.
2256
2282
  * @returns
2257
2283
  */
2258
- async updateStudioOptions(i) {
2259
- return (await a(this, ct)).updateStudioOptions(JSON.stringify(i)).then((e) => o(e));
2284
+ async updateStudioOptions(o) {
2285
+ return (await a(this, ht)).updateStudioOptions(JSON.stringify(o)).then((e) => i(e));
2260
2286
  }
2261
2287
  /**
2262
2288
  * This method returns the engine session id. This id is unique for this engine session
2263
2289
  * @returns the engine session id
2264
2290
  */
2265
2291
  async getEngineSessionId() {
2266
- return (await a(this, ct)).getEngineSessionId().then((t) => o(t));
2292
+ return (await a(this, ht)).getEngineSessionId().then((t) => i(t));
2267
2293
  }
2268
2294
  }
2269
- ct = new WeakMap();
2270
- var Dt;
2271
- class is extends en {
2295
+ ht = new WeakMap();
2296
+ var Ot;
2297
+ class os extends rn {
2272
2298
  /**
2273
2299
  * @ignore
2274
2300
  */
@@ -2277,8 +2303,8 @@ class is extends en {
2277
2303
  /**
2278
2304
  * @ignore
2279
2305
  */
2280
- u(this, Dt);
2281
- g(this, Dt, e);
2306
+ u(this, Ot);
2307
+ g(this, Ot, e);
2282
2308
  }
2283
2309
  /**
2284
2310
  * This method returns the value for a given configuration key. If a value was not found in the configuration store,
@@ -2286,8 +2312,8 @@ class is extends en {
2286
2312
  * @returns value for a given configuration key
2287
2313
  */
2288
2314
  async getValue(t) {
2289
- const e = a(this, Dt).get(t);
2290
- return e != null ? o(
2315
+ const e = a(this, Ot).get(t);
2316
+ return e != null ? i(
2291
2317
  {
2292
2318
  status: 200,
2293
2319
  success: !0,
@@ -2305,22 +2331,39 @@ class is extends en {
2305
2331
  */
2306
2332
  async setValue(t, e) {
2307
2333
  const r = super.setValue(t, e);
2308
- return a(this, Dt).set(t, e), r;
2334
+ return a(this, Ot).set(t, e), r;
2309
2335
  }
2310
2336
  }
2311
- Dt = new WeakMap();
2312
- const sn = "studio-cdn.chiligrafx.com", rn = `https://${sn}/editor/${ls.current}/web`;
2313
- let X;
2314
- class Rn {
2337
+ Ot = new WeakMap();
2338
+ var k;
2339
+ class cs {
2340
+ /**
2341
+ * @ignore
2342
+ */
2343
+ constructor(o) {
2344
+ /**
2345
+ * @ignore
2346
+ */
2347
+ u(this, k);
2348
+ this.getAll = async () => (await a(this, k)).getGradients().then((e) => i(e)), this.getById = async (t) => (await a(this, k)).getGradientById(t).then((r) => i(r)), this.create = async () => (await a(this, k)).createGradient().then((e) => i(e)), this.duplicate = async (t) => (await a(this, k)).duplicateGradient(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, k)).moveGradients(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, k)).renameGradient(t, e).then((n) => i(n)), this.update = async (t, e) => {
2349
+ const r = await a(this, k), n = e;
2350
+ return r.updateGradient(t, JSON.stringify(n)).then((c) => i(c));
2351
+ }, this.remove = async (t) => (await a(this, k)).removeGradient(t).then((r) => i(r)), g(this, k, o);
2352
+ }
2353
+ }
2354
+ k = new WeakMap();
2355
+ const nn = "studio-cdn.chiligrafx.com", an = `https://${nn}/editor/${us.current}/web`;
2356
+ let tt;
2357
+ class kn {
2315
2358
  /**
2316
2359
  * The SDK should be configured clientside and it exposes all controllers to work with in other applications
2317
2360
  * @param config The configuration object where the SDK and editor can get configured
2318
2361
  */
2319
- constructor(i) {
2320
- this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new tn(), this.loadEditor = () => {
2362
+ constructor(o) {
2363
+ this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new sn(), this.loadEditor = () => {
2321
2364
  var t;
2322
- qs(
2323
- this.config.editorLink || rn,
2365
+ Zs(
2366
+ this.config.editorLink || an,
2324
2367
  {
2325
2368
  onActionsChanged: this.subscriber.onActionsChanged,
2326
2369
  onStateChanged: this.subscriber.onStateChanged,
@@ -2376,111 +2419,114 @@ class Rn {
2376
2419
  this.setConnection,
2377
2420
  this.config.editorId,
2378
2421
  this.config.studioStyling
2379
- ), this.editorAPI = X == null ? void 0 : X.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 ke(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 Je(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(Q.GraFxStudioSdkVersion, ds.version), this.configuration.setValue(
2380
- Q.GraFxStudioDocumentType,
2381
- this.config.documentType || ps.template
2382
- ), this.configuration.updateStudioOptions(this.config.studioOptions || Ys), this.configuration.setValue(
2383
- Q.QueryCallCacheEnabled,
2422
+ ), this.editorAPI = tt == null ? void 0 : tt.promise.then((e) => e), this.action = new Oe(this.editorAPI), this.layout = new Ye(this.editorAPI), this.frame = new je(this.editorAPI), this.barcode = new Ne(this.editorAPI), this.animation = new De(this.editorAPI), this.document = new Ke(this.editorAPI), this.configuration = new os(this.editorAPI, this.localConfig), this.utils = new rs(this.editorAPI, this.localConfig), this.tool = new es(this.editorAPI), this.page = new Qe(this.editorAPI), this.debug = new Te(this.editorAPI), this.undoManager = new ss(this.editorAPI, this), this.textSelection = new ts(this.editorAPI), this.colorStyle = new ke(this.editorAPI), this.gradientStyle = new cs(this.editorAPI), this.paragraphStyle = new Xe(this.editorAPI), this.characterStyle = new Ge(this.editorAPI), this.mediaConnector = new Ze(this.editorAPI), this.fontConnector = new ze(this.editorAPI), this.dataConnector = new _e(this.editorAPI, this.dataItemMappingTools), this.dataSource = new He(this.editorAPI, this.dataItemMappingTools), this.connector = new Ue(this.editorAPI, this.localConfig), this.variable = new ns(this.editorAPI), this.font = new We(this.editorAPI), this.experiment = new $e(this.editorAPI), this.canvas = new se(this.editorAPI), this.shape = new ae(this.editorAPI), this.colorConversion = new Je(this.editorAPI), this.info = new qe(), this.clipboard = new Be(this.editorAPI), this.brandKit = new Ve(this.editorAPI, this), this.next = new as(this.config, this.connection, this.editorAPI), this.configuration.setValue(X.GraFxStudioSdkVersion, gs.version), this.configuration.setValue(
2423
+ X.GraFxStudioDocumentType,
2424
+ this.config.documentType || ms.template
2425
+ ), this.configuration.updateStudioOptions(this.config.studioOptions || Qs), this.configuration.setValue(
2426
+ X.QueryCallCacheEnabled,
2384
2427
  ((t = this.config.enableQueryCallCache) == null ? void 0 : t.toString()) || "false"
2385
2428
  );
2386
2429
  }, this.setConnection = (t) => {
2387
- X = t;
2388
- }, this.config = he.createRuntimeConfig(i), this.connection = X, this.editorAPI = X == null ? void 0 : X.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 ke(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 Je(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);
2430
+ tt = t;
2431
+ }, this.config = le.createRuntimeConfig(o), this.connection = tt, this.editorAPI = tt == null ? void 0 : tt.promise.then((t) => t), this.action = new Oe(this.editorAPI), this.layout = new Ye(this.editorAPI), this.frame = new je(this.editorAPI), this.shape = new ae(this.editorAPI), this.barcode = new Ne(this.editorAPI), this.undoManager = new ss(this.editorAPI, this), this.connector = new Ue(this.editorAPI, this.localConfig), this.mediaConnector = new Ze(this.editorAPI), this.fontConnector = new ze(this.editorAPI), this.dataConnector = new _e(this.editorAPI, this.dataItemMappingTools), this.dataSource = new He(this.editorAPI, this.dataItemMappingTools), this.animation = new De(this.editorAPI), this.document = new Ke(this.editorAPI), this.configuration = new os(this.editorAPI, this.localConfig), this.variable = new ns(this.editorAPI), this.utils = new rs(this.editorAPI, this.localConfig), this.subscriber = new Tr(this.config, this.localConfig), this.tool = new es(this.editorAPI), this.page = new Qe(this.editorAPI), this.debug = new Te(this.editorAPI), this.textSelection = new ts(this.editorAPI), this.colorStyle = new ke(this.editorAPI), this.gradientStyle = new cs(this.editorAPI), this.paragraphStyle = new Xe(this.editorAPI), this.characterStyle = new Ge(this.editorAPI), this.font = new We(this.editorAPI), this.experiment = new $e(this.editorAPI), this.canvas = new se(this.editorAPI), this.colorConversion = new Je(this.editorAPI), this.info = new qe(), this.clipboard = new Be(this.editorAPI), this.next = new as(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new Ve(this.editorAPI, this);
2389
2432
  }
2390
2433
  }
2391
- 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 || {});
2392
- const Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2434
+ var on = /* @__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))(on || {}), cn = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(cn || {}), hn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(hn || {}), ln = /* @__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))(ln || {}), dn = /* @__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))(dn || {}), un = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(un || {}), gn = /* @__PURE__ */ ((s) => (s.linear = "linear", s))(gn || {}), yn = /* @__PURE__ */ ((s) => (s.local = "linearLocal", s.linearBrandKit = "linearBrandKit", s))(yn || {}), pn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(pn || {}), Cn = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(Cn || {}), mn = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(mn || {}), wn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(wn || {}), fn = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(fn || {}), Sn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(Sn || {}), bn = /* @__PURE__ */ ((s) => (s.none = "none", s.bullet = "bullet", s.number = "number", s))(bn || {}), In = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(In || {}), vn = /* @__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.MARKED_LIST_TYPE = "markedListType", s.MARKED_LIST_GROUP = "markedListGroup", s.MARKED_LIST_LEVEL = "markedListLevel", s))(vn || {}), An = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(An || {}), Pn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(Pn || {}), Fn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(Fn || {}), En = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s.gradient = "gradient", s))(En || {}), As = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(As || {});
2435
+ const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2393
2436
  __proto__: null,
2394
- ConnectorRegistrationSource: Is
2437
+ ConnectorRegistrationSource: As
2395
2438
  }, Symbol.toStringTag, { value: "Module" }));
2396
2439
  export {
2397
- Vr as ActionAsyncError,
2398
- fn as ActionEditorEvent,
2399
- gn as Alignment,
2400
- Rr as AnchorTargetEdgeType,
2401
- Mr as AnchorTargetType,
2402
- wr as AuthCredentialsTypeEnum,
2403
- fr as AuthRefreshTypeEnum,
2404
- Ir as AutoGrowDirection,
2405
- ft as BarcodeCharacterSet,
2406
- Ot as BarcodeErrorCorrectionLevel,
2407
- Ar as BarcodeSourceTypeEnum,
2408
- H as BarcodeType,
2409
- tr as BarcodeValidationResult,
2410
- hn as BasicAnimationsEmphasisStyles,
2440
+ Br as ActionAsyncError,
2441
+ An as ActionEditorEvent,
2442
+ mn as Alignment,
2443
+ Gr as AnchorTargetEdgeType,
2444
+ Vr as AnchorTargetType,
2445
+ Sr as AuthCredentialsTypeEnum,
2446
+ br as AuthRefreshTypeEnum,
2447
+ Ar as AutoGrowDirection,
2448
+ St as BarcodeCharacterSet,
2449
+ Nt as BarcodeErrorCorrectionLevel,
2450
+ Fr as BarcodeSourceTypeEnum,
2451
+ T as BarcodeType,
2452
+ sr as BarcodeValidationResult,
2453
+ dn as BasicAnimationsEmphasisStyles,
2411
2454
  Dr as BlendMode,
2412
- pn as Case,
2413
- W as ColorType,
2414
- Xt as ColorUsageType,
2415
- yr as ConnectorConfigContextType,
2416
- gr as ConnectorConfigValueType,
2417
- mr as ConnectorEventType,
2418
- Xs as ConnectorHttpError,
2419
- An as ConnectorMapping,
2420
- Cr as ConnectorMappingDirection,
2421
- pr as ConnectorMappingSource,
2422
- Nt as ConnectorRegistrationSource,
2423
- re as ConnectorStateType,
2424
- lr as ConnectorType,
2425
- nr as ConstraintMode,
2426
- bn as CornerRadiusType,
2427
- ws as CropType,
2428
- Br as DataRowAsyncError,
2429
- Jr as Day,
2430
- se as DeprecatedMediaConnectorDownloadType,
2431
- Rt as DeprecatedMediaType,
2432
- Zs as DocumentIssueTypeEnum,
2433
- ps as DocumentType,
2434
- $r as DownloadFormats,
2435
- on as EaseTypes,
2436
- In as EngineEditModeType,
2437
- ie as EnvironmentType,
2438
- Lr as FitMode,
2439
- Or as FitModePosition,
2440
- Fr as FlowDirection,
2441
- dn as FontPreviewFormat,
2442
- un as FontWeights,
2443
- On as FrameAnchorTarget,
2444
- xr as FrameAnchorType,
2445
- Hr as FramePropertyNames,
2446
- vr as FrameTypeEnum,
2447
- Fn as GrafxTokenAuthCredentials,
2448
- jt as ImageSourceTypeEnum,
2449
- rr as LayoutIntent,
2450
- _r as LayoutPropertyNames,
2451
- er as LayoutType,
2452
- kr as Locale,
2453
- sr as MeasurementUnit,
2454
- fs as MediaDownloadIntent,
2455
- ae as MediaDownloadType,
2456
- Vt as MediaType,
2457
- Vn as Next,
2458
- Ln as PageAnchorTarget,
2459
- Z as PositionEnum,
2460
- En as RefreshedAuthCredendentials,
2461
- Cn as Scripting,
2462
- mn as SelectedTextStyleSections,
2463
- wn as SelectedTextStyles,
2464
- an as ShakeDirections,
2465
- Sn as ShapeType,
2466
- nn as SlideDirections,
2467
- dr as SortBy,
2468
- ur as SortOrder,
2469
- Pr as TextDirection,
2470
- yn as TextPosition,
2471
- _ as ToolType,
2472
- cn as TweenTypes,
2473
- Nr as UpdateZIndexMethod,
2474
- Sr as UploadAssetValidationError,
2475
- ms as UploadAssetValidationErrorType,
2476
- ce as VariableType,
2477
- Gr as VariableVisibilityOperator,
2478
- Ur as VariableVisibilityTargetType,
2455
+ fn as Case,
2456
+ j as ColorType,
2457
+ te as ColorUsageType,
2458
+ Cr as ConnectorConfigContextType,
2459
+ pr as ConnectorConfigValueType,
2460
+ fr as ConnectorEventType,
2461
+ er as ConnectorHttpError,
2462
+ On as ConnectorMapping,
2463
+ wr as ConnectorMappingDirection,
2464
+ mr as ConnectorMappingSource,
2465
+ Mt as ConnectorRegistrationSource,
2466
+ ne as ConnectorStateType,
2467
+ ur as ConnectorType,
2468
+ ir as ConstraintMode,
2469
+ Fn as CornerRadiusType,
2470
+ Ss as CropType,
2471
+ Jr as DataRowAsyncError,
2472
+ kr as Day,
2473
+ re as DeprecatedMediaConnectorDownloadType,
2474
+ Vt as DeprecatedMediaType,
2475
+ Xs as DocumentIssueTypeEnum,
2476
+ ms as DocumentType,
2477
+ zr as DownloadFormats,
2478
+ hn as EaseTypes,
2479
+ En as EngineEditModeType,
2480
+ oe as EnvironmentType,
2481
+ Nr as FitMode,
2482
+ Mr as FitModePosition,
2483
+ Lr as FlowDirection,
2484
+ pn as FontPreviewFormat,
2485
+ Cn as FontWeights,
2486
+ Vn as FrameAnchorTarget,
2487
+ Rr as FrameAnchorType,
2488
+ Kr as FramePropertyNames,
2489
+ Pr as FrameTypeEnum,
2490
+ gn as GradientType,
2491
+ yn as GradientUsageType,
2492
+ Nn as GrafxTokenAuthCredentials,
2493
+ qt as ImageSourceTypeEnum,
2494
+ ar as LayoutIntent,
2495
+ $r as LayoutPropertyNames,
2496
+ rr as LayoutType,
2497
+ Ur as Locale,
2498
+ bn as MarkedListType,
2499
+ nr as MeasurementUnit,
2500
+ bs as MediaDownloadIntent,
2501
+ ie as MediaDownloadType,
2502
+ Gt as MediaType,
2503
+ Un as Next,
2504
+ Rn as PageAnchorTarget,
2505
+ Q as PositionEnum,
2506
+ Mn as RefreshedAuthCredendentials,
2507
+ Sn as Scripting,
2508
+ In as SelectedTextStyleSections,
2509
+ vn as SelectedTextStyles,
2510
+ cn as ShakeDirections,
2511
+ Pn as ShapeType,
2512
+ on as SlideDirections,
2513
+ gr as SortBy,
2514
+ yr as SortOrder,
2515
+ Er as TextDirection,
2516
+ wn as TextPosition,
2517
+ K as ToolType,
2518
+ ln as TweenTypes,
2519
+ xr as UpdateZIndexMethod,
2520
+ Ir as UploadAssetValidationError,
2521
+ fs as UploadAssetValidationErrorType,
2522
+ he as VariableType,
2523
+ Hr as VariableVisibilityOperator,
2524
+ _r as VariableVisibilityTargetType,
2479
2525
  xt as VariableVisibilityType,
2480
- Er as VerticalAlign,
2481
- ln as ViewMode,
2482
- Q as WellKnownConfigurationKeys,
2483
- Rn as default,
2484
- Pn as grafxMediaConnectorRegistration
2526
+ Or as VerticalAlign,
2527
+ un as ViewMode,
2528
+ X as WellKnownConfigurationKeys,
2529
+ kn as default,
2530
+ Dn as grafxMediaConnectorRegistration
2485
2531
  };
2486
2532
  //# sourceMappingURL=main.es.js.map