@remarkablejames/editor 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{ActionMenuButton-DBZjUu-F.js → ActionMenuButton-CpmEfz31.js} +1 -1
- package/lib/{ActionMenuButton-C6jGtl3k.cjs → ActionMenuButton-NfiUDE60.cjs} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +2 -2
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +1 -1
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +15 -16
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +31 -32
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +2 -2
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +1 -1
- package/lib/{Drawer-DTCwtJEs.js → Drawer-CayP4Ww4.js} +13 -13
- package/lib/{Drawer-B031ezmA.cjs → Drawer-DlgdaO_B.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +8 -8
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +36 -36
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +3 -3
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +3 -3
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +8 -8
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +2 -2
- package/lib/History.cjs +1 -1
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +1 -1
- package/lib/{Iframe-D-UYBxiv.js → Iframe-C6Sb97KS.js} +5 -5
- package/lib/{Iframe-BUK2pkOL.cjs → Iframe-CANdxSpV.cjs} +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +3 -3
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +19 -19
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +12 -12
- package/lib/{Indent-Bvt-Qwar.js → Indent-CcFe8py3.js} +1 -1
- package/lib/{Indent-_y6N8MIQ.cjs → Indent-DuB2U6Cs.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +1 -1
- package/lib/{Katex-CJDtvu-v.js → Katex-Bp6AnIUF.js} +3 -4
- package/lib/Katex-DFU1unCm.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +1 -1
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +2 -2
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +1 -1
- package/lib/{LinkEditBlock-Cdqwj_NU.js → LinkEditBlock-BiHumIJR.js} +7 -7
- package/lib/{LinkEditBlock-ewTApx0K.cjs → LinkEditBlock-C2zX0WVK.cjs} +1 -1
- package/lib/Mermaid-B8lQSOGn.cjs +2 -0
- package/lib/{Mermaid-CnMYVX1P.js → Mermaid-Dlx0XTJj.js} +23 -24
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +1 -1
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +1 -1
- package/lib/PaywallSeparator.cjs +1 -0
- package/lib/PaywallSeparator.js +140 -0
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +7 -7
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +2 -2
- package/lib/SlashCommandNodeView-BfWNWGRr.cjs +1 -0
- package/lib/{SlashCommandNodeView-DcoLvt_6.js → SlashCommandNodeView-DzmsYaNc.js} +73 -57
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +1 -1
- package/lib/{Table-B8CHl8jK.cjs → Table-BfM6ywrZ.cjs} +1 -1
- package/lib/{Table-Cu12PvQ_.js → Table-IH34r4jd.js} +2 -2
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +2 -2
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +2 -2
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +1 -1
- package/lib/{Twitter-CrX4XY1j.js → Twitter-FVQKPaq6.js} +7 -7
- package/lib/{Twitter-6HYP_upt.cjs → Twitter-axcoCgD7.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +3 -3
- package/lib/bubble.cjs +3 -3
- package/lib/bubble.js +81 -83
- package/lib/{dropdown-menu-CVwXaR3Z.js → dropdown-menu-Ce2TorkG.js} +1 -1
- package/lib/{dropdown-menu-XIrQk3jr.cjs → dropdown-menu-DirUyRAI.cjs} +1 -1
- package/lib/extensions/PaywallSeparator/PaywallSeparator.d.ts +35 -0
- package/lib/extensions/PaywallSeparator/components/PaywallIcon.d.ts +2 -0
- package/lib/extensions/PaywallSeparator/components/PaywallSeparatorView.d.ts +17 -0
- package/lib/extensions/PaywallSeparator/components/RichTextPaywallSeparator.d.ts +1 -0
- package/lib/extensions/PaywallSeparator/components/index.d.ts +2 -0
- package/lib/extensions/PaywallSeparator/index.d.ts +1 -0
- package/lib/index-BynXHtjJ.cjs +28 -0
- package/lib/{index-B0d-u29p.js → index-CnKgiZFQ.js} +1201 -1050
- package/lib/index.cjs +1 -1
- package/lib/index.js +27 -27
- package/lib/{popover-0syCfWYi.cjs → popover-BdLwAlrM.cjs} +1 -1
- package/lib/{popover-DDT8YRht.js → popover-BzJyaFvy.js} +1 -1
- package/lib/{separator-D8lOAf8f.cjs → separator-CoQaQmFK.cjs} +1 -1
- package/lib/{separator-DRGTEiX4.js → separator-D-fyzbfx.js} +14 -14
- package/lib/style.css +1 -1
- package/lib/types.d.ts +5 -5
- package/package.json +14 -1
- package/lib/Katex-bJXkt-VP.cjs +0 -4
- package/lib/Mermaid-Dwz9o-yM.cjs +0 -2
- package/lib/SlashCommandNodeView-BMgQJ4xT.cjs +0 -1
- package/lib/index-De9MZVWQ.cjs +0 -28
- package/lib/select-D9wQw2qB.js +0 -120
- package/lib/select-DTNz0ZeE.cjs +0 -1
- package/lib/textarea-DfVzbMr5.js +0 -20
- package/lib/textarea-DpkwluT0.cjs +0 -1
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
import { jsxs as y, jsx as n, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as y, jsx as n, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import * as _ from "react";
|
|
3
|
+
import ie, { useCallback as oe, useState as I, useEffect as Ie, useMemo as F, useRef as me } from "react";
|
|
4
|
+
import { Slot as vt } from "@radix-ui/react-slot";
|
|
5
|
+
import { y as er, b as tr, S as rr } from "./index-BG0kQamI.js";
|
|
5
6
|
import "./theme.js";
|
|
6
|
-
import
|
|
7
|
-
import { NotebookPen as Jt, ExternalLink as Kt, X as xt, Loader2 as Qt, WrapText as er, PencilRuler as tr, FlipHorizontal as rr, FlipVertical as ir, CropIcon as nr, ChevronUp as or, Download as ar, Paperclip as sr, Eye as lr, Settings as cr, ZoomOut as dr, ZoomIn as ur, BookMarked as hr, Sigma as fr, SmilePlusIcon as mr, Replace as nt, SmilePlus as gr, Frame as pr, Columns2 as ot, PanelRight as xr, PanelLeft as vr, Clipboard as br, Copy as wr, GripVertical as yr, Plus as Cr, Columns4 as kr, Columns3 as Mr, Heading6 as Tr, Heading5 as Ar, Heading4 as Nr, Heading3 as zr, Heading2 as Ir, Heading1 as Lr, Pilcrow as Sr, ChevronsUpDown as Er, Trash as Rr, Trash2 as Vr, TableCellsSplit as _r, TableCellsMerge as Hr, BetweenVerticalEnd as Dr, BetweenVerticalStart as Or, BetweenHorizonalStart as Pr, BetweenHorizonalEnd as jr, Unlink as Br, Pencil as Ur, Sparkles as $r, Table as Fr, Minimize as Wr, Maximize as Gr, Video as Xr, ImageUp as Yr, Link as Zr, ListTodo as qr, ListOrdered as Jr, List as Kr, IndentDecrease as Qr, IndentIncrease as ei, Type as ti, CodeXml as ri, Code as ii, Superscript as ni, Subscript as oi, ChevronDown as ai, Undo2 as si, Redo2 as li, PaintRoller as ci, Eraser as di, Minus as ui, Strikethrough as hi, Quote as fi, Underline as mi, Italic as gi, LoaderCircle as pi, Bold as xi, Check as vi, LucideTableProperties as bi, LucideSheet as wi, LucideImage as yi, LucideFile as Ci, LucideVideo as ki, LucideAudioLines as Mi } from "lucide-react";
|
|
8
|
-
import { j as Ie, h as Le, a3 as Ti, aa as Ai, N as Ge, k as vt, m as Xe, n as Ni, ab as zi } from "./clsx-BUPZHhq3.js";
|
|
9
|
-
import Ii from "react-image-crop";
|
|
10
|
-
import { Slot as bt } from "@radix-ui/react-slot";
|
|
11
|
-
import { u as ie, I as at, i as st, j as Li, V as Si } from "./index-BGd2HiwP.js";
|
|
12
|
-
import * as ke from "@radix-ui/react-tooltip";
|
|
13
|
-
import * as wt from "@radix-ui/react-toggle";
|
|
14
|
-
import { TextAlignRightIcon as Ei, TextAlignLeftIcon as Ri, TextAlignJustifyIcon as Vi, TextAlignCenterIcon as _i } from "@radix-ui/react-icons";
|
|
15
|
-
import * as ae from "@radix-ui/react-tabs";
|
|
16
|
-
import * as $e from "@radix-ui/react-checkbox";
|
|
7
|
+
import { j as Ae, h as Le, a3 as ir, aa as nr, N as Xe, k as wt, m as Ye, n as or, ab as ar } from "./clsx-BUPZHhq3.js";
|
|
17
8
|
import * as yt from "@radix-ui/react-label";
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
import * as se from "@radix-ui/react-tabs";
|
|
10
|
+
import * as Me from "@radix-ui/react-tooltip";
|
|
11
|
+
import * as D from "@radix-ui/react-select";
|
|
12
|
+
import { NotebookPen as sr, ExternalLink as lr, X as Ct, Loader2 as cr, WrapText as dr, PencilRuler as ur, FlipHorizontal as hr, FlipVertical as fr, CropIcon as mr, ChevronUp as kt, Download as pr, Paperclip as gr, Eye as xr, Settings as br, ZoomOut as vr, ZoomIn as wr, BookMarked as yr, Sigma as Cr, SmilePlusIcon as kr, Replace as at, SmilePlus as Mr, Frame as Nr, Columns2 as st, PanelRight as Tr, PanelLeft as Sr, Clipboard as zr, Copy as Ir, GripVertical as Ar, Plus as Lr, Columns4 as Er, Columns3 as Rr, Heading6 as Vr, Heading5 as _r, Heading4 as Hr, Heading3 as Dr, Heading2 as jr, Heading1 as Pr, Pilcrow as Or, ChevronsUpDown as Br, Trash as Ur, Trash2 as $r, TableCellsSplit as Fr, TableCellsMerge as Wr, BetweenVerticalEnd as Gr, BetweenVerticalStart as Xr, BetweenHorizonalStart as Yr, BetweenHorizonalEnd as Zr, Unlink as qr, Pencil as Jr, Sparkles as Kr, Table as Qr, Minimize as ei, Maximize as ti, Video as ri, ImageUp as ii, Link as ni, ListTodo as oi, ListOrdered as ai, List as si, IndentDecrease as li, IndentIncrease as ci, Type as di, CodeXml as ui, Code as hi, Superscript as fi, Subscript as mi, ChevronDown as Ze, Undo2 as pi, Redo2 as gi, PaintRoller as xi, Eraser as bi, Minus as vi, Strikethrough as wi, Quote as yi, Underline as Ci, Italic as ki, LoaderCircle as Mi, Bold as Ni, Check as Mt, LucideTableProperties as Ti, LucideSheet as Si, LucideImage as zi, LucideFile as Ii, LucideVideo as Ai, LucideAudioLines as Li } from "lucide-react";
|
|
13
|
+
import * as Fe from "@radix-ui/react-checkbox";
|
|
14
|
+
import * as Z from "@radix-ui/react-dialog";
|
|
15
|
+
import Ei from "react-image-crop";
|
|
16
|
+
import { u as ne, I as lt, i as ct, j as Ri, V as Vi } from "./index-BGd2HiwP.js";
|
|
17
|
+
import { TextAlignRightIcon as _i, TextAlignLeftIcon as Hi, TextAlignJustifyIcon as Di, TextAlignCenterIcon as ji } from "@radix-ui/react-icons";
|
|
18
|
+
import * as Nt from "@radix-ui/react-toggle";
|
|
19
|
+
const qe = "-", Pi = (e) => {
|
|
20
|
+
const t = Bi(e), {
|
|
20
21
|
conflictingClassGroups: r,
|
|
21
22
|
conflictingClassGroupModifiers: i
|
|
22
23
|
} = e;
|
|
23
24
|
return {
|
|
24
25
|
getClassGroupId: (l) => {
|
|
25
|
-
const s = l.split(
|
|
26
|
-
return s[0] === "" && s.length !== 1 && s.shift(),
|
|
26
|
+
const s = l.split(qe);
|
|
27
|
+
return s[0] === "" && s.length !== 1 && s.shift(), Tt(s, t) || Oi(l);
|
|
27
28
|
},
|
|
28
29
|
getConflictingClassGroupIds: (l, s) => {
|
|
29
30
|
const c = r[l] || [];
|
|
30
31
|
return s && i[l] ? [...c, ...i[l]] : c;
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
|
-
},
|
|
34
|
+
}, Tt = (e, t) => {
|
|
34
35
|
var l;
|
|
35
36
|
if (e.length === 0)
|
|
36
37
|
return t.classGroupId;
|
|
37
|
-
const r = e[0], i = t.nextPart.get(r), o = i ?
|
|
38
|
+
const r = e[0], i = t.nextPart.get(r), o = i ? Tt(e.slice(1), i) : void 0;
|
|
38
39
|
if (o)
|
|
39
40
|
return o;
|
|
40
41
|
if (t.validators.length === 0)
|
|
41
42
|
return;
|
|
42
|
-
const a = e.join(
|
|
43
|
+
const a = e.join(qe);
|
|
43
44
|
return (l = t.validators.find(({
|
|
44
45
|
validator: s
|
|
45
46
|
}) => s(a))) == null ? void 0 : l.classGroupId;
|
|
46
|
-
},
|
|
47
|
-
if (
|
|
48
|
-
const t =
|
|
47
|
+
}, dt = /^\[(.+)\]$/, Oi = (e) => {
|
|
48
|
+
if (dt.test(e)) {
|
|
49
|
+
const t = dt.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
49
50
|
if (r)
|
|
50
51
|
return "arbitrary.." + r;
|
|
51
52
|
}
|
|
52
|
-
},
|
|
53
|
+
}, Bi = (e) => {
|
|
53
54
|
const {
|
|
54
55
|
theme: t,
|
|
55
56
|
prefix: r
|
|
@@ -57,19 +58,19 @@ const Ye = "-", Hi = (e) => {
|
|
|
57
58
|
nextPart: /* @__PURE__ */ new Map(),
|
|
58
59
|
validators: []
|
|
59
60
|
};
|
|
60
|
-
return
|
|
61
|
-
|
|
61
|
+
return $i(Object.entries(e.classGroups), r).forEach(([a, l]) => {
|
|
62
|
+
We(l, i, a, t);
|
|
62
63
|
}), i;
|
|
63
|
-
},
|
|
64
|
+
}, We = (e, t, r, i) => {
|
|
64
65
|
e.forEach((o) => {
|
|
65
66
|
if (typeof o == "string") {
|
|
66
|
-
const a = o === "" ? t :
|
|
67
|
+
const a = o === "" ? t : ut(t, o);
|
|
67
68
|
a.classGroupId = r;
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
70
71
|
if (typeof o == "function") {
|
|
71
|
-
if (
|
|
72
|
-
|
|
72
|
+
if (Ui(o)) {
|
|
73
|
+
We(o(i), t, r, i);
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
76
|
t.validators.push({
|
|
@@ -79,21 +80,21 @@ const Ye = "-", Hi = (e) => {
|
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
Object.entries(o).forEach(([a, l]) => {
|
|
82
|
-
|
|
83
|
+
We(l, ut(t, a), r, i);
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
|
-
},
|
|
86
|
+
}, ut = (e, t) => {
|
|
86
87
|
let r = e;
|
|
87
|
-
return t.split(
|
|
88
|
+
return t.split(qe).forEach((i) => {
|
|
88
89
|
r.nextPart.has(i) || r.nextPart.set(i, {
|
|
89
90
|
nextPart: /* @__PURE__ */ new Map(),
|
|
90
91
|
validators: []
|
|
91
92
|
}), r = r.nextPart.get(i);
|
|
92
93
|
}), r;
|
|
93
|
-
},
|
|
94
|
+
}, Ui = (e) => e.isThemeGetter, $i = (e, t) => t ? e.map(([r, i]) => {
|
|
94
95
|
const o = i.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([l, s]) => [t + l, s])) : a);
|
|
95
96
|
return [r, o];
|
|
96
|
-
}) : e,
|
|
97
|
+
}) : e, Fi = (e) => {
|
|
97
98
|
if (e < 1)
|
|
98
99
|
return {
|
|
99
100
|
get: () => {
|
|
@@ -117,13 +118,13 @@ const Ye = "-", Hi = (e) => {
|
|
|
117
118
|
r.has(a) ? r.set(a, l) : o(a, l);
|
|
118
119
|
}
|
|
119
120
|
};
|
|
120
|
-
},
|
|
121
|
+
}, St = "!", Wi = (e) => {
|
|
121
122
|
const {
|
|
122
123
|
separator: t,
|
|
123
124
|
experimentalParseClassName: r
|
|
124
125
|
} = e, i = t.length === 1, o = t[0], a = t.length, l = (s) => {
|
|
125
126
|
const c = [];
|
|
126
|
-
let d = 0, f = 0,
|
|
127
|
+
let d = 0, f = 0, g;
|
|
127
128
|
for (let h = 0; h < s.length; h++) {
|
|
128
129
|
let x = s[h];
|
|
129
130
|
if (d === 0) {
|
|
@@ -132,17 +133,17 @@ const Ye = "-", Hi = (e) => {
|
|
|
132
133
|
continue;
|
|
133
134
|
}
|
|
134
135
|
if (x === "/") {
|
|
135
|
-
|
|
136
|
+
g = h;
|
|
136
137
|
continue;
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
140
|
x === "[" ? d++ : x === "]" && d--;
|
|
140
141
|
}
|
|
141
|
-
const u = c.length === 0 ? s : s.substring(f),
|
|
142
|
+
const u = c.length === 0 ? s : s.substring(f), v = u.startsWith(St), p = v ? u.substring(1) : u, k = g && g > f ? g - f : void 0;
|
|
142
143
|
return {
|
|
143
144
|
modifiers: c,
|
|
144
|
-
hasImportantModifier:
|
|
145
|
-
baseClassName:
|
|
145
|
+
hasImportantModifier: v,
|
|
146
|
+
baseClassName: p,
|
|
146
147
|
maybePostfixModifierPosition: k
|
|
147
148
|
};
|
|
148
149
|
};
|
|
@@ -150,7 +151,7 @@ const Ye = "-", Hi = (e) => {
|
|
|
150
151
|
className: s,
|
|
151
152
|
parseClassName: l
|
|
152
153
|
}) : l;
|
|
153
|
-
},
|
|
154
|
+
}, Gi = (e) => {
|
|
154
155
|
if (e.length <= 1)
|
|
155
156
|
return e;
|
|
156
157
|
const t = [];
|
|
@@ -158,27 +159,27 @@ const Ye = "-", Hi = (e) => {
|
|
|
158
159
|
return e.forEach((i) => {
|
|
159
160
|
i[0] === "[" ? (t.push(...r.sort(), i), r = []) : r.push(i);
|
|
160
161
|
}), t.push(...r.sort()), t;
|
|
161
|
-
},
|
|
162
|
-
cache:
|
|
163
|
-
parseClassName:
|
|
164
|
-
...
|
|
165
|
-
}),
|
|
162
|
+
}, Xi = (e) => ({
|
|
163
|
+
cache: Fi(e.cacheSize),
|
|
164
|
+
parseClassName: Wi(e),
|
|
165
|
+
...Pi(e)
|
|
166
|
+
}), Yi = /\s+/, Zi = (e, t) => {
|
|
166
167
|
const {
|
|
167
168
|
parseClassName: r,
|
|
168
169
|
getClassGroupId: i,
|
|
169
170
|
getConflictingClassGroupIds: o
|
|
170
|
-
} = t, a = [], l = e.trim().split(
|
|
171
|
+
} = t, a = [], l = e.trim().split(Yi);
|
|
171
172
|
let s = "";
|
|
172
173
|
for (let c = l.length - 1; c >= 0; c -= 1) {
|
|
173
174
|
const d = l[c], {
|
|
174
175
|
modifiers: f,
|
|
175
|
-
hasImportantModifier:
|
|
176
|
+
hasImportantModifier: g,
|
|
176
177
|
baseClassName: u,
|
|
177
|
-
maybePostfixModifierPosition:
|
|
178
|
+
maybePostfixModifierPosition: v
|
|
178
179
|
} = r(d);
|
|
179
|
-
let
|
|
180
|
+
let p = !!v, k = i(p ? u.substring(0, v) : u);
|
|
180
181
|
if (!k) {
|
|
181
|
-
if (!
|
|
182
|
+
if (!p) {
|
|
182
183
|
s = d + (s.length > 0 ? " " + s : s);
|
|
183
184
|
continue;
|
|
184
185
|
}
|
|
@@ -186,94 +187,94 @@ const Ye = "-", Hi = (e) => {
|
|
|
186
187
|
s = d + (s.length > 0 ? " " + s : s);
|
|
187
188
|
continue;
|
|
188
189
|
}
|
|
189
|
-
|
|
190
|
+
p = !1;
|
|
190
191
|
}
|
|
191
|
-
const h =
|
|
192
|
+
const h = Gi(f).join(":"), x = g ? h + St : h, m = x + k;
|
|
192
193
|
if (a.includes(m))
|
|
193
194
|
continue;
|
|
194
195
|
a.push(m);
|
|
195
|
-
const
|
|
196
|
-
for (let
|
|
197
|
-
const
|
|
198
|
-
a.push(x +
|
|
196
|
+
const T = o(k, p);
|
|
197
|
+
for (let b = 0; b < T.length; ++b) {
|
|
198
|
+
const A = T[b];
|
|
199
|
+
a.push(x + A);
|
|
199
200
|
}
|
|
200
201
|
s = d + (s.length > 0 ? " " + s : s);
|
|
201
202
|
}
|
|
202
203
|
return s;
|
|
203
204
|
};
|
|
204
|
-
function
|
|
205
|
+
function qi() {
|
|
205
206
|
let e = 0, t, r, i = "";
|
|
206
207
|
for (; e < arguments.length; )
|
|
207
|
-
(t = arguments[e++]) && (r =
|
|
208
|
+
(t = arguments[e++]) && (r = zt(t)) && (i && (i += " "), i += r);
|
|
208
209
|
return i;
|
|
209
210
|
}
|
|
210
|
-
const
|
|
211
|
+
const zt = (e) => {
|
|
211
212
|
if (typeof e == "string")
|
|
212
213
|
return e;
|
|
213
214
|
let t, r = "";
|
|
214
215
|
for (let i = 0; i < e.length; i++)
|
|
215
|
-
e[i] && (t =
|
|
216
|
+
e[i] && (t = zt(e[i])) && (r && (r += " "), r += t);
|
|
216
217
|
return r;
|
|
217
218
|
};
|
|
218
|
-
function
|
|
219
|
+
function Ji(e, ...t) {
|
|
219
220
|
let r, i, o, a = l;
|
|
220
221
|
function l(c) {
|
|
221
|
-
const d = t.reduce((f,
|
|
222
|
-
return r =
|
|
222
|
+
const d = t.reduce((f, g) => g(f), e());
|
|
223
|
+
return r = Xi(d), i = r.cache.get, o = r.cache.set, a = s, s(c);
|
|
223
224
|
}
|
|
224
225
|
function s(c) {
|
|
225
226
|
const d = i(c);
|
|
226
227
|
if (d)
|
|
227
228
|
return d;
|
|
228
|
-
const f =
|
|
229
|
+
const f = Zi(c, r);
|
|
229
230
|
return o(c, f), f;
|
|
230
231
|
}
|
|
231
232
|
return function() {
|
|
232
|
-
return a(
|
|
233
|
+
return a(qi.apply(null, arguments));
|
|
233
234
|
};
|
|
234
235
|
}
|
|
235
|
-
const
|
|
236
|
+
const R = (e) => {
|
|
236
237
|
const t = (r) => r[e] || [];
|
|
237
238
|
return t.isThemeGetter = !0, t;
|
|
238
|
-
},
|
|
239
|
-
const i =
|
|
239
|
+
}, It = /^\[(?:([a-z-]+):)?(.+)\]$/i, Ki = /^\d+\/\d+$/, Qi = /* @__PURE__ */ new Set(["px", "full", "screen"]), en = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, tn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, rn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, nn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, on = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, J = (e) => he(e) || Qi.has(e) || Ki.test(e), te = (e) => pe(e, "length", fn), he = (e) => !!e && !Number.isNaN(Number(e)), De = (e) => pe(e, "number", he), be = (e) => !!e && Number.isInteger(Number(e)), an = (e) => e.endsWith("%") && he(e.slice(0, -1)), M = (e) => It.test(e), re = (e) => en.test(e), sn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), ln = (e) => pe(e, sn, At), cn = (e) => pe(e, "position", At), dn = /* @__PURE__ */ new Set(["image", "url"]), un = (e) => pe(e, dn, pn), hn = (e) => pe(e, "", mn), ve = () => !0, pe = (e, t, r) => {
|
|
240
|
+
const i = It.exec(e);
|
|
240
241
|
return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1;
|
|
241
|
-
},
|
|
242
|
+
}, fn = (e) => (
|
|
242
243
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
243
244
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
244
245
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
245
|
-
|
|
246
|
-
), At = () => !1,
|
|
247
|
-
const e =
|
|
246
|
+
tn.test(e) && !rn.test(e)
|
|
247
|
+
), At = () => !1, mn = (e) => nn.test(e), pn = (e) => on.test(e), gn = () => {
|
|
248
|
+
const e = R("colors"), t = R("spacing"), r = R("blur"), i = R("brightness"), o = R("borderColor"), a = R("borderRadius"), l = R("borderSpacing"), s = R("borderWidth"), c = R("contrast"), d = R("grayscale"), f = R("hueRotate"), g = R("invert"), u = R("gap"), v = R("gradientColorStops"), p = R("gradientColorStopPositions"), k = R("inset"), h = R("margin"), x = R("opacity"), m = R("padding"), T = R("saturate"), b = R("scale"), A = R("sepia"), C = R("skew"), L = R("space"), H = R("translate"), P = () => ["auto", "contain", "none"], O = () => ["auto", "hidden", "clip", "visible", "scroll"], U = () => ["auto", M, t], S = () => [M, t], w = () => ["", J, te], N = () => ["auto", he, M], V = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], j = () => ["solid", "dashed", "dotted", "double", "none"], B = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], $ = () => ["", "0", M], W = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [he, M];
|
|
248
249
|
return {
|
|
249
250
|
cacheSize: 500,
|
|
250
251
|
separator: ":",
|
|
251
252
|
theme: {
|
|
252
253
|
colors: [ve],
|
|
253
|
-
spacing: [
|
|
254
|
-
blur: ["none", "",
|
|
255
|
-
brightness:
|
|
254
|
+
spacing: [J, te],
|
|
255
|
+
blur: ["none", "", re, M],
|
|
256
|
+
brightness: G(),
|
|
256
257
|
borderColor: [e],
|
|
257
|
-
borderRadius: ["none", "", "full",
|
|
258
|
-
borderSpacing:
|
|
258
|
+
borderRadius: ["none", "", "full", re, M],
|
|
259
|
+
borderSpacing: S(),
|
|
259
260
|
borderWidth: w(),
|
|
260
|
-
contrast:
|
|
261
|
-
grayscale:
|
|
262
|
-
hueRotate:
|
|
263
|
-
invert:
|
|
264
|
-
gap:
|
|
261
|
+
contrast: G(),
|
|
262
|
+
grayscale: $(),
|
|
263
|
+
hueRotate: G(),
|
|
264
|
+
invert: $(),
|
|
265
|
+
gap: S(),
|
|
265
266
|
gradientColorStops: [e],
|
|
266
|
-
gradientColorStopPositions: [
|
|
267
|
-
inset:
|
|
268
|
-
margin:
|
|
269
|
-
opacity:
|
|
270
|
-
padding:
|
|
271
|
-
saturate:
|
|
272
|
-
scale:
|
|
273
|
-
sepia:
|
|
274
|
-
skew:
|
|
275
|
-
space:
|
|
276
|
-
translate:
|
|
267
|
+
gradientColorStopPositions: [an, te],
|
|
268
|
+
inset: U(),
|
|
269
|
+
margin: U(),
|
|
270
|
+
opacity: G(),
|
|
271
|
+
padding: S(),
|
|
272
|
+
saturate: G(),
|
|
273
|
+
scale: G(),
|
|
274
|
+
sepia: $(),
|
|
275
|
+
skew: G(),
|
|
276
|
+
space: S(),
|
|
277
|
+
translate: S()
|
|
277
278
|
},
|
|
278
279
|
classGroups: {
|
|
279
280
|
// Layout
|
|
@@ -294,21 +295,21 @@ const E = (e) => {
|
|
|
294
295
|
* @see https://tailwindcss.com/docs/columns
|
|
295
296
|
*/
|
|
296
297
|
columns: [{
|
|
297
|
-
columns: [
|
|
298
|
+
columns: [re]
|
|
298
299
|
}],
|
|
299
300
|
/**
|
|
300
301
|
* Break After
|
|
301
302
|
* @see https://tailwindcss.com/docs/break-after
|
|
302
303
|
*/
|
|
303
304
|
"break-after": [{
|
|
304
|
-
"break-after":
|
|
305
|
+
"break-after": W()
|
|
305
306
|
}],
|
|
306
307
|
/**
|
|
307
308
|
* Break Before
|
|
308
309
|
* @see https://tailwindcss.com/docs/break-before
|
|
309
310
|
*/
|
|
310
311
|
"break-before": [{
|
|
311
|
-
"break-before":
|
|
312
|
+
"break-before": W()
|
|
312
313
|
}],
|
|
313
314
|
/**
|
|
314
315
|
* Break Inside
|
|
@@ -367,49 +368,49 @@ const E = (e) => {
|
|
|
367
368
|
* @see https://tailwindcss.com/docs/object-position
|
|
368
369
|
*/
|
|
369
370
|
"object-position": [{
|
|
370
|
-
object: [...
|
|
371
|
+
object: [...V(), M]
|
|
371
372
|
}],
|
|
372
373
|
/**
|
|
373
374
|
* Overflow
|
|
374
375
|
* @see https://tailwindcss.com/docs/overflow
|
|
375
376
|
*/
|
|
376
377
|
overflow: [{
|
|
377
|
-
overflow:
|
|
378
|
+
overflow: O()
|
|
378
379
|
}],
|
|
379
380
|
/**
|
|
380
381
|
* Overflow X
|
|
381
382
|
* @see https://tailwindcss.com/docs/overflow
|
|
382
383
|
*/
|
|
383
384
|
"overflow-x": [{
|
|
384
|
-
"overflow-x":
|
|
385
|
+
"overflow-x": O()
|
|
385
386
|
}],
|
|
386
387
|
/**
|
|
387
388
|
* Overflow Y
|
|
388
389
|
* @see https://tailwindcss.com/docs/overflow
|
|
389
390
|
*/
|
|
390
391
|
"overflow-y": [{
|
|
391
|
-
"overflow-y":
|
|
392
|
+
"overflow-y": O()
|
|
392
393
|
}],
|
|
393
394
|
/**
|
|
394
395
|
* Overscroll Behavior
|
|
395
396
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
396
397
|
*/
|
|
397
398
|
overscroll: [{
|
|
398
|
-
overscroll:
|
|
399
|
+
overscroll: P()
|
|
399
400
|
}],
|
|
400
401
|
/**
|
|
401
402
|
* Overscroll Behavior X
|
|
402
403
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
403
404
|
*/
|
|
404
405
|
"overscroll-x": [{
|
|
405
|
-
"overscroll-x":
|
|
406
|
+
"overscroll-x": P()
|
|
406
407
|
}],
|
|
407
408
|
/**
|
|
408
409
|
* Overscroll Behavior Y
|
|
409
410
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
410
411
|
*/
|
|
411
412
|
"overscroll-y": [{
|
|
412
|
-
"overscroll-y":
|
|
413
|
+
"overscroll-y": P()
|
|
413
414
|
}],
|
|
414
415
|
/**
|
|
415
416
|
* Position
|
|
@@ -489,7 +490,7 @@ const E = (e) => {
|
|
|
489
490
|
* @see https://tailwindcss.com/docs/z-index
|
|
490
491
|
*/
|
|
491
492
|
z: [{
|
|
492
|
-
z: ["auto",
|
|
493
|
+
z: ["auto", be, M]
|
|
493
494
|
}],
|
|
494
495
|
// Flexbox and Grid
|
|
495
496
|
/**
|
|
@@ -497,7 +498,7 @@ const E = (e) => {
|
|
|
497
498
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
498
499
|
*/
|
|
499
500
|
basis: [{
|
|
500
|
-
basis:
|
|
501
|
+
basis: U()
|
|
501
502
|
}],
|
|
502
503
|
/**
|
|
503
504
|
* Flex Direction
|
|
@@ -525,21 +526,21 @@ const E = (e) => {
|
|
|
525
526
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
526
527
|
*/
|
|
527
528
|
grow: [{
|
|
528
|
-
grow:
|
|
529
|
+
grow: $()
|
|
529
530
|
}],
|
|
530
531
|
/**
|
|
531
532
|
* Flex Shrink
|
|
532
533
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
533
534
|
*/
|
|
534
535
|
shrink: [{
|
|
535
|
-
shrink:
|
|
536
|
+
shrink: $()
|
|
536
537
|
}],
|
|
537
538
|
/**
|
|
538
539
|
* Order
|
|
539
540
|
* @see https://tailwindcss.com/docs/order
|
|
540
541
|
*/
|
|
541
542
|
order: [{
|
|
542
|
-
order: ["first", "last", "none",
|
|
543
|
+
order: ["first", "last", "none", be, M]
|
|
543
544
|
}],
|
|
544
545
|
/**
|
|
545
546
|
* Grid Template Columns
|
|
@@ -554,7 +555,7 @@ const E = (e) => {
|
|
|
554
555
|
*/
|
|
555
556
|
"col-start-end": [{
|
|
556
557
|
col: ["auto", {
|
|
557
|
-
span: ["full",
|
|
558
|
+
span: ["full", be, M]
|
|
558
559
|
}, M]
|
|
559
560
|
}],
|
|
560
561
|
/**
|
|
@@ -562,14 +563,14 @@ const E = (e) => {
|
|
|
562
563
|
* @see https://tailwindcss.com/docs/grid-column
|
|
563
564
|
*/
|
|
564
565
|
"col-start": [{
|
|
565
|
-
"col-start":
|
|
566
|
+
"col-start": N()
|
|
566
567
|
}],
|
|
567
568
|
/**
|
|
568
569
|
* Grid Column End
|
|
569
570
|
* @see https://tailwindcss.com/docs/grid-column
|
|
570
571
|
*/
|
|
571
572
|
"col-end": [{
|
|
572
|
-
"col-end":
|
|
573
|
+
"col-end": N()
|
|
573
574
|
}],
|
|
574
575
|
/**
|
|
575
576
|
* Grid Template Rows
|
|
@@ -584,7 +585,7 @@ const E = (e) => {
|
|
|
584
585
|
*/
|
|
585
586
|
"row-start-end": [{
|
|
586
587
|
row: ["auto", {
|
|
587
|
-
span: [
|
|
588
|
+
span: [be, M]
|
|
588
589
|
}, M]
|
|
589
590
|
}],
|
|
590
591
|
/**
|
|
@@ -592,14 +593,14 @@ const E = (e) => {
|
|
|
592
593
|
* @see https://tailwindcss.com/docs/grid-row
|
|
593
594
|
*/
|
|
594
595
|
"row-start": [{
|
|
595
|
-
"row-start":
|
|
596
|
+
"row-start": N()
|
|
596
597
|
}],
|
|
597
598
|
/**
|
|
598
599
|
* Grid Row End
|
|
599
600
|
* @see https://tailwindcss.com/docs/grid-row
|
|
600
601
|
*/
|
|
601
602
|
"row-end": [{
|
|
602
|
-
"row-end":
|
|
603
|
+
"row-end": N()
|
|
603
604
|
}],
|
|
604
605
|
/**
|
|
605
606
|
* Grid Auto Flow
|
|
@@ -838,7 +839,7 @@ const E = (e) => {
|
|
|
838
839
|
* @see https://tailwindcss.com/docs/space
|
|
839
840
|
*/
|
|
840
841
|
"space-x": [{
|
|
841
|
-
"space-x": [
|
|
842
|
+
"space-x": [L]
|
|
842
843
|
}],
|
|
843
844
|
/**
|
|
844
845
|
* Space Between X Reverse
|
|
@@ -850,7 +851,7 @@ const E = (e) => {
|
|
|
850
851
|
* @see https://tailwindcss.com/docs/space
|
|
851
852
|
*/
|
|
852
853
|
"space-y": [{
|
|
853
|
-
"space-y": [
|
|
854
|
+
"space-y": [L]
|
|
854
855
|
}],
|
|
855
856
|
/**
|
|
856
857
|
* Space Between Y Reverse
|
|
@@ -878,8 +879,8 @@ const E = (e) => {
|
|
|
878
879
|
*/
|
|
879
880
|
"max-w": [{
|
|
880
881
|
"max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
|
|
881
|
-
screen: [
|
|
882
|
-
},
|
|
882
|
+
screen: [re]
|
|
883
|
+
}, re]
|
|
883
884
|
}],
|
|
884
885
|
/**
|
|
885
886
|
* Height
|
|
@@ -915,7 +916,7 @@ const E = (e) => {
|
|
|
915
916
|
* @see https://tailwindcss.com/docs/font-size
|
|
916
917
|
*/
|
|
917
918
|
"font-size": [{
|
|
918
|
-
text: ["base",
|
|
919
|
+
text: ["base", re, te]
|
|
919
920
|
}],
|
|
920
921
|
/**
|
|
921
922
|
* Font Smoothing
|
|
@@ -932,7 +933,7 @@ const E = (e) => {
|
|
|
932
933
|
* @see https://tailwindcss.com/docs/font-weight
|
|
933
934
|
*/
|
|
934
935
|
"font-weight": [{
|
|
935
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
936
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", De]
|
|
936
937
|
}],
|
|
937
938
|
/**
|
|
938
939
|
* Font Family
|
|
@@ -983,14 +984,14 @@ const E = (e) => {
|
|
|
983
984
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
984
985
|
*/
|
|
985
986
|
"line-clamp": [{
|
|
986
|
-
"line-clamp": ["none",
|
|
987
|
+
"line-clamp": ["none", he, De]
|
|
987
988
|
}],
|
|
988
989
|
/**
|
|
989
990
|
* Line Height
|
|
990
991
|
* @see https://tailwindcss.com/docs/line-height
|
|
991
992
|
*/
|
|
992
993
|
leading: [{
|
|
993
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
994
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", J, M]
|
|
994
995
|
}],
|
|
995
996
|
/**
|
|
996
997
|
* List Style Image
|
|
@@ -1059,21 +1060,21 @@ const E = (e) => {
|
|
|
1059
1060
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1060
1061
|
*/
|
|
1061
1062
|
"text-decoration-style": [{
|
|
1062
|
-
decoration: [...
|
|
1063
|
+
decoration: [...j(), "wavy"]
|
|
1063
1064
|
}],
|
|
1064
1065
|
/**
|
|
1065
1066
|
* Text Decoration Thickness
|
|
1066
1067
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1067
1068
|
*/
|
|
1068
1069
|
"text-decoration-thickness": [{
|
|
1069
|
-
decoration: ["auto", "from-font",
|
|
1070
|
+
decoration: ["auto", "from-font", J, te]
|
|
1070
1071
|
}],
|
|
1071
1072
|
/**
|
|
1072
1073
|
* Text Underline Offset
|
|
1073
1074
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1074
1075
|
*/
|
|
1075
1076
|
"underline-offset": [{
|
|
1076
|
-
"underline-offset": ["auto",
|
|
1077
|
+
"underline-offset": ["auto", J, M]
|
|
1077
1078
|
}],
|
|
1078
1079
|
/**
|
|
1079
1080
|
* Text Decoration Color
|
|
@@ -1104,7 +1105,7 @@ const E = (e) => {
|
|
|
1104
1105
|
* @see https://tailwindcss.com/docs/text-indent
|
|
1105
1106
|
*/
|
|
1106
1107
|
indent: [{
|
|
1107
|
-
indent:
|
|
1108
|
+
indent: S()
|
|
1108
1109
|
}],
|
|
1109
1110
|
/**
|
|
1110
1111
|
* Vertical Alignment
|
|
@@ -1176,7 +1177,7 @@ const E = (e) => {
|
|
|
1176
1177
|
* @see https://tailwindcss.com/docs/background-position
|
|
1177
1178
|
*/
|
|
1178
1179
|
"bg-position": [{
|
|
1179
|
-
bg: [...
|
|
1180
|
+
bg: [...V(), cn]
|
|
1180
1181
|
}],
|
|
1181
1182
|
/**
|
|
1182
1183
|
* Background Repeat
|
|
@@ -1192,7 +1193,7 @@ const E = (e) => {
|
|
|
1192
1193
|
* @see https://tailwindcss.com/docs/background-size
|
|
1193
1194
|
*/
|
|
1194
1195
|
"bg-size": [{
|
|
1195
|
-
bg: ["auto", "cover", "contain",
|
|
1196
|
+
bg: ["auto", "cover", "contain", ln]
|
|
1196
1197
|
}],
|
|
1197
1198
|
/**
|
|
1198
1199
|
* Background Image
|
|
@@ -1201,7 +1202,7 @@ const E = (e) => {
|
|
|
1201
1202
|
"bg-image": [{
|
|
1202
1203
|
bg: ["none", {
|
|
1203
1204
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1204
|
-
},
|
|
1205
|
+
}, un]
|
|
1205
1206
|
}],
|
|
1206
1207
|
/**
|
|
1207
1208
|
* Background Color
|
|
@@ -1215,42 +1216,42 @@ const E = (e) => {
|
|
|
1215
1216
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1216
1217
|
*/
|
|
1217
1218
|
"gradient-from-pos": [{
|
|
1218
|
-
from: [
|
|
1219
|
+
from: [p]
|
|
1219
1220
|
}],
|
|
1220
1221
|
/**
|
|
1221
1222
|
* Gradient Color Stops Via Position
|
|
1222
1223
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1223
1224
|
*/
|
|
1224
1225
|
"gradient-via-pos": [{
|
|
1225
|
-
via: [
|
|
1226
|
+
via: [p]
|
|
1226
1227
|
}],
|
|
1227
1228
|
/**
|
|
1228
1229
|
* Gradient Color Stops To Position
|
|
1229
1230
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1230
1231
|
*/
|
|
1231
1232
|
"gradient-to-pos": [{
|
|
1232
|
-
to: [
|
|
1233
|
+
to: [p]
|
|
1233
1234
|
}],
|
|
1234
1235
|
/**
|
|
1235
1236
|
* Gradient Color Stops From
|
|
1236
1237
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1237
1238
|
*/
|
|
1238
1239
|
"gradient-from": [{
|
|
1239
|
-
from: [
|
|
1240
|
+
from: [v]
|
|
1240
1241
|
}],
|
|
1241
1242
|
/**
|
|
1242
1243
|
* Gradient Color Stops Via
|
|
1243
1244
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1244
1245
|
*/
|
|
1245
1246
|
"gradient-via": [{
|
|
1246
|
-
via: [
|
|
1247
|
+
via: [v]
|
|
1247
1248
|
}],
|
|
1248
1249
|
/**
|
|
1249
1250
|
* Gradient Color Stops To
|
|
1250
1251
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1251
1252
|
*/
|
|
1252
1253
|
"gradient-to": [{
|
|
1253
|
-
to: [
|
|
1254
|
+
to: [v]
|
|
1254
1255
|
}],
|
|
1255
1256
|
// Borders
|
|
1256
1257
|
/**
|
|
@@ -1433,7 +1434,7 @@ const E = (e) => {
|
|
|
1433
1434
|
* @see https://tailwindcss.com/docs/border-style
|
|
1434
1435
|
*/
|
|
1435
1436
|
"border-style": [{
|
|
1436
|
-
border: [...
|
|
1437
|
+
border: [...j(), "hidden"]
|
|
1437
1438
|
}],
|
|
1438
1439
|
/**
|
|
1439
1440
|
* Divide Width X
|
|
@@ -1471,7 +1472,7 @@ const E = (e) => {
|
|
|
1471
1472
|
* @see https://tailwindcss.com/docs/divide-style
|
|
1472
1473
|
*/
|
|
1473
1474
|
"divide-style": [{
|
|
1474
|
-
divide:
|
|
1475
|
+
divide: j()
|
|
1475
1476
|
}],
|
|
1476
1477
|
/**
|
|
1477
1478
|
* Border Color
|
|
@@ -1548,21 +1549,21 @@ const E = (e) => {
|
|
|
1548
1549
|
* @see https://tailwindcss.com/docs/outline-style
|
|
1549
1550
|
*/
|
|
1550
1551
|
"outline-style": [{
|
|
1551
|
-
outline: ["", ...
|
|
1552
|
+
outline: ["", ...j()]
|
|
1552
1553
|
}],
|
|
1553
1554
|
/**
|
|
1554
1555
|
* Outline Offset
|
|
1555
1556
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
1556
1557
|
*/
|
|
1557
1558
|
"outline-offset": [{
|
|
1558
|
-
"outline-offset": [
|
|
1559
|
+
"outline-offset": [J, M]
|
|
1559
1560
|
}],
|
|
1560
1561
|
/**
|
|
1561
1562
|
* Outline Width
|
|
1562
1563
|
* @see https://tailwindcss.com/docs/outline-width
|
|
1563
1564
|
*/
|
|
1564
1565
|
"outline-w": [{
|
|
1565
|
-
outline: [
|
|
1566
|
+
outline: [J, te]
|
|
1566
1567
|
}],
|
|
1567
1568
|
/**
|
|
1568
1569
|
* Outline Color
|
|
@@ -1602,7 +1603,7 @@ const E = (e) => {
|
|
|
1602
1603
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
1603
1604
|
*/
|
|
1604
1605
|
"ring-offset-w": [{
|
|
1605
|
-
"ring-offset": [
|
|
1606
|
+
"ring-offset": [J, te]
|
|
1606
1607
|
}],
|
|
1607
1608
|
/**
|
|
1608
1609
|
* Ring Offset Color
|
|
@@ -1617,7 +1618,7 @@ const E = (e) => {
|
|
|
1617
1618
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
1618
1619
|
*/
|
|
1619
1620
|
shadow: [{
|
|
1620
|
-
shadow: ["", "inner", "none",
|
|
1621
|
+
shadow: ["", "inner", "none", re, hn]
|
|
1621
1622
|
}],
|
|
1622
1623
|
/**
|
|
1623
1624
|
* Box Shadow Color
|
|
@@ -1638,14 +1639,14 @@ const E = (e) => {
|
|
|
1638
1639
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
1639
1640
|
*/
|
|
1640
1641
|
"mix-blend": [{
|
|
1641
|
-
"mix-blend": [...
|
|
1642
|
+
"mix-blend": [...B(), "plus-lighter", "plus-darker"]
|
|
1642
1643
|
}],
|
|
1643
1644
|
/**
|
|
1644
1645
|
* Background Blend Mode
|
|
1645
1646
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
1646
1647
|
*/
|
|
1647
1648
|
"bg-blend": [{
|
|
1648
|
-
"bg-blend":
|
|
1649
|
+
"bg-blend": B()
|
|
1649
1650
|
}],
|
|
1650
1651
|
// Filters
|
|
1651
1652
|
/**
|
|
@@ -1682,7 +1683,7 @@ const E = (e) => {
|
|
|
1682
1683
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
1683
1684
|
*/
|
|
1684
1685
|
"drop-shadow": [{
|
|
1685
|
-
"drop-shadow": ["", "none",
|
|
1686
|
+
"drop-shadow": ["", "none", re, M]
|
|
1686
1687
|
}],
|
|
1687
1688
|
/**
|
|
1688
1689
|
* Grayscale
|
|
@@ -1703,21 +1704,21 @@ const E = (e) => {
|
|
|
1703
1704
|
* @see https://tailwindcss.com/docs/invert
|
|
1704
1705
|
*/
|
|
1705
1706
|
invert: [{
|
|
1706
|
-
invert: [
|
|
1707
|
+
invert: [g]
|
|
1707
1708
|
}],
|
|
1708
1709
|
/**
|
|
1709
1710
|
* Saturate
|
|
1710
1711
|
* @see https://tailwindcss.com/docs/saturate
|
|
1711
1712
|
*/
|
|
1712
1713
|
saturate: [{
|
|
1713
|
-
saturate: [
|
|
1714
|
+
saturate: [T]
|
|
1714
1715
|
}],
|
|
1715
1716
|
/**
|
|
1716
1717
|
* Sepia
|
|
1717
1718
|
* @see https://tailwindcss.com/docs/sepia
|
|
1718
1719
|
*/
|
|
1719
1720
|
sepia: [{
|
|
1720
|
-
sepia: [
|
|
1721
|
+
sepia: [A]
|
|
1721
1722
|
}],
|
|
1722
1723
|
/**
|
|
1723
1724
|
* Backdrop Filter
|
|
@@ -1767,7 +1768,7 @@ const E = (e) => {
|
|
|
1767
1768
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
1768
1769
|
*/
|
|
1769
1770
|
"backdrop-invert": [{
|
|
1770
|
-
"backdrop-invert": [
|
|
1771
|
+
"backdrop-invert": [g]
|
|
1771
1772
|
}],
|
|
1772
1773
|
/**
|
|
1773
1774
|
* Backdrop Opacity
|
|
@@ -1781,14 +1782,14 @@ const E = (e) => {
|
|
|
1781
1782
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
1782
1783
|
*/
|
|
1783
1784
|
"backdrop-saturate": [{
|
|
1784
|
-
"backdrop-saturate": [
|
|
1785
|
+
"backdrop-saturate": [T]
|
|
1785
1786
|
}],
|
|
1786
1787
|
/**
|
|
1787
1788
|
* Backdrop Sepia
|
|
1788
1789
|
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
1789
1790
|
*/
|
|
1790
1791
|
"backdrop-sepia": [{
|
|
1791
|
-
"backdrop-sepia": [
|
|
1792
|
+
"backdrop-sepia": [A]
|
|
1792
1793
|
}],
|
|
1793
1794
|
// Tables
|
|
1794
1795
|
/**
|
|
@@ -1846,7 +1847,7 @@ const E = (e) => {
|
|
|
1846
1847
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
1847
1848
|
*/
|
|
1848
1849
|
duration: [{
|
|
1849
|
-
duration:
|
|
1850
|
+
duration: G()
|
|
1850
1851
|
}],
|
|
1851
1852
|
/**
|
|
1852
1853
|
* Transition Timing Function
|
|
@@ -1860,7 +1861,7 @@ const E = (e) => {
|
|
|
1860
1861
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
1861
1862
|
*/
|
|
1862
1863
|
delay: [{
|
|
1863
|
-
delay:
|
|
1864
|
+
delay: G()
|
|
1864
1865
|
}],
|
|
1865
1866
|
/**
|
|
1866
1867
|
* Animation
|
|
@@ -1882,42 +1883,42 @@ const E = (e) => {
|
|
|
1882
1883
|
* @see https://tailwindcss.com/docs/scale
|
|
1883
1884
|
*/
|
|
1884
1885
|
scale: [{
|
|
1885
|
-
scale: [
|
|
1886
|
+
scale: [b]
|
|
1886
1887
|
}],
|
|
1887
1888
|
/**
|
|
1888
1889
|
* Scale X
|
|
1889
1890
|
* @see https://tailwindcss.com/docs/scale
|
|
1890
1891
|
*/
|
|
1891
1892
|
"scale-x": [{
|
|
1892
|
-
"scale-x": [
|
|
1893
|
+
"scale-x": [b]
|
|
1893
1894
|
}],
|
|
1894
1895
|
/**
|
|
1895
1896
|
* Scale Y
|
|
1896
1897
|
* @see https://tailwindcss.com/docs/scale
|
|
1897
1898
|
*/
|
|
1898
1899
|
"scale-y": [{
|
|
1899
|
-
"scale-y": [
|
|
1900
|
+
"scale-y": [b]
|
|
1900
1901
|
}],
|
|
1901
1902
|
/**
|
|
1902
1903
|
* Rotate
|
|
1903
1904
|
* @see https://tailwindcss.com/docs/rotate
|
|
1904
1905
|
*/
|
|
1905
1906
|
rotate: [{
|
|
1906
|
-
rotate: [
|
|
1907
|
+
rotate: [be, M]
|
|
1907
1908
|
}],
|
|
1908
1909
|
/**
|
|
1909
1910
|
* Translate X
|
|
1910
1911
|
* @see https://tailwindcss.com/docs/translate
|
|
1911
1912
|
*/
|
|
1912
1913
|
"translate-x": [{
|
|
1913
|
-
"translate-x": [
|
|
1914
|
+
"translate-x": [H]
|
|
1914
1915
|
}],
|
|
1915
1916
|
/**
|
|
1916
1917
|
* Translate Y
|
|
1917
1918
|
* @see https://tailwindcss.com/docs/translate
|
|
1918
1919
|
*/
|
|
1919
1920
|
"translate-y": [{
|
|
1920
|
-
"translate-y": [
|
|
1921
|
+
"translate-y": [H]
|
|
1921
1922
|
}],
|
|
1922
1923
|
/**
|
|
1923
1924
|
* Skew X
|
|
@@ -1995,126 +1996,126 @@ const E = (e) => {
|
|
|
1995
1996
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
1996
1997
|
*/
|
|
1997
1998
|
"scroll-m": [{
|
|
1998
|
-
"scroll-m":
|
|
1999
|
+
"scroll-m": S()
|
|
1999
2000
|
}],
|
|
2000
2001
|
/**
|
|
2001
2002
|
* Scroll Margin X
|
|
2002
2003
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2003
2004
|
*/
|
|
2004
2005
|
"scroll-mx": [{
|
|
2005
|
-
"scroll-mx":
|
|
2006
|
+
"scroll-mx": S()
|
|
2006
2007
|
}],
|
|
2007
2008
|
/**
|
|
2008
2009
|
* Scroll Margin Y
|
|
2009
2010
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2010
2011
|
*/
|
|
2011
2012
|
"scroll-my": [{
|
|
2012
|
-
"scroll-my":
|
|
2013
|
+
"scroll-my": S()
|
|
2013
2014
|
}],
|
|
2014
2015
|
/**
|
|
2015
2016
|
* Scroll Margin Start
|
|
2016
2017
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2017
2018
|
*/
|
|
2018
2019
|
"scroll-ms": [{
|
|
2019
|
-
"scroll-ms":
|
|
2020
|
+
"scroll-ms": S()
|
|
2020
2021
|
}],
|
|
2021
2022
|
/**
|
|
2022
2023
|
* Scroll Margin End
|
|
2023
2024
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2024
2025
|
*/
|
|
2025
2026
|
"scroll-me": [{
|
|
2026
|
-
"scroll-me":
|
|
2027
|
+
"scroll-me": S()
|
|
2027
2028
|
}],
|
|
2028
2029
|
/**
|
|
2029
2030
|
* Scroll Margin Top
|
|
2030
2031
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2031
2032
|
*/
|
|
2032
2033
|
"scroll-mt": [{
|
|
2033
|
-
"scroll-mt":
|
|
2034
|
+
"scroll-mt": S()
|
|
2034
2035
|
}],
|
|
2035
2036
|
/**
|
|
2036
2037
|
* Scroll Margin Right
|
|
2037
2038
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2038
2039
|
*/
|
|
2039
2040
|
"scroll-mr": [{
|
|
2040
|
-
"scroll-mr":
|
|
2041
|
+
"scroll-mr": S()
|
|
2041
2042
|
}],
|
|
2042
2043
|
/**
|
|
2043
2044
|
* Scroll Margin Bottom
|
|
2044
2045
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2045
2046
|
*/
|
|
2046
2047
|
"scroll-mb": [{
|
|
2047
|
-
"scroll-mb":
|
|
2048
|
+
"scroll-mb": S()
|
|
2048
2049
|
}],
|
|
2049
2050
|
/**
|
|
2050
2051
|
* Scroll Margin Left
|
|
2051
2052
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2052
2053
|
*/
|
|
2053
2054
|
"scroll-ml": [{
|
|
2054
|
-
"scroll-ml":
|
|
2055
|
+
"scroll-ml": S()
|
|
2055
2056
|
}],
|
|
2056
2057
|
/**
|
|
2057
2058
|
* Scroll Padding
|
|
2058
2059
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2059
2060
|
*/
|
|
2060
2061
|
"scroll-p": [{
|
|
2061
|
-
"scroll-p":
|
|
2062
|
+
"scroll-p": S()
|
|
2062
2063
|
}],
|
|
2063
2064
|
/**
|
|
2064
2065
|
* Scroll Padding X
|
|
2065
2066
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2066
2067
|
*/
|
|
2067
2068
|
"scroll-px": [{
|
|
2068
|
-
"scroll-px":
|
|
2069
|
+
"scroll-px": S()
|
|
2069
2070
|
}],
|
|
2070
2071
|
/**
|
|
2071
2072
|
* Scroll Padding Y
|
|
2072
2073
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2073
2074
|
*/
|
|
2074
2075
|
"scroll-py": [{
|
|
2075
|
-
"scroll-py":
|
|
2076
|
+
"scroll-py": S()
|
|
2076
2077
|
}],
|
|
2077
2078
|
/**
|
|
2078
2079
|
* Scroll Padding Start
|
|
2079
2080
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2080
2081
|
*/
|
|
2081
2082
|
"scroll-ps": [{
|
|
2082
|
-
"scroll-ps":
|
|
2083
|
+
"scroll-ps": S()
|
|
2083
2084
|
}],
|
|
2084
2085
|
/**
|
|
2085
2086
|
* Scroll Padding End
|
|
2086
2087
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2087
2088
|
*/
|
|
2088
2089
|
"scroll-pe": [{
|
|
2089
|
-
"scroll-pe":
|
|
2090
|
+
"scroll-pe": S()
|
|
2090
2091
|
}],
|
|
2091
2092
|
/**
|
|
2092
2093
|
* Scroll Padding Top
|
|
2093
2094
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2094
2095
|
*/
|
|
2095
2096
|
"scroll-pt": [{
|
|
2096
|
-
"scroll-pt":
|
|
2097
|
+
"scroll-pt": S()
|
|
2097
2098
|
}],
|
|
2098
2099
|
/**
|
|
2099
2100
|
* Scroll Padding Right
|
|
2100
2101
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2101
2102
|
*/
|
|
2102
2103
|
"scroll-pr": [{
|
|
2103
|
-
"scroll-pr":
|
|
2104
|
+
"scroll-pr": S()
|
|
2104
2105
|
}],
|
|
2105
2106
|
/**
|
|
2106
2107
|
* Scroll Padding Bottom
|
|
2107
2108
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2108
2109
|
*/
|
|
2109
2110
|
"scroll-pb": [{
|
|
2110
|
-
"scroll-pb":
|
|
2111
|
+
"scroll-pb": S()
|
|
2111
2112
|
}],
|
|
2112
2113
|
/**
|
|
2113
2114
|
* Scroll Padding Left
|
|
2114
2115
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2115
2116
|
*/
|
|
2116
2117
|
"scroll-pl": [{
|
|
2117
|
-
"scroll-pl":
|
|
2118
|
+
"scroll-pl": S()
|
|
2118
2119
|
}],
|
|
2119
2120
|
/**
|
|
2120
2121
|
* Scroll Snap Align
|
|
@@ -2197,7 +2198,7 @@ const E = (e) => {
|
|
|
2197
2198
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
2198
2199
|
*/
|
|
2199
2200
|
"stroke-w": [{
|
|
2200
|
-
stroke: [
|
|
2201
|
+
stroke: [J, te, De]
|
|
2201
2202
|
}],
|
|
2202
2203
|
/**
|
|
2203
2204
|
* Stroke
|
|
@@ -2272,21 +2273,21 @@ const E = (e) => {
|
|
|
2272
2273
|
"font-size": ["leading"]
|
|
2273
2274
|
}
|
|
2274
2275
|
};
|
|
2275
|
-
},
|
|
2276
|
-
function
|
|
2277
|
-
return
|
|
2276
|
+
}, xn = /* @__PURE__ */ Ji(gn);
|
|
2277
|
+
function E(...e) {
|
|
2278
|
+
return xn(Ae(e));
|
|
2278
2279
|
}
|
|
2279
|
-
let
|
|
2280
|
-
function
|
|
2281
|
-
return
|
|
2280
|
+
let je;
|
|
2281
|
+
function Pe() {
|
|
2282
|
+
return je === void 0 && (je = navigator.platform.includes("Mac")), je;
|
|
2282
2283
|
}
|
|
2283
|
-
function
|
|
2284
|
-
return `${e}`.toLowerCase() === "mod" ?
|
|
2284
|
+
function bn(e) {
|
|
2285
|
+
return `${e}`.toLowerCase() === "mod" ? Pe() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Pe() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Pe() ? "⇧" : "Shift" : e;
|
|
2285
2286
|
}
|
|
2286
|
-
function
|
|
2287
|
-
return e.map(
|
|
2287
|
+
function vn(e) {
|
|
2288
|
+
return e.map(bn).join(" ");
|
|
2288
2289
|
}
|
|
2289
|
-
const
|
|
2290
|
+
const fe = ie.forwardRef(
|
|
2290
2291
|
(e, t) => {
|
|
2291
2292
|
const {
|
|
2292
2293
|
icon: r = void 0,
|
|
@@ -2300,44 +2301,44 @@ const he = re.forwardRef(
|
|
|
2300
2301
|
tooltipOptions: c = {},
|
|
2301
2302
|
action: d = void 0,
|
|
2302
2303
|
isActive: f = void 0,
|
|
2303
|
-
children:
|
|
2304
|
+
children: g,
|
|
2304
2305
|
asChild: u = !1,
|
|
2305
|
-
upload:
|
|
2306
|
-
initialDisplayedColor:
|
|
2306
|
+
upload: v = !1,
|
|
2307
|
+
initialDisplayedColor: p = void 0,
|
|
2307
2308
|
dataState: k = !1,
|
|
2308
2309
|
...h
|
|
2309
|
-
} = e, x =
|
|
2310
|
+
} = e, x = Rt[r], m = u ? vt : Vt, T = (b) => {
|
|
2310
2311
|
if (o) {
|
|
2311
|
-
|
|
2312
|
+
b.preventDefault();
|
|
2312
2313
|
return;
|
|
2313
2314
|
}
|
|
2314
|
-
d == null || d(
|
|
2315
|
+
d == null || d(b);
|
|
2315
2316
|
};
|
|
2316
|
-
return /* @__PURE__ */ y(
|
|
2317
|
-
/* @__PURE__ */ n(
|
|
2317
|
+
return /* @__PURE__ */ y(Xn, { children: [
|
|
2318
|
+
/* @__PURE__ */ n(Yn, { asChild: !0, children: /* @__PURE__ */ y(
|
|
2318
2319
|
m,
|
|
2319
2320
|
{
|
|
2320
|
-
className:
|
|
2321
|
+
className: E("richtext-h-[32px] richtext-w-[32px]", a),
|
|
2321
2322
|
"data-state": k ? "on" : "off",
|
|
2322
2323
|
disabled: o,
|
|
2323
|
-
onClick:
|
|
2324
|
+
onClick: T,
|
|
2324
2325
|
ref: t,
|
|
2325
2326
|
size: "sm",
|
|
2326
2327
|
...h,
|
|
2327
2328
|
children: [
|
|
2328
2329
|
x && /* @__PURE__ */ n(x, { className: "richtext-size-4" }),
|
|
2329
|
-
|
|
2330
|
+
g
|
|
2330
2331
|
]
|
|
2331
2332
|
}
|
|
2332
2333
|
) }),
|
|
2333
|
-
i && /* @__PURE__ */ n(
|
|
2334
|
+
i && /* @__PURE__ */ n(_t, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
|
|
2334
2335
|
/* @__PURE__ */ n("div", { children: i }),
|
|
2335
|
-
!!(s != null && s.length) && /* @__PURE__ */ n("span", { children:
|
|
2336
|
+
!!(s != null && s.length) && /* @__PURE__ */ n("span", { children: vn(s) })
|
|
2336
2337
|
] }) })
|
|
2337
2338
|
] });
|
|
2338
2339
|
}
|
|
2339
2340
|
);
|
|
2340
|
-
function
|
|
2341
|
+
function wn(e) {
|
|
2341
2342
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2342
2343
|
"path",
|
|
2343
2344
|
{
|
|
@@ -2346,7 +2347,7 @@ function xn(e) {
|
|
|
2346
2347
|
}
|
|
2347
2348
|
) });
|
|
2348
2349
|
}
|
|
2349
|
-
function
|
|
2350
|
+
function yn(e) {
|
|
2350
2351
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2351
2352
|
"path",
|
|
2352
2353
|
{
|
|
@@ -2359,7 +2360,7 @@ function vn(e) {
|
|
|
2359
2360
|
}
|
|
2360
2361
|
) });
|
|
2361
2362
|
}
|
|
2362
|
-
function
|
|
2363
|
+
function Cn() {
|
|
2363
2364
|
return /* @__PURE__ */ n(
|
|
2364
2365
|
"svg",
|
|
2365
2366
|
{
|
|
@@ -2386,7 +2387,7 @@ function bn() {
|
|
|
2386
2387
|
}
|
|
2387
2388
|
);
|
|
2388
2389
|
}
|
|
2389
|
-
function
|
|
2390
|
+
function kn() {
|
|
2390
2391
|
return /* @__PURE__ */ n(
|
|
2391
2392
|
"svg",
|
|
2392
2393
|
{
|
|
@@ -2413,7 +2414,7 @@ function wn() {
|
|
|
2413
2414
|
}
|
|
2414
2415
|
);
|
|
2415
2416
|
}
|
|
2416
|
-
function
|
|
2417
|
+
function Mn(e) {
|
|
2417
2418
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2418
2419
|
"path",
|
|
2419
2420
|
{
|
|
@@ -2422,8 +2423,8 @@ function yn(e) {
|
|
|
2422
2423
|
}
|
|
2423
2424
|
) });
|
|
2424
2425
|
}
|
|
2425
|
-
function
|
|
2426
|
-
const t =
|
|
2426
|
+
function Oe(e) {
|
|
2427
|
+
const t = Rt[e.name];
|
|
2427
2428
|
return t ? /* @__PURE__ */ n(
|
|
2428
2429
|
t,
|
|
2429
2430
|
{
|
|
@@ -2432,7 +2433,7 @@ function Pe(e) {
|
|
|
2432
2433
|
}
|
|
2433
2434
|
) : null;
|
|
2434
2435
|
}
|
|
2435
|
-
function
|
|
2436
|
+
function Nn(e) {
|
|
2436
2437
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2437
2438
|
"path",
|
|
2438
2439
|
{
|
|
@@ -2441,7 +2442,7 @@ function Cn(e) {
|
|
|
2441
2442
|
}
|
|
2442
2443
|
) });
|
|
2443
2444
|
}
|
|
2444
|
-
function
|
|
2445
|
+
function Tn(e) {
|
|
2445
2446
|
return /* @__PURE__ */ n(
|
|
2446
2447
|
"svg",
|
|
2447
2448
|
{
|
|
@@ -2466,10 +2467,10 @@ function kn(e) {
|
|
|
2466
2467
|
}
|
|
2467
2468
|
);
|
|
2468
2469
|
}
|
|
2469
|
-
function
|
|
2470
|
+
function Sn(e) {
|
|
2470
2471
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M9 7v10h6v-2h-4V7z" }) });
|
|
2471
2472
|
}
|
|
2472
|
-
function
|
|
2473
|
+
function zn(e) {
|
|
2473
2474
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2474
2475
|
"path",
|
|
2475
2476
|
{
|
|
@@ -2478,7 +2479,7 @@ function Tn(e) {
|
|
|
2478
2479
|
}
|
|
2479
2480
|
) });
|
|
2480
2481
|
}
|
|
2481
|
-
function
|
|
2482
|
+
function In(e) {
|
|
2482
2483
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2483
2484
|
"path",
|
|
2484
2485
|
{
|
|
@@ -2487,7 +2488,7 @@ function An(e) {
|
|
|
2487
2488
|
}
|
|
2488
2489
|
) });
|
|
2489
2490
|
}
|
|
2490
|
-
function
|
|
2491
|
+
function An() {
|
|
2491
2492
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2492
2493
|
"path",
|
|
2493
2494
|
{
|
|
@@ -2496,7 +2497,7 @@ function Nn() {
|
|
|
2496
2497
|
}
|
|
2497
2498
|
) });
|
|
2498
2499
|
}
|
|
2499
|
-
function
|
|
2500
|
+
function Ln() {
|
|
2500
2501
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2501
2502
|
"path",
|
|
2502
2503
|
{
|
|
@@ -2509,7 +2510,7 @@ function zn() {
|
|
|
2509
2510
|
}
|
|
2510
2511
|
) });
|
|
2511
2512
|
}
|
|
2512
|
-
function
|
|
2513
|
+
function En() {
|
|
2513
2514
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2514
2515
|
"path",
|
|
2515
2516
|
{
|
|
@@ -2522,7 +2523,7 @@ function In() {
|
|
|
2522
2523
|
}
|
|
2523
2524
|
) });
|
|
2524
2525
|
}
|
|
2525
|
-
function
|
|
2526
|
+
function Rn() {
|
|
2526
2527
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2527
2528
|
"path",
|
|
2528
2529
|
{
|
|
@@ -2535,7 +2536,7 @@ function Ln() {
|
|
|
2535
2536
|
}
|
|
2536
2537
|
) });
|
|
2537
2538
|
}
|
|
2538
|
-
function
|
|
2539
|
+
function Vn() {
|
|
2539
2540
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2540
2541
|
"path",
|
|
2541
2542
|
{
|
|
@@ -2544,7 +2545,7 @@ function Sn() {
|
|
|
2544
2545
|
}
|
|
2545
2546
|
) });
|
|
2546
2547
|
}
|
|
2547
|
-
function
|
|
2548
|
+
function Lt() {
|
|
2548
2549
|
return /* @__PURE__ */ y("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
|
|
2549
2550
|
/* @__PURE__ */ n(
|
|
2550
2551
|
"path",
|
|
@@ -2562,7 +2563,7 @@ function Nt() {
|
|
|
2562
2563
|
)
|
|
2563
2564
|
] });
|
|
2564
2565
|
}
|
|
2565
|
-
function
|
|
2566
|
+
function Et() {
|
|
2566
2567
|
return /* @__PURE__ */ y(
|
|
2567
2568
|
"svg",
|
|
2568
2569
|
{
|
|
@@ -2590,7 +2591,7 @@ function zt() {
|
|
|
2590
2591
|
}
|
|
2591
2592
|
);
|
|
2592
2593
|
}
|
|
2593
|
-
function
|
|
2594
|
+
function _n() {
|
|
2594
2595
|
return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 15 15", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n(
|
|
2595
2596
|
"path",
|
|
2596
2597
|
{
|
|
@@ -2599,7 +2600,7 @@ function En() {
|
|
|
2599
2600
|
}
|
|
2600
2601
|
) });
|
|
2601
2602
|
}
|
|
2602
|
-
function
|
|
2603
|
+
function Hn() {
|
|
2603
2604
|
return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ y(
|
|
2604
2605
|
"g",
|
|
2605
2606
|
{
|
|
@@ -2615,7 +2616,7 @@ function Rn() {
|
|
|
2615
2616
|
}
|
|
2616
2617
|
) });
|
|
2617
2618
|
}
|
|
2618
|
-
function
|
|
2619
|
+
function Dn() {
|
|
2619
2620
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
2620
2621
|
"path",
|
|
2621
2622
|
{
|
|
@@ -2624,7 +2625,7 @@ function Vn() {
|
|
|
2624
2625
|
}
|
|
2625
2626
|
) });
|
|
2626
2627
|
}
|
|
2627
|
-
function
|
|
2628
|
+
function jn() {
|
|
2628
2629
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ y("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
|
|
2629
2630
|
/* @__PURE__ */ n("circle", { cx: "10", cy: "24", r: "4" }),
|
|
2630
2631
|
/* @__PURE__ */ n("circle", { cx: "38", cy: "10", r: "4" }),
|
|
@@ -2633,7 +2634,7 @@ function _n() {
|
|
|
2633
2634
|
/* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
|
|
2634
2635
|
] }) });
|
|
2635
2636
|
}
|
|
2636
|
-
function
|
|
2637
|
+
function Pn() {
|
|
2637
2638
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
2638
2639
|
"path",
|
|
2639
2640
|
{
|
|
@@ -2642,7 +2643,7 @@ function Hn() {
|
|
|
2642
2643
|
}
|
|
2643
2644
|
) });
|
|
2644
2645
|
}
|
|
2645
|
-
function
|
|
2646
|
+
function On() {
|
|
2646
2647
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2647
2648
|
"path",
|
|
2648
2649
|
{
|
|
@@ -2656,7 +2657,7 @@ function Dn() {
|
|
|
2656
2657
|
}
|
|
2657
2658
|
) });
|
|
2658
2659
|
}
|
|
2659
|
-
function
|
|
2660
|
+
function Bn() {
|
|
2660
2661
|
return /* @__PURE__ */ n(
|
|
2661
2662
|
"svg",
|
|
2662
2663
|
{
|
|
@@ -2677,130 +2678,151 @@ function On() {
|
|
|
2677
2678
|
}
|
|
2678
2679
|
);
|
|
2679
2680
|
}
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2681
|
+
function Un(e) {
|
|
2682
|
+
return /* @__PURE__ */ y(
|
|
2683
|
+
"svg",
|
|
2684
|
+
{
|
|
2685
|
+
width: "1em",
|
|
2686
|
+
height: "1em",
|
|
2687
|
+
viewBox: "0 0 64 64",
|
|
2688
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2689
|
+
strokeWidth: 3,
|
|
2690
|
+
stroke: "currentColor",
|
|
2691
|
+
fill: "none",
|
|
2692
|
+
...e,
|
|
2693
|
+
children: [
|
|
2694
|
+
/* @__PURE__ */ n("circle", { cx: 32, cy: "31.48", r: "25.29" }),
|
|
2695
|
+
/* @__PURE__ */ n("path", { d: "M40.12,24.41a8.36,8.36,0,0,0-7.84-5.06c-7.07,0-7.33,5.06-7.33,5.06s-1.06,6.24,7.58,6.9c9,.69,7.59,6.9,7.59,6.9s-.92,5.4-7.59,5.75-8.73-6.67-8.73-6.67" }),
|
|
2696
|
+
/* @__PURE__ */ n("line", { x1: "32.28", y1: "14.87", x2: "32.28", y2: "49.13" })
|
|
2697
|
+
]
|
|
2698
|
+
}
|
|
2699
|
+
);
|
|
2700
|
+
}
|
|
2701
|
+
const Rt = {
|
|
2702
|
+
Bold: Ni,
|
|
2703
|
+
LoaderCircle: Mi,
|
|
2704
|
+
Italic: ki,
|
|
2705
|
+
Underline: Ci,
|
|
2706
|
+
Quote: yi,
|
|
2707
|
+
TextQuote: yn,
|
|
2708
|
+
Strikethrough: wi,
|
|
2709
|
+
Minus: vi,
|
|
2710
|
+
Eraser: bi,
|
|
2711
|
+
PaintRoller: xi,
|
|
2712
|
+
Redo2: gi,
|
|
2713
|
+
Undo2: pi,
|
|
2714
|
+
AlignCenter: ji,
|
|
2715
|
+
AlignJustify: Di,
|
|
2716
|
+
AlignLeft: Hi,
|
|
2717
|
+
AlignRight: _i,
|
|
2718
|
+
ChevronDown: Ze,
|
|
2719
|
+
Subscript: mi,
|
|
2720
|
+
Superscript: fi,
|
|
2721
|
+
Code: hi,
|
|
2722
|
+
Code2: ui,
|
|
2723
|
+
Type: di,
|
|
2724
|
+
IndentIncrease: ci,
|
|
2725
|
+
IndentDecrease: li,
|
|
2726
|
+
List: si,
|
|
2727
|
+
ListOrdered: ai,
|
|
2728
|
+
ListTodo: oi,
|
|
2729
|
+
Link: ni,
|
|
2730
|
+
ImageUp: ii,
|
|
2731
|
+
Video: ri,
|
|
2732
|
+
Maximize: ti,
|
|
2733
|
+
Minimize: ei,
|
|
2734
|
+
Table: Qr,
|
|
2735
|
+
Sparkles: Kr,
|
|
2736
|
+
Pencil: Jr,
|
|
2737
|
+
Unlink: qr,
|
|
2738
|
+
BetweenHorizonalEnd: Zr,
|
|
2739
|
+
BetweenHorizonalStart: Yr,
|
|
2740
|
+
BetweenVerticalStart: Xr,
|
|
2741
|
+
BetweenVerticalEnd: Gr,
|
|
2742
|
+
TableCellsMerge: Wr,
|
|
2743
|
+
TableCellsSplit: Fr,
|
|
2744
|
+
Trash2: $r,
|
|
2745
|
+
Trash: Ur,
|
|
2746
|
+
Replace: at,
|
|
2747
|
+
ChevronsUpDown: Br,
|
|
2748
|
+
LineHeight: Nn,
|
|
2749
|
+
Word: Mn,
|
|
2750
|
+
HeadingParagraph: Or,
|
|
2751
|
+
Heading1: Pr,
|
|
2752
|
+
Heading2: jr,
|
|
2753
|
+
Heading3: Dr,
|
|
2754
|
+
Heading4: Hr,
|
|
2755
|
+
Heading5: _r,
|
|
2756
|
+
Heading6: Vr,
|
|
2757
|
+
Columns2: st,
|
|
2758
|
+
Columns3: Rr,
|
|
2759
|
+
Columns4: Er,
|
|
2760
|
+
Plus: Lr,
|
|
2761
|
+
Grip: Ar,
|
|
2762
|
+
Copy: Ir,
|
|
2763
|
+
Clipboard: zr,
|
|
2764
|
+
PanelLeft: Sr,
|
|
2765
|
+
PanelRight: Tr,
|
|
2766
|
+
Columns: st,
|
|
2767
|
+
Iframe: Nr,
|
|
2768
|
+
MenuDown: Tn,
|
|
2769
|
+
SizeS: In,
|
|
2770
|
+
SizeM: zn,
|
|
2771
|
+
SizeL: Sn,
|
|
2772
|
+
AspectRatio: wn,
|
|
2773
|
+
Emoji: Mr,
|
|
2774
|
+
DeleteColumn: Cn,
|
|
2775
|
+
DeleteRow: kn,
|
|
2776
|
+
SearchAndReplace: at,
|
|
2777
|
+
EmojiIcon: kr,
|
|
2778
|
+
KatexIcon: Cr,
|
|
2779
|
+
ExportPdf: Lt,
|
|
2780
|
+
ExportWord: Et,
|
|
2781
|
+
ImportWord: Bn,
|
|
2782
|
+
ColumnAddLeft: Ln,
|
|
2783
|
+
ColumnAddRight: En,
|
|
2784
|
+
BookMarked: yr,
|
|
2785
|
+
Excalidraw: Vn,
|
|
2786
|
+
ZoomIn: wr,
|
|
2787
|
+
ZoomOut: vr,
|
|
2788
|
+
Settings: br,
|
|
2789
|
+
Eye: xr,
|
|
2790
|
+
TextDirection: Rn,
|
|
2791
|
+
LeftToRight: Dn,
|
|
2792
|
+
RightToLeft: Pn,
|
|
2793
|
+
Attachment: gr,
|
|
2794
|
+
AttachmentDownload: pr,
|
|
2795
|
+
GifIcon: _n,
|
|
2796
|
+
ChevronUp: kt,
|
|
2797
|
+
Crop: mr,
|
|
2798
|
+
Mermaid: jn,
|
|
2799
|
+
Twitter: On,
|
|
2800
|
+
CodeView: An,
|
|
2801
|
+
FlipX: fr,
|
|
2802
|
+
FlipY: hr,
|
|
2803
|
+
PencilRuler: ur,
|
|
2804
|
+
WrapText: dr,
|
|
2805
|
+
Loader: cr,
|
|
2806
|
+
X: Ct,
|
|
2807
|
+
Html: Hn,
|
|
2808
|
+
ExternalLink: lr,
|
|
2809
|
+
Callout: sr,
|
|
2810
|
+
PaywallIcon: Un
|
|
2811
|
+
}, ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ft = Ae, Je = (e, t) => (r) => {
|
|
2790
2812
|
var i;
|
|
2791
|
-
if ((t == null ? void 0 : t.variants) == null) return
|
|
2813
|
+
if ((t == null ? void 0 : t.variants) == null) return ft(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
|
|
2792
2814
|
const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
|
|
2793
|
-
const f = r == null ? void 0 : r[d],
|
|
2815
|
+
const f = r == null ? void 0 : r[d], g = a == null ? void 0 : a[d];
|
|
2794
2816
|
if (f === null) return null;
|
|
2795
|
-
const u =
|
|
2817
|
+
const u = ht(f) || ht(g);
|
|
2796
2818
|
return o[d][u];
|
|
2797
2819
|
}), s = r && Object.entries(r).reduce((d, f) => {
|
|
2798
|
-
let [
|
|
2799
|
-
return u === void 0 || (d[
|
|
2820
|
+
let [g, u] = f;
|
|
2821
|
+
return u === void 0 || (d[g] = u), d;
|
|
2800
2822
|
}, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d, f) => {
|
|
2801
|
-
let { class:
|
|
2802
|
-
return Object.entries(
|
|
2803
|
-
let [k, h] =
|
|
2823
|
+
let { class: g, className: u, ...v } = f;
|
|
2824
|
+
return Object.entries(v).every((p) => {
|
|
2825
|
+
let [k, h] = p;
|
|
2804
2826
|
return Array.isArray(h) ? h.includes({
|
|
2805
2827
|
...a,
|
|
2806
2828
|
...s
|
|
@@ -2810,12 +2832,12 @@ const It = {
|
|
|
2810
2832
|
}[k] === h;
|
|
2811
2833
|
}) ? [
|
|
2812
2834
|
...d,
|
|
2813
|
-
|
|
2835
|
+
g,
|
|
2814
2836
|
u
|
|
2815
2837
|
] : d;
|
|
2816
2838
|
}, []);
|
|
2817
|
-
return
|
|
2818
|
-
},
|
|
2839
|
+
return ft(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
|
|
2840
|
+
}, $n = Je(
|
|
2819
2841
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
|
|
2820
2842
|
{
|
|
2821
2843
|
variants: {
|
|
@@ -2839,17 +2861,17 @@ const It = {
|
|
|
2839
2861
|
size: "default"
|
|
2840
2862
|
}
|
|
2841
2863
|
}
|
|
2842
|
-
),
|
|
2843
|
-
({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ?
|
|
2864
|
+
), X = _.forwardRef(
|
|
2865
|
+
({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? vt : "button", { className: E($n({ variant: t, size: r, className: e })), ref: a, ...o })
|
|
2844
2866
|
);
|
|
2845
|
-
|
|
2846
|
-
const
|
|
2867
|
+
X.displayName = "Button";
|
|
2868
|
+
const ae = _.forwardRef(
|
|
2847
2869
|
({ className: e, type: t, ...r }, i) => /* @__PURE__ */ n(
|
|
2848
2870
|
"input",
|
|
2849
2871
|
{
|
|
2850
2872
|
ref: i,
|
|
2851
2873
|
type: t,
|
|
2852
|
-
className:
|
|
2874
|
+
className: E(
|
|
2853
2875
|
"richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-1 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
|
|
2854
2876
|
e
|
|
2855
2877
|
),
|
|
@@ -2857,48 +2879,62 @@ const oe = U.forwardRef(
|
|
|
2857
2879
|
}
|
|
2858
2880
|
)
|
|
2859
2881
|
);
|
|
2860
|
-
|
|
2861
|
-
const
|
|
2882
|
+
ae.displayName = "Input";
|
|
2883
|
+
const Fn = Je(
|
|
2862
2884
|
"richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
|
|
2863
|
-
),
|
|
2864
|
-
|
|
2865
|
-
const
|
|
2866
|
-
|
|
2885
|
+
), ke = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(yt.Root, { className: E(Fn(), e), ref: r, ...t }));
|
|
2886
|
+
ke.displayName = yt.Root.displayName;
|
|
2887
|
+
const _e = se.Root, Ne = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2888
|
+
se.List,
|
|
2867
2889
|
{
|
|
2868
2890
|
ref: r,
|
|
2869
|
-
className:
|
|
2891
|
+
className: E(
|
|
2870
2892
|
"richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",
|
|
2871
2893
|
e
|
|
2872
2894
|
),
|
|
2873
2895
|
...t
|
|
2874
2896
|
}
|
|
2875
2897
|
));
|
|
2876
|
-
|
|
2877
|
-
const
|
|
2878
|
-
|
|
2898
|
+
Ne.displayName = se.List.displayName;
|
|
2899
|
+
const K = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2900
|
+
se.Trigger,
|
|
2879
2901
|
{
|
|
2880
2902
|
ref: r,
|
|
2881
|
-
className:
|
|
2903
|
+
className: E(
|
|
2882
2904
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",
|
|
2883
2905
|
e
|
|
2884
2906
|
),
|
|
2885
2907
|
...t
|
|
2886
2908
|
}
|
|
2887
2909
|
));
|
|
2888
|
-
|
|
2889
|
-
const
|
|
2890
|
-
|
|
2910
|
+
K.displayName = se.Trigger.displayName;
|
|
2911
|
+
const Q = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2912
|
+
se.Content,
|
|
2891
2913
|
{
|
|
2892
2914
|
ref: r,
|
|
2893
|
-
className:
|
|
2915
|
+
className: E(
|
|
2894
2916
|
"richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",
|
|
2895
2917
|
e
|
|
2896
2918
|
),
|
|
2897
2919
|
...t
|
|
2898
2920
|
}
|
|
2899
2921
|
));
|
|
2900
|
-
|
|
2901
|
-
const
|
|
2922
|
+
Q.displayName = se.Content.displayName;
|
|
2923
|
+
const Wn = _.forwardRef(
|
|
2924
|
+
({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2925
|
+
"textarea",
|
|
2926
|
+
{
|
|
2927
|
+
ref: r,
|
|
2928
|
+
className: E(
|
|
2929
|
+
"richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
|
|
2930
|
+
e
|
|
2931
|
+
),
|
|
2932
|
+
...t
|
|
2933
|
+
}
|
|
2934
|
+
)
|
|
2935
|
+
);
|
|
2936
|
+
Wn.displayName = "Textarea";
|
|
2937
|
+
const Gn = Je(
|
|
2902
2938
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
|
|
2903
2939
|
{
|
|
2904
2940
|
variants: {
|
|
@@ -2917,52 +2953,160 @@ const Bn = Ze(
|
|
|
2917
2953
|
size: "default"
|
|
2918
2954
|
}
|
|
2919
2955
|
}
|
|
2920
|
-
),
|
|
2921
|
-
|
|
2956
|
+
), Vt = _.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
|
|
2957
|
+
Nt.Root,
|
|
2922
2958
|
{
|
|
2923
2959
|
ref: o,
|
|
2924
|
-
className:
|
|
2960
|
+
className: E(Gn({ variant: t, size: r, className: e })),
|
|
2925
2961
|
...i
|
|
2926
2962
|
}
|
|
2927
2963
|
));
|
|
2928
|
-
|
|
2929
|
-
const
|
|
2930
|
-
|
|
2964
|
+
Vt.displayName = Nt.Root.displayName;
|
|
2965
|
+
const _a = Me.Provider, Xn = Me.Root, Yn = Me.Trigger, _t = _.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
|
|
2966
|
+
Me.Content,
|
|
2931
2967
|
{
|
|
2932
2968
|
"data-richtext-portal": !0,
|
|
2933
2969
|
ref: i,
|
|
2934
2970
|
sideOffset: t,
|
|
2935
|
-
className:
|
|
2971
|
+
className: E(
|
|
2936
2972
|
"richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border-none richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
|
|
2937
2973
|
e
|
|
2938
2974
|
),
|
|
2939
2975
|
...r
|
|
2940
2976
|
}
|
|
2941
2977
|
));
|
|
2942
|
-
|
|
2943
|
-
const
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2978
|
+
_t.displayName = Me.Content.displayName;
|
|
2979
|
+
const Ha = D.Root, Da = D.Value, Zn = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(
|
|
2980
|
+
D.Trigger,
|
|
2981
|
+
{
|
|
2982
|
+
ref: i,
|
|
2983
|
+
className: E(
|
|
2984
|
+
"richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",
|
|
2985
|
+
e
|
|
2986
|
+
),
|
|
2987
|
+
...r,
|
|
2988
|
+
children: [
|
|
2989
|
+
t,
|
|
2990
|
+
/* @__PURE__ */ n(D.Icon, { asChild: !0, children: /* @__PURE__ */ n(Ze, { className: "richtext-size-4 richtext-opacity-50" }) })
|
|
2991
|
+
]
|
|
2992
|
+
}
|
|
2993
|
+
));
|
|
2994
|
+
Zn.displayName = D.Trigger.displayName;
|
|
2995
|
+
const Ht = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2996
|
+
D.ScrollUpButton,
|
|
2997
|
+
{
|
|
2998
|
+
ref: r,
|
|
2999
|
+
className: E(
|
|
3000
|
+
"richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
|
|
3001
|
+
e
|
|
3002
|
+
),
|
|
3003
|
+
...t,
|
|
3004
|
+
children: /* @__PURE__ */ n(kt, { className: "richtext-size-4" })
|
|
3005
|
+
}
|
|
3006
|
+
));
|
|
3007
|
+
Ht.displayName = D.ScrollUpButton.displayName;
|
|
3008
|
+
const Dt = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3009
|
+
D.ScrollDownButton,
|
|
3010
|
+
{
|
|
3011
|
+
ref: r,
|
|
3012
|
+
className: E(
|
|
3013
|
+
"richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
|
|
3014
|
+
e
|
|
3015
|
+
),
|
|
3016
|
+
...t,
|
|
3017
|
+
children: /* @__PURE__ */ n(Ze, { className: "richtext-size-4" })
|
|
3018
|
+
}
|
|
3019
|
+
));
|
|
3020
|
+
Dt.displayName = D.ScrollDownButton.displayName;
|
|
3021
|
+
const qn = _.forwardRef(({ className: e, children: t, position: r = "popper", ...i }, o) => /* @__PURE__ */ n(D.Portal, { children: /* @__PURE__ */ y(
|
|
3022
|
+
D.Content,
|
|
3023
|
+
{
|
|
3024
|
+
"data-richtext-portal": !0,
|
|
3025
|
+
position: r,
|
|
3026
|
+
ref: o,
|
|
3027
|
+
className: E(
|
|
3028
|
+
"richtext-relative richtext-z-50 richtext-max-h-60 richtext-min-w-[8rem] richtext-overflow-hidden richtext-overflow-y-auto richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
|
|
3029
|
+
r === "popper" && "data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",
|
|
3030
|
+
e
|
|
3031
|
+
),
|
|
3032
|
+
...i,
|
|
3033
|
+
children: [
|
|
3034
|
+
/* @__PURE__ */ n(Ht, {}),
|
|
3035
|
+
/* @__PURE__ */ n(
|
|
3036
|
+
D.Viewport,
|
|
3037
|
+
{
|
|
3038
|
+
className: E(
|
|
3039
|
+
"richtext-p-1",
|
|
3040
|
+
r === "popper" && "richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"
|
|
3041
|
+
),
|
|
3042
|
+
children: t
|
|
3043
|
+
}
|
|
3044
|
+
),
|
|
3045
|
+
/* @__PURE__ */ n(Dt, {})
|
|
3046
|
+
]
|
|
3047
|
+
}
|
|
3048
|
+
) }));
|
|
3049
|
+
qn.displayName = D.Content.displayName;
|
|
3050
|
+
const Jn = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3051
|
+
D.Label,
|
|
3052
|
+
{
|
|
3053
|
+
className: E(
|
|
3054
|
+
"richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",
|
|
3055
|
+
e
|
|
3056
|
+
),
|
|
3057
|
+
ref: r,
|
|
3058
|
+
...t
|
|
3059
|
+
}
|
|
3060
|
+
));
|
|
3061
|
+
Jn.displayName = D.Label.displayName;
|
|
3062
|
+
const Kn = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(
|
|
3063
|
+
D.Item,
|
|
3064
|
+
{
|
|
3065
|
+
ref: i,
|
|
3066
|
+
className: E(
|
|
3067
|
+
"richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
|
|
3068
|
+
e
|
|
3069
|
+
),
|
|
3070
|
+
...r,
|
|
3071
|
+
children: [
|
|
3072
|
+
/* @__PURE__ */ n("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ n(D.ItemIndicator, { children: /* @__PURE__ */ n(Mt, { className: "richtext-size-4" }) }) }),
|
|
3073
|
+
/* @__PURE__ */ n(D.ItemText, { children: t })
|
|
3074
|
+
]
|
|
3075
|
+
}
|
|
3076
|
+
));
|
|
3077
|
+
Kn.displayName = D.Item.displayName;
|
|
3078
|
+
const Qn = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3079
|
+
D.Separator,
|
|
3080
|
+
{
|
|
3081
|
+
className: E("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", e),
|
|
3082
|
+
ref: r,
|
|
3083
|
+
...t
|
|
3084
|
+
}
|
|
3085
|
+
));
|
|
3086
|
+
Qn.displayName = D.Separator.displayName;
|
|
3087
|
+
const eo = 1, to = 1e6;
|
|
3088
|
+
let Be = 0;
|
|
3089
|
+
function ro() {
|
|
3090
|
+
return Be = (Be + 1) % Number.MAX_SAFE_INTEGER, Be.toString();
|
|
2947
3091
|
}
|
|
2948
|
-
const
|
|
2949
|
-
function
|
|
2950
|
-
if (
|
|
3092
|
+
const Ue = /* @__PURE__ */ new Map();
|
|
3093
|
+
function mt(e) {
|
|
3094
|
+
if (Ue.has(e))
|
|
2951
3095
|
return;
|
|
2952
3096
|
const t = setTimeout(() => {
|
|
2953
|
-
|
|
3097
|
+
Ue.delete(e), ye({
|
|
2954
3098
|
type: "REMOVE_TOAST",
|
|
2955
3099
|
toastId: e
|
|
2956
3100
|
});
|
|
2957
|
-
},
|
|
2958
|
-
|
|
3101
|
+
}, to);
|
|
3102
|
+
Ue.set(e, t);
|
|
2959
3103
|
}
|
|
2960
|
-
function
|
|
3104
|
+
function io(e, t) {
|
|
2961
3105
|
switch (t.type) {
|
|
2962
3106
|
case "ADD_TOAST":
|
|
2963
3107
|
return {
|
|
2964
3108
|
...e,
|
|
2965
|
-
toasts: [t.toast, ...e.toasts].slice(0,
|
|
3109
|
+
toasts: [t.toast, ...e.toasts].slice(0, eo)
|
|
2966
3110
|
};
|
|
2967
3111
|
case "UPDATE_TOAST":
|
|
2968
3112
|
return {
|
|
@@ -2971,8 +3115,8 @@ function Xn(e, t) {
|
|
|
2971
3115
|
};
|
|
2972
3116
|
case "DISMISS_TOAST": {
|
|
2973
3117
|
const { toastId: r } = t;
|
|
2974
|
-
return r ?
|
|
2975
|
-
|
|
3118
|
+
return r ? mt(r) : e.toasts.forEach((i) => {
|
|
3119
|
+
mt(i.id);
|
|
2976
3120
|
}), {
|
|
2977
3121
|
...e,
|
|
2978
3122
|
toasts: e.toasts.map(
|
|
@@ -2993,19 +3137,19 @@ function Xn(e, t) {
|
|
|
2993
3137
|
};
|
|
2994
3138
|
}
|
|
2995
3139
|
}
|
|
2996
|
-
const
|
|
2997
|
-
let
|
|
2998
|
-
function
|
|
2999
|
-
|
|
3000
|
-
t(
|
|
3140
|
+
const Se = [];
|
|
3141
|
+
let ze = { toasts: [] };
|
|
3142
|
+
function ye(e) {
|
|
3143
|
+
ze = io(ze, e), Se.forEach((t) => {
|
|
3144
|
+
t(ze);
|
|
3001
3145
|
});
|
|
3002
3146
|
}
|
|
3003
|
-
function
|
|
3004
|
-
const t =
|
|
3147
|
+
function no({ ...e }) {
|
|
3148
|
+
const t = ro(), r = (o) => ye({
|
|
3005
3149
|
type: "UPDATE_TOAST",
|
|
3006
3150
|
toast: { ...o, id: t }
|
|
3007
|
-
}), i = () =>
|
|
3008
|
-
return
|
|
3151
|
+
}), i = () => ye({ type: "DISMISS_TOAST", toastId: t });
|
|
3152
|
+
return ye({
|
|
3009
3153
|
type: "ADD_TOAST",
|
|
3010
3154
|
toast: {
|
|
3011
3155
|
...e,
|
|
@@ -3021,39 +3165,39 @@ function Yn({ ...e }) {
|
|
|
3021
3165
|
update: r
|
|
3022
3166
|
};
|
|
3023
3167
|
}
|
|
3024
|
-
function
|
|
3025
|
-
const [e, t] =
|
|
3026
|
-
return
|
|
3027
|
-
const r =
|
|
3028
|
-
r > -1 &&
|
|
3168
|
+
function Ke() {
|
|
3169
|
+
const [e, t] = _.useState(ze);
|
|
3170
|
+
return _.useEffect(() => (Se.push(t), () => {
|
|
3171
|
+
const r = Se.indexOf(t);
|
|
3172
|
+
r > -1 && Se.splice(r, 1);
|
|
3029
3173
|
}), [e]), {
|
|
3030
3174
|
...e,
|
|
3031
|
-
toast:
|
|
3032
|
-
dismiss: (r) =>
|
|
3175
|
+
toast: no,
|
|
3176
|
+
dismiss: (r) => ye({ type: "DISMISS_TOAST", toastId: r })
|
|
3033
3177
|
};
|
|
3034
3178
|
}
|
|
3035
|
-
const
|
|
3036
|
-
|
|
3179
|
+
const Qe = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3180
|
+
Fe.Root,
|
|
3037
3181
|
{
|
|
3038
3182
|
ref: r,
|
|
3039
|
-
className:
|
|
3183
|
+
className: E(
|
|
3040
3184
|
"!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-p-0 !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-1 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",
|
|
3041
3185
|
e
|
|
3042
3186
|
),
|
|
3043
3187
|
...t,
|
|
3044
3188
|
children: /* @__PURE__ */ n(
|
|
3045
|
-
|
|
3189
|
+
Fe.Indicator,
|
|
3046
3190
|
{
|
|
3047
|
-
className:
|
|
3191
|
+
className: E(
|
|
3048
3192
|
"!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
|
|
3049
3193
|
),
|
|
3050
|
-
children: /* @__PURE__ */ n(
|
|
3194
|
+
children: /* @__PURE__ */ n(Mt, { className: "!richtext-h-4 !richtext-w-4" })
|
|
3051
3195
|
}
|
|
3052
3196
|
)
|
|
3053
3197
|
}
|
|
3054
3198
|
));
|
|
3055
|
-
|
|
3056
|
-
function
|
|
3199
|
+
Qe.displayName = Fe.Root.displayName;
|
|
3200
|
+
function oo(e) {
|
|
3057
3201
|
return e = e || /* @__PURE__ */ new Map(), {
|
|
3058
3202
|
/**
|
|
3059
3203
|
* A Map of event names to registered handler functions.
|
|
@@ -3100,57 +3244,57 @@ function Zn(e) {
|
|
|
3100
3244
|
}
|
|
3101
3245
|
};
|
|
3102
3246
|
}
|
|
3103
|
-
const
|
|
3104
|
-
function
|
|
3105
|
-
const r =
|
|
3106
|
-
|
|
3247
|
+
const et = oo(), jt = ie.createContext(et), ao = () => ie.useContext(jt);
|
|
3248
|
+
function tt(e, t) {
|
|
3249
|
+
const r = ao();
|
|
3250
|
+
ie.useEffect(() => (t.map((i) => r.on(i, e)), () => {
|
|
3107
3251
|
t.map((i) => r.off(i, e));
|
|
3108
3252
|
}), [r, t, e]);
|
|
3109
3253
|
}
|
|
3110
|
-
const
|
|
3111
|
-
function
|
|
3112
|
-
return /* @__PURE__ */ n(
|
|
3254
|
+
const so = et.emit;
|
|
3255
|
+
function ja({ children: e }) {
|
|
3256
|
+
return /* @__PURE__ */ n(jt.Provider, { value: et, children: e });
|
|
3113
3257
|
}
|
|
3114
|
-
const ge =
|
|
3115
|
-
|
|
3258
|
+
const ge = Z.Root, rt = Z.Trigger, lo = Z.Portal, Pt = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3259
|
+
Z.Overlay,
|
|
3116
3260
|
{
|
|
3117
3261
|
ref: r,
|
|
3118
|
-
className:
|
|
3262
|
+
className: E(
|
|
3119
3263
|
"richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",
|
|
3120
3264
|
e
|
|
3121
3265
|
),
|
|
3122
3266
|
...t
|
|
3123
3267
|
}
|
|
3124
3268
|
));
|
|
3125
|
-
|
|
3126
|
-
const
|
|
3127
|
-
/* @__PURE__ */ n(
|
|
3269
|
+
Pt.displayName = Z.Overlay.displayName;
|
|
3270
|
+
const le = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(lo, { "data-richtext-portal": !0, children: [
|
|
3271
|
+
/* @__PURE__ */ n(Pt, {}),
|
|
3128
3272
|
/* @__PURE__ */ y(
|
|
3129
|
-
|
|
3273
|
+
Z.Content,
|
|
3130
3274
|
{
|
|
3131
3275
|
"data-richtext-portal": !0,
|
|
3132
3276
|
ref: i,
|
|
3133
|
-
className:
|
|
3277
|
+
className: E(
|
|
3134
3278
|
"richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border !richtext-border-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",
|
|
3135
3279
|
e
|
|
3136
3280
|
),
|
|
3137
3281
|
...r,
|
|
3138
3282
|
children: [
|
|
3139
3283
|
t,
|
|
3140
|
-
/* @__PURE__ */ y(
|
|
3141
|
-
/* @__PURE__ */ n(
|
|
3284
|
+
/* @__PURE__ */ y(Z.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
|
|
3285
|
+
/* @__PURE__ */ n(Ct, { className: "richtext-size-4 richtext-text-accent-foreground" }),
|
|
3142
3286
|
/* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
|
|
3143
3287
|
] })
|
|
3144
3288
|
]
|
|
3145
3289
|
}
|
|
3146
3290
|
)
|
|
3147
3291
|
] }));
|
|
3148
|
-
|
|
3149
|
-
function
|
|
3292
|
+
le.displayName = Z.Content.displayName;
|
|
3293
|
+
function co({ className: e, ...t }) {
|
|
3150
3294
|
return /* @__PURE__ */ n(
|
|
3151
3295
|
"div",
|
|
3152
3296
|
{
|
|
3153
|
-
className:
|
|
3297
|
+
className: E(
|
|
3154
3298
|
"richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
|
|
3155
3299
|
e
|
|
3156
3300
|
),
|
|
@@ -3158,12 +3302,12 @@ function Qn({ className: e, ...t }) {
|
|
|
3158
3302
|
}
|
|
3159
3303
|
);
|
|
3160
3304
|
}
|
|
3161
|
-
|
|
3162
|
-
function
|
|
3305
|
+
co.displayName = "DialogHeader";
|
|
3306
|
+
function Ot({ className: e, ...t }) {
|
|
3163
3307
|
return /* @__PURE__ */ n(
|
|
3164
3308
|
"div",
|
|
3165
3309
|
{
|
|
3166
|
-
className:
|
|
3310
|
+
className: E(
|
|
3167
3311
|
"richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
|
|
3168
3312
|
e
|
|
3169
3313
|
),
|
|
@@ -3171,29 +3315,29 @@ function Vt({ className: e, ...t }) {
|
|
|
3171
3315
|
}
|
|
3172
3316
|
);
|
|
3173
3317
|
}
|
|
3174
|
-
|
|
3175
|
-
const
|
|
3176
|
-
|
|
3318
|
+
Ot.displayName = "DialogFooter";
|
|
3319
|
+
const ce = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3320
|
+
Z.Title,
|
|
3177
3321
|
{
|
|
3178
3322
|
ref: r,
|
|
3179
|
-
className:
|
|
3323
|
+
className: E(
|
|
3180
3324
|
"richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",
|
|
3181
3325
|
e
|
|
3182
3326
|
),
|
|
3183
3327
|
...t
|
|
3184
3328
|
}
|
|
3185
3329
|
));
|
|
3186
|
-
|
|
3187
|
-
const
|
|
3188
|
-
|
|
3330
|
+
ce.displayName = Z.Title.displayName;
|
|
3331
|
+
const uo = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3332
|
+
Z.Description,
|
|
3189
3333
|
{
|
|
3190
|
-
className:
|
|
3334
|
+
className: E("richtext-text-sm richtext-text-muted-foreground", e),
|
|
3191
3335
|
ref: r,
|
|
3192
3336
|
...t
|
|
3193
3337
|
}
|
|
3194
3338
|
));
|
|
3195
|
-
|
|
3196
|
-
const
|
|
3339
|
+
uo.displayName = Z.Description.displayName;
|
|
3340
|
+
const ho = {
|
|
3197
3341
|
audio: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',
|
|
3198
3342
|
video: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',
|
|
3199
3343
|
file: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',
|
|
@@ -3221,19 +3365,19 @@ const to = {
|
|
|
3221
3365
|
excel: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',
|
|
3222
3366
|
ppt: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'
|
|
3223
3367
|
};
|
|
3224
|
-
function
|
|
3368
|
+
function fo(e) {
|
|
3225
3369
|
return e.replace(/^.*\/|\..+$/g, "");
|
|
3226
3370
|
}
|
|
3227
|
-
function
|
|
3371
|
+
function mo(e) {
|
|
3228
3372
|
return e.split(".").pop();
|
|
3229
3373
|
}
|
|
3230
|
-
function
|
|
3374
|
+
function Bt(e) {
|
|
3231
3375
|
return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
|
|
3232
3376
|
}
|
|
3233
|
-
function
|
|
3377
|
+
function po(e) {
|
|
3234
3378
|
return e ? e === "application/pdf" ? "pdf" : e.startsWith("application/") && [".document", "word"].some((t) => e.includes(t)) ? "word" : e.startsWith("application/") && ["presentation"].some((t) => e.includes(t)) ? "excel" : e.startsWith("application/") && ["sheet"].some((t) => e.includes(t)) ? "ppt" : e.startsWith("image") ? "image" : e.startsWith("audio") ? "audio" : e.startsWith("video") ? "video" : "file" : "file";
|
|
3235
3379
|
}
|
|
3236
|
-
function
|
|
3380
|
+
function go(e) {
|
|
3237
3381
|
return new Promise((t) => {
|
|
3238
3382
|
const r = new FileReader();
|
|
3239
3383
|
r.addEventListener(
|
|
@@ -3248,7 +3392,7 @@ function oo(e) {
|
|
|
3248
3392
|
), r.readAsDataURL(e);
|
|
3249
3393
|
});
|
|
3250
3394
|
}
|
|
3251
|
-
function
|
|
3395
|
+
function xo(e, t) {
|
|
3252
3396
|
const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
|
|
3253
3397
|
let a = o.length;
|
|
3254
3398
|
const l = new Uint8Array(a);
|
|
@@ -3256,8 +3400,8 @@ function ao(e, t) {
|
|
|
3256
3400
|
l[a] = o.charCodeAt(a);
|
|
3257
3401
|
return new File([l], t, { type: i });
|
|
3258
3402
|
}
|
|
3259
|
-
function
|
|
3260
|
-
const t =
|
|
3403
|
+
function bo(e) {
|
|
3404
|
+
const t = ho[e], o = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, a = [
|
|
3261
3405
|
"svg",
|
|
3262
3406
|
{
|
|
3263
3407
|
...Array.from(o.attributes).reduce((l, s) => (l[s.name] = s.value, l), {})
|
|
@@ -3273,92 +3417,92 @@ function so(e) {
|
|
|
3273
3417
|
}
|
|
3274
3418
|
}), a;
|
|
3275
3419
|
}
|
|
3276
|
-
const
|
|
3277
|
-
audio: /* @__PURE__ */ n(
|
|
3278
|
-
video: /* @__PURE__ */ n(
|
|
3279
|
-
file: /* @__PURE__ */ n(
|
|
3280
|
-
image: /* @__PURE__ */ n(
|
|
3281
|
-
pdf: /* @__PURE__ */ n(
|
|
3282
|
-
word: /* @__PURE__ */ n(
|
|
3283
|
-
excel: /* @__PURE__ */ n(
|
|
3284
|
-
ppt: /* @__PURE__ */ n(
|
|
3420
|
+
const vo = {
|
|
3421
|
+
audio: /* @__PURE__ */ n(Li, {}),
|
|
3422
|
+
video: /* @__PURE__ */ n(Ai, {}),
|
|
3423
|
+
file: /* @__PURE__ */ n(Ii, {}),
|
|
3424
|
+
image: /* @__PURE__ */ n(zi, {}),
|
|
3425
|
+
pdf: /* @__PURE__ */ n(Lt, {}),
|
|
3426
|
+
word: /* @__PURE__ */ n(Et, {}),
|
|
3427
|
+
excel: /* @__PURE__ */ n(Si, {}),
|
|
3428
|
+
ppt: /* @__PURE__ */ n(Ti, {})
|
|
3285
3429
|
};
|
|
3286
|
-
function
|
|
3287
|
-
const r =
|
|
3288
|
-
return t ?
|
|
3430
|
+
function Ut(e, t = !1) {
|
|
3431
|
+
const r = po(e), i = vo[r] || /* @__PURE__ */ n(q, {});
|
|
3432
|
+
return t ? bo(r) : i;
|
|
3289
3433
|
}
|
|
3290
|
-
const
|
|
3291
|
-
card:
|
|
3292
|
-
downloadBtn:
|
|
3293
|
-
cardLeft:
|
|
3294
|
-
iconWrap:
|
|
3295
|
-
fileInfo:
|
|
3296
|
-
fileName:
|
|
3297
|
-
fileSize:
|
|
3298
|
-
cardPreview:
|
|
3299
|
-
actions:
|
|
3300
|
-
cardError:
|
|
3301
|
-
errorText:
|
|
3434
|
+
const wo = "_card_1is0r_64", yo = "_downloadBtn_1is0r_82", Co = "_cardLeft_1is0r_88", ko = "_iconWrap_1is0r_97", Mo = "_fileInfo_1is0r_116", No = "_fileName_1is0r_123", To = "_fileSize_1is0r_133", So = "_cardPreview_1is0r_145", zo = "_actions_1is0r_221", Io = "_cardError_1is0r_236", Ao = "_errorText_1is0r_240", Y = {
|
|
3435
|
+
card: wo,
|
|
3436
|
+
downloadBtn: yo,
|
|
3437
|
+
cardLeft: Co,
|
|
3438
|
+
iconWrap: ko,
|
|
3439
|
+
fileInfo: Mo,
|
|
3440
|
+
fileName: No,
|
|
3441
|
+
fileSize: To,
|
|
3442
|
+
cardPreview: So,
|
|
3443
|
+
actions: zo,
|
|
3444
|
+
cardError: Io,
|
|
3445
|
+
errorText: Ao
|
|
3302
3446
|
};
|
|
3303
|
-
function
|
|
3447
|
+
function Lo({
|
|
3304
3448
|
editor: e,
|
|
3305
3449
|
node: t,
|
|
3306
3450
|
deleteNode: r,
|
|
3307
3451
|
extension: i
|
|
3308
3452
|
}) {
|
|
3309
3453
|
var k;
|
|
3310
|
-
const o = (e == null ? void 0 : e.isEditable) ?? !1, { fileName: a, fileSize: l, fileExt: s, fileType: c, id: d, error: f } = t.attrs, { t:
|
|
3454
|
+
const o = (e == null ? void 0 : e.isEditable) ?? !1, { fileName: a, fileSize: l, fileExt: s, fileType: c, id: d, error: f } = t.attrs, { t: g } = ne(), u = (k = i == null ? void 0 : i.options) == null ? void 0 : k.onDownload, v = oe(() => r(), [r]), p = oe(() => {
|
|
3311
3455
|
!d || !u || u({ id: d, fileName: a, fileExt: s, fileType: c, fileSize: l });
|
|
3312
3456
|
}, [d, a, s, c, l, u]);
|
|
3313
|
-
return f && f !== "null" ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ n("div", { className:
|
|
3457
|
+
return f && f !== "null" ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ n("div", { className: Ae(Y.card, Y.cardError, "render-wrapper"), children: /* @__PURE__ */ n("p", { className: Y.errorText, children: f }) }) }) : d ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ y(
|
|
3314
3458
|
"div",
|
|
3315
3459
|
{
|
|
3316
|
-
className:
|
|
3317
|
-
[
|
|
3460
|
+
className: Ae(Y.card, "render-wrapper", {
|
|
3461
|
+
[Y.cardPreview]: !o
|
|
3318
3462
|
}),
|
|
3319
3463
|
children: [
|
|
3320
|
-
/* @__PURE__ */ y("div", { className:
|
|
3321
|
-
/* @__PURE__ */ n("div", { className:
|
|
3322
|
-
/* @__PURE__ */ y("div", { className:
|
|
3323
|
-
/* @__PURE__ */ y("span", { className:
|
|
3464
|
+
/* @__PURE__ */ y("div", { className: Y.cardLeft, children: [
|
|
3465
|
+
/* @__PURE__ */ n("div", { className: Y.iconWrap, children: Ut(c) }),
|
|
3466
|
+
/* @__PURE__ */ y("div", { className: Y.fileInfo, children: [
|
|
3467
|
+
/* @__PURE__ */ y("span", { className: Y.fileName, children: [
|
|
3324
3468
|
a,
|
|
3325
3469
|
".",
|
|
3326
3470
|
s
|
|
3327
3471
|
] }),
|
|
3328
|
-
/* @__PURE__ */ n("span", { className:
|
|
3472
|
+
/* @__PURE__ */ n("span", { className: Y.fileSize, children: Bt(l) })
|
|
3329
3473
|
] })
|
|
3330
3474
|
] }),
|
|
3331
|
-
/* @__PURE__ */ y("div", { className:
|
|
3475
|
+
/* @__PURE__ */ y("div", { className: Y.actions, children: [
|
|
3332
3476
|
u && /* @__PURE__ */ n(
|
|
3333
|
-
|
|
3477
|
+
fe,
|
|
3334
3478
|
{
|
|
3335
|
-
action:
|
|
3479
|
+
action: p,
|
|
3336
3480
|
icon: "AttachmentDownload",
|
|
3337
|
-
tooltip:
|
|
3338
|
-
customClass: o ? void 0 :
|
|
3481
|
+
tooltip: g("editor.attachment.download"),
|
|
3482
|
+
customClass: o ? void 0 : Y.downloadBtn
|
|
3339
3483
|
}
|
|
3340
3484
|
),
|
|
3341
3485
|
o && /* @__PURE__ */ n(
|
|
3342
|
-
|
|
3486
|
+
fe,
|
|
3343
3487
|
{
|
|
3344
|
-
action:
|
|
3488
|
+
action: v,
|
|
3345
3489
|
icon: "Trash2",
|
|
3346
|
-
tooltip:
|
|
3490
|
+
tooltip: g("editor.delete")
|
|
3347
3491
|
}
|
|
3348
3492
|
)
|
|
3349
3493
|
] })
|
|
3350
3494
|
]
|
|
3351
3495
|
}
|
|
3352
|
-
) }) : /* @__PURE__ */ n(
|
|
3496
|
+
) }) : /* @__PURE__ */ n(q, {});
|
|
3353
3497
|
}
|
|
3354
|
-
function
|
|
3498
|
+
function Eo(e) {
|
|
3355
3499
|
try {
|
|
3356
3500
|
return JSON.stringify(e);
|
|
3357
3501
|
} catch {
|
|
3358
3502
|
return JSON.stringify({});
|
|
3359
3503
|
}
|
|
3360
3504
|
}
|
|
3361
|
-
function
|
|
3505
|
+
function ue(e, t = !1) {
|
|
3362
3506
|
return (r) => {
|
|
3363
3507
|
const i = e.startsWith("data-") ? e : `data-${e}`;
|
|
3364
3508
|
let o = decodeURIComponent(r.getAttribute(i));
|
|
@@ -3366,7 +3510,7 @@ function de(e, t = !1) {
|
|
|
3366
3510
|
try {
|
|
3367
3511
|
const s = r.outerHTML.match(/([\S\s])+?="([\S\s])+?"/g);
|
|
3368
3512
|
s && s.length > 0 && (o = (s.map((d) => d.trim()).reduce((d, f) => {
|
|
3369
|
-
const
|
|
3513
|
+
const g = f.indexOf("="), u = [f.slice(0, g), f.slice(g + 1).slice(1, -1)];
|
|
3370
3514
|
return d[u[0]] = u[1], d;
|
|
3371
3515
|
}, {})[e.toLowerCase()] || "").replaceAll(""", '"'));
|
|
3372
3516
|
} catch (l) {
|
|
@@ -3384,28 +3528,28 @@ function de(e, t = !1) {
|
|
|
3384
3528
|
return a !== a ? o : a;
|
|
3385
3529
|
};
|
|
3386
3530
|
}
|
|
3387
|
-
function
|
|
3531
|
+
function Pa(e) {
|
|
3388
3532
|
const { attrs: t } = e;
|
|
3389
3533
|
return Object.keys(t).reduce((r, i) => {
|
|
3390
3534
|
const o = t[i];
|
|
3391
3535
|
if (o == null)
|
|
3392
3536
|
return r;
|
|
3393
3537
|
let a = "";
|
|
3394
|
-
return typeof o == "object" ? a =
|
|
3538
|
+
return typeof o == "object" ? a = Eo(o) : a = o, r[i] = a, r;
|
|
3395
3539
|
}, /* @__PURE__ */ Object.create(null));
|
|
3396
3540
|
}
|
|
3397
|
-
const
|
|
3541
|
+
const He = {
|
|
3398
3542
|
UPLOAD_IMAGE: (e) => `UPLOAD_IMAGE-${e}`,
|
|
3399
3543
|
UPLOAD_VIDEO: (e) => `UPLOAD_VIDEO-${e}`,
|
|
3400
3544
|
UPLOAD_ATTACHMENT: (e) => `UPLOAD_ATTACHMENT-${e}`,
|
|
3401
3545
|
EXCALIDRAW: (e) => `EXCALIDRAW-${e}`
|
|
3402
3546
|
};
|
|
3403
|
-
function
|
|
3404
|
-
const { editor: t } =
|
|
3547
|
+
function Ro(e) {
|
|
3548
|
+
const { editor: t } = ir(), r = _.useMemo(
|
|
3405
3549
|
() => t,
|
|
3406
3550
|
[e, t]
|
|
3407
3551
|
);
|
|
3408
|
-
return
|
|
3552
|
+
return nr({
|
|
3409
3553
|
editor: r,
|
|
3410
3554
|
selector(o) {
|
|
3411
3555
|
return o.editor ? {
|
|
@@ -3420,23 +3564,23 @@ function ko(e) {
|
|
|
3420
3564
|
}
|
|
3421
3565
|
}) || { editor: null };
|
|
3422
3566
|
}
|
|
3423
|
-
function
|
|
3424
|
-
return
|
|
3567
|
+
function ee() {
|
|
3568
|
+
return Ro().editor;
|
|
3425
3569
|
}
|
|
3426
|
-
const
|
|
3427
|
-
function
|
|
3428
|
-
return
|
|
3570
|
+
const $t = er(!1);
|
|
3571
|
+
function Ft() {
|
|
3572
|
+
return tr($t);
|
|
3429
3573
|
}
|
|
3430
|
-
function
|
|
3431
|
-
return
|
|
3574
|
+
function Oa() {
|
|
3575
|
+
return rr($t);
|
|
3432
3576
|
}
|
|
3433
|
-
const
|
|
3434
|
-
function
|
|
3435
|
-
const t =
|
|
3577
|
+
const Wt = () => !1;
|
|
3578
|
+
function Ba(e = Wt) {
|
|
3579
|
+
const t = Ft(), [r, i] = I(() => {
|
|
3436
3580
|
const s = e();
|
|
3437
3581
|
return typeof s == "boolean" ? !s : s;
|
|
3438
|
-
}), o =
|
|
3439
|
-
|
|
3582
|
+
}), o = ee();
|
|
3583
|
+
Ie(() => {
|
|
3440
3584
|
if (!o || !e) return;
|
|
3441
3585
|
const s = () => {
|
|
3442
3586
|
const c = e();
|
|
@@ -3446,7 +3590,7 @@ function Ia(e = Pt) {
|
|
|
3446
3590
|
o.off("selectionUpdate", s), o.off("transaction", s);
|
|
3447
3591
|
};
|
|
3448
3592
|
}, [o, e]);
|
|
3449
|
-
const a =
|
|
3593
|
+
const a = F(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = F(() => !t || !o, [t, o]);
|
|
3450
3594
|
return {
|
|
3451
3595
|
disabled: a,
|
|
3452
3596
|
// can not action, opacity < 1
|
|
@@ -3455,9 +3599,9 @@ function Ia(e = Pt) {
|
|
|
3455
3599
|
editorDisabled: l
|
|
3456
3600
|
};
|
|
3457
3601
|
}
|
|
3458
|
-
function
|
|
3459
|
-
const t =
|
|
3460
|
-
|
|
3602
|
+
function xe(e = Wt) {
|
|
3603
|
+
const t = Ft(), [r, i] = I({}), [o, a] = I(e()), l = ee();
|
|
3604
|
+
Ie(() => {
|
|
3461
3605
|
if (!l || !e) return;
|
|
3462
3606
|
const d = () => {
|
|
3463
3607
|
a(e());
|
|
@@ -3466,7 +3610,7 @@ function pe(e = Pt) {
|
|
|
3466
3610
|
l.off("selectionUpdate", d);
|
|
3467
3611
|
};
|
|
3468
3612
|
}, [r, l, e]);
|
|
3469
|
-
const s =
|
|
3613
|
+
const s = F(() => !t || !l, [t, l]), c = F(() => !t || !l, [t, l]);
|
|
3470
3614
|
return {
|
|
3471
3615
|
disabled: s,
|
|
3472
3616
|
// can not action, opacity < 1
|
|
@@ -3477,56 +3621,56 @@ function pe(e = Pt) {
|
|
|
3477
3621
|
// force update
|
|
3478
3622
|
};
|
|
3479
3623
|
}
|
|
3480
|
-
function
|
|
3481
|
-
const t =
|
|
3482
|
-
return
|
|
3624
|
+
function de(e) {
|
|
3625
|
+
const t = ee();
|
|
3626
|
+
return F(() => t ? t.extensionManager.extensions.find(
|
|
3483
3627
|
(i) => i.name === e
|
|
3484
3628
|
) : null, [t, e]);
|
|
3485
3629
|
}
|
|
3486
|
-
function
|
|
3630
|
+
function Ua(e, t, r) {
|
|
3487
3631
|
return e < t ? t : e > r ? r : e;
|
|
3488
3632
|
}
|
|
3489
|
-
const
|
|
3490
|
-
function
|
|
3633
|
+
const Vo = (e) => typeof e == "number", _o = (e) => typeof e == "string", Ho = (e) => typeof e == "function";
|
|
3634
|
+
function Do(e, t = "px") {
|
|
3491
3635
|
if (!e) return e;
|
|
3492
|
-
const r =
|
|
3636
|
+
const r = Vo(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
|
|
3493
3637
|
return Number.isNaN(i) ? e : i + a;
|
|
3494
3638
|
}
|
|
3495
|
-
function
|
|
3639
|
+
function $a(e, t) {
|
|
3496
3640
|
if (!e)
|
|
3497
3641
|
return !1;
|
|
3498
3642
|
const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
|
|
3499
3643
|
return !!r.find((o) => o.name === t);
|
|
3500
3644
|
}
|
|
3501
|
-
function
|
|
3502
|
-
return e.map((t) =>
|
|
3645
|
+
function Fa(e) {
|
|
3646
|
+
return e.map((t) => _o(t) ? { value: t, name: t } : t);
|
|
3503
3647
|
}
|
|
3504
|
-
function
|
|
3505
|
-
const t =
|
|
3506
|
-
return
|
|
3648
|
+
function it(e) {
|
|
3649
|
+
const t = ee(), r = de(e), { t: i } = ne();
|
|
3650
|
+
return F(() => {
|
|
3507
3651
|
if (!t || !r || !i)
|
|
3508
3652
|
return null;
|
|
3509
3653
|
const { button: o } = r.options;
|
|
3510
|
-
return !o || !
|
|
3654
|
+
return !o || !Ho(o) ? null : o({
|
|
3511
3655
|
editor: t,
|
|
3512
3656
|
extension: r,
|
|
3513
3657
|
t: i
|
|
3514
3658
|
});
|
|
3515
3659
|
}, [t, r, i]);
|
|
3516
3660
|
}
|
|
3517
|
-
function
|
|
3518
|
-
const e =
|
|
3661
|
+
function Wa() {
|
|
3662
|
+
const e = it(Gt.name), {
|
|
3519
3663
|
icon: t = void 0,
|
|
3520
3664
|
tooltip: r = void 0,
|
|
3521
3665
|
shortcutKeys: i = void 0,
|
|
3522
3666
|
tooltipOptions: o = {},
|
|
3523
3667
|
action: a = void 0,
|
|
3524
3668
|
isActive: l = void 0
|
|
3525
|
-
} = (e == null ? void 0 : e.componentProps) ?? {}, { editorDisabled: s, update: c } =
|
|
3669
|
+
} = (e == null ? void 0 : e.componentProps) ?? {}, { editorDisabled: s, update: c } = xe(l), d = () => {
|
|
3526
3670
|
s || a && (a(), c());
|
|
3527
3671
|
};
|
|
3528
3672
|
return e ? /* @__PURE__ */ n(
|
|
3529
|
-
|
|
3673
|
+
fe,
|
|
3530
3674
|
{
|
|
3531
3675
|
action: d,
|
|
3532
3676
|
disabled: s,
|
|
@@ -3535,9 +3679,9 @@ function Ra() {
|
|
|
3535
3679
|
tooltip: r,
|
|
3536
3680
|
tooltipOptions: o
|
|
3537
3681
|
}
|
|
3538
|
-
) : /* @__PURE__ */ n(
|
|
3682
|
+
) : /* @__PURE__ */ n(q, {});
|
|
3539
3683
|
}
|
|
3540
|
-
const
|
|
3684
|
+
const Gt = /* @__PURE__ */ Xe.create({
|
|
3541
3685
|
name: "attachment",
|
|
3542
3686
|
content: "",
|
|
3543
3687
|
marks: "",
|
|
@@ -3554,7 +3698,7 @@ const jt = /* @__PURE__ */ Ge.create({
|
|
|
3554
3698
|
class: "attachment"
|
|
3555
3699
|
},
|
|
3556
3700
|
button: ({ editor: t, t: r }) => ({
|
|
3557
|
-
component:
|
|
3701
|
+
component: fe,
|
|
3558
3702
|
componentProps: {
|
|
3559
3703
|
/**
|
|
3560
3704
|
* Instead of immediately inserting an empty node, we emit an event
|
|
@@ -3562,8 +3706,8 @@ const jt = /* @__PURE__ */ Ge.create({
|
|
|
3562
3706
|
* the upload callback has returned an id.
|
|
3563
3707
|
*/
|
|
3564
3708
|
action: () => {
|
|
3565
|
-
const i =
|
|
3566
|
-
|
|
3709
|
+
const i = He.UPLOAD_ATTACHMENT(t.id);
|
|
3710
|
+
so(i, !0);
|
|
3567
3711
|
},
|
|
3568
3712
|
isActive: () => !1,
|
|
3569
3713
|
disabled: !1,
|
|
@@ -3586,7 +3730,7 @@ const jt = /* @__PURE__ */ Ge.create({
|
|
|
3586
3730
|
} = e || {};
|
|
3587
3731
|
return [
|
|
3588
3732
|
"div",
|
|
3589
|
-
|
|
3733
|
+
Ye(
|
|
3590
3734
|
// @ts-expect-error
|
|
3591
3735
|
this.options.HTMLAttributes || {},
|
|
3592
3736
|
e || {}
|
|
@@ -3597,12 +3741,12 @@ const jt = /* @__PURE__ */ Ge.create({
|
|
|
3597
3741
|
[
|
|
3598
3742
|
"span",
|
|
3599
3743
|
{ class: "attachment__icon" },
|
|
3600
|
-
|
|
3744
|
+
Ut(o, !0)
|
|
3601
3745
|
],
|
|
3602
3746
|
[
|
|
3603
3747
|
"span",
|
|
3604
3748
|
{ class: "attachment__text" },
|
|
3605
|
-
`${r}.${a} (${
|
|
3749
|
+
`${r}.${a} (${Bt(i)})`
|
|
3606
3750
|
]
|
|
3607
3751
|
] : ["div", { class: "attachment__placeholder" }]
|
|
3608
3752
|
];
|
|
@@ -3615,27 +3759,27 @@ const jt = /* @__PURE__ */ Ge.create({
|
|
|
3615
3759
|
*/
|
|
3616
3760
|
id: {
|
|
3617
3761
|
default: null,
|
|
3618
|
-
parseHTML:
|
|
3762
|
+
parseHTML: ue("id")
|
|
3619
3763
|
},
|
|
3620
3764
|
fileName: {
|
|
3621
3765
|
default: null,
|
|
3622
|
-
parseHTML:
|
|
3766
|
+
parseHTML: ue("filename")
|
|
3623
3767
|
},
|
|
3624
3768
|
fileSize: {
|
|
3625
3769
|
default: null,
|
|
3626
|
-
parseHTML:
|
|
3770
|
+
parseHTML: ue("filesize")
|
|
3627
3771
|
},
|
|
3628
3772
|
fileType: {
|
|
3629
3773
|
default: null,
|
|
3630
|
-
parseHTML:
|
|
3774
|
+
parseHTML: ue("filetype")
|
|
3631
3775
|
},
|
|
3632
3776
|
fileExt: {
|
|
3633
3777
|
default: null,
|
|
3634
|
-
parseHTML:
|
|
3778
|
+
parseHTML: ue("fileext")
|
|
3635
3779
|
},
|
|
3636
3780
|
error: {
|
|
3637
3781
|
default: null,
|
|
3638
|
-
parseHTML:
|
|
3782
|
+
parseHTML: ue("error")
|
|
3639
3783
|
}
|
|
3640
3784
|
};
|
|
3641
3785
|
},
|
|
@@ -3645,23 +3789,23 @@ const jt = /* @__PURE__ */ Ge.create({
|
|
|
3645
3789
|
};
|
|
3646
3790
|
},
|
|
3647
3791
|
addNodeView() {
|
|
3648
|
-
return
|
|
3792
|
+
return wt(Lo);
|
|
3649
3793
|
}
|
|
3650
3794
|
});
|
|
3651
|
-
function
|
|
3795
|
+
function jo() {
|
|
3652
3796
|
var h;
|
|
3653
|
-
const { t: e } =
|
|
3654
|
-
|
|
3797
|
+
const { t: e } = ne(), t = ee(), { editorDisabled: r } = xe(), [i, o] = I(!1), [a, l] = I(!1), [s, c] = I(null), d = me(null), f = de(Gt.name), g = He.UPLOAD_ATTACHMENT(t.id);
|
|
3798
|
+
tt((x) => {
|
|
3655
3799
|
x && (c(null), l(!1), o(!0));
|
|
3656
|
-
}, [
|
|
3800
|
+
}, [g]);
|
|
3657
3801
|
const u = (h = f == null ? void 0 : f.options) == null ? void 0 : h.upload;
|
|
3658
|
-
function
|
|
3802
|
+
function v(x) {
|
|
3659
3803
|
var m;
|
|
3660
3804
|
x.preventDefault(), (m = d.current) == null || m.click();
|
|
3661
3805
|
}
|
|
3662
|
-
async function
|
|
3663
|
-
var
|
|
3664
|
-
const m = (
|
|
3806
|
+
async function p(x) {
|
|
3807
|
+
var T;
|
|
3808
|
+
const m = (T = x.target.files) == null ? void 0 : T[0];
|
|
3665
3809
|
if (!m || !t || t.isDestroyed) {
|
|
3666
3810
|
x.target.value = "";
|
|
3667
3811
|
return;
|
|
@@ -3672,17 +3816,17 @@ function zo() {
|
|
|
3672
3816
|
}
|
|
3673
3817
|
c(null), l(!0);
|
|
3674
3818
|
try {
|
|
3675
|
-
const
|
|
3819
|
+
const b = await u(m);
|
|
3676
3820
|
t.chain().focus().setAttachment({
|
|
3677
|
-
id:
|
|
3678
|
-
fileName:
|
|
3821
|
+
id: b,
|
|
3822
|
+
fileName: fo(m.name),
|
|
3679
3823
|
fileSize: m.size,
|
|
3680
3824
|
fileType: m.type,
|
|
3681
|
-
fileExt:
|
|
3825
|
+
fileExt: mo(m.name)
|
|
3682
3826
|
}).run(), o(!1);
|
|
3683
|
-
} catch (
|
|
3827
|
+
} catch (b) {
|
|
3684
3828
|
c(
|
|
3685
|
-
|
|
3829
|
+
b != null && b.message ? `${e("editor.attachment.error.upload_failed")}: ${b.message}` : e("editor.attachment.error.upload_failed")
|
|
3686
3830
|
);
|
|
3687
3831
|
} finally {
|
|
3688
3832
|
l(!1), x.target.value = "";
|
|
@@ -3691,16 +3835,16 @@ function zo() {
|
|
|
3691
3835
|
function k(x) {
|
|
3692
3836
|
a || (o(x), x || c(null));
|
|
3693
3837
|
}
|
|
3694
|
-
return r ? /* @__PURE__ */ n(
|
|
3695
|
-
/* @__PURE__ */ n(
|
|
3838
|
+
return r ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: k, open: i, children: /* @__PURE__ */ y(le, { children: [
|
|
3839
|
+
/* @__PURE__ */ n(ce, { children: e("editor.attachment.dialog.title") }),
|
|
3696
3840
|
/* @__PURE__ */ y("div", { className: "richtext-flex richtext-flex-col richtext-gap-3", children: [
|
|
3697
3841
|
/* @__PURE__ */ n("p", { className: "richtext-text-sm richtext-text-muted-foreground", children: e("editor.attachment.dialog.description") }),
|
|
3698
3842
|
/* @__PURE__ */ n(
|
|
3699
|
-
|
|
3843
|
+
X,
|
|
3700
3844
|
{
|
|
3701
3845
|
className: "richtext-w-full",
|
|
3702
3846
|
disabled: a,
|
|
3703
|
-
onClick:
|
|
3847
|
+
onClick: v,
|
|
3704
3848
|
size: "sm",
|
|
3705
3849
|
children: e(a ? "editor.attachment.uploading" : "editor.attachment.dialog.button.choose")
|
|
3706
3850
|
}
|
|
@@ -3711,14 +3855,14 @@ function zo() {
|
|
|
3711
3855
|
"input",
|
|
3712
3856
|
{
|
|
3713
3857
|
hidden: !0,
|
|
3714
|
-
onChange:
|
|
3858
|
+
onChange: p,
|
|
3715
3859
|
ref: d,
|
|
3716
3860
|
type: "file"
|
|
3717
3861
|
}
|
|
3718
3862
|
)
|
|
3719
3863
|
] }) });
|
|
3720
3864
|
}
|
|
3721
|
-
var
|
|
3865
|
+
var Po = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Oo = Xe.create({
|
|
3722
3866
|
name: "image",
|
|
3723
3867
|
addOptions() {
|
|
3724
3868
|
return {
|
|
@@ -3762,7 +3906,7 @@ var Io = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Lo = Ge.cre
|
|
|
3762
3906
|
];
|
|
3763
3907
|
},
|
|
3764
3908
|
renderHTML({ HTMLAttributes: e }) {
|
|
3765
|
-
return ["img",
|
|
3909
|
+
return ["img", Ye(this.options.HTMLAttributes, e)];
|
|
3766
3910
|
},
|
|
3767
3911
|
parseMarkdown: (e, t) => t.createNode("image", {
|
|
3768
3912
|
src: e.href,
|
|
@@ -3780,33 +3924,33 @@ var Io = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Lo = Ge.cre
|
|
|
3780
3924
|
const { directions: e, minWidth: t, minHeight: r, alwaysPreserveAspectRatio: i } = this.options.resize;
|
|
3781
3925
|
return ({ node: o, getPos: a, HTMLAttributes: l, editor: s }) => {
|
|
3782
3926
|
const c = document.createElement("img");
|
|
3783
|
-
Object.entries(l).forEach(([
|
|
3927
|
+
Object.entries(l).forEach(([g, u]) => {
|
|
3784
3928
|
if (u != null)
|
|
3785
|
-
switch (
|
|
3929
|
+
switch (g) {
|
|
3786
3930
|
case "width":
|
|
3787
3931
|
case "height":
|
|
3788
3932
|
break;
|
|
3789
3933
|
default:
|
|
3790
|
-
c.setAttribute(
|
|
3934
|
+
c.setAttribute(g, u);
|
|
3791
3935
|
break;
|
|
3792
3936
|
}
|
|
3793
3937
|
}), c.src = l.src;
|
|
3794
|
-
const d = new
|
|
3938
|
+
const d = new ar({
|
|
3795
3939
|
element: c,
|
|
3796
3940
|
editor: s,
|
|
3797
3941
|
node: o,
|
|
3798
3942
|
getPos: a,
|
|
3799
|
-
onResize: (
|
|
3800
|
-
c.style.width = `${
|
|
3943
|
+
onResize: (g, u) => {
|
|
3944
|
+
c.style.width = `${g}px`, c.style.height = `${u}px`;
|
|
3801
3945
|
},
|
|
3802
|
-
onCommit: (
|
|
3803
|
-
const
|
|
3804
|
-
|
|
3805
|
-
width:
|
|
3946
|
+
onCommit: (g, u) => {
|
|
3947
|
+
const v = a();
|
|
3948
|
+
v !== void 0 && this.editor.chain().setNodeSelection(v).updateAttributes(this.name, {
|
|
3949
|
+
width: g,
|
|
3806
3950
|
height: u
|
|
3807
3951
|
}).run();
|
|
3808
3952
|
},
|
|
3809
|
-
onUpdate: (
|
|
3953
|
+
onUpdate: (g, u, v) => g.type === o.type,
|
|
3810
3954
|
options: {
|
|
3811
3955
|
directions: e,
|
|
3812
3956
|
min: {
|
|
@@ -3831,8 +3975,8 @@ var Io = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Lo = Ge.cre
|
|
|
3831
3975
|
},
|
|
3832
3976
|
addInputRules() {
|
|
3833
3977
|
return [
|
|
3834
|
-
|
|
3835
|
-
find:
|
|
3978
|
+
or({
|
|
3979
|
+
find: Po,
|
|
3836
3980
|
type: this.type,
|
|
3837
3981
|
getAttributes: (e) => {
|
|
3838
3982
|
const [, , t, r, i] = e;
|
|
@@ -3841,128 +3985,128 @@ var Io = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Lo = Ge.cre
|
|
|
3841
3985
|
})
|
|
3842
3986
|
];
|
|
3843
3987
|
}
|
|
3844
|
-
}),
|
|
3845
|
-
function
|
|
3846
|
-
var t =
|
|
3988
|
+
}), Bo = Oo, Uo = typeof global == "object" && global && global.Object === Object && global, $o = typeof self == "object" && self && self.Object === Object && self, Xt = Uo || $o || Function("return this")(), Ee = Xt.Symbol, Yt = Object.prototype, Fo = Yt.hasOwnProperty, Wo = Yt.toString, we = Ee ? Ee.toStringTag : void 0;
|
|
3989
|
+
function Go(e) {
|
|
3990
|
+
var t = Fo.call(e, we), r = e[we];
|
|
3847
3991
|
try {
|
|
3848
|
-
e[
|
|
3992
|
+
e[we] = void 0;
|
|
3849
3993
|
var i = !0;
|
|
3850
3994
|
} catch {
|
|
3851
3995
|
}
|
|
3852
|
-
var o =
|
|
3853
|
-
return i && (t ? e[
|
|
3996
|
+
var o = Wo.call(e);
|
|
3997
|
+
return i && (t ? e[we] = r : delete e[we]), o;
|
|
3854
3998
|
}
|
|
3855
|
-
var
|
|
3856
|
-
function
|
|
3857
|
-
return
|
|
3999
|
+
var Xo = Object.prototype, Yo = Xo.toString;
|
|
4000
|
+
function Zo(e) {
|
|
4001
|
+
return Yo.call(e);
|
|
3858
4002
|
}
|
|
3859
|
-
var
|
|
3860
|
-
function
|
|
3861
|
-
return e == null ? e === void 0 ?
|
|
4003
|
+
var qo = "[object Null]", Jo = "[object Undefined]", pt = Ee ? Ee.toStringTag : void 0;
|
|
4004
|
+
function Zt(e) {
|
|
4005
|
+
return e == null ? e === void 0 ? Jo : qo : pt && pt in Object(e) ? Go(e) : Zo(e);
|
|
3862
4006
|
}
|
|
3863
|
-
function
|
|
4007
|
+
function qt(e) {
|
|
3864
4008
|
return e != null && typeof e == "object";
|
|
3865
4009
|
}
|
|
3866
|
-
var
|
|
3867
|
-
function
|
|
3868
|
-
return typeof e == "symbol" ||
|
|
4010
|
+
var Ko = "[object Symbol]";
|
|
4011
|
+
function Qo(e) {
|
|
4012
|
+
return typeof e == "symbol" || qt(e) && Zt(e) == Ko;
|
|
3869
4013
|
}
|
|
3870
|
-
var
|
|
3871
|
-
function
|
|
3872
|
-
for (var t = e.length; t-- &&
|
|
4014
|
+
var ea = /\s/;
|
|
4015
|
+
function ta(e) {
|
|
4016
|
+
for (var t = e.length; t-- && ea.test(e.charAt(t)); )
|
|
3873
4017
|
;
|
|
3874
4018
|
return t;
|
|
3875
4019
|
}
|
|
3876
|
-
var
|
|
3877
|
-
function
|
|
3878
|
-
return e && e.slice(0,
|
|
4020
|
+
var ra = /^\s+/;
|
|
4021
|
+
function ia(e) {
|
|
4022
|
+
return e && e.slice(0, ta(e) + 1).replace(ra, "");
|
|
3879
4023
|
}
|
|
3880
|
-
function
|
|
4024
|
+
function Re(e) {
|
|
3881
4025
|
var t = typeof e;
|
|
3882
4026
|
return e != null && (t == "object" || t == "function");
|
|
3883
4027
|
}
|
|
3884
|
-
var
|
|
3885
|
-
function
|
|
4028
|
+
var gt = NaN, na = /^[-+]0x[0-9a-f]+$/i, oa = /^0b[01]+$/i, aa = /^0o[0-7]+$/i, sa = parseInt;
|
|
4029
|
+
function Ce(e) {
|
|
3886
4030
|
if (typeof e == "number")
|
|
3887
4031
|
return e;
|
|
3888
|
-
if (
|
|
3889
|
-
return
|
|
3890
|
-
if (
|
|
4032
|
+
if (Qo(e))
|
|
4033
|
+
return gt;
|
|
4034
|
+
if (Re(e)) {
|
|
3891
4035
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
3892
|
-
e =
|
|
4036
|
+
e = Re(t) ? t + "" : t;
|
|
3893
4037
|
}
|
|
3894
4038
|
if (typeof e != "string")
|
|
3895
4039
|
return e === 0 ? e : +e;
|
|
3896
|
-
e =
|
|
3897
|
-
var r =
|
|
3898
|
-
return r ||
|
|
4040
|
+
e = ia(e);
|
|
4041
|
+
var r = oa.test(e);
|
|
4042
|
+
return r || aa.test(e) ? sa(e.slice(2), r ? 2 : 8) : na.test(e) ? gt : +e;
|
|
3899
4043
|
}
|
|
3900
|
-
function
|
|
4044
|
+
function la(e, t, r) {
|
|
3901
4045
|
return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e;
|
|
3902
4046
|
}
|
|
3903
|
-
function
|
|
3904
|
-
return r === void 0 && (r = t, t = void 0), r !== void 0 && (r =
|
|
4047
|
+
function ca(e, t, r) {
|
|
4048
|
+
return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = Ce(r), r = r === r ? r : 0), t !== void 0 && (t = Ce(t), t = t === t ? t : 0), la(Ce(e), t, r);
|
|
3905
4049
|
}
|
|
3906
|
-
var
|
|
3907
|
-
return
|
|
3908
|
-
},
|
|
3909
|
-
function
|
|
3910
|
-
var i, o, a, l, s, c, d = 0, f = !1,
|
|
4050
|
+
var $e = function() {
|
|
4051
|
+
return Xt.Date.now();
|
|
4052
|
+
}, da = "Expected a function", ua = Math.max, ha = Math.min;
|
|
4053
|
+
function fa(e, t, r) {
|
|
4054
|
+
var i, o, a, l, s, c, d = 0, f = !1, g = !1, u = !0;
|
|
3911
4055
|
if (typeof e != "function")
|
|
3912
|
-
throw new TypeError(
|
|
3913
|
-
t =
|
|
3914
|
-
function
|
|
3915
|
-
var
|
|
3916
|
-
return i = o = void 0, d = C, l = e.apply(
|
|
4056
|
+
throw new TypeError(da);
|
|
4057
|
+
t = Ce(t) || 0, Re(r) && (f = !!r.leading, g = "maxWait" in r, a = g ? ua(Ce(r.maxWait) || 0, t) : a, u = "trailing" in r ? !!r.trailing : u);
|
|
4058
|
+
function v(C) {
|
|
4059
|
+
var L = i, H = o;
|
|
4060
|
+
return i = o = void 0, d = C, l = e.apply(H, L), l;
|
|
3917
4061
|
}
|
|
3918
|
-
function
|
|
3919
|
-
return d = C, s = setTimeout(x, t), f ?
|
|
4062
|
+
function p(C) {
|
|
4063
|
+
return d = C, s = setTimeout(x, t), f ? v(C) : l;
|
|
3920
4064
|
}
|
|
3921
4065
|
function k(C) {
|
|
3922
|
-
var
|
|
3923
|
-
return
|
|
4066
|
+
var L = C - c, H = C - d, P = t - L;
|
|
4067
|
+
return g ? ha(P, a - H) : P;
|
|
3924
4068
|
}
|
|
3925
4069
|
function h(C) {
|
|
3926
|
-
var
|
|
3927
|
-
return c === void 0 ||
|
|
4070
|
+
var L = C - c, H = C - d;
|
|
4071
|
+
return c === void 0 || L >= t || L < 0 || g && H >= a;
|
|
3928
4072
|
}
|
|
3929
4073
|
function x() {
|
|
3930
|
-
var C =
|
|
4074
|
+
var C = $e();
|
|
3931
4075
|
if (h(C))
|
|
3932
4076
|
return m(C);
|
|
3933
4077
|
s = setTimeout(x, k(C));
|
|
3934
4078
|
}
|
|
3935
4079
|
function m(C) {
|
|
3936
|
-
return s = void 0, u && i ?
|
|
4080
|
+
return s = void 0, u && i ? v(C) : (i = o = void 0, l);
|
|
3937
4081
|
}
|
|
3938
|
-
function
|
|
4082
|
+
function T() {
|
|
3939
4083
|
s !== void 0 && clearTimeout(s), d = 0, i = c = o = s = void 0;
|
|
3940
4084
|
}
|
|
3941
|
-
function
|
|
3942
|
-
return s === void 0 ? l : m(
|
|
4085
|
+
function b() {
|
|
4086
|
+
return s === void 0 ? l : m($e());
|
|
3943
4087
|
}
|
|
3944
|
-
function
|
|
3945
|
-
var C =
|
|
3946
|
-
if (i = arguments, o = this, c = C,
|
|
4088
|
+
function A() {
|
|
4089
|
+
var C = $e(), L = h(C);
|
|
4090
|
+
if (i = arguments, o = this, c = C, L) {
|
|
3947
4091
|
if (s === void 0)
|
|
3948
|
-
return
|
|
3949
|
-
if (
|
|
3950
|
-
return clearTimeout(s), s = setTimeout(x, t),
|
|
4092
|
+
return p(c);
|
|
4093
|
+
if (g)
|
|
4094
|
+
return clearTimeout(s), s = setTimeout(x, t), v(c);
|
|
3951
4095
|
}
|
|
3952
4096
|
return s === void 0 && (s = setTimeout(x, t)), l;
|
|
3953
4097
|
}
|
|
3954
|
-
return
|
|
4098
|
+
return A.cancel = T, A.flush = b, A;
|
|
3955
4099
|
}
|
|
3956
|
-
var
|
|
3957
|
-
function
|
|
3958
|
-
return typeof e == "number" ||
|
|
4100
|
+
var ma = "[object Number]";
|
|
4101
|
+
function xt(e) {
|
|
4102
|
+
return typeof e == "number" || qt(e) && Zt(e) == ma;
|
|
3959
4103
|
}
|
|
3960
|
-
var
|
|
3961
|
-
function
|
|
4104
|
+
var pa = "Expected a function";
|
|
4105
|
+
function bt(e, t, r) {
|
|
3962
4106
|
var i = !0, o = !0;
|
|
3963
4107
|
if (typeof e != "function")
|
|
3964
|
-
throw new TypeError(
|
|
3965
|
-
return
|
|
4108
|
+
throw new TypeError(pa);
|
|
4109
|
+
return Re(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), fa(e, t, {
|
|
3966
4110
|
leading: i,
|
|
3967
4111
|
maxWait: t,
|
|
3968
4112
|
trailing: o
|
|
@@ -3974,7 +4118,7 @@ const Te = {
|
|
|
3974
4118
|
BOTTOM_LEFT: "bl",
|
|
3975
4119
|
BOTTOM_RIGHT: "br"
|
|
3976
4120
|
};
|
|
3977
|
-
function
|
|
4121
|
+
function ga({
|
|
3978
4122
|
src: e,
|
|
3979
4123
|
style: t
|
|
3980
4124
|
}) {
|
|
@@ -4081,11 +4225,11 @@ function aa({
|
|
|
4081
4225
|
}
|
|
4082
4226
|
);
|
|
4083
4227
|
}
|
|
4084
|
-
function
|
|
4085
|
-
var
|
|
4228
|
+
function xa(e) {
|
|
4229
|
+
var P, O, U, S;
|
|
4086
4230
|
const [t, r] = I({
|
|
4087
|
-
width:
|
|
4088
|
-
height:
|
|
4231
|
+
width: lt,
|
|
4232
|
+
height: lt
|
|
4089
4233
|
}), [i, o] = I({
|
|
4090
4234
|
width: 0,
|
|
4091
4235
|
height: 0
|
|
@@ -4100,27 +4244,27 @@ function sa(e) {
|
|
|
4100
4244
|
w: 0,
|
|
4101
4245
|
h: 0,
|
|
4102
4246
|
dir: ""
|
|
4103
|
-
}), { align: f, inline:
|
|
4104
|
-
var
|
|
4105
|
-
const { src: w, alt:
|
|
4106
|
-
|
|
4107
|
-
const
|
|
4247
|
+
}), { align: f, inline: g, uploading: u } = (P = e == null ? void 0 : e.node) == null ? void 0 : P.attrs, v = g && (f === "left" || f === "right"), p = F(() => {
|
|
4248
|
+
var ot;
|
|
4249
|
+
const { src: w, alt: N, width: V, height: j, flipX: B, flipY: z } = (ot = e == null ? void 0 : e.node) == null ? void 0 : ot.attrs, $ = xt(V) ? `${V}px` : V, W = xt(j) ? `${j}px` : j, G = [];
|
|
4250
|
+
B && G.push("rotateX(180deg)"), z && G.push("rotateY(180deg)");
|
|
4251
|
+
const Qt = G.join(" ");
|
|
4108
4252
|
return {
|
|
4109
4253
|
src: w || void 0,
|
|
4110
|
-
alt:
|
|
4254
|
+
alt: N || void 0,
|
|
4111
4255
|
style: {
|
|
4112
|
-
width:
|
|
4113
|
-
height:
|
|
4114
|
-
transform:
|
|
4115
|
-
...
|
|
4256
|
+
width: $ || void 0,
|
|
4257
|
+
height: W || void 0,
|
|
4258
|
+
transform: Qt || "none",
|
|
4259
|
+
...v ? { float: f } : {}
|
|
4116
4260
|
}
|
|
4117
4261
|
};
|
|
4118
|
-
}, [(
|
|
4262
|
+
}, [(O = e == null ? void 0 : e.node) == null ? void 0 : O.attrs]), k = F(() => {
|
|
4119
4263
|
const {
|
|
4120
4264
|
style: { width: w }
|
|
4121
|
-
} =
|
|
4265
|
+
} = p;
|
|
4122
4266
|
return { width: w === "100%" ? w : void 0 };
|
|
4123
|
-
}, [
|
|
4267
|
+
}, [p]);
|
|
4124
4268
|
function h(w) {
|
|
4125
4269
|
o({
|
|
4126
4270
|
width: w.target.width,
|
|
@@ -4128,44 +4272,44 @@ function sa(e) {
|
|
|
4128
4272
|
});
|
|
4129
4273
|
}
|
|
4130
4274
|
function x() {
|
|
4131
|
-
const { editor: w, getPos:
|
|
4132
|
-
w.commands.setNodeSelection(
|
|
4275
|
+
const { editor: w, getPos: N } = e;
|
|
4276
|
+
w.commands.setNodeSelection(N());
|
|
4133
4277
|
}
|
|
4134
|
-
const m =
|
|
4135
|
-
|
|
4136
|
-
const { editor: w } = e, { width:
|
|
4137
|
-
r((
|
|
4138
|
-
...
|
|
4139
|
-
width: Number.parseInt(
|
|
4278
|
+
const m = oe(
|
|
4279
|
+
bt(() => {
|
|
4280
|
+
const { editor: w } = e, { width: N } = getComputedStyle(w.view.dom);
|
|
4281
|
+
r((V) => ({
|
|
4282
|
+
...V,
|
|
4283
|
+
width: Number.parseInt(N, 10)
|
|
4140
4284
|
}));
|
|
4141
|
-
},
|
|
4285
|
+
}, ct),
|
|
4142
4286
|
[e == null ? void 0 : e.editor]
|
|
4143
4287
|
);
|
|
4144
|
-
function
|
|
4288
|
+
function T(w, N) {
|
|
4145
4289
|
w.preventDefault(), w.stopPropagation();
|
|
4146
|
-
const
|
|
4147
|
-
let z = Number(e.node.attrs.width),
|
|
4148
|
-
const
|
|
4149
|
-
z &&
|
|
4290
|
+
const V = i.width, j = i.height, B = V / j;
|
|
4291
|
+
let z = Number(e.node.attrs.width), $ = Number(e.node.attrs.height);
|
|
4292
|
+
const W = t.width;
|
|
4293
|
+
z && !$ ? (z = z > W ? W : z, $ = Math.round(z / B)) : $ && !z ? (z = Math.round($ * B), z = z > W ? W : z) : !z && !$ ? (z = V > W ? W : V, $ = Math.round(z / B)) : z = z > W ? W : z, s(!0), d({
|
|
4150
4294
|
x: w.clientX,
|
|
4151
4295
|
y: w.clientY,
|
|
4152
4296
|
w: z,
|
|
4153
|
-
h:
|
|
4154
|
-
dir:
|
|
4297
|
+
h: $,
|
|
4298
|
+
dir: N
|
|
4155
4299
|
});
|
|
4156
4300
|
}
|
|
4157
|
-
const
|
|
4158
|
-
|
|
4301
|
+
const b = oe(
|
|
4302
|
+
bt((w) => {
|
|
4159
4303
|
if (w.preventDefault(), w.stopPropagation(), !l)
|
|
4160
4304
|
return;
|
|
4161
|
-
const { x:
|
|
4305
|
+
const { x: N, w: V, dir: j } = c, B = (w.clientX - N) * (/l/.test(j) ? -1 : 1), z = ca(V + B, Ri, t.width);
|
|
4162
4306
|
e.updateAttributes({
|
|
4163
4307
|
width: z,
|
|
4164
4308
|
height: null
|
|
4165
4309
|
});
|
|
4166
|
-
},
|
|
4310
|
+
}, ct),
|
|
4167
4311
|
[l, c, t, e.updateAttributes]
|
|
4168
|
-
),
|
|
4312
|
+
), A = oe(
|
|
4169
4313
|
(w) => {
|
|
4170
4314
|
w.preventDefault(), w.stopPropagation(), l && (d({
|
|
4171
4315
|
x: 0,
|
|
@@ -4176,44 +4320,44 @@ function sa(e) {
|
|
|
4176
4320
|
}), s(!1), x());
|
|
4177
4321
|
},
|
|
4178
4322
|
[l, x]
|
|
4179
|
-
), C =
|
|
4180
|
-
document == null || document.addEventListener("mousemove",
|
|
4181
|
-
}, [
|
|
4182
|
-
document == null || document.removeEventListener("mousemove",
|
|
4183
|
-
}, [
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
}), [l, C,
|
|
4187
|
-
const
|
|
4188
|
-
return
|
|
4189
|
-
|
|
4190
|
-
}), [e.editor.view.dom,
|
|
4323
|
+
), C = oe(() => {
|
|
4324
|
+
document == null || document.addEventListener("mousemove", b, !0), document == null || document.addEventListener("mouseup", A, !0);
|
|
4325
|
+
}, [b, A]), L = oe(() => {
|
|
4326
|
+
document == null || document.removeEventListener("mousemove", b, !0), document == null || document.removeEventListener("mouseup", A, !0);
|
|
4327
|
+
}, [b, A]);
|
|
4328
|
+
Ie(() => (l ? C() : L(), () => {
|
|
4329
|
+
L();
|
|
4330
|
+
}), [l, C, L]);
|
|
4331
|
+
const H = F(() => new ResizeObserver(() => m()), [m]);
|
|
4332
|
+
return Ie(() => (H.observe(e.editor.view.dom), () => {
|
|
4333
|
+
H.disconnect();
|
|
4334
|
+
}), [e.editor.view.dom, H]), u ? /* @__PURE__ */ n(
|
|
4191
4335
|
Le,
|
|
4192
4336
|
{
|
|
4193
|
-
as:
|
|
4337
|
+
as: g ? "span" : "div",
|
|
4194
4338
|
className: "image-view",
|
|
4195
4339
|
style: {
|
|
4196
|
-
float:
|
|
4197
|
-
margin:
|
|
4198
|
-
display:
|
|
4199
|
-
textAlign:
|
|
4200
|
-
width: ((
|
|
4201
|
-
...
|
|
4340
|
+
float: v ? f : void 0,
|
|
4341
|
+
margin: v ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
|
|
4342
|
+
display: g ? "inline" : "block",
|
|
4343
|
+
textAlign: v ? void 0 : f,
|
|
4344
|
+
width: ((U = p.style) == null ? void 0 : U.width) ?? "auto",
|
|
4345
|
+
...v ? {} : k
|
|
4202
4346
|
},
|
|
4203
|
-
children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(
|
|
4347
|
+
children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(ga, { src: p.src, style: p.style }) })
|
|
4204
4348
|
}
|
|
4205
4349
|
) : /* @__PURE__ */ n(
|
|
4206
4350
|
Le,
|
|
4207
4351
|
{
|
|
4208
|
-
as:
|
|
4352
|
+
as: g ? "span" : "div",
|
|
4209
4353
|
className: "image-view",
|
|
4210
4354
|
style: {
|
|
4211
|
-
float:
|
|
4212
|
-
margin:
|
|
4213
|
-
display:
|
|
4214
|
-
textAlign:
|
|
4215
|
-
width: ((
|
|
4216
|
-
...
|
|
4355
|
+
float: v ? f : void 0,
|
|
4356
|
+
margin: v ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
|
|
4357
|
+
display: g ? "inline" : "block",
|
|
4358
|
+
textAlign: v ? void 0 : f,
|
|
4359
|
+
width: ((S = p.style) == null ? void 0 : S.width) ?? "auto",
|
|
4360
|
+
...v ? {} : k
|
|
4217
4361
|
},
|
|
4218
4362
|
children: /* @__PURE__ */ y(
|
|
4219
4363
|
"div",
|
|
@@ -4226,20 +4370,20 @@ function sa(e) {
|
|
|
4226
4370
|
/* @__PURE__ */ n(
|
|
4227
4371
|
"img",
|
|
4228
4372
|
{
|
|
4229
|
-
alt:
|
|
4373
|
+
alt: p.alt,
|
|
4230
4374
|
className: "image-view__body__image block",
|
|
4231
4375
|
height: "auto",
|
|
4232
4376
|
onClick: x,
|
|
4233
4377
|
onLoad: h,
|
|
4234
|
-
src:
|
|
4235
|
-
style:
|
|
4378
|
+
src: p.src,
|
|
4379
|
+
style: p.style
|
|
4236
4380
|
}
|
|
4237
4381
|
),
|
|
4238
4382
|
(e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || l) && /* @__PURE__ */ n("div", { className: "image-resizer", children: a == null ? void 0 : a.map((w) => /* @__PURE__ */ n(
|
|
4239
4383
|
"span",
|
|
4240
4384
|
{
|
|
4241
4385
|
className: `image-resizer__handler image-resizer__handler--${w}`,
|
|
4242
|
-
onMouseDown: (
|
|
4386
|
+
onMouseDown: (N) => T(N, w)
|
|
4243
4387
|
},
|
|
4244
4388
|
`image-dir-${w}`
|
|
4245
4389
|
)) })
|
|
@@ -4249,7 +4393,7 @@ function sa(e) {
|
|
|
4249
4393
|
}
|
|
4250
4394
|
);
|
|
4251
4395
|
}
|
|
4252
|
-
function
|
|
4396
|
+
function ba(e, t) {
|
|
4253
4397
|
const r = e.type, i = e.name.toLowerCase(), o = i.split(".").pop();
|
|
4254
4398
|
if (!o) return !1;
|
|
4255
4399
|
const l = r || {
|
|
@@ -4272,10 +4416,10 @@ function la(e, t) {
|
|
|
4272
4416
|
return l === s;
|
|
4273
4417
|
});
|
|
4274
4418
|
}
|
|
4275
|
-
function
|
|
4419
|
+
function nt(e, t) {
|
|
4276
4420
|
const { acceptMimes: r, maxSize: i, t: o, toast: a } = t, l = [];
|
|
4277
4421
|
return (Array.isArray(e) ? e : Object.values(e)).forEach((c) => {
|
|
4278
|
-
if (!
|
|
4422
|
+
if (!ba(c, r)) {
|
|
4279
4423
|
t.onError ? t.onError({
|
|
4280
4424
|
type: "type",
|
|
4281
4425
|
message: o("editor.upload.fileTypeNotSupported", {
|
|
@@ -4311,55 +4455,55 @@ function rt(e, t) {
|
|
|
4311
4455
|
l.push(c);
|
|
4312
4456
|
}), l;
|
|
4313
4457
|
}
|
|
4314
|
-
function
|
|
4315
|
-
const { t: e } =
|
|
4316
|
-
function
|
|
4317
|
-
var
|
|
4318
|
-
const
|
|
4319
|
-
if (!r || r.isDestroyed ||
|
|
4458
|
+
function Ga() {
|
|
4459
|
+
const { t: e } = ne(), { toast: t } = Ke(), r = ee(), i = it(Ve.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = xe(), [s, c] = I(!1), d = de(Ve.name), [f, g] = I(""), [u, v] = I(""), p = me(null), k = (d == null ? void 0 : d.options.defaultInline) || !1, [h, x] = I(k), m = F(() => d == null ? void 0 : d.options, [d]);
|
|
4460
|
+
function T(C) {
|
|
4461
|
+
var U;
|
|
4462
|
+
const L = (U = C == null ? void 0 : C.target) == null ? void 0 : U.files;
|
|
4463
|
+
if (!r || r.isDestroyed || L.length === 0) {
|
|
4320
4464
|
C.target.value = "";
|
|
4321
4465
|
return;
|
|
4322
4466
|
}
|
|
4323
|
-
const
|
|
4467
|
+
const H = nt(L, {
|
|
4324
4468
|
acceptMimes: m == null ? void 0 : m.acceptMimes,
|
|
4325
4469
|
maxSize: m == null ? void 0 : m.maxSize,
|
|
4326
4470
|
t: e,
|
|
4327
4471
|
toast: t,
|
|
4328
4472
|
onError: m.onError
|
|
4329
4473
|
});
|
|
4330
|
-
if (
|
|
4474
|
+
if (H.length <= 0) {
|
|
4331
4475
|
C.target.value = "";
|
|
4332
4476
|
return;
|
|
4333
4477
|
}
|
|
4334
4478
|
c(!1);
|
|
4335
|
-
const
|
|
4336
|
-
if (
|
|
4337
|
-
const
|
|
4338
|
-
for (const w of
|
|
4479
|
+
const P = u, O = h;
|
|
4480
|
+
if (v(""), x(k), m.upload) {
|
|
4481
|
+
const S = m != null && m.multiple ? H : [H[0]];
|
|
4482
|
+
for (const w of S)
|
|
4339
4483
|
r.chain().focus().insertImagePlaceholder({
|
|
4340
4484
|
file: w,
|
|
4341
|
-
inline:
|
|
4342
|
-
alt:
|
|
4485
|
+
inline: O,
|
|
4486
|
+
alt: P
|
|
4343
4487
|
}).run();
|
|
4344
4488
|
} else {
|
|
4345
|
-
const
|
|
4346
|
-
for (const w of
|
|
4347
|
-
const
|
|
4348
|
-
r.chain().focus().setImageInline({ src:
|
|
4489
|
+
const S = m != null && m.multiple ? H : [H[0]];
|
|
4490
|
+
for (const w of S) {
|
|
4491
|
+
const N = URL.createObjectURL(w);
|
|
4492
|
+
r.chain().focus().setImageInline({ src: N, inline: O, alt: P }).run();
|
|
4349
4493
|
}
|
|
4350
4494
|
}
|
|
4351
4495
|
C.target.value = "";
|
|
4352
4496
|
}
|
|
4353
|
-
function
|
|
4354
|
-
C.preventDefault(), C.stopPropagation(), r.chain().focus().setImageInline({ src: f, inline: h, alt: u }).run(), c(!1), x(k),
|
|
4497
|
+
function b(C) {
|
|
4498
|
+
C.preventDefault(), C.stopPropagation(), r.chain().focus().setImageInline({ src: f, inline: h, alt: u }).run(), c(!1), x(k), g(""), v("");
|
|
4355
4499
|
}
|
|
4356
|
-
function
|
|
4357
|
-
var
|
|
4358
|
-
C.preventDefault(), (
|
|
4500
|
+
function A(C) {
|
|
4501
|
+
var L;
|
|
4502
|
+
C.preventDefault(), (L = p.current) == null || L.click();
|
|
4359
4503
|
}
|
|
4360
4504
|
return i ? /* @__PURE__ */ y(ge, { onOpenChange: c, open: s, children: [
|
|
4361
|
-
/* @__PURE__ */ n(
|
|
4362
|
-
|
|
4505
|
+
/* @__PURE__ */ n(rt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
4506
|
+
fe,
|
|
4363
4507
|
{
|
|
4364
4508
|
disabled: l,
|
|
4365
4509
|
icon: o,
|
|
@@ -4369,21 +4513,21 @@ function Va() {
|
|
|
4369
4513
|
}
|
|
4370
4514
|
}
|
|
4371
4515
|
) }),
|
|
4372
|
-
/* @__PURE__ */ y(
|
|
4373
|
-
/* @__PURE__ */ n(
|
|
4516
|
+
/* @__PURE__ */ y(le, { children: [
|
|
4517
|
+
/* @__PURE__ */ n(ce, { children: e("editor.image.dialog.title") }),
|
|
4374
4518
|
/* @__PURE__ */ y(
|
|
4375
|
-
|
|
4519
|
+
_e,
|
|
4376
4520
|
{
|
|
4377
4521
|
activationMode: "manual",
|
|
4378
4522
|
defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
|
|
4379
4523
|
children: [
|
|
4380
|
-
m.resourceImage === "both" && /* @__PURE__ */ y(
|
|
4381
|
-
/* @__PURE__ */ n(
|
|
4382
|
-
/* @__PURE__ */ n(
|
|
4524
|
+
m.resourceImage === "both" && /* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
4525
|
+
/* @__PURE__ */ n(K, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
|
|
4526
|
+
/* @__PURE__ */ n(K, { value: "link", children: e("editor.image.dialog.tab.url") })
|
|
4383
4527
|
] }),
|
|
4384
4528
|
/* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
|
|
4385
4529
|
/* @__PURE__ */ n(
|
|
4386
|
-
|
|
4530
|
+
Qe,
|
|
4387
4531
|
{
|
|
4388
4532
|
checked: h,
|
|
4389
4533
|
onCheckedChange: (C) => {
|
|
@@ -4391,40 +4535,40 @@ function Va() {
|
|
|
4391
4535
|
}
|
|
4392
4536
|
}
|
|
4393
4537
|
),
|
|
4394
|
-
/* @__PURE__ */ n(
|
|
4538
|
+
/* @__PURE__ */ n(ke, { children: e("editor.link.dialog.inline") })
|
|
4395
4539
|
] }),
|
|
4396
4540
|
m.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
|
|
4397
|
-
/* @__PURE__ */ n(
|
|
4541
|
+
/* @__PURE__ */ n(ke, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
|
|
4398
4542
|
/* @__PURE__ */ n(
|
|
4399
|
-
|
|
4543
|
+
ae,
|
|
4400
4544
|
{
|
|
4401
|
-
onChange: (C) =>
|
|
4545
|
+
onChange: (C) => v(C.target.value),
|
|
4402
4546
|
required: !0,
|
|
4403
4547
|
type: "text",
|
|
4404
4548
|
value: u
|
|
4405
4549
|
}
|
|
4406
4550
|
)
|
|
4407
4551
|
] }),
|
|
4408
|
-
/* @__PURE__ */ y(
|
|
4552
|
+
/* @__PURE__ */ y(Q, { value: "upload", children: [
|
|
4409
4553
|
/* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
4410
4554
|
/* @__PURE__ */ n(
|
|
4411
|
-
|
|
4555
|
+
X,
|
|
4412
4556
|
{
|
|
4413
4557
|
className: "richtext-mt-1 richtext-w-full",
|
|
4414
|
-
onClick:
|
|
4558
|
+
onClick: A,
|
|
4415
4559
|
size: "sm",
|
|
4416
4560
|
children: e("editor.image.dialog.tab.upload")
|
|
4417
4561
|
}
|
|
4418
4562
|
),
|
|
4419
4563
|
/* @__PURE__ */ n(
|
|
4420
|
-
|
|
4564
|
+
Jt,
|
|
4421
4565
|
{
|
|
4422
4566
|
alt: u,
|
|
4423
4567
|
disabled: !1,
|
|
4424
4568
|
editor: r,
|
|
4425
4569
|
imageInline: h,
|
|
4426
4570
|
onClose: () => {
|
|
4427
|
-
|
|
4571
|
+
v("");
|
|
4428
4572
|
}
|
|
4429
4573
|
}
|
|
4430
4574
|
)
|
|
@@ -4434,34 +4578,34 @@ function Va() {
|
|
|
4434
4578
|
{
|
|
4435
4579
|
accept: m.acceptMimes.join(",") || "image/*",
|
|
4436
4580
|
multiple: m.multiple,
|
|
4437
|
-
onChange:
|
|
4438
|
-
ref:
|
|
4581
|
+
onChange: T,
|
|
4582
|
+
ref: p,
|
|
4439
4583
|
style: { display: "none" },
|
|
4440
4584
|
type: "file"
|
|
4441
4585
|
}
|
|
4442
4586
|
)
|
|
4443
4587
|
] }),
|
|
4444
|
-
/* @__PURE__ */ n(
|
|
4588
|
+
/* @__PURE__ */ n(Q, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: b, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
4445
4589
|
/* @__PURE__ */ n(
|
|
4446
|
-
|
|
4590
|
+
ae,
|
|
4447
4591
|
{
|
|
4448
4592
|
autoFocus: !0,
|
|
4449
|
-
onChange: (C) =>
|
|
4593
|
+
onChange: (C) => g(C.target.value),
|
|
4450
4594
|
placeholder: e("editor.image.dialog.placeholder"),
|
|
4451
4595
|
required: !0,
|
|
4452
4596
|
type: "url",
|
|
4453
4597
|
value: f
|
|
4454
4598
|
}
|
|
4455
4599
|
),
|
|
4456
|
-
/* @__PURE__ */ n(
|
|
4600
|
+
/* @__PURE__ */ n(X, { type: "submit", children: e("editor.image.dialog.button.apply") })
|
|
4457
4601
|
] }) }) })
|
|
4458
4602
|
]
|
|
4459
4603
|
}
|
|
4460
4604
|
)
|
|
4461
4605
|
] })
|
|
4462
|
-
] }) : /* @__PURE__ */ n(
|
|
4606
|
+
] }) : /* @__PURE__ */ n(q, {});
|
|
4463
4607
|
}
|
|
4464
|
-
const
|
|
4608
|
+
const va = {
|
|
4465
4609
|
acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
|
|
4466
4610
|
maxSize: 1024 * 1024 * 5,
|
|
4467
4611
|
// 5MB
|
|
@@ -4469,7 +4613,7 @@ const ca = {
|
|
|
4469
4613
|
resourceImage: "both",
|
|
4470
4614
|
defaultInline: !1,
|
|
4471
4615
|
enableAlt: !0
|
|
4472
|
-
},
|
|
4616
|
+
}, Ve = /* @__PURE__ */ Bo.extend({
|
|
4473
4617
|
group: "inline",
|
|
4474
4618
|
inline: !0,
|
|
4475
4619
|
defining: !0,
|
|
@@ -4478,7 +4622,7 @@ const ca = {
|
|
|
4478
4622
|
addOptions() {
|
|
4479
4623
|
var e;
|
|
4480
4624
|
return {
|
|
4481
|
-
...
|
|
4625
|
+
...va,
|
|
4482
4626
|
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
4483
4627
|
upload: () => Promise.reject("Image Upload Function"),
|
|
4484
4628
|
button: ({
|
|
@@ -4555,7 +4699,7 @@ const ca = {
|
|
|
4555
4699
|
};
|
|
4556
4700
|
},
|
|
4557
4701
|
addNodeView() {
|
|
4558
|
-
return
|
|
4702
|
+
return wt(xa);
|
|
4559
4703
|
},
|
|
4560
4704
|
addCommands() {
|
|
4561
4705
|
var r;
|
|
@@ -4587,33 +4731,33 @@ const ca = {
|
|
|
4587
4731
|
}
|
|
4588
4732
|
})) return !1;
|
|
4589
4733
|
const f = t.upload;
|
|
4590
|
-
return f && f(i).then((
|
|
4734
|
+
return f && f(i).then((g) => {
|
|
4591
4735
|
const { doc: u } = l.state;
|
|
4592
|
-
let
|
|
4593
|
-
u.descendants((
|
|
4594
|
-
if (
|
|
4595
|
-
return
|
|
4596
|
-
}),
|
|
4597
|
-
l.state.tr.setNodeMarkup(
|
|
4598
|
-
...l.state.doc.nodeAt(
|
|
4599
|
-
src:
|
|
4600
|
-
imageId:
|
|
4736
|
+
let v = null;
|
|
4737
|
+
u.descendants((p, k) => {
|
|
4738
|
+
if (p.type.name === e && p.attrs.uploading === !0 && p.attrs.src === c)
|
|
4739
|
+
return v = k, !1;
|
|
4740
|
+
}), v !== null && l.view.dispatch(
|
|
4741
|
+
l.state.tr.setNodeMarkup(v, void 0, {
|
|
4742
|
+
...l.state.doc.nodeAt(v).attrs,
|
|
4743
|
+
src: g.cdnUrl,
|
|
4744
|
+
imageId: g.imageId,
|
|
4601
4745
|
uploading: !1
|
|
4602
4746
|
})
|
|
4603
4747
|
), URL.revokeObjectURL(c);
|
|
4604
|
-
}).catch((
|
|
4605
|
-
console.error("Image upload failed",
|
|
4748
|
+
}).catch((g) => {
|
|
4749
|
+
console.error("Image upload failed", g);
|
|
4606
4750
|
const { doc: u } = l.state;
|
|
4607
|
-
let
|
|
4608
|
-
if (u.descendants((
|
|
4609
|
-
if (
|
|
4610
|
-
return
|
|
4611
|
-
}),
|
|
4612
|
-
const
|
|
4613
|
-
|
|
4751
|
+
let v = null;
|
|
4752
|
+
if (u.descendants((p, k) => {
|
|
4753
|
+
if (p.type.name === e && p.attrs.uploading === !0 && p.attrs.src === c)
|
|
4754
|
+
return v = k, !1;
|
|
4755
|
+
}), v !== null) {
|
|
4756
|
+
const p = l.state.doc.nodeAt(v);
|
|
4757
|
+
p && l.view.dispatch(
|
|
4614
4758
|
l.state.tr.delete(
|
|
4615
|
-
|
|
4616
|
-
|
|
4759
|
+
v,
|
|
4760
|
+
v + p.nodeSize
|
|
4617
4761
|
)
|
|
4618
4762
|
);
|
|
4619
4763
|
}
|
|
@@ -4634,7 +4778,7 @@ const ca = {
|
|
|
4634
4778
|
},
|
|
4635
4779
|
[
|
|
4636
4780
|
"img",
|
|
4637
|
-
|
|
4781
|
+
Ye(
|
|
4638
4782
|
{
|
|
4639
4783
|
height: "auto",
|
|
4640
4784
|
style: f
|
|
@@ -4741,107 +4885,107 @@ const ca = {
|
|
|
4741
4885
|
// ];
|
|
4742
4886
|
// },
|
|
4743
4887
|
});
|
|
4744
|
-
function
|
|
4888
|
+
function Jt({
|
|
4745
4889
|
editor: e,
|
|
4746
4890
|
imageInline: t,
|
|
4747
4891
|
onClose: r,
|
|
4748
4892
|
disabled: i,
|
|
4749
4893
|
alt: o
|
|
4750
4894
|
}) {
|
|
4751
|
-
var
|
|
4752
|
-
const { t: a } =
|
|
4895
|
+
var U, S;
|
|
4896
|
+
const { t: a } = ne(), { toast: l } = Ke(), [s, c] = I(!1), [d, f] = I(!1), g = ie.useRef(null), [u, v] = ie.useState(), [p, k] = ie.useState(""), h = me(null), [x, m] = I({
|
|
4753
4897
|
src: "",
|
|
4754
4898
|
file: null
|
|
4755
|
-
}),
|
|
4756
|
-
function
|
|
4757
|
-
if (
|
|
4758
|
-
const
|
|
4759
|
-
k(
|
|
4899
|
+
}), T = de(Ve.name), b = F(() => (T == null ? void 0 : T.options) ?? {}, [T]);
|
|
4900
|
+
function A(w) {
|
|
4901
|
+
if (g.current && w.width && w.height) {
|
|
4902
|
+
const N = C(g.current, w);
|
|
4903
|
+
k(N);
|
|
4760
4904
|
}
|
|
4761
4905
|
}
|
|
4762
|
-
function C(w,
|
|
4763
|
-
const
|
|
4764
|
-
|
|
4765
|
-
const z =
|
|
4906
|
+
function C(w, N) {
|
|
4907
|
+
const V = document.createElement("canvas"), j = w.naturalWidth / w.width, B = w.naturalHeight / w.height;
|
|
4908
|
+
V.width = N.width * j, V.height = N.height * B;
|
|
4909
|
+
const z = V.getContext("2d");
|
|
4766
4910
|
return z && (z.imageSmoothingEnabled = !1, z.drawImage(
|
|
4767
4911
|
w,
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4912
|
+
N.x * j,
|
|
4913
|
+
N.y * B,
|
|
4914
|
+
N.width * j,
|
|
4915
|
+
N.height * B,
|
|
4772
4916
|
0,
|
|
4773
4917
|
0,
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
)),
|
|
4918
|
+
N.width * j,
|
|
4919
|
+
N.height * B
|
|
4920
|
+
)), V.toDataURL("image/png", 1);
|
|
4777
4921
|
}
|
|
4778
|
-
const
|
|
4779
|
-
var
|
|
4922
|
+
const L = ie.useCallback(() => {
|
|
4923
|
+
var N;
|
|
4780
4924
|
if (d) return;
|
|
4781
|
-
const w =
|
|
4782
|
-
|
|
4783
|
-
((
|
|
4925
|
+
const w = xo(
|
|
4926
|
+
p,
|
|
4927
|
+
((N = x == null ? void 0 : x.file) == null ? void 0 : N.name) || "image.png"
|
|
4784
4928
|
);
|
|
4785
4929
|
if (c(!1), m({
|
|
4786
4930
|
src: "",
|
|
4787
4931
|
file: null
|
|
4788
|
-
}),
|
|
4932
|
+
}), O(), r(), b.upload)
|
|
4789
4933
|
e.chain().focus().insertImagePlaceholder({
|
|
4790
4934
|
file: w,
|
|
4791
4935
|
inline: t,
|
|
4792
4936
|
alt: o
|
|
4793
4937
|
}).run();
|
|
4794
4938
|
else {
|
|
4795
|
-
const
|
|
4796
|
-
e.chain().focus().setImageInline({ src:
|
|
4939
|
+
const V = URL.createObjectURL(w);
|
|
4940
|
+
e.chain().focus().setImageInline({ src: V, inline: t, alt: o }).run();
|
|
4797
4941
|
}
|
|
4798
4942
|
}, [
|
|
4799
|
-
|
|
4943
|
+
p,
|
|
4800
4944
|
e,
|
|
4801
4945
|
t,
|
|
4802
4946
|
d,
|
|
4803
4947
|
r,
|
|
4804
|
-
(
|
|
4805
|
-
|
|
4948
|
+
(U = x == null ? void 0 : x.file) == null ? void 0 : U.name,
|
|
4949
|
+
b,
|
|
4806
4950
|
o
|
|
4807
4951
|
]);
|
|
4808
|
-
function
|
|
4809
|
-
var
|
|
4810
|
-
w.preventDefault(), (
|
|
4952
|
+
function H(w) {
|
|
4953
|
+
var N;
|
|
4954
|
+
w.preventDefault(), (N = h.current) == null || N.click();
|
|
4811
4955
|
}
|
|
4812
|
-
const
|
|
4956
|
+
const P = async (w) => {
|
|
4813
4957
|
var z;
|
|
4814
|
-
const
|
|
4815
|
-
if (!e || e.isDestroyed ||
|
|
4958
|
+
const N = (z = w == null ? void 0 : w.target) == null ? void 0 : z.files;
|
|
4959
|
+
if (!e || e.isDestroyed || N.length === 0) {
|
|
4816
4960
|
w.target.value = "";
|
|
4817
4961
|
return;
|
|
4818
4962
|
}
|
|
4819
|
-
const
|
|
4820
|
-
acceptMimes:
|
|
4821
|
-
maxSize:
|
|
4963
|
+
const V = nt(N, {
|
|
4964
|
+
acceptMimes: b == null ? void 0 : b.acceptMimes,
|
|
4965
|
+
maxSize: b == null ? void 0 : b.maxSize,
|
|
4822
4966
|
t: a,
|
|
4823
4967
|
toast: l,
|
|
4824
|
-
onError:
|
|
4968
|
+
onError: b.onError
|
|
4825
4969
|
});
|
|
4826
|
-
if (
|
|
4970
|
+
if (V.length <= 0) {
|
|
4827
4971
|
w.target.value = "";
|
|
4828
4972
|
return;
|
|
4829
4973
|
}
|
|
4830
|
-
const
|
|
4974
|
+
const j = V[0], B = await go(j);
|
|
4831
4975
|
c(!0), m({
|
|
4832
|
-
src:
|
|
4833
|
-
file:
|
|
4976
|
+
src: B.src,
|
|
4977
|
+
file: j
|
|
4834
4978
|
});
|
|
4835
|
-
},
|
|
4979
|
+
}, O = () => {
|
|
4836
4980
|
h.current && (h.current.value = "");
|
|
4837
4981
|
};
|
|
4838
|
-
return /* @__PURE__ */ y(
|
|
4982
|
+
return /* @__PURE__ */ y(q, { children: [
|
|
4839
4983
|
/* @__PURE__ */ n(
|
|
4840
|
-
|
|
4984
|
+
X,
|
|
4841
4985
|
{
|
|
4842
4986
|
className: "richtext-mt-1 richtext-w-full",
|
|
4843
4987
|
disabled: i,
|
|
4844
|
-
onClick:
|
|
4988
|
+
onClick: H,
|
|
4845
4989
|
size: "sm",
|
|
4846
4990
|
children: a("editor.image.dialog.tab.uploadCrop")
|
|
4847
4991
|
}
|
|
@@ -4851,57 +4995,57 @@ function Wt({
|
|
|
4851
4995
|
{
|
|
4852
4996
|
open: s,
|
|
4853
4997
|
onOpenChange: (w) => {
|
|
4854
|
-
c(w), w || (m({ src: "", file: null }),
|
|
4998
|
+
c(w), w || (m({ src: "", file: null }), O());
|
|
4855
4999
|
},
|
|
4856
5000
|
children: [
|
|
4857
|
-
/* @__PURE__ */ n(
|
|
4858
|
-
/* @__PURE__ */ y(
|
|
4859
|
-
/* @__PURE__ */ n(
|
|
5001
|
+
/* @__PURE__ */ n(rt, {}),
|
|
5002
|
+
/* @__PURE__ */ y(le, { children: [
|
|
5003
|
+
/* @__PURE__ */ n(ce, { children: a("editor.image.dialog.tab.uploadCrop") }),
|
|
4860
5004
|
/* @__PURE__ */ n("div", { children: x.src && /* @__PURE__ */ n(
|
|
4861
|
-
|
|
5005
|
+
Ei,
|
|
4862
5006
|
{
|
|
4863
5007
|
className: "richtext-w-full",
|
|
4864
5008
|
crop: u,
|
|
4865
|
-
onChange: (w) =>
|
|
4866
|
-
onComplete: (w) =>
|
|
4867
|
-
children: /* @__PURE__ */ n("img", { alt: "Crop me", ref:
|
|
5009
|
+
onChange: (w) => v(w),
|
|
5010
|
+
onComplete: (w) => A(w),
|
|
5011
|
+
children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: g, src: x.src })
|
|
4868
5012
|
}
|
|
4869
5013
|
) }),
|
|
4870
|
-
/* @__PURE__ */ y(
|
|
5014
|
+
/* @__PURE__ */ y(Ot, { children: [
|
|
4871
5015
|
/* @__PURE__ */ y(
|
|
4872
|
-
|
|
5016
|
+
X,
|
|
4873
5017
|
{
|
|
4874
5018
|
disabled: d,
|
|
4875
5019
|
onClick: () => {
|
|
4876
5020
|
c(!1), m({
|
|
4877
5021
|
src: "",
|
|
4878
5022
|
file: null
|
|
4879
|
-
}),
|
|
5023
|
+
}), O();
|
|
4880
5024
|
},
|
|
4881
5025
|
children: [
|
|
4882
5026
|
a("editor.imageUpload.cancel"),
|
|
4883
|
-
/* @__PURE__ */ n(
|
|
5027
|
+
/* @__PURE__ */ n(Oe, { className: "richtext-ml-1", name: "Trash2" })
|
|
4884
5028
|
]
|
|
4885
5029
|
}
|
|
4886
5030
|
),
|
|
4887
5031
|
/* @__PURE__ */ n(
|
|
4888
|
-
|
|
5032
|
+
X,
|
|
4889
5033
|
{
|
|
4890
5034
|
className: "richtext-w-fit",
|
|
4891
5035
|
disabled: d || !u,
|
|
4892
|
-
onClick:
|
|
4893
|
-
children: d ? /* @__PURE__ */ y(
|
|
5036
|
+
onClick: L,
|
|
5037
|
+
children: d ? /* @__PURE__ */ y(q, { children: [
|
|
4894
5038
|
a("editor.imageUpload.uploading"),
|
|
4895
5039
|
/* @__PURE__ */ n(
|
|
4896
|
-
|
|
5040
|
+
Oe,
|
|
4897
5041
|
{
|
|
4898
5042
|
className: "richtext-ml-1 richtext-animate-spin",
|
|
4899
5043
|
name: "Loader"
|
|
4900
5044
|
}
|
|
4901
5045
|
)
|
|
4902
|
-
] }) : /* @__PURE__ */ y(
|
|
5046
|
+
] }) : /* @__PURE__ */ y(q, { children: [
|
|
4903
5047
|
a("editor.imageUpload.crop"),
|
|
4904
|
-
/* @__PURE__ */ n(
|
|
5048
|
+
/* @__PURE__ */ n(Oe, { className: "richtext-ml-1", name: "Crop" })
|
|
4905
5049
|
] })
|
|
4906
5050
|
}
|
|
4907
5051
|
)
|
|
@@ -4913,9 +5057,9 @@ function Wt({
|
|
|
4913
5057
|
/* @__PURE__ */ n(
|
|
4914
5058
|
"input",
|
|
4915
5059
|
{
|
|
4916
|
-
accept: ((
|
|
5060
|
+
accept: ((S = b == null ? void 0 : b.acceptMimes) == null ? void 0 : S.join(",")) || "image/*",
|
|
4917
5061
|
multiple: !1,
|
|
4918
|
-
onChange:
|
|
5062
|
+
onChange: P,
|
|
4919
5063
|
ref: h,
|
|
4920
5064
|
style: { display: "none" },
|
|
4921
5065
|
type: "file"
|
|
@@ -4923,18 +5067,18 @@ function Wt({
|
|
|
4923
5067
|
)
|
|
4924
5068
|
] });
|
|
4925
5069
|
}
|
|
4926
|
-
function
|
|
4927
|
-
const { t: e } =
|
|
4928
|
-
|
|
4929
|
-
const s =
|
|
4930
|
-
function x(
|
|
4931
|
-
var
|
|
4932
|
-
const
|
|
4933
|
-
if (!r || r.isDestroyed ||
|
|
4934
|
-
|
|
5070
|
+
function wa() {
|
|
5071
|
+
const { t: e } = ne(), { toast: t } = Ke(), r = ee(), { editorDisabled: i } = xe(), [o, a] = I(!1), l = He.UPLOAD_IMAGE(r.id);
|
|
5072
|
+
tt(a, [l]);
|
|
5073
|
+
const s = de(Ve.name), [c, d] = I(""), [f, g] = I(""), u = me(null), v = (s == null ? void 0 : s.options.defaultInline) || !1, [p, k] = I(v), h = F(() => s == null ? void 0 : s.options, [s]);
|
|
5074
|
+
function x(b) {
|
|
5075
|
+
var P;
|
|
5076
|
+
const A = (P = b == null ? void 0 : b.target) == null ? void 0 : P.files;
|
|
5077
|
+
if (!r || r.isDestroyed || A.length === 0) {
|
|
5078
|
+
b.target.value = "";
|
|
4935
5079
|
return;
|
|
4936
5080
|
}
|
|
4937
|
-
const C =
|
|
5081
|
+
const C = nt(A, {
|
|
4938
5082
|
acceptMimes: h == null ? void 0 : h.acceptMimes,
|
|
4939
5083
|
maxSize: h == null ? void 0 : h.maxSize,
|
|
4940
5084
|
t: e,
|
|
@@ -4942,91 +5086,91 @@ function da() {
|
|
|
4942
5086
|
onError: h.onError
|
|
4943
5087
|
});
|
|
4944
5088
|
if (C.length <= 0) {
|
|
4945
|
-
|
|
5089
|
+
b.target.value = "";
|
|
4946
5090
|
return;
|
|
4947
5091
|
}
|
|
4948
5092
|
a(!1);
|
|
4949
|
-
const
|
|
4950
|
-
if (
|
|
4951
|
-
const
|
|
4952
|
-
for (const
|
|
5093
|
+
const L = f, H = p;
|
|
5094
|
+
if (g(""), k(v), h.upload) {
|
|
5095
|
+
const O = h != null && h.multiple ? C : [C[0]];
|
|
5096
|
+
for (const U of O)
|
|
4953
5097
|
r.chain().focus().insertImagePlaceholder({
|
|
4954
|
-
file:
|
|
4955
|
-
inline:
|
|
4956
|
-
alt:
|
|
5098
|
+
file: U,
|
|
5099
|
+
inline: H,
|
|
5100
|
+
alt: L
|
|
4957
5101
|
}).run();
|
|
4958
5102
|
} else {
|
|
4959
|
-
const
|
|
4960
|
-
for (const
|
|
4961
|
-
const
|
|
4962
|
-
r.chain().focus().setImageInline({ src:
|
|
5103
|
+
const O = h != null && h.multiple ? C : [C[0]];
|
|
5104
|
+
for (const U of O) {
|
|
5105
|
+
const S = URL.createObjectURL(U);
|
|
5106
|
+
r.chain().focus().setImageInline({ src: S, inline: H, alt: L }).run();
|
|
4963
5107
|
}
|
|
4964
5108
|
}
|
|
4965
|
-
|
|
5109
|
+
b.target.value = "";
|
|
4966
5110
|
}
|
|
4967
|
-
function m(
|
|
4968
|
-
|
|
5111
|
+
function m(b) {
|
|
5112
|
+
b.preventDefault(), b.stopPropagation(), r.chain().focus().setImageInline({ src: c, inline: p, alt: f }).run(), a(!1), k(v), d(""), g("");
|
|
4969
5113
|
}
|
|
4970
|
-
function
|
|
4971
|
-
var
|
|
4972
|
-
|
|
5114
|
+
function T(b) {
|
|
5115
|
+
var A;
|
|
5116
|
+
b.preventDefault(), (A = u.current) == null || A.click();
|
|
4973
5117
|
}
|
|
4974
|
-
return i ? /* @__PURE__ */ n(
|
|
4975
|
-
/* @__PURE__ */ n(
|
|
5118
|
+
return i ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: a, open: o, children: /* @__PURE__ */ y(le, { children: [
|
|
5119
|
+
/* @__PURE__ */ n(ce, { children: e("editor.image.dialog.title") }),
|
|
4976
5120
|
/* @__PURE__ */ y(
|
|
4977
|
-
|
|
5121
|
+
_e,
|
|
4978
5122
|
{
|
|
4979
5123
|
activationMode: "manual",
|
|
4980
5124
|
defaultValue: h.resourceImage === "both" || h.resourceImage === "upload" ? "upload" : "link",
|
|
4981
5125
|
children: [
|
|
4982
|
-
h.resourceImage === "both" && /* @__PURE__ */ y(
|
|
4983
|
-
/* @__PURE__ */ n(
|
|
4984
|
-
/* @__PURE__ */ n(
|
|
5126
|
+
h.resourceImage === "both" && /* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
5127
|
+
/* @__PURE__ */ n(K, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
|
|
5128
|
+
/* @__PURE__ */ n(K, { value: "link", children: e("editor.image.dialog.tab.url") })
|
|
4985
5129
|
] }),
|
|
4986
5130
|
/* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
|
|
4987
5131
|
/* @__PURE__ */ n(
|
|
4988
|
-
|
|
5132
|
+
Qe,
|
|
4989
5133
|
{
|
|
4990
|
-
checked:
|
|
4991
|
-
onCheckedChange: (
|
|
4992
|
-
k(
|
|
5134
|
+
checked: p,
|
|
5135
|
+
onCheckedChange: (b) => {
|
|
5136
|
+
k(b);
|
|
4993
5137
|
}
|
|
4994
5138
|
}
|
|
4995
5139
|
),
|
|
4996
|
-
/* @__PURE__ */ n(
|
|
5140
|
+
/* @__PURE__ */ n(ke, { children: e("editor.link.dialog.inline") })
|
|
4997
5141
|
] }),
|
|
4998
5142
|
h.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
|
|
4999
|
-
/* @__PURE__ */ n(
|
|
5143
|
+
/* @__PURE__ */ n(ke, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
|
|
5000
5144
|
/* @__PURE__ */ n(
|
|
5001
|
-
|
|
5145
|
+
ae,
|
|
5002
5146
|
{
|
|
5003
|
-
onChange: (
|
|
5147
|
+
onChange: (b) => g(b.target.value),
|
|
5004
5148
|
required: !0,
|
|
5005
5149
|
type: "text",
|
|
5006
5150
|
value: f
|
|
5007
5151
|
}
|
|
5008
5152
|
)
|
|
5009
5153
|
] }),
|
|
5010
|
-
/* @__PURE__ */ y(
|
|
5154
|
+
/* @__PURE__ */ y(Q, { value: "upload", children: [
|
|
5011
5155
|
/* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
5012
5156
|
/* @__PURE__ */ n(
|
|
5013
|
-
|
|
5157
|
+
X,
|
|
5014
5158
|
{
|
|
5015
5159
|
className: "richtext-mt-1 richtext-w-full",
|
|
5016
|
-
onClick:
|
|
5160
|
+
onClick: T,
|
|
5017
5161
|
size: "sm",
|
|
5018
5162
|
children: e("editor.image.dialog.tab.upload")
|
|
5019
5163
|
}
|
|
5020
5164
|
),
|
|
5021
5165
|
/* @__PURE__ */ n(
|
|
5022
|
-
|
|
5166
|
+
Jt,
|
|
5023
5167
|
{
|
|
5024
5168
|
alt: f,
|
|
5025
5169
|
disabled: !1,
|
|
5026
5170
|
editor: r,
|
|
5027
|
-
imageInline:
|
|
5171
|
+
imageInline: p,
|
|
5028
5172
|
onClose: () => {
|
|
5029
|
-
|
|
5173
|
+
g("");
|
|
5030
5174
|
}
|
|
5031
5175
|
}
|
|
5032
5176
|
)
|
|
@@ -5043,26 +5187,26 @@ function da() {
|
|
|
5043
5187
|
}
|
|
5044
5188
|
)
|
|
5045
5189
|
] }),
|
|
5046
|
-
/* @__PURE__ */ n(
|
|
5190
|
+
/* @__PURE__ */ n(Q, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
5047
5191
|
/* @__PURE__ */ n(
|
|
5048
|
-
|
|
5192
|
+
ae,
|
|
5049
5193
|
{
|
|
5050
5194
|
autoFocus: !0,
|
|
5051
|
-
onChange: (
|
|
5195
|
+
onChange: (b) => d(b.target.value),
|
|
5052
5196
|
placeholder: e("editor.image.dialog.placeholder"),
|
|
5053
5197
|
required: !0,
|
|
5054
5198
|
type: "url",
|
|
5055
5199
|
value: c
|
|
5056
5200
|
}
|
|
5057
5201
|
),
|
|
5058
|
-
/* @__PURE__ */ n(
|
|
5202
|
+
/* @__PURE__ */ n(X, { type: "submit", children: e("editor.image.dialog.button.apply") })
|
|
5059
5203
|
] }) }) })
|
|
5060
5204
|
]
|
|
5061
5205
|
}
|
|
5062
5206
|
)
|
|
5063
5207
|
] }) });
|
|
5064
5208
|
}
|
|
5065
|
-
function
|
|
5209
|
+
function Kt(e, t) {
|
|
5066
5210
|
let r;
|
|
5067
5211
|
try {
|
|
5068
5212
|
r = new URL(e);
|
|
@@ -5077,17 +5221,17 @@ function Gt(e, t) {
|
|
|
5077
5221
|
return r.hostname.includes(i);
|
|
5078
5222
|
});
|
|
5079
5223
|
}
|
|
5080
|
-
function
|
|
5081
|
-
const { t: e } =
|
|
5224
|
+
function Xa() {
|
|
5225
|
+
const { t: e } = ne(), t = ee(), r = it(Ge.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = xe(), [l, s] = I(""), c = me(null), [d, f] = I(""), [g, u] = I(!1), v = de(Ge.name), p = F(() => (v == null ? void 0 : v.options) ?? {}, [v]);
|
|
5082
5226
|
async function k(m) {
|
|
5083
5227
|
var C;
|
|
5084
|
-
const
|
|
5085
|
-
if (!t || t.isDestroyed ||
|
|
5228
|
+
const T = (C = m == null ? void 0 : m.target) == null ? void 0 : C.files;
|
|
5229
|
+
if (!t || t.isDestroyed || T.length === 0)
|
|
5086
5230
|
return;
|
|
5087
|
-
const
|
|
5088
|
-
let
|
|
5089
|
-
|
|
5090
|
-
src:
|
|
5231
|
+
const b = T[0];
|
|
5232
|
+
let A = "";
|
|
5233
|
+
p.upload ? A = await p.upload(b) : A = URL.createObjectURL(b), t.chain().focus().setVideo({
|
|
5234
|
+
src: A,
|
|
5091
5235
|
width: "100%"
|
|
5092
5236
|
}).run(), u(!1);
|
|
5093
5237
|
}
|
|
@@ -5098,12 +5242,12 @@ function _a() {
|
|
|
5098
5242
|
}).run(), u(!1), s(""));
|
|
5099
5243
|
}
|
|
5100
5244
|
function x(m) {
|
|
5101
|
-
var
|
|
5102
|
-
m.preventDefault(), (
|
|
5245
|
+
var T;
|
|
5246
|
+
m.preventDefault(), (T = c.current) == null || T.click();
|
|
5103
5247
|
}
|
|
5104
|
-
return /* @__PURE__ */ y(ge, { onOpenChange: u, open:
|
|
5105
|
-
/* @__PURE__ */ n(
|
|
5106
|
-
|
|
5248
|
+
return /* @__PURE__ */ y(ge, { onOpenChange: u, open: g, children: [
|
|
5249
|
+
/* @__PURE__ */ n(rt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
5250
|
+
fe,
|
|
5107
5251
|
{
|
|
5108
5252
|
disabled: a,
|
|
5109
5253
|
icon: i,
|
|
@@ -5113,20 +5257,20 @@ function _a() {
|
|
|
5113
5257
|
}
|
|
5114
5258
|
}
|
|
5115
5259
|
) }),
|
|
5116
|
-
/* @__PURE__ */ y(
|
|
5117
|
-
/* @__PURE__ */ n(
|
|
5260
|
+
/* @__PURE__ */ y(le, { children: [
|
|
5261
|
+
/* @__PURE__ */ n(ce, { children: e("editor.video.dialog.title") }),
|
|
5118
5262
|
/* @__PURE__ */ y(
|
|
5119
|
-
|
|
5263
|
+
_e,
|
|
5120
5264
|
{
|
|
5121
5265
|
activationMode: "manual",
|
|
5122
|
-
defaultValue: (
|
|
5266
|
+
defaultValue: (p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "upload" ? "upload" : "link",
|
|
5123
5267
|
children: [
|
|
5124
|
-
/* @__PURE__ */ y(
|
|
5125
|
-
((
|
|
5126
|
-
((
|
|
5268
|
+
/* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
5269
|
+
((p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "upload") && /* @__PURE__ */ n(K, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
|
|
5270
|
+
((p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "link") && /* @__PURE__ */ n(K, { value: "link", children: e("editor.video.dialog.link") })
|
|
5127
5271
|
] }),
|
|
5128
|
-
/* @__PURE__ */ y(
|
|
5129
|
-
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(
|
|
5272
|
+
/* @__PURE__ */ y(Q, { value: "upload", children: [
|
|
5273
|
+
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(X, { className: "richtext-mt-1 richtext-w-full", onClick: x, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
|
|
5130
5274
|
/* @__PURE__ */ n(
|
|
5131
5275
|
"input",
|
|
5132
5276
|
{
|
|
@@ -5141,10 +5285,10 @@ function _a() {
|
|
|
5141
5285
|
}
|
|
5142
5286
|
)
|
|
5143
5287
|
] }),
|
|
5144
|
-
/* @__PURE__ */ y(
|
|
5288
|
+
/* @__PURE__ */ y(Q, { value: "link", children: [
|
|
5145
5289
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
5146
5290
|
/* @__PURE__ */ n(
|
|
5147
|
-
|
|
5291
|
+
ae,
|
|
5148
5292
|
{
|
|
5149
5293
|
autoFocus: !0,
|
|
5150
5294
|
placeholder: e("editor.video.dialog.placeholder"),
|
|
@@ -5152,15 +5296,15 @@ function _a() {
|
|
|
5152
5296
|
type: "url",
|
|
5153
5297
|
value: l,
|
|
5154
5298
|
onBlur: (m) => {
|
|
5155
|
-
const
|
|
5156
|
-
|
|
5299
|
+
const T = m.target.value, b = p.videoProviders || ["."];
|
|
5300
|
+
T && !Kt(T, b) ? f("Invalid video URL") : f("");
|
|
5157
5301
|
},
|
|
5158
5302
|
onChange: (m) => {
|
|
5159
5303
|
s(m.target.value);
|
|
5160
5304
|
}
|
|
5161
5305
|
}
|
|
5162
5306
|
),
|
|
5163
|
-
/* @__PURE__ */ n(
|
|
5307
|
+
/* @__PURE__ */ n(X, { onClick: h, type: "button", children: e("editor.video.dialog.button.apply") })
|
|
5164
5308
|
] }) }),
|
|
5165
5309
|
d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
|
|
5166
5310
|
] })
|
|
@@ -5170,7 +5314,7 @@ function _a() {
|
|
|
5170
5314
|
] })
|
|
5171
5315
|
] });
|
|
5172
5316
|
}
|
|
5173
|
-
function
|
|
5317
|
+
function ya(e) {
|
|
5174
5318
|
e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/");
|
|
5175
5319
|
const t = e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);
|
|
5176
5320
|
t && (e = `https://www.youtube.com/embed/${t[1]}`);
|
|
@@ -5181,7 +5325,7 @@ function ua(e) {
|
|
|
5181
5325
|
}
|
|
5182
5326
|
return /^https?:\/\/www.bilibili.com\/video\/.*/i.test(e) && (e = e.replace(/\?.*$/, "").replace("https://www.bilibili.com/video/", "https://player.bilibili.com/player.html?bvid=")), e.includes("drive.google.com") && (e = e.replace("/view", "/preview")), e;
|
|
5183
5327
|
}
|
|
5184
|
-
const
|
|
5328
|
+
const Ge = /* @__PURE__ */ Xe.create({
|
|
5185
5329
|
name: "video",
|
|
5186
5330
|
group: "block",
|
|
5187
5331
|
atom: !0,
|
|
@@ -5195,7 +5339,7 @@ const We = /* @__PURE__ */ Ge.create({
|
|
|
5195
5339
|
upload: void 0,
|
|
5196
5340
|
frameborder: !1,
|
|
5197
5341
|
resourceVideo: "both",
|
|
5198
|
-
width:
|
|
5342
|
+
width: Vi["size-medium"],
|
|
5199
5343
|
HTMLAttributes: {
|
|
5200
5344
|
class: "iframe-wrapper"
|
|
5201
5345
|
// style: 'display: flex;justify-content: center;',
|
|
@@ -5223,13 +5367,13 @@ const We = /* @__PURE__ */ Ge.create({
|
|
|
5223
5367
|
src: {
|
|
5224
5368
|
default: null,
|
|
5225
5369
|
renderHTML: ({ src: e }) => ({
|
|
5226
|
-
src: e ?
|
|
5370
|
+
src: e ? ya(e) : null
|
|
5227
5371
|
})
|
|
5228
5372
|
},
|
|
5229
5373
|
width: {
|
|
5230
5374
|
default: this.options.width,
|
|
5231
5375
|
renderHTML: ({ width: e }) => ({
|
|
5232
|
-
width:
|
|
5376
|
+
width: Do(e)
|
|
5233
5377
|
})
|
|
5234
5378
|
},
|
|
5235
5379
|
frameborder: {
|
|
@@ -5278,23 +5422,23 @@ const We = /* @__PURE__ */ Ge.create({
|
|
|
5278
5422
|
};
|
|
5279
5423
|
}
|
|
5280
5424
|
});
|
|
5281
|
-
function
|
|
5282
|
-
const { t: e } =
|
|
5283
|
-
|
|
5284
|
-
const u =
|
|
5285
|
-
async function
|
|
5286
|
-
var
|
|
5287
|
-
const x = (
|
|
5425
|
+
function Ca() {
|
|
5426
|
+
const { t: e } = ne(), t = ee(), { editorDisabled: r } = xe(), [i, o] = I(""), a = me(null), [l, s] = I(""), [c, d] = I(!1), f = de(Ge.name), g = He.UPLOAD_VIDEO(t.id);
|
|
5427
|
+
tt(d, [g]);
|
|
5428
|
+
const u = F(() => (f == null ? void 0 : f.options) ?? {}, [f]);
|
|
5429
|
+
async function v(h) {
|
|
5430
|
+
var b;
|
|
5431
|
+
const x = (b = h == null ? void 0 : h.target) == null ? void 0 : b.files;
|
|
5288
5432
|
if (!t || t.isDestroyed || x.length === 0)
|
|
5289
5433
|
return;
|
|
5290
5434
|
const m = x[0];
|
|
5291
|
-
let
|
|
5292
|
-
u.upload ?
|
|
5293
|
-
src:
|
|
5435
|
+
let T = "";
|
|
5436
|
+
u.upload ? T = await u.upload(m) : T = URL.createObjectURL(m), t.chain().focus().setVideo({
|
|
5437
|
+
src: T,
|
|
5294
5438
|
width: "100%"
|
|
5295
5439
|
}).run(), d(!1);
|
|
5296
5440
|
}
|
|
5297
|
-
function
|
|
5441
|
+
function p(h) {
|
|
5298
5442
|
h.preventDefault(), h.stopPropagation(), i && (t.chain().focus().setVideo({
|
|
5299
5443
|
src: i,
|
|
5300
5444
|
width: "100%"
|
|
@@ -5304,26 +5448,26 @@ function ha() {
|
|
|
5304
5448
|
var x;
|
|
5305
5449
|
h.preventDefault(), (x = a.current) == null || x.click();
|
|
5306
5450
|
}
|
|
5307
|
-
return r ? /* @__PURE__ */ n(
|
|
5308
|
-
/* @__PURE__ */ n(
|
|
5451
|
+
return r ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: d, open: c, children: /* @__PURE__ */ y(le, { children: [
|
|
5452
|
+
/* @__PURE__ */ n(ce, { children: e("editor.video.dialog.title") }),
|
|
5309
5453
|
/* @__PURE__ */ y(
|
|
5310
|
-
|
|
5454
|
+
_e,
|
|
5311
5455
|
{
|
|
5312
5456
|
activationMode: "manual",
|
|
5313
5457
|
defaultValue: (u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload" ? "upload" : "link",
|
|
5314
5458
|
children: [
|
|
5315
|
-
/* @__PURE__ */ y(
|
|
5316
|
-
((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(
|
|
5317
|
-
((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(
|
|
5459
|
+
/* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
5460
|
+
((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(K, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
|
|
5461
|
+
((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(K, { value: "link", children: e("editor.video.dialog.link") })
|
|
5318
5462
|
] }),
|
|
5319
|
-
/* @__PURE__ */ y(
|
|
5320
|
-
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(
|
|
5463
|
+
/* @__PURE__ */ y(Q, { value: "upload", children: [
|
|
5464
|
+
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(X, { className: "richtext-mt-1 richtext-w-full", onClick: k, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
|
|
5321
5465
|
/* @__PURE__ */ n(
|
|
5322
5466
|
"input",
|
|
5323
5467
|
{
|
|
5324
5468
|
accept: "video/*",
|
|
5325
5469
|
multiple: !0,
|
|
5326
|
-
onChange:
|
|
5470
|
+
onChange: v,
|
|
5327
5471
|
ref: a,
|
|
5328
5472
|
type: "file",
|
|
5329
5473
|
style: {
|
|
@@ -5332,10 +5476,10 @@ function ha() {
|
|
|
5332
5476
|
}
|
|
5333
5477
|
)
|
|
5334
5478
|
] }),
|
|
5335
|
-
/* @__PURE__ */ y(
|
|
5479
|
+
/* @__PURE__ */ y(Q, { value: "link", children: [
|
|
5336
5480
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
5337
5481
|
/* @__PURE__ */ n(
|
|
5338
|
-
|
|
5482
|
+
ae,
|
|
5339
5483
|
{
|
|
5340
5484
|
autoFocus: !0,
|
|
5341
5485
|
placeholder: e("editor.video.dialog.placeholder"),
|
|
@@ -5344,14 +5488,14 @@ function ha() {
|
|
|
5344
5488
|
value: i,
|
|
5345
5489
|
onBlur: (h) => {
|
|
5346
5490
|
const x = h.target.value, m = u.videoProviders || ["."];
|
|
5347
|
-
x && !
|
|
5491
|
+
x && !Kt(x, m) ? s("Invalid video URL") : s("");
|
|
5348
5492
|
},
|
|
5349
5493
|
onChange: (h) => {
|
|
5350
5494
|
o(h.target.value);
|
|
5351
5495
|
}
|
|
5352
5496
|
}
|
|
5353
5497
|
),
|
|
5354
|
-
/* @__PURE__ */ n(
|
|
5498
|
+
/* @__PURE__ */ n(X, { onClick: p, type: "button", children: e("editor.video.dialog.button.apply") })
|
|
5355
5499
|
] }) }),
|
|
5356
5500
|
l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
|
|
5357
5501
|
] })
|
|
@@ -5360,66 +5504,73 @@ function ha() {
|
|
|
5360
5504
|
)
|
|
5361
5505
|
] }) });
|
|
5362
5506
|
}
|
|
5363
|
-
function
|
|
5364
|
-
return /* @__PURE__ */ y(
|
|
5365
|
-
/* @__PURE__ */ n(
|
|
5366
|
-
/* @__PURE__ */ n(
|
|
5367
|
-
/* @__PURE__ */ n(
|
|
5507
|
+
function ka() {
|
|
5508
|
+
return /* @__PURE__ */ y(q, { children: [
|
|
5509
|
+
/* @__PURE__ */ n(wa, {}),
|
|
5510
|
+
/* @__PURE__ */ n(Ca, {}),
|
|
5511
|
+
/* @__PURE__ */ n(jo, {})
|
|
5368
5512
|
] });
|
|
5369
5513
|
}
|
|
5370
|
-
process.env.NODE_ENV !== "production" && (
|
|
5514
|
+
process.env.NODE_ENV !== "production" && (ka.displayName = "SlashDialogTrigger");
|
|
5371
5515
|
export {
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5516
|
+
xo as $,
|
|
5517
|
+
fe as A,
|
|
5518
|
+
X as B,
|
|
5519
|
+
Qe as C,
|
|
5375
5520
|
ge as D,
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5521
|
+
He as E,
|
|
5522
|
+
no as F,
|
|
5523
|
+
Ft as G,
|
|
5524
|
+
Ua as H,
|
|
5525
|
+
Oe as I,
|
|
5526
|
+
tt as J,
|
|
5527
|
+
Pa as K,
|
|
5528
|
+
ke as L,
|
|
5529
|
+
ue as M,
|
|
5530
|
+
xt as N,
|
|
5531
|
+
bt as O,
|
|
5532
|
+
ca as P,
|
|
5533
|
+
fa as Q,
|
|
5534
|
+
Bo as R,
|
|
5535
|
+
Ha as S,
|
|
5536
|
+
Xn as T,
|
|
5537
|
+
Wn as U,
|
|
5538
|
+
Tn as V,
|
|
5539
|
+
Je as W,
|
|
5540
|
+
Oa as X,
|
|
5541
|
+
ja as Y,
|
|
5542
|
+
_a as Z,
|
|
5543
|
+
ka as _,
|
|
5544
|
+
Yn as a,
|
|
5545
|
+
co as a0,
|
|
5546
|
+
Ge as a1,
|
|
5547
|
+
Gt as a2,
|
|
5548
|
+
Wa as a3,
|
|
5549
|
+
Ga as a4,
|
|
5550
|
+
Xa as a5,
|
|
5551
|
+
_t as b,
|
|
5552
|
+
E as c,
|
|
5553
|
+
xe as d,
|
|
5554
|
+
Ba as e,
|
|
5555
|
+
Fa as f,
|
|
5556
|
+
vn as g,
|
|
5557
|
+
ee as h,
|
|
5558
|
+
Rt as i,
|
|
5559
|
+
ae as j,
|
|
5560
|
+
Vt as k,
|
|
5561
|
+
bn as l,
|
|
5562
|
+
rt as m,
|
|
5563
|
+
le as n,
|
|
5564
|
+
ce as o,
|
|
5565
|
+
Zn as p,
|
|
5566
|
+
Da as q,
|
|
5567
|
+
qn as r,
|
|
5568
|
+
Kn as s,
|
|
5569
|
+
Ot as t,
|
|
5570
|
+
it as u,
|
|
5571
|
+
de as v,
|
|
5572
|
+
Ke as w,
|
|
5573
|
+
$a as x,
|
|
5574
|
+
Ve as y,
|
|
5575
|
+
so as z
|
|
5425
5576
|
};
|