@yungu-fed/rich-text-editor 0.1.11 → 0.1.12
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/index.js +717 -596
- package/dist/index.mjs +497 -406
- package/dist/rich-text-editor/primitives/slateRuntime.d.ts.map +1 -1
- package/dist/rich-text-editor/primitives/slateValueSync.d.ts +11 -0
- package/dist/rich-text-editor/primitives/slateValueSync.d.ts.map +1 -0
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -18150,18 +18150,131 @@ function Wv(e) {
|
|
|
18150
18150
|
}));
|
|
18151
18151
|
};
|
|
18152
18152
|
}
|
|
18153
|
-
|
|
18153
|
+
var Gv = new WeakMap();
|
|
18154
|
+
function Kv(e) {
|
|
18155
|
+
return JSON.stringify(e, function (e, t) {
|
|
18156
|
+
return !t || _typeof(t) != "object" || Array.isArray(t) ? t : Object.entries(t).sort(function (_ref168, _ref169) {
|
|
18157
|
+
var _ref170 = _slicedToArray(_ref168, 1),
|
|
18158
|
+
e = _ref170[0];
|
|
18159
|
+
var _ref171 = _slicedToArray(_ref169, 1),
|
|
18160
|
+
t = _ref171[0];
|
|
18161
|
+
return e.localeCompare(t);
|
|
18162
|
+
}).reduce(function (e, _ref172) {
|
|
18163
|
+
var _ref173 = _slicedToArray(_ref172, 2),
|
|
18164
|
+
t = _ref173[0],
|
|
18165
|
+
n = _ref173[1];
|
|
18166
|
+
return S(S({}, e), {}, _defineProperty({}, t, n));
|
|
18167
|
+
}, {});
|
|
18168
|
+
});
|
|
18169
|
+
}
|
|
18170
|
+
function qv(e) {
|
|
18171
|
+
var t = Gv.get(e);
|
|
18172
|
+
return t || (t = Jv(e), Gv.set(e, t)), t;
|
|
18173
|
+
}
|
|
18174
|
+
function Jv(e) {
|
|
18175
|
+
var t = 0,
|
|
18176
|
+
n = 0,
|
|
18177
|
+
r = 0,
|
|
18178
|
+
i = 0,
|
|
18179
|
+
a = "",
|
|
18180
|
+
o,
|
|
18181
|
+
s,
|
|
18182
|
+
c = !1,
|
|
18183
|
+
l = 0,
|
|
18184
|
+
u,
|
|
18185
|
+
d = e.apply;
|
|
18186
|
+
e.apply = function (e) {
|
|
18187
|
+
n += 1;
|
|
18188
|
+
try {
|
|
18189
|
+
d(e);
|
|
18190
|
+
} finally {
|
|
18191
|
+
--n;
|
|
18192
|
+
}
|
|
18193
|
+
t === 0 && n === 0 && e.type !== "set_selection" && (r += 1);
|
|
18194
|
+
};
|
|
18195
|
+
var f = function f(n) {
|
|
18196
|
+
t += 1;
|
|
18197
|
+
try {
|
|
18198
|
+
pa.withoutSaving(e, n);
|
|
18199
|
+
} finally {
|
|
18200
|
+
--t;
|
|
18201
|
+
}
|
|
18202
|
+
},
|
|
18203
|
+
p = function p(t) {
|
|
18204
|
+
Kv(e.children) !== Kv(t) && (i = r, f(function () {
|
|
18205
|
+
V.withoutNormalizing(e, function () {
|
|
18206
|
+
G.deselect(e);
|
|
18207
|
+
for (var _t102 = e.children.length - 1; _t102 >= 0; --_t102) G.removeNodes(e, {
|
|
18208
|
+
at: [_t102]
|
|
18209
|
+
});
|
|
18210
|
+
G.insertNodes(e, Pl(t), {
|
|
18211
|
+
at: [0]
|
|
18212
|
+
});
|
|
18213
|
+
}), V.normalize(e, {
|
|
18214
|
+
force: !0
|
|
18215
|
+
});
|
|
18216
|
+
}), e.history.undos = [], e.history.redos = [], a = Kv(e.children));
|
|
18217
|
+
};
|
|
18218
|
+
return {
|
|
18219
|
+
beginComposition: function beginComposition() {
|
|
18220
|
+
c = !0, l += 1;
|
|
18221
|
+
},
|
|
18222
|
+
endComposition: function endComposition() {
|
|
18223
|
+
var e = l;
|
|
18224
|
+
return Promise.resolve().then(function () {
|
|
18225
|
+
if (e === l && (c = !1, u)) {
|
|
18226
|
+
var _e54 = u;
|
|
18227
|
+
u = void 0, p(_e54);
|
|
18228
|
+
}
|
|
18229
|
+
});
|
|
18230
|
+
},
|
|
18231
|
+
initialize: function initialize() {
|
|
18232
|
+
f(function () {
|
|
18233
|
+
return V.normalize(e, {
|
|
18234
|
+
force: !0
|
|
18235
|
+
});
|
|
18236
|
+
}), a = Kv(e.children);
|
|
18237
|
+
},
|
|
18238
|
+
publish: function publish(t) {
|
|
18239
|
+
if (r === i) return;
|
|
18240
|
+
i = r;
|
|
18241
|
+
var n = Fl(e.children),
|
|
18242
|
+
o = Kv(n);
|
|
18243
|
+
o !== a && (a = o, s = o, t(n));
|
|
18244
|
+
},
|
|
18245
|
+
synchronize: function synchronize(e, t) {
|
|
18246
|
+
if (!e) {
|
|
18247
|
+
o = void 0;
|
|
18248
|
+
return;
|
|
18249
|
+
}
|
|
18250
|
+
var n = Kv(e);
|
|
18251
|
+
if (n === o) return;
|
|
18252
|
+
o = n;
|
|
18253
|
+
var r = t(e);
|
|
18254
|
+
if (Kv(r) === s) {
|
|
18255
|
+
s = void 0, u = void 0;
|
|
18256
|
+
return;
|
|
18257
|
+
}
|
|
18258
|
+
if (s = void 0, c) {
|
|
18259
|
+
u = r;
|
|
18260
|
+
return;
|
|
18261
|
+
}
|
|
18262
|
+
p(r);
|
|
18263
|
+
}
|
|
18264
|
+
};
|
|
18265
|
+
}
|
|
18266
|
+
function Yv(e) {
|
|
18154
18267
|
var t = (0, f.useMemo)(function () {
|
|
18155
18268
|
return Op(e);
|
|
18156
18269
|
}, [e]);
|
|
18157
18270
|
return {
|
|
18158
18271
|
editor: (0, f.useMemo)(function () {
|
|
18159
|
-
return
|
|
18272
|
+
return Xv(ma(Tl(la())), t);
|
|
18160
18273
|
}, [t]),
|
|
18161
18274
|
registry: t
|
|
18162
18275
|
};
|
|
18163
18276
|
}
|
|
18164
|
-
function
|
|
18277
|
+
function Xv(e, t) {
|
|
18165
18278
|
var n = e.addMark,
|
|
18166
18279
|
r = e.deleteBackward,
|
|
18167
18280
|
i = e.deleteForward,
|
|
@@ -18176,75 +18289,75 @@ function Kv(e, t) {
|
|
|
18176
18289
|
p = e.removeMark;
|
|
18177
18290
|
return e.isInline = function (e) {
|
|
18178
18291
|
var n;
|
|
18179
|
-
return (n =
|
|
18292
|
+
return (n = Zv(t, e, "inline")) == null ? l(e) : n;
|
|
18180
18293
|
}, e.isVoid = function (e) {
|
|
18181
18294
|
var n;
|
|
18182
|
-
return (n =
|
|
18295
|
+
return (n = Zv(t, e, "void")) == null ? u(e) : n;
|
|
18183
18296
|
}, e.markableVoid = function (e) {
|
|
18184
18297
|
var n;
|
|
18185
|
-
return (n =
|
|
18298
|
+
return (n = Zv(t, e, "markableVoid")) == null ? d(e) : n;
|
|
18186
18299
|
}, e.normalizeNode = function (n) {
|
|
18187
|
-
|
|
18300
|
+
$v(e, t, n) || f(n);
|
|
18188
18301
|
}, e.insertText = function (n) {
|
|
18189
|
-
|
|
18302
|
+
ty(e, t, function (e) {
|
|
18190
18303
|
var t, r;
|
|
18191
18304
|
return (t = e.definition.behavior) == null || (r = t.onBeforeInputText) == null ? void 0 : r.call(t, S(S({}, e.action), {}, {
|
|
18192
18305
|
text: n
|
|
18193
18306
|
}));
|
|
18194
18307
|
}) || c(n);
|
|
18195
18308
|
}, e.insertData = function (n) {
|
|
18196
|
-
|
|
18309
|
+
ty(e, t, function (e) {
|
|
18197
18310
|
var t, r;
|
|
18198
18311
|
return (t = e.definition.behavior) == null || (r = t.onInsertData) == null ? void 0 : r.call(t, S(S({}, e.action), {}, {
|
|
18199
18312
|
data: n
|
|
18200
18313
|
}));
|
|
18201
18314
|
}) || s(n);
|
|
18202
18315
|
}, e.insertBreak = function () {
|
|
18203
|
-
|
|
18316
|
+
ty(e, t, function (e) {
|
|
18204
18317
|
var t, n;
|
|
18205
18318
|
return (t = e.definition.behavior) == null || (n = t.onBreak) == null ? void 0 : n.call(t, e.action);
|
|
18206
18319
|
}) || o();
|
|
18207
18320
|
}, e.deleteBackward = function (n) {
|
|
18208
|
-
|
|
18321
|
+
ny(e, t, n, "backward") || r(n);
|
|
18209
18322
|
}, e.deleteForward = function (n) {
|
|
18210
|
-
|
|
18323
|
+
ny(e, t, n, "forward") || i(n);
|
|
18211
18324
|
}, e.deleteFragment = function () {
|
|
18212
|
-
var n =
|
|
18213
|
-
if (
|
|
18214
|
-
|
|
18325
|
+
var n = sy(e, t);
|
|
18326
|
+
if (ry(e, t)) {
|
|
18327
|
+
cy(e, t, n);
|
|
18215
18328
|
return;
|
|
18216
18329
|
}
|
|
18217
|
-
a(),
|
|
18330
|
+
a(), cy(e, t, n);
|
|
18218
18331
|
}, e.addMark = function (r, i) {
|
|
18219
|
-
|
|
18332
|
+
ay(e, t, r, i) || n(r, i);
|
|
18220
18333
|
}, e.removeMark = function (n) {
|
|
18221
|
-
|
|
18334
|
+
ay(e, t, n, void 0) || p(n);
|
|
18222
18335
|
}, e;
|
|
18223
18336
|
}
|
|
18224
|
-
function
|
|
18337
|
+
function Zv(e, t, n) {
|
|
18225
18338
|
var r;
|
|
18226
18339
|
if (!Y(t)) return;
|
|
18227
18340
|
var i = (r = e.get(t.type)) == null ? void 0 : r.schema;
|
|
18228
|
-
return i ? n === "inline" ? i.inline : n === "markableVoid" ? i.markableVoid : i.void :
|
|
18341
|
+
return i ? n === "inline" ? i.inline : n === "markableVoid" ? i.markableVoid : i.void : Qv(e, t, n);
|
|
18229
18342
|
}
|
|
18230
|
-
function
|
|
18343
|
+
function Qv(e, t, n) {
|
|
18231
18344
|
var r;
|
|
18232
18345
|
if (!Y(t)) return;
|
|
18233
18346
|
var i = (r = e.get(t.type)) == null ? void 0 : r.object;
|
|
18234
18347
|
if (i) return n === "inline" ? i.inline : n === "markableVoid" ? i.markable : !0;
|
|
18235
18348
|
}
|
|
18236
|
-
function
|
|
18349
|
+
function $v(e, t, n) {
|
|
18237
18350
|
var r, i, a;
|
|
18238
18351
|
var _n57 = _slicedToArray(n, 2),
|
|
18239
18352
|
o = _n57[0],
|
|
18240
18353
|
s = _n57[1];
|
|
18241
|
-
return Y(o) ?
|
|
18354
|
+
return Y(o) ? ey(e, t, o, s) ? !0 : (r = (i = t.get(o.type)) == null || (a = i.normalize) == null ? void 0 : a.call(i, {
|
|
18242
18355
|
editor: e,
|
|
18243
18356
|
element: o,
|
|
18244
18357
|
elementPath: s
|
|
18245
18358
|
})) == null ? !1 : r : !1;
|
|
18246
18359
|
}
|
|
18247
|
-
function
|
|
18360
|
+
function ey(e, t, n, r) {
|
|
18248
18361
|
var i;
|
|
18249
18362
|
return !((i = t.get(n.type)) != null && i.object) || n.children.length === 1 && U.isText(n.children[0]) && n.children[0].text === "" ? !1 : (G.setNodes(e, {
|
|
18250
18363
|
children: [{
|
|
@@ -18254,8 +18367,8 @@ function Xv(e, t, n, r) {
|
|
|
18254
18367
|
at: r
|
|
18255
18368
|
}), !0);
|
|
18256
18369
|
}
|
|
18257
|
-
function
|
|
18258
|
-
var r =
|
|
18370
|
+
function ty(e, t, n) {
|
|
18371
|
+
var r = oy(e);
|
|
18259
18372
|
if (r.length === 0) return !1;
|
|
18260
18373
|
var _iterator62 = _createForOfIteratorHelper(r),
|
|
18261
18374
|
_step62;
|
|
@@ -18281,8 +18394,8 @@ function Zv(e, t, n) {
|
|
|
18281
18394
|
}
|
|
18282
18395
|
return !1;
|
|
18283
18396
|
}
|
|
18284
|
-
function
|
|
18285
|
-
return
|
|
18397
|
+
function ny(e, t, n, r) {
|
|
18398
|
+
return ty(e, t, function (e) {
|
|
18286
18399
|
var t, i, a, o;
|
|
18287
18400
|
var s = S(S({}, e.action), {}, {
|
|
18288
18401
|
unit: n
|
|
@@ -18290,22 +18403,22 @@ function Qv(e, t, n, r) {
|
|
|
18290
18403
|
return r === "backward" ? (t = e.definition.behavior) == null || (i = t.onDeleteBackward) == null ? void 0 : i.call(t, s) : (a = e.definition.behavior) == null || (o = a.onDeleteForward) == null ? void 0 : o.call(a, s);
|
|
18291
18404
|
});
|
|
18292
18405
|
}
|
|
18293
|
-
function
|
|
18294
|
-
return
|
|
18406
|
+
function ry(e, t) {
|
|
18407
|
+
return ty(e, t, function (e) {
|
|
18295
18408
|
var t, n;
|
|
18296
18409
|
return (t = e.definition.behavior) == null || (n = t.onDeleteFragment) == null ? void 0 : n.call(t, e.action);
|
|
18297
18410
|
});
|
|
18298
18411
|
}
|
|
18299
|
-
function
|
|
18300
|
-
return
|
|
18412
|
+
function iy(e, t, n) {
|
|
18413
|
+
return ty(e, t, function (e) {
|
|
18301
18414
|
var t, r;
|
|
18302
18415
|
return (t = e.definition.behavior) == null || (r = t.onDeleteSelection) == null ? void 0 : r.call(t, S(S({}, e.action), {}, {
|
|
18303
18416
|
key: n
|
|
18304
18417
|
}));
|
|
18305
18418
|
});
|
|
18306
18419
|
}
|
|
18307
|
-
function
|
|
18308
|
-
return
|
|
18420
|
+
function ay(e, t, n, r) {
|
|
18421
|
+
return ty(e, t, function (e) {
|
|
18309
18422
|
var t, i;
|
|
18310
18423
|
return (t = e.definition.behavior) == null || (i = t.onMark) == null ? void 0 : i.call(t, S(S({}, e.action), {}, {
|
|
18311
18424
|
key: n,
|
|
@@ -18313,7 +18426,7 @@ function ty(e, t, n, r) {
|
|
|
18313
18426
|
}));
|
|
18314
18427
|
});
|
|
18315
18428
|
}
|
|
18316
|
-
function
|
|
18429
|
+
function oy(e) {
|
|
18317
18430
|
return e.selection ? Array.from(V.nodes(e, {
|
|
18318
18431
|
at: V.unhangRange(e, e.selection),
|
|
18319
18432
|
match: function match(e) {
|
|
@@ -18325,87 +18438,82 @@ function ny(e) {
|
|
|
18325
18438
|
return Y(e[0]);
|
|
18326
18439
|
}).reverse() : [];
|
|
18327
18440
|
}
|
|
18328
|
-
function
|
|
18441
|
+
function sy(e, t) {
|
|
18329
18442
|
return t.clearOnSelectionDeleteMarkKeys.length > 0 && !!(e.selection && !L.isCollapsed(e.selection));
|
|
18330
18443
|
}
|
|
18331
|
-
function
|
|
18444
|
+
function cy(e, t, n) {
|
|
18332
18445
|
n && t.clearOnSelectionDeleteMarkKeys.forEach(function (t) {
|
|
18333
18446
|
e.removeMark(t);
|
|
18334
18447
|
});
|
|
18335
18448
|
}
|
|
18336
|
-
function
|
|
18337
|
-
var e =
|
|
18338
|
-
t =
|
|
18339
|
-
n =
|
|
18340
|
-
r =
|
|
18341
|
-
i =
|
|
18342
|
-
a =
|
|
18343
|
-
o =
|
|
18344
|
-
s =
|
|
18345
|
-
c =
|
|
18346
|
-
l =
|
|
18347
|
-
u =
|
|
18348
|
-
d =
|
|
18349
|
-
m =
|
|
18350
|
-
h =
|
|
18351
|
-
g =
|
|
18352
|
-
_ =
|
|
18353
|
-
v =
|
|
18354
|
-
y =
|
|
18355
|
-
var b = function
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18360
|
-
|
|
18449
|
+
function ly(_ref174) {
|
|
18450
|
+
var e = _ref174.apiRef,
|
|
18451
|
+
t = _ref174.ariaLabel,
|
|
18452
|
+
n = _ref174.children,
|
|
18453
|
+
r = _ref174.className,
|
|
18454
|
+
i = _ref174.editor,
|
|
18455
|
+
a = _ref174.initialValue,
|
|
18456
|
+
o = _ref174.isFocused,
|
|
18457
|
+
s = _ref174.onBlurEditor,
|
|
18458
|
+
c = _ref174.onChange,
|
|
18459
|
+
l = _ref174.onCommandTargetActivate,
|
|
18460
|
+
u = _ref174.onFocusEditor,
|
|
18461
|
+
d = _ref174.onPasteHtml,
|
|
18462
|
+
m = _ref174.onPasteImageFiles,
|
|
18463
|
+
h = _ref174.onPasteImageSources,
|
|
18464
|
+
g = _ref174.onToolbarStateChange,
|
|
18465
|
+
_ = _ref174.placeholder,
|
|
18466
|
+
v = _ref174.registry,
|
|
18467
|
+
y = _ref174.value;
|
|
18468
|
+
var b = (0, f.useMemo)(function () {
|
|
18469
|
+
return qv(i);
|
|
18470
|
+
}, [i]),
|
|
18471
|
+
x = function x(e) {
|
|
18472
|
+
if (Xl(e.target) || Jl(i, e) || !dy(e.key)) return;
|
|
18473
|
+
var t = sy(i, v);
|
|
18474
|
+
iy(i, v, e.key) && (e.preventDefault(), cy(i, v, t));
|
|
18475
|
+
},
|
|
18476
|
+
S = (0, f.useMemo)(function () {
|
|
18361
18477
|
return Uv(v);
|
|
18362
18478
|
}, [v]),
|
|
18363
|
-
|
|
18479
|
+
C = (0, f.useMemo)(function () {
|
|
18364
18480
|
return Wv(v);
|
|
18365
18481
|
}, [v]),
|
|
18366
|
-
|
|
18482
|
+
w = (0, f.useMemo)(function () {
|
|
18367
18483
|
return Pl(a);
|
|
18368
18484
|
}, [a]),
|
|
18369
|
-
w = (0, f.useCallback)(function (e) {
|
|
18370
|
-
e.defaultPrevented || (l(), !yy(i) && !_y(i, e) && gy(i), g());
|
|
18371
|
-
}, [i, l, g]),
|
|
18372
18485
|
T = (0, f.useCallback)(function (e) {
|
|
18373
|
-
e.defaultPrevented || (
|
|
18374
|
-
}, [i,
|
|
18486
|
+
e.defaultPrevented || (l(), !wy(i) && !Sy(i, e) && xy(i), g());
|
|
18487
|
+
}, [i, l, g]),
|
|
18375
18488
|
E = (0, f.useCallback)(function (e) {
|
|
18489
|
+
e.defaultPrevented || (u(), xy(i));
|
|
18490
|
+
}, [i, u]),
|
|
18491
|
+
D = (0, f.useCallback)(function (e) {
|
|
18376
18492
|
e.defaultPrevented || l();
|
|
18377
18493
|
}, [l]),
|
|
18378
|
-
D = (0, f.useCallback)(function (e) {
|
|
18379
|
-
e.defaultPrevented || vy(i) && g();
|
|
18380
|
-
}, [i, g]),
|
|
18381
18494
|
O = (0, f.useCallback)(function (e) {
|
|
18382
|
-
|
|
18495
|
+
e.defaultPrevented || Cy(i) && g();
|
|
18496
|
+
}, [i, g]),
|
|
18497
|
+
k = (0, f.useCallback)(function (e) {
|
|
18498
|
+
e.relatedTarget instanceof globalThis.Node && e.currentTarget.contains(e.relatedTarget) || K.findDocumentOrShadowRoot(i).activeElement !== e.currentTarget && K.blur(i);
|
|
18499
|
+
}, [i]),
|
|
18500
|
+
A = (0, f.useCallback)(function (e) {
|
|
18501
|
+
Xl(e.target) || e.defaultPrevented || fy({
|
|
18383
18502
|
editor: i,
|
|
18384
18503
|
event: e,
|
|
18385
|
-
onChange: c,
|
|
18386
18504
|
onPasteHtml: d,
|
|
18387
18505
|
onPasteImageFiles: m,
|
|
18388
18506
|
onPasteImageSources: h,
|
|
18389
18507
|
registry: v
|
|
18390
18508
|
});
|
|
18391
|
-
}, [i,
|
|
18392
|
-
return (0, f.
|
|
18393
|
-
|
|
18394
|
-
|
|
18509
|
+
}, [i, d, m, h, v]);
|
|
18510
|
+
return (0, f.useLayoutEffect)(function () {
|
|
18511
|
+
b.initialize();
|
|
18512
|
+
}, [b]), (0, f.useLayoutEffect)(function () {
|
|
18513
|
+
b.synchronize(y, function (e) {
|
|
18514
|
+
return uy(e, v);
|
|
18395
18515
|
});
|
|
18396
|
-
}, [
|
|
18397
|
-
!y || JSON.stringify(i.children) === JSON.stringify(y) || (V.withoutNormalizing(i, function () {
|
|
18398
|
-
G.deselect(i);
|
|
18399
|
-
for (var _e54 = i.children.length - 1; _e54 >= 0; --_e54) G.removeNodes(i, {
|
|
18400
|
-
at: [_e54]
|
|
18401
|
-
});
|
|
18402
|
-
G.insertNodes(i, Pl(y), {
|
|
18403
|
-
at: [0]
|
|
18404
|
-
});
|
|
18405
|
-
}), V.normalize(i, {
|
|
18406
|
-
force: !0
|
|
18407
|
-
}));
|
|
18408
|
-
}, [i, y]), (0, f.useImperativeHandle)(e, function () {
|
|
18516
|
+
}, [v, y, b]), (0, f.useImperativeHandle)(e, function () {
|
|
18409
18517
|
return {
|
|
18410
18518
|
blur: function blur() {
|
|
18411
18519
|
K.blur(i), s();
|
|
@@ -18418,106 +18526,119 @@ function ay(_ref168) {
|
|
|
18418
18526
|
},
|
|
18419
18527
|
isFocused: o,
|
|
18420
18528
|
insertNode: function insertNode(e, t) {
|
|
18421
|
-
K.focus(i), u(),
|
|
18529
|
+
K.focus(i), u(), xy(i), by(i, v, bd(e, t));
|
|
18422
18530
|
},
|
|
18423
18531
|
runCommand: function runCommand(e) {
|
|
18424
|
-
var t =
|
|
18425
|
-
K.focus(i), u(), t ||
|
|
18532
|
+
var t = Cy(i);
|
|
18533
|
+
K.focus(i), u(), t || xy(i), by(i, v, e);
|
|
18426
18534
|
}
|
|
18427
18535
|
};
|
|
18428
18536
|
}, [i, o, s, u, v]), (0, p.jsxs)(yl, {
|
|
18429
18537
|
editor: i,
|
|
18430
|
-
initialValue:
|
|
18538
|
+
initialValue: w,
|
|
18431
18539
|
onChange: function onChange() {
|
|
18432
|
-
|
|
18540
|
+
b.publish(c), g();
|
|
18433
18541
|
},
|
|
18434
18542
|
children: [n, (0, p.jsx)(sl, {
|
|
18435
18543
|
"aria-label": t == null ? _ : t,
|
|
18436
18544
|
className: r,
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
|
|
18545
|
+
onBlurCapture: k,
|
|
18546
|
+
onClick: T,
|
|
18547
|
+
onCompositionStart: function onCompositionStart() {
|
|
18548
|
+
return b.beginComposition();
|
|
18549
|
+
},
|
|
18550
|
+
onCompositionUpdate: function onCompositionUpdate() {
|
|
18551
|
+
return b.beginComposition();
|
|
18552
|
+
},
|
|
18553
|
+
onCompositionEnd: function onCompositionEnd() {
|
|
18554
|
+
b.endComposition();
|
|
18555
|
+
},
|
|
18556
|
+
onFocus: E,
|
|
18557
|
+
onKeyDownCapture: x,
|
|
18558
|
+
onMouseDown: D,
|
|
18559
|
+
onMouseUp: O,
|
|
18560
|
+
onPasteCapture: A,
|
|
18443
18561
|
onPaste: function onPaste(e) {
|
|
18444
18562
|
return e.isDefaultPrevented();
|
|
18445
18563
|
},
|
|
18446
18564
|
placeholder: _,
|
|
18447
18565
|
decorate: cu,
|
|
18448
|
-
renderElement:
|
|
18449
|
-
renderLeaf:
|
|
18566
|
+
renderElement: S,
|
|
18567
|
+
renderLeaf: C,
|
|
18450
18568
|
style: {
|
|
18451
18569
|
minHeight: "var(--rte-content-min-height, 8rem)"
|
|
18452
18570
|
}
|
|
18453
18571
|
})]
|
|
18454
18572
|
});
|
|
18455
18573
|
}
|
|
18456
|
-
function
|
|
18574
|
+
function uy(e, t) {
|
|
18575
|
+
var n = Xv(ma(Tl(la())), t);
|
|
18576
|
+
return n.children = e.length ? Pl(e) : [t.createDefaultElement()], V.normalize(n, {
|
|
18577
|
+
force: !0
|
|
18578
|
+
}), Fl(n.children);
|
|
18579
|
+
}
|
|
18580
|
+
function dy(e) {
|
|
18457
18581
|
return e === "Backspace" || e === "Delete";
|
|
18458
18582
|
}
|
|
18459
|
-
function
|
|
18460
|
-
var e =
|
|
18461
|
-
t =
|
|
18462
|
-
n =
|
|
18463
|
-
r =
|
|
18464
|
-
i =
|
|
18465
|
-
a =
|
|
18466
|
-
o = _ref169.registry;
|
|
18583
|
+
function fy(_ref175) {
|
|
18584
|
+
var e = _ref175.editor,
|
|
18585
|
+
t = _ref175.event,
|
|
18586
|
+
n = _ref175.onPasteHtml,
|
|
18587
|
+
r = _ref175.onPasteImageFiles,
|
|
18588
|
+
i = _ref175.onPasteImageSources,
|
|
18589
|
+
a = _ref175.registry;
|
|
18467
18590
|
if (Gl(e)) {
|
|
18468
18591
|
t.preventDefault(), e.insertText(t.clipboardData.getData("text/plain"));
|
|
18469
18592
|
return;
|
|
18470
18593
|
}
|
|
18471
|
-
var
|
|
18472
|
-
if (
|
|
18473
|
-
if (!
|
|
18474
|
-
t.preventDefault(),
|
|
18594
|
+
var o = _y(t.clipboardData);
|
|
18595
|
+
if (o.length > 0) {
|
|
18596
|
+
if (!r && !i && !n) return;
|
|
18597
|
+
t.preventDefault(), r == null || r(o);
|
|
18475
18598
|
return;
|
|
18476
18599
|
}
|
|
18477
|
-
var
|
|
18478
|
-
|
|
18600
|
+
var s = py(t.clipboardData);
|
|
18601
|
+
my({
|
|
18479
18602
|
editor: e,
|
|
18480
18603
|
event: t,
|
|
18481
|
-
html:
|
|
18482
|
-
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
}) || uy(t, c, a);
|
|
18604
|
+
html: s,
|
|
18605
|
+
onPasteHtml: n,
|
|
18606
|
+
registry: a
|
|
18607
|
+
}) || hy(t, s, i);
|
|
18486
18608
|
}
|
|
18487
|
-
function
|
|
18609
|
+
function py(e) {
|
|
18488
18610
|
var t;
|
|
18489
18611
|
var n = e.getData("text/html");
|
|
18490
|
-
return n.trim() ||
|
|
18491
|
-
}
|
|
18492
|
-
function
|
|
18493
|
-
var e =
|
|
18494
|
-
t =
|
|
18495
|
-
n =
|
|
18496
|
-
r =
|
|
18497
|
-
i =
|
|
18498
|
-
|
|
18499
|
-
if (!n.trim() || dy(t.clipboardData) || !i && t.clipboardData.getData("text/html").trim()) return !1;
|
|
18612
|
+
return n.trim() || gy(e) ? n : (t = Bv(e.getData("text/plain"))) == null ? "" : t;
|
|
18613
|
+
}
|
|
18614
|
+
function my(_ref176) {
|
|
18615
|
+
var e = _ref176.editor,
|
|
18616
|
+
t = _ref176.event,
|
|
18617
|
+
n = _ref176.html,
|
|
18618
|
+
r = _ref176.onPasteHtml,
|
|
18619
|
+
i = _ref176.registry;
|
|
18620
|
+
if (!n.trim() || gy(t.clipboardData) || !r && t.clipboardData.getData("text/html").trim()) return !1;
|
|
18500
18621
|
t.preventDefault();
|
|
18501
|
-
var
|
|
18502
|
-
|
|
18503
|
-
return Promise.resolve(
|
|
18504
|
-
markdownHtml:
|
|
18622
|
+
var a = e.selection ? V.rangeRef(e, e.selection) : null,
|
|
18623
|
+
o = t.clipboardData.getData("text/html").trim() ? Bv(t.clipboardData.getData("text/plain")) : null;
|
|
18624
|
+
return Promise.resolve(r ? r(n, {
|
|
18625
|
+
markdownHtml: o
|
|
18505
18626
|
}) : n).then(function (t) {
|
|
18506
|
-
var n =
|
|
18507
|
-
t != null && t.trim() && (n && G.select(e, n), G.insertFragment(e, Xp(t,
|
|
18627
|
+
var n = a == null ? void 0 : a.unref();
|
|
18628
|
+
t != null && t.trim() && (n && G.select(e, n), G.insertFragment(e, Xp(t, i)), K.focus(e));
|
|
18508
18629
|
}).catch(function () {
|
|
18509
|
-
|
|
18630
|
+
a == null || a.unref();
|
|
18510
18631
|
}), !0;
|
|
18511
18632
|
}
|
|
18512
|
-
function
|
|
18513
|
-
var r =
|
|
18633
|
+
function hy(e, t, n) {
|
|
18634
|
+
var r = vy(t);
|
|
18514
18635
|
r.length > 0 && (e.preventDefault(), n == null || n(r));
|
|
18515
18636
|
}
|
|
18516
|
-
function
|
|
18637
|
+
function gy(e) {
|
|
18517
18638
|
var t;
|
|
18518
18639
|
return Array.from((t = e.types) == null ? [] : t).includes("application/x-slate-fragment") || e.getData("application/x-slate-fragment").length > 0 || e.getData("text/html").includes("data-slate-fragment");
|
|
18519
18640
|
}
|
|
18520
|
-
function
|
|
18641
|
+
function _y(e) {
|
|
18521
18642
|
var t;
|
|
18522
18643
|
var n = [],
|
|
18523
18644
|
r = new Set(),
|
|
@@ -18534,7 +18655,7 @@ function fy(e) {
|
|
|
18534
18655
|
}
|
|
18535
18656
|
return n;
|
|
18536
18657
|
}
|
|
18537
|
-
function
|
|
18658
|
+
function vy(e) {
|
|
18538
18659
|
if (!e.trim() || (typeof DOMParser === "undefined" ? "undefined" : _typeof(DOMParser)) > "u") return [];
|
|
18539
18660
|
var t = new DOMParser().parseFromString("<!doctype html><body>".concat(e, "</body>"), "text/html");
|
|
18540
18661
|
return Array.from(t.body.querySelectorAll("img")).map(function (e) {
|
|
@@ -18544,22 +18665,22 @@ function py(e) {
|
|
|
18544
18665
|
return e.length > 0;
|
|
18545
18666
|
});
|
|
18546
18667
|
}
|
|
18547
|
-
function
|
|
18668
|
+
function yy(e, t) {
|
|
18548
18669
|
return {
|
|
18549
18670
|
editor: e,
|
|
18550
18671
|
getToolbarState: function getToolbarState() {
|
|
18551
|
-
return
|
|
18672
|
+
return ky(e, t);
|
|
18552
18673
|
},
|
|
18553
18674
|
getValue: function getValue() {
|
|
18554
18675
|
return Fl(e.children);
|
|
18555
18676
|
},
|
|
18556
18677
|
runCommand: function runCommand(n) {
|
|
18557
|
-
var r =
|
|
18558
|
-
K.focus(e), r ||
|
|
18678
|
+
var r = Cy(e);
|
|
18679
|
+
K.focus(e), r || xy(e), by(e, t, n);
|
|
18559
18680
|
}
|
|
18560
18681
|
};
|
|
18561
18682
|
}
|
|
18562
|
-
function
|
|
18683
|
+
function by(e, t, n) {
|
|
18563
18684
|
var r = t.getCommand(n.command);
|
|
18564
18685
|
r && r.run({
|
|
18565
18686
|
command: n,
|
|
@@ -18567,26 +18688,26 @@ function hy(e, t, n) {
|
|
|
18567
18688
|
registry: t
|
|
18568
18689
|
});
|
|
18569
18690
|
}
|
|
18570
|
-
function
|
|
18691
|
+
function xy(e) {
|
|
18571
18692
|
e.selection || G.select(e, V.end(e, []));
|
|
18572
18693
|
}
|
|
18573
|
-
function
|
|
18694
|
+
function Sy(e, t) {
|
|
18574
18695
|
try {
|
|
18575
18696
|
var n = K.findEventRange(e, t.nativeEvent);
|
|
18576
18697
|
return e.selection && L.equals(e.selection, n) || G.select(e, n), !0;
|
|
18577
18698
|
} catch (t) {
|
|
18578
|
-
return
|
|
18699
|
+
return Cy(e);
|
|
18579
18700
|
}
|
|
18580
18701
|
}
|
|
18581
|
-
function
|
|
18582
|
-
var t =
|
|
18583
|
-
return t ?
|
|
18702
|
+
function Cy(e) {
|
|
18703
|
+
var t = Ey(e);
|
|
18704
|
+
return t ? Ty(e, t) : !1;
|
|
18584
18705
|
}
|
|
18585
|
-
function
|
|
18586
|
-
var t =
|
|
18587
|
-
return !t || t.isCollapsed ? !1 :
|
|
18706
|
+
function wy(e) {
|
|
18707
|
+
var t = Ey(e);
|
|
18708
|
+
return !t || t.isCollapsed ? !1 : Ty(e, t);
|
|
18588
18709
|
}
|
|
18589
|
-
function
|
|
18710
|
+
function Ty(e, t) {
|
|
18590
18711
|
try {
|
|
18591
18712
|
var n = K.toSlateRange(e, t, {
|
|
18592
18713
|
exactMatch: !1,
|
|
@@ -18597,46 +18718,46 @@ function by(e, t) {
|
|
|
18597
18718
|
return !1;
|
|
18598
18719
|
}
|
|
18599
18720
|
}
|
|
18600
|
-
function
|
|
18721
|
+
function Ey(e) {
|
|
18601
18722
|
var t = K.findDocumentOrShadowRoot(e),
|
|
18602
18723
|
n = t instanceof Document ? t.getSelection() : t.ownerDocument.getSelection();
|
|
18603
|
-
return !n || n.rangeCount === 0 ? null :
|
|
18724
|
+
return !n || n.rangeCount === 0 ? null : Dy(e, n) ? n : null;
|
|
18604
18725
|
}
|
|
18605
|
-
function
|
|
18726
|
+
function Dy(e, t) {
|
|
18606
18727
|
var n = K.toDOMNode(e, e);
|
|
18607
|
-
return
|
|
18728
|
+
return Oy(n, t.anchorNode) && Oy(n, t.focusNode);
|
|
18608
18729
|
}
|
|
18609
|
-
function
|
|
18730
|
+
function Oy(e, t) {
|
|
18610
18731
|
return !!(t && (t === e || e.contains(t)));
|
|
18611
18732
|
}
|
|
18612
|
-
function
|
|
18733
|
+
function ky(e, t) {
|
|
18613
18734
|
return fe(t.toolbarStateReaders.reduce(function (t, n) {
|
|
18614
18735
|
return [].concat(_toConsumableArray(t), _toConsumableArray(n({
|
|
18615
18736
|
editor: e
|
|
18616
18737
|
})));
|
|
18617
18738
|
}, []));
|
|
18618
18739
|
}
|
|
18619
|
-
function
|
|
18620
|
-
var e =
|
|
18621
|
-
t =
|
|
18622
|
-
n =
|
|
18623
|
-
r =
|
|
18624
|
-
i =
|
|
18625
|
-
a =
|
|
18626
|
-
o =
|
|
18627
|
-
s =
|
|
18628
|
-
c =
|
|
18629
|
-
l =
|
|
18630
|
-
u =
|
|
18631
|
-
d =
|
|
18632
|
-
m =
|
|
18740
|
+
function Ay(_ref177) {
|
|
18741
|
+
var e = _ref177["aria-label"],
|
|
18742
|
+
t = _ref177.apiRef,
|
|
18743
|
+
n = _ref177.className,
|
|
18744
|
+
r = _ref177.editorId,
|
|
18745
|
+
i = _ref177.initialValue,
|
|
18746
|
+
a = _ref177.onChange,
|
|
18747
|
+
o = _ref177.onObjectInteraction,
|
|
18748
|
+
s = _ref177.onPasteHtml,
|
|
18749
|
+
c = _ref177.onPasteImageFiles,
|
|
18750
|
+
l = _ref177.onPasteImageSources,
|
|
18751
|
+
u = _ref177.placeholder,
|
|
18752
|
+
d = _ref177.toolbar,
|
|
18753
|
+
m = _ref177.value;
|
|
18633
18754
|
var h;
|
|
18634
18755
|
var g = Be(),
|
|
18635
|
-
|
|
18756
|
+
_ref178 = (0, f.useState)(function () {
|
|
18636
18757
|
return r == null ? "rte-editor-".concat(g) : r;
|
|
18637
18758
|
}),
|
|
18638
|
-
|
|
18639
|
-
_ =
|
|
18759
|
+
_ref179 = _slicedToArray(_ref178, 1),
|
|
18760
|
+
_ = _ref179[0],
|
|
18640
18761
|
_be = be(),
|
|
18641
18762
|
v = _be.activeEditorId,
|
|
18642
18763
|
y = _be.clearEditorFocus,
|
|
@@ -18646,14 +18767,14 @@ function Ty(_ref171) {
|
|
|
18646
18767
|
C = _be.refreshToolbarState,
|
|
18647
18768
|
w = _be.registerEditor,
|
|
18648
18769
|
T = _be.setCommandTargetEditor,
|
|
18649
|
-
|
|
18650
|
-
E =
|
|
18651
|
-
D =
|
|
18652
|
-
|
|
18653
|
-
return
|
|
18770
|
+
_Yv = Yv(S),
|
|
18771
|
+
E = _Yv.editor,
|
|
18772
|
+
D = _Yv.registry,
|
|
18773
|
+
_ref180 = (0, f.useState)(function () {
|
|
18774
|
+
return yy(E, D);
|
|
18654
18775
|
}),
|
|
18655
|
-
|
|
18656
|
-
O =
|
|
18776
|
+
_ref181 = _slicedToArray(_ref180, 1),
|
|
18777
|
+
O = _ref181[0];
|
|
18657
18778
|
(0, f.useEffect)(function () {
|
|
18658
18779
|
return w(_, O, d);
|
|
18659
18780
|
}, [w, O, _, d]);
|
|
@@ -18689,7 +18810,7 @@ function Ty(_ref171) {
|
|
|
18689
18810
|
className: Je.root,
|
|
18690
18811
|
"data-active": v === _ ? "true" : void 0,
|
|
18691
18812
|
"data-editor-id": _
|
|
18692
|
-
}, Ve, _), "children", (0, p.jsx)(
|
|
18813
|
+
}, Ve, _), "children", (0, p.jsx)(ly, {
|
|
18693
18814
|
apiRef: t,
|
|
18694
18815
|
className: F(Je.content, n),
|
|
18695
18816
|
editor: O.editor,
|
|
@@ -18710,11 +18831,11 @@ function Ty(_ref171) {
|
|
|
18710
18831
|
})))
|
|
18711
18832
|
});
|
|
18712
18833
|
}
|
|
18713
|
-
var
|
|
18714
|
-
function
|
|
18834
|
+
var jy = ["nodeType", "payload"];
|
|
18835
|
+
function My(e) {
|
|
18715
18836
|
var t = e.nodeType,
|
|
18716
18837
|
n = e.payload,
|
|
18717
|
-
r = g(e,
|
|
18838
|
+
r = g(e, jy);
|
|
18718
18839
|
return (0, p.jsx)(Ae, S({
|
|
18719
18840
|
action: {
|
|
18720
18841
|
command: id,
|
|
@@ -18725,31 +18846,31 @@ function Dy(e) {
|
|
|
18725
18846
|
payload: xd(t, n)
|
|
18726
18847
|
}, r));
|
|
18727
18848
|
}
|
|
18728
|
-
function
|
|
18729
|
-
var e =
|
|
18730
|
-
t =
|
|
18731
|
-
n =
|
|
18732
|
-
r =
|
|
18733
|
-
i =
|
|
18734
|
-
a =
|
|
18735
|
-
o =
|
|
18849
|
+
function Ny(_ref183) {
|
|
18850
|
+
var e = _ref183.children,
|
|
18851
|
+
t = _ref183.className,
|
|
18852
|
+
n = _ref183.defaultActiveEditorId,
|
|
18853
|
+
r = _ref183.id,
|
|
18854
|
+
i = _ref183.onCommand,
|
|
18855
|
+
a = _ref183.onEditorFocusChange,
|
|
18856
|
+
o = _ref183.plugins;
|
|
18736
18857
|
return (0, p.jsx)(ye, {
|
|
18737
18858
|
defaultActiveEditorId: n,
|
|
18738
18859
|
onCommand: i,
|
|
18739
18860
|
onEditorFocusChange: a,
|
|
18740
18861
|
plugins: o,
|
|
18741
18862
|
rootId: r,
|
|
18742
|
-
children: (0, p.jsx)(
|
|
18863
|
+
children: (0, p.jsx)(Py, {
|
|
18743
18864
|
className: t,
|
|
18744
18865
|
rootId: r,
|
|
18745
18866
|
children: e
|
|
18746
18867
|
})
|
|
18747
18868
|
});
|
|
18748
18869
|
}
|
|
18749
|
-
function
|
|
18750
|
-
var e =
|
|
18751
|
-
t =
|
|
18752
|
-
n =
|
|
18870
|
+
function Py(_ref184) {
|
|
18871
|
+
var e = _ref184.children,
|
|
18872
|
+
t = _ref184.className,
|
|
18873
|
+
n = _ref184.rootId;
|
|
18753
18874
|
var _be2 = be(),
|
|
18754
18875
|
r = _be2.clearEditorFocus,
|
|
18755
18876
|
i = _be2.focusEditor;
|
|
@@ -18773,13 +18894,13 @@ function ky(_ref178) {
|
|
|
18773
18894
|
children: e
|
|
18774
18895
|
});
|
|
18775
18896
|
}
|
|
18776
|
-
function
|
|
18777
|
-
var e =
|
|
18778
|
-
t =
|
|
18779
|
-
n =
|
|
18780
|
-
r =
|
|
18781
|
-
|
|
18782
|
-
i =
|
|
18897
|
+
function Fy(_ref185) {
|
|
18898
|
+
var e = _ref185["aria-label"],
|
|
18899
|
+
t = _ref185.children,
|
|
18900
|
+
n = _ref185.className,
|
|
18901
|
+
r = _ref185.defaultContent,
|
|
18902
|
+
_ref185$visibleWhen = _ref185.visibleWhen,
|
|
18903
|
+
i = _ref185$visibleWhen === void 0 ? "always" : _ref185$visibleWhen;
|
|
18783
18904
|
var _be3 = be(),
|
|
18784
18905
|
a = _be3.activeToolbar,
|
|
18785
18906
|
o = _be3.focusedEditorId,
|
|
@@ -18788,7 +18909,7 @@ function Ay(_ref179) {
|
|
|
18788
18909
|
(0, f.useEffect)(function () {
|
|
18789
18910
|
return s();
|
|
18790
18911
|
}, [s]);
|
|
18791
|
-
var l =
|
|
18912
|
+
var l = By({
|
|
18792
18913
|
activeToolbar: a,
|
|
18793
18914
|
children: t,
|
|
18794
18915
|
defaultContent: r
|
|
@@ -18797,60 +18918,60 @@ function Ay(_ref179) {
|
|
|
18797
18918
|
"aria-label": e,
|
|
18798
18919
|
hidden: c,
|
|
18799
18920
|
onMouseDownCapture: function onMouseDownCapture(e) {
|
|
18800
|
-
e.defaultPrevented ||
|
|
18921
|
+
e.defaultPrevented || Iy(e.target) || e.preventDefault();
|
|
18801
18922
|
}
|
|
18802
18923
|
}, He, "true"), "role", "toolbar"), "children", (0, p.jsx)("div", {
|
|
18803
18924
|
className: F(Se.toolbar, n),
|
|
18804
18925
|
children: l
|
|
18805
18926
|
})));
|
|
18806
18927
|
}
|
|
18807
|
-
function
|
|
18928
|
+
function Iy(e) {
|
|
18808
18929
|
return e instanceof Element && !!e.closest("input, select, textarea");
|
|
18809
18930
|
}
|
|
18810
|
-
function
|
|
18811
|
-
var e =
|
|
18931
|
+
function Ly(_ref187) {
|
|
18932
|
+
var e = _ref187.children;
|
|
18812
18933
|
return (0, p.jsx)(p.Fragment, {
|
|
18813
18934
|
children: e
|
|
18814
18935
|
});
|
|
18815
18936
|
}
|
|
18816
|
-
function
|
|
18817
|
-
var e =
|
|
18937
|
+
function Ry(_ref188) {
|
|
18938
|
+
var e = _ref188.children;
|
|
18818
18939
|
return (0, p.jsx)(p.Fragment, {
|
|
18819
18940
|
children: e
|
|
18820
18941
|
});
|
|
18821
18942
|
}
|
|
18822
|
-
function
|
|
18823
|
-
var e =
|
|
18943
|
+
function zy(_ref189) {
|
|
18944
|
+
var e = _ref189.children;
|
|
18824
18945
|
return (0, p.jsx)(p.Fragment, {
|
|
18825
18946
|
children: e
|
|
18826
18947
|
});
|
|
18827
18948
|
}
|
|
18828
|
-
function
|
|
18829
|
-
var e =
|
|
18830
|
-
t =
|
|
18831
|
-
n =
|
|
18949
|
+
function By(_ref190) {
|
|
18950
|
+
var e = _ref190.activeToolbar,
|
|
18951
|
+
t = _ref190.children,
|
|
18952
|
+
n = _ref190.defaultContent;
|
|
18832
18953
|
var r, i, a, o;
|
|
18833
|
-
var s =
|
|
18954
|
+
var s = Hy(t, Ly);
|
|
18834
18955
|
return (0, p.jsx)(p.Fragment, {
|
|
18835
|
-
children: s ? (r = (i = (a =
|
|
18956
|
+
children: s ? (r = (i = (a = Vy(s.props.children, e)) == null ? void 0 : a.props.children) == null ? (o = Hy(s.props.children, zy)) == null ? void 0 : o.props.children : i) == null ? n : r : t == null ? n : t
|
|
18836
18957
|
});
|
|
18837
18958
|
}
|
|
18838
|
-
function
|
|
18959
|
+
function Vy(e, t) {
|
|
18839
18960
|
var n;
|
|
18840
18961
|
return t ? (n = f.Children.toArray(e).find(function (e) {
|
|
18841
|
-
return (0, f.isValidElement)(e) && e.type ===
|
|
18962
|
+
return (0, f.isValidElement)(e) && e.type === Ry && e.props.value === t;
|
|
18842
18963
|
})) == null ? null : n : null;
|
|
18843
18964
|
}
|
|
18844
|
-
function
|
|
18965
|
+
function Hy(e, t) {
|
|
18845
18966
|
var n;
|
|
18846
18967
|
return (n = f.Children.toArray(e).find(function (e) {
|
|
18847
18968
|
return (0, f.isValidElement)(e) && e.type === t;
|
|
18848
18969
|
})) == null ? null : n;
|
|
18849
18970
|
}
|
|
18850
|
-
function
|
|
18851
|
-
var e =
|
|
18852
|
-
t =
|
|
18853
|
-
n =
|
|
18971
|
+
function Uy(_ref191) {
|
|
18972
|
+
var e = _ref191["aria-label"],
|
|
18973
|
+
t = _ref191.children,
|
|
18974
|
+
n = _ref191.className;
|
|
18854
18975
|
return (0, p.jsx)("div", {
|
|
18855
18976
|
"aria-label": e,
|
|
18856
18977
|
className: F(Se["toolbar-section"], n),
|
|
@@ -18858,7 +18979,7 @@ function Ry(_ref185) {
|
|
|
18858
18979
|
children: t
|
|
18859
18980
|
});
|
|
18860
18981
|
}
|
|
18861
|
-
function
|
|
18982
|
+
function Wy(e) {
|
|
18862
18983
|
var t = e.className;
|
|
18863
18984
|
return (0, p.jsx)("span", {
|
|
18864
18985
|
"aria-orientation": "vertical",
|
|
@@ -18866,44 +18987,44 @@ function zy(e) {
|
|
|
18866
18987
|
role: "separator"
|
|
18867
18988
|
});
|
|
18868
18989
|
}
|
|
18869
|
-
var
|
|
18870
|
-
|
|
18871
|
-
AlignCenterButton: je(
|
|
18872
|
-
AlignLeftButton: je(
|
|
18873
|
-
AlignRightButton: je(
|
|
18874
|
-
BoldToggle: je(
|
|
18875
|
-
BulletedListToggle: je(
|
|
18876
|
-
CodeBlockButton:
|
|
18877
|
-
CodeToggle: je(
|
|
18878
|
-
ColorSelect: ke(
|
|
18879
|
-
Case:
|
|
18880
|
-
Default:
|
|
18881
|
-
DividerButton:
|
|
18882
|
-
FontSizeSelect: ke(
|
|
18883
|
-
FormulaButton:
|
|
18884
|
-
Heading1Button: je(
|
|
18885
|
-
Heading2Button: je(
|
|
18886
|
-
Heading3Button: je(
|
|
18887
|
-
ImageButton:
|
|
18888
|
-
InsertNodeButton:
|
|
18889
|
-
ItalicToggle: je(
|
|
18890
|
-
NumberedListToggle: je(
|
|
18891
|
-
RedoButton: je(
|
|
18892
|
-
Section:
|
|
18893
|
-
Separator:
|
|
18894
|
-
StrikeToggle: je(
|
|
18895
|
-
Switch:
|
|
18896
|
-
TableButton:
|
|
18897
|
-
UnderlineToggle: je(
|
|
18898
|
-
UndoButton: je(
|
|
18990
|
+
var Gy = Op(),
|
|
18991
|
+
Ky = Object.assign(Fy, {
|
|
18992
|
+
AlignCenterButton: je(qy("alignCenter")),
|
|
18993
|
+
AlignLeftButton: je(qy("alignLeft")),
|
|
18994
|
+
AlignRightButton: je(qy("alignRight")),
|
|
18995
|
+
BoldToggle: je(qy("bold")),
|
|
18996
|
+
BulletedListToggle: je(qy("bulletedList")),
|
|
18997
|
+
CodeBlockButton: Jy(qy("codeBlock"), "code-block"),
|
|
18998
|
+
CodeToggle: je(qy("code")),
|
|
18999
|
+
ColorSelect: ke(qy("color")),
|
|
19000
|
+
Case: Ry,
|
|
19001
|
+
Default: zy,
|
|
19002
|
+
DividerButton: Jy(qy("divider"), "divider"),
|
|
19003
|
+
FontSizeSelect: ke(qy("fontSize")),
|
|
19004
|
+
FormulaButton: Jy(qy("formula"), "formula"),
|
|
19005
|
+
Heading1Button: je(qy("heading1")),
|
|
19006
|
+
Heading2Button: je(qy("heading2")),
|
|
19007
|
+
Heading3Button: je(qy("heading3")),
|
|
19008
|
+
ImageButton: Jy(qy("image"), "image"),
|
|
19009
|
+
InsertNodeButton: My,
|
|
19010
|
+
ItalicToggle: je(qy("italic")),
|
|
19011
|
+
NumberedListToggle: je(qy("numberedList")),
|
|
19012
|
+
RedoButton: je(qy("redo")),
|
|
19013
|
+
Section: Uy,
|
|
19014
|
+
Separator: Wy,
|
|
19015
|
+
StrikeToggle: je(qy("strike")),
|
|
19016
|
+
Switch: Ly,
|
|
19017
|
+
TableButton: Jy(qy("table"), "table"),
|
|
19018
|
+
UnderlineToggle: je(qy("underline")),
|
|
19019
|
+
UndoButton: je(qy("undo"))
|
|
18899
19020
|
});
|
|
18900
|
-
function
|
|
19021
|
+
function qy(e) {
|
|
18901
19022
|
var t;
|
|
18902
|
-
var n = (t =
|
|
19023
|
+
var n = (t = Gy.getToolbarAction(e)) == null ? void 0 : t.action;
|
|
18903
19024
|
if (!n) throw Error("Missing RichTextEditor toolbar action: ".concat(e, "."));
|
|
18904
19025
|
return n;
|
|
18905
19026
|
}
|
|
18906
|
-
function
|
|
19027
|
+
function Jy(e, t) {
|
|
18907
19028
|
return function (n) {
|
|
18908
19029
|
var r, i;
|
|
18909
19030
|
return (0, f.createElement)(Ae, S(S({
|
|
@@ -18915,30 +19036,30 @@ function Uy(e, t) {
|
|
|
18915
19036
|
};
|
|
18916
19037
|
}
|
|
18917
19038
|
var $ = {
|
|
18918
|
-
Editor:
|
|
18919
|
-
Root:
|
|
18920
|
-
Toolbar:
|
|
19039
|
+
Editor: Ay,
|
|
19040
|
+
Root: Ny,
|
|
19041
|
+
Toolbar: Ky
|
|
18921
19042
|
},
|
|
18922
|
-
|
|
19043
|
+
Yy = {
|
|
18923
19044
|
button: "_button_1v6qc_1",
|
|
18924
19045
|
icon: "_icon_1v6qc_21"
|
|
18925
19046
|
},
|
|
18926
|
-
|
|
18927
|
-
function
|
|
19047
|
+
Xy = ["className"];
|
|
19048
|
+
function Zy(e, t) {
|
|
18928
19049
|
return function (n) {
|
|
18929
19050
|
var r;
|
|
18930
19051
|
var i = n.className,
|
|
18931
|
-
a = g(n,
|
|
19052
|
+
a = g(n, Xy),
|
|
18932
19053
|
_Qu3 = Qu(),
|
|
18933
19054
|
o = _Qu3.messages,
|
|
18934
19055
|
s = (r = a["aria-label"]) == null ? $u(o, t) : r;
|
|
18935
19056
|
return (0, p.jsx)(e, S(S({}, a), {}, {
|
|
18936
19057
|
"aria-label": s,
|
|
18937
|
-
className: F(
|
|
19058
|
+
className: F(Yy.button, i)
|
|
18938
19059
|
}));
|
|
18939
19060
|
};
|
|
18940
19061
|
}
|
|
18941
|
-
function
|
|
19062
|
+
function Qy() {
|
|
18942
19063
|
var e = be();
|
|
18943
19064
|
return function (t) {
|
|
18944
19065
|
var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -18948,54 +19069,54 @@ function qy() {
|
|
|
18948
19069
|
}));
|
|
18949
19070
|
};
|
|
18950
19071
|
}
|
|
18951
|
-
function
|
|
19072
|
+
function $y() {
|
|
18952
19073
|
var e = be();
|
|
18953
19074
|
return function (t) {
|
|
18954
19075
|
e.dispatchCommand(bd("formula", t));
|
|
18955
19076
|
};
|
|
18956
19077
|
}
|
|
18957
|
-
function
|
|
19078
|
+
function eb(e, t) {
|
|
18958
19079
|
var n = encodeURIComponent(e);
|
|
18959
19080
|
if (_typeof(t) == "function") return t(e);
|
|
18960
19081
|
if (_typeof(t) == "string" && t.includes("{latex}")) return t.split("{latex}").join(n);
|
|
18961
|
-
var r = t ||
|
|
19082
|
+
var r = t || tb();
|
|
18962
19083
|
return "".concat(r).concat(r.includes("?") ? "&" : "?", "display=inline&mathUrl=").concat(n);
|
|
18963
19084
|
}
|
|
18964
|
-
function
|
|
19085
|
+
function tb() {
|
|
18965
19086
|
return (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" && window.location.hostname.includes("yungu.org") ? "https://ai.yungu.org/center/api/custom-services/document-render/api/math-svg" : "https://ai.daily.yungu-inc.org/center/api/custom-services/document-render/api/math-svg";
|
|
18966
19087
|
}
|
|
18967
|
-
var
|
|
18968
|
-
function
|
|
18969
|
-
var e =
|
|
18970
|
-
t =
|
|
18971
|
-
n =
|
|
18972
|
-
r =
|
|
18973
|
-
i =
|
|
18974
|
-
a =
|
|
18975
|
-
var o =
|
|
19088
|
+
var nb = (0, f.createContext)(null);
|
|
19089
|
+
function rb(_ref192) {
|
|
19090
|
+
var e = _ref192.children,
|
|
19091
|
+
t = _ref192.formulaRenderUrl,
|
|
19092
|
+
n = _ref192.onOpenFormula,
|
|
19093
|
+
r = _ref192.onOpenImageUpload,
|
|
19094
|
+
i = _ref192.runtime,
|
|
19095
|
+
a = _ref192.uploadImage;
|
|
19096
|
+
var o = ib({
|
|
18976
19097
|
formulaRenderUrl: t,
|
|
18977
19098
|
onOpenFormula: n,
|
|
18978
19099
|
onOpenImageUpload: r,
|
|
18979
19100
|
uploadImage: a
|
|
18980
19101
|
});
|
|
18981
|
-
return (0, p.jsx)(
|
|
19102
|
+
return (0, p.jsx)(nb.Provider, {
|
|
18982
19103
|
value: i == null ? o : i,
|
|
18983
19104
|
children: e
|
|
18984
19105
|
});
|
|
18985
19106
|
}
|
|
18986
|
-
function
|
|
18987
|
-
var e =
|
|
18988
|
-
t =
|
|
18989
|
-
n =
|
|
18990
|
-
r =
|
|
18991
|
-
var
|
|
19107
|
+
function ib(_ref193) {
|
|
19108
|
+
var e = _ref193.formulaRenderUrl,
|
|
19109
|
+
t = _ref193.onOpenFormula,
|
|
19110
|
+
n = _ref193.onOpenImageUpload,
|
|
19111
|
+
r = _ref193.uploadImage;
|
|
19112
|
+
var _ref194 = (0, f.useState)({
|
|
18992
19113
|
initialLatex: "",
|
|
18993
19114
|
open: !1,
|
|
18994
19115
|
updateFormula: void 0
|
|
18995
19116
|
}),
|
|
18996
|
-
|
|
18997
|
-
i =
|
|
18998
|
-
a =
|
|
19117
|
+
_ref195 = _slicedToArray(_ref194, 2),
|
|
19118
|
+
i = _ref195[0],
|
|
19119
|
+
a = _ref195[1];
|
|
18999
19120
|
return (0, f.useMemo)(function () {
|
|
19000
19121
|
return {
|
|
19001
19122
|
closeFormulaDialog: function closeFormulaDialog() {
|
|
@@ -19023,12 +19144,12 @@ function $y(_ref187) {
|
|
|
19023
19144
|
};
|
|
19024
19145
|
}, [i, e, t, n, r]);
|
|
19025
19146
|
}
|
|
19026
|
-
function
|
|
19027
|
-
var e = (0, f.useContext)(
|
|
19147
|
+
function ab() {
|
|
19148
|
+
var e = (0, f.useContext)(nb);
|
|
19028
19149
|
if (!e) throw Error("RichTextEditor media controls must be rendered inside RichTextEditor.Root.");
|
|
19029
19150
|
return e;
|
|
19030
19151
|
}
|
|
19031
|
-
var
|
|
19152
|
+
var ob = {
|
|
19032
19153
|
root: "_root_1dv0n_1",
|
|
19033
19154
|
toolbar: "_toolbar_1dv0n_18",
|
|
19034
19155
|
"toolbar-section": "_toolbar-section_1dv0n_25",
|
|
@@ -19036,7 +19157,7 @@ var tb = {
|
|
|
19036
19157
|
"content-root": "_content-root_1dv0n_35",
|
|
19037
19158
|
content: "_content_1dv0n_35"
|
|
19038
19159
|
},
|
|
19039
|
-
|
|
19160
|
+
sb = {
|
|
19040
19161
|
dialog: "_dialog_1dv6z_1",
|
|
19041
19162
|
title: "_title_1dv6z_19",
|
|
19042
19163
|
description: "_description_1dv6z_26",
|
|
@@ -19046,11 +19167,11 @@ var tb = {
|
|
|
19046
19167
|
footer: "_footer_1dv6z_79",
|
|
19047
19168
|
cancel: "_cancel_1dv6z_85"
|
|
19048
19169
|
};
|
|
19049
|
-
function
|
|
19050
|
-
var
|
|
19051
|
-
|
|
19052
|
-
e =
|
|
19053
|
-
t =
|
|
19170
|
+
function cb() {
|
|
19171
|
+
var _ref196 = (0, f.useState)(null),
|
|
19172
|
+
_ref197 = _slicedToArray(_ref196, 2),
|
|
19173
|
+
e = _ref197[0],
|
|
19174
|
+
t = _ref197[1],
|
|
19054
19175
|
n = (0, f.useRef)(null),
|
|
19055
19176
|
r = (0, f.useCallback)(function (e, r) {
|
|
19056
19177
|
return new Promise(function (i) {
|
|
@@ -19069,7 +19190,7 @@ function rb() {
|
|
|
19069
19190
|
};
|
|
19070
19191
|
}, []), {
|
|
19071
19192
|
chooseFormat: r,
|
|
19072
|
-
dialog: e ? (0, p.jsx)(
|
|
19193
|
+
dialog: e ? (0, p.jsx)(lb, {
|
|
19073
19194
|
onChoose: function onChoose(e) {
|
|
19074
19195
|
var r;
|
|
19075
19196
|
(r = n.current) == null || r.resolve(e), n.current = null, t(null);
|
|
@@ -19078,9 +19199,9 @@ function rb() {
|
|
|
19078
19199
|
}) : null
|
|
19079
19200
|
};
|
|
19080
19201
|
}
|
|
19081
|
-
function
|
|
19082
|
-
var e =
|
|
19083
|
-
t =
|
|
19202
|
+
function lb(_ref198) {
|
|
19203
|
+
var e = _ref198.onChoose,
|
|
19204
|
+
t = _ref198.pending;
|
|
19084
19205
|
var _Qu4 = Qu(),
|
|
19085
19206
|
n = _Qu4.messages,
|
|
19086
19207
|
r = (0, f.useRef)(null);
|
|
@@ -19092,22 +19213,22 @@ function ib(_ref192) {
|
|
|
19092
19213
|
};
|
|
19093
19214
|
}, []), (0, p.jsxs)("dialog", {
|
|
19094
19215
|
"aria-label": n.pasteFormatLabel,
|
|
19095
|
-
className:
|
|
19216
|
+
className: sb.dialog,
|
|
19096
19217
|
onCancel: function onCancel(t) {
|
|
19097
19218
|
t.preventDefault(), e(null);
|
|
19098
19219
|
},
|
|
19099
19220
|
ref: r,
|
|
19100
19221
|
children: [(0, p.jsx)("h2", {
|
|
19101
|
-
className:
|
|
19222
|
+
className: sb.title,
|
|
19102
19223
|
children: n.pasteFormatLabel
|
|
19103
19224
|
}), (0, p.jsx)("p", {
|
|
19104
|
-
className:
|
|
19225
|
+
className: sb.description,
|
|
19105
19226
|
children: n.pasteFormatDescription
|
|
19106
19227
|
}), (0, p.jsxs)("div", {
|
|
19107
|
-
className:
|
|
19228
|
+
className: sb.options,
|
|
19108
19229
|
children: [(0, p.jsxs)("button", {
|
|
19109
19230
|
"aria-label": n.pasteKeepOriginal,
|
|
19110
|
-
className:
|
|
19231
|
+
className: sb.option,
|
|
19111
19232
|
onClick: function onClick() {
|
|
19112
19233
|
return e(t.html);
|
|
19113
19234
|
},
|
|
@@ -19118,7 +19239,7 @@ function ib(_ref192) {
|
|
|
19118
19239
|
}), n.pasteKeepOriginal]
|
|
19119
19240
|
}), (0, p.jsxs)("button", {
|
|
19120
19241
|
"aria-label": n.pasteConvertMarkdown,
|
|
19121
|
-
className: "".concat(
|
|
19242
|
+
className: "".concat(sb.option, " ").concat(sb.markdown),
|
|
19122
19243
|
onClick: function onClick() {
|
|
19123
19244
|
return e(t.markdownHtml);
|
|
19124
19245
|
},
|
|
@@ -19129,9 +19250,9 @@ function ib(_ref192) {
|
|
|
19129
19250
|
}), n.pasteConvertMarkdown]
|
|
19130
19251
|
})]
|
|
19131
19252
|
}), (0, p.jsx)("footer", {
|
|
19132
|
-
className:
|
|
19253
|
+
className: sb.footer,
|
|
19133
19254
|
children: (0, p.jsx)("button", {
|
|
19134
|
-
className:
|
|
19255
|
+
className: sb.cancel,
|
|
19135
19256
|
onClick: function onClick() {
|
|
19136
19257
|
return e(null);
|
|
19137
19258
|
},
|
|
@@ -19141,39 +19262,39 @@ function ib(_ref192) {
|
|
|
19141
19262
|
})]
|
|
19142
19263
|
});
|
|
19143
19264
|
}
|
|
19144
|
-
var
|
|
19145
|
-
function
|
|
19265
|
+
var ub = ["className", "onPasteImageFiles", "onPasteImageSources", "onObjectInteraction", "placeholder"];
|
|
19266
|
+
function db(e) {
|
|
19146
19267
|
var t = e.className,
|
|
19147
19268
|
n = e.onPasteImageFiles,
|
|
19148
19269
|
r = e.onPasteImageSources,
|
|
19149
19270
|
i = e.onObjectInteraction,
|
|
19150
19271
|
a = e.placeholder,
|
|
19151
|
-
o = g(e,
|
|
19272
|
+
o = g(e, ub),
|
|
19152
19273
|
_Qu5 = Qu(),
|
|
19153
19274
|
s = _Qu5.messages,
|
|
19154
|
-
c =
|
|
19155
|
-
l =
|
|
19156
|
-
|
|
19157
|
-
d =
|
|
19158
|
-
f =
|
|
19275
|
+
c = ab(),
|
|
19276
|
+
l = Qy(),
|
|
19277
|
+
_cb = cb(),
|
|
19278
|
+
d = _cb.chooseFormat,
|
|
19279
|
+
f = _cb.dialog,
|
|
19159
19280
|
m = function m(e) {
|
|
19160
19281
|
i == null || i(e), e.action === "formula.edit" && c.openFormulaDialog(_typeof(e.element.latex) == "string" ? e.element.latex : "", e.updateElement);
|
|
19161
19282
|
},
|
|
19162
19283
|
h = function h(e) {
|
|
19163
|
-
n == null || n(e), c.uploadImage &&
|
|
19284
|
+
n == null || n(e), c.uploadImage && gb(e, c.uploadImage, l);
|
|
19164
19285
|
},
|
|
19165
19286
|
_ = function _(e) {
|
|
19166
19287
|
r == null || r(e), c.uploadImage && Promise.all(e.map(function (e, t) {
|
|
19167
|
-
return
|
|
19288
|
+
return _b(e, t);
|
|
19168
19289
|
})).then(function (e) {
|
|
19169
|
-
return
|
|
19290
|
+
return gb(e.filter(function (e) {
|
|
19170
19291
|
return !!e;
|
|
19171
19292
|
}), c.uploadImage, l);
|
|
19172
19293
|
});
|
|
19173
19294
|
},
|
|
19174
19295
|
v = function () {
|
|
19175
19296
|
var e = u.t(_regenerator().m(function _callee2(e, t) {
|
|
19176
|
-
var n,
|
|
19297
|
+
var n, _t103, _t104, _t105;
|
|
19177
19298
|
return _regenerator().w(function (_context12) {
|
|
19178
19299
|
while (1) switch (_context12.n) {
|
|
19179
19300
|
case 0:
|
|
@@ -19184,18 +19305,18 @@ function ob(e) {
|
|
|
19184
19305
|
_context12.n = 1;
|
|
19185
19306
|
return d(e, t.markdownHtml);
|
|
19186
19307
|
case 1:
|
|
19187
|
-
|
|
19308
|
+
_t103 = _context12.v;
|
|
19188
19309
|
_context12.n = 3;
|
|
19189
19310
|
break;
|
|
19190
19311
|
case 2:
|
|
19191
|
-
|
|
19312
|
+
_t103 = e;
|
|
19192
19313
|
case 3:
|
|
19193
|
-
n =
|
|
19314
|
+
n = _t103;
|
|
19194
19315
|
if (!(n === null)) {
|
|
19195
19316
|
_context12.n = 4;
|
|
19196
19317
|
break;
|
|
19197
19318
|
}
|
|
19198
|
-
|
|
19319
|
+
_t104 = null;
|
|
19199
19320
|
_context12.n = 8;
|
|
19200
19321
|
break;
|
|
19201
19322
|
case 4:
|
|
@@ -19204,17 +19325,17 @@ function ob(e) {
|
|
|
19204
19325
|
break;
|
|
19205
19326
|
}
|
|
19206
19327
|
_context12.n = 5;
|
|
19207
|
-
return
|
|
19328
|
+
return pb(fb(n, c.formulaRenderUrl), c.uploadImage);
|
|
19208
19329
|
case 5:
|
|
19209
|
-
|
|
19330
|
+
_t105 = _context12.v;
|
|
19210
19331
|
_context12.n = 7;
|
|
19211
19332
|
break;
|
|
19212
19333
|
case 6:
|
|
19213
|
-
|
|
19334
|
+
_t105 = fb(n, c.formulaRenderUrl);
|
|
19214
19335
|
case 7:
|
|
19215
|
-
|
|
19336
|
+
_t104 = _t105;
|
|
19216
19337
|
case 8:
|
|
19217
|
-
return _context12.a(2,
|
|
19338
|
+
return _context12.a(2, _t104);
|
|
19218
19339
|
}
|
|
19219
19340
|
}, _callee2);
|
|
19220
19341
|
}));
|
|
@@ -19223,9 +19344,9 @@ function ob(e) {
|
|
|
19223
19344
|
};
|
|
19224
19345
|
}();
|
|
19225
19346
|
return (0, p.jsxs)("div", {
|
|
19226
|
-
className:
|
|
19347
|
+
className: ob["content-root"],
|
|
19227
19348
|
children: [f, (0, p.jsx)($.Editor, S(S({}, o), {}, {
|
|
19228
|
-
className: F(
|
|
19349
|
+
className: F(ob.content, t),
|
|
19229
19350
|
onObjectInteraction: m,
|
|
19230
19351
|
onPasteHtml: v,
|
|
19231
19352
|
onPasteImageFiles: h,
|
|
@@ -19234,7 +19355,7 @@ function ob(e) {
|
|
|
19234
19355
|
}))]
|
|
19235
19356
|
});
|
|
19236
19357
|
}
|
|
19237
|
-
function
|
|
19358
|
+
function fb(e, t) {
|
|
19238
19359
|
var n = new DOMParser().parseFromString(e, "text/html");
|
|
19239
19360
|
var _iterator63 = _createForOfIteratorHelper(n.querySelectorAll("[data-rte-node=\"formula\"][data-latex]")),
|
|
19240
19361
|
_step63;
|
|
@@ -19243,7 +19364,7 @@ function sb(e, t) {
|
|
|
19243
19364
|
var _e55 = _step63.value;
|
|
19244
19365
|
if (!_e55.dataset.src && !_e55.getAttribute("src")) {
|
|
19245
19366
|
var r;
|
|
19246
|
-
_e55.dataset.src =
|
|
19367
|
+
_e55.dataset.src = eb((r = _e55.dataset.latex) == null ? "" : r, t);
|
|
19247
19368
|
}
|
|
19248
19369
|
}
|
|
19249
19370
|
} catch (err) {
|
|
@@ -19253,11 +19374,11 @@ function sb(e, t) {
|
|
|
19253
19374
|
}
|
|
19254
19375
|
return n.body.innerHTML;
|
|
19255
19376
|
}
|
|
19256
|
-
function
|
|
19257
|
-
return
|
|
19377
|
+
function pb(e, t) {
|
|
19378
|
+
return mb.apply(this, arguments);
|
|
19258
19379
|
}
|
|
19259
|
-
function
|
|
19260
|
-
return
|
|
19380
|
+
function mb() {
|
|
19381
|
+
return mb = u.t(_regenerator().m(function _callee4(e, t) {
|
|
19261
19382
|
var n, r;
|
|
19262
19383
|
return _regenerator().w(function (_context14) {
|
|
19263
19384
|
while (1) switch (_context14.n) {
|
|
@@ -19269,7 +19390,7 @@ function lb() {
|
|
|
19269
19390
|
return _context14.a(2, e);
|
|
19270
19391
|
case 1:
|
|
19271
19392
|
n = new DOMParser().parseFromString("<!doctype html><body>".concat(e, "</body>"), "text/html");
|
|
19272
|
-
|
|
19393
|
+
hb(n.body);
|
|
19273
19394
|
r = Array.from(n.body.querySelectorAll("img"));
|
|
19274
19395
|
_context14.n = 2;
|
|
19275
19396
|
return Promise.all(r.map(function () {
|
|
@@ -19279,7 +19400,7 @@ function lb() {
|
|
|
19279
19400
|
while (1) switch (_context13.n) {
|
|
19280
19401
|
case 0:
|
|
19281
19402
|
_context13.n = 1;
|
|
19282
|
-
return
|
|
19403
|
+
return _b((r = e.getAttribute("src")) == null ? "" : r, n);
|
|
19283
19404
|
case 1:
|
|
19284
19405
|
i = _context13.v;
|
|
19285
19406
|
if (i) {
|
|
@@ -19316,31 +19437,31 @@ function lb() {
|
|
|
19316
19437
|
return _context14.a(2, n.body.innerHTML);
|
|
19317
19438
|
}
|
|
19318
19439
|
}, _callee4);
|
|
19319
|
-
})),
|
|
19440
|
+
})), mb.apply(this, arguments);
|
|
19320
19441
|
}
|
|
19321
|
-
function
|
|
19442
|
+
function hb(e) {
|
|
19322
19443
|
e.querySelectorAll("head,link,meta,script,style,title,xml").forEach(function (e) {
|
|
19323
19444
|
return e.remove();
|
|
19324
19445
|
});
|
|
19325
19446
|
}
|
|
19326
|
-
function
|
|
19447
|
+
function gb(e, t, n) {
|
|
19327
19448
|
t && e.forEach(function (e) {
|
|
19328
19449
|
Promise.resolve(t(e)).then(function (t) {
|
|
19329
19450
|
t && n(t, e.name);
|
|
19330
19451
|
});
|
|
19331
19452
|
});
|
|
19332
19453
|
}
|
|
19333
|
-
function
|
|
19334
|
-
return
|
|
19454
|
+
function _b(e, t) {
|
|
19455
|
+
return vb.apply(this, arguments);
|
|
19335
19456
|
}
|
|
19336
|
-
function
|
|
19337
|
-
return
|
|
19338
|
-
var n, _e56, r,
|
|
19457
|
+
function vb() {
|
|
19458
|
+
return vb = u.t(_regenerator().m(function _callee5(e, t) {
|
|
19459
|
+
var n, _e56, r, _t106;
|
|
19339
19460
|
return _regenerator().w(function (_context15) {
|
|
19340
19461
|
while (1) switch (_context15.p = _context15.n) {
|
|
19341
19462
|
case 0:
|
|
19342
|
-
n =
|
|
19343
|
-
if (!(!
|
|
19463
|
+
n = yb(e);
|
|
19464
|
+
if (!(!bb(n) || (typeof fetch === "undefined" ? "undefined" : _typeof(fetch)) != "function")) {
|
|
19344
19465
|
_context15.n = 1;
|
|
19345
19466
|
break;
|
|
19346
19467
|
}
|
|
@@ -19366,74 +19487,74 @@ function pb() {
|
|
|
19366
19487
|
}));
|
|
19367
19488
|
case 5:
|
|
19368
19489
|
_context15.p = 5;
|
|
19369
|
-
|
|
19490
|
+
_t106 = _context15.v;
|
|
19370
19491
|
return _context15.a(2, null);
|
|
19371
19492
|
}
|
|
19372
19493
|
}, _callee5, null, [[1, 5]]);
|
|
19373
|
-
})),
|
|
19494
|
+
})), vb.apply(this, arguments);
|
|
19374
19495
|
}
|
|
19375
|
-
function
|
|
19496
|
+
function yb(e) {
|
|
19376
19497
|
return e.startsWith("//") && (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" && window.location ? "".concat(window.location.protocol).concat(e) : e;
|
|
19377
19498
|
}
|
|
19378
|
-
function
|
|
19499
|
+
function bb(e) {
|
|
19379
19500
|
return e.startsWith("data:image/") || e.startsWith("blob:") || /^https?:\/\//i.test(e);
|
|
19380
19501
|
}
|
|
19381
|
-
var
|
|
19382
|
-
function
|
|
19502
|
+
var xb = null;
|
|
19503
|
+
function Sb() {
|
|
19383
19504
|
var e;
|
|
19384
19505
|
return !!((typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" && (e = window.customElements) != null && e.get("math-field"));
|
|
19385
19506
|
}
|
|
19386
|
-
function
|
|
19387
|
-
return
|
|
19507
|
+
function Cb(e) {
|
|
19508
|
+
return xb || (xb = Promise.resolve().then(function () {
|
|
19388
19509
|
return require("./mathlive.min-BNsIlja9.js");
|
|
19389
19510
|
}).then(function (t) {
|
|
19390
|
-
if (!
|
|
19391
|
-
|
|
19392
|
-
})),
|
|
19393
|
-
var
|
|
19511
|
+
if (!Sb()) throw Error("MathLive did not register math-field.");
|
|
19512
|
+
Eb(t, e);
|
|
19513
|
+
})), xb.then(u.t(_regenerator().m(function _callee6() {
|
|
19514
|
+
var _t107;
|
|
19394
19515
|
return _regenerator().w(function (_context16) {
|
|
19395
19516
|
while (1) switch (_context16.n) {
|
|
19396
19517
|
case 0:
|
|
19397
|
-
|
|
19518
|
+
_t107 = Eb;
|
|
19398
19519
|
_context16.n = 1;
|
|
19399
19520
|
return Promise.resolve().then(function () {
|
|
19400
19521
|
return require("./mathlive.min-BNsIlja9.js");
|
|
19401
19522
|
});
|
|
19402
19523
|
case 1:
|
|
19403
|
-
|
|
19524
|
+
_t107(_context16.v, e);
|
|
19404
19525
|
case 2:
|
|
19405
19526
|
return _context16.a(2);
|
|
19406
19527
|
}
|
|
19407
19528
|
}, _callee6);
|
|
19408
19529
|
})));
|
|
19409
19530
|
}
|
|
19410
|
-
function
|
|
19411
|
-
|
|
19412
|
-
var e =
|
|
19413
|
-
e != null && e.hide && e.hide(),
|
|
19531
|
+
function wb() {
|
|
19532
|
+
Ob();
|
|
19533
|
+
var e = Db();
|
|
19534
|
+
e != null && e.hide && e.hide(), kb();
|
|
19414
19535
|
}
|
|
19415
|
-
function
|
|
19416
|
-
var e =
|
|
19536
|
+
function Tb() {
|
|
19537
|
+
var e = Db();
|
|
19417
19538
|
e != null && e.show && e.show();
|
|
19418
19539
|
}
|
|
19419
|
-
function
|
|
19540
|
+
function Eb(e, t) {
|
|
19420
19541
|
e.MathfieldElement.locale = t, e.setKeyboardLayoutLocale(t);
|
|
19421
19542
|
}
|
|
19422
|
-
function
|
|
19543
|
+
function Db() {
|
|
19423
19544
|
var e;
|
|
19424
19545
|
return (typeof window === "undefined" ? "undefined" : _typeof(window)) > "u" || (e = window.mathVirtualKeyboard) == null ? null : e;
|
|
19425
19546
|
}
|
|
19426
|
-
function
|
|
19547
|
+
function Ob() {
|
|
19427
19548
|
if ((typeof document === "undefined" ? "undefined" : _typeof(document)) > "u") return;
|
|
19428
19549
|
var e = document.activeElement;
|
|
19429
19550
|
e instanceof HTMLElement && e.blur();
|
|
19430
19551
|
}
|
|
19431
|
-
function
|
|
19552
|
+
function kb() {
|
|
19432
19553
|
(typeof document === "undefined" ? "undefined" : _typeof(document)) > "u" || document.querySelectorAll("#mathlive-suggestion-popover, #mathlive-environment-popover").forEach(function (e) {
|
|
19433
19554
|
e.classList.remove("is-visible"), e.setAttribute("aria-hidden", "true");
|
|
19434
19555
|
});
|
|
19435
19556
|
}
|
|
19436
|
-
var
|
|
19557
|
+
var Ab = {
|
|
19437
19558
|
"dialog-backdrop": "_dialog-backdrop_u3zy8_1",
|
|
19438
19559
|
dialog: "_dialog_u3zy8_1",
|
|
19439
19560
|
"dialog-textarea": "_dialog-textarea_u3zy8_29",
|
|
@@ -19444,31 +19565,31 @@ var Tb = {
|
|
|
19444
19565
|
"dialog-actions": "_dialog-actions_u3zy8_93",
|
|
19445
19566
|
"dialog-button": "_dialog-button_u3zy8_99"
|
|
19446
19567
|
};
|
|
19447
|
-
function
|
|
19448
|
-
var e =
|
|
19449
|
-
t =
|
|
19450
|
-
n =
|
|
19568
|
+
function jb(_ref199) {
|
|
19569
|
+
var e = _ref199.autoFocus,
|
|
19570
|
+
t = _ref199.onChange,
|
|
19571
|
+
n = _ref199.value;
|
|
19451
19572
|
var _Qu6 = Qu(),
|
|
19452
19573
|
r = _Qu6.locale,
|
|
19453
19574
|
i = _Qu6.messages,
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
a =
|
|
19457
|
-
o =
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
s =
|
|
19461
|
-
c =
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
l =
|
|
19465
|
-
u =
|
|
19575
|
+
_ref200 = (0, f.useState)(null),
|
|
19576
|
+
_ref201 = _slicedToArray(_ref200, 2),
|
|
19577
|
+
a = _ref201[0],
|
|
19578
|
+
o = _ref201[1],
|
|
19579
|
+
_ref202 = (0, f.useState)(!1),
|
|
19580
|
+
_ref203 = _slicedToArray(_ref202, 2),
|
|
19581
|
+
s = _ref203[0],
|
|
19582
|
+
c = _ref203[1],
|
|
19583
|
+
_ref204 = (0, f.useState)(!1),
|
|
19584
|
+
_ref205 = _slicedToArray(_ref204, 2),
|
|
19585
|
+
l = _ref205[0],
|
|
19586
|
+
u = _ref205[1],
|
|
19466
19587
|
d = (0, f.useCallback)(function (e) {
|
|
19467
19588
|
o(e);
|
|
19468
19589
|
}, []);
|
|
19469
19590
|
return (0, f.useEffect)(function () {
|
|
19470
19591
|
var e = !0;
|
|
19471
|
-
return
|
|
19592
|
+
return Cb(r).then(function () {
|
|
19472
19593
|
e && c(!0);
|
|
19473
19594
|
}).catch(function () {
|
|
19474
19595
|
e && u(!0);
|
|
@@ -19478,24 +19599,24 @@ function Eb(_ref193) {
|
|
|
19478
19599
|
}, [r]), (0, f.useEffect)(function () {
|
|
19479
19600
|
if (!s || !a) return;
|
|
19480
19601
|
var e = function e() {
|
|
19481
|
-
t(
|
|
19602
|
+
t(Mb(a));
|
|
19482
19603
|
},
|
|
19483
19604
|
n = function n() {
|
|
19484
|
-
|
|
19605
|
+
Tb();
|
|
19485
19606
|
},
|
|
19486
19607
|
r = function r() {
|
|
19487
|
-
|
|
19608
|
+
wb();
|
|
19488
19609
|
};
|
|
19489
19610
|
return a.addEventListener("input", e), a.addEventListener("focusin", n), a.addEventListener("focusout", r), function () {
|
|
19490
|
-
a.removeEventListener("input", e), a.removeEventListener("focusin", n), a.removeEventListener("focusout", r),
|
|
19611
|
+
a.removeEventListener("input", e), a.removeEventListener("focusin", n), a.removeEventListener("focusout", r), wb();
|
|
19491
19612
|
};
|
|
19492
19613
|
}, [a, t, s]), (0, f.useEffect)(function () {
|
|
19493
19614
|
return function () {
|
|
19494
|
-
return
|
|
19615
|
+
return wb();
|
|
19495
19616
|
};
|
|
19496
19617
|
}, []), (0, f.useEffect)(function () {
|
|
19497
19618
|
var e;
|
|
19498
|
-
!s || !a ||
|
|
19619
|
+
!s || !a || Mb(a) === n || (e = a.setValue) == null || e.call(a, n, {
|
|
19499
19620
|
silenceNotifications: !0
|
|
19500
19621
|
});
|
|
19501
19622
|
}, [a, s, n]), (0, f.useEffect)(function () {
|
|
@@ -19503,39 +19624,39 @@ function Eb(_ref193) {
|
|
|
19503
19624
|
return a.focus();
|
|
19504
19625
|
}, 0);
|
|
19505
19626
|
}, [e, a, s]), l ? (0, p.jsx)("div", {
|
|
19506
|
-
className:
|
|
19627
|
+
className: Ab["math-field-status"],
|
|
19507
19628
|
children: i.formulaEditorFailed
|
|
19508
19629
|
}) : s ? (0, f.createElement)("math-field", {
|
|
19509
|
-
class:
|
|
19630
|
+
class: Ab["math-field"],
|
|
19510
19631
|
"math-virtual-keyboard-policy": "sandboxed",
|
|
19511
19632
|
ref: d,
|
|
19512
19633
|
"smart-fence": ""
|
|
19513
19634
|
}) : (0, p.jsx)("div", {
|
|
19514
|
-
className:
|
|
19635
|
+
className: Ab["math-field-status"],
|
|
19515
19636
|
children: i.formulaEditorLoading
|
|
19516
19637
|
});
|
|
19517
19638
|
}
|
|
19518
|
-
function
|
|
19639
|
+
function Mb(e) {
|
|
19519
19640
|
var t;
|
|
19520
19641
|
return e.getValue ? e.getValue("latex") : (t = e.value) == null ? "" : t;
|
|
19521
19642
|
}
|
|
19522
|
-
function
|
|
19643
|
+
function Nb() {
|
|
19523
19644
|
var _Qu7 = Qu(),
|
|
19524
19645
|
e = _Qu7.messages,
|
|
19525
|
-
t =
|
|
19526
|
-
n =
|
|
19527
|
-
|
|
19528
|
-
|
|
19529
|
-
r =
|
|
19530
|
-
i =
|
|
19646
|
+
t = ab(),
|
|
19647
|
+
n = $y(),
|
|
19648
|
+
_ref206 = (0, f.useState)(t.formulaDialog.initialLatex),
|
|
19649
|
+
_ref207 = _slicedToArray(_ref206, 2),
|
|
19650
|
+
r = _ref207[0],
|
|
19651
|
+
i = _ref207[1],
|
|
19531
19652
|
a = r.trim(),
|
|
19532
|
-
o = a ?
|
|
19653
|
+
o = a ? eb(a, t.formulaRenderUrl) : "",
|
|
19533
19654
|
s = (0, f.useCallback)(function () {
|
|
19534
|
-
|
|
19655
|
+
wb(), t.closeFormulaDialog();
|
|
19535
19656
|
}, [t]);
|
|
19536
19657
|
(0, f.useEffect)(function () {
|
|
19537
19658
|
return function () {
|
|
19538
|
-
return
|
|
19659
|
+
return wb();
|
|
19539
19660
|
};
|
|
19540
19661
|
}, []);
|
|
19541
19662
|
var c = function c() {
|
|
@@ -19545,44 +19666,44 @@ function Ob() {
|
|
|
19545
19666
|
}
|
|
19546
19667
|
var e = {
|
|
19547
19668
|
latex: a,
|
|
19548
|
-
src:
|
|
19669
|
+
src: eb(a, t.formulaRenderUrl)
|
|
19549
19670
|
};
|
|
19550
19671
|
t.formulaDialog.updateFormula ? t.formulaDialog.updateFormula(e) : n(e), s();
|
|
19551
19672
|
};
|
|
19552
19673
|
return (0, p.jsx)("div", {
|
|
19553
|
-
className:
|
|
19674
|
+
className: Ab["dialog-backdrop"],
|
|
19554
19675
|
role: "presentation",
|
|
19555
19676
|
children: (0, p.jsxs)("section", {
|
|
19556
19677
|
"aria-label": e.formulaDialogLabel,
|
|
19557
|
-
className:
|
|
19678
|
+
className: Ab.dialog,
|
|
19558
19679
|
role: "dialog",
|
|
19559
19680
|
"aria-modal": "true",
|
|
19560
19681
|
onKeyDown: function onKeyDown(e) {
|
|
19561
19682
|
e.key === "Escape" && (e.stopPropagation(), s());
|
|
19562
19683
|
},
|
|
19563
|
-
children: [(0, p.jsx)(
|
|
19684
|
+
children: [(0, p.jsx)(jb, {
|
|
19564
19685
|
autoFocus: !0,
|
|
19565
19686
|
onChange: i,
|
|
19566
19687
|
value: r
|
|
19567
19688
|
}), (0, p.jsx)("textarea", {
|
|
19568
19689
|
"aria-label": e.formulaLatexInput,
|
|
19569
|
-
className:
|
|
19690
|
+
className: Ab["dialog-textarea"],
|
|
19570
19691
|
onChange: function onChange(e) {
|
|
19571
19692
|
return i(e.target.value);
|
|
19572
19693
|
},
|
|
19573
19694
|
value: r
|
|
19574
19695
|
}), (0, p.jsx)("div", {
|
|
19575
|
-
className:
|
|
19696
|
+
className: Ab["formula-preview"],
|
|
19576
19697
|
children: o ? (0, p.jsx)("img", {
|
|
19577
19698
|
alt: a,
|
|
19578
|
-
className:
|
|
19699
|
+
className: Ab["formula-preview-image"],
|
|
19579
19700
|
src: o
|
|
19580
19701
|
}) : e.formulaPreviewEmpty
|
|
19581
19702
|
}), (0, p.jsxs)("div", {
|
|
19582
|
-
className:
|
|
19703
|
+
className: Ab["dialog-actions"],
|
|
19583
19704
|
children: [(0, p.jsx)("button", {
|
|
19584
19705
|
"aria-label": e.formulaDialogCancel,
|
|
19585
|
-
className:
|
|
19706
|
+
className: Ab["dialog-button"],
|
|
19586
19707
|
onMouseDown: function onMouseDown(e) {
|
|
19587
19708
|
e.preventDefault(), s();
|
|
19588
19709
|
},
|
|
@@ -19591,7 +19712,7 @@ function Ob() {
|
|
|
19591
19712
|
children: e.formulaDialogCancel
|
|
19592
19713
|
}), (0, p.jsx)("button", {
|
|
19593
19714
|
"aria-label": e.formulaDialogInsert,
|
|
19594
|
-
className:
|
|
19715
|
+
className: Ab["dialog-button"],
|
|
19595
19716
|
onMouseDown: function onMouseDown(e) {
|
|
19596
19717
|
e.preventDefault(), c();
|
|
19597
19718
|
},
|
|
@@ -19603,122 +19724,122 @@ function Ob() {
|
|
|
19603
19724
|
})
|
|
19604
19725
|
});
|
|
19605
19726
|
}
|
|
19606
|
-
function
|
|
19607
|
-
var e =
|
|
19608
|
-
return e.formulaDialog.open ? (0, p.jsx)(
|
|
19609
|
-
}
|
|
19610
|
-
function
|
|
19611
|
-
var e =
|
|
19612
|
-
t =
|
|
19613
|
-
n =
|
|
19614
|
-
r =
|
|
19615
|
-
i =
|
|
19616
|
-
a =
|
|
19617
|
-
o =
|
|
19618
|
-
s =
|
|
19619
|
-
c =
|
|
19620
|
-
l =
|
|
19621
|
-
u =
|
|
19622
|
-
d =
|
|
19623
|
-
f =
|
|
19727
|
+
function Pb() {
|
|
19728
|
+
var e = ab();
|
|
19729
|
+
return e.formulaDialog.open ? (0, p.jsx)(Nb, {}, e.formulaDialog.initialLatex) : null;
|
|
19730
|
+
}
|
|
19731
|
+
function Fb(_ref208) {
|
|
19732
|
+
var e = _ref208.children,
|
|
19733
|
+
t = _ref208.className,
|
|
19734
|
+
n = _ref208.defaultActiveEditorId,
|
|
19735
|
+
r = _ref208.formulaRenderUrl,
|
|
19736
|
+
i = _ref208.id,
|
|
19737
|
+
a = _ref208.locale,
|
|
19738
|
+
o = _ref208.messages,
|
|
19739
|
+
s = _ref208.onCommand,
|
|
19740
|
+
c = _ref208.onEditorFocusChange,
|
|
19741
|
+
l = _ref208.onOpenFormula,
|
|
19742
|
+
u = _ref208.onOpenImageUpload,
|
|
19743
|
+
d = _ref208.plugins,
|
|
19744
|
+
f = _ref208.uploadImage;
|
|
19624
19745
|
return (0, p.jsx)(Zu, {
|
|
19625
19746
|
locale: a,
|
|
19626
19747
|
messages: o,
|
|
19627
|
-
children: (0, p.jsx)(
|
|
19748
|
+
children: (0, p.jsx)(rb, {
|
|
19628
19749
|
formulaRenderUrl: r,
|
|
19629
19750
|
onOpenFormula: l,
|
|
19630
19751
|
onOpenImageUpload: u,
|
|
19631
19752
|
uploadImage: f,
|
|
19632
19753
|
children: (0, p.jsxs)($.Root, {
|
|
19633
|
-
className: F(
|
|
19754
|
+
className: F(ob.root, t),
|
|
19634
19755
|
defaultActiveEditorId: n,
|
|
19635
19756
|
id: i,
|
|
19636
19757
|
onCommand: s,
|
|
19637
19758
|
onEditorFocusChange: c,
|
|
19638
19759
|
plugins: d,
|
|
19639
|
-
children: [e, (0, p.jsx)(
|
|
19760
|
+
children: [e, (0, p.jsx)(Pb, {})]
|
|
19640
19761
|
})
|
|
19641
19762
|
})
|
|
19642
19763
|
});
|
|
19643
19764
|
}
|
|
19644
|
-
var
|
|
19645
|
-
function
|
|
19765
|
+
var Ib = ["children"];
|
|
19766
|
+
function Lb(e) {
|
|
19646
19767
|
var t = e.children,
|
|
19647
|
-
n = g(e,
|
|
19648
|
-
return (0, p.jsx)(
|
|
19768
|
+
n = g(e, Ib);
|
|
19769
|
+
return (0, p.jsx)(Ky.Section, {
|
|
19649
19770
|
"aria-label": n["aria-label"],
|
|
19650
|
-
className:
|
|
19771
|
+
className: ob["toolbar-section"],
|
|
19651
19772
|
children: t
|
|
19652
19773
|
});
|
|
19653
19774
|
}
|
|
19654
|
-
function
|
|
19655
|
-
return (0, p.jsx)(
|
|
19656
|
-
className:
|
|
19775
|
+
function Rb() {
|
|
19776
|
+
return (0, p.jsx)(Ky.Separator, {
|
|
19777
|
+
className: ob["toolbar-separator"]
|
|
19657
19778
|
});
|
|
19658
19779
|
}
|
|
19659
|
-
var
|
|
19660
|
-
function
|
|
19780
|
+
var zb = ["children", "className", "payload"];
|
|
19781
|
+
function Bb(e, t, n) {
|
|
19661
19782
|
return function (r) {
|
|
19662
19783
|
var i, a;
|
|
19663
19784
|
var o = r.children,
|
|
19664
19785
|
s = r.className,
|
|
19665
19786
|
c = r.payload,
|
|
19666
|
-
l = g(r,
|
|
19787
|
+
l = g(r, zb),
|
|
19667
19788
|
_Qu8 = Qu(),
|
|
19668
19789
|
u = _Qu8.messages,
|
|
19669
19790
|
d = (i = l["aria-label"]) == null ? $u(u, n) : i,
|
|
19670
19791
|
f = c == null ? l.asChild || !((a = l.options) != null && a.length) ? t : void 0 : c;
|
|
19671
19792
|
return (0, p.jsx)(e, S(S({}, l), {}, {
|
|
19672
19793
|
"aria-label": d,
|
|
19673
|
-
className: F(
|
|
19794
|
+
className: F(Yy.button, s),
|
|
19674
19795
|
payload: f,
|
|
19675
19796
|
children: o
|
|
19676
19797
|
}));
|
|
19677
19798
|
};
|
|
19678
19799
|
}
|
|
19679
|
-
var
|
|
19680
|
-
function
|
|
19800
|
+
var Vb = ["children", "className"];
|
|
19801
|
+
function Hb(e, t) {
|
|
19681
19802
|
return function (n) {
|
|
19682
19803
|
var r;
|
|
19683
19804
|
var i = n.children,
|
|
19684
19805
|
a = n.className,
|
|
19685
|
-
o = g(n,
|
|
19806
|
+
o = g(n, Vb),
|
|
19686
19807
|
_Qu9 = Qu(),
|
|
19687
19808
|
s = _Qu9.messages,
|
|
19688
19809
|
c = (r = o["aria-label"]) == null ? $u(s, t) : r;
|
|
19689
19810
|
return (0, p.jsx)(e, S(S({}, o), {}, {
|
|
19690
19811
|
"aria-label": c,
|
|
19691
|
-
className: F(
|
|
19812
|
+
className: F(Yy.button, a),
|
|
19692
19813
|
children: i
|
|
19693
19814
|
}));
|
|
19694
19815
|
};
|
|
19695
19816
|
}
|
|
19696
|
-
function
|
|
19697
|
-
var e =
|
|
19698
|
-
|
|
19699
|
-
t =
|
|
19700
|
-
n =
|
|
19701
|
-
r =
|
|
19702
|
-
i =
|
|
19817
|
+
function Ub(_ref209) {
|
|
19818
|
+
var e = _ref209.className,
|
|
19819
|
+
_ref209$disabled = _ref209.disabled,
|
|
19820
|
+
t = _ref209$disabled === void 0 ? !1 : _ref209$disabled,
|
|
19821
|
+
n = _ref209.icon,
|
|
19822
|
+
r = _ref209.label,
|
|
19823
|
+
i = _ref209.onPress;
|
|
19703
19824
|
return (0, p.jsx)("button", {
|
|
19704
19825
|
"aria-label": r,
|
|
19705
|
-
className: F(
|
|
19826
|
+
className: F(Yy.button, e),
|
|
19706
19827
|
"data-disabled": t ? "true" : void 0,
|
|
19707
19828
|
disabled: t,
|
|
19708
19829
|
onClick: i,
|
|
19709
19830
|
type: "button",
|
|
19710
19831
|
children: (0, p.jsx)(n, {
|
|
19711
19832
|
"aria-hidden": "true",
|
|
19712
|
-
className:
|
|
19833
|
+
className: Yy.icon
|
|
19713
19834
|
})
|
|
19714
19835
|
});
|
|
19715
19836
|
}
|
|
19716
|
-
function
|
|
19837
|
+
function Wb(e) {
|
|
19717
19838
|
var t;
|
|
19718
19839
|
var _Qu0 = Qu(),
|
|
19719
19840
|
n = _Qu0.messages,
|
|
19720
|
-
r =
|
|
19721
|
-
return (0, p.jsx)(
|
|
19841
|
+
r = ab();
|
|
19842
|
+
return (0, p.jsx)(Ub, {
|
|
19722
19843
|
className: e.className,
|
|
19723
19844
|
disabled: e.disabled,
|
|
19724
19845
|
icon: Ru,
|
|
@@ -19736,13 +19857,13 @@ function zb(e) {
|
|
|
19736
19857
|
}
|
|
19737
19858
|
});
|
|
19738
19859
|
}
|
|
19739
|
-
function
|
|
19860
|
+
function Gb(e) {
|
|
19740
19861
|
var t;
|
|
19741
19862
|
var _Qu1 = Qu(),
|
|
19742
19863
|
n = _Qu1.messages,
|
|
19743
19864
|
r = (0, f.useRef)(null),
|
|
19744
|
-
i =
|
|
19745
|
-
a =
|
|
19865
|
+
i = ab(),
|
|
19866
|
+
a = Qy(),
|
|
19746
19867
|
o = e.disabled || !i.onOpenImageUpload && !i.uploadImage,
|
|
19747
19868
|
s = function s() {
|
|
19748
19869
|
var e;
|
|
@@ -19758,22 +19879,22 @@ function Bb(e) {
|
|
|
19758
19879
|
},
|
|
19759
19880
|
c = function () {
|
|
19760
19881
|
var e = u.t(_regenerator().m(function _callee7(e) {
|
|
19761
|
-
var t, n,
|
|
19882
|
+
var t, n, _t108, _t109;
|
|
19762
19883
|
return _regenerator().w(function (_context17) {
|
|
19763
19884
|
while (1) switch (_context17.n) {
|
|
19764
19885
|
case 0:
|
|
19765
19886
|
n = (t = e.target.files) == null ? void 0 : t[0];
|
|
19766
19887
|
e.target.value = "";
|
|
19767
|
-
|
|
19768
|
-
if (!
|
|
19888
|
+
_t108 = !(!n || !i.uploadImage);
|
|
19889
|
+
if (!_t108) {
|
|
19769
19890
|
_context17.n = 2;
|
|
19770
19891
|
break;
|
|
19771
19892
|
}
|
|
19772
|
-
|
|
19893
|
+
_t109 = a;
|
|
19773
19894
|
_context17.n = 1;
|
|
19774
19895
|
return i.uploadImage(n);
|
|
19775
19896
|
case 1:
|
|
19776
|
-
|
|
19897
|
+
_t109(_context17.v, n.name);
|
|
19777
19898
|
case 2:
|
|
19778
19899
|
return _context17.a(2);
|
|
19779
19900
|
}
|
|
@@ -19784,7 +19905,7 @@ function Bb(e) {
|
|
|
19784
19905
|
};
|
|
19785
19906
|
}();
|
|
19786
19907
|
return (0, p.jsxs)(p.Fragment, {
|
|
19787
|
-
children: [(0, p.jsx)(
|
|
19908
|
+
children: [(0, p.jsx)(Ub, {
|
|
19788
19909
|
className: e.className,
|
|
19789
19910
|
disabled: o,
|
|
19790
19911
|
icon: Mu,
|
|
@@ -19807,147 +19928,147 @@ function Bb(e) {
|
|
|
19807
19928
|
})]
|
|
19808
19929
|
});
|
|
19809
19930
|
}
|
|
19810
|
-
var
|
|
19811
|
-
Component:
|
|
19931
|
+
var Kb = [{
|
|
19932
|
+
Component: Hb($.Toolbar.AlignCenterButton, "toolbarAlignCenter"),
|
|
19812
19933
|
actionKey: "alignCenter",
|
|
19813
19934
|
messageKey: "toolbarAlignCenter"
|
|
19814
19935
|
}, {
|
|
19815
|
-
Component:
|
|
19936
|
+
Component: Hb($.Toolbar.AlignLeftButton, "toolbarAlignLeft"),
|
|
19816
19937
|
actionKey: "alignLeft",
|
|
19817
19938
|
messageKey: "toolbarAlignLeft"
|
|
19818
19939
|
}, {
|
|
19819
|
-
Component:
|
|
19940
|
+
Component: Hb($.Toolbar.AlignRightButton, "toolbarAlignRight"),
|
|
19820
19941
|
actionKey: "alignRight",
|
|
19821
19942
|
messageKey: "toolbarAlignRight"
|
|
19822
19943
|
}, {
|
|
19823
|
-
Component:
|
|
19944
|
+
Component: Hb($.Toolbar.BoldToggle, "toolbarBold"),
|
|
19824
19945
|
actionKey: "bold",
|
|
19825
19946
|
messageKey: "toolbarBold"
|
|
19826
19947
|
}, {
|
|
19827
|
-
Component:
|
|
19948
|
+
Component: Hb($.Toolbar.BulletedListToggle, "toolbarBulletedList"),
|
|
19828
19949
|
actionKey: "bulletedList",
|
|
19829
19950
|
messageKey: "toolbarBulletedList"
|
|
19830
19951
|
}, {
|
|
19831
|
-
Component:
|
|
19952
|
+
Component: Hb($.Toolbar.CodeBlockButton, "codeBlockButton"),
|
|
19832
19953
|
actionKey: "codeBlock",
|
|
19833
19954
|
messageKey: "codeBlockButton"
|
|
19834
19955
|
}, {
|
|
19835
|
-
Component:
|
|
19956
|
+
Component: Hb($.Toolbar.CodeToggle, "toolbarCode"),
|
|
19836
19957
|
actionKey: "code",
|
|
19837
19958
|
messageKey: "toolbarCode"
|
|
19838
19959
|
}, {
|
|
19839
|
-
Component:
|
|
19960
|
+
Component: Bb($.Toolbar.ColorSelect, "#0445FC", "toolbarTextColor"),
|
|
19840
19961
|
actionKey: "color",
|
|
19841
19962
|
messageKey: "toolbarTextColor"
|
|
19842
19963
|
}, {
|
|
19843
|
-
Component:
|
|
19964
|
+
Component: Hb($.Toolbar.DividerButton, "toolbarDivider"),
|
|
19844
19965
|
actionKey: "divider",
|
|
19845
19966
|
messageKey: "toolbarDivider"
|
|
19846
19967
|
}, {
|
|
19847
|
-
Component:
|
|
19968
|
+
Component: Bb($.Toolbar.FontSizeSelect, "16px", "toolbarFontSize"),
|
|
19848
19969
|
actionKey: "fontSize",
|
|
19849
19970
|
messageKey: "toolbarFontSize"
|
|
19850
19971
|
}, {
|
|
19851
|
-
Component:
|
|
19972
|
+
Component: Wb,
|
|
19852
19973
|
actionKey: "formula",
|
|
19853
19974
|
messageKey: "toolbarFormula"
|
|
19854
19975
|
}, {
|
|
19855
|
-
Component:
|
|
19976
|
+
Component: Hb($.Toolbar.Heading1Button, "toolbarHeading1"),
|
|
19856
19977
|
actionKey: "heading1",
|
|
19857
19978
|
messageKey: "toolbarHeading1"
|
|
19858
19979
|
}, {
|
|
19859
|
-
Component:
|
|
19980
|
+
Component: Hb($.Toolbar.Heading2Button, "toolbarHeading2"),
|
|
19860
19981
|
actionKey: "heading2",
|
|
19861
19982
|
messageKey: "toolbarHeading2"
|
|
19862
19983
|
}, {
|
|
19863
|
-
Component:
|
|
19984
|
+
Component: Hb($.Toolbar.Heading3Button, "toolbarHeading3"),
|
|
19864
19985
|
actionKey: "heading3",
|
|
19865
19986
|
messageKey: "toolbarHeading3"
|
|
19866
19987
|
}, {
|
|
19867
|
-
Component:
|
|
19988
|
+
Component: Gb,
|
|
19868
19989
|
actionKey: "image",
|
|
19869
19990
|
messageKey: "toolbarImage"
|
|
19870
19991
|
}, {
|
|
19871
|
-
Component:
|
|
19992
|
+
Component: Hb($.Toolbar.ItalicToggle, "toolbarItalic"),
|
|
19872
19993
|
actionKey: "italic",
|
|
19873
19994
|
messageKey: "toolbarItalic"
|
|
19874
19995
|
}, {
|
|
19875
|
-
Component:
|
|
19996
|
+
Component: Hb($.Toolbar.NumberedListToggle, "toolbarNumberedList"),
|
|
19876
19997
|
actionKey: "numberedList",
|
|
19877
19998
|
messageKey: "toolbarNumberedList"
|
|
19878
19999
|
}, {
|
|
19879
|
-
Component:
|
|
20000
|
+
Component: Hb($.Toolbar.RedoButton, "toolbarRedo"),
|
|
19880
20001
|
actionKey: "redo",
|
|
19881
20002
|
messageKey: "toolbarRedo"
|
|
19882
20003
|
}, {
|
|
19883
|
-
Component:
|
|
20004
|
+
Component: Hb($.Toolbar.StrikeToggle, "toolbarStrike"),
|
|
19884
20005
|
actionKey: "strike",
|
|
19885
20006
|
messageKey: "toolbarStrike"
|
|
19886
20007
|
}, {
|
|
19887
|
-
Component:
|
|
20008
|
+
Component: Hb($.Toolbar.TableButton, "toolbarTable"),
|
|
19888
20009
|
actionKey: "table",
|
|
19889
20010
|
messageKey: "toolbarTable"
|
|
19890
20011
|
}, {
|
|
19891
|
-
Component:
|
|
20012
|
+
Component: Hb($.Toolbar.UnderlineToggle, "toolbarUnderline"),
|
|
19892
20013
|
actionKey: "underline",
|
|
19893
20014
|
messageKey: "toolbarUnderline"
|
|
19894
20015
|
}, {
|
|
19895
|
-
Component:
|
|
20016
|
+
Component: Hb($.Toolbar.UndoButton, "toolbarUndo"),
|
|
19896
20017
|
actionKey: "undo",
|
|
19897
20018
|
messageKey: "toolbarUndo"
|
|
19898
20019
|
}],
|
|
19899
|
-
|
|
20020
|
+
qb = new Map(Kb.map(function (e) {
|
|
19900
20021
|
return [e.actionKey, e];
|
|
19901
20022
|
})),
|
|
19902
|
-
|
|
19903
|
-
function
|
|
19904
|
-
var t =
|
|
20023
|
+
Jb = new Map([["Heading", "toolbarGroupHeading"], ["History", "toolbarGroupHistory"], ["Insert", "toolbarGroupInsert"], ["Paragraph", "toolbarGroupParagraph"], ["Table", "toolbarGroupTable"], ["Text style", "toolbarGroupTextStyle"]]);
|
|
20024
|
+
function Yb(e) {
|
|
20025
|
+
var t = qb.get(e);
|
|
19905
20026
|
if (!t) throw Error("Missing RichTextEditor styled toolbar action: ".concat(e, "."));
|
|
19906
20027
|
return t;
|
|
19907
20028
|
}
|
|
19908
|
-
function
|
|
19909
|
-
return
|
|
20029
|
+
function Xb(e) {
|
|
20030
|
+
return Yb(e).Component;
|
|
19910
20031
|
}
|
|
19911
|
-
function
|
|
19912
|
-
return
|
|
20032
|
+
function Zb(e) {
|
|
20033
|
+
return Yb(e).messageKey;
|
|
19913
20034
|
}
|
|
19914
|
-
function
|
|
19915
|
-
return
|
|
20035
|
+
function Qb(e) {
|
|
20036
|
+
return Jb.get(e);
|
|
19916
20037
|
}
|
|
19917
|
-
function
|
|
20038
|
+
function $b() {
|
|
19918
20039
|
var _Qu10 = Qu(),
|
|
19919
20040
|
e = _Qu10.messages;
|
|
19920
20041
|
return (0, p.jsx)(p.Fragment, {
|
|
19921
|
-
children:
|
|
20042
|
+
children: rx().map(function (t, n) {
|
|
19922
20043
|
return (0, p.jsxs)(f.Fragment, {
|
|
19923
|
-
children: [
|
|
20044
|
+
children: [ex(n), tx(t, e)]
|
|
19924
20045
|
}, t.groupKey);
|
|
19925
20046
|
})
|
|
19926
20047
|
});
|
|
19927
20048
|
}
|
|
19928
|
-
function
|
|
19929
|
-
return e > 0 ? (0, p.jsx)(
|
|
20049
|
+
function ex(e) {
|
|
20050
|
+
return e > 0 ? (0, p.jsx)(Rb, {}) : null;
|
|
19930
20051
|
}
|
|
19931
|
-
function
|
|
19932
|
-
return (0, p.jsx)(
|
|
19933
|
-
"aria-label":
|
|
20052
|
+
function tx(e, t) {
|
|
20053
|
+
return (0, p.jsx)(Lb, {
|
|
20054
|
+
"aria-label": ix(e, t),
|
|
19934
20055
|
children: e.actions.map(function (e) {
|
|
19935
|
-
return
|
|
20056
|
+
return nx(e, t);
|
|
19936
20057
|
})
|
|
19937
20058
|
});
|
|
19938
20059
|
}
|
|
19939
|
-
function
|
|
19940
|
-
var e =
|
|
19941
|
-
t =
|
|
19942
|
-
n =
|
|
19943
|
-
var i =
|
|
20060
|
+
function nx(_ref210, r) {
|
|
20061
|
+
var e = _ref210.Action,
|
|
20062
|
+
t = _ref210.actionKey,
|
|
20063
|
+
n = _ref210.payload;
|
|
20064
|
+
var i = ax(t, r);
|
|
19944
20065
|
return (0, p.jsx)(e, {
|
|
19945
20066
|
"aria-label": i,
|
|
19946
|
-
className:
|
|
20067
|
+
className: Yy.button,
|
|
19947
20068
|
payload: n
|
|
19948
20069
|
}, i);
|
|
19949
20070
|
}
|
|
19950
|
-
function
|
|
20071
|
+
function rx() {
|
|
19951
20072
|
var e = Op();
|
|
19952
20073
|
return e.toolbarGroups.map(function (t) {
|
|
19953
20074
|
return {
|
|
@@ -19956,7 +20077,7 @@ function Qb() {
|
|
|
19956
20077
|
var r = (n = e.getToolbarAction(t)) == null ? void 0 : n.action;
|
|
19957
20078
|
if (!r) throw Error("Missing RichTextEditor toolbar action: ".concat(t, "."));
|
|
19958
20079
|
return {
|
|
19959
|
-
Action:
|
|
20080
|
+
Action: ox(t),
|
|
19960
20081
|
actionKey: t,
|
|
19961
20082
|
payload: r.payload
|
|
19962
20083
|
};
|
|
@@ -19965,80 +20086,80 @@ function Qb() {
|
|
|
19965
20086
|
};
|
|
19966
20087
|
});
|
|
19967
20088
|
}
|
|
19968
|
-
function
|
|
20089
|
+
function ix(e, t) {
|
|
19969
20090
|
var n;
|
|
19970
|
-
return (n = $u(t,
|
|
20091
|
+
return (n = $u(t, Qb(e.groupKey))) == null ? t.toolbarLabel : n;
|
|
19971
20092
|
}
|
|
19972
|
-
function
|
|
20093
|
+
function ax(e, t) {
|
|
19973
20094
|
var n;
|
|
19974
|
-
return (n = $u(t,
|
|
20095
|
+
return (n = $u(t, Zb(e))) == null ? t.toolbarLabel : n;
|
|
19975
20096
|
}
|
|
19976
|
-
function
|
|
19977
|
-
return
|
|
20097
|
+
function ox(e) {
|
|
20098
|
+
return Xb(e);
|
|
19978
20099
|
}
|
|
19979
|
-
function
|
|
19980
|
-
var e =
|
|
19981
|
-
t =
|
|
19982
|
-
n =
|
|
19983
|
-
r =
|
|
20100
|
+
function sx(_ref211) {
|
|
20101
|
+
var e = _ref211["aria-label"],
|
|
20102
|
+
t = _ref211.children,
|
|
20103
|
+
n = _ref211.className,
|
|
20104
|
+
r = _ref211.visibleWhen;
|
|
19984
20105
|
var _Qu11 = Qu(),
|
|
19985
20106
|
i = _Qu11.messages;
|
|
19986
20107
|
return (0, p.jsx)($.Toolbar, {
|
|
19987
20108
|
"aria-label": e == null ? i.toolbarLabel : e,
|
|
19988
|
-
className: F(
|
|
19989
|
-
defaultContent: (0, p.jsx)(
|
|
20109
|
+
className: F(ob.toolbar, n),
|
|
20110
|
+
defaultContent: (0, p.jsx)($b, {}),
|
|
19990
20111
|
visibleWhen: r,
|
|
19991
20112
|
children: t
|
|
19992
20113
|
});
|
|
19993
20114
|
}
|
|
19994
|
-
function
|
|
19995
|
-
var e =
|
|
19996
|
-
t =
|
|
19997
|
-
n =
|
|
20115
|
+
function cx(_ref212) {
|
|
20116
|
+
var e = _ref212["aria-label"],
|
|
20117
|
+
t = _ref212.children,
|
|
20118
|
+
n = _ref212.className;
|
|
19998
20119
|
return (0, p.jsx)($.Toolbar.Section, {
|
|
19999
20120
|
"aria-label": e,
|
|
20000
|
-
className: F(
|
|
20121
|
+
className: F(ob["toolbar-section"], n),
|
|
20001
20122
|
children: t
|
|
20002
20123
|
});
|
|
20003
20124
|
}
|
|
20004
|
-
function
|
|
20125
|
+
function lx(e) {
|
|
20005
20126
|
var t = e.className;
|
|
20006
20127
|
return (0, p.jsx)($.Toolbar.Separator, {
|
|
20007
|
-
className: F(
|
|
20128
|
+
className: F(ob["toolbar-separator"], t)
|
|
20008
20129
|
});
|
|
20009
20130
|
}
|
|
20010
|
-
var
|
|
20011
|
-
Editor:
|
|
20012
|
-
Root:
|
|
20013
|
-
Toolbar: Object.assign(
|
|
20014
|
-
AlignCenterButton:
|
|
20015
|
-
AlignLeftButton:
|
|
20016
|
-
AlignRightButton:
|
|
20017
|
-
BoldToggle:
|
|
20018
|
-
BulletedListToggle:
|
|
20019
|
-
CodeBlockButton:
|
|
20020
|
-
CodeToggle:
|
|
20021
|
-
ColorSelect:
|
|
20131
|
+
var ux = {
|
|
20132
|
+
Editor: db,
|
|
20133
|
+
Root: Fb,
|
|
20134
|
+
Toolbar: Object.assign(sx, {
|
|
20135
|
+
AlignCenterButton: Xb("alignCenter"),
|
|
20136
|
+
AlignLeftButton: Xb("alignLeft"),
|
|
20137
|
+
AlignRightButton: Xb("alignRight"),
|
|
20138
|
+
BoldToggle: Xb("bold"),
|
|
20139
|
+
BulletedListToggle: Xb("bulletedList"),
|
|
20140
|
+
CodeBlockButton: Xb("codeBlock"),
|
|
20141
|
+
CodeToggle: Xb("code"),
|
|
20142
|
+
ColorSelect: Xb("color"),
|
|
20022
20143
|
Case: $.Toolbar.Case,
|
|
20023
20144
|
Default: $.Toolbar.Default,
|
|
20024
|
-
DividerButton:
|
|
20025
|
-
FontSizeSelect:
|
|
20026
|
-
FormulaButton:
|
|
20027
|
-
Heading1Button:
|
|
20028
|
-
Heading2Button:
|
|
20029
|
-
Heading3Button:
|
|
20030
|
-
ImageButton:
|
|
20031
|
-
InsertNodeButton:
|
|
20032
|
-
ItalicToggle:
|
|
20033
|
-
NumberedListToggle:
|
|
20034
|
-
RedoButton:
|
|
20035
|
-
Section:
|
|
20036
|
-
Separator:
|
|
20037
|
-
StrikeToggle:
|
|
20145
|
+
DividerButton: Xb("divider"),
|
|
20146
|
+
FontSizeSelect: Xb("fontSize"),
|
|
20147
|
+
FormulaButton: Xb("formula"),
|
|
20148
|
+
Heading1Button: Xb("heading1"),
|
|
20149
|
+
Heading2Button: Xb("heading2"),
|
|
20150
|
+
Heading3Button: Xb("heading3"),
|
|
20151
|
+
ImageButton: Xb("image"),
|
|
20152
|
+
InsertNodeButton: Zy($.Toolbar.InsertNodeButton),
|
|
20153
|
+
ItalicToggle: Xb("italic"),
|
|
20154
|
+
NumberedListToggle: Xb("numberedList"),
|
|
20155
|
+
RedoButton: Xb("redo"),
|
|
20156
|
+
Section: cx,
|
|
20157
|
+
Separator: lx,
|
|
20158
|
+
StrikeToggle: Xb("strike"),
|
|
20038
20159
|
Switch: $.Toolbar.Switch,
|
|
20039
|
-
TableButton:
|
|
20040
|
-
UnderlineToggle:
|
|
20041
|
-
UndoButton:
|
|
20160
|
+
TableButton: Xb("table"),
|
|
20161
|
+
UnderlineToggle: Xb("underline"),
|
|
20162
|
+
UndoButton: Xb("undo")
|
|
20042
20163
|
})
|
|
20043
20164
|
};
|
|
20044
|
-
exports.RichTextEditor =
|
|
20165
|
+
exports.RichTextEditor = ux, exports.deserializeRichTextEditorHtml = Yp, exports.deserializeRichTextEditorJson = Qp, exports.serializeRichTextEditorHtml = Zp, exports.serializeRichTextEditorJson = $p;
|