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