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