fable-editor 1.2.4 → 1.2.6
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/dist/angular/angular/fable-editor.component.d.ts +1 -0
- package/dist/angular/core/editor.d.ts +14 -0
- package/dist/angular/core/types.d.ts +1 -0
- package/dist/angular/esm2022/angular/fable-editor.component.mjs +4 -1
- package/dist/angular/esm2022/core/editor.mjs +93 -1
- package/dist/angular/esm2022/core/types.mjs +1 -1
- package/dist/angular/fesm2022/fable-editor.mjs +95 -0
- package/dist/angular/fesm2022/fable-editor.mjs.map +1 -1
- package/dist/core/editor.d.ts +14 -0
- package/dist/core/editor.d.ts.map +1 -1
- package/dist/core/index.cjs +3 -3
- package/dist/core/index.mjs +177 -118
- package/dist/core/types.d.ts +1 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/react/FableEditor.d.ts.map +1 -1
- package/dist/react/index.cjs +9 -9
- package/dist/react/index.mjs +233 -170
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ce, { forwardRef as _e, useRef as z, useImperativeHandle as
|
|
1
|
+
import ce, { forwardRef as _e, useRef as z, useImperativeHandle as $e, useEffect as ot } from "react";
|
|
2
2
|
var Et = { exports: {} }, J = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -10,7 +10,7 @@ var Et = { exports: {} }, J = {};
|
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
12
|
var Gt;
|
|
13
|
-
function
|
|
13
|
+
function je() {
|
|
14
14
|
if (Gt) return J;
|
|
15
15
|
Gt = 1;
|
|
16
16
|
var p = ce, t = Symbol.for("react.element"), e = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
@@ -34,7 +34,7 @@ var tt = {};
|
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
36
|
var Kt;
|
|
37
|
-
function
|
|
37
|
+
function We() {
|
|
38
38
|
return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
39
|
var p = ce, t = Symbol.for("react.element"), e = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), r = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), y = Symbol.iterator, g = "@@iterator";
|
|
40
40
|
function x(a) {
|
|
@@ -48,29 +48,29 @@ function je() {
|
|
|
48
48
|
{
|
|
49
49
|
for (var f = arguments.length, v = new Array(f > 1 ? f - 1 : 0), T = 1; T < f; T++)
|
|
50
50
|
v[T - 1] = arguments[T];
|
|
51
|
-
|
|
51
|
+
I("error", a, v);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function I(a, f, v) {
|
|
55
55
|
{
|
|
56
56
|
var T = w.ReactDebugCurrentFrame, L = T.getStackAddendum();
|
|
57
57
|
L !== "" && (f += "%s", v = v.concat([L]));
|
|
58
|
-
var
|
|
58
|
+
var A = v.map(function(M) {
|
|
59
59
|
return String(M);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
A.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, A);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var H = !1, $ = !1, O = !1,
|
|
64
|
+
var H = !1, $ = !1, O = !1, F = !1, et = !1, Mt;
|
|
65
65
|
Mt = Symbol.for("react.module.reference");
|
|
66
|
-
function
|
|
67
|
-
return !!(typeof a == "string" || typeof a == "function" || a === i || a === n || et || a === s || a === c || a === d ||
|
|
66
|
+
function ue(a) {
|
|
67
|
+
return !!(typeof a == "string" || typeof a == "function" || a === i || a === n || et || a === s || a === c || a === d || F || a === b || H || $ || O || typeof a == "object" && a !== null && (a.$$typeof === m || a.$$typeof === u || a.$$typeof === l || a.$$typeof === r || a.$$typeof === o || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
71
71
|
a.$$typeof === Mt || a.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function pe(a, f, v) {
|
|
74
74
|
var T = a.displayName;
|
|
75
75
|
if (T)
|
|
76
76
|
return T;
|
|
@@ -110,14 +110,14 @@ function je() {
|
|
|
110
110
|
var v = a;
|
|
111
111
|
return kt(v._context) + ".Provider";
|
|
112
112
|
case o:
|
|
113
|
-
return
|
|
113
|
+
return pe(a, a.render, "ForwardRef");
|
|
114
114
|
case u:
|
|
115
115
|
var T = a.displayName || null;
|
|
116
116
|
return T !== null ? T : W(a.type) || "Memo";
|
|
117
117
|
case m: {
|
|
118
|
-
var L = a,
|
|
118
|
+
var L = a, A = L._payload, M = L._init;
|
|
119
119
|
try {
|
|
120
|
-
return W(M(
|
|
120
|
+
return W(M(A));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,14 +125,14 @@ function je() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var V = Object.assign, G = 0, Lt, Ht,
|
|
128
|
+
var V = Object.assign, G = 0, Lt, Ht, At, It, qt, Rt, Pt;
|
|
129
129
|
function Bt() {
|
|
130
130
|
}
|
|
131
131
|
Bt.__reactDisabledLog = !0;
|
|
132
|
-
function
|
|
132
|
+
function me() {
|
|
133
133
|
{
|
|
134
134
|
if (G === 0) {
|
|
135
|
-
Lt = console.log, Ht = console.info,
|
|
135
|
+
Lt = console.log, Ht = console.info, At = console.warn, It = console.error, qt = console.group, Rt = console.groupCollapsed, Pt = console.groupEnd;
|
|
136
136
|
var a = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
@@ -152,7 +152,7 @@ function je() {
|
|
|
152
152
|
G++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function fe() {
|
|
156
156
|
{
|
|
157
157
|
if (G--, G === 0) {
|
|
158
158
|
var a = {
|
|
@@ -168,10 +168,10 @@ function je() {
|
|
|
168
168
|
value: Ht
|
|
169
169
|
}),
|
|
170
170
|
warn: V({}, a, {
|
|
171
|
-
value:
|
|
171
|
+
value: At
|
|
172
172
|
}),
|
|
173
173
|
error: V({}, a, {
|
|
174
|
-
value:
|
|
174
|
+
value: It
|
|
175
175
|
}),
|
|
176
176
|
group: V({}, a, {
|
|
177
177
|
value: qt
|
|
@@ -203,8 +203,8 @@ function je() {
|
|
|
203
203
|
}
|
|
204
204
|
var ft = !1, st;
|
|
205
205
|
{
|
|
206
|
-
var
|
|
207
|
-
st = new
|
|
206
|
+
var ge = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
+
st = new ge();
|
|
208
208
|
}
|
|
209
209
|
function Nt(a, f) {
|
|
210
210
|
if (!a || ft)
|
|
@@ -218,8 +218,8 @@ function je() {
|
|
|
218
218
|
ft = !0;
|
|
219
219
|
var L = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var A;
|
|
222
|
+
A = pt.current, pt.current = null, me();
|
|
223
223
|
try {
|
|
224
224
|
if (f) {
|
|
225
225
|
var M = function() {
|
|
@@ -263,24 +263,24 @@ function je() {
|
|
|
263
263
|
if (R !== 1 || P !== 1)
|
|
264
264
|
do
|
|
265
265
|
if (R--, P--, P < 0 || S[R] !== N[P]) {
|
|
266
|
-
var
|
|
266
|
+
var _ = `
|
|
267
267
|
` + S[R].replace(" at new ", " at ");
|
|
268
|
-
return a.displayName &&
|
|
268
|
+
return a.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", a.displayName)), typeof a == "function" && st.set(a, _), _;
|
|
269
269
|
}
|
|
270
270
|
while (R >= 1 && P >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
ft = !1, pt.current =
|
|
275
|
+
ft = !1, pt.current = A, fe(), Error.prepareStackTrace = L;
|
|
276
276
|
}
|
|
277
277
|
var Q = a ? a.displayName || a.name : "", U = Q ? it(Q) : "";
|
|
278
278
|
return typeof a == "function" && st.set(a, U), U;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function ve(a, f, v) {
|
|
281
281
|
return Nt(a, !1);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function be(a) {
|
|
284
284
|
var f = a.prototype;
|
|
285
285
|
return !!(f && f.isReactComponent);
|
|
286
286
|
}
|
|
@@ -288,7 +288,7 @@ function je() {
|
|
|
288
288
|
if (a == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof a == "function")
|
|
291
|
-
return Nt(a,
|
|
291
|
+
return Nt(a, be(a));
|
|
292
292
|
if (typeof a == "string")
|
|
293
293
|
return it(a);
|
|
294
294
|
switch (a) {
|
|
@@ -300,13 +300,13 @@ function je() {
|
|
|
300
300
|
if (typeof a == "object")
|
|
301
301
|
switch (a.$$typeof) {
|
|
302
302
|
case o:
|
|
303
|
-
return
|
|
303
|
+
return ve(a.render);
|
|
304
304
|
case u:
|
|
305
305
|
return nt(a.type, f, v);
|
|
306
306
|
case m: {
|
|
307
|
-
var T = a, L = T._payload,
|
|
307
|
+
var T = a, L = T._payload, A = T._init;
|
|
308
308
|
try {
|
|
309
|
-
return nt(
|
|
309
|
+
return nt(A(L), f, v);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
@@ -321,11 +321,11 @@ function je() {
|
|
|
321
321
|
} else
|
|
322
322
|
Zt.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function ye(a, f, v, T, L) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
326
|
+
var A = Function.call.bind(K);
|
|
327
327
|
for (var M in a)
|
|
328
|
-
if (
|
|
328
|
+
if (A(a, M)) {
|
|
329
329
|
var S = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof a[M] != "function") {
|
|
@@ -340,17 +340,17 @@ function je() {
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
var
|
|
343
|
+
var xe = Array.isArray;
|
|
344
344
|
function gt(a) {
|
|
345
|
-
return
|
|
345
|
+
return xe(a);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Ce(a) {
|
|
348
348
|
{
|
|
349
349
|
var f = typeof Symbol == "function" && Symbol.toStringTag, v = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
350
350
|
return v;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function we(a) {
|
|
354
354
|
try {
|
|
355
355
|
return Ot(a), !1;
|
|
356
356
|
} catch {
|
|
@@ -360,17 +360,17 @@ function je() {
|
|
|
360
360
|
function Ot(a) {
|
|
361
361
|
return "" + a;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
if (
|
|
365
|
-
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
363
|
+
function Ft(a) {
|
|
364
|
+
if (we(a))
|
|
365
|
+
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ce(a)), Ot(a);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var _t = w.ReactCurrentOwner, Te = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
372
|
}, $t, jt;
|
|
373
|
-
function
|
|
373
|
+
function Ee(a) {
|
|
374
374
|
if (K.call(a, "ref")) {
|
|
375
375
|
var f = Object.getOwnPropertyDescriptor(a, "ref").get;
|
|
376
376
|
if (f && f.isReactWarning)
|
|
@@ -378,7 +378,7 @@ function je() {
|
|
|
378
378
|
}
|
|
379
379
|
return a.ref !== void 0;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Se(a) {
|
|
382
382
|
if (K.call(a, "key")) {
|
|
383
383
|
var f = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
384
384
|
if (f && f.isReactWarning)
|
|
@@ -386,10 +386,10 @@ function je() {
|
|
|
386
386
|
}
|
|
387
387
|
return a.key !== void 0;
|
|
388
388
|
}
|
|
389
|
-
function Se(a, f) {
|
|
390
|
-
typeof a.ref == "string" && Ft.current;
|
|
391
|
-
}
|
|
392
389
|
function Me(a, f) {
|
|
390
|
+
typeof a.ref == "string" && _t.current;
|
|
391
|
+
}
|
|
392
|
+
function ke(a, f) {
|
|
393
393
|
{
|
|
394
394
|
var v = function() {
|
|
395
395
|
$t || ($t = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
@@ -400,7 +400,7 @@ function je() {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Le(a, f) {
|
|
404
404
|
{
|
|
405
405
|
var v = function() {
|
|
406
406
|
jt || (jt = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
|
@@ -411,7 +411,7 @@ function je() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var
|
|
414
|
+
var He = function(a, f, v, T, L, A, M) {
|
|
415
415
|
var S = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
417
|
$$typeof: t,
|
|
@@ -421,7 +421,7 @@ function je() {
|
|
|
421
421
|
ref: v,
|
|
422
422
|
props: M,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
|
-
_owner:
|
|
424
|
+
_owner: A
|
|
425
425
|
};
|
|
426
426
|
return S._store = {}, Object.defineProperty(S._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
@@ -440,22 +440,22 @@ function je() {
|
|
|
440
440
|
value: L
|
|
441
441
|
}), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
|
|
442
442
|
};
|
|
443
|
-
function
|
|
443
|
+
function Ae(a, f, v, T, L) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
446
|
-
v !== void 0 && (
|
|
447
|
-
for (
|
|
448
|
-
K.call(f,
|
|
445
|
+
var A, M = {}, S = null, N = null;
|
|
446
|
+
v !== void 0 && (Ft(v), S = "" + v), Se(f) && (Ft(f.key), S = "" + f.key), Ee(f) && (N = f.ref, Me(f, L));
|
|
447
|
+
for (A in f)
|
|
448
|
+
K.call(f, A) && !Te.hasOwnProperty(A) && (M[A] = f[A]);
|
|
449
449
|
if (a && a.defaultProps) {
|
|
450
450
|
var R = a.defaultProps;
|
|
451
|
-
for (
|
|
452
|
-
M[
|
|
451
|
+
for (A in R)
|
|
452
|
+
M[A] === void 0 && (M[A] = R[A]);
|
|
453
453
|
}
|
|
454
454
|
if (S || N) {
|
|
455
455
|
var P = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
456
|
-
S &&
|
|
456
|
+
S && ke(M, P), N && Le(M, P);
|
|
457
457
|
}
|
|
458
|
-
return
|
|
458
|
+
return He(a, S, N, L, T, _t.current, M);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
var vt = w.ReactCurrentOwner, Wt = w.ReactDebugCurrentFrame;
|
|
@@ -487,7 +487,7 @@ Check the render method of \`` + a + "`.";
|
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
489
|
var Ut = {};
|
|
490
|
-
function
|
|
490
|
+
function qe(a) {
|
|
491
491
|
{
|
|
492
492
|
var f = Vt();
|
|
493
493
|
if (!f) {
|
|
@@ -504,7 +504,7 @@ Check the top-level render call using <` + v + ">.");
|
|
|
504
504
|
if (!a._store || a._store.validated || a.key != null)
|
|
505
505
|
return;
|
|
506
506
|
a._store.validated = !0;
|
|
507
|
-
var v =
|
|
507
|
+
var v = qe(f);
|
|
508
508
|
if (Ut[v])
|
|
509
509
|
return;
|
|
510
510
|
Ut[v] = !0;
|
|
@@ -526,12 +526,12 @@ Check the top-level render call using <` + v + ">.");
|
|
|
526
526
|
else if (a) {
|
|
527
527
|
var L = x(a);
|
|
528
528
|
if (typeof L == "function" && L !== a.entries)
|
|
529
|
-
for (var
|
|
529
|
+
for (var A = L.call(a), M; !(M = A.next()).done; )
|
|
530
530
|
yt(M.value) && zt(M.value, f);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Re(a) {
|
|
535
535
|
{
|
|
536
536
|
var f = a.type;
|
|
537
537
|
if (f == null || typeof f == "string")
|
|
@@ -547,7 +547,7 @@ Check the top-level render call using <` + v + ">.");
|
|
|
547
547
|
return;
|
|
548
548
|
if (v) {
|
|
549
549
|
var T = W(f);
|
|
550
|
-
|
|
550
|
+
ye(v, a.props, "prop", T, a);
|
|
551
551
|
} else if (f.PropTypes !== void 0 && !bt) {
|
|
552
552
|
bt = !0;
|
|
553
553
|
var L = W(f);
|
|
@@ -556,7 +556,7 @@ Check the top-level render call using <` + v + ">.");
|
|
|
556
556
|
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Pe(a) {
|
|
560
560
|
{
|
|
561
561
|
for (var f = Object.keys(a.props), v = 0; v < f.length; v++) {
|
|
562
562
|
var T = f[v];
|
|
@@ -569,9 +569,9 @@ Check the top-level render call using <` + v + ">.");
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
var Yt = {};
|
|
572
|
-
function Qt(a, f, v, T, L,
|
|
572
|
+
function Qt(a, f, v, T, L, A) {
|
|
573
573
|
{
|
|
574
|
-
var M =
|
|
574
|
+
var M = ue(a);
|
|
575
575
|
if (!M) {
|
|
576
576
|
var S = "";
|
|
577
577
|
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (S += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
@@ -580,52 +580,52 @@ Check the top-level render call using <` + v + ">.");
|
|
|
580
580
|
var R;
|
|
581
581
|
a === null ? R = "null" : gt(a) ? R = "array" : a !== void 0 && a.$$typeof === t ? (R = "<" + (W(a.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : R = typeof a, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, S);
|
|
582
582
|
}
|
|
583
|
-
var P =
|
|
583
|
+
var P = Ae(a, f, v, L, A);
|
|
584
584
|
if (P == null)
|
|
585
585
|
return P;
|
|
586
586
|
if (M) {
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
587
|
+
var _ = f.children;
|
|
588
|
+
if (_ !== void 0)
|
|
589
589
|
if (T)
|
|
590
|
-
if (gt(
|
|
591
|
-
for (var Q = 0; Q <
|
|
592
|
-
Xt(
|
|
593
|
-
Object.freeze && Object.freeze(
|
|
590
|
+
if (gt(_)) {
|
|
591
|
+
for (var Q = 0; Q < _.length; Q++)
|
|
592
|
+
Xt(_[Q], a);
|
|
593
|
+
Object.freeze && Object.freeze(_);
|
|
594
594
|
} else
|
|
595
595
|
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
596
596
|
else
|
|
597
|
-
Xt(
|
|
597
|
+
Xt(_, a);
|
|
598
598
|
}
|
|
599
599
|
if (K.call(f, "key")) {
|
|
600
|
-
var U = W(a), D = Object.keys(f).filter(function(
|
|
601
|
-
return
|
|
600
|
+
var U = W(a), D = Object.keys(f).filter(function(Fe) {
|
|
601
|
+
return Fe !== "key";
|
|
602
602
|
}), xt = D.length > 0 ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
603
|
if (!Yt[U + xt]) {
|
|
604
|
-
var
|
|
604
|
+
var Oe = D.length > 0 ? "{" + D.join(": ..., ") + ": ...}" : "{}";
|
|
605
605
|
E(`A props object containing a "key" prop is being spread into JSX:
|
|
606
606
|
let props = %s;
|
|
607
607
|
<%s {...props} />
|
|
608
608
|
React keys must be passed directly to JSX without using spread:
|
|
609
609
|
let props = %s;
|
|
610
|
-
<%s key={someKey} {...props} />`, xt, U,
|
|
610
|
+
<%s key={someKey} {...props} />`, xt, U, Oe, U), Yt[U + xt] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return a === i ?
|
|
613
|
+
return a === i ? Pe(P) : Re(P), P;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function Be(a, f, v) {
|
|
617
617
|
return Qt(a, f, v, !0);
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Ne(a, f, v) {
|
|
620
620
|
return Qt(a, f, v, !1);
|
|
621
621
|
}
|
|
622
|
-
var
|
|
623
|
-
tt.Fragment = i, tt.jsx =
|
|
622
|
+
var De = Ne, Ze = Be;
|
|
623
|
+
tt.Fragment = i, tt.jsx = De, tt.jsxs = Ze;
|
|
624
624
|
}()), tt;
|
|
625
625
|
}
|
|
626
|
-
process.env.NODE_ENV === "production" ? Et.exports =
|
|
627
|
-
var
|
|
628
|
-
const
|
|
626
|
+
process.env.NODE_ENV === "production" ? Et.exports = je() : Et.exports = We();
|
|
627
|
+
var Ve = Et.exports;
|
|
628
|
+
const Ue = {
|
|
629
629
|
en: {
|
|
630
630
|
dir: "ltr",
|
|
631
631
|
file: "File",
|
|
@@ -1012,9 +1012,9 @@ const Ve = {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
};
|
|
1014
1014
|
function Ct(p) {
|
|
1015
|
-
return
|
|
1015
|
+
return Ue[p];
|
|
1016
1016
|
}
|
|
1017
|
-
const
|
|
1017
|
+
const ze = "undo redo | preview print | importword revhistory | fontfamily fontsize | fontsizeincrease fontsizedecrease | bold italic underline strikethrough | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | link blockquote code changecase lineheight wordspacing letterspacing | removeformat | blocks | ltr rtl | quickimage quickvideo quicktable codesample template charmap emoji | fullscreen sourcecode", Xe = "file edit view insert format tools table help", Ye = [
|
|
1018
1018
|
["Andale Mono", "andale mono,times"],
|
|
1019
1019
|
["Arial", "arial,helvetica,sans-serif"],
|
|
1020
1020
|
["Arial Black", "arial black,avant garde"],
|
|
@@ -1034,7 +1034,7 @@ const Ue = "undo redo | preview print | importword revhistory | fontfamily fonts
|
|
|
1034
1034
|
["Verdana", "verdana,geneva"],
|
|
1035
1035
|
["Webdings", "webdings"],
|
|
1036
1036
|
["Wingdings", "wingdings,zapf dingbats"]
|
|
1037
|
-
],
|
|
1037
|
+
], Qe = ["8px", "9px", "10px", "11px", "12px", "14px", "16px", "18px", "20px", "24px", "28px", "32px", "36px", "48px", "72px", "96px"], Ge = 1, Ke = 100, Jt = ["1", "1.15", "1.4", "1.5", "1.75", "2", "2.5", "3"], te = ["1px", "2px", "4px", "6px", "8px", "12px"], ee = ["0.5px", "1px", "1.5px", "2px", "3px", "4px"], ie = [
|
|
1038
1038
|
["plain", "Plain text"],
|
|
1039
1039
|
["html", "HTML/XML"],
|
|
1040
1040
|
["css", "CSS"],
|
|
@@ -1060,7 +1060,7 @@ const Ue = "undo redo | preview print | importword revhistory | fontfamily fonts
|
|
|
1060
1060
|
["h5", "heading5"],
|
|
1061
1061
|
["h6", "heading6"],
|
|
1062
1062
|
["pre", "pre"]
|
|
1063
|
-
],
|
|
1063
|
+
], Je = ["#F76707", "#4263EB", "#CC5DE8"], ti = [
|
|
1064
1064
|
"#FFFFFF",
|
|
1065
1065
|
"#F4F4F4",
|
|
1066
1066
|
"#E8EAED",
|
|
@@ -1086,7 +1086,7 @@ const Ue = "undo redo | preview print | importword revhistory | fontfamily fonts
|
|
|
1086
1086
|
"#8E24AA",
|
|
1087
1087
|
"#C2185B",
|
|
1088
1088
|
"#6D4C41"
|
|
1089
|
-
],
|
|
1089
|
+
], ei = [
|
|
1090
1090
|
{
|
|
1091
1091
|
key: "chcat_currency",
|
|
1092
1092
|
chars: [
|
|
@@ -1426,7 +1426,7 @@ const Ue = "undo redo | preview print | importword revhistory | fontfamily fonts
|
|
|
1426
1426
|
"ة"
|
|
1427
1427
|
]
|
|
1428
1428
|
}
|
|
1429
|
-
],
|
|
1429
|
+
], ii = [
|
|
1430
1430
|
{
|
|
1431
1431
|
key: "emcat_smileys",
|
|
1432
1432
|
chars: [
|
|
@@ -2380,7 +2380,7 @@ const Ue = "undo redo | preview print | importword revhistory | fontfamily fonts
|
|
|
2380
2380
|
codesampleic: k(
|
|
2381
2381
|
'<rect x="3.5" y="4" width="17" height="16" rx="2"/><path d="M3.5 8.5h17"/><path d="M9.5 12 7 14.25l2.5 2.25M14.5 12l2.5 2.25-2.5 2.25"/>'
|
|
2382
2382
|
)
|
|
2383
|
-
},
|
|
2383
|
+
}, si = /* @__PURE__ */ new Set([
|
|
2384
2384
|
"p",
|
|
2385
2385
|
"div",
|
|
2386
2386
|
"span",
|
|
@@ -2422,7 +2422,7 @@ const Ue = "undo redo | preview print | importword revhistory | fontfamily fonts
|
|
|
2422
2422
|
"figure",
|
|
2423
2423
|
"figcaption",
|
|
2424
2424
|
"mark"
|
|
2425
|
-
]),
|
|
2425
|
+
]), ni = /* @__PURE__ */ new Set([
|
|
2426
2426
|
"text-align",
|
|
2427
2427
|
"direction",
|
|
2428
2428
|
"unicode-bidi",
|
|
@@ -2494,13 +2494,13 @@ function ut(p) {
|
|
|
2494
2494
|
s < 1 || (t[i.slice(0, s).trim().toLowerCase()] = i.slice(s + 1).trim());
|
|
2495
2495
|
}), t;
|
|
2496
2496
|
}
|
|
2497
|
-
function
|
|
2497
|
+
function li(p) {
|
|
2498
2498
|
return p.replace(/<!--\[if !supportLists\]-->([\s\S]*?)<!--\[endif\]-->/gi, "$1").replace(/<!--\[if !supportLists\]>([\s\S]*?)<!\[endif\]-->/gi, "$1").replace(/<!\[if !supportLists\]>([\s\S]*?)<!\[endif\]>/gi, "$1").replace(/<!--\[if [\s\S]*?<!\[endif\]-->/gi, "").replace(/<!--[\s\S]*?-->/g, "").replace(/<(script|style|xml|title)[\s\S]*?<\/\1>/gi, "").replace(/<\/?(meta|link)[^>]*>/gi, "").replace(/<\?xml[\s\S]*?\?>/gi, "").replace(/<\/?(o|v|w|m|st1):[^>]*>/gi, "");
|
|
2499
2499
|
}
|
|
2500
|
-
function
|
|
2500
|
+
function oi(p) {
|
|
2501
2501
|
return /^[0-9]+[\.\)،]/.test(p) ? { ordered: !0 } : /^[٠-٩۰-۹]+/.test(p) ? { ordered: !0, style: "arabic-indic" } : /^[ivxlc]{2,}[\.\)]/.test(p) ? { ordered: !0, style: "lower-roman" } : /^[IVXLC]{2,}[\.\)]/.test(p) ? { ordered: !0, style: "upper-roman" } : /^[a-z][\.\)]/.test(p) ? { ordered: !0, style: "lower-alpha" } : /^[A-Z][\.\)]/.test(p) ? { ordered: !0, style: "upper-alpha" } : /^[ء-ي][\.\)،-]/.test(p) ? { ordered: !0, style: "arabic-indic" } : { ordered: !1 };
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2503
|
+
function ri(p) {
|
|
2504
2504
|
const t = (s) => {
|
|
2505
2505
|
const n = (s.getAttribute("style") || "") + " " + (s.className || "");
|
|
2506
2506
|
return /mso-list\s*:(?!\s*ignore)/i.test(n) || /MsoListParagraph/i.test(n);
|
|
@@ -2516,10 +2516,10 @@ function oi(p) {
|
|
|
2516
2516
|
}), e.forEach((s) => {
|
|
2517
2517
|
const n = [], l = s[0];
|
|
2518
2518
|
s.forEach((r) => {
|
|
2519
|
-
var w, E,
|
|
2519
|
+
var w, E, I;
|
|
2520
2520
|
const c = +(((w = (r.getAttribute("style") || "").match(/level(\d+)/i)) == null ? void 0 : w[1]) || 1), d = Array.from(r.querySelectorAll("span")).find(
|
|
2521
2521
|
(H) => /mso-list\s*:\s*ignore/i.test(H.getAttribute("style") || "")
|
|
2522
|
-
), u = d ? ((E = d.textContent) == null ? void 0 : E.trim()) || "" : (((
|
|
2522
|
+
), u = d ? ((E = d.textContent) == null ? void 0 : E.trim()) || "" : (((I = r.textContent) == null ? void 0 : I.trim().match(/^\S{1,4}/)) || [""])[0], { ordered: m, style: b } = oi(u);
|
|
2523
2523
|
for (d && d.remove(); n.length && n[n.length - 1].level > c; ) n.pop();
|
|
2524
2524
|
if (!n.length || n[n.length - 1].level < c) {
|
|
2525
2525
|
const H = p.createElement(m ? "ol" : "ul");
|
|
@@ -2536,13 +2536,13 @@ function oi(p) {
|
|
|
2536
2536
|
});
|
|
2537
2537
|
});
|
|
2538
2538
|
}
|
|
2539
|
-
function
|
|
2539
|
+
function ai(p) {
|
|
2540
2540
|
p.querySelectorAll('b[id^="docs-internal-guid"]').forEach((t) => {
|
|
2541
2541
|
for (; t.firstChild; ) t.parentNode.insertBefore(t.firstChild, t);
|
|
2542
2542
|
t.remove();
|
|
2543
2543
|
});
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2545
|
+
function ci(p) {
|
|
2546
2546
|
p.querySelectorAll("table").forEach((t) => {
|
|
2547
2547
|
const e = t;
|
|
2548
2548
|
ut(e)["border-collapse"] || (e.style.borderCollapse = "collapse");
|
|
@@ -2569,7 +2569,7 @@ function ht(p, t) {
|
|
|
2569
2569
|
}
|
|
2570
2570
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
2571
2571
|
const i = e, s = i.tagName.toLowerCase();
|
|
2572
|
-
if (!
|
|
2572
|
+
if (!si.has(s)) {
|
|
2573
2573
|
if (s === "font") {
|
|
2574
2574
|
const o = t.createElement("span");
|
|
2575
2575
|
i.getAttribute("style") && o.setAttribute("style", i.getAttribute("style")), i.getAttribute("color") && (o.style.color = i.getAttribute("color")), i.getAttribute("face") && (o.style.fontFamily = i.getAttribute("face"));
|
|
@@ -2612,14 +2612,14 @@ function ht(p, t) {
|
|
|
2612
2612
|
}
|
|
2613
2613
|
const l = ut(i), r = [];
|
|
2614
2614
|
for (const [o, c] of Object.entries(l))
|
|
2615
|
-
|
|
2615
|
+
ni.has(o) && (/expression|javascript|url\s*\(\s*['"]?\s*file:/i.test(c) || o === "font-weight" && /^(400|normal)$/i.test(c) || o === "font-style" && /^normal$/i.test(c) || o === "text-decoration" && /^none$/i.test(c) || r.push(o + ":" + c));
|
|
2616
2616
|
if (r.length ? i.setAttribute("style", r.join(";")) : i.removeAttribute("style"), i.removeAttribute("class"), ht(i, t), s === "span" && !i.attributes.length) {
|
|
2617
2617
|
for (; i.firstChild; ) i.parentNode.insertBefore(i.firstChild, i);
|
|
2618
2618
|
i.remove();
|
|
2619
2619
|
}
|
|
2620
2620
|
});
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2622
|
+
function hi(p) {
|
|
2623
2623
|
const t = [], e = /<style[^>]*>([\s\S]*?)<\/style>/gi;
|
|
2624
2624
|
let i;
|
|
2625
2625
|
for (; i = e.exec(p); ) {
|
|
@@ -2637,7 +2637,7 @@ function ci(p) {
|
|
|
2637
2637
|
}
|
|
2638
2638
|
return t;
|
|
2639
2639
|
}
|
|
2640
|
-
function
|
|
2640
|
+
function di(p, t) {
|
|
2641
2641
|
if (!t.length) return;
|
|
2642
2642
|
const e = /* @__PURE__ */ new Map();
|
|
2643
2643
|
t.forEach(({ sel: i, decls: s }) => {
|
|
@@ -2663,15 +2663,15 @@ function hi(p, t) {
|
|
|
2663
2663
|
function he(p) {
|
|
2664
2664
|
return p.replace(/[ﭐ-﷿ﹰ-ﻼ]+/g, (t) => t.normalize("NFKC"));
|
|
2665
2665
|
}
|
|
2666
|
-
function
|
|
2666
|
+
function ui(p) {
|
|
2667
2667
|
const t = p.createTreeWalker(p.body, NodeFilter.SHOW_TEXT, null);
|
|
2668
2668
|
let e;
|
|
2669
2669
|
for (; e = t.nextNode(); )
|
|
2670
2670
|
/[ﭐ-﷿ﹰ-ﻼ]/.test(e.nodeValue || "") && (e.nodeValue = he(e.nodeValue || ""));
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2673
|
-
const e =
|
|
2674
|
-
|
|
2672
|
+
function pi(p, t = "ltr") {
|
|
2673
|
+
const e = hi(p), i = new DOMParser().parseFromString(li(p), "text/html");
|
|
2674
|
+
di(i, e), /class="?Mso|mso-|urn:schemas-microsoft-com/i.test(i.body.innerHTML) && ri(i), ai(i), ci(i), ht(i.body, i), ui(i);
|
|
2675
2675
|
const s = (n) => {
|
|
2676
2676
|
var l;
|
|
2677
2677
|
return n && n.tagName === "P" && !((l = n.textContent) != null && l.trim()) && !n.querySelector("img,table");
|
|
@@ -2680,11 +2680,11 @@ function ui(p, t = "ltr") {
|
|
|
2680
2680
|
for (; s(i.body.lastElementChild); ) i.body.lastElementChild.remove();
|
|
2681
2681
|
return i.body.innerHTML.trim();
|
|
2682
2682
|
}
|
|
2683
|
-
function
|
|
2683
|
+
function mi(p) {
|
|
2684
2684
|
const t = he(p).replace(/\r/g, ""), e = (i) => i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2685
2685
|
return /\n/.test(t) ? t.split(/\n{2,}/).map((i) => `<p dir="auto">${e(i).replace(/\n/g, "<br>") || "<br>"}</p>`).join("") : e(t);
|
|
2686
2686
|
}
|
|
2687
|
-
function
|
|
2687
|
+
function fi(p) {
|
|
2688
2688
|
const t = new DataView(p), e = /* @__PURE__ */ new Map();
|
|
2689
2689
|
let i = -1;
|
|
2690
2690
|
for (let r = p.byteLength - 22; r >= Math.max(0, p.byteLength - 22 - 65535); r--)
|
|
@@ -2745,7 +2745,7 @@ const oe = (p) => p.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
2745
2745
|
lightGray: "#D3D3D3",
|
|
2746
2746
|
black: "#000000",
|
|
2747
2747
|
white: "#FFFFFF"
|
|
2748
|
-
},
|
|
2748
|
+
}, gi = {
|
|
2749
2749
|
png: "image/png",
|
|
2750
2750
|
jpg: "image/jpeg",
|
|
2751
2751
|
jpeg: "image/jpeg",
|
|
@@ -2753,13 +2753,13 @@ const oe = (p) => p.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
2753
2753
|
bmp: "image/bmp",
|
|
2754
2754
|
webp: "image/webp"
|
|
2755
2755
|
};
|
|
2756
|
-
function
|
|
2756
|
+
function vi(p) {
|
|
2757
2757
|
let t = "";
|
|
2758
2758
|
for (let e = 0; e < p.length; e += 32768)
|
|
2759
2759
|
t += String.fromCharCode(...p.subarray(e, e + 32768));
|
|
2760
2760
|
return btoa(t);
|
|
2761
2761
|
}
|
|
2762
|
-
class
|
|
2762
|
+
class bi {
|
|
2763
2763
|
constructor(t, e, i) {
|
|
2764
2764
|
this.rels = t, this.images = e, this.numFmt = i;
|
|
2765
2765
|
}
|
|
@@ -2862,8 +2862,8 @@ class vi {
|
|
|
2862
2862
|
return e + "</tbody></table>";
|
|
2863
2863
|
}
|
|
2864
2864
|
}
|
|
2865
|
-
async function
|
|
2866
|
-
const t = p instanceof ArrayBuffer ? p : await p.arrayBuffer(), e =
|
|
2865
|
+
async function yi(p) {
|
|
2866
|
+
const t = p instanceof ArrayBuffer ? p : await p.arrayBuffer(), e = fi(t), i = new TextDecoder(), s = async (y) => {
|
|
2867
2867
|
const g = e.get(y);
|
|
2868
2868
|
return g ? new DOMParser().parseFromString(i.decode(await le(t, g)), "application/xml") : null;
|
|
2869
2869
|
}, n = await s("word/document.xml"), l = n == null ? void 0 : n.getElementsByTagName("*");
|
|
@@ -2887,10 +2887,10 @@ async function bi(p) {
|
|
|
2887
2887
|
for (const [y, g] of c) {
|
|
2888
2888
|
const x = g.startsWith("/") ? g.slice(1) : "word/" + g.replace(/^\.\//, ""), w = e.get(x);
|
|
2889
2889
|
if (!w) continue;
|
|
2890
|
-
const E = (x.split(".").pop() || "").toLowerCase(),
|
|
2891
|
-
if (
|
|
2890
|
+
const E = (x.split(".").pop() || "").toLowerCase(), I = gi[E];
|
|
2891
|
+
if (I)
|
|
2892
2892
|
try {
|
|
2893
|
-
u.set(y, `data:${
|
|
2893
|
+
u.set(y, `data:${I};base64,${vi(await le(t, w))}`);
|
|
2894
2894
|
} catch {
|
|
2895
2895
|
}
|
|
2896
2896
|
}
|
|
@@ -2899,8 +2899,8 @@ async function bi(p) {
|
|
|
2899
2899
|
const y = /* @__PURE__ */ new Map(), g = Array.from(b.getElementsByTagName("*"));
|
|
2900
2900
|
for (const x of g) {
|
|
2901
2901
|
if (x.localName !== "abstractNum") continue;
|
|
2902
|
-
const w = q(x, "abstractNumId"), E = dt(x, "lvl").find((H) => q(H, "ilvl") === "0") || dt(x, "lvl")[0],
|
|
2903
|
-
y.set(w,
|
|
2902
|
+
const w = q(x, "abstractNumId"), E = dt(x, "lvl").find((H) => q(H, "ilvl") === "0") || dt(x, "lvl")[0], I = E ? q(B(E, "numFmt")) : "";
|
|
2903
|
+
y.set(w, I === "bullet" ? "ul" : "ol");
|
|
2904
2904
|
}
|
|
2905
2905
|
for (const x of g) {
|
|
2906
2906
|
if (x.localName !== "num") continue;
|
|
@@ -2908,24 +2908,24 @@ async function bi(p) {
|
|
|
2908
2908
|
m.set(w, y.get(E) || "ul");
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
2911
|
-
return new
|
|
2911
|
+
return new bi(o, u, m).convertBody(r);
|
|
2912
2912
|
}
|
|
2913
|
-
const
|
|
2913
|
+
const xi = ["nw", "ne", "sw", "se"], wt = ["img-left", "img-right", "img-top", "img-center"], Tt = {
|
|
2914
2914
|
"img-left": "tplimgleft",
|
|
2915
2915
|
"img-right": "tplimgright",
|
|
2916
2916
|
"img-top": "tplimgtop",
|
|
2917
2917
|
"img-center": "tplimgcenter"
|
|
2918
|
-
},
|
|
2918
|
+
}, Ci = {
|
|
2919
2919
|
"img-left": h.tplleft,
|
|
2920
2920
|
"img-right": h.tplright,
|
|
2921
2921
|
"img-top": h.tpltop,
|
|
2922
2922
|
"img-center": h.tplcenter
|
|
2923
|
-
},
|
|
2923
|
+
}, wi = ".tox,.pop,.tblctx,.imgctx,.selctx,.dlg";
|
|
2924
2924
|
let Z = null, X = null, St = 0, ae = !1;
|
|
2925
2925
|
function ct() {
|
|
2926
2926
|
clearTimeout(St), X = null, Z && Z.classList.remove("show");
|
|
2927
2927
|
}
|
|
2928
|
-
function
|
|
2928
|
+
function Ti(p) {
|
|
2929
2929
|
const t = p.dataset.tip;
|
|
2930
2930
|
if (!t) return;
|
|
2931
2931
|
X = p, clearTimeout(St);
|
|
@@ -2940,21 +2940,41 @@ function wi(p) {
|
|
|
2940
2940
|
r + n > innerHeight - 6 && (r = i.top - n - 7), Z.style.left = l + "px", Z.style.top = r + "px";
|
|
2941
2941
|
}, e);
|
|
2942
2942
|
}
|
|
2943
|
-
function
|
|
2943
|
+
function Ei() {
|
|
2944
2944
|
ae || (ae = !0, document.addEventListener("mouseover", (p) => {
|
|
2945
2945
|
const t = p.target, e = t.closest ? t.closest("[title],[data-tip]") : null;
|
|
2946
|
-
if (!e || !e.closest(
|
|
2946
|
+
if (!e || !e.closest(wi) || e.closest(".earea")) {
|
|
2947
2947
|
e !== X && ct();
|
|
2948
2948
|
return;
|
|
2949
2949
|
}
|
|
2950
2950
|
const i = e.getAttribute("title");
|
|
2951
|
-
i && (e.dataset.tip = i, e.removeAttribute("title"), e.getAttribute("aria-label") || e.setAttribute("aria-label", i)), e !== X &&
|
|
2951
|
+
i && (e.dataset.tip = i, e.removeAttribute("title"), e.getAttribute("aria-label") || e.setAttribute("aria-label", i)), e !== X && Ti(e);
|
|
2952
2952
|
}), document.addEventListener("mouseout", (p) => {
|
|
2953
2953
|
X && !X.contains(p.relatedTarget) && ct();
|
|
2954
2954
|
}), document.addEventListener("mousedown", ct, !0), addEventListener("scroll", ct, !0));
|
|
2955
2955
|
}
|
|
2956
|
+
const Si = /[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u0780-\u07BF\u08A0-\u08FF\uFB1D-\uFB4F\uFB50-\uFDFF\uFE70-\uFEFF]/, Mi = new RegExp("\\p{L}", "u"), ki = "p,div,li,td,th,blockquote,h1,h2,h3,h4,h5,h6,pre,figcaption";
|
|
2957
|
+
function Li(p) {
|
|
2958
|
+
for (const t of p) {
|
|
2959
|
+
if (Si.test(t)) return "rtl";
|
|
2960
|
+
if (Mi.test(t)) return "ltr";
|
|
2961
|
+
}
|
|
2962
|
+
return null;
|
|
2963
|
+
}
|
|
2964
|
+
function de(p) {
|
|
2965
|
+
let t = "";
|
|
2966
|
+
return p.childNodes.forEach((e) => {
|
|
2967
|
+
if (e.nodeType === Node.TEXT_NODE)
|
|
2968
|
+
t += e.nodeValue || "";
|
|
2969
|
+
else if (e.nodeType === Node.ELEMENT_NODE) {
|
|
2970
|
+
const i = e, s = (i.getAttribute("dir") || "").toLowerCase();
|
|
2971
|
+
if (s === "rtl" || s === "ltr") return;
|
|
2972
|
+
t += de(i);
|
|
2973
|
+
}
|
|
2974
|
+
}), t;
|
|
2975
|
+
}
|
|
2956
2976
|
var j;
|
|
2957
|
-
let
|
|
2977
|
+
let Hi = (j = class {
|
|
2958
2978
|
constructor(t) {
|
|
2959
2979
|
this.lang = "en", this.contentClass = "fable-content-" + j.instanceCounter++, this.contentStyleEl = null, this.savedRange = null, this.foreColor = "#000000", this.backColor = "#FACC15", this.openPop = null, this.openSubEl = null, this.popAnchor = null, this.dlgOvl = null, this.tblActive = null, this.tblCorner = null, this.tblColBars = [], this.tblCtx = null, this.tblCellMark = null, this.tblOpMark = null, this.tblOpMarkKind = null, this.imgActive = null, this.imgHandles = [], this.imgCtx = null, this.imgHideTimer = null, this.phActive = null, this.phCtx = null, this.phUploadTarget = null, this.vidActive = null, this.vidCtx = null, this.vidHideTimer = null, this.vphActive = null, this.vphCtx = null, this.vphUploadTarget = null, this.selCtx = null, this.tbrMore = null, this.tbrExpanded = !1, this.codeActive = null, this.codeCtx = null, this.tplActive = null, this.tplCtx = null, this.revisions = [], this.revTimer = null, this.draftTimer = null, this.draftStorageKey = "", this.listeners = [], this.isDestroyed = !1, this.options = {
|
|
2960
2980
|
target: t.target,
|
|
@@ -2970,7 +2990,7 @@ let Ei = (j = class {
|
|
|
2970
2990
|
statusbar: t.statusbar ?? !0,
|
|
2971
2991
|
readonly: t.readonly ?? !1,
|
|
2972
2992
|
draftKey: t.draftKey ?? (typeof location < "u" ? location.pathname : "default"),
|
|
2973
|
-
fontFamilyFormats: t.fontFamilyFormats ??
|
|
2993
|
+
fontFamilyFormats: t.fontFamilyFormats ?? Ye,
|
|
2974
2994
|
imageFileTypes: t.imageFileTypes ?? ["image/jpeg", "image/jpg", "image/png", "image/gif", "image/bmp", "image/webp"],
|
|
2975
2995
|
videoFileTypes: t.videoFileTypes ?? ["video/mp4", "video/webm", "video/ogg"]
|
|
2976
2996
|
}, this.imageUploadHandler = t.imageUploadHandler, this.onImageUploadError = t.onImageUploadError, this.videoUploadHandler = t.videoUploadHandler, this.onVideoUploadError = t.onVideoUploadError, this.contentStyle = t.contentStyle, this.applyTheme(t), this.lang = this.options.language, this.draftStorageKey = "tmclone-draft:" + this.options.draftKey, this.initDOM(), this.bindEvents(), this.initUI(), this.recordRevision(), this.options.onReady(this);
|
|
@@ -2996,7 +3016,7 @@ let Ei = (j = class {
|
|
|
2996
3016
|
</span>
|
|
2997
3017
|
`, this.sbHelp = this.statusbar.querySelector(".mid"), this.sbWords = this.statusbar.querySelector(".words");
|
|
2998
3018
|
const e = this.statusbar.querySelector(".grip");
|
|
2999
|
-
this.bindGrip(e), this.shell.appendChild(this.menubar), this.shell.appendChild(this.toolbar), this.shell.appendChild(this.ed), this.shell.appendChild(this.statusbar), this.contentStyle && (this.contentStyleEl = document.createElement("style"), this.contentStyleEl.textContent = this.scopeContentStyle(this.contentStyle), this.shell.appendChild(this.contentStyleEl)), t.appendChild(this.shell),
|
|
3019
|
+
this.bindGrip(e), this.shell.appendChild(this.menubar), this.shell.appendChild(this.toolbar), this.shell.appendChild(this.ed), this.shell.appendChild(this.statusbar), this.contentStyle && (this.contentStyleEl = document.createElement("style"), this.contentStyleEl.textContent = this.scopeContentStyle(this.contentStyle), this.shell.appendChild(this.contentStyleEl)), t.appendChild(this.shell), Ei(), this.options.statusbar || (this.statusbar.style.display = "none"), this.imgInput = document.createElement("input"), this.imgInput.type = "file", this.imgInput.accept = this.options.imageFileTypes.join(","), this.imgInput.style.display = "none", t.appendChild(this.imgInput), this.vidInput = document.createElement("input"), this.vidInput.type = "file", this.vidInput.accept = this.options.videoFileTypes.join(","), this.vidInput.style.display = "none", t.appendChild(this.vidInput), this.docInput = document.createElement("input"), this.docInput.type = "file", this.docInput.accept = ".docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document", this.docInput.style.display = "none", t.appendChild(this.docInput);
|
|
3000
3020
|
}
|
|
3001
3021
|
/** Theme options land as CSS variables on the document root rather than the editor
|
|
3002
3022
|
* shell, because dialogs, popups and floating context toolbars are appended to
|
|
@@ -3148,6 +3168,45 @@ let Ei = (j = class {
|
|
|
3148
3168
|
getContent() {
|
|
3149
3169
|
return this.ed.innerHTML;
|
|
3150
3170
|
}
|
|
3171
|
+
/** Same HTML as getContent(), wrapped so its RTL/LTR direction survives being
|
|
3172
|
+
* dropped into a fixed-alignment host (e.g. an email template's
|
|
3173
|
+
* `<td align="left">`), which otherwise forces left alignment onto any
|
|
3174
|
+
* descendant that has no `text-align` of its own — even one with its own
|
|
3175
|
+
* dir="rtl". Elements that already carry their own dir (preserved as-is by
|
|
3176
|
+
* the paste engine) each get their own matching text-align only if they
|
|
3177
|
+
* don't already have one. Blocks with no reliable explicit dir (missing, or
|
|
3178
|
+
* dir="auto" from plain-text paste) get their direction from a first-strong-
|
|
3179
|
+
* character scan of their own text instead of silently inheriting the
|
|
3180
|
+
* editor's configured UI language — mixed-direction content and any
|
|
3181
|
+
* alignment the user explicitly set are left untouched either way. Only
|
|
3182
|
+
* content with no strongly-directional character anywhere falls back to the
|
|
3183
|
+
* editor's current direction. */
|
|
3184
|
+
getContentForEmail() {
|
|
3185
|
+
const t = (l, r) => {
|
|
3186
|
+
const o = (l.getAttribute("style") || "").trim();
|
|
3187
|
+
l.setAttribute("style", o ? o.replace(/;?$/, "; ") + r : r);
|
|
3188
|
+
}, e = document.createElement("div");
|
|
3189
|
+
e.innerHTML = this.ed.innerHTML;
|
|
3190
|
+
let i = null;
|
|
3191
|
+
e.querySelectorAll("[dir]").forEach((l) => {
|
|
3192
|
+
const r = (l.getAttribute("dir") || "").toLowerCase();
|
|
3193
|
+
if (r !== "rtl" && r !== "ltr") return;
|
|
3194
|
+
const o = r;
|
|
3195
|
+
i || (i = o), /text-align\s*:/i.test(l.getAttribute("style") || "") || t(l, `text-align:${o === "rtl" ? "right" : "left"}`);
|
|
3196
|
+
}), e.querySelectorAll(ki).forEach((l) => {
|
|
3197
|
+
const r = (l.getAttribute("dir") || "").toLowerCase();
|
|
3198
|
+
if (r === "rtl" || r === "ltr") return;
|
|
3199
|
+
const o = Li(de(l));
|
|
3200
|
+
if (!o) return;
|
|
3201
|
+
i || (i = o), l.setAttribute("dir", o);
|
|
3202
|
+
const c = /text-align\s*:/i.test(l.getAttribute("style") || "");
|
|
3203
|
+
t(l, c ? `direction:${o}` : `direction:${o};text-align:${o === "rtl" ? "right" : "left"}`);
|
|
3204
|
+
});
|
|
3205
|
+
const s = i || this.ed.getAttribute("dir") || this.dir();
|
|
3206
|
+
return e.querySelectorAll("table:not([dir])").forEach((l) => {
|
|
3207
|
+
l.setAttribute("dir", s), /direction\s*:/i.test(l.getAttribute("style") || "") || t(l, `direction:${s}`);
|
|
3208
|
+
}), `<div dir="${s}" style="direction:${s};text-align:${s === "rtl" ? "right" : "left"}">${e.innerHTML}</div>`;
|
|
3209
|
+
}
|
|
3151
3210
|
setContent(t) {
|
|
3152
3211
|
this.ed.innerHTML = t || "<p><br></p>", this.refreshState(), this.clearTableHandles(), this.clearImageHandles(), this.clearImgPlaceholderSel(), this.clearTplSel(), this.clearVphPlaceholderSel(), this.clearVidHandles(), this.clearCodeSel(), this.clearSelToolbar(), this.onChange();
|
|
3153
3212
|
}
|
|
@@ -3161,7 +3220,7 @@ let Ei = (j = class {
|
|
|
3161
3220
|
this.ed.focus();
|
|
3162
3221
|
}
|
|
3163
3222
|
async importWordFile(t) {
|
|
3164
|
-
const e = await
|
|
3223
|
+
const e = await yi(t);
|
|
3165
3224
|
this.recordRevision(), this.setContent(e), this.recordRevision();
|
|
3166
3225
|
}
|
|
3167
3226
|
restoreDraft() {
|
|
@@ -3373,7 +3432,7 @@ let Ei = (j = class {
|
|
|
3373
3432
|
return n.type = "button", n.className = "cchip", n.title = s, n.addEventListener("mousedown", (l) => {
|
|
3374
3433
|
l.preventDefault(), this.saveSel();
|
|
3375
3434
|
}), n;
|
|
3376
|
-
}, e =
|
|
3435
|
+
}, e = Je.map((s) => {
|
|
3377
3436
|
const n = t(this.t("forecolor"));
|
|
3378
3437
|
return n.style.background = s, n.addEventListener("click", () => this.applyColor("fore", s)), n;
|
|
3379
3438
|
}), i = t(this.t("forecolor"));
|
|
@@ -3433,7 +3492,7 @@ let Ei = (j = class {
|
|
|
3433
3492
|
* table cell-background menu all show the identical popup. */
|
|
3434
3493
|
buildPaletteInto(t, e, i) {
|
|
3435
3494
|
const s = document.createElement("div");
|
|
3436
|
-
s.className = "cpal",
|
|
3495
|
+
s.className = "cpal", ti.forEach((u) => {
|
|
3437
3496
|
const m = document.createElement("button");
|
|
3438
3497
|
m.type = "button", m.style.background = u, m.title = u, m.addEventListener("click", () => {
|
|
3439
3498
|
this.closePop(), i(u);
|
|
@@ -3482,7 +3541,7 @@ let Ei = (j = class {
|
|
|
3482
3541
|
this.popup(t, (e) => this.menuItems(e, this.fontItems()));
|
|
3483
3542
|
}
|
|
3484
3543
|
sizeItems() {
|
|
3485
|
-
return
|
|
3544
|
+
return Qe.map((t) => ({
|
|
3486
3545
|
label: t,
|
|
3487
3546
|
on: this.currentSize() === t,
|
|
3488
3547
|
action: () => this.applyFontSize(t)
|
|
@@ -3535,7 +3594,7 @@ let Ei = (j = class {
|
|
|
3535
3594
|
this.saveSel(), this.refreshState(), this.onChange();
|
|
3536
3595
|
}
|
|
3537
3596
|
stepFontSize(t) {
|
|
3538
|
-
const e = parseInt(this.currentSize(), 10) || 14, i = Math.min(
|
|
3597
|
+
const e = parseInt(this.currentSize(), 10) || 14, i = Math.min(Ke, Math.max(Ge, e + t));
|
|
3539
3598
|
i !== e && this.applyFontSize(i + "px");
|
|
3540
3599
|
}
|
|
3541
3600
|
/* ------------------------------------------------ case / spacing / link */
|
|
@@ -3776,7 +3835,7 @@ let Ei = (j = class {
|
|
|
3776
3835
|
}
|
|
3777
3836
|
buildToolbar() {
|
|
3778
3837
|
this.toolbar.innerHTML = "";
|
|
3779
|
-
const t = this.options.toolbar === !0 ?
|
|
3838
|
+
const t = this.options.toolbar === !0 ? ze : this.options.toolbar, e = this.buildToolbarRegistry();
|
|
3780
3839
|
this.parseToolbarString(t).forEach((i) => {
|
|
3781
3840
|
const s = [];
|
|
3782
3841
|
i.forEach((n) => {
|
|
@@ -3958,7 +4017,7 @@ let Ei = (j = class {
|
|
|
3958
4017
|
{ label: this.t("deltable"), icon: h.trash, action: () => this.tableOp("deltable") }
|
|
3959
4018
|
],
|
|
3960
4019
|
help: [this.mItem("helpttl", h.helpic, () => this.helpDlg(), "Alt+0")]
|
|
3961
|
-
}, e = this.options.menubar === !0 ?
|
|
4020
|
+
}, e = this.options.menubar === !0 ? Xe : this.options.menubar, i = /* @__PURE__ */ new Set();
|
|
3962
4021
|
e.split(/\s+/).filter(Boolean).forEach((s) => {
|
|
3963
4022
|
if (i.has(s)) return;
|
|
3964
4023
|
if (i.add(s), !t[s]) {
|
|
@@ -4066,13 +4125,13 @@ let Ei = (j = class {
|
|
|
4066
4125
|
this.dialog(
|
|
4067
4126
|
this.t("tablepropsttl"),
|
|
4068
4127
|
(E) => {
|
|
4069
|
-
const
|
|
4128
|
+
const I = (H, $) => {
|
|
4070
4129
|
const O = document.createElement("div");
|
|
4071
4130
|
O.style.cssText = r;
|
|
4072
|
-
const
|
|
4073
|
-
|
|
4131
|
+
const F = document.createElement("span");
|
|
4132
|
+
F.style.cssText = o, F.textContent = this.t(H), O.append(F, $), E.appendChild(O);
|
|
4074
4133
|
};
|
|
4075
|
-
e = document.createElement("input"), e.type = "text", e.style.cssText = c, e.placeholder = "e.g. 600px or 100%", e.value = u,
|
|
4134
|
+
e = document.createElement("input"), e.type = "text", e.style.cssText = c, e.placeholder = "e.g. 600px or 100%", e.value = u, I("tblwidth", e), i = document.createElement("input"), i.type = "number", i.min = "0", i.style.cssText = c, i.value = String(m), I("tblcellpadding", i), s = document.createElement("input"), s.type = "number", s.min = "0", s.style.cssText = c, s.value = String(b), I("tblcellspacing", s), n = document.createElement("input"), n.type = "number", n.min = "0", n.style.cssText = c, n.value = String(y), I("tblborder", n), l = document.createElement("select"), l.style.cssText = c, [
|
|
4076
4135
|
["", "alignnone"],
|
|
4077
4136
|
["left", "alignleft"],
|
|
4078
4137
|
["center", "aligncenter"],
|
|
@@ -4080,7 +4139,7 @@ let Ei = (j = class {
|
|
|
4080
4139
|
].forEach(([H, $]) => {
|
|
4081
4140
|
const O = document.createElement("option");
|
|
4082
4141
|
O.value = H, O.textContent = this.t($), H === w && (O.selected = !0), l.appendChild(O);
|
|
4083
|
-
}),
|
|
4142
|
+
}), I("tblalign", l);
|
|
4084
4143
|
},
|
|
4085
4144
|
[
|
|
4086
4145
|
{ label: this.t("cancel"), action: () => this.closeDlg() },
|
|
@@ -4332,10 +4391,10 @@ let Ei = (j = class {
|
|
|
4332
4391
|
});
|
|
4333
4392
|
}
|
|
4334
4393
|
charMap() {
|
|
4335
|
-
this.glyphPickerDlg(this.t("charmap").replace("…", ""),
|
|
4394
|
+
this.glyphPickerDlg(this.t("charmap").replace("…", ""), ei, !1);
|
|
4336
4395
|
}
|
|
4337
4396
|
emojiMap() {
|
|
4338
|
-
this.glyphPickerDlg(this.t("emoji").replace("…", ""),
|
|
4397
|
+
this.glyphPickerDlg(this.t("emoji").replace("…", ""), ii, !0);
|
|
4339
4398
|
}
|
|
4340
4399
|
printDoc() {
|
|
4341
4400
|
const t = window.open("", "_blank");
|
|
@@ -4652,8 +4711,8 @@ let Ei = (j = class {
|
|
|
4652
4711
|
w.type = "button", w.textContent = this.t(g);
|
|
4653
4712
|
const E = document.createElement("div");
|
|
4654
4713
|
E.className = "dtabpanel", x(E);
|
|
4655
|
-
const
|
|
4656
|
-
u.push(E), w.addEventListener("click", () => b(
|
|
4714
|
+
const I = u.length;
|
|
4715
|
+
u.push(E), w.addEventListener("click", () => b(I)), d.appendChild(w);
|
|
4657
4716
|
}, b = (g) => {
|
|
4658
4717
|
d.querySelectorAll("button").forEach((x, w) => x.classList.toggle("on", w === g)), u.forEach((x, w) => x.style.display = w === g ? "" : "none");
|
|
4659
4718
|
};
|
|
@@ -4671,21 +4730,21 @@ let Ei = (j = class {
|
|
|
4671
4730
|
const H = (O = E.files) == null ? void 0 : O[0];
|
|
4672
4731
|
if (!H) return;
|
|
4673
4732
|
w.disabled = !0, w.textContent = this.t("uploading");
|
|
4674
|
-
const $ = (
|
|
4675
|
-
t.value =
|
|
4733
|
+
const $ = (F) => {
|
|
4734
|
+
t.value = F, w.disabled = !1, w.textContent = this.t("uploadvideo");
|
|
4676
4735
|
};
|
|
4677
4736
|
if (this.videoUploadHandler)
|
|
4678
|
-
this.videoUploadHandler(H).then($).catch((
|
|
4737
|
+
this.videoUploadHandler(H).then($).catch((F) => {
|
|
4679
4738
|
var et;
|
|
4680
|
-
w.disabled = !1, w.textContent = this.t("uploadfailed"), (et = this.onVideoUploadError) == null || et.call(this,
|
|
4739
|
+
w.disabled = !1, w.textContent = this.t("uploadfailed"), (et = this.onVideoUploadError) == null || et.call(this, F, H);
|
|
4681
4740
|
});
|
|
4682
4741
|
else {
|
|
4683
|
-
const
|
|
4684
|
-
|
|
4742
|
+
const F = new FileReader();
|
|
4743
|
+
F.onload = () => $(F.result), F.readAsDataURL(H);
|
|
4685
4744
|
}
|
|
4686
4745
|
}), x.append(t, w, E), t.style.flex = "1", g.appendChild(r("vidsource", x));
|
|
4687
|
-
const
|
|
4688
|
-
|
|
4746
|
+
const I = document.createElement("div");
|
|
4747
|
+
I.className = "drow", e = document.createElement("input"), e.type = "number", e.value = "560", i = document.createElement("input"), i.type = "number", i.value = "314", I.append(r("tblwidth", e), r("tblheight", i)), g.appendChild(I);
|
|
4689
4748
|
}), m("vidembed", (g) => {
|
|
4690
4749
|
const x = document.createElement("p");
|
|
4691
4750
|
x.textContent = this.t("vidembedhint"), x.style.cssText = "margin:0 0 8px;color:#556;font-size:13.5px", s = document.createElement("textarea"), s.style.cssText = "width:100%;box-sizing:border-box;height:160px", g.append(x, s);
|
|
@@ -4927,7 +4986,7 @@ let Ei = (j = class {
|
|
|
4927
4986
|
renderTplCtxButtons() {
|
|
4928
4987
|
const t = this.tplCtx, e = this.tplActive;
|
|
4929
4988
|
!t || !e || (t.innerHTML = "", wt.forEach((i) => {
|
|
4930
|
-
const s = this.ctxBtn(
|
|
4989
|
+
const s = this.ctxBtn(Ci[i], this.t(Tt[i]), () => this.setTplLayout(i));
|
|
4931
4990
|
s.classList.toggle("on", e.classList.contains("tpl-" + i)), t.appendChild(s);
|
|
4932
4991
|
}), t.append(this.ctxSep(), this.ctxBtn(h.trash, this.t("deltemplate"), () => this.removeTemplate())), this.positionTplCtx());
|
|
4933
4992
|
}
|
|
@@ -5110,7 +5169,7 @@ let Ei = (j = class {
|
|
|
5110
5169
|
this.cancelImgHide(), this.imgHandles.forEach((i) => i.remove()), this.imgHandles = [], (t = this.imgCtx) == null || t.remove(), this.imgCtx = null, (e = this.imgActive) == null || e.classList.remove("img-selected"), this.imgActive = null;
|
|
5111
5170
|
}
|
|
5112
5171
|
selectImage(t) {
|
|
5113
|
-
this.imgActive !== t && (this.clearImageHandles(), this.imgActive = t, t.classList.add("img-selected"), this.imgHandles =
|
|
5172
|
+
this.imgActive !== t && (this.clearImageHandles(), this.imgActive = t, t.classList.add("img-selected"), this.imgHandles = xi.map((e) => {
|
|
5114
5173
|
const i = document.createElement("div");
|
|
5115
5174
|
return i.className = "img-handle img-handle-" + e, i.dataset.corner = e, i.addEventListener("mousedown", (s) => this.startImageResizeDrag(s, e)), i.addEventListener("mouseenter", () => this.cancelImgHide()), i.addEventListener("mouseleave", () => this.scheduleImgHide()), document.body.appendChild(i), i;
|
|
5116
5175
|
}), this.imgCtx = this.buildImageCtxToolbar(t), this.positionImageHandles());
|
|
@@ -5363,21 +5422,25 @@ let Ei = (j = class {
|
|
|
5363
5422
|
return;
|
|
5364
5423
|
}
|
|
5365
5424
|
}
|
|
5366
|
-
i ? document.execCommand("insertHTML", !1,
|
|
5425
|
+
i ? document.execCommand("insertHTML", !1, pi(i, this.dir())) : document.execCommand("insertHTML", !1, mi(e.getData("text/plain"))), this.onChange();
|
|
5367
5426
|
}
|
|
5368
5427
|
/* ---------------------------------------------------------- init */
|
|
5369
5428
|
initUI() {
|
|
5370
5429
|
this.closePop(), this.closeDlg(), this.clearTableHandles(), this.clearImgPlaceholderSel(), this.clearVphPlaceholderSel(), this.clearVidHandles(), this.clearCodeSel(), this.shell.dir = this.dir(), this.ed.dir = this.dir(), this.options.menubar ? this.buildMenubar() : this.menubar.style.display = "none", this.options.toolbar ? this.buildToolbar() : this.toolbar.style.display = "none", this.sbHelp.textContent = this.t("statushelp"), this.refreshState();
|
|
5371
5430
|
}
|
|
5372
5431
|
}, j.instanceCounter = 0, j.TBR_COLLAPSE_MAX = 992, j);
|
|
5373
|
-
const
|
|
5432
|
+
const Ai = _e(
|
|
5374
5433
|
({ value: p, defaultValue: t, onChange: e, onReady: i, className: s, style: n, ...l }, r) => {
|
|
5375
5434
|
const o = z(null), c = z(null), d = z(!1), u = z(p ?? t), m = z(null), b = z(e), y = z(i);
|
|
5376
|
-
return b.current = e, y.current = i,
|
|
5435
|
+
return b.current = e, y.current = i, $e(r, () => ({
|
|
5377
5436
|
getContent: () => {
|
|
5378
5437
|
var g;
|
|
5379
5438
|
return ((g = c.current) == null ? void 0 : g.getContent()) ?? "";
|
|
5380
5439
|
},
|
|
5440
|
+
getContentForEmail: () => {
|
|
5441
|
+
var g;
|
|
5442
|
+
return ((g = c.current) == null ? void 0 : g.getContentForEmail()) ?? "";
|
|
5443
|
+
},
|
|
5381
5444
|
setContent: (g) => {
|
|
5382
5445
|
var x;
|
|
5383
5446
|
return (x = c.current) == null ? void 0 : x.setContent(g);
|
|
@@ -5412,7 +5475,7 @@ const Si = _e(
|
|
|
5412
5475
|
}
|
|
5413
5476
|
})), ot(() => {
|
|
5414
5477
|
if (!o.current) return;
|
|
5415
|
-
const g = new
|
|
5478
|
+
const g = new Hi({
|
|
5416
5479
|
target: o.current,
|
|
5417
5480
|
initialContent: u.current,
|
|
5418
5481
|
onChange: (x) => {
|
|
@@ -5449,17 +5512,17 @@ const Si = _e(
|
|
|
5449
5512
|
if (m.current === null) return;
|
|
5450
5513
|
const E = w.relatedTarget;
|
|
5451
5514
|
if (E && g.contains(E)) return;
|
|
5452
|
-
const
|
|
5453
|
-
m.current = null, u.current =
|
|
5515
|
+
const I = m.current;
|
|
5516
|
+
m.current = null, u.current = I, (H = c.current) == null || H.setContent(I);
|
|
5454
5517
|
};
|
|
5455
5518
|
return g.addEventListener("focusout", x), () => g.removeEventListener("focusout", x);
|
|
5456
5519
|
}, []), ot(() => {
|
|
5457
5520
|
var g;
|
|
5458
5521
|
l.language && ((g = c.current) == null || g.setLanguage(l.language));
|
|
5459
|
-
}, [l.language]), /* @__PURE__ */
|
|
5522
|
+
}, [l.language]), /* @__PURE__ */ Ve.jsx("div", { ref: o, className: s, style: n });
|
|
5460
5523
|
}
|
|
5461
5524
|
);
|
|
5462
|
-
|
|
5525
|
+
Ai.displayName = "FableEditor";
|
|
5463
5526
|
export {
|
|
5464
|
-
|
|
5527
|
+
Ai as FableEditor
|
|
5465
5528
|
};
|