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