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