@ryzeup/richtexteditor 1.0.3 → 1.0.4
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.es.js +768 -740
- package/dist/index.js +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/richtexteditor.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
1
|
+
var Ge = Object.defineProperty, Qe = Object.defineProperties;
|
|
2
|
+
var et = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var ze = Object.getOwnPropertySymbols;
|
|
4
|
+
var tt = Object.prototype.hasOwnProperty, nt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Ne = (t, s, c) => s in t ? Ge(t, s, { enumerable: !0, configurable: !0, writable: !0, value: c }) : t[s] = c, be = (t, s) => {
|
|
6
|
+
for (var c in s || (s = {}))
|
|
7
|
+
tt.call(s, c) && Ne(t, c, s[c]);
|
|
8
|
+
if (ze)
|
|
9
|
+
for (var c of ze(s))
|
|
10
|
+
nt.call(s, c) && Ne(t, c, s[c]);
|
|
11
|
+
return t;
|
|
12
|
+
}, ye = (t, s) => Qe(t, et(s));
|
|
13
|
+
import W, { useRef as U, useState as F, useEffect as ae } from "react";
|
|
14
|
+
var fe = { exports: {} }, re = {};
|
|
3
15
|
/**
|
|
4
16
|
* @license React
|
|
5
17
|
* react-jsx-runtime.production.js
|
|
@@ -9,29 +21,29 @@ var de = { exports: {} }, ne = {};
|
|
|
9
21
|
* This source code is licensed under the MIT license found in the
|
|
10
22
|
* LICENSE file in the root directory of this source tree.
|
|
11
23
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
24
|
+
var Oe;
|
|
25
|
+
function rt() {
|
|
26
|
+
if (Oe) return re;
|
|
27
|
+
Oe = 1;
|
|
16
28
|
var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
} else
|
|
24
|
-
return
|
|
29
|
+
function c(d, f, w) {
|
|
30
|
+
var k = null;
|
|
31
|
+
if (w !== void 0 && (k = "" + w), f.key !== void 0 && (k = "" + f.key), "key" in f) {
|
|
32
|
+
w = {};
|
|
33
|
+
for (var R in f)
|
|
34
|
+
R !== "key" && (w[R] = f[R]);
|
|
35
|
+
} else w = f;
|
|
36
|
+
return f = w.ref, {
|
|
25
37
|
$$typeof: t,
|
|
26
|
-
type:
|
|
27
|
-
key:
|
|
28
|
-
ref:
|
|
29
|
-
props:
|
|
38
|
+
type: d,
|
|
39
|
+
key: k,
|
|
40
|
+
ref: f !== void 0 ? f : null,
|
|
41
|
+
props: w
|
|
30
42
|
};
|
|
31
43
|
}
|
|
32
|
-
return
|
|
44
|
+
return re.Fragment = s, re.jsx = c, re.jsxs = c, re;
|
|
33
45
|
}
|
|
34
|
-
var
|
|
46
|
+
var oe = {};
|
|
35
47
|
/**
|
|
36
48
|
* @license React
|
|
37
49
|
* react-jsx-runtime.development.js
|
|
@@ -41,24 +53,24 @@ var re = {};
|
|
|
41
53
|
* This source code is licensed under the MIT license found in the
|
|
42
54
|
* LICENSE file in the root directory of this source tree.
|
|
43
55
|
*/
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
return
|
|
56
|
+
var Pe;
|
|
57
|
+
function ot() {
|
|
58
|
+
return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
47
59
|
function t(n) {
|
|
48
60
|
if (n == null) return null;
|
|
49
61
|
if (typeof n == "function")
|
|
50
|
-
return n.$$typeof ===
|
|
62
|
+
return n.$$typeof === se ? null : n.displayName || n.name || null;
|
|
51
63
|
if (typeof n == "string") return n;
|
|
52
64
|
switch (n) {
|
|
53
|
-
case
|
|
65
|
+
case A:
|
|
54
66
|
return "Fragment";
|
|
55
|
-
case
|
|
67
|
+
case H:
|
|
56
68
|
return "Profiler";
|
|
57
|
-
case
|
|
69
|
+
case q:
|
|
58
70
|
return "StrictMode";
|
|
59
|
-
case
|
|
71
|
+
case C:
|
|
60
72
|
return "Suspense";
|
|
61
|
-
case
|
|
73
|
+
case J:
|
|
62
74
|
return "SuspenseList";
|
|
63
75
|
case ge:
|
|
64
76
|
return "Activity";
|
|
@@ -69,20 +81,20 @@ function Fe() {
|
|
|
69
81
|
), n.$$typeof) {
|
|
70
82
|
case B:
|
|
71
83
|
return "Portal";
|
|
72
|
-
case
|
|
84
|
+
case Z:
|
|
73
85
|
return n.displayName || "Context";
|
|
74
|
-
case
|
|
86
|
+
case V:
|
|
75
87
|
return (n._context.displayName || "Context") + ".Consumer";
|
|
76
|
-
case
|
|
77
|
-
var
|
|
78
|
-
return n = n.displayName, n || (n =
|
|
79
|
-
case
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
|
|
88
|
+
case h:
|
|
89
|
+
var v = n.render;
|
|
90
|
+
return n = n.displayName, n || (n = v.displayName || v.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
|
|
91
|
+
case le:
|
|
92
|
+
return v = n.displayName || null, v !== null ? v : t(n.type) || "Memo";
|
|
93
|
+
case G:
|
|
94
|
+
v = n._payload, n = n._init;
|
|
83
95
|
try {
|
|
84
|
-
return t(n(
|
|
85
|
-
} catch {
|
|
96
|
+
return t(n(v));
|
|
97
|
+
} catch (_) {
|
|
86
98
|
}
|
|
87
99
|
}
|
|
88
100
|
return null;
|
|
@@ -90,77 +102,77 @@ function Fe() {
|
|
|
90
102
|
function s(n) {
|
|
91
103
|
return "" + n;
|
|
92
104
|
}
|
|
93
|
-
function
|
|
105
|
+
function c(n) {
|
|
94
106
|
try {
|
|
95
107
|
s(n);
|
|
96
|
-
var
|
|
97
|
-
} catch {
|
|
98
|
-
|
|
108
|
+
var v = !1;
|
|
109
|
+
} catch (K) {
|
|
110
|
+
v = !0;
|
|
99
111
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
return
|
|
104
|
-
|
|
112
|
+
if (v) {
|
|
113
|
+
v = console;
|
|
114
|
+
var _ = v.error, S = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
115
|
+
return _.call(
|
|
116
|
+
v,
|
|
105
117
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
-
|
|
118
|
+
S
|
|
107
119
|
), s(n);
|
|
108
120
|
}
|
|
109
121
|
}
|
|
110
|
-
function
|
|
111
|
-
if (n ===
|
|
112
|
-
if (typeof n == "object" && n !== null && n.$$typeof ===
|
|
122
|
+
function d(n) {
|
|
123
|
+
if (n === A) return "<>";
|
|
124
|
+
if (typeof n == "object" && n !== null && n.$$typeof === G)
|
|
113
125
|
return "<...>";
|
|
114
126
|
try {
|
|
115
|
-
var
|
|
116
|
-
return
|
|
117
|
-
} catch {
|
|
127
|
+
var v = t(n);
|
|
128
|
+
return v ? "<" + v + ">" : "<...>";
|
|
129
|
+
} catch (_) {
|
|
118
130
|
return "<...>";
|
|
119
131
|
}
|
|
120
132
|
}
|
|
121
|
-
function
|
|
122
|
-
var n =
|
|
133
|
+
function f() {
|
|
134
|
+
var n = N.A;
|
|
123
135
|
return n === null ? null : n.getOwner();
|
|
124
136
|
}
|
|
125
|
-
function
|
|
137
|
+
function w() {
|
|
126
138
|
return Error("react-stack-top-frame");
|
|
127
139
|
}
|
|
128
|
-
function
|
|
129
|
-
if (
|
|
130
|
-
var
|
|
131
|
-
if (
|
|
140
|
+
function k(n) {
|
|
141
|
+
if (M.call(n, "key")) {
|
|
142
|
+
var v = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
143
|
+
if (v && v.isReactWarning) return !1;
|
|
132
144
|
}
|
|
133
145
|
return n.key !== void 0;
|
|
134
146
|
}
|
|
135
|
-
function
|
|
136
|
-
function
|
|
137
|
-
|
|
147
|
+
function R(n, v) {
|
|
148
|
+
function _() {
|
|
149
|
+
ce || (ce = !0, console.error(
|
|
138
150
|
"%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://react.dev/link/special-props)",
|
|
139
|
-
|
|
151
|
+
v
|
|
140
152
|
));
|
|
141
153
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
154
|
+
_.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
155
|
+
get: _,
|
|
144
156
|
configurable: !0
|
|
145
157
|
});
|
|
146
158
|
}
|
|
147
|
-
function
|
|
159
|
+
function b() {
|
|
148
160
|
var n = t(this.type);
|
|
149
|
-
return
|
|
161
|
+
return Q[n] || (Q[n] = !0, console.error(
|
|
150
162
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
163
|
)), n = this.props.ref, n !== void 0 ? n : null;
|
|
152
164
|
}
|
|
153
|
-
function
|
|
154
|
-
var
|
|
165
|
+
function I(n, v, _, S, K, te) {
|
|
166
|
+
var L = _.ref;
|
|
155
167
|
return n = {
|
|
156
|
-
$$typeof:
|
|
168
|
+
$$typeof: X,
|
|
157
169
|
type: n,
|
|
158
|
-
key:
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
170
|
+
key: v,
|
|
171
|
+
props: _,
|
|
172
|
+
_owner: S
|
|
173
|
+
}, (L !== void 0 ? L : null) !== null ? Object.defineProperty(n, "ref", {
|
|
162
174
|
enumerable: !1,
|
|
163
|
-
get:
|
|
175
|
+
get: b
|
|
164
176
|
}) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
|
|
165
177
|
configurable: !1,
|
|
166
178
|
enumerable: !1,
|
|
@@ -175,261 +187,261 @@ function Fe() {
|
|
|
175
187
|
configurable: !1,
|
|
176
188
|
enumerable: !1,
|
|
177
189
|
writable: !0,
|
|
178
|
-
value:
|
|
190
|
+
value: K
|
|
179
191
|
}), Object.defineProperty(n, "_debugTask", {
|
|
180
192
|
configurable: !1,
|
|
181
193
|
enumerable: !1,
|
|
182
194
|
writable: !0,
|
|
183
|
-
value:
|
|
195
|
+
value: te
|
|
184
196
|
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
185
197
|
}
|
|
186
|
-
function
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
for (
|
|
192
|
-
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
198
|
+
function P(n, v, _, S, K, te) {
|
|
199
|
+
var L = v.children;
|
|
200
|
+
if (L !== void 0)
|
|
201
|
+
if (S)
|
|
202
|
+
if (ie(L)) {
|
|
203
|
+
for (S = 0; S < L.length; S++)
|
|
204
|
+
T(L[S]);
|
|
205
|
+
Object.freeze && Object.freeze(L);
|
|
194
206
|
} else
|
|
195
207
|
console.error(
|
|
196
208
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
209
|
);
|
|
198
|
-
else
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
var
|
|
210
|
+
else T(L);
|
|
211
|
+
if (M.call(v, "key")) {
|
|
212
|
+
L = t(n);
|
|
213
|
+
var Y = Object.keys(v).filter(function(ve) {
|
|
202
214
|
return ve !== "key";
|
|
203
215
|
});
|
|
204
|
-
|
|
216
|
+
S = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", ee[L + S] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
217
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
218
|
let props = %s;
|
|
207
219
|
<%s {...props} />
|
|
208
220
|
React keys must be passed directly to JSX without using spread:
|
|
209
221
|
let props = %s;
|
|
210
222
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
),
|
|
223
|
+
S,
|
|
224
|
+
L,
|
|
225
|
+
Y,
|
|
226
|
+
L
|
|
227
|
+
), ee[L + S] = !0);
|
|
216
228
|
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
for (var
|
|
220
|
-
|
|
221
|
-
} else
|
|
222
|
-
return
|
|
223
|
-
|
|
229
|
+
if (L = null, _ !== void 0 && (c(_), L = "" + _), k(v) && (c(v.key), L = "" + v.key), "key" in v) {
|
|
230
|
+
_ = {};
|
|
231
|
+
for (var ne in v)
|
|
232
|
+
ne !== "key" && (_[ne] = v[ne]);
|
|
233
|
+
} else _ = v;
|
|
234
|
+
return L && R(
|
|
235
|
+
_,
|
|
224
236
|
typeof n == "function" ? n.displayName || n.name || "Unknown" : n
|
|
225
|
-
),
|
|
237
|
+
), I(
|
|
226
238
|
n,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
239
|
+
L,
|
|
240
|
+
_,
|
|
241
|
+
f(),
|
|
242
|
+
K,
|
|
243
|
+
te
|
|
232
244
|
);
|
|
233
245
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
246
|
+
function T(n) {
|
|
247
|
+
D(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === G && (n._payload.status === "fulfilled" ? D(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
|
|
236
248
|
}
|
|
237
|
-
function
|
|
238
|
-
return typeof n == "object" && n !== null && n.$$typeof ===
|
|
249
|
+
function D(n) {
|
|
250
|
+
return typeof n == "object" && n !== null && n.$$typeof === X;
|
|
239
251
|
}
|
|
240
|
-
var
|
|
252
|
+
var E = W, X = Symbol.for("react.transitional.element"), B = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), H = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), le = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), ge = Symbol.for("react.activity"), se = Symbol.for("react.client.reference"), N = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, ie = Array.isArray, $ = console.createTask ? console.createTask : function() {
|
|
241
253
|
return null;
|
|
242
254
|
};
|
|
243
|
-
|
|
255
|
+
E = {
|
|
244
256
|
react_stack_bottom_frame: function(n) {
|
|
245
257
|
return n();
|
|
246
258
|
}
|
|
247
259
|
};
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
|
|
253
|
-
var
|
|
254
|
-
return
|
|
260
|
+
var ce, Q = {}, ue = E.react_stack_bottom_frame.bind(
|
|
261
|
+
E,
|
|
262
|
+
w
|
|
263
|
+
)(), de = $(d(w)), ee = {};
|
|
264
|
+
oe.Fragment = A, oe.jsx = function(n, v, _) {
|
|
265
|
+
var S = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
266
|
+
return P(
|
|
255
267
|
n,
|
|
256
|
-
|
|
257
|
-
|
|
268
|
+
v,
|
|
269
|
+
_,
|
|
258
270
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
271
|
+
S ? Error("react-stack-top-frame") : ue,
|
|
272
|
+
S ? $(d(n)) : de
|
|
261
273
|
);
|
|
262
|
-
},
|
|
263
|
-
var
|
|
264
|
-
return
|
|
274
|
+
}, oe.jsxs = function(n, v, _) {
|
|
275
|
+
var S = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
276
|
+
return P(
|
|
265
277
|
n,
|
|
266
|
-
|
|
267
|
-
|
|
278
|
+
v,
|
|
279
|
+
_,
|
|
268
280
|
!0,
|
|
269
|
-
|
|
270
|
-
|
|
281
|
+
S ? Error("react-stack-top-frame") : ue,
|
|
282
|
+
S ? $(d(n)) : de
|
|
271
283
|
);
|
|
272
284
|
};
|
|
273
|
-
})()),
|
|
285
|
+
})()), oe;
|
|
274
286
|
}
|
|
275
|
-
var
|
|
276
|
-
function
|
|
277
|
-
return
|
|
287
|
+
var De;
|
|
288
|
+
function at() {
|
|
289
|
+
return De || (De = 1, process.env.NODE_ENV === "production" ? fe.exports = rt() : fe.exports = ot()), fe.exports;
|
|
278
290
|
}
|
|
279
|
-
var a =
|
|
291
|
+
var a = at(), Be = {
|
|
280
292
|
color: void 0,
|
|
281
293
|
size: void 0,
|
|
282
294
|
className: void 0,
|
|
283
295
|
style: void 0,
|
|
284
296
|
attr: void 0
|
|
285
|
-
},
|
|
286
|
-
function
|
|
297
|
+
}, He = W.createContext && /* @__PURE__ */ W.createContext(Be), lt = ["attr", "size", "title"];
|
|
298
|
+
function st(t, s) {
|
|
287
299
|
if (t == null) return {};
|
|
288
|
-
var
|
|
300
|
+
var c = it(t, s), d, f;
|
|
289
301
|
if (Object.getOwnPropertySymbols) {
|
|
290
|
-
var
|
|
291
|
-
for (
|
|
292
|
-
|
|
302
|
+
var w = Object.getOwnPropertySymbols(t);
|
|
303
|
+
for (f = 0; f < w.length; f++)
|
|
304
|
+
d = w[f], !(s.indexOf(d) >= 0) && Object.prototype.propertyIsEnumerable.call(t, d) && (c[d] = t[d]);
|
|
293
305
|
}
|
|
294
|
-
return
|
|
306
|
+
return c;
|
|
295
307
|
}
|
|
296
|
-
function
|
|
308
|
+
function it(t, s) {
|
|
297
309
|
if (t == null) return {};
|
|
298
|
-
var
|
|
299
|
-
for (var
|
|
300
|
-
if (Object.prototype.hasOwnProperty.call(t,
|
|
301
|
-
if (s.indexOf(
|
|
302
|
-
|
|
310
|
+
var c = {};
|
|
311
|
+
for (var d in t)
|
|
312
|
+
if (Object.prototype.hasOwnProperty.call(t, d)) {
|
|
313
|
+
if (s.indexOf(d) >= 0) continue;
|
|
314
|
+
c[d] = t[d];
|
|
303
315
|
}
|
|
304
|
-
return
|
|
316
|
+
return c;
|
|
305
317
|
}
|
|
306
|
-
function
|
|
307
|
-
return
|
|
318
|
+
function he() {
|
|
319
|
+
return he = Object.assign ? Object.assign.bind() : function(t) {
|
|
308
320
|
for (var s = 1; s < arguments.length; s++) {
|
|
309
|
-
var
|
|
310
|
-
for (var
|
|
311
|
-
Object.prototype.hasOwnProperty.call(
|
|
321
|
+
var c = arguments[s];
|
|
322
|
+
for (var d in c)
|
|
323
|
+
Object.prototype.hasOwnProperty.call(c, d) && (t[d] = c[d]);
|
|
312
324
|
}
|
|
313
325
|
return t;
|
|
314
|
-
},
|
|
326
|
+
}, he.apply(this, arguments);
|
|
315
327
|
}
|
|
316
|
-
function
|
|
317
|
-
var
|
|
328
|
+
function Fe(t, s) {
|
|
329
|
+
var c = Object.keys(t);
|
|
318
330
|
if (Object.getOwnPropertySymbols) {
|
|
319
|
-
var
|
|
320
|
-
s && (
|
|
321
|
-
return Object.getOwnPropertyDescriptor(t,
|
|
322
|
-
})),
|
|
331
|
+
var d = Object.getOwnPropertySymbols(t);
|
|
332
|
+
s && (d = d.filter(function(f) {
|
|
333
|
+
return Object.getOwnPropertyDescriptor(t, f).enumerable;
|
|
334
|
+
})), c.push.apply(c, d);
|
|
323
335
|
}
|
|
324
|
-
return
|
|
336
|
+
return c;
|
|
325
337
|
}
|
|
326
|
-
function
|
|
338
|
+
function pe(t) {
|
|
327
339
|
for (var s = 1; s < arguments.length; s++) {
|
|
328
|
-
var
|
|
329
|
-
s % 2 ?
|
|
330
|
-
|
|
331
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(
|
|
332
|
-
Object.defineProperty(t,
|
|
340
|
+
var c = arguments[s] != null ? arguments[s] : {};
|
|
341
|
+
s % 2 ? Fe(Object(c), !0).forEach(function(d) {
|
|
342
|
+
ct(t, d, c[d]);
|
|
343
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(c)) : Fe(Object(c)).forEach(function(d) {
|
|
344
|
+
Object.defineProperty(t, d, Object.getOwnPropertyDescriptor(c, d));
|
|
333
345
|
});
|
|
334
346
|
}
|
|
335
347
|
return t;
|
|
336
348
|
}
|
|
337
|
-
function
|
|
338
|
-
return s =
|
|
349
|
+
function ct(t, s, c) {
|
|
350
|
+
return s = ut(s), s in t ? Object.defineProperty(t, s, { value: c, enumerable: !0, configurable: !0, writable: !0 }) : t[s] = c, t;
|
|
339
351
|
}
|
|
340
|
-
function
|
|
341
|
-
var s =
|
|
352
|
+
function ut(t) {
|
|
353
|
+
var s = dt(t, "string");
|
|
342
354
|
return typeof s == "symbol" ? s : s + "";
|
|
343
355
|
}
|
|
344
|
-
function
|
|
356
|
+
function dt(t, s) {
|
|
345
357
|
if (typeof t != "object" || !t) return t;
|
|
346
|
-
var
|
|
347
|
-
if (
|
|
348
|
-
var
|
|
349
|
-
if (typeof
|
|
358
|
+
var c = t[Symbol.toPrimitive];
|
|
359
|
+
if (c !== void 0) {
|
|
360
|
+
var d = c.call(t, s);
|
|
361
|
+
if (typeof d != "object") return d;
|
|
350
362
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
351
363
|
}
|
|
352
364
|
return (s === "string" ? String : Number)(t);
|
|
353
365
|
}
|
|
354
|
-
function
|
|
355
|
-
return t && t.map((s,
|
|
356
|
-
key:
|
|
357
|
-
}, s.attr),
|
|
366
|
+
function $e(t) {
|
|
367
|
+
return t && t.map((s, c) => /* @__PURE__ */ W.createElement(s.tag, pe({
|
|
368
|
+
key: c
|
|
369
|
+
}, s.attr), $e(s.child)));
|
|
358
370
|
}
|
|
359
|
-
function
|
|
360
|
-
return (s) => /* @__PURE__ */
|
|
361
|
-
attr:
|
|
362
|
-
}, s),
|
|
371
|
+
function z(t) {
|
|
372
|
+
return (s) => /* @__PURE__ */ W.createElement(ft, he({
|
|
373
|
+
attr: pe({}, t.attr)
|
|
374
|
+
}, s), $e(t.child));
|
|
363
375
|
}
|
|
364
|
-
function
|
|
365
|
-
var s = (
|
|
376
|
+
function ft(t) {
|
|
377
|
+
var s = (c) => {
|
|
366
378
|
var {
|
|
367
|
-
attr:
|
|
368
|
-
size:
|
|
369
|
-
title:
|
|
370
|
-
} = t,
|
|
371
|
-
return
|
|
379
|
+
attr: d,
|
|
380
|
+
size: f,
|
|
381
|
+
title: w
|
|
382
|
+
} = t, k = st(t, lt), R = f || c.size || "1em", b;
|
|
383
|
+
return c.className && (b = c.className), t.className && (b = (b ? b + " " : "") + t.className), /* @__PURE__ */ W.createElement("svg", he({
|
|
372
384
|
stroke: "currentColor",
|
|
373
385
|
fill: "currentColor",
|
|
374
386
|
strokeWidth: "0"
|
|
375
|
-
},
|
|
376
|
-
className:
|
|
377
|
-
style:
|
|
378
|
-
color: t.color ||
|
|
379
|
-
},
|
|
380
|
-
height:
|
|
381
|
-
width:
|
|
387
|
+
}, c.attr, d, k, {
|
|
388
|
+
className: b,
|
|
389
|
+
style: pe(pe({
|
|
390
|
+
color: t.color || c.color
|
|
391
|
+
}, c.style), t.style),
|
|
392
|
+
height: R,
|
|
393
|
+
width: R,
|
|
382
394
|
xmlns: "http://www.w3.org/2000/svg"
|
|
383
|
-
}),
|
|
395
|
+
}), w && /* @__PURE__ */ W.createElement("title", null, w), t.children);
|
|
384
396
|
};
|
|
385
|
-
return
|
|
397
|
+
return He !== void 0 ? /* @__PURE__ */ W.createElement(He.Consumer, null, (c) => s(c)) : s(Be);
|
|
386
398
|
}
|
|
387
|
-
function
|
|
388
|
-
return
|
|
399
|
+
function mt(t) {
|
|
400
|
+
return z({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z" }, child: [] }] })(t);
|
|
389
401
|
}
|
|
390
|
-
function
|
|
391
|
-
return
|
|
402
|
+
function ht(t) {
|
|
403
|
+
return z({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z" }, child: [] }] })(t);
|
|
392
404
|
}
|
|
393
|
-
function
|
|
394
|
-
return
|
|
405
|
+
function pt(t) {
|
|
406
|
+
return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z" }, child: [] }] })(t);
|
|
395
407
|
}
|
|
396
|
-
function
|
|
397
|
-
return
|
|
408
|
+
function gt(t) {
|
|
409
|
+
return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z" }, child: [] }] })(t);
|
|
398
410
|
}
|
|
399
|
-
function
|
|
400
|
-
return
|
|
411
|
+
function vt(t) {
|
|
412
|
+
return z({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
|
|
401
413
|
}
|
|
402
|
-
function
|
|
403
|
-
return
|
|
414
|
+
function xt(t) {
|
|
415
|
+
return z({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z" }, child: [] }] })(t);
|
|
404
416
|
}
|
|
405
|
-
function
|
|
406
|
-
return
|
|
417
|
+
function wt(t) {
|
|
418
|
+
return z({ attr: { viewBox: "0 0 544 512" }, child: [{ tag: "path", attr: { d: "M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z" }, child: [] }] })(t);
|
|
407
419
|
}
|
|
408
|
-
function
|
|
409
|
-
return
|
|
420
|
+
function bt(t) {
|
|
421
|
+
return z({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z" }, child: [] }] })(t);
|
|
410
422
|
}
|
|
411
|
-
function
|
|
412
|
-
return
|
|
423
|
+
function yt(t) {
|
|
424
|
+
return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z" }, child: [] }] })(t);
|
|
413
425
|
}
|
|
414
|
-
function
|
|
415
|
-
return
|
|
426
|
+
function Ct(t) {
|
|
427
|
+
return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
|
|
416
428
|
}
|
|
417
|
-
function
|
|
418
|
-
return
|
|
429
|
+
function Rt(t) {
|
|
430
|
+
return z({ attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm194.8 170.2C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.6-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.4-16.2 38.1 4.2 24.6 20.5z" }, child: [] }] })(t);
|
|
419
431
|
}
|
|
420
|
-
function
|
|
421
|
-
return
|
|
432
|
+
function Et(t) {
|
|
433
|
+
return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z" }, child: [] }] })(t);
|
|
422
434
|
}
|
|
423
|
-
function
|
|
424
|
-
return
|
|
435
|
+
function jt(t) {
|
|
436
|
+
return z({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
|
|
425
437
|
}
|
|
426
|
-
function
|
|
427
|
-
return
|
|
438
|
+
function _t(t) {
|
|
439
|
+
return z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M2 20h20v4H2v-4zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5L5.49 17zm4.42-5.61 2.03-5.79h.12l2.03 5.79H9.91z" }, child: [] }] })(t);
|
|
428
440
|
}
|
|
429
|
-
function
|
|
430
|
-
return
|
|
441
|
+
function kt(t) {
|
|
442
|
+
return z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M20 8V5H6.39l3 3h1.83l-.55 1.28 2.09 2.1L14.21 8zM3.41 4.86 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21l1.41-1.41z" }, child: [] }] })(t);
|
|
431
443
|
}
|
|
432
|
-
const
|
|
444
|
+
const Lt = [
|
|
433
445
|
"😀",
|
|
434
446
|
"😁",
|
|
435
447
|
"😂",
|
|
@@ -541,117 +553,119 @@ const ct = [
|
|
|
541
553
|
"👏",
|
|
542
554
|
"🫶",
|
|
543
555
|
"👐"
|
|
544
|
-
],
|
|
556
|
+
], St = ({
|
|
545
557
|
exec: t,
|
|
546
558
|
saveSelection: s,
|
|
547
|
-
handleFileChange:
|
|
548
|
-
handleFontSizeChange:
|
|
549
|
-
handleFontFamilyChange:
|
|
559
|
+
handleFileChange: c,
|
|
560
|
+
handleFontSizeChange: d,
|
|
561
|
+
handleFontFamilyChange: f,
|
|
550
562
|
// insertListBlock,
|
|
551
|
-
insertEmoji:
|
|
552
|
-
handleLink:
|
|
553
|
-
removeFormatting:
|
|
554
|
-
visibleActions:
|
|
555
|
-
className:
|
|
556
|
-
style:
|
|
563
|
+
insertEmoji: w,
|
|
564
|
+
handleLink: k,
|
|
565
|
+
removeFormatting: R,
|
|
566
|
+
visibleActions: b,
|
|
567
|
+
className: I,
|
|
568
|
+
style: P
|
|
557
569
|
}) => {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
570
|
+
var V, Z;
|
|
571
|
+
const T = U(null), D = U(null), E = U(null), [X, B] = F(!1);
|
|
572
|
+
ae(() => {
|
|
573
|
+
const h = (C) => {
|
|
574
|
+
!C.target.closest(".rte-emoji-popup") && !C.target.closest("button[title='Emoji']") && B(!1);
|
|
562
575
|
};
|
|
563
|
-
return document.addEventListener("mousedown",
|
|
576
|
+
return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
|
|
564
577
|
}, []);
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
578
|
+
const A = (h) => {
|
|
579
|
+
var J;
|
|
580
|
+
h.preventDefault();
|
|
581
|
+
const C = h.currentTarget.dataset.command;
|
|
582
|
+
if (C)
|
|
583
|
+
switch (C) {
|
|
570
584
|
case "bold":
|
|
571
585
|
case "italic":
|
|
572
586
|
case "underline":
|
|
573
587
|
case "insertUnorderedList":
|
|
574
588
|
case "insertOrderedList":
|
|
575
589
|
case "removeFormat":
|
|
576
|
-
t(
|
|
590
|
+
t(C);
|
|
577
591
|
break;
|
|
578
592
|
case "insertImage": {
|
|
579
|
-
|
|
593
|
+
(J = T.current) == null || J.click();
|
|
580
594
|
break;
|
|
581
595
|
}
|
|
582
596
|
default:
|
|
583
|
-
console.warn("Unknown command:",
|
|
597
|
+
console.warn("Unknown command:", C);
|
|
584
598
|
}
|
|
585
|
-
},
|
|
586
|
-
t("foreColor",
|
|
587
|
-
},
|
|
588
|
-
t("backColor",
|
|
599
|
+
}, q = (h) => {
|
|
600
|
+
t("foreColor", h.target.value);
|
|
601
|
+
}, H = (h) => {
|
|
602
|
+
t("backColor", h.target.value);
|
|
589
603
|
};
|
|
590
|
-
return /* @__PURE__ */ a.jsxs("div", { className: `rte-toolbar ${
|
|
591
|
-
|
|
604
|
+
return /* @__PURE__ */ a.jsxs("div", { className: `rte-toolbar ${I || ""}`, style: P, children: [
|
|
605
|
+
b.bold && /* @__PURE__ */ a.jsx(
|
|
592
606
|
"button",
|
|
593
607
|
{
|
|
594
608
|
"data-command": "bold",
|
|
595
609
|
title: "Bold",
|
|
596
|
-
onMouseDown:
|
|
597
|
-
children: /* @__PURE__ */ a.jsx(
|
|
610
|
+
onMouseDown: A,
|
|
611
|
+
children: /* @__PURE__ */ a.jsx(xt, {})
|
|
598
612
|
}
|
|
599
613
|
),
|
|
600
|
-
|
|
614
|
+
b.italic && /* @__PURE__ */ a.jsx(
|
|
601
615
|
"button",
|
|
602
616
|
{
|
|
603
617
|
"data-command": "italic",
|
|
604
618
|
title: "Italic",
|
|
605
|
-
onMouseDown:
|
|
606
|
-
children: /* @__PURE__ */ a.jsx(
|
|
619
|
+
onMouseDown: A,
|
|
620
|
+
children: /* @__PURE__ */ a.jsx(bt, {})
|
|
607
621
|
}
|
|
608
622
|
),
|
|
609
|
-
|
|
623
|
+
b.underline && /* @__PURE__ */ a.jsx(
|
|
610
624
|
"button",
|
|
611
625
|
{
|
|
612
626
|
"data-command": "underline",
|
|
613
627
|
title: "Underline",
|
|
614
|
-
onMouseDown:
|
|
615
|
-
children: /* @__PURE__ */ a.jsx(
|
|
628
|
+
onMouseDown: A,
|
|
629
|
+
children: /* @__PURE__ */ a.jsx(jt, {})
|
|
616
630
|
}
|
|
617
631
|
),
|
|
618
|
-
|
|
632
|
+
b.unorderedList && /* @__PURE__ */ a.jsx(
|
|
619
633
|
"button",
|
|
620
634
|
{
|
|
621
635
|
"data-command": "insertUnorderedList",
|
|
622
|
-
onMouseDown:
|
|
636
|
+
onMouseDown: A,
|
|
623
637
|
title: "UnorderedList",
|
|
624
|
-
children: /* @__PURE__ */ a.jsx(
|
|
638
|
+
children: /* @__PURE__ */ a.jsx(Ct, {})
|
|
625
639
|
}
|
|
626
640
|
),
|
|
627
|
-
|
|
641
|
+
b.orderedList && /* @__PURE__ */ a.jsx(
|
|
628
642
|
"button",
|
|
629
643
|
{
|
|
630
644
|
"data-command": "insertOrderedList",
|
|
631
645
|
title: "OrderedList",
|
|
632
|
-
onMouseDown:
|
|
633
|
-
children: /* @__PURE__ */ a.jsx(
|
|
646
|
+
onMouseDown: A,
|
|
647
|
+
children: /* @__PURE__ */ a.jsx(gt, {})
|
|
634
648
|
}
|
|
635
649
|
),
|
|
636
|
-
|
|
637
|
-
|
|
650
|
+
b.link && /* @__PURE__ */ a.jsx("button", { "data-command": "createLink", title: "Link", onClick: k, children: /* @__PURE__ */ a.jsx(yt, {}) }),
|
|
651
|
+
b.removeFormat && /* @__PURE__ */ a.jsx(
|
|
638
652
|
"button",
|
|
639
653
|
{
|
|
640
654
|
"data-command": "Remove format",
|
|
641
655
|
title: "removeFormat",
|
|
642
|
-
onMouseDown: (
|
|
643
|
-
|
|
656
|
+
onMouseDown: (h) => {
|
|
657
|
+
h.preventDefault(), s(), R();
|
|
644
658
|
},
|
|
645
|
-
children: /* @__PURE__ */ a.jsx(
|
|
659
|
+
children: /* @__PURE__ */ a.jsx(kt, {})
|
|
646
660
|
}
|
|
647
661
|
),
|
|
648
|
-
|
|
662
|
+
b.image && /* @__PURE__ */ a.jsx(
|
|
649
663
|
"button",
|
|
650
664
|
{
|
|
651
665
|
"data-command": "insertImage",
|
|
652
666
|
title: "Image",
|
|
653
|
-
onMouseDown:
|
|
654
|
-
children: /* @__PURE__ */ a.jsx(
|
|
667
|
+
onMouseDown: A,
|
|
668
|
+
children: /* @__PURE__ */ a.jsx(pt, {})
|
|
655
669
|
}
|
|
656
670
|
),
|
|
657
671
|
/* @__PURE__ */ a.jsx(
|
|
@@ -659,23 +673,23 @@ const ct = [
|
|
|
659
673
|
{
|
|
660
674
|
type: "file",
|
|
661
675
|
accept: "image/*",
|
|
662
|
-
ref:
|
|
676
|
+
ref: T,
|
|
663
677
|
style: { display: "none" },
|
|
664
|
-
onChange:
|
|
678
|
+
onChange: c
|
|
665
679
|
}
|
|
666
680
|
),
|
|
667
|
-
|
|
681
|
+
b.emoji && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
|
|
668
682
|
/* @__PURE__ */ a.jsx(
|
|
669
683
|
"button",
|
|
670
684
|
{
|
|
671
685
|
title: "Emoji",
|
|
672
|
-
onMouseDown: (
|
|
673
|
-
|
|
686
|
+
onMouseDown: (h) => {
|
|
687
|
+
h.preventDefault(), s(), B((C) => !C);
|
|
674
688
|
},
|
|
675
|
-
children: /* @__PURE__ */ a.jsx(
|
|
689
|
+
children: /* @__PURE__ */ a.jsx(Rt, {})
|
|
676
690
|
}
|
|
677
691
|
),
|
|
678
|
-
|
|
692
|
+
X && /* @__PURE__ */ a.jsx("div", { className: "rte-emoji-popup", children: Lt.map((h) => /* @__PURE__ */ a.jsx(
|
|
679
693
|
"span",
|
|
680
694
|
{
|
|
681
695
|
style: {
|
|
@@ -683,42 +697,44 @@ const ct = [
|
|
|
683
697
|
cursor: "pointer",
|
|
684
698
|
textAlign: "center"
|
|
685
699
|
},
|
|
686
|
-
onMouseDown: (
|
|
687
|
-
|
|
700
|
+
onMouseDown: (C) => {
|
|
701
|
+
C.preventDefault(), w(h), B(!1);
|
|
688
702
|
},
|
|
689
|
-
children:
|
|
703
|
+
children: h
|
|
690
704
|
},
|
|
691
|
-
|
|
705
|
+
h
|
|
692
706
|
)) })
|
|
693
707
|
] }),
|
|
694
|
-
|
|
708
|
+
b.color && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
|
|
695
709
|
/* @__PURE__ */ a.jsx(
|
|
696
710
|
"button",
|
|
697
711
|
{
|
|
698
712
|
title: "Text Color",
|
|
699
|
-
onMouseDown: (
|
|
700
|
-
|
|
713
|
+
onMouseDown: (h) => {
|
|
714
|
+
var C;
|
|
715
|
+
h.preventDefault(), s(), (C = D.current) == null || C.click();
|
|
701
716
|
},
|
|
702
717
|
style: {
|
|
703
718
|
display: "flex",
|
|
704
719
|
alignItems: "center",
|
|
705
720
|
justifyContent: "center",
|
|
706
|
-
color:
|
|
721
|
+
color: ((V = D.current) == null ? void 0 : V.value) || "#000",
|
|
707
722
|
fontSize: "18px"
|
|
708
723
|
},
|
|
709
|
-
children: /* @__PURE__ */ a.jsx(
|
|
724
|
+
children: /* @__PURE__ */ a.jsx(_t, {})
|
|
710
725
|
}
|
|
711
726
|
),
|
|
712
727
|
/* @__PURE__ */ a.jsx(
|
|
713
728
|
"input",
|
|
714
729
|
{
|
|
715
|
-
ref:
|
|
730
|
+
ref: D,
|
|
716
731
|
type: "color",
|
|
717
732
|
defaultValue: "#000000",
|
|
718
|
-
onChange: (
|
|
719
|
-
|
|
733
|
+
onChange: (h) => {
|
|
734
|
+
var C;
|
|
735
|
+
q(h), ((C = h.target.parentElement) == null ? void 0 : C.querySelector(
|
|
720
736
|
"button"
|
|
721
|
-
)).style.color =
|
|
737
|
+
)).style.color = h.target.value;
|
|
722
738
|
},
|
|
723
739
|
style: {
|
|
724
740
|
position: "absolute",
|
|
@@ -730,33 +746,35 @@ const ct = [
|
|
|
730
746
|
}
|
|
731
747
|
)
|
|
732
748
|
] }),
|
|
733
|
-
|
|
749
|
+
b.highlight && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
|
|
734
750
|
/* @__PURE__ */ a.jsx(
|
|
735
751
|
"button",
|
|
736
752
|
{
|
|
737
753
|
title: "Highlight",
|
|
738
|
-
onMouseDown: (
|
|
739
|
-
|
|
754
|
+
onMouseDown: (h) => {
|
|
755
|
+
var C;
|
|
756
|
+
h.preventDefault(), s(), (C = E.current) == null || C.click();
|
|
740
757
|
},
|
|
741
758
|
style: {
|
|
742
759
|
display: "flex",
|
|
743
760
|
alignItems: "center",
|
|
744
761
|
justifyContent: "center",
|
|
745
|
-
color:
|
|
762
|
+
color: ((Z = E.current) == null ? void 0 : Z.value) || "#000",
|
|
746
763
|
fontSize: "18px"
|
|
747
764
|
},
|
|
748
|
-
children: /* @__PURE__ */ a.jsx(
|
|
765
|
+
children: /* @__PURE__ */ a.jsx(wt, {})
|
|
749
766
|
}
|
|
750
767
|
),
|
|
751
768
|
/* @__PURE__ */ a.jsx(
|
|
752
769
|
"input",
|
|
753
770
|
{
|
|
754
|
-
ref:
|
|
771
|
+
ref: E,
|
|
755
772
|
type: "color",
|
|
756
|
-
onChange: (
|
|
757
|
-
|
|
773
|
+
onChange: (h) => {
|
|
774
|
+
var C;
|
|
775
|
+
H(h), ((C = h.target.parentElement) == null ? void 0 : C.querySelector(
|
|
758
776
|
"button"
|
|
759
|
-
)).style.color =
|
|
777
|
+
)).style.color = h.target.value;
|
|
760
778
|
},
|
|
761
779
|
defaultValue: "#000000",
|
|
762
780
|
style: {
|
|
@@ -769,51 +787,51 @@ const ct = [
|
|
|
769
787
|
}
|
|
770
788
|
)
|
|
771
789
|
] }),
|
|
772
|
-
|
|
790
|
+
b.align && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
773
791
|
/* @__PURE__ */ a.jsx(
|
|
774
792
|
"button",
|
|
775
793
|
{
|
|
776
794
|
title: "Align Left",
|
|
777
|
-
onMouseDown: (
|
|
795
|
+
onMouseDown: (h) => h.preventDefault(),
|
|
778
796
|
onClick: () => t("justifyLeft"),
|
|
779
|
-
children: /* @__PURE__ */ a.jsx(
|
|
797
|
+
children: /* @__PURE__ */ a.jsx(vt, {})
|
|
780
798
|
}
|
|
781
799
|
),
|
|
782
800
|
/* @__PURE__ */ a.jsx(
|
|
783
801
|
"button",
|
|
784
802
|
{
|
|
785
803
|
title: "Align Center",
|
|
786
|
-
onMouseDown: (
|
|
804
|
+
onMouseDown: (h) => h.preventDefault(),
|
|
787
805
|
onClick: () => t("justifyCenter"),
|
|
788
|
-
children: /* @__PURE__ */ a.jsx(
|
|
806
|
+
children: /* @__PURE__ */ a.jsx(mt, {})
|
|
789
807
|
}
|
|
790
808
|
),
|
|
791
809
|
/* @__PURE__ */ a.jsx(
|
|
792
810
|
"button",
|
|
793
811
|
{
|
|
794
812
|
title: "Align Right",
|
|
795
|
-
onMouseDown: (
|
|
813
|
+
onMouseDown: (h) => h.preventDefault(),
|
|
796
814
|
onClick: () => t("justifyRight"),
|
|
797
|
-
children: /* @__PURE__ */ a.jsx(
|
|
815
|
+
children: /* @__PURE__ */ a.jsx(ht, {})
|
|
798
816
|
}
|
|
799
817
|
)
|
|
800
818
|
] }),
|
|
801
|
-
|
|
819
|
+
b.table && /* @__PURE__ */ a.jsx(
|
|
802
820
|
"button",
|
|
803
821
|
{
|
|
804
822
|
title: "Insert Table",
|
|
805
|
-
onMouseDown: (
|
|
823
|
+
onMouseDown: (h) => h.preventDefault(),
|
|
806
824
|
onClick: () => t("insertTable"),
|
|
807
|
-
children: /* @__PURE__ */ a.jsx(
|
|
825
|
+
children: /* @__PURE__ */ a.jsx(Et, {})
|
|
808
826
|
}
|
|
809
827
|
),
|
|
810
|
-
|
|
828
|
+
b.fontFamily && /* @__PURE__ */ a.jsxs(
|
|
811
829
|
"select",
|
|
812
830
|
{
|
|
813
831
|
className: "rte-dropdown",
|
|
814
832
|
defaultValue: "",
|
|
815
833
|
onMouseDown: () => s(),
|
|
816
|
-
onChange:
|
|
834
|
+
onChange: f,
|
|
817
835
|
children: [
|
|
818
836
|
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: "Font Family" }),
|
|
819
837
|
/* @__PURE__ */ a.jsx("option", { value: "Arial", children: "Arial" }),
|
|
@@ -824,13 +842,13 @@ const ct = [
|
|
|
824
842
|
]
|
|
825
843
|
}
|
|
826
844
|
),
|
|
827
|
-
|
|
845
|
+
b.fontSize && /* @__PURE__ */ a.jsxs(
|
|
828
846
|
"select",
|
|
829
847
|
{
|
|
830
848
|
className: "rte-dropdown",
|
|
831
849
|
defaultValue: "",
|
|
832
850
|
onMouseDown: () => s(),
|
|
833
|
-
onChange:
|
|
851
|
+
onChange: d,
|
|
834
852
|
children: [
|
|
835
853
|
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: "Font Size" }),
|
|
836
854
|
/* @__PURE__ */ a.jsx("option", { value: "2", children: "Small " }),
|
|
@@ -841,149 +859,149 @@ const ct = [
|
|
|
841
859
|
}
|
|
842
860
|
)
|
|
843
861
|
] });
|
|
844
|
-
},
|
|
862
|
+
}, Tt = ({
|
|
845
863
|
show: t,
|
|
846
864
|
position: s,
|
|
847
|
-
filtered:
|
|
848
|
-
insertMention:
|
|
849
|
-
onClose:
|
|
850
|
-
query:
|
|
865
|
+
filtered: c,
|
|
866
|
+
insertMention: d,
|
|
867
|
+
onClose: f,
|
|
868
|
+
query: w
|
|
851
869
|
}) => {
|
|
852
|
-
const
|
|
853
|
-
return
|
|
854
|
-
const
|
|
855
|
-
|
|
870
|
+
const k = U(null);
|
|
871
|
+
return ae(() => {
|
|
872
|
+
const R = (b) => {
|
|
873
|
+
k.current && !k.current.contains(b.target) && f();
|
|
856
874
|
};
|
|
857
|
-
return t && document.addEventListener("mousedown",
|
|
858
|
-
document.removeEventListener("mousedown",
|
|
875
|
+
return t && document.addEventListener("mousedown", R), () => {
|
|
876
|
+
document.removeEventListener("mousedown", R);
|
|
859
877
|
};
|
|
860
|
-
}, [t,
|
|
878
|
+
}, [t, f]), t ? /* @__PURE__ */ a.jsx(
|
|
861
879
|
"ul",
|
|
862
880
|
{
|
|
863
|
-
ref:
|
|
881
|
+
ref: k,
|
|
864
882
|
className: "rte-popup",
|
|
865
883
|
style: {
|
|
866
884
|
top: s.y,
|
|
867
885
|
left: s.x
|
|
868
886
|
},
|
|
869
|
-
children:
|
|
870
|
-
const
|
|
871
|
-
let
|
|
872
|
-
if (
|
|
873
|
-
const
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
)}</span>` +
|
|
887
|
+
children: c.length > 0 ? c.map(({ key: R, value: b }) => {
|
|
888
|
+
const I = R.toLowerCase(), P = w.toLowerCase(), T = I.indexOf(P);
|
|
889
|
+
let D = R;
|
|
890
|
+
if (T !== -1 && w.length > 0) {
|
|
891
|
+
const E = T + w.length;
|
|
892
|
+
D = R.substring(0, T) + `<span class="rte-highlight">${R.substring(
|
|
893
|
+
T,
|
|
894
|
+
E
|
|
895
|
+
)}</span>` + R.substring(E);
|
|
878
896
|
}
|
|
879
897
|
return /* @__PURE__ */ a.jsx(
|
|
880
898
|
"li",
|
|
881
899
|
{
|
|
882
|
-
onMouseDown: (
|
|
883
|
-
|
|
900
|
+
onMouseDown: (E) => {
|
|
901
|
+
E.preventDefault(), d({ key: R, value: b });
|
|
884
902
|
},
|
|
885
903
|
style: {
|
|
886
904
|
padding: "6px 12px",
|
|
887
905
|
cursor: "pointer",
|
|
888
906
|
fontSize: "14px"
|
|
889
907
|
},
|
|
890
|
-
dangerouslySetInnerHTML: { __html:
|
|
891
|
-
onMouseEnter: (
|
|
892
|
-
onMouseLeave: (
|
|
908
|
+
dangerouslySetInnerHTML: { __html: D },
|
|
909
|
+
onMouseEnter: (E) => E.currentTarget.style.background = "#f0f0f0",
|
|
910
|
+
onMouseLeave: (E) => E.currentTarget.style.background = "#fff"
|
|
893
911
|
},
|
|
894
|
-
|
|
912
|
+
b
|
|
895
913
|
);
|
|
896
914
|
}) : /* @__PURE__ */ a.jsx("li", { style: { padding: "6px 12px", color: "#999" }, children: "No matches" })
|
|
897
915
|
}
|
|
898
916
|
) : null;
|
|
899
917
|
};
|
|
900
|
-
function
|
|
901
|
-
return
|
|
918
|
+
function Ie(t) {
|
|
919
|
+
return z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Minus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,11.5h0a.5.5,0,0,1,0,1H9a.5.5,0,0,1,0-1Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.934A9.933,9.933,0,1,1,21.932,12,9.945,9.945,0,0,1,12,21.934ZM12,3.068A8.933,8.933,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.068Z" }, child: [] }] }] }] })(t);
|
|
902
920
|
}
|
|
903
921
|
function me(t) {
|
|
904
|
-
return
|
|
922
|
+
return z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Plus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,12.5H12.5V15a.5.5,0,0,1-1,0V12.5H9a.5.5,0,0,1,0-1h2.5V9a.5.5,0,0,1,1,0v2.5H15A.5.5,0,0,1,15,12.5Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.932A9.934,9.934,0,1,1,21.932,12,9.944,9.944,0,0,1,12,21.932ZM12,3.065A8.934,8.934,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.065Z" }, child: [] }] }] }] })(t);
|
|
905
923
|
}
|
|
906
|
-
const
|
|
924
|
+
const At = ({
|
|
907
925
|
visible: t,
|
|
908
926
|
x: s,
|
|
909
|
-
y:
|
|
910
|
-
onAction:
|
|
911
|
-
onClose:
|
|
927
|
+
y: c,
|
|
928
|
+
onAction: d,
|
|
929
|
+
onClose: f
|
|
912
930
|
}) => {
|
|
913
931
|
if (!t) return null;
|
|
914
|
-
const
|
|
915
|
-
top:
|
|
932
|
+
const w = {
|
|
933
|
+
top: c,
|
|
916
934
|
left: s
|
|
917
935
|
};
|
|
918
|
-
return /* @__PURE__ */ a.jsxs("div", { style:
|
|
919
|
-
/* @__PURE__ */ a.jsxs("button", { onClick: () =>
|
|
936
|
+
return /* @__PURE__ */ a.jsxs("div", { style: w, className: "rte-table-menu", onMouseLeave: f, children: [
|
|
937
|
+
/* @__PURE__ */ a.jsxs("button", { onClick: () => d("insertRowAbove"), children: [
|
|
920
938
|
/* @__PURE__ */ a.jsx(me, {}),
|
|
921
939
|
" Insert row above"
|
|
922
940
|
] }),
|
|
923
|
-
/* @__PURE__ */ a.jsxs("button", { onClick: () =>
|
|
941
|
+
/* @__PURE__ */ a.jsxs("button", { onClick: () => d("insertRowBelow"), children: [
|
|
924
942
|
/* @__PURE__ */ a.jsx(me, {}),
|
|
925
943
|
" Insert row below"
|
|
926
944
|
] }),
|
|
927
|
-
/* @__PURE__ */ a.jsxs("button", { onClick: () =>
|
|
945
|
+
/* @__PURE__ */ a.jsxs("button", { onClick: () => d("insertColLeft"), children: [
|
|
928
946
|
/* @__PURE__ */ a.jsx(me, {}),
|
|
929
947
|
" Insert col left"
|
|
930
948
|
] }),
|
|
931
|
-
/* @__PURE__ */ a.jsxs("button", { onClick: () =>
|
|
949
|
+
/* @__PURE__ */ a.jsxs("button", { onClick: () => d("insertColRight"), children: [
|
|
932
950
|
/* @__PURE__ */ a.jsx(me, {}),
|
|
933
951
|
" Insert col right"
|
|
934
952
|
] }),
|
|
935
|
-
/* @__PURE__ */ a.jsxs("button", { onClick: () =>
|
|
936
|
-
/* @__PURE__ */ a.jsx(
|
|
953
|
+
/* @__PURE__ */ a.jsxs("button", { onClick: () => d("deleteRow"), children: [
|
|
954
|
+
/* @__PURE__ */ a.jsx(Ie, {}),
|
|
937
955
|
" Delete row"
|
|
938
956
|
] }),
|
|
939
|
-
/* @__PURE__ */ a.jsxs("button", { onClick: () =>
|
|
940
|
-
/* @__PURE__ */ a.jsx(
|
|
957
|
+
/* @__PURE__ */ a.jsxs("button", { onClick: () => d("deleteCol"), children: [
|
|
958
|
+
/* @__PURE__ */ a.jsx(Ie, {}),
|
|
941
959
|
" Delete column"
|
|
942
960
|
] })
|
|
943
961
|
] });
|
|
944
|
-
},
|
|
945
|
-
const
|
|
946
|
-
const
|
|
947
|
-
if (
|
|
948
|
-
|
|
949
|
-
const
|
|
950
|
-
|
|
962
|
+
}, Mt = ({ html: t, className: s, style: c }) => {
|
|
963
|
+
const d = (f) => {
|
|
964
|
+
const w = f.target;
|
|
965
|
+
if (w.tagName === "A") {
|
|
966
|
+
f.preventDefault();
|
|
967
|
+
const k = w.href;
|
|
968
|
+
k && window.open(k, "_blank", "noopener,noreferrer");
|
|
951
969
|
}
|
|
952
970
|
};
|
|
953
971
|
return /* @__PURE__ */ a.jsx(
|
|
954
972
|
"div",
|
|
955
973
|
{
|
|
956
974
|
className: `rte-preview ${s || ""}`,
|
|
957
|
-
style:
|
|
958
|
-
onClick:
|
|
975
|
+
style: c,
|
|
976
|
+
onClick: d,
|
|
959
977
|
dangerouslySetInnerHTML: { __html: t }
|
|
960
978
|
}
|
|
961
979
|
);
|
|
962
|
-
},
|
|
980
|
+
}, zt = ({
|
|
963
981
|
visible: t,
|
|
964
982
|
linkData: s,
|
|
965
|
-
onClose:
|
|
966
|
-
onInsert:
|
|
983
|
+
onClose: c,
|
|
984
|
+
onInsert: d
|
|
967
985
|
}) => {
|
|
968
|
-
const [
|
|
969
|
-
if (
|
|
970
|
-
t ? (
|
|
986
|
+
const [f, w] = F(""), [k, R] = F(""), [b, I] = F(""), [P, T] = F("_self");
|
|
987
|
+
if (ae(() => {
|
|
988
|
+
t ? (w(s.url || ""), R(s.text || ""), I(s.title || ""), T(s.target || "_self")) : (w(""), R(""), I(""), T("_self"));
|
|
971
989
|
}, [t, s]), !t) return null;
|
|
972
|
-
const
|
|
973
|
-
|
|
990
|
+
const D = () => {
|
|
991
|
+
d({ url: f, text: k, title: b, target: P });
|
|
974
992
|
};
|
|
975
993
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
976
|
-
/* @__PURE__ */ a.jsx("div", { className: "rte-link-modal-overlay", onClick:
|
|
994
|
+
/* @__PURE__ */ a.jsx("div", { className: "rte-link-modal-overlay", onClick: c }),
|
|
977
995
|
/* @__PURE__ */ a.jsxs("div", { className: "rte-link-modal", children: [
|
|
978
|
-
/* @__PURE__ */ a.jsx("h4", { className: "rte-link-modal__title", children:
|
|
996
|
+
/* @__PURE__ */ a.jsx("h4", { className: "rte-link-modal__title", children: f ? "Edit Link" : "Insert Link" }),
|
|
979
997
|
/* @__PURE__ */ a.jsx(
|
|
980
998
|
"input",
|
|
981
999
|
{
|
|
982
1000
|
type: "text",
|
|
983
1001
|
className: "rte-link-modal__input",
|
|
984
1002
|
placeholder: "URL",
|
|
985
|
-
value:
|
|
986
|
-
onChange: (
|
|
1003
|
+
value: f,
|
|
1004
|
+
onChange: (E) => w(E.target.value)
|
|
987
1005
|
}
|
|
988
1006
|
),
|
|
989
1007
|
/* @__PURE__ */ a.jsx(
|
|
@@ -992,8 +1010,8 @@ const mt = ({
|
|
|
992
1010
|
type: "text",
|
|
993
1011
|
className: "rte-link-modal__input",
|
|
994
1012
|
placeholder: "Text to Display",
|
|
995
|
-
value:
|
|
996
|
-
onChange: (
|
|
1013
|
+
value: k,
|
|
1014
|
+
onChange: (E) => R(E.target.value)
|
|
997
1015
|
}
|
|
998
1016
|
),
|
|
999
1017
|
/* @__PURE__ */ a.jsx(
|
|
@@ -1002,16 +1020,16 @@ const mt = ({
|
|
|
1002
1020
|
type: "text",
|
|
1003
1021
|
className: "rte-link-modal__input",
|
|
1004
1022
|
placeholder: "Title",
|
|
1005
|
-
value:
|
|
1006
|
-
onChange: (
|
|
1023
|
+
value: b,
|
|
1024
|
+
onChange: (E) => I(E.target.value)
|
|
1007
1025
|
}
|
|
1008
1026
|
),
|
|
1009
1027
|
/* @__PURE__ */ a.jsxs(
|
|
1010
1028
|
"select",
|
|
1011
1029
|
{
|
|
1012
1030
|
className: "rte-link-modal__select",
|
|
1013
|
-
value:
|
|
1014
|
-
onChange: (
|
|
1031
|
+
value: P,
|
|
1032
|
+
onChange: (E) => T(E.target.value),
|
|
1015
1033
|
children: [
|
|
1016
1034
|
/* @__PURE__ */ a.jsx("option", { value: "_self", children: "Same tab" }),
|
|
1017
1035
|
/* @__PURE__ */ a.jsx("option", { value: "_blank", children: "New tab" })
|
|
@@ -1019,23 +1037,23 @@ const mt = ({
|
|
|
1019
1037
|
}
|
|
1020
1038
|
),
|
|
1021
1039
|
/* @__PURE__ */ a.jsxs("div", { className: "rte-link-modal__actions", children: [
|
|
1022
|
-
/* @__PURE__ */ a.jsx("button", { className: "rte-link-modal__btn", onClick:
|
|
1040
|
+
/* @__PURE__ */ a.jsx("button", { className: "rte-link-modal__btn", onClick: c, children: "Cancel" }),
|
|
1023
1041
|
/* @__PURE__ */ a.jsx(
|
|
1024
1042
|
"button",
|
|
1025
1043
|
{
|
|
1026
1044
|
className: "rte-link-modal__btn rte-link-modal__btn--ok",
|
|
1027
|
-
onClick:
|
|
1045
|
+
onClick: D,
|
|
1028
1046
|
children: "OK"
|
|
1029
1047
|
}
|
|
1030
1048
|
)
|
|
1031
1049
|
] })
|
|
1032
1050
|
] })
|
|
1033
1051
|
] });
|
|
1034
|
-
},
|
|
1052
|
+
}, Pt = ({
|
|
1035
1053
|
atSuggestions: t = [],
|
|
1036
1054
|
showOutput: s = !1,
|
|
1037
|
-
showPreview:
|
|
1038
|
-
toolbarConfig:
|
|
1055
|
+
showPreview: c = !1,
|
|
1056
|
+
toolbarConfig: d = {
|
|
1039
1057
|
link: !1,
|
|
1040
1058
|
image: !1,
|
|
1041
1059
|
emoji: !1,
|
|
@@ -1045,19 +1063,20 @@ const mt = ({
|
|
|
1045
1063
|
fontSize: !1,
|
|
1046
1064
|
highlight: !1
|
|
1047
1065
|
},
|
|
1048
|
-
classNames:
|
|
1049
|
-
styles:
|
|
1050
|
-
handleGetHtml:
|
|
1066
|
+
classNames: f = {},
|
|
1067
|
+
styles: w = {},
|
|
1068
|
+
handleGetHtml: k = () => {
|
|
1051
1069
|
}
|
|
1052
1070
|
}) => {
|
|
1053
|
-
|
|
1071
|
+
var Ee, je, _e, ke, Le, Se, Te, Ae;
|
|
1072
|
+
const R = U(null), [b, I] = F("<p>Always bet on Prime!</p>"), [P, T] = F(!1), [D, E] = F({ x: 0, y: 0 }), [X, B] = F(
|
|
1054
1073
|
[]
|
|
1055
|
-
),
|
|
1074
|
+
), A = U(null), q = U(null), [H, V] = F({ visible: !1, x: 0, y: 0 }), [Z, h] = F(!1), C = U(null), [J, le] = F({
|
|
1056
1075
|
url: "",
|
|
1057
1076
|
text: "",
|
|
1058
1077
|
title: "",
|
|
1059
1078
|
target: "_self"
|
|
1060
|
-
}),
|
|
1079
|
+
}), G = {
|
|
1061
1080
|
bold: !0,
|
|
1062
1081
|
italic: !0,
|
|
1063
1082
|
underline: !0,
|
|
@@ -1065,219 +1084,228 @@ const mt = ({
|
|
|
1065
1084
|
unorderedList: !0,
|
|
1066
1085
|
orderedList: !0,
|
|
1067
1086
|
align: !0,
|
|
1068
|
-
link:
|
|
1069
|
-
image:
|
|
1070
|
-
emoji:
|
|
1071
|
-
table:
|
|
1072
|
-
color:
|
|
1073
|
-
fontFamily:
|
|
1074
|
-
fontSize:
|
|
1075
|
-
highlight:
|
|
1076
|
-
}, [ge,
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1087
|
+
link: (Ee = d.link) != null ? Ee : !1,
|
|
1088
|
+
image: (je = d.image) != null ? je : !1,
|
|
1089
|
+
emoji: (_e = d.emoji) != null ? _e : !1,
|
|
1090
|
+
table: (ke = d.table) != null ? ke : !1,
|
|
1091
|
+
color: (Le = d.color) != null ? Le : !1,
|
|
1092
|
+
fontFamily: (Se = d.fontFamily) != null ? Se : !1,
|
|
1093
|
+
fontSize: (Te = d.fontSize) != null ? Te : !1,
|
|
1094
|
+
highlight: (Ae = d.fontSize) != null ? Ae : !1
|
|
1095
|
+
}, [ge, se] = F(""), N = () => R.current, M = () => {
|
|
1096
|
+
var r, o;
|
|
1097
|
+
I((o = (r = N()) == null ? void 0 : r.innerHTML) != null ? o : "");
|
|
1098
|
+
const e = Re();
|
|
1099
|
+
k == null || k(e);
|
|
1100
|
+
}, ie = () => {
|
|
1081
1101
|
const e = window.getSelection();
|
|
1082
|
-
e
|
|
1102
|
+
e != null && e.rangeCount && (A.current = e.getRangeAt(0));
|
|
1083
1103
|
}, $ = () => {
|
|
1084
1104
|
const e = window.getSelection();
|
|
1085
|
-
e &&
|
|
1086
|
-
},
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1105
|
+
e && A.current && (e.removeAllRanges(), e.addRange(A.current));
|
|
1106
|
+
}, ce = (e, r) => {
|
|
1107
|
+
const o = window.getSelection();
|
|
1108
|
+
o && o.rangeCount > 0 && (A.current = o.getRangeAt(0)), $(), document.execCommand(e, !1, r), M();
|
|
1089
1109
|
};
|
|
1090
|
-
|
|
1091
|
-
const e =
|
|
1092
|
-
e && !e.innerHTML && (e.innerHTML =
|
|
1093
|
-
}, []),
|
|
1110
|
+
ae(() => {
|
|
1111
|
+
const e = N();
|
|
1112
|
+
e && !e.innerHTML && (e.innerHTML = b), M();
|
|
1113
|
+
}, []), ae(() => () => {
|
|
1094
1114
|
document.removeEventListener("mousemove", null), document.removeEventListener("mouseup", null);
|
|
1095
1115
|
}, []);
|
|
1096
|
-
const
|
|
1116
|
+
const Q = (e) => {
|
|
1097
1117
|
for (; e && e.nodeName !== "LI"; )
|
|
1098
1118
|
e = e.parentNode;
|
|
1099
1119
|
return e;
|
|
1100
|
-
}, ce = (e) => {
|
|
1101
|
-
let o = 0, r = e.parentElement;
|
|
1102
|
-
for (; r; )
|
|
1103
|
-
(r.tagName === "UL" || r.tagName === "OL") && o++, r = r.parentElement;
|
|
1104
|
-
return o;
|
|
1105
1120
|
}, ue = (e) => {
|
|
1106
|
-
|
|
1121
|
+
let r = 0, o = e.parentElement;
|
|
1122
|
+
for (; o; )
|
|
1123
|
+
(o.tagName === "UL" || o.tagName === "OL") && r++, o = o.parentElement;
|
|
1124
|
+
return r;
|
|
1125
|
+
}, de = (e) => {
|
|
1126
|
+
const r = e.querySelector("li"), o = r ? ue(r) : 1;
|
|
1107
1127
|
if (e.querySelector("[data-hidden-array-start]")) return;
|
|
1108
|
-
const l = `{{#arrayData${
|
|
1128
|
+
const l = `{{#arrayData${o > 1 ? o : ""}}}`, p = `{{/arrayData${o > 1 ? o : ""}}}`, i = document.createElement("span");
|
|
1109
1129
|
i.textContent = l, i.style.display = "none", i.setAttribute("data-hidden-array-start", "true"), e.insertBefore(i, e.firstChild);
|
|
1110
|
-
const
|
|
1111
|
-
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1130
|
+
const u = document.createElement("span");
|
|
1131
|
+
u.textContent = p, u.style.display = "none", u.setAttribute("data-hidden-array-end", "true"), e.appendChild(u);
|
|
1132
|
+
}, ee = (e) => {
|
|
1133
|
+
var x;
|
|
1134
|
+
const r = window.getSelection();
|
|
1135
|
+
if (!(r != null && r.rangeCount)) return;
|
|
1136
|
+
const o = r.getRangeAt(0), l = Q(o.startContainer);
|
|
1137
|
+
let p, i;
|
|
1117
1138
|
if (l) {
|
|
1118
|
-
let
|
|
1119
|
-
|
|
1139
|
+
let m = l.querySelector(e);
|
|
1140
|
+
m || (m = document.createElement(e), m.style.margin = "0", m.style.paddingLeft = "20px", l.appendChild(m)), i = m, p = document.createElement("li"), p.textContent = "", i.appendChild(p);
|
|
1120
1141
|
} else {
|
|
1121
|
-
|
|
1142
|
+
document.execCommand(
|
|
1122
1143
|
e === "ul" ? "insertUnorderedList" : "insertOrderedList"
|
|
1123
|
-
)
|
|
1124
|
-
|
|
1144
|
+
);
|
|
1145
|
+
const m = N();
|
|
1146
|
+
if (i = m == null ? void 0 : m.querySelector(`${e}:last-child`), !i) return;
|
|
1147
|
+
p = i.querySelector("li:last-child");
|
|
1125
1148
|
}
|
|
1126
|
-
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1129
|
-
}, n = (e,
|
|
1130
|
-
e === "insertOrderedList" ?
|
|
1131
|
-
},
|
|
1132
|
-
const
|
|
1133
|
-
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1136
|
-
},
|
|
1149
|
+
de(i);
|
|
1150
|
+
const u = document.createRange();
|
|
1151
|
+
u.setStart(p, 0), u.collapse(!0), r.removeAllRanges(), r.addRange(u), (x = N()) == null || x.focus(), M();
|
|
1152
|
+
}, n = (e, r) => {
|
|
1153
|
+
e === "insertOrderedList" ? ee("ol") : e === "insertUnorderedList" ? ee("ul") : ce(e, r), e === "insertTable" && ve();
|
|
1154
|
+
}, v = (e) => {
|
|
1155
|
+
const r = document.createElement("span");
|
|
1156
|
+
r.textContent = "", e.insertNode(r), e.setStartAfter(r), e.collapse(!0);
|
|
1157
|
+
const o = r.getBoundingClientRect();
|
|
1158
|
+
r.remove(), E({ x: o.left, y: o.bottom + window.scrollY }), B(t || []), T(!0), q.current = e.cloneRange();
|
|
1159
|
+
}, _ = () => {
|
|
1137
1160
|
const e = window.getSelection();
|
|
1138
1161
|
if (!e || e.rangeCount === 0) return null;
|
|
1139
|
-
const
|
|
1140
|
-
let
|
|
1141
|
-
if (!
|
|
1142
|
-
let l =
|
|
1143
|
-
for (l.nodeType !== Node.TEXT_NODE && (l.childNodes && l.childNodes[
|
|
1162
|
+
const r = e.anchorNode;
|
|
1163
|
+
let o = e.anchorOffset;
|
|
1164
|
+
if (!r) return null;
|
|
1165
|
+
let l = r;
|
|
1166
|
+
for (l.nodeType !== Node.TEXT_NODE && (l.childNodes && l.childNodes[o] ? l = l.childNodes[o] : l = r.previousSibling); l; ) {
|
|
1144
1167
|
if (l.nodeType === Node.TEXT_NODE) {
|
|
1145
|
-
const
|
|
1146
|
-
if (
|
|
1147
|
-
const
|
|
1148
|
-
return
|
|
1168
|
+
const p = l.textContent || "", i = l === r ? o : p.length, u = p.lastIndexOf("@", i - 1);
|
|
1169
|
+
if (u !== -1) {
|
|
1170
|
+
const x = document.createRange();
|
|
1171
|
+
return x.setStart(l, u), x.setEnd(l, i), x;
|
|
1149
1172
|
}
|
|
1150
1173
|
}
|
|
1151
1174
|
l = l.previousSibling;
|
|
1152
1175
|
}
|
|
1153
1176
|
return null;
|
|
1154
|
-
},
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1177
|
+
}, S = (e) => {
|
|
1178
|
+
var p;
|
|
1179
|
+
const r = window.getSelection();
|
|
1180
|
+
if (!r) return;
|
|
1181
|
+
const o = _();
|
|
1182
|
+
o ? (r.removeAllRanges(), r.addRange(o)) : q.current && (r.removeAllRanges(), r.addRange(q.current));
|
|
1159
1183
|
const l = document.createElement("span");
|
|
1160
1184
|
l.textContent = `{{${e.key}}}`, l.style.color = "#007bff", l.style.display = "inline", l.contentEditable = "false", l.setAttribute("data-mention", e.value || e.key || "");
|
|
1161
1185
|
try {
|
|
1162
|
-
const
|
|
1163
|
-
if (
|
|
1164
|
-
|
|
1186
|
+
const i = r.rangeCount ? r.getRangeAt(0) : null;
|
|
1187
|
+
if (i)
|
|
1188
|
+
i.deleteContents(), i.insertNode(l);
|
|
1165
1189
|
else {
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1190
|
+
const m = document.createRange(), y = N();
|
|
1191
|
+
m.selectNodeContents(y), m.collapse(!1), m.insertNode(l);
|
|
1168
1192
|
}
|
|
1169
|
-
const
|
|
1170
|
-
l.after(
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1173
|
-
} catch (
|
|
1174
|
-
console.error("insertMention error:",
|
|
1193
|
+
const u = document.createTextNode(" ");
|
|
1194
|
+
l.after(u);
|
|
1195
|
+
const x = document.createRange();
|
|
1196
|
+
x.setStartAfter(u), x.collapse(!0), r.removeAllRanges(), r.addRange(x);
|
|
1197
|
+
} catch (i) {
|
|
1198
|
+
console.error("insertMention error:", i);
|
|
1175
1199
|
}
|
|
1176
|
-
|
|
1177
|
-
},
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1200
|
+
T(!1), (p = N()) == null || p.focus(), M();
|
|
1201
|
+
}, K = (e) => {
|
|
1202
|
+
var o, l, p;
|
|
1203
|
+
const r = e.key.toLowerCase();
|
|
1204
|
+
if ((e.ctrlKey || e.metaKey) && ["b", "i", "u"].includes(r) && (e.preventDefault(), n(
|
|
1205
|
+
r === "b" ? "bold" : r === "i" ? "italic" : r === "u" ? "underline" : ""
|
|
1181
1206
|
)), e.shiftKey && e.key === "2" && e.preventDefault(), e.key === "Enter") {
|
|
1182
|
-
const
|
|
1183
|
-
if (!
|
|
1184
|
-
if (
|
|
1207
|
+
const i = window.getSelection(), u = i != null && i.anchorNode ? Q(i.anchorNode) : null;
|
|
1208
|
+
if (!u) return;
|
|
1209
|
+
if (((o = u.textContent) == null ? void 0 : o.replace(/\u200B/g, "").trim()) === "") {
|
|
1185
1210
|
e.preventDefault();
|
|
1186
|
-
const
|
|
1187
|
-
if (
|
|
1188
|
-
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1191
|
-
const
|
|
1192
|
-
|
|
1211
|
+
const m = u.parentElement, y = m == null ? void 0 : m.closest("li");
|
|
1212
|
+
if (y) {
|
|
1213
|
+
m == null || m.removeChild(u);
|
|
1214
|
+
const g = document.createElement("p");
|
|
1215
|
+
g.innerHTML = "<br />", (l = y.parentElement) == null || l.insertBefore(g, y.nextSibling);
|
|
1216
|
+
const j = document.createRange();
|
|
1217
|
+
j.setStart(g, 0), j.collapse(!0), i == null || i.removeAllRanges(), i == null || i.addRange(j);
|
|
1193
1218
|
} else {
|
|
1194
|
-
const
|
|
1195
|
-
if (
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1219
|
+
const g = u.closest("ul, ol");
|
|
1220
|
+
if (g) {
|
|
1221
|
+
const j = document.createElement("p");
|
|
1222
|
+
j.innerHTML = "<br />", (p = g.parentElement) == null || p.insertBefore(j, g.nextSibling), g.removeChild(u);
|
|
1223
|
+
const O = document.createRange();
|
|
1224
|
+
O.setStart(j, 0), O.collapse(!0), i == null || i.removeAllRanges(), i == null || i.addRange(O);
|
|
1200
1225
|
}
|
|
1201
1226
|
}
|
|
1202
|
-
|
|
1227
|
+
M();
|
|
1203
1228
|
}
|
|
1204
1229
|
}
|
|
1205
|
-
},
|
|
1230
|
+
}, te = (e) => {
|
|
1206
1231
|
if (e.data === "@") {
|
|
1207
|
-
const
|
|
1208
|
-
if (!
|
|
1232
|
+
const o = window.getSelection();
|
|
1233
|
+
if (!(o != null && o.rangeCount)) return;
|
|
1209
1234
|
setTimeout(() => {
|
|
1210
|
-
|
|
1235
|
+
v(o.getRangeAt(0)), se(""), B(t), T(!0);
|
|
1211
1236
|
}, 0);
|
|
1212
1237
|
return;
|
|
1213
1238
|
}
|
|
1214
|
-
if (
|
|
1215
|
-
setTimeout(() =>
|
|
1239
|
+
if (P) {
|
|
1240
|
+
setTimeout(() => L(), 0);
|
|
1216
1241
|
return;
|
|
1217
1242
|
}
|
|
1218
|
-
},
|
|
1219
|
-
if (
|
|
1243
|
+
}, L = () => {
|
|
1244
|
+
if (M(), !P) return;
|
|
1220
1245
|
const e = window.getSelection();
|
|
1221
1246
|
if (!e || !e.anchorNode) return;
|
|
1222
|
-
const
|
|
1223
|
-
if (!
|
|
1224
|
-
|
|
1247
|
+
const o = (e.anchorNode.textContent || "").match(/@([a-zA-Z0-9_]*)$/);
|
|
1248
|
+
if (!o) {
|
|
1249
|
+
T(!1);
|
|
1225
1250
|
return;
|
|
1226
1251
|
}
|
|
1227
|
-
const l =
|
|
1228
|
-
|
|
1229
|
-
const
|
|
1230
|
-
B(
|
|
1231
|
-
},
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1252
|
+
const l = o[1].toLowerCase();
|
|
1253
|
+
se(l);
|
|
1254
|
+
const p = t.filter((i) => i.key.toLowerCase().includes(l));
|
|
1255
|
+
B(p);
|
|
1256
|
+
}, Y = (e) => {
|
|
1257
|
+
var l;
|
|
1258
|
+
const r = (l = e.target.files) == null ? void 0 : l[0];
|
|
1259
|
+
if (!r) return;
|
|
1260
|
+
const o = new FileReader();
|
|
1261
|
+
o.onload = (p) => {
|
|
1262
|
+
var O;
|
|
1263
|
+
const i = (O = p.target) == null ? void 0 : O.result;
|
|
1237
1264
|
$();
|
|
1238
|
-
const
|
|
1239
|
-
let
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1242
|
-
const
|
|
1243
|
-
if (!
|
|
1244
|
-
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1265
|
+
const u = window.getSelection();
|
|
1266
|
+
let x = u && u.rangeCount ? u.getRangeAt(0) : null;
|
|
1267
|
+
const m = document.createElement("img");
|
|
1268
|
+
m.src = i, m.alt = r.name || "image", m.className = "rte-inserted-image", m.contentEditable = "true";
|
|
1269
|
+
const y = N();
|
|
1270
|
+
if (!x || !y) {
|
|
1271
|
+
y == null || y.appendChild(m);
|
|
1272
|
+
const Me = document.createTextNode(" ");
|
|
1273
|
+
y == null || y.appendChild(Me);
|
|
1274
|
+
const we = document.createRange();
|
|
1275
|
+
we.setStartAfter(Me), we.collapse(!0), u == null || u.removeAllRanges(), u == null || u.addRange(we), y == null || y.focus(), M(), e.target.value = "";
|
|
1249
1276
|
return;
|
|
1250
1277
|
}
|
|
1251
|
-
|
|
1252
|
-
const
|
|
1253
|
-
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1256
|
-
},
|
|
1257
|
-
},
|
|
1278
|
+
x.deleteContents(), x.insertNode(m);
|
|
1279
|
+
const g = document.createTextNode(" ");
|
|
1280
|
+
m.after(g);
|
|
1281
|
+
const j = document.createRange();
|
|
1282
|
+
j.setStartAfter(g), j.collapse(!0), u.removeAllRanges(), u.addRange(j), y.focus(), M(), e.target.value = "";
|
|
1283
|
+
}, o.readAsDataURL(r);
|
|
1284
|
+
}, ne = (e) => {
|
|
1285
|
+
var p;
|
|
1258
1286
|
$();
|
|
1259
|
-
const
|
|
1260
|
-
if (!
|
|
1261
|
-
const
|
|
1262
|
-
|
|
1287
|
+
const r = window.getSelection();
|
|
1288
|
+
if (!(r != null && r.rangeCount)) return;
|
|
1289
|
+
const o = r.getRangeAt(0), l = document.createTextNode(e);
|
|
1290
|
+
o.insertNode(l), o.setStartAfter(l), o.collapse(!0), r.removeAllRanges(), r.addRange(o), (p = N()) == null || p.focus(), M();
|
|
1263
1291
|
}, ve = () => {
|
|
1264
1292
|
$();
|
|
1265
1293
|
const e = document.createElement("table");
|
|
1266
1294
|
e.style.borderCollapse = "collapse", e.style.width = "100%", e.style.border = "1px solid #ccc", e.style.margin = "8px 0", e.style.position = "relative";
|
|
1267
|
-
const
|
|
1268
|
-
for (let
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1295
|
+
const r = document.createElement("thead"), o = document.createElement("tbody"), l = document.createElement("tr"), p = document.createElement("tr");
|
|
1296
|
+
for (let x = 0; x < 2; x++) {
|
|
1297
|
+
const m = document.createElement("th");
|
|
1298
|
+
m.textContent = `Header ${x + 1}`, m.style.border = "1px solid #999", m.style.padding = "8px", m.style.position = "relative";
|
|
1299
|
+
const y = document.createElement("td");
|
|
1300
|
+
y.textContent = `Row 1 Col ${x + 1}`, y.style.border = "1px solid #999", y.style.padding = "8px", y.style.position = "relative", xe(m), xe(y), l.appendChild(m), p.appendChild(y);
|
|
1273
1301
|
}
|
|
1274
|
-
|
|
1302
|
+
r.appendChild(l), o.appendChild(p), e.appendChild(r), e.appendChild(o), qe(e), Ve(e);
|
|
1275
1303
|
const i = window.getSelection();
|
|
1276
|
-
if (!i
|
|
1277
|
-
i.getRangeAt(0).insertNode(e),
|
|
1278
|
-
},
|
|
1279
|
-
const
|
|
1280
|
-
Object.assign(
|
|
1304
|
+
if (!(i != null && i.rangeCount)) return;
|
|
1305
|
+
i.getRangeAt(0).insertNode(e), M();
|
|
1306
|
+
}, Ve = (e) => {
|
|
1307
|
+
const r = document.createElement("div");
|
|
1308
|
+
Object.assign(r.style, {
|
|
1281
1309
|
position: "absolute",
|
|
1282
1310
|
width: "14px",
|
|
1283
1311
|
height: "14px",
|
|
@@ -1288,22 +1316,22 @@ const mt = ({
|
|
|
1288
1316
|
zIndex: "20",
|
|
1289
1317
|
borderRadius: "2px"
|
|
1290
1318
|
});
|
|
1291
|
-
let
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1296
|
-
const
|
|
1297
|
-
const
|
|
1298
|
-
e.style.width = `${
|
|
1299
|
-
},
|
|
1300
|
-
document.removeEventListener("mousemove",
|
|
1319
|
+
let o = 0, l = 0, p = 0, i = 0;
|
|
1320
|
+
r.addEventListener("mousedown", (u) => {
|
|
1321
|
+
u.preventDefault(), o = u.clientX, l = u.clientY;
|
|
1322
|
+
const x = e.getBoundingClientRect();
|
|
1323
|
+
p = x.width, i = x.height;
|
|
1324
|
+
const m = (g) => {
|
|
1325
|
+
const j = Math.max(100, p + (g.clientX - o)), O = Math.max(60, i + (g.clientY - l));
|
|
1326
|
+
e.style.width = `${j}px`, e.style.height = `${O}px`, M();
|
|
1327
|
+
}, y = () => {
|
|
1328
|
+
document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", y), M();
|
|
1301
1329
|
};
|
|
1302
|
-
document.addEventListener("mousemove",
|
|
1303
|
-
}), e.appendChild(
|
|
1330
|
+
document.addEventListener("mousemove", m), document.addEventListener("mouseup", y);
|
|
1331
|
+
}), e.appendChild(r);
|
|
1304
1332
|
}, xe = (e) => {
|
|
1305
|
-
const
|
|
1306
|
-
Object.assign(
|
|
1333
|
+
const r = document.createElement("div"), o = document.createElement("div");
|
|
1334
|
+
Object.assign(r.style, {
|
|
1307
1335
|
position: "absolute",
|
|
1308
1336
|
right: "0",
|
|
1309
1337
|
top: "0",
|
|
@@ -1312,7 +1340,7 @@ const mt = ({
|
|
|
1312
1340
|
cursor: "col-resize",
|
|
1313
1341
|
background: "rgba(0,0,0,0.15)",
|
|
1314
1342
|
zIndex: "10"
|
|
1315
|
-
}), Object.assign(
|
|
1343
|
+
}), Object.assign(o.style, {
|
|
1316
1344
|
position: "absolute",
|
|
1317
1345
|
bottom: "0",
|
|
1318
1346
|
left: "0",
|
|
@@ -1321,249 +1349,249 @@ const mt = ({
|
|
|
1321
1349
|
cursor: "row-resize",
|
|
1322
1350
|
background: "rgba(0,0,0,0.15)",
|
|
1323
1351
|
zIndex: "10"
|
|
1324
|
-
}),
|
|
1325
|
-
},
|
|
1326
|
-
let l = 0,
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
}),
|
|
1330
|
-
|
|
1352
|
+
}), Ye(e, r, o), e.appendChild(r), e.appendChild(o);
|
|
1353
|
+
}, Ye = (e, r, o) => {
|
|
1354
|
+
let l = 0, p = 0, i = 0, u = 0;
|
|
1355
|
+
r.addEventListener("mousedown", (g) => {
|
|
1356
|
+
g.preventDefault(), l = g.clientX, i = e.offsetWidth, document.addEventListener("mousemove", x), document.addEventListener("mouseup", y);
|
|
1357
|
+
}), o.addEventListener("mousedown", (g) => {
|
|
1358
|
+
g.preventDefault(), p = g.clientY, u = e.offsetHeight, document.addEventListener("mousemove", m), document.addEventListener("mouseup", y);
|
|
1331
1359
|
});
|
|
1332
|
-
const
|
|
1333
|
-
const
|
|
1334
|
-
e.style.width = `${Math.max(30,
|
|
1335
|
-
},
|
|
1336
|
-
const
|
|
1337
|
-
e.style.height = `${Math.max(20,
|
|
1338
|
-
},
|
|
1339
|
-
document.removeEventListener("mousemove",
|
|
1360
|
+
const x = (g) => {
|
|
1361
|
+
const j = i + (g.clientX - l);
|
|
1362
|
+
e.style.width = `${Math.max(30, j)}px`;
|
|
1363
|
+
}, m = (g) => {
|
|
1364
|
+
const j = u + (g.clientY - p);
|
|
1365
|
+
e.style.height = `${Math.max(20, j)}px`;
|
|
1366
|
+
}, y = () => {
|
|
1367
|
+
document.removeEventListener("mousemove", x), document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", y);
|
|
1340
1368
|
};
|
|
1341
|
-
},
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
},
|
|
1369
|
+
}, Ue = (e) => {
|
|
1370
|
+
const o = e.target.closest("td, th");
|
|
1371
|
+
o && (e.preventDefault(), document.querySelectorAll(".rte-cell-highlight").forEach((l) => l.classList.remove("rte-cell-highlight")), o.classList.add("rte-cell-highlight"), V({ visible: !0, x: e.clientX, y: e.clientY, cell: o }));
|
|
1372
|
+
}, Ce = () => {
|
|
1345
1373
|
document.querySelectorAll(".rte-cell-highlight").forEach((e) => e.classList.remove("rte-cell-highlight"));
|
|
1346
|
-
},
|
|
1347
|
-
if (!
|
|
1348
|
-
const
|
|
1349
|
-
const
|
|
1350
|
-
return
|
|
1374
|
+
}, We = (e) => {
|
|
1375
|
+
if (!H.cell) return;
|
|
1376
|
+
const r = H.cell.closest("table"), o = H.cell.cellIndex, l = H.cell.parentElement.rowIndex, p = (i) => {
|
|
1377
|
+
const u = i.tagName.toLowerCase(), x = document.createElement(u);
|
|
1378
|
+
return x.textContent = i.textContent || "", x.style.cssText = i.style.cssText, xe(x), x;
|
|
1351
1379
|
};
|
|
1352
1380
|
switch (e) {
|
|
1353
1381
|
case "insertRowAbove": {
|
|
1354
|
-
const i =
|
|
1355
|
-
Array.from(i.cells).forEach((
|
|
1356
|
-
|
|
1382
|
+
const i = r.rows[l], u = r.insertRow(l);
|
|
1383
|
+
Array.from(i.cells).forEach((x) => {
|
|
1384
|
+
u.appendChild(p(x));
|
|
1357
1385
|
});
|
|
1358
1386
|
break;
|
|
1359
1387
|
}
|
|
1360
1388
|
case "insertRowBelow": {
|
|
1361
|
-
const i =
|
|
1362
|
-
Array.from(i.cells).forEach((
|
|
1363
|
-
|
|
1389
|
+
const i = r.rows[l], u = r.insertRow(l + 1);
|
|
1390
|
+
Array.from(i.cells).forEach((x) => {
|
|
1391
|
+
u.appendChild(p(x));
|
|
1364
1392
|
});
|
|
1365
1393
|
break;
|
|
1366
1394
|
}
|
|
1367
1395
|
case "insertColLeft": {
|
|
1368
|
-
Array.from(
|
|
1369
|
-
const
|
|
1370
|
-
i.insertBefore(
|
|
1396
|
+
Array.from(r.rows).forEach((i) => {
|
|
1397
|
+
const u = i.cells[o];
|
|
1398
|
+
i.insertBefore(p(u), u);
|
|
1371
1399
|
});
|
|
1372
1400
|
break;
|
|
1373
1401
|
}
|
|
1374
1402
|
case "insertColRight": {
|
|
1375
|
-
Array.from(
|
|
1376
|
-
const
|
|
1377
|
-
i.insertBefore(
|
|
1403
|
+
Array.from(r.rows).forEach((i) => {
|
|
1404
|
+
const u = i.cells[o];
|
|
1405
|
+
i.insertBefore(p(u), u.nextSibling);
|
|
1378
1406
|
});
|
|
1379
1407
|
break;
|
|
1380
1408
|
}
|
|
1381
1409
|
case "deleteRow":
|
|
1382
|
-
|
|
1410
|
+
r.rows.length > 1 && r.deleteRow(l);
|
|
1383
1411
|
break;
|
|
1384
1412
|
case "deleteCol":
|
|
1385
|
-
Array.from(
|
|
1386
|
-
i.cells[
|
|
1413
|
+
Array.from(r.rows).forEach((i) => {
|
|
1414
|
+
i.cells[o] && i.deleteCell(o);
|
|
1387
1415
|
});
|
|
1388
1416
|
break;
|
|
1389
1417
|
}
|
|
1390
|
-
|
|
1391
|
-
},
|
|
1392
|
-
const
|
|
1393
|
-
if (!
|
|
1394
|
-
const
|
|
1395
|
-
|
|
1418
|
+
M(), V(ye(be({}, H), { visible: !1 })), Ce();
|
|
1419
|
+
}, qe = (e) => {
|
|
1420
|
+
const r = e.querySelector("tbody");
|
|
1421
|
+
if (!r || r.querySelector("[data-hidden-table-start]")) return;
|
|
1422
|
+
const o = document.createElement("span");
|
|
1423
|
+
o.textContent = "{{#tableData}}", o.style.display = "none", o.setAttribute("data-hidden-table-start", "true"), r.insertBefore(o, r.firstChild);
|
|
1396
1424
|
const l = document.createElement("span");
|
|
1397
|
-
l.textContent = "{{/tableData}}", l.style.display = "none", l.setAttribute("data-hidden-table-end", "true"),
|
|
1398
|
-
},
|
|
1399
|
-
const e =
|
|
1400
|
-
if (!e) return
|
|
1401
|
-
const
|
|
1402
|
-
return
|
|
1403
|
-
|
|
1404
|
-
}),
|
|
1405
|
-
(
|
|
1406
|
-
}),
|
|
1407
|
-
},
|
|
1408
|
-
|
|
1409
|
-
},
|
|
1410
|
-
const
|
|
1411
|
-
if (!
|
|
1412
|
-
|
|
1413
|
-
let
|
|
1414
|
-
/^https?:\/\//i.test(
|
|
1425
|
+
l.textContent = "{{/tableData}}", l.style.display = "none", l.setAttribute("data-hidden-table-end", "true"), r.appendChild(l);
|
|
1426
|
+
}, Re = () => {
|
|
1427
|
+
const e = N();
|
|
1428
|
+
if (!e) return b;
|
|
1429
|
+
const r = e.cloneNode(!0);
|
|
1430
|
+
return r.querySelectorAll(".rte-cell-highlight").forEach((o) => {
|
|
1431
|
+
o.classList.remove("rte-cell-highlight");
|
|
1432
|
+
}), r.querySelectorAll("div").forEach((o) => {
|
|
1433
|
+
(o.style.cursor === "col-resize" || o.style.cursor === "row-resize" || o.style.cursor === "nwse-resize") && o.remove();
|
|
1434
|
+
}), r.innerHTML;
|
|
1435
|
+
}, Xe = () => {
|
|
1436
|
+
ie(), C.current = A.current, le({ url: "", text: "", title: "", target: "_self" }), h(!0);
|
|
1437
|
+
}, Ze = (e) => {
|
|
1438
|
+
const r = window.getSelection();
|
|
1439
|
+
if (!r || !C.current) return;
|
|
1440
|
+
r.removeAllRanges(), r.addRange(C.current);
|
|
1441
|
+
let o = e.url.trim();
|
|
1442
|
+
/^https?:\/\//i.test(o) || (o = "https://" + o);
|
|
1415
1443
|
const l = document.createElement("a");
|
|
1416
|
-
l.href =
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1444
|
+
l.href = o, l.style.cursor = "pointer", l.style.outline = "none", l.textContent = e.text || o, l.title = e.title, l.target = e.target, l.contentEditable = "true";
|
|
1445
|
+
const p = r.getRangeAt(0);
|
|
1446
|
+
p.deleteContents(), p.insertNode(l);
|
|
1419
1447
|
const i = document.createTextNode(" ");
|
|
1420
1448
|
l.after(i);
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1423
|
-
},
|
|
1424
|
-
const
|
|
1425
|
-
if (
|
|
1426
|
-
const
|
|
1449
|
+
const u = document.createRange();
|
|
1450
|
+
u.setStartAfter(i), u.collapse(!0), r.removeAllRanges(), r.addRange(u), h(!1), M();
|
|
1451
|
+
}, Je = (e) => {
|
|
1452
|
+
const r = e.target;
|
|
1453
|
+
if (r.tagName === "A") {
|
|
1454
|
+
const o = r;
|
|
1427
1455
|
if (e.ctrlKey || e.metaKey) {
|
|
1428
|
-
window.open(
|
|
1456
|
+
window.open(o.href, "_blank", "noopener,noreferrer");
|
|
1429
1457
|
return;
|
|
1430
1458
|
}
|
|
1431
1459
|
e.preventDefault();
|
|
1432
1460
|
const l = document.createRange();
|
|
1433
|
-
l.selectNode(
|
|
1434
|
-
url:
|
|
1435
|
-
text:
|
|
1436
|
-
title:
|
|
1437
|
-
target:
|
|
1438
|
-
}),
|
|
1461
|
+
l.selectNode(o), C.current = l, le({
|
|
1462
|
+
url: o.href,
|
|
1463
|
+
text: o.textContent || o.href,
|
|
1464
|
+
title: o.title,
|
|
1465
|
+
target: o.target
|
|
1466
|
+
}), h(!0);
|
|
1439
1467
|
}
|
|
1440
|
-
},
|
|
1441
|
-
const e =
|
|
1468
|
+
}, Ke = () => {
|
|
1469
|
+
const e = N();
|
|
1442
1470
|
if (!e) return;
|
|
1443
|
-
const o = window.getSelection();
|
|
1444
|
-
if ((!o || o.rangeCount === 0) && S.current) {
|
|
1445
|
-
const b = window.getSelection();
|
|
1446
|
-
b?.removeAllRanges(), b?.addRange(S.current);
|
|
1447
|
-
}
|
|
1448
1471
|
const r = window.getSelection();
|
|
1449
|
-
if (!r || r.rangeCount === 0)
|
|
1450
|
-
|
|
1472
|
+
if ((!r || r.rangeCount === 0) && A.current) {
|
|
1473
|
+
const g = window.getSelection();
|
|
1474
|
+
g == null || g.removeAllRanges(), g == null || g.addRange(A.current);
|
|
1475
|
+
}
|
|
1476
|
+
const o = window.getSelection();
|
|
1477
|
+
if (!o || o.rangeCount === 0) return;
|
|
1478
|
+
const l = o.getRangeAt(0);
|
|
1451
1479
|
$(), document.execCommand("removeFormat", !1);
|
|
1452
|
-
const
|
|
1453
|
-
i.appendChild(
|
|
1454
|
-
const
|
|
1480
|
+
const p = l.cloneContents(), i = document.createElement("div");
|
|
1481
|
+
i.appendChild(p);
|
|
1482
|
+
const u = document.createTreeWalker(
|
|
1455
1483
|
i,
|
|
1456
1484
|
NodeFilter.SHOW_ELEMENT,
|
|
1457
1485
|
null
|
|
1458
|
-
),
|
|
1459
|
-
for (;
|
|
1460
|
-
const
|
|
1461
|
-
|
|
1486
|
+
), x = [];
|
|
1487
|
+
for (; u.nextNode(); ) {
|
|
1488
|
+
const g = u.currentNode, j = g.tagName.toUpperCase(), O = g.getAttribute && g.getAttribute("data-mention") !== null;
|
|
1489
|
+
j !== "A" && !O && x.push(g);
|
|
1462
1490
|
}
|
|
1463
|
-
for (let
|
|
1464
|
-
const
|
|
1465
|
-
if (
|
|
1466
|
-
for (;
|
|
1467
|
-
|
|
1491
|
+
for (let g = x.length - 1; g >= 0; g--) {
|
|
1492
|
+
const j = x[g], O = j.parentNode;
|
|
1493
|
+
if (O) {
|
|
1494
|
+
for (; j.firstChild; ) O.insertBefore(j.firstChild, j);
|
|
1495
|
+
O.removeChild(j);
|
|
1468
1496
|
}
|
|
1469
1497
|
}
|
|
1470
|
-
i.querySelectorAll("[style]").forEach((
|
|
1471
|
-
const
|
|
1472
|
-
for (; i.firstChild; )
|
|
1473
|
-
l.insertNode(
|
|
1474
|
-
const
|
|
1475
|
-
|
|
1498
|
+
i.querySelectorAll("[style]").forEach((g) => g.removeAttribute("style")), l.deleteContents();
|
|
1499
|
+
const m = document.createDocumentFragment();
|
|
1500
|
+
for (; i.firstChild; ) m.appendChild(i.firstChild);
|
|
1501
|
+
l.insertNode(m);
|
|
1502
|
+
const y = document.createRange();
|
|
1503
|
+
y.setStartAfter(
|
|
1476
1504
|
l.endContainer.nodeType === Node.TEXT_NODE ? l.endContainer : l.startContainer
|
|
1477
|
-
),
|
|
1505
|
+
), y.collapse(!0), o.removeAllRanges(), o.addRange(y), e.normalize(), M();
|
|
1478
1506
|
};
|
|
1479
1507
|
return /* @__PURE__ */ a.jsxs(
|
|
1480
1508
|
"div",
|
|
1481
1509
|
{
|
|
1482
|
-
className: `rte-wrapper ${
|
|
1483
|
-
style:
|
|
1510
|
+
className: `rte-wrapper ${(f == null ? void 0 : f.wrapper) || ""}`,
|
|
1511
|
+
style: w.wrapper,
|
|
1484
1512
|
children: [
|
|
1485
1513
|
/* @__PURE__ */ a.jsxs("div", { style: { flex: 1 }, children: [
|
|
1486
1514
|
/* @__PURE__ */ a.jsx(
|
|
1487
|
-
|
|
1515
|
+
St,
|
|
1488
1516
|
{
|
|
1489
1517
|
exec: n,
|
|
1490
|
-
saveSelection:
|
|
1491
|
-
handleFileChange:
|
|
1518
|
+
saveSelection: ie,
|
|
1519
|
+
handleFileChange: Y,
|
|
1492
1520
|
handleFontSizeChange: (e) => n("fontSize", e.target.value),
|
|
1493
1521
|
handleFontFamilyChange: (e) => n("fontName", e.target.value),
|
|
1494
|
-
insertEmoji:
|
|
1495
|
-
handleLink:
|
|
1496
|
-
removeFormatting:
|
|
1497
|
-
visibleActions:
|
|
1498
|
-
className:
|
|
1499
|
-
style:
|
|
1522
|
+
insertEmoji: ne,
|
|
1523
|
+
handleLink: Xe,
|
|
1524
|
+
removeFormatting: Ke,
|
|
1525
|
+
visibleActions: G,
|
|
1526
|
+
className: f.toolbar,
|
|
1527
|
+
style: w.toolbar
|
|
1500
1528
|
}
|
|
1501
1529
|
),
|
|
1502
1530
|
/* @__PURE__ */ a.jsx(
|
|
1503
1531
|
"div",
|
|
1504
1532
|
{
|
|
1505
|
-
ref:
|
|
1506
|
-
className: `rte-editor ${
|
|
1507
|
-
style:
|
|
1533
|
+
ref: R,
|
|
1534
|
+
className: `rte-editor ${(f == null ? void 0 : f.editor) || ""}`,
|
|
1535
|
+
style: w.editor,
|
|
1508
1536
|
contentEditable: !0,
|
|
1509
1537
|
suppressContentEditableWarning: !0,
|
|
1510
|
-
onInput:
|
|
1511
|
-
onKeyDown:
|
|
1512
|
-
onBeforeInput:
|
|
1513
|
-
onContextMenu:
|
|
1514
|
-
onClick:
|
|
1538
|
+
onInput: L,
|
|
1539
|
+
onKeyDown: K,
|
|
1540
|
+
onBeforeInput: te,
|
|
1541
|
+
onContextMenu: Ue,
|
|
1542
|
+
onClick: Je
|
|
1515
1543
|
}
|
|
1516
1544
|
),
|
|
1517
1545
|
/* @__PURE__ */ a.jsx(
|
|
1518
|
-
|
|
1546
|
+
Tt,
|
|
1519
1547
|
{
|
|
1520
|
-
show:
|
|
1521
|
-
position:
|
|
1522
|
-
filtered:
|
|
1523
|
-
insertMention:
|
|
1524
|
-
onClose: () =>
|
|
1548
|
+
show: P,
|
|
1549
|
+
position: D,
|
|
1550
|
+
filtered: X,
|
|
1551
|
+
insertMention: S,
|
|
1552
|
+
onClose: () => T(!1),
|
|
1525
1553
|
query: ge
|
|
1526
1554
|
}
|
|
1527
1555
|
),
|
|
1528
1556
|
s && /* @__PURE__ */ a.jsxs(
|
|
1529
1557
|
"div",
|
|
1530
1558
|
{
|
|
1531
|
-
className: `rte-output ${
|
|
1532
|
-
style:
|
|
1559
|
+
className: `rte-output ${(f == null ? void 0 : f.output) || ""}`,
|
|
1560
|
+
style: w.output,
|
|
1533
1561
|
children: [
|
|
1534
1562
|
/* @__PURE__ */ a.jsx("h4", { children: "Output HTML:" }),
|
|
1535
|
-
/* @__PURE__ */ a.jsx("p", { children:
|
|
1563
|
+
/* @__PURE__ */ a.jsx("p", { children: b })
|
|
1536
1564
|
]
|
|
1537
1565
|
}
|
|
1538
1566
|
),
|
|
1539
1567
|
/* @__PURE__ */ a.jsx(
|
|
1540
|
-
|
|
1568
|
+
At,
|
|
1541
1569
|
{
|
|
1542
|
-
visible:
|
|
1543
|
-
x:
|
|
1544
|
-
y:
|
|
1545
|
-
onAction:
|
|
1570
|
+
visible: H.visible,
|
|
1571
|
+
x: H.x,
|
|
1572
|
+
y: H.y,
|
|
1573
|
+
onAction: We,
|
|
1546
1574
|
onClose: () => {
|
|
1547
|
-
|
|
1575
|
+
V(ye(be({}, H), { visible: !1 })), Ce();
|
|
1548
1576
|
}
|
|
1549
1577
|
}
|
|
1550
1578
|
),
|
|
1551
1579
|
/* @__PURE__ */ a.jsx(
|
|
1552
|
-
|
|
1580
|
+
zt,
|
|
1553
1581
|
{
|
|
1554
|
-
visible:
|
|
1555
|
-
linkData:
|
|
1556
|
-
onClose: () =>
|
|
1557
|
-
onInsert:
|
|
1582
|
+
visible: Z,
|
|
1583
|
+
linkData: J,
|
|
1584
|
+
onClose: () => h(!1),
|
|
1585
|
+
onInsert: Ze
|
|
1558
1586
|
}
|
|
1559
1587
|
)
|
|
1560
1588
|
] }),
|
|
1561
|
-
|
|
1562
|
-
|
|
1589
|
+
c ? /* @__PURE__ */ a.jsx(
|
|
1590
|
+
Mt,
|
|
1563
1591
|
{
|
|
1564
|
-
className:
|
|
1565
|
-
style:
|
|
1566
|
-
html:
|
|
1592
|
+
className: f.preview,
|
|
1593
|
+
style: w.preview,
|
|
1594
|
+
html: Re()
|
|
1567
1595
|
}
|
|
1568
1596
|
) : null
|
|
1569
1597
|
]
|
|
@@ -1571,7 +1599,7 @@ const mt = ({
|
|
|
1571
1599
|
);
|
|
1572
1600
|
};
|
|
1573
1601
|
export {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1602
|
+
Pt as RichTextEditor,
|
|
1603
|
+
Mt as RtePreview,
|
|
1604
|
+
St as RteToolbar
|
|
1577
1605
|
};
|