nnews-react 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +41 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +607 -545
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Bm = Object.defineProperty;
|
|
2
2
|
var Fm = (e, t, n) => t in e ? Bm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var V = (e, t, n) => Fm(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { jsx as A, jsxs as
|
|
4
|
+
import { jsx as A, jsxs as F, Fragment as Wa } from "react/jsx-runtime";
|
|
5
5
|
import * as fe from "react";
|
|
6
6
|
import Tt, { createRef as $c, useRef as qm, useMemo as Va, createContext as Um, useContext as $m, useState as ge, useEffect as Ys, forwardRef as Lf, createElement as Ya, useCallback as Be } from "react";
|
|
7
7
|
import "react-dom";
|
|
@@ -13,39 +13,47 @@ function rM({
|
|
|
13
13
|
onArticleClick: r,
|
|
14
14
|
onEditClick: i,
|
|
15
15
|
onDeleteClick: s,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
onAIClick: o,
|
|
17
|
+
showActions: a = !1,
|
|
18
|
+
emptyMessage: l = "No articles found"
|
|
18
19
|
}) {
|
|
19
|
-
return t ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: "Loading articles..." }) }) : n ? /* @__PURE__ */ A("div", { className: "rounded-md bg-red-50 p-4", children: /* @__PURE__ */
|
|
20
|
+
return t ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: "Loading articles..." }) }) : n ? /* @__PURE__ */ A("div", { className: "rounded-md bg-red-50 p-4", children: /* @__PURE__ */ F("div", { className: "text-sm text-red-800", children: [
|
|
20
21
|
"Error loading articles: ",
|
|
21
22
|
n.message
|
|
22
|
-
] }) }) : !e || e.items.length === 0 ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children:
|
|
23
|
-
/* @__PURE__ */ A("div", { className: "grid grid-cols-3 gap-6", children: e.items.map((
|
|
23
|
+
] }) }) : !e || e.items.length === 0 ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: l }) }) : /* @__PURE__ */ F("div", { className: "space-y-6", children: [
|
|
24
|
+
/* @__PURE__ */ A("div", { className: "grid grid-cols-3 gap-6", children: e.items.map((c) => /* @__PURE__ */ F(
|
|
24
25
|
"div",
|
|
25
26
|
{
|
|
26
27
|
className: "rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-sm hover:shadow-md transition-shadow overflow-hidden flex flex-col",
|
|
27
28
|
children: [
|
|
28
|
-
|
|
29
|
-
"
|
|
29
|
+
c.imageName && /* @__PURE__ */ A(
|
|
30
|
+
"div",
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
className: `w-full h-48 bg-gray-200 dark:bg-gray-700 overflow-hidden ${r ? "cursor-pointer" : ""}`,
|
|
33
|
+
onClick: () => r == null ? void 0 : r(c),
|
|
34
|
+
children: /* @__PURE__ */ A(
|
|
35
|
+
"img",
|
|
36
|
+
{
|
|
37
|
+
src: c.imageName,
|
|
38
|
+
alt: c.title,
|
|
39
|
+
className: "w-full h-[250px] object-cover hover:scale-105 transition-transform duration-300",
|
|
40
|
+
style: { height: "250px" }
|
|
41
|
+
}
|
|
42
|
+
)
|
|
35
43
|
}
|
|
36
|
-
)
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ F("div", { className: "p-6 flex-1 flex flex-col", children: [
|
|
46
|
+
/* @__PURE__ */ F("div", { className: "flex-1", children: [
|
|
39
47
|
/* @__PURE__ */ A(
|
|
40
48
|
"h3",
|
|
41
49
|
{
|
|
42
50
|
className: `text-xl font-semibold text-gray-900 dark:text-gray-100 line-clamp-2 ${r ? "cursor-pointer hover:text-blue-600 dark:hover:text-blue-400" : ""}`,
|
|
43
|
-
onClick: () => r == null ? void 0 : r(
|
|
44
|
-
children:
|
|
51
|
+
onClick: () => r == null ? void 0 : r(c),
|
|
52
|
+
children: c.title
|
|
45
53
|
}
|
|
46
54
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
55
|
+
/* @__PURE__ */ F("div", { className: "mt-4 flex flex-wrap items-center gap-2 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
56
|
+
c.dateAt && /* @__PURE__ */ F("span", { className: "flex items-center gap-1", children: [
|
|
49
57
|
/* @__PURE__ */ A(
|
|
50
58
|
"svg",
|
|
51
59
|
{
|
|
@@ -64,54 +72,80 @@ function rM({
|
|
|
64
72
|
)
|
|
65
73
|
}
|
|
66
74
|
),
|
|
67
|
-
new Date(
|
|
75
|
+
new Date(c.dateAt).toLocaleDateString()
|
|
68
76
|
] }),
|
|
69
|
-
|
|
77
|
+
c.category && /* @__PURE__ */ A("span", { className: "rounded-full bg-blue-100 dark:bg-blue-900 px-3 py-1 text-xs font-medium text-blue-800 dark:text-blue-200", children: c.category.title })
|
|
70
78
|
] }),
|
|
71
79
|
/* @__PURE__ */ A("div", { className: "mt-3", children: /* @__PURE__ */ A(
|
|
72
80
|
"span",
|
|
73
81
|
{
|
|
74
|
-
className: `inline-block rounded-full px-3 py-1 text-xs font-medium ${
|
|
75
|
-
children: He[
|
|
82
|
+
className: `inline-block rounded-full px-3 py-1 text-xs font-medium ${c.status === He.Published ? "bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200" : c.status === He.Draft ? "bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200" : c.status === He.Review ? "bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200" : c.status === He.Scheduled ? "bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200" : "bg-orange-100 dark:bg-orange-900 text-orange-800 dark:text-orange-200"}`,
|
|
83
|
+
children: He[c.status]
|
|
76
84
|
}
|
|
77
85
|
) }),
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
c.tags && c.tags.length > 0 && /* @__PURE__ */ F("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
87
|
+
c.tags.slice(0, 3).map((u) => /* @__PURE__ */ F(
|
|
80
88
|
"span",
|
|
81
89
|
{
|
|
82
90
|
className: "rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300",
|
|
83
91
|
children: [
|
|
84
92
|
"#",
|
|
85
|
-
|
|
93
|
+
u.title
|
|
86
94
|
]
|
|
87
95
|
},
|
|
88
|
-
|
|
96
|
+
u.tagId
|
|
89
97
|
)),
|
|
90
|
-
|
|
98
|
+
c.tags.length > 3 && /* @__PURE__ */ F("span", { className: "rounded-md bg-gray-100 dark:bg-gray-700 px-2 py-1 text-xs text-gray-700 dark:text-gray-300", children: [
|
|
91
99
|
"+",
|
|
92
|
-
|
|
100
|
+
c.tags.length - 3
|
|
93
101
|
] })
|
|
94
102
|
] }),
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
c.roles && c.roles.length > 0 && /* @__PURE__ */ F("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
104
|
+
c.roles.slice(0, 2).map((u) => /* @__PURE__ */ A(
|
|
97
105
|
"span",
|
|
98
106
|
{
|
|
99
107
|
className: "rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200",
|
|
100
|
-
children:
|
|
108
|
+
children: u.name
|
|
101
109
|
},
|
|
102
|
-
|
|
110
|
+
u.slug
|
|
103
111
|
)),
|
|
104
|
-
|
|
112
|
+
c.roles.length > 2 && /* @__PURE__ */ F("span", { className: "rounded-md bg-purple-100 dark:bg-purple-900 px-2 py-1 text-xs text-purple-700 dark:text-purple-200", children: [
|
|
105
113
|
"+",
|
|
106
|
-
|
|
114
|
+
c.roles.length - 2
|
|
107
115
|
] })
|
|
108
116
|
] })
|
|
109
117
|
] }),
|
|
110
|
-
|
|
118
|
+
a && (i || s || o) && /* @__PURE__ */ F("div", { className: "mt-4 pt-4 border-t border-gray-200 dark:border-gray-700 flex gap-2 justify-end", children: [
|
|
119
|
+
o && /* @__PURE__ */ A(
|
|
120
|
+
"button",
|
|
121
|
+
{
|
|
122
|
+
onClick: () => o(c),
|
|
123
|
+
className: "rounded p-2 text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20",
|
|
124
|
+
title: "AI Edit",
|
|
125
|
+
children: /* @__PURE__ */ A(
|
|
126
|
+
"svg",
|
|
127
|
+
{
|
|
128
|
+
className: "h-5 w-5",
|
|
129
|
+
fill: "none",
|
|
130
|
+
stroke: "currentColor",
|
|
131
|
+
viewBox: "0 0 24 24",
|
|
132
|
+
children: /* @__PURE__ */ A(
|
|
133
|
+
"path",
|
|
134
|
+
{
|
|
135
|
+
strokeLinecap: "round",
|
|
136
|
+
strokeLinejoin: "round",
|
|
137
|
+
strokeWidth: 2,
|
|
138
|
+
d: "M13 10V3L4 14h7v7l9-11h-7z"
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
),
|
|
111
145
|
i && /* @__PURE__ */ A(
|
|
112
146
|
"button",
|
|
113
147
|
{
|
|
114
|
-
onClick: () => i(
|
|
148
|
+
onClick: () => i(c),
|
|
115
149
|
className: "rounded p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20",
|
|
116
150
|
title: "Edit",
|
|
117
151
|
children: /* @__PURE__ */ A(
|
|
@@ -137,7 +171,7 @@ function rM({
|
|
|
137
171
|
s && /* @__PURE__ */ A(
|
|
138
172
|
"button",
|
|
139
173
|
{
|
|
140
|
-
onClick: () => s(
|
|
174
|
+
onClick: () => s(c),
|
|
141
175
|
className: "rounded p-2 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20",
|
|
142
176
|
title: "Delete",
|
|
143
177
|
children: /* @__PURE__ */ A(
|
|
@@ -164,9 +198,9 @@ function rM({
|
|
|
164
198
|
] })
|
|
165
199
|
]
|
|
166
200
|
},
|
|
167
|
-
|
|
201
|
+
c.articleId
|
|
168
202
|
)) }),
|
|
169
|
-
e.totalPages > 1 && /* @__PURE__ */ A("div", { className: "mt-6 flex items-center justify-between border-t border-gray-200 dark:border-gray-700 pt-4", children: /* @__PURE__ */
|
|
203
|
+
e.totalPages > 1 && /* @__PURE__ */ A("div", { className: "mt-6 flex items-center justify-between border-t border-gray-200 dark:border-gray-700 pt-4", children: /* @__PURE__ */ F("div", { className: "text-sm text-gray-700 dark:text-gray-300", children: [
|
|
170
204
|
"Showing ",
|
|
171
205
|
e.items.length,
|
|
172
206
|
" of ",
|
|
@@ -3225,7 +3259,7 @@ function Jy(e, t, n) {
|
|
|
3225
3259
|
return v === null || oe(v) ? B(v) : me(v) ? (e.consume(v), j) : n(v);
|
|
3226
3260
|
}
|
|
3227
3261
|
function B(v) {
|
|
3228
|
-
return v === 45 && i === 2 ? (e.consume(v), I) : v === 60 && i === 1 ? (e.consume(v),
|
|
3262
|
+
return v === 45 && i === 2 ? (e.consume(v), I) : v === 60 && i === 1 ? (e.consume(v), U) : v === 62 && i === 4 ? (e.consume(v), Q) : v === 63 && i === 3 ? (e.consume(v), w) : v === 93 && i === 5 ? (e.consume(v), K) : oe(v) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(Zy, ae, re)(v)) : v === null || oe(v) ? (e.exit("htmlFlowData"), re(v)) : (e.consume(v), B);
|
|
3229
3263
|
}
|
|
3230
3264
|
function re(v) {
|
|
3231
3265
|
return e.check(Xy, X, ae)(v);
|
|
@@ -3239,15 +3273,15 @@ function Jy(e, t, n) {
|
|
|
3239
3273
|
function I(v) {
|
|
3240
3274
|
return v === 45 ? (e.consume(v), w) : B(v);
|
|
3241
3275
|
}
|
|
3242
|
-
function
|
|
3243
|
-
return v === 47 ? (e.consume(v), o = "",
|
|
3276
|
+
function U(v) {
|
|
3277
|
+
return v === 47 ? (e.consume(v), o = "", q) : B(v);
|
|
3244
3278
|
}
|
|
3245
|
-
function
|
|
3279
|
+
function q(v) {
|
|
3246
3280
|
if (v === 62) {
|
|
3247
3281
|
const he = o.toLowerCase();
|
|
3248
3282
|
return ou.includes(he) ? (e.consume(v), Q) : B(v);
|
|
3249
3283
|
}
|
|
3250
|
-
return at(v) && o.length < 8 ? (e.consume(v), o += String.fromCharCode(v),
|
|
3284
|
+
return at(v) && o.length < 8 ? (e.consume(v), o += String.fromCharCode(v), q) : B(v);
|
|
3251
3285
|
}
|
|
3252
3286
|
function K(v) {
|
|
3253
3287
|
return v === 93 ? (e.consume(v), w) : B(v);
|
|
@@ -3299,7 +3333,7 @@ function r0(e, t, n) {
|
|
|
3299
3333
|
return w === 45 ? (e.consume(w), f) : n(w);
|
|
3300
3334
|
}
|
|
3301
3335
|
function d(w) {
|
|
3302
|
-
return w === null ? n(w) : w === 45 ? (e.consume(w), h) : oe(w) ? (o = d,
|
|
3336
|
+
return w === null ? n(w) : w === 45 ? (e.consume(w), h) : oe(w) ? (o = d, U(w)) : (e.consume(w), d);
|
|
3303
3337
|
}
|
|
3304
3338
|
function h(w) {
|
|
3305
3339
|
return w === 45 ? (e.consume(w), f) : d(w);
|
|
@@ -3312,7 +3346,7 @@ function r0(e, t, n) {
|
|
|
3312
3346
|
return w === Q.charCodeAt(s++) ? (e.consume(w), s === Q.length ? m : p) : n(w);
|
|
3313
3347
|
}
|
|
3314
3348
|
function m(w) {
|
|
3315
|
-
return w === null ? n(w) : w === 93 ? (e.consume(w), b) : oe(w) ? (o = m,
|
|
3349
|
+
return w === null ? n(w) : w === 93 ? (e.consume(w), b) : oe(w) ? (o = m, U(w)) : (e.consume(w), m);
|
|
3316
3350
|
}
|
|
3317
3351
|
function b(w) {
|
|
3318
3352
|
return w === 93 ? (e.consume(w), y) : m(w);
|
|
@@ -3321,10 +3355,10 @@ function r0(e, t, n) {
|
|
|
3321
3355
|
return w === 62 ? I(w) : w === 93 ? (e.consume(w), y) : m(w);
|
|
3322
3356
|
}
|
|
3323
3357
|
function x(w) {
|
|
3324
|
-
return w === null || w === 62 ? I(w) : oe(w) ? (o = x,
|
|
3358
|
+
return w === null || w === 62 ? I(w) : oe(w) ? (o = x, U(w)) : (e.consume(w), x);
|
|
3325
3359
|
}
|
|
3326
3360
|
function _(w) {
|
|
3327
|
-
return w === null ? n(w) : w === 63 ? (e.consume(w), T) : oe(w) ? (o = _,
|
|
3361
|
+
return w === null ? n(w) : w === 63 ? (e.consume(w), T) : oe(w) ? (o = _, U(w)) : (e.consume(w), _);
|
|
3328
3362
|
}
|
|
3329
3363
|
function T(w) {
|
|
3330
3364
|
return w === 62 ? I(w) : _(w);
|
|
@@ -3336,25 +3370,25 @@ function r0(e, t, n) {
|
|
|
3336
3370
|
return w === 45 || Qe(w) ? (e.consume(w), k) : P(w);
|
|
3337
3371
|
}
|
|
3338
3372
|
function P(w) {
|
|
3339
|
-
return oe(w) ? (o = P,
|
|
3373
|
+
return oe(w) ? (o = P, U(w)) : me(w) ? (e.consume(w), P) : I(w);
|
|
3340
3374
|
}
|
|
3341
3375
|
function $(w) {
|
|
3342
3376
|
return w === 45 || Qe(w) ? (e.consume(w), $) : w === 47 || w === 62 || Ne(w) ? G(w) : n(w);
|
|
3343
3377
|
}
|
|
3344
3378
|
function G(w) {
|
|
3345
|
-
return w === 47 ? (e.consume(w), I) : w === 58 || w === 95 || at(w) ? (e.consume(w), O) : oe(w) ? (o = G,
|
|
3379
|
+
return w === 47 ? (e.consume(w), I) : w === 58 || w === 95 || at(w) ? (e.consume(w), O) : oe(w) ? (o = G, U(w)) : me(w) ? (e.consume(w), G) : I(w);
|
|
3346
3380
|
}
|
|
3347
3381
|
function O(w) {
|
|
3348
3382
|
return w === 45 || w === 46 || w === 58 || w === 95 || Qe(w) ? (e.consume(w), O) : j(w);
|
|
3349
3383
|
}
|
|
3350
3384
|
function j(w) {
|
|
3351
|
-
return w === 61 ? (e.consume(w), B) : oe(w) ? (o = j,
|
|
3385
|
+
return w === 61 ? (e.consume(w), B) : oe(w) ? (o = j, U(w)) : me(w) ? (e.consume(w), j) : G(w);
|
|
3352
3386
|
}
|
|
3353
3387
|
function B(w) {
|
|
3354
|
-
return w === null || w === 60 || w === 61 || w === 62 || w === 96 ? n(w) : w === 34 || w === 39 ? (e.consume(w), i = w, re) : oe(w) ? (o = B,
|
|
3388
|
+
return w === null || w === 60 || w === 61 || w === 62 || w === 96 ? n(w) : w === 34 || w === 39 ? (e.consume(w), i = w, re) : oe(w) ? (o = B, U(w)) : me(w) ? (e.consume(w), B) : (e.consume(w), X);
|
|
3355
3389
|
}
|
|
3356
3390
|
function re(w) {
|
|
3357
|
-
return w === i ? (e.consume(w), i = void 0, Y) : w === null ? n(w) : oe(w) ? (o = re,
|
|
3391
|
+
return w === i ? (e.consume(w), i = void 0, Y) : w === null ? n(w) : oe(w) ? (o = re, U(w)) : (e.consume(w), re);
|
|
3358
3392
|
}
|
|
3359
3393
|
function X(w) {
|
|
3360
3394
|
return w === null || w === 34 || w === 39 || w === 60 || w === 61 || w === 96 ? n(w) : w === 47 || w === 62 || Ne(w) ? G(w) : (e.consume(w), X);
|
|
@@ -3365,10 +3399,10 @@ function r0(e, t, n) {
|
|
|
3365
3399
|
function I(w) {
|
|
3366
3400
|
return w === 62 ? (e.consume(w), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(w);
|
|
3367
3401
|
}
|
|
3368
|
-
function
|
|
3369
|
-
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"),
|
|
3402
|
+
function U(w) {
|
|
3403
|
+
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), q;
|
|
3370
3404
|
}
|
|
3371
|
-
function
|
|
3405
|
+
function q(w) {
|
|
3372
3406
|
return me(w) ? ye(e, K, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(w) : K(w);
|
|
3373
3407
|
}
|
|
3374
3408
|
function K(w) {
|
|
@@ -3993,7 +4027,7 @@ function j0(e, t, n) {
|
|
|
3993
4027
|
function P(j, B) {
|
|
3994
4028
|
return re;
|
|
3995
4029
|
function re(X, Y, I) {
|
|
3996
|
-
let
|
|
4030
|
+
let U, q, K, w;
|
|
3997
4031
|
return Array.isArray(X) ? (
|
|
3998
4032
|
/* c8 ignore next 1 */
|
|
3999
4033
|
ae(X)
|
|
@@ -4017,7 +4051,7 @@ function j0(e, t, n) {
|
|
|
4017
4051
|
}
|
|
4018
4052
|
}
|
|
4019
4053
|
function ae(_e) {
|
|
4020
|
-
return
|
|
4054
|
+
return U = _e, q = 0, _e.length === 0 ? I : v(_e[q]);
|
|
4021
4055
|
}
|
|
4022
4056
|
function v(_e) {
|
|
4023
4057
|
return ct;
|
|
@@ -4037,7 +4071,7 @@ function j0(e, t, n) {
|
|
|
4037
4071
|
return j(K, w), Y;
|
|
4038
4072
|
}
|
|
4039
4073
|
function se(_e) {
|
|
4040
|
-
return w.restore(), ++
|
|
4074
|
+
return w.restore(), ++q < U.length ? v(U[q]) : I;
|
|
4041
4075
|
}
|
|
4042
4076
|
}
|
|
4043
4077
|
}
|
|
@@ -4190,9 +4224,9 @@ function Q0(e, t, n) {
|
|
|
4190
4224
|
}
|
|
4191
4225
|
const sh = {}.hasOwnProperty;
|
|
4192
4226
|
function J0(e, t, n) {
|
|
4193
|
-
return typeof t != "string" && (n = t, t = void 0),
|
|
4227
|
+
return typeof t != "string" && (n = t, t = void 0), e1(n)(V0(W0(n).document().write(Y0()(e, t, !0))));
|
|
4194
4228
|
}
|
|
4195
|
-
function
|
|
4229
|
+
function e1(e) {
|
|
4196
4230
|
const t = {
|
|
4197
4231
|
transforms: [],
|
|
4198
4232
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
@@ -4271,9 +4305,9 @@ function eE(e) {
|
|
|
4271
4305
|
htmlFlowData: O,
|
|
4272
4306
|
htmlText: l(X),
|
|
4273
4307
|
htmlTextData: O,
|
|
4274
|
-
image: l(
|
|
4308
|
+
image: l(U),
|
|
4275
4309
|
label: K,
|
|
4276
|
-
labelText:
|
|
4310
|
+
labelText: q,
|
|
4277
4311
|
lineEnding: j,
|
|
4278
4312
|
link: l(I),
|
|
4279
4313
|
listItem: l(),
|
|
@@ -4534,7 +4568,7 @@ function eE(e) {
|
|
|
4534
4568
|
delete S.identifier, delete S.label;
|
|
4535
4569
|
this.data.referenceType = void 0;
|
|
4536
4570
|
}
|
|
4537
|
-
function
|
|
4571
|
+
function U() {
|
|
4538
4572
|
const S = this.stack[this.stack.length - 1];
|
|
4539
4573
|
if (this.data.inReference) {
|
|
4540
4574
|
const R = this.data.referenceType || "shortcut";
|
|
@@ -4543,7 +4577,7 @@ function eE(e) {
|
|
|
4543
4577
|
delete S.identifier, delete S.label;
|
|
4544
4578
|
this.data.referenceType = void 0;
|
|
4545
4579
|
}
|
|
4546
|
-
function
|
|
4580
|
+
function q(S) {
|
|
4547
4581
|
const R = this.sliceSerialize(S), H = this.stack[this.stack.length - 2];
|
|
4548
4582
|
H.label = X0(R), H.identifier = Wt(R).toLowerCase();
|
|
4549
4583
|
}
|
|
@@ -4719,10 +4753,10 @@ function oh(e, t) {
|
|
|
4719
4753
|
let n = -1;
|
|
4720
4754
|
for (; ++n < t.length; ) {
|
|
4721
4755
|
const r = t[n];
|
|
4722
|
-
Array.isArray(r) ? oh(e, r) :
|
|
4756
|
+
Array.isArray(r) ? oh(e, r) : t1(e, r);
|
|
4723
4757
|
}
|
|
4724
4758
|
}
|
|
4725
|
-
function
|
|
4759
|
+
function t1(e, t) {
|
|
4726
4760
|
let n;
|
|
4727
4761
|
for (n in t)
|
|
4728
4762
|
if (sh.call(t, n))
|
|
@@ -4757,7 +4791,7 @@ function cu(e, t) {
|
|
|
4757
4791
|
end: t.end
|
|
4758
4792
|
}) + ") is still open");
|
|
4759
4793
|
}
|
|
4760
|
-
function
|
|
4794
|
+
function n1(e) {
|
|
4761
4795
|
const t = this;
|
|
4762
4796
|
t.parser = n;
|
|
4763
4797
|
function n(r) {
|
|
@@ -4772,7 +4806,7 @@ function nE(e) {
|
|
|
4772
4806
|
});
|
|
4773
4807
|
}
|
|
4774
4808
|
}
|
|
4775
|
-
function
|
|
4809
|
+
function r1(e, t) {
|
|
4776
4810
|
const n = {
|
|
4777
4811
|
type: "element",
|
|
4778
4812
|
tagName: "blockquote",
|
|
@@ -4781,12 +4815,12 @@ function rE(e, t) {
|
|
|
4781
4815
|
};
|
|
4782
4816
|
return e.patch(t, n), e.applyData(t, n);
|
|
4783
4817
|
}
|
|
4784
|
-
function
|
|
4818
|
+
function i1(e, t) {
|
|
4785
4819
|
const n = { type: "element", tagName: "br", properties: {}, children: [] };
|
|
4786
4820
|
return e.patch(t, n), [e.applyData(t, n), { type: "text", value: `
|
|
4787
4821
|
` }];
|
|
4788
4822
|
}
|
|
4789
|
-
function
|
|
4823
|
+
function s1(e, t) {
|
|
4790
4824
|
const n = t.value ? t.value + `
|
|
4791
4825
|
` : "", r = {}, i = t.lang ? t.lang.split(/\s+/) : [];
|
|
4792
4826
|
i.length > 0 && (r.className = ["language-" + i[0]]);
|
|
@@ -4798,7 +4832,7 @@ function sE(e, t) {
|
|
|
4798
4832
|
};
|
|
4799
4833
|
return t.meta && (s.data = { meta: t.meta }), e.patch(t, s), s = e.applyData(t, s), s = { type: "element", tagName: "pre", properties: {}, children: [s] }, e.patch(t, s), s;
|
|
4800
4834
|
}
|
|
4801
|
-
function
|
|
4835
|
+
function o1(e, t) {
|
|
4802
4836
|
const n = {
|
|
4803
4837
|
type: "element",
|
|
4804
4838
|
tagName: "del",
|
|
@@ -4807,7 +4841,7 @@ function oE(e, t) {
|
|
|
4807
4841
|
};
|
|
4808
4842
|
return e.patch(t, n), e.applyData(t, n);
|
|
4809
4843
|
}
|
|
4810
|
-
function
|
|
4844
|
+
function a1(e, t) {
|
|
4811
4845
|
const n = {
|
|
4812
4846
|
type: "element",
|
|
4813
4847
|
tagName: "em",
|
|
@@ -4816,7 +4850,7 @@ function aE(e, t) {
|
|
|
4816
4850
|
};
|
|
4817
4851
|
return e.patch(t, n), e.applyData(t, n);
|
|
4818
4852
|
}
|
|
4819
|
-
function
|
|
4853
|
+
function l1(e, t) {
|
|
4820
4854
|
const n = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", r = String(t.identifier).toUpperCase(), i = Hr(r.toLowerCase()), s = e.footnoteOrder.indexOf(r);
|
|
4821
4855
|
let o, a = e.footnoteCounts.get(r);
|
|
4822
4856
|
a === void 0 ? (a = 0, e.footnoteOrder.push(r), o = e.footnoteOrder.length) : o = s + 1, a += 1, e.footnoteCounts.set(r, a);
|
|
@@ -4840,7 +4874,7 @@ function lE(e, t) {
|
|
|
4840
4874
|
};
|
|
4841
4875
|
return e.patch(t, c), e.applyData(t, c);
|
|
4842
4876
|
}
|
|
4843
|
-
function
|
|
4877
|
+
function c1(e, t) {
|
|
4844
4878
|
const n = {
|
|
4845
4879
|
type: "element",
|
|
4846
4880
|
tagName: "h" + t.depth,
|
|
@@ -4849,7 +4883,7 @@ function cE(e, t) {
|
|
|
4849
4883
|
};
|
|
4850
4884
|
return e.patch(t, n), e.applyData(t, n);
|
|
4851
4885
|
}
|
|
4852
|
-
function
|
|
4886
|
+
function u1(e, t) {
|
|
4853
4887
|
if (e.options.allowDangerousHtml) {
|
|
4854
4888
|
const n = { type: "raw", value: t.value };
|
|
4855
4889
|
return e.patch(t, n), e.applyData(t, n);
|
|
@@ -4865,7 +4899,7 @@ function ah(e, t) {
|
|
|
4865
4899
|
const o = i[i.length - 1];
|
|
4866
4900
|
return o && o.type === "text" ? o.value += r : i.push({ type: "text", value: r }), i;
|
|
4867
4901
|
}
|
|
4868
|
-
function
|
|
4902
|
+
function d1(e, t) {
|
|
4869
4903
|
const n = String(t.identifier).toUpperCase(), r = e.definitionById.get(n);
|
|
4870
4904
|
if (!r)
|
|
4871
4905
|
return ah(e, t);
|
|
@@ -4874,13 +4908,13 @@ function dE(e, t) {
|
|
|
4874
4908
|
const s = { type: "element", tagName: "img", properties: i, children: [] };
|
|
4875
4909
|
return e.patch(t, s), e.applyData(t, s);
|
|
4876
4910
|
}
|
|
4877
|
-
function
|
|
4911
|
+
function f1(e, t) {
|
|
4878
4912
|
const n = { src: Hr(t.url) };
|
|
4879
4913
|
t.alt !== null && t.alt !== void 0 && (n.alt = t.alt), t.title !== null && t.title !== void 0 && (n.title = t.title);
|
|
4880
4914
|
const r = { type: "element", tagName: "img", properties: n, children: [] };
|
|
4881
4915
|
return e.patch(t, r), e.applyData(t, r);
|
|
4882
4916
|
}
|
|
4883
|
-
function
|
|
4917
|
+
function h1(e, t) {
|
|
4884
4918
|
const n = { type: "text", value: t.value.replace(/\r?\n|\r/g, " ") };
|
|
4885
4919
|
e.patch(t, n);
|
|
4886
4920
|
const r = {
|
|
@@ -4891,7 +4925,7 @@ function hE(e, t) {
|
|
|
4891
4925
|
};
|
|
4892
4926
|
return e.patch(t, r), e.applyData(t, r);
|
|
4893
4927
|
}
|
|
4894
|
-
function
|
|
4928
|
+
function p1(e, t) {
|
|
4895
4929
|
const n = String(t.identifier).toUpperCase(), r = e.definitionById.get(n);
|
|
4896
4930
|
if (!r)
|
|
4897
4931
|
return ah(e, t);
|
|
@@ -4905,7 +4939,7 @@ function pE(e, t) {
|
|
|
4905
4939
|
};
|
|
4906
4940
|
return e.patch(t, s), e.applyData(t, s);
|
|
4907
4941
|
}
|
|
4908
|
-
function
|
|
4942
|
+
function g1(e, t) {
|
|
4909
4943
|
const n = { href: Hr(t.url) };
|
|
4910
4944
|
t.title !== null && t.title !== void 0 && (n.title = t.title);
|
|
4911
4945
|
const r = {
|
|
@@ -4916,8 +4950,8 @@ function gE(e, t) {
|
|
|
4916
4950
|
};
|
|
4917
4951
|
return e.patch(t, r), e.applyData(t, r);
|
|
4918
4952
|
}
|
|
4919
|
-
function
|
|
4920
|
-
const r = e.all(t), i = n ?
|
|
4953
|
+
function m1(e, t, n) {
|
|
4954
|
+
const r = e.all(t), i = n ? b1(n) : lh(t), s = {}, o = [];
|
|
4921
4955
|
if (typeof t.checked == "boolean") {
|
|
4922
4956
|
const u = r[0];
|
|
4923
4957
|
let d;
|
|
@@ -4940,7 +4974,7 @@ function mE(e, t, n) {
|
|
|
4940
4974
|
const c = { type: "element", tagName: "li", properties: s, children: o };
|
|
4941
4975
|
return e.patch(t, c), e.applyData(t, c);
|
|
4942
4976
|
}
|
|
4943
|
-
function
|
|
4977
|
+
function b1(e) {
|
|
4944
4978
|
let t = !1;
|
|
4945
4979
|
if (e.type === "list") {
|
|
4946
4980
|
t = e.spread || !1;
|
|
@@ -4955,7 +4989,7 @@ function lh(e) {
|
|
|
4955
4989
|
const t = e.spread;
|
|
4956
4990
|
return t ?? e.children.length > 1;
|
|
4957
4991
|
}
|
|
4958
|
-
function
|
|
4992
|
+
function y1(e, t) {
|
|
4959
4993
|
const n = {}, r = e.all(t);
|
|
4960
4994
|
let i = -1;
|
|
4961
4995
|
for (typeof t.start == "number" && t.start !== 1 && (n.start = t.start); ++i < r.length; ) {
|
|
@@ -4973,7 +5007,7 @@ function yE(e, t) {
|
|
|
4973
5007
|
};
|
|
4974
5008
|
return e.patch(t, s), e.applyData(t, s);
|
|
4975
5009
|
}
|
|
4976
|
-
function
|
|
5010
|
+
function E1(e, t) {
|
|
4977
5011
|
const n = {
|
|
4978
5012
|
type: "element",
|
|
4979
5013
|
tagName: "p",
|
|
@@ -4982,11 +5016,11 @@ function EE(e, t) {
|
|
|
4982
5016
|
};
|
|
4983
5017
|
return e.patch(t, n), e.applyData(t, n);
|
|
4984
5018
|
}
|
|
4985
|
-
function
|
|
5019
|
+
function w1(e, t) {
|
|
4986
5020
|
const n = { type: "root", children: e.wrap(e.all(t)) };
|
|
4987
5021
|
return e.patch(t, n), e.applyData(t, n);
|
|
4988
5022
|
}
|
|
4989
|
-
function
|
|
5023
|
+
function x1(e, t) {
|
|
4990
5024
|
const n = {
|
|
4991
5025
|
type: "element",
|
|
4992
5026
|
tagName: "strong",
|
|
@@ -4995,7 +5029,7 @@ function xE(e, t) {
|
|
|
4995
5029
|
};
|
|
4996
5030
|
return e.patch(t, n), e.applyData(t, n);
|
|
4997
5031
|
}
|
|
4998
|
-
function
|
|
5032
|
+
function _1(e, t) {
|
|
4999
5033
|
const n = e.all(t), r = n.shift(), i = [];
|
|
5000
5034
|
if (r) {
|
|
5001
5035
|
const o = {
|
|
@@ -5023,7 +5057,7 @@ function _E(e, t) {
|
|
|
5023
5057
|
};
|
|
5024
5058
|
return e.patch(t, s), e.applyData(t, s);
|
|
5025
5059
|
}
|
|
5026
|
-
function
|
|
5060
|
+
function v1(e, t, n) {
|
|
5027
5061
|
const r = n ? n.children : void 0, s = (r ? r.indexOf(t) : 1) === 0 ? "th" : "td", o = n && n.type === "table" ? n.align : void 0, a = o ? o.length : t.children.length;
|
|
5028
5062
|
let l = -1;
|
|
5029
5063
|
const c = [];
|
|
@@ -5041,7 +5075,7 @@ function vE(e, t, n) {
|
|
|
5041
5075
|
};
|
|
5042
5076
|
return e.patch(t, u), e.applyData(t, u);
|
|
5043
5077
|
}
|
|
5044
|
-
function
|
|
5078
|
+
function k1(e, t) {
|
|
5045
5079
|
const n = {
|
|
5046
5080
|
type: "element",
|
|
5047
5081
|
tagName: "td",
|
|
@@ -5052,7 +5086,7 @@ function kE(e, t) {
|
|
|
5052
5086
|
return e.patch(t, n), e.applyData(t, n);
|
|
5053
5087
|
}
|
|
5054
5088
|
const uu = 9, du = 32;
|
|
5055
|
-
function
|
|
5089
|
+
function N1(e) {
|
|
5056
5090
|
const t = String(e), n = /\r?\n|\r/g;
|
|
5057
5091
|
let r = n.exec(t), i = 0;
|
|
5058
5092
|
const s = [];
|
|
@@ -5077,11 +5111,11 @@ function fu(e, t, n) {
|
|
|
5077
5111
|
}
|
|
5078
5112
|
return i > r ? e.slice(r, i) : "";
|
|
5079
5113
|
}
|
|
5080
|
-
function
|
|
5081
|
-
const n = { type: "text", value:
|
|
5114
|
+
function A1(e, t) {
|
|
5115
|
+
const n = { type: "text", value: N1(String(t.value)) };
|
|
5082
5116
|
return e.patch(t, n), e.applyData(t, n);
|
|
5083
5117
|
}
|
|
5084
|
-
function
|
|
5118
|
+
function S1(e, t) {
|
|
5085
5119
|
const n = {
|
|
5086
5120
|
type: "element",
|
|
5087
5121
|
tagName: "hr",
|
|
@@ -5090,31 +5124,31 @@ function SE(e, t) {
|
|
|
5090
5124
|
};
|
|
5091
5125
|
return e.patch(t, n), e.applyData(t, n);
|
|
5092
5126
|
}
|
|
5093
|
-
const
|
|
5094
|
-
blockquote:
|
|
5095
|
-
break:
|
|
5096
|
-
code:
|
|
5097
|
-
delete:
|
|
5098
|
-
emphasis:
|
|
5099
|
-
footnoteReference:
|
|
5100
|
-
heading:
|
|
5101
|
-
html:
|
|
5102
|
-
imageReference:
|
|
5103
|
-
image:
|
|
5104
|
-
inlineCode:
|
|
5105
|
-
linkReference:
|
|
5106
|
-
link:
|
|
5107
|
-
listItem:
|
|
5108
|
-
list:
|
|
5109
|
-
paragraph:
|
|
5127
|
+
const T1 = {
|
|
5128
|
+
blockquote: r1,
|
|
5129
|
+
break: i1,
|
|
5130
|
+
code: s1,
|
|
5131
|
+
delete: o1,
|
|
5132
|
+
emphasis: a1,
|
|
5133
|
+
footnoteReference: l1,
|
|
5134
|
+
heading: c1,
|
|
5135
|
+
html: u1,
|
|
5136
|
+
imageReference: d1,
|
|
5137
|
+
image: f1,
|
|
5138
|
+
inlineCode: h1,
|
|
5139
|
+
linkReference: p1,
|
|
5140
|
+
link: g1,
|
|
5141
|
+
listItem: m1,
|
|
5142
|
+
list: y1,
|
|
5143
|
+
paragraph: E1,
|
|
5110
5144
|
// @ts-expect-error: root is different, but hard to type.
|
|
5111
|
-
root:
|
|
5112
|
-
strong:
|
|
5113
|
-
table:
|
|
5114
|
-
tableCell:
|
|
5115
|
-
tableRow:
|
|
5116
|
-
text:
|
|
5117
|
-
thematicBreak:
|
|
5145
|
+
root: w1,
|
|
5146
|
+
strong: x1,
|
|
5147
|
+
table: _1,
|
|
5148
|
+
tableCell: k1,
|
|
5149
|
+
tableRow: v1,
|
|
5150
|
+
text: A1,
|
|
5151
|
+
thematicBreak: S1,
|
|
5118
5152
|
toml: ls,
|
|
5119
5153
|
yaml: ls,
|
|
5120
5154
|
definition: ls,
|
|
@@ -5122,7 +5156,7 @@ const TE = {
|
|
|
5122
5156
|
};
|
|
5123
5157
|
function ls() {
|
|
5124
5158
|
}
|
|
5125
|
-
const ch = -1, Js = 0, yi = 1, Ds = 2, Zl = 3, Xl = 4, Ql = 5, Jl = 6, uh = 7, dh = 8, hu = typeof self == "object" ? self : globalThis,
|
|
5159
|
+
const ch = -1, Js = 0, yi = 1, Ds = 2, Zl = 3, Xl = 4, Ql = 5, Jl = 6, uh = 7, dh = 8, hu = typeof self == "object" ? self : globalThis, C1 = (e, t) => {
|
|
5126
5160
|
const n = (i, s) => (e.set(s, i), i), r = (i) => {
|
|
5127
5161
|
if (e.has(i))
|
|
5128
5162
|
return e.get(i);
|
|
@@ -5179,11 +5213,11 @@ const ch = -1, Js = 0, yi = 1, Ds = 2, Zl = 3, Xl = 4, Ql = 5, Jl = 6, uh = 7, d
|
|
|
5179
5213
|
return n(new hu[s](o), i);
|
|
5180
5214
|
};
|
|
5181
5215
|
return r;
|
|
5182
|
-
}, pu = (e) =>
|
|
5216
|
+
}, pu = (e) => C1(/* @__PURE__ */ new Map(), e)(0), yr = "", { toString: O1 } = {}, { keys: I1 } = Object, li = (e) => {
|
|
5183
5217
|
const t = typeof e;
|
|
5184
5218
|
if (t !== "object" || !e)
|
|
5185
5219
|
return [Js, t];
|
|
5186
|
-
const n =
|
|
5220
|
+
const n = O1.call(e).slice(8, -1);
|
|
5187
5221
|
switch (n) {
|
|
5188
5222
|
case "Array":
|
|
5189
5223
|
return [yi, yr];
|
|
@@ -5201,7 +5235,7 @@ const ch = -1, Js = 0, yi = 1, Ds = 2, Zl = 3, Xl = 4, Ql = 5, Jl = 6, uh = 7, d
|
|
|
5201
5235
|
return [yi, n];
|
|
5202
5236
|
}
|
|
5203
5237
|
return n.includes("Array") ? [yi, n] : n.includes("Error") ? [uh, n] : [Ds, n];
|
|
5204
|
-
}, cs = ([e, t]) => e === Js && (t === "function" || t === "symbol"),
|
|
5238
|
+
}, cs = ([e, t]) => e === Js && (t === "function" || t === "symbol"), R1 = (e, t, n, r) => {
|
|
5205
5239
|
const i = (o, a) => {
|
|
5206
5240
|
const l = r.push(o) - 1;
|
|
5207
5241
|
return n.set(a, l), l;
|
|
@@ -5250,7 +5284,7 @@ const ch = -1, Js = 0, yi = 1, Ds = 2, Zl = 3, Xl = 4, Ql = 5, Jl = 6, uh = 7, d
|
|
|
5250
5284
|
if (t && "toJSON" in o)
|
|
5251
5285
|
return s(o.toJSON());
|
|
5252
5286
|
const u = [], d = i([a, u], o);
|
|
5253
|
-
for (const h of
|
|
5287
|
+
for (const h of I1(o))
|
|
5254
5288
|
(e || !cs(li(o[h]))) && u.push([s(h), s(o[h])]);
|
|
5255
5289
|
return d;
|
|
5256
5290
|
}
|
|
@@ -5279,12 +5313,12 @@ const ch = -1, Js = 0, yi = 1, Ds = 2, Zl = 3, Xl = 4, Ql = 5, Jl = 6, uh = 7, d
|
|
|
5279
5313
|
return s;
|
|
5280
5314
|
}, gu = (e, { json: t, lossy: n } = {}) => {
|
|
5281
5315
|
const r = [];
|
|
5282
|
-
return
|
|
5316
|
+
return R1(!(t || n), !!t, /* @__PURE__ */ new Map(), r)(e), r;
|
|
5283
5317
|
}, Ps = typeof structuredClone == "function" ? (
|
|
5284
5318
|
/* c8 ignore start */
|
|
5285
5319
|
(e, t) => t && ("json" in t || "lossy" in t) ? pu(gu(e, t)) : structuredClone(e)
|
|
5286
5320
|
) : (e, t) => pu(gu(e, t));
|
|
5287
|
-
function
|
|
5321
|
+
function L1(e, t) {
|
|
5288
5322
|
const n = [{ type: "text", value: "↩" }];
|
|
5289
5323
|
return t > 1 && n.push({
|
|
5290
5324
|
type: "element",
|
|
@@ -5293,11 +5327,11 @@ function LE(e, t) {
|
|
|
5293
5327
|
children: [{ type: "text", value: String(t) }]
|
|
5294
5328
|
}), n;
|
|
5295
5329
|
}
|
|
5296
|
-
function
|
|
5330
|
+
function M1(e, t) {
|
|
5297
5331
|
return "Back to reference " + (e + 1) + (t > 1 ? "-" + t : "");
|
|
5298
5332
|
}
|
|
5299
|
-
function
|
|
5300
|
-
const t = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", n = e.options.footnoteBackContent ||
|
|
5333
|
+
function D1(e) {
|
|
5334
|
+
const t = typeof e.options.clobberPrefix == "string" ? e.options.clobberPrefix : "user-content-", n = e.options.footnoteBackContent || L1, r = e.options.footnoteBackLabel || M1, i = e.options.footnoteLabel || "Footnotes", s = e.options.footnoteLabelTagName || "h2", o = e.options.footnoteLabelProperties || {
|
|
5301
5335
|
className: ["sr-only"]
|
|
5302
5336
|
}, a = [];
|
|
5303
5337
|
let l = -1;
|
|
@@ -5384,24 +5418,24 @@ const fh = (
|
|
|
5384
5418
|
*/
|
|
5385
5419
|
function(e) {
|
|
5386
5420
|
if (e == null)
|
|
5387
|
-
return
|
|
5421
|
+
return q1;
|
|
5388
5422
|
if (typeof e == "function")
|
|
5389
5423
|
return eo(e);
|
|
5390
5424
|
if (typeof e == "object")
|
|
5391
|
-
return Array.isArray(e) ?
|
|
5425
|
+
return Array.isArray(e) ? P1(e) : (
|
|
5392
5426
|
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
5393
5427
|
// narrows to `Array`.
|
|
5394
|
-
|
|
5428
|
+
B1(
|
|
5395
5429
|
/** @type {Props} */
|
|
5396
5430
|
e
|
|
5397
5431
|
)
|
|
5398
5432
|
);
|
|
5399
5433
|
if (typeof e == "string")
|
|
5400
|
-
return
|
|
5434
|
+
return F1(e);
|
|
5401
5435
|
throw new Error("Expected function, string, or object as test");
|
|
5402
5436
|
}
|
|
5403
5437
|
);
|
|
5404
|
-
function
|
|
5438
|
+
function P1(e) {
|
|
5405
5439
|
const t = [];
|
|
5406
5440
|
let n = -1;
|
|
5407
5441
|
for (; ++n < e.length; )
|
|
@@ -5414,7 +5448,7 @@ function PE(e) {
|
|
|
5414
5448
|
return !1;
|
|
5415
5449
|
}
|
|
5416
5450
|
}
|
|
5417
|
-
function
|
|
5451
|
+
function B1(e) {
|
|
5418
5452
|
const t = (
|
|
5419
5453
|
/** @type {Record<string, unknown>} */
|
|
5420
5454
|
e
|
|
@@ -5432,7 +5466,7 @@ function BE(e) {
|
|
|
5432
5466
|
return !0;
|
|
5433
5467
|
}
|
|
5434
5468
|
}
|
|
5435
|
-
function
|
|
5469
|
+
function F1(e) {
|
|
5436
5470
|
return eo(t);
|
|
5437
5471
|
function t(n) {
|
|
5438
5472
|
return n && n.type === e;
|
|
@@ -5441,7 +5475,7 @@ function FE(e) {
|
|
|
5441
5475
|
function eo(e) {
|
|
5442
5476
|
return t;
|
|
5443
5477
|
function t(n, r, i) {
|
|
5444
|
-
return !!(
|
|
5478
|
+
return !!(U1(n) && e.call(
|
|
5445
5479
|
this,
|
|
5446
5480
|
n,
|
|
5447
5481
|
typeof r == "number" ? r : void 0,
|
|
@@ -5449,14 +5483,14 @@ function eo(e) {
|
|
|
5449
5483
|
));
|
|
5450
5484
|
}
|
|
5451
5485
|
}
|
|
5452
|
-
function
|
|
5486
|
+
function q1() {
|
|
5453
5487
|
return !0;
|
|
5454
5488
|
}
|
|
5455
|
-
function
|
|
5489
|
+
function U1(e) {
|
|
5456
5490
|
return e !== null && typeof e == "object" && "type" in e;
|
|
5457
5491
|
}
|
|
5458
|
-
const hh = [], $
|
|
5459
|
-
function
|
|
5492
|
+
const hh = [], $1 = !0, mu = !1, z1 = "skip";
|
|
5493
|
+
function H1(e, t, n, r) {
|
|
5460
5494
|
let i;
|
|
5461
5495
|
typeof t == "function" && typeof n != "function" ? (r = n, n = t) : i = t;
|
|
5462
5496
|
const s = fh(i), o = r ? -1 : 1;
|
|
@@ -5481,14 +5515,14 @@ function HE(e, t, n, r) {
|
|
|
5481
5515
|
return h;
|
|
5482
5516
|
function h() {
|
|
5483
5517
|
let f = hh, p, m, b;
|
|
5484
|
-
if ((!t || s(l, c, u[u.length - 1] || void 0)) && (f =
|
|
5518
|
+
if ((!t || s(l, c, u[u.length - 1] || void 0)) && (f = j1(n(l, u)), f[0] === mu))
|
|
5485
5519
|
return f;
|
|
5486
5520
|
if ("children" in l && l.children) {
|
|
5487
5521
|
const y = (
|
|
5488
5522
|
/** @type {UnistParent} */
|
|
5489
5523
|
l
|
|
5490
5524
|
);
|
|
5491
|
-
if (y.children && f[0] !==
|
|
5525
|
+
if (y.children && f[0] !== z1)
|
|
5492
5526
|
for (m = (r ? y.children.length : -1) + o, b = u.concat(y); m > -1 && m < y.children.length; ) {
|
|
5493
5527
|
const x = y.children[m];
|
|
5494
5528
|
if (p = a(x, m, b)(), p[0] === mu)
|
|
@@ -5500,22 +5534,22 @@ function HE(e, t, n, r) {
|
|
|
5500
5534
|
}
|
|
5501
5535
|
}
|
|
5502
5536
|
}
|
|
5503
|
-
function
|
|
5504
|
-
return Array.isArray(e) ? e : typeof e == "number" ? [$
|
|
5537
|
+
function j1(e) {
|
|
5538
|
+
return Array.isArray(e) ? e : typeof e == "number" ? [$1, e] : e == null ? hh : [e];
|
|
5505
5539
|
}
|
|
5506
|
-
function
|
|
5540
|
+
function G1(e, t, n, r) {
|
|
5507
5541
|
let i, s, o;
|
|
5508
|
-
typeof t == "function" && typeof n != "function" ? (s = void 0, o = t, i = n) : (s = t, o = n, i = r),
|
|
5542
|
+
typeof t == "function" && typeof n != "function" ? (s = void 0, o = t, i = n) : (s = t, o = n, i = r), H1(e, s, a, i);
|
|
5509
5543
|
function a(l, c) {
|
|
5510
5544
|
const u = c[c.length - 1], d = u ? u.children.indexOf(l) : void 0;
|
|
5511
5545
|
return o(l, d, u);
|
|
5512
5546
|
}
|
|
5513
5547
|
}
|
|
5514
|
-
const rl = {}.hasOwnProperty,
|
|
5515
|
-
function
|
|
5516
|
-
const n = t ||
|
|
5548
|
+
const rl = {}.hasOwnProperty, K1 = {};
|
|
5549
|
+
function W1(e, t) {
|
|
5550
|
+
const n = t || K1, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), o = { ...T1, ...n.handlers }, a = {
|
|
5517
5551
|
all: c,
|
|
5518
|
-
applyData:
|
|
5552
|
+
applyData: Y1,
|
|
5519
5553
|
definitionById: r,
|
|
5520
5554
|
footnoteById: i,
|
|
5521
5555
|
footnoteCounts: s,
|
|
@@ -5523,10 +5557,10 @@ function WE(e, t) {
|
|
|
5523
5557
|
handlers: o,
|
|
5524
5558
|
one: l,
|
|
5525
5559
|
options: n,
|
|
5526
|
-
patch:
|
|
5527
|
-
wrap:
|
|
5560
|
+
patch: V1,
|
|
5561
|
+
wrap: X1
|
|
5528
5562
|
};
|
|
5529
|
-
return
|
|
5563
|
+
return G1(e, function(u) {
|
|
5530
5564
|
if (u.type === "definition" || u.type === "footnoteDefinition") {
|
|
5531
5565
|
const d = u.type === "definition" ? r : i, h = String(u.identifier).toUpperCase();
|
|
5532
5566
|
d.has(h) || d.set(h, u);
|
|
@@ -5543,7 +5577,7 @@ function WE(e, t) {
|
|
|
5543
5577
|
}
|
|
5544
5578
|
return Ps(u);
|
|
5545
5579
|
}
|
|
5546
|
-
return (a.options.unknownHandler ||
|
|
5580
|
+
return (a.options.unknownHandler || Z1)(a, u, d);
|
|
5547
5581
|
}
|
|
5548
5582
|
function c(u) {
|
|
5549
5583
|
const d = [];
|
|
@@ -5564,10 +5598,10 @@ function WE(e, t) {
|
|
|
5564
5598
|
return d;
|
|
5565
5599
|
}
|
|
5566
5600
|
}
|
|
5567
|
-
function
|
|
5601
|
+
function V1(e, t) {
|
|
5568
5602
|
e.position && (t.position = Lb(e));
|
|
5569
5603
|
}
|
|
5570
|
-
function
|
|
5604
|
+
function Y1(e, t) {
|
|
5571
5605
|
let n = t;
|
|
5572
5606
|
if (e && e.data) {
|
|
5573
5607
|
const r = e.data.hName, i = e.data.hChildren, s = e.data.hProperties;
|
|
@@ -5582,7 +5616,7 @@ function YE(e, t) {
|
|
|
5582
5616
|
}
|
|
5583
5617
|
return n;
|
|
5584
5618
|
}
|
|
5585
|
-
function
|
|
5619
|
+
function Z1(e, t) {
|
|
5586
5620
|
const n = t.data || {}, r = "value" in t && !(rl.call(n, "hProperties") || rl.call(n, "hChildren")) ? { type: "text", value: t.value } : {
|
|
5587
5621
|
type: "element",
|
|
5588
5622
|
tagName: "div",
|
|
@@ -5591,7 +5625,7 @@ function ZE(e, t) {
|
|
|
5591
5625
|
};
|
|
5592
5626
|
return e.patch(t, r), e.applyData(t, r);
|
|
5593
5627
|
}
|
|
5594
|
-
function
|
|
5628
|
+
function X1(e, t) {
|
|
5595
5629
|
const n = [];
|
|
5596
5630
|
let r = -1;
|
|
5597
5631
|
for (t && n.push({ type: "text", value: `
|
|
@@ -5608,11 +5642,11 @@ function bu(e) {
|
|
|
5608
5642
|
return e.slice(t);
|
|
5609
5643
|
}
|
|
5610
5644
|
function yu(e, t) {
|
|
5611
|
-
const n =
|
|
5645
|
+
const n = W1(e, t), r = n.one(e, void 0), i = D1(n), s = Array.isArray(r) ? { type: "root", children: r } : r || { type: "root", children: [] };
|
|
5612
5646
|
return i && s.children.push({ type: "text", value: `
|
|
5613
5647
|
` }, i), s;
|
|
5614
5648
|
}
|
|
5615
|
-
function
|
|
5649
|
+
function Q1(e, t) {
|
|
5616
5650
|
return e && "run" in e ? async function(n, r) {
|
|
5617
5651
|
const i = (
|
|
5618
5652
|
/** @type {HastRoot} */
|
|
@@ -5656,7 +5690,7 @@ var Ss = Object.prototype.hasOwnProperty, ph = Object.prototype.toString, wu = O
|
|
|
5656
5690
|
return xu(t, n).value;
|
|
5657
5691
|
} else return;
|
|
5658
5692
|
return t[n];
|
|
5659
|
-
},
|
|
5693
|
+
}, J1 = function e() {
|
|
5660
5694
|
var t, n, r, i, s, o, a = arguments[0], l = 1, c = arguments.length, u = !1;
|
|
5661
5695
|
for (typeof a == "boolean" && (u = a, a = arguments[1] || {}, l = 2), (a == null || typeof a != "object" && typeof a != "function") && (a = {}); l < c; ++l)
|
|
5662
5696
|
if (t = arguments[l], t != null)
|
|
@@ -5664,14 +5698,14 @@ var Ss = Object.prototype.hasOwnProperty, ph = Object.prototype.toString, wu = O
|
|
|
5664
5698
|
r = Nu(a, n), i = Nu(t, n), a !== i && (u && i && (vu(i) || (s = _u(i))) ? (s ? (s = !1, o = r && _u(r) ? r : []) : o = r && vu(r) ? r : {}, ku(a, { name: n, newValue: e(u, o, i) })) : typeof i < "u" && ku(a, { name: n, newValue: i }));
|
|
5665
5699
|
return a;
|
|
5666
5700
|
};
|
|
5667
|
-
const pa = /* @__PURE__ */ Pi(
|
|
5701
|
+
const pa = /* @__PURE__ */ Pi(J1);
|
|
5668
5702
|
function il(e) {
|
|
5669
5703
|
if (typeof e != "object" || e === null)
|
|
5670
5704
|
return !1;
|
|
5671
5705
|
const t = Object.getPrototypeOf(e);
|
|
5672
5706
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
5673
5707
|
}
|
|
5674
|
-
function
|
|
5708
|
+
function eE() {
|
|
5675
5709
|
const e = [], t = { run: n, use: r };
|
|
5676
5710
|
return t;
|
|
5677
5711
|
function n(...i) {
|
|
@@ -5689,7 +5723,7 @@ function e1() {
|
|
|
5689
5723
|
}
|
|
5690
5724
|
for (; ++d < i.length; )
|
|
5691
5725
|
(c[d] === null || c[d] === void 0) && (c[d] = i[d]);
|
|
5692
|
-
i = c, u ?
|
|
5726
|
+
i = c, u ? tE(u, a)(...c) : o(null, ...c);
|
|
5693
5727
|
}
|
|
5694
5728
|
}
|
|
5695
5729
|
function r(i) {
|
|
@@ -5700,7 +5734,7 @@ function e1() {
|
|
|
5700
5734
|
return e.push(i), t;
|
|
5701
5735
|
}
|
|
5702
5736
|
}
|
|
5703
|
-
function
|
|
5737
|
+
function tE(e, t) {
|
|
5704
5738
|
let n;
|
|
5705
5739
|
return r;
|
|
5706
5740
|
function r(...o) {
|
|
@@ -5727,8 +5761,8 @@ function t1(e, t) {
|
|
|
5727
5761
|
i(null, o);
|
|
5728
5762
|
}
|
|
5729
5763
|
}
|
|
5730
|
-
const an = { basename:
|
|
5731
|
-
function
|
|
5764
|
+
const an = { basename: nE, dirname: rE, extname: iE, join: sE, sep: "/" };
|
|
5765
|
+
function nE(e, t) {
|
|
5732
5766
|
if (t !== void 0 && typeof t != "string")
|
|
5733
5767
|
throw new TypeError('"ext" argument must be a string');
|
|
5734
5768
|
Fi(e);
|
|
@@ -5756,7 +5790,7 @@ function n1(e, t) {
|
|
|
5756
5790
|
o < 0 && (s = !0, o = i + 1), a > -1 && (e.codePointAt(i) === t.codePointAt(a--) ? a < 0 && (r = i) : (a = -1, r = o));
|
|
5757
5791
|
return n === r ? r = o : r < 0 && (r = e.length), e.slice(n, r);
|
|
5758
5792
|
}
|
|
5759
|
-
function
|
|
5793
|
+
function rE(e) {
|
|
5760
5794
|
if (Fi(e), e.length === 0)
|
|
5761
5795
|
return ".";
|
|
5762
5796
|
let t = -1, n = e.length, r;
|
|
@@ -5769,7 +5803,7 @@ function r1(e) {
|
|
|
5769
5803
|
} else r || (r = !0);
|
|
5770
5804
|
return t < 0 ? e.codePointAt(0) === 47 ? "/" : "." : t === 1 && e.codePointAt(0) === 47 ? "//" : e.slice(0, t);
|
|
5771
5805
|
}
|
|
5772
|
-
function
|
|
5806
|
+
function iE(e) {
|
|
5773
5807
|
Fi(e);
|
|
5774
5808
|
let t = e.length, n = -1, r = 0, i = -1, s = 0, o;
|
|
5775
5809
|
for (; t--; ) {
|
|
@@ -5787,19 +5821,19 @@ function i1(e) {
|
|
|
5787
5821
|
s === 0 || // The (right-most) trimmed path component is exactly `..`.
|
|
5788
5822
|
s === 1 && i === n - 1 && i === r + 1 ? "" : e.slice(i, n);
|
|
5789
5823
|
}
|
|
5790
|
-
function
|
|
5824
|
+
function sE(...e) {
|
|
5791
5825
|
let t = -1, n;
|
|
5792
5826
|
for (; ++t < e.length; )
|
|
5793
5827
|
Fi(e[t]), e[t] && (n = n === void 0 ? e[t] : n + "/" + e[t]);
|
|
5794
|
-
return n === void 0 ? "." :
|
|
5828
|
+
return n === void 0 ? "." : oE(n);
|
|
5795
5829
|
}
|
|
5796
|
-
function
|
|
5830
|
+
function oE(e) {
|
|
5797
5831
|
Fi(e);
|
|
5798
5832
|
const t = e.codePointAt(0) === 47;
|
|
5799
|
-
let n =
|
|
5833
|
+
let n = aE(e, !t);
|
|
5800
5834
|
return n.length === 0 && !t && (n = "."), n.length > 0 && e.codePointAt(e.length - 1) === 47 && (n += "/"), t ? "/" + n : n;
|
|
5801
5835
|
}
|
|
5802
|
-
function
|
|
5836
|
+
function aE(e, t) {
|
|
5803
5837
|
let n = "", r = 0, i = -1, s = 0, o = -1, a, l;
|
|
5804
5838
|
for (; ++o <= e.length; ) {
|
|
5805
5839
|
if (o < e.length)
|
|
@@ -5836,15 +5870,15 @@ function Fi(e) {
|
|
|
5836
5870
|
"Path must be a string. Received " + JSON.stringify(e)
|
|
5837
5871
|
);
|
|
5838
5872
|
}
|
|
5839
|
-
const
|
|
5840
|
-
function
|
|
5873
|
+
const lE = { cwd: cE };
|
|
5874
|
+
function cE() {
|
|
5841
5875
|
return "/";
|
|
5842
5876
|
}
|
|
5843
5877
|
function sl(e) {
|
|
5844
5878
|
return !!(e !== null && typeof e == "object" && "href" in e && e.href && "protocol" in e && e.protocol && // @ts-expect-error: indexing is fine.
|
|
5845
5879
|
e.auth === void 0);
|
|
5846
5880
|
}
|
|
5847
|
-
function
|
|
5881
|
+
function uE(e) {
|
|
5848
5882
|
if (typeof e == "string")
|
|
5849
5883
|
e = new URL(e);
|
|
5850
5884
|
else if (!sl(e)) {
|
|
@@ -5857,9 +5891,9 @@ function u1(e) {
|
|
|
5857
5891
|
const t = new TypeError("The URL must be of scheme file");
|
|
5858
5892
|
throw t.code = "ERR_INVALID_URL_SCHEME", t;
|
|
5859
5893
|
}
|
|
5860
|
-
return
|
|
5894
|
+
return dE(e);
|
|
5861
5895
|
}
|
|
5862
|
-
function
|
|
5896
|
+
function dE(e) {
|
|
5863
5897
|
if (e.hostname !== "") {
|
|
5864
5898
|
const r = new TypeError(
|
|
5865
5899
|
'File URL host must be "localhost" or empty on darwin'
|
|
@@ -5916,7 +5950,7 @@ class gh {
|
|
|
5916
5950
|
*/
|
|
5917
5951
|
constructor(t) {
|
|
5918
5952
|
let n;
|
|
5919
|
-
t ? sl(t) ? n = { path: t } : typeof t == "string" ||
|
|
5953
|
+
t ? sl(t) ? n = { path: t } : typeof t == "string" || fE(t) ? n = { value: t } : n = t : n = {}, this.cwd = "cwd" in n ? "" : lE.cwd(), this.data = {}, this.history = [], this.messages = [], this.value, this.map, this.result, this.stored;
|
|
5920
5954
|
let r = -1;
|
|
5921
5955
|
for (; ++r < ga.length; ) {
|
|
5922
5956
|
const s = ga[r];
|
|
@@ -6024,7 +6058,7 @@ class gh {
|
|
|
6024
6058
|
* Nothing.
|
|
6025
6059
|
*/
|
|
6026
6060
|
set path(t) {
|
|
6027
|
-
sl(t) && (t =
|
|
6061
|
+
sl(t) && (t = uE(t)), ba(t, "path"), this.path !== t && this.history.push(t);
|
|
6028
6062
|
}
|
|
6029
6063
|
/**
|
|
6030
6064
|
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
@@ -6275,10 +6309,10 @@ function Au(e, t) {
|
|
|
6275
6309
|
if (!e)
|
|
6276
6310
|
throw new Error("Setting `" + t + "` requires `path` to be set too");
|
|
6277
6311
|
}
|
|
6278
|
-
function
|
|
6312
|
+
function fE(e) {
|
|
6279
6313
|
return !!(e && typeof e == "object" && "byteLength" in e && "byteOffset" in e);
|
|
6280
6314
|
}
|
|
6281
|
-
const
|
|
6315
|
+
const hE = (
|
|
6282
6316
|
/**
|
|
6283
6317
|
* @type {new <Parameters extends Array<unknown>, Result>(property: string | symbol) => (...parameters: Parameters) => Result}
|
|
6284
6318
|
*/
|
|
@@ -6299,13 +6333,13 @@ const h1 = (
|
|
|
6299
6333
|
};
|
|
6300
6334
|
return Object.setPrototypeOf(s, r), s;
|
|
6301
6335
|
}
|
|
6302
|
-
),
|
|
6303
|
-
class ec extends
|
|
6336
|
+
), pE = {}.hasOwnProperty;
|
|
6337
|
+
class ec extends hE {
|
|
6304
6338
|
/**
|
|
6305
6339
|
* Create a processor.
|
|
6306
6340
|
*/
|
|
6307
6341
|
constructor() {
|
|
6308
|
-
super("copy"), this.Compiler = void 0, this.Parser = void 0, this.attachers = [], this.compiler = void 0, this.freezeIndex = -1, this.frozen = void 0, this.namespace = {}, this.parser = void 0, this.transformers =
|
|
6342
|
+
super("copy"), this.Compiler = void 0, this.Parser = void 0, this.attachers = [], this.compiler = void 0, this.freezeIndex = -1, this.frozen = void 0, this.namespace = {}, this.parser = void 0, this.transformers = eE();
|
|
6309
6343
|
}
|
|
6310
6344
|
/**
|
|
6311
6345
|
* Copy a processor.
|
|
@@ -6390,7 +6424,7 @@ class ec extends h1 {
|
|
|
6390
6424
|
* the entire dataset when getting without key.
|
|
6391
6425
|
*/
|
|
6392
6426
|
data(t, n) {
|
|
6393
|
-
return typeof t == "string" ? arguments.length === 2 ? (wa("data", this.frozen), this.namespace[t] = n, this) :
|
|
6427
|
+
return typeof t == "string" ? arguments.length === 2 ? (wa("data", this.frozen), this.namespace[t] = n, this) : pE.call(this.namespace, t) && this.namespace[t] || void 0 : t ? (wa("data", this.frozen), this.namespace = t, this) : this.namespace;
|
|
6394
6428
|
}
|
|
6395
6429
|
/**
|
|
6396
6430
|
* Freeze a processor.
|
|
@@ -6505,7 +6539,7 @@ class ec extends h1 {
|
|
|
6505
6539
|
/** @type {unknown} */
|
|
6506
6540
|
d
|
|
6507
6541
|
), p = r.stringify(f, h);
|
|
6508
|
-
|
|
6542
|
+
bE(p) ? h.value = p : h.result = p, c(
|
|
6509
6543
|
u,
|
|
6510
6544
|
/** @type {VFileWithOutput<CompileResult>} */
|
|
6511
6545
|
h
|
|
@@ -6781,7 +6815,7 @@ class ec extends h1 {
|
|
|
6781
6815
|
}
|
|
6782
6816
|
}
|
|
6783
6817
|
}
|
|
6784
|
-
const
|
|
6818
|
+
const gE = new ec().freeze();
|
|
6785
6819
|
function ya(e, t) {
|
|
6786
6820
|
if (typeof t != "function")
|
|
6787
6821
|
throw new TypeError("Cannot `" + e + "` without `parser`");
|
|
@@ -6807,15 +6841,15 @@ function Tu(e, t, n) {
|
|
|
6807
6841
|
);
|
|
6808
6842
|
}
|
|
6809
6843
|
function us(e) {
|
|
6810
|
-
return
|
|
6844
|
+
return mE(e) ? e : new gh(e);
|
|
6811
6845
|
}
|
|
6812
|
-
function
|
|
6846
|
+
function mE(e) {
|
|
6813
6847
|
return !!(e && typeof e == "object" && "message" in e && "messages" in e);
|
|
6814
6848
|
}
|
|
6815
|
-
function
|
|
6816
|
-
return typeof e == "string" ||
|
|
6849
|
+
function bE(e) {
|
|
6850
|
+
return typeof e == "string" || yE(e);
|
|
6817
6851
|
}
|
|
6818
|
-
function
|
|
6852
|
+
function yE(e) {
|
|
6819
6853
|
return !!(e && typeof e == "object" && "byteLength" in e && "byteOffset" in e);
|
|
6820
6854
|
}
|
|
6821
6855
|
const mh = (
|
|
@@ -6835,24 +6869,24 @@ const mh = (
|
|
|
6835
6869
|
*/
|
|
6836
6870
|
function(e) {
|
|
6837
6871
|
if (e == null)
|
|
6838
|
-
return
|
|
6872
|
+
return _E;
|
|
6839
6873
|
if (typeof e == "function")
|
|
6840
6874
|
return to(e);
|
|
6841
6875
|
if (typeof e == "object")
|
|
6842
|
-
return Array.isArray(e) ?
|
|
6876
|
+
return Array.isArray(e) ? EE(e) : (
|
|
6843
6877
|
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
6844
6878
|
// narrows to `Array`.
|
|
6845
|
-
|
|
6879
|
+
wE(
|
|
6846
6880
|
/** @type {Props} */
|
|
6847
6881
|
e
|
|
6848
6882
|
)
|
|
6849
6883
|
);
|
|
6850
6884
|
if (typeof e == "string")
|
|
6851
|
-
return
|
|
6885
|
+
return xE(e);
|
|
6852
6886
|
throw new Error("Expected function, string, or object as test");
|
|
6853
6887
|
}
|
|
6854
6888
|
);
|
|
6855
|
-
function
|
|
6889
|
+
function EE(e) {
|
|
6856
6890
|
const t = [];
|
|
6857
6891
|
let n = -1;
|
|
6858
6892
|
for (; ++n < e.length; )
|
|
@@ -6865,7 +6899,7 @@ function E1(e) {
|
|
|
6865
6899
|
return !1;
|
|
6866
6900
|
}
|
|
6867
6901
|
}
|
|
6868
|
-
function
|
|
6902
|
+
function wE(e) {
|
|
6869
6903
|
const t = (
|
|
6870
6904
|
/** @type {Record<string, unknown>} */
|
|
6871
6905
|
e
|
|
@@ -6883,7 +6917,7 @@ function w1(e) {
|
|
|
6883
6917
|
return !0;
|
|
6884
6918
|
}
|
|
6885
6919
|
}
|
|
6886
|
-
function
|
|
6920
|
+
function xE(e) {
|
|
6887
6921
|
return to(t);
|
|
6888
6922
|
function t(n) {
|
|
6889
6923
|
return n && n.type === e;
|
|
@@ -6892,7 +6926,7 @@ function x1(e) {
|
|
|
6892
6926
|
function to(e) {
|
|
6893
6927
|
return t;
|
|
6894
6928
|
function t(n, r, i) {
|
|
6895
|
-
return !!(
|
|
6929
|
+
return !!(vE(n) && e.call(
|
|
6896
6930
|
this,
|
|
6897
6931
|
n,
|
|
6898
6932
|
typeof r == "number" ? r : void 0,
|
|
@@ -6900,14 +6934,14 @@ function to(e) {
|
|
|
6900
6934
|
));
|
|
6901
6935
|
}
|
|
6902
6936
|
}
|
|
6903
|
-
function
|
|
6937
|
+
function _E() {
|
|
6904
6938
|
return !0;
|
|
6905
6939
|
}
|
|
6906
|
-
function
|
|
6940
|
+
function vE(e) {
|
|
6907
6941
|
return e !== null && typeof e == "object" && "type" in e;
|
|
6908
6942
|
}
|
|
6909
|
-
const bh = [],
|
|
6910
|
-
function
|
|
6943
|
+
const bh = [], kE = !0, Cu = !1, NE = "skip";
|
|
6944
|
+
function AE(e, t, n, r) {
|
|
6911
6945
|
let i;
|
|
6912
6946
|
typeof t == "function" && typeof n != "function" ? (r = n, n = t) : i = t;
|
|
6913
6947
|
const s = mh(i), o = r ? -1 : 1;
|
|
@@ -6932,14 +6966,14 @@ function A1(e, t, n, r) {
|
|
|
6932
6966
|
return h;
|
|
6933
6967
|
function h() {
|
|
6934
6968
|
let f = bh, p, m, b;
|
|
6935
|
-
if ((!t || s(l, c, u[u.length - 1] || void 0)) && (f =
|
|
6969
|
+
if ((!t || s(l, c, u[u.length - 1] || void 0)) && (f = SE(n(l, u)), f[0] === Cu))
|
|
6936
6970
|
return f;
|
|
6937
6971
|
if ("children" in l && l.children) {
|
|
6938
6972
|
const y = (
|
|
6939
6973
|
/** @type {UnistParent} */
|
|
6940
6974
|
l
|
|
6941
6975
|
);
|
|
6942
|
-
if (y.children && f[0] !==
|
|
6976
|
+
if (y.children && f[0] !== NE)
|
|
6943
6977
|
for (m = (r ? y.children.length : -1) + o, b = u.concat(y); m > -1 && m < y.children.length; ) {
|
|
6944
6978
|
const x = y.children[m];
|
|
6945
6979
|
if (p = a(x, m, b)(), p[0] === Cu)
|
|
@@ -6951,18 +6985,18 @@ function A1(e, t, n, r) {
|
|
|
6951
6985
|
}
|
|
6952
6986
|
}
|
|
6953
6987
|
}
|
|
6954
|
-
function
|
|
6955
|
-
return Array.isArray(e) ? e : typeof e == "number" ? [
|
|
6988
|
+
function SE(e) {
|
|
6989
|
+
return Array.isArray(e) ? e : typeof e == "number" ? [kE, e] : e == null ? bh : [e];
|
|
6956
6990
|
}
|
|
6957
|
-
function
|
|
6991
|
+
function TE(e, t, n, r) {
|
|
6958
6992
|
let i, s, o;
|
|
6959
|
-
typeof t == "function" && typeof n != "function" ? (s = void 0, o = t, i = n) : (s = t, o = n, i = r),
|
|
6993
|
+
typeof t == "function" && typeof n != "function" ? (s = void 0, o = t, i = n) : (s = t, o = n, i = r), AE(e, s, a, i);
|
|
6960
6994
|
function a(l, c) {
|
|
6961
6995
|
const u = c[c.length - 1], d = u ? u.children.indexOf(l) : void 0;
|
|
6962
6996
|
return o(l, d, u);
|
|
6963
6997
|
}
|
|
6964
6998
|
}
|
|
6965
|
-
const
|
|
6999
|
+
const CE = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", Ou = [], Iu = { allowDangerousHtml: !0 }, OE = /^(https?|ircs?|mailto|xmpp)$/i, IE = [
|
|
6966
7000
|
{ from: "astPlugins", id: "remove-buggy-html-in-markdown-parser" },
|
|
6967
7001
|
{ from: "allowDangerousHtml", id: "remove-buggy-html-in-markdown-parser" },
|
|
6968
7002
|
{
|
|
@@ -6996,21 +7030,21 @@ const C1 = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md",
|
|
|
6996
7030
|
{ from: "transformLinkUri", id: "#add-urltransform", to: "urlTransform" }
|
|
6997
7031
|
];
|
|
6998
7032
|
function yh(e) {
|
|
6999
|
-
const t =
|
|
7000
|
-
return
|
|
7033
|
+
const t = RE(e), n = LE(e);
|
|
7034
|
+
return ME(t.runSync(t.parse(n), n), e);
|
|
7001
7035
|
}
|
|
7002
|
-
function
|
|
7036
|
+
function RE(e) {
|
|
7003
7037
|
const t = e.rehypePlugins || Ou, n = e.remarkPlugins || Ou, r = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...Iu } : Iu;
|
|
7004
|
-
return
|
|
7038
|
+
return gE().use(n1).use(n).use(Q1, r).use(t);
|
|
7005
7039
|
}
|
|
7006
|
-
function
|
|
7040
|
+
function LE(e) {
|
|
7007
7041
|
const t = e.children || "", n = new gh();
|
|
7008
7042
|
return typeof t == "string" && (n.value = t), n;
|
|
7009
7043
|
}
|
|
7010
|
-
function
|
|
7011
|
-
const n = t.allowedElements, r = t.allowElement, i = t.components, s = t.disallowedElements, o = t.skipHtml, a = t.unwrapDisallowed, l = t.urlTransform ||
|
|
7012
|
-
for (const u of
|
|
7013
|
-
Object.hasOwn(t, u.from) && ("" + u.from + (u.to ? "use `" + u.to + "` instead" : "remove it") +
|
|
7044
|
+
function ME(e, t) {
|
|
7045
|
+
const n = t.allowedElements, r = t.allowElement, i = t.components, s = t.disallowedElements, o = t.skipHtml, a = t.unwrapDisallowed, l = t.urlTransform || DE;
|
|
7046
|
+
for (const u of IE)
|
|
7047
|
+
Object.hasOwn(t, u.from) && ("" + u.from + (u.to ? "use `" + u.to + "` instead" : "remove it") + CE + u.id, void 0);
|
|
7014
7048
|
return t.className && (e = {
|
|
7015
7049
|
type: "element",
|
|
7016
7050
|
tagName: "div",
|
|
@@ -7020,7 +7054,7 @@ function M1(e, t) {
|
|
|
7020
7054
|
/** @type {Array<ElementContent>} */
|
|
7021
7055
|
e.type === "root" ? e.children : [e]
|
|
7022
7056
|
)
|
|
7023
|
-
}),
|
|
7057
|
+
}), TE(e, c), Fb(e, {
|
|
7024
7058
|
Fragment: Wa,
|
|
7025
7059
|
// @ts-expect-error
|
|
7026
7060
|
// React components are allowed to return numbers,
|
|
@@ -7028,7 +7062,7 @@ function M1(e, t) {
|
|
|
7028
7062
|
components: i,
|
|
7029
7063
|
ignoreInvalidStyle: !0,
|
|
7030
7064
|
jsx: A,
|
|
7031
|
-
jsxs:
|
|
7065
|
+
jsxs: F,
|
|
7032
7066
|
passKeys: !0,
|
|
7033
7067
|
passNode: !0
|
|
7034
7068
|
});
|
|
@@ -7050,13 +7084,13 @@ function M1(e, t) {
|
|
|
7050
7084
|
}
|
|
7051
7085
|
}
|
|
7052
7086
|
}
|
|
7053
|
-
function
|
|
7087
|
+
function DE(e) {
|
|
7054
7088
|
const t = e.indexOf(":"), n = e.indexOf("?"), r = e.indexOf("#"), i = e.indexOf("/");
|
|
7055
7089
|
return (
|
|
7056
7090
|
// If there is no protocol, it’s relative.
|
|
7057
7091
|
t === -1 || // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.
|
|
7058
7092
|
i !== -1 && t > i || n !== -1 && t > n || r !== -1 && t > r || // It is a protocol, it should be allowed.
|
|
7059
|
-
|
|
7093
|
+
OE.test(e.slice(0, t)) ? e : ""
|
|
7060
7094
|
);
|
|
7061
7095
|
}
|
|
7062
7096
|
function Ru(e, t) {
|
|
@@ -7068,7 +7102,7 @@ function Ru(e, t) {
|
|
|
7068
7102
|
r++, i = n.indexOf(t, i + t.length);
|
|
7069
7103
|
return r;
|
|
7070
7104
|
}
|
|
7071
|
-
function
|
|
7105
|
+
function PE(e) {
|
|
7072
7106
|
if (typeof e != "string")
|
|
7073
7107
|
throw new TypeError("Expected a string");
|
|
7074
7108
|
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
@@ -7090,24 +7124,24 @@ const tc = (
|
|
|
7090
7124
|
*/
|
|
7091
7125
|
function(e) {
|
|
7092
7126
|
if (e == null)
|
|
7093
|
-
return
|
|
7127
|
+
return UE;
|
|
7094
7128
|
if (typeof e == "function")
|
|
7095
7129
|
return no(e);
|
|
7096
7130
|
if (typeof e == "object")
|
|
7097
|
-
return Array.isArray(e) ?
|
|
7131
|
+
return Array.isArray(e) ? BE(e) : (
|
|
7098
7132
|
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
7099
7133
|
// narrows to `Array`.
|
|
7100
|
-
|
|
7134
|
+
FE(
|
|
7101
7135
|
/** @type {Props} */
|
|
7102
7136
|
e
|
|
7103
7137
|
)
|
|
7104
7138
|
);
|
|
7105
7139
|
if (typeof e == "string")
|
|
7106
|
-
return
|
|
7140
|
+
return qE(e);
|
|
7107
7141
|
throw new Error("Expected function, string, or object as test");
|
|
7108
7142
|
}
|
|
7109
7143
|
);
|
|
7110
|
-
function
|
|
7144
|
+
function BE(e) {
|
|
7111
7145
|
const t = [];
|
|
7112
7146
|
let n = -1;
|
|
7113
7147
|
for (; ++n < e.length; )
|
|
@@ -7120,7 +7154,7 @@ function B1(e) {
|
|
|
7120
7154
|
return !1;
|
|
7121
7155
|
}
|
|
7122
7156
|
}
|
|
7123
|
-
function
|
|
7157
|
+
function FE(e) {
|
|
7124
7158
|
const t = (
|
|
7125
7159
|
/** @type {Record<string, unknown>} */
|
|
7126
7160
|
e
|
|
@@ -7138,7 +7172,7 @@ function F1(e) {
|
|
|
7138
7172
|
return !0;
|
|
7139
7173
|
}
|
|
7140
7174
|
}
|
|
7141
|
-
function
|
|
7175
|
+
function qE(e) {
|
|
7142
7176
|
return no(t);
|
|
7143
7177
|
function t(n) {
|
|
7144
7178
|
return n && n.type === e;
|
|
@@ -7147,7 +7181,7 @@ function q1(e) {
|
|
|
7147
7181
|
function no(e) {
|
|
7148
7182
|
return t;
|
|
7149
7183
|
function t(n, r, i) {
|
|
7150
|
-
return !!($
|
|
7184
|
+
return !!($E(n) && e.call(
|
|
7151
7185
|
this,
|
|
7152
7186
|
n,
|
|
7153
7187
|
typeof r == "number" ? r : void 0,
|
|
@@ -7155,14 +7189,14 @@ function no(e) {
|
|
|
7155
7189
|
));
|
|
7156
7190
|
}
|
|
7157
7191
|
}
|
|
7158
|
-
function
|
|
7192
|
+
function UE() {
|
|
7159
7193
|
return !0;
|
|
7160
7194
|
}
|
|
7161
|
-
function $
|
|
7195
|
+
function $E(e) {
|
|
7162
7196
|
return e !== null && typeof e == "object" && "type" in e;
|
|
7163
7197
|
}
|
|
7164
|
-
const Eh = [],
|
|
7165
|
-
function
|
|
7198
|
+
const Eh = [], zE = !0, Lu = !1, HE = "skip";
|
|
7199
|
+
function jE(e, t, n, r) {
|
|
7166
7200
|
let i;
|
|
7167
7201
|
i = t;
|
|
7168
7202
|
const s = tc(i), o = 1;
|
|
@@ -7187,14 +7221,14 @@ function j1(e, t, n, r) {
|
|
|
7187
7221
|
return h;
|
|
7188
7222
|
function h() {
|
|
7189
7223
|
let f = Eh, p, m, b;
|
|
7190
|
-
if (s(l, c, u[u.length - 1] || void 0) && (f =
|
|
7224
|
+
if (s(l, c, u[u.length - 1] || void 0) && (f = GE(n(l, u)), f[0] === Lu))
|
|
7191
7225
|
return f;
|
|
7192
7226
|
if ("children" in l && l.children) {
|
|
7193
7227
|
const y = (
|
|
7194
7228
|
/** @type {UnistParent} */
|
|
7195
7229
|
l
|
|
7196
7230
|
);
|
|
7197
|
-
if (y.children && f[0] !==
|
|
7231
|
+
if (y.children && f[0] !== HE)
|
|
7198
7232
|
for (m = -1 + o, b = u.concat(y); m > -1 && m < y.children.length; ) {
|
|
7199
7233
|
const x = y.children[m];
|
|
7200
7234
|
if (p = a(x, m, b)(), p[0] === Lu)
|
|
@@ -7206,14 +7240,14 @@ function j1(e, t, n, r) {
|
|
|
7206
7240
|
}
|
|
7207
7241
|
}
|
|
7208
7242
|
}
|
|
7209
|
-
function
|
|
7210
|
-
return Array.isArray(e) ? e : typeof e == "number" ? [
|
|
7243
|
+
function GE(e) {
|
|
7244
|
+
return Array.isArray(e) ? e : typeof e == "number" ? [zE, e] : e == null ? Eh : [e];
|
|
7211
7245
|
}
|
|
7212
|
-
function
|
|
7213
|
-
const i = tc((n || {}).ignore || []), s =
|
|
7246
|
+
function KE(e, t, n) {
|
|
7247
|
+
const i = tc((n || {}).ignore || []), s = WE(t);
|
|
7214
7248
|
let o = -1;
|
|
7215
7249
|
for (; ++o < s.length; )
|
|
7216
|
-
|
|
7250
|
+
jE(e, "text", a);
|
|
7217
7251
|
function a(c, u) {
|
|
7218
7252
|
let d = -1, h;
|
|
7219
7253
|
for (; ++d < u.length; ) {
|
|
@@ -7253,7 +7287,7 @@ function K1(e, t, n) {
|
|
|
7253
7287
|
return y ? (p < c.value.length && x.push({ type: "text", value: c.value.slice(p) }), d.children.splice(b, 1, ...x)) : x = [c], b + x.length;
|
|
7254
7288
|
}
|
|
7255
7289
|
}
|
|
7256
|
-
function
|
|
7290
|
+
function WE(e) {
|
|
7257
7291
|
const t = [];
|
|
7258
7292
|
if (!Array.isArray(e))
|
|
7259
7293
|
throw new TypeError("Expected find and replace tuple or list of tuples");
|
|
@@ -7261,24 +7295,24 @@ function W1(e) {
|
|
|
7261
7295
|
let r = -1;
|
|
7262
7296
|
for (; ++r < n.length; ) {
|
|
7263
7297
|
const i = n[r];
|
|
7264
|
-
t.push([
|
|
7298
|
+
t.push([VE(i[0]), YE(i[1])]);
|
|
7265
7299
|
}
|
|
7266
7300
|
return t;
|
|
7267
7301
|
}
|
|
7268
|
-
function
|
|
7269
|
-
return typeof e == "string" ? new RegExp(
|
|
7302
|
+
function VE(e) {
|
|
7303
|
+
return typeof e == "string" ? new RegExp(PE(e), "g") : e;
|
|
7270
7304
|
}
|
|
7271
|
-
function
|
|
7305
|
+
function YE(e) {
|
|
7272
7306
|
return typeof e == "function" ? e : function() {
|
|
7273
7307
|
return e;
|
|
7274
7308
|
};
|
|
7275
7309
|
}
|
|
7276
7310
|
const xa = "phrasing", _a = ["autolink", "link", "image", "label"];
|
|
7277
|
-
function
|
|
7311
|
+
function ZE() {
|
|
7278
7312
|
return {
|
|
7279
7313
|
transforms: [rw],
|
|
7280
7314
|
enter: {
|
|
7281
|
-
literalAutolink:
|
|
7315
|
+
literalAutolink: QE,
|
|
7282
7316
|
literalAutolinkEmail: va,
|
|
7283
7317
|
literalAutolinkHttp: va,
|
|
7284
7318
|
literalAutolinkWww: va
|
|
@@ -7286,12 +7320,12 @@ function Z1() {
|
|
|
7286
7320
|
exit: {
|
|
7287
7321
|
literalAutolink: nw,
|
|
7288
7322
|
literalAutolinkEmail: tw,
|
|
7289
|
-
literalAutolinkHttp:
|
|
7323
|
+
literalAutolinkHttp: JE,
|
|
7290
7324
|
literalAutolinkWww: ew
|
|
7291
7325
|
}
|
|
7292
7326
|
};
|
|
7293
7327
|
}
|
|
7294
|
-
function
|
|
7328
|
+
function XE() {
|
|
7295
7329
|
return {
|
|
7296
7330
|
unsafe: [
|
|
7297
7331
|
{
|
|
@@ -7318,13 +7352,13 @@ function X1() {
|
|
|
7318
7352
|
]
|
|
7319
7353
|
};
|
|
7320
7354
|
}
|
|
7321
|
-
function
|
|
7355
|
+
function QE(e) {
|
|
7322
7356
|
this.enter({ type: "link", title: null, url: "", children: [] }, e);
|
|
7323
7357
|
}
|
|
7324
7358
|
function va(e) {
|
|
7325
7359
|
this.config.enter.autolinkProtocol.call(this, e);
|
|
7326
7360
|
}
|
|
7327
|
-
function
|
|
7361
|
+
function JE(e) {
|
|
7328
7362
|
this.config.exit.autolinkProtocol.call(this, e);
|
|
7329
7363
|
}
|
|
7330
7364
|
function ew(e) {
|
|
@@ -7339,7 +7373,7 @@ function nw(e) {
|
|
|
7339
7373
|
this.exit(e);
|
|
7340
7374
|
}
|
|
7341
7375
|
function rw(e) {
|
|
7342
|
-
|
|
7376
|
+
KE(
|
|
7343
7377
|
e,
|
|
7344
7378
|
[
|
|
7345
7379
|
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, iw],
|
|
@@ -8638,7 +8672,7 @@ function Mx(e, t, n, r) {
|
|
|
8638
8672
|
}
|
|
8639
8673
|
function Dx() {
|
|
8640
8674
|
return [
|
|
8641
|
-
|
|
8675
|
+
ZE(),
|
|
8642
8676
|
bw(),
|
|
8643
8677
|
xw(),
|
|
8644
8678
|
kx(),
|
|
@@ -8648,7 +8682,7 @@ function Dx() {
|
|
|
8648
8682
|
function Px(e) {
|
|
8649
8683
|
return {
|
|
8650
8684
|
extensions: [
|
|
8651
|
-
|
|
8685
|
+
XE(),
|
|
8652
8686
|
yw(e),
|
|
8653
8687
|
_w(),
|
|
8654
8688
|
Ox(e),
|
|
@@ -13890,9 +13924,9 @@ const Wu = "[A-Za-z$_][0-9A-Za-z$_]*", ev = [
|
|
|
13890
13924
|
np
|
|
13891
13925
|
);
|
|
13892
13926
|
function iv(e) {
|
|
13893
|
-
const t = e.regex, n = (
|
|
13894
|
-
const w = "</" +
|
|
13895
|
-
return
|
|
13927
|
+
const t = e.regex, n = (q, { after: K }) => {
|
|
13928
|
+
const w = "</" + q[0].slice(1);
|
|
13929
|
+
return q.input.indexOf(w, K) !== -1;
|
|
13896
13930
|
}, r = Wu, i = {
|
|
13897
13931
|
begin: "<>",
|
|
13898
13932
|
end: "</>"
|
|
@@ -13903,8 +13937,8 @@ function iv(e) {
|
|
|
13903
13937
|
* @param {RegExpMatchArray} match
|
|
13904
13938
|
* @param {CallbackResponse} response
|
|
13905
13939
|
*/
|
|
13906
|
-
isTrulyOpeningTag: (
|
|
13907
|
-
const w =
|
|
13940
|
+
isTrulyOpeningTag: (q, K) => {
|
|
13941
|
+
const w = q[0].length + q.index, Q = q.input[w];
|
|
13908
13942
|
if (
|
|
13909
13943
|
// HTML should not include another raw `<` inside a tag
|
|
13910
13944
|
// nested type?
|
|
@@ -13916,9 +13950,9 @@ function iv(e) {
|
|
|
13916
13950
|
K.ignoreMatch();
|
|
13917
13951
|
return;
|
|
13918
13952
|
}
|
|
13919
|
-
Q === ">" && (n(
|
|
13953
|
+
Q === ">" && (n(q, { after: w }) || K.ignoreMatch());
|
|
13920
13954
|
let ae;
|
|
13921
|
-
const v =
|
|
13955
|
+
const v = q.input.substring(w);
|
|
13922
13956
|
if (ae = v.match(/^\s*=/)) {
|
|
13923
13957
|
K.ignoreMatch();
|
|
13924
13958
|
return;
|
|
@@ -14181,8 +14215,8 @@ function iv(e) {
|
|
|
14181
14215
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
14182
14216
|
className: "variable.constant"
|
|
14183
14217
|
};
|
|
14184
|
-
function B(
|
|
14185
|
-
return t.concat("(?!",
|
|
14218
|
+
function B(q) {
|
|
14219
|
+
return t.concat("(?!", q.join("|"), ")");
|
|
14186
14220
|
}
|
|
14187
14221
|
const re = {
|
|
14188
14222
|
match: t.concat(
|
|
@@ -14191,7 +14225,7 @@ function iv(e) {
|
|
|
14191
14225
|
...rp,
|
|
14192
14226
|
"super",
|
|
14193
14227
|
"import"
|
|
14194
|
-
].map((
|
|
14228
|
+
].map((q) => `${q}\\s*\\(`)),
|
|
14195
14229
|
r,
|
|
14196
14230
|
t.lookahead(/\s*\(/)
|
|
14197
14231
|
),
|
|
@@ -14224,7 +14258,7 @@ function iv(e) {
|
|
|
14224
14258
|
},
|
|
14225
14259
|
k
|
|
14226
14260
|
]
|
|
14227
|
-
}, I = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>",
|
|
14261
|
+
}, I = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", U = {
|
|
14228
14262
|
match: [
|
|
14229
14263
|
/const|var|let/,
|
|
14230
14264
|
/\s+/,
|
|
@@ -14274,7 +14308,7 @@ function iv(e) {
|
|
|
14274
14308
|
match: r + t.lookahead(":"),
|
|
14275
14309
|
relevance: 0
|
|
14276
14310
|
},
|
|
14277
|
-
|
|
14311
|
+
U,
|
|
14278
14312
|
{
|
|
14279
14313
|
// "value" container
|
|
14280
14314
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
@@ -20654,11 +20688,11 @@ function Wv(e) {
|
|
|
20654
20688
|
}, I = {
|
|
20655
20689
|
className: "variable",
|
|
20656
20690
|
match: `\\$${Fs}+`
|
|
20657
|
-
},
|
|
20691
|
+
}, U = [
|
|
20658
20692
|
X,
|
|
20659
20693
|
Y,
|
|
20660
20694
|
I
|
|
20661
|
-
],
|
|
20695
|
+
], q = {
|
|
20662
20696
|
match: /(@|#(un)?)available/,
|
|
20663
20697
|
scope: "keyword",
|
|
20664
20698
|
starts: { contains: [
|
|
@@ -20680,7 +20714,7 @@ function Wv(e) {
|
|
|
20680
20714
|
scope: "meta",
|
|
20681
20715
|
match: ve(/@/, on)
|
|
20682
20716
|
}, Q = [
|
|
20683
|
-
|
|
20717
|
+
q,
|
|
20684
20718
|
K,
|
|
20685
20719
|
w
|
|
20686
20720
|
], ae = {
|
|
@@ -20746,7 +20780,7 @@ function Wv(e) {
|
|
|
20746
20780
|
...b,
|
|
20747
20781
|
_,
|
|
20748
20782
|
G,
|
|
20749
|
-
...
|
|
20783
|
+
...U,
|
|
20750
20784
|
...Q,
|
|
20751
20785
|
ae
|
|
20752
20786
|
]
|
|
@@ -20911,7 +20945,7 @@ function Wv(e) {
|
|
|
20911
20945
|
...b,
|
|
20912
20946
|
_,
|
|
20913
20947
|
G,
|
|
20914
|
-
...
|
|
20948
|
+
...U
|
|
20915
20949
|
];
|
|
20916
20950
|
Ge.contains = [
|
|
20917
20951
|
...ie,
|
|
@@ -20949,7 +20983,7 @@ function Wv(e) {
|
|
|
20949
20983
|
...b,
|
|
20950
20984
|
_,
|
|
20951
20985
|
G,
|
|
20952
|
-
...
|
|
20986
|
+
...U,
|
|
20953
20987
|
...Q,
|
|
20954
20988
|
ae,
|
|
20955
20989
|
se
|
|
@@ -21103,9 +21137,9 @@ const qs = "[A-Za-z$_][0-9A-Za-z$_]*", up = [
|
|
|
21103
21137
|
hp
|
|
21104
21138
|
);
|
|
21105
21139
|
function Vv(e) {
|
|
21106
|
-
const t = e.regex, n = (
|
|
21107
|
-
const w = "</" +
|
|
21108
|
-
return
|
|
21140
|
+
const t = e.regex, n = (q, { after: K }) => {
|
|
21141
|
+
const w = "</" + q[0].slice(1);
|
|
21142
|
+
return q.input.indexOf(w, K) !== -1;
|
|
21109
21143
|
}, r = qs, i = {
|
|
21110
21144
|
begin: "<>",
|
|
21111
21145
|
end: "</>"
|
|
@@ -21116,8 +21150,8 @@ function Vv(e) {
|
|
|
21116
21150
|
* @param {RegExpMatchArray} match
|
|
21117
21151
|
* @param {CallbackResponse} response
|
|
21118
21152
|
*/
|
|
21119
|
-
isTrulyOpeningTag: (
|
|
21120
|
-
const w =
|
|
21153
|
+
isTrulyOpeningTag: (q, K) => {
|
|
21154
|
+
const w = q[0].length + q.index, Q = q.input[w];
|
|
21121
21155
|
if (
|
|
21122
21156
|
// HTML should not include another raw `<` inside a tag
|
|
21123
21157
|
// nested type?
|
|
@@ -21129,9 +21163,9 @@ function Vv(e) {
|
|
|
21129
21163
|
K.ignoreMatch();
|
|
21130
21164
|
return;
|
|
21131
21165
|
}
|
|
21132
|
-
Q === ">" && (n(
|
|
21166
|
+
Q === ">" && (n(q, { after: w }) || K.ignoreMatch());
|
|
21133
21167
|
let ae;
|
|
21134
|
-
const v =
|
|
21168
|
+
const v = q.input.substring(w);
|
|
21135
21169
|
if (ae = v.match(/^\s*=/)) {
|
|
21136
21170
|
K.ignoreMatch();
|
|
21137
21171
|
return;
|
|
@@ -21394,8 +21428,8 @@ function Vv(e) {
|
|
|
21394
21428
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
21395
21429
|
className: "variable.constant"
|
|
21396
21430
|
};
|
|
21397
|
-
function B(
|
|
21398
|
-
return t.concat("(?!",
|
|
21431
|
+
function B(q) {
|
|
21432
|
+
return t.concat("(?!", q.join("|"), ")");
|
|
21399
21433
|
}
|
|
21400
21434
|
const re = {
|
|
21401
21435
|
match: t.concat(
|
|
@@ -21404,7 +21438,7 @@ function Vv(e) {
|
|
|
21404
21438
|
...pp,
|
|
21405
21439
|
"super",
|
|
21406
21440
|
"import"
|
|
21407
|
-
].map((
|
|
21441
|
+
].map((q) => `${q}\\s*\\(`)),
|
|
21408
21442
|
r,
|
|
21409
21443
|
t.lookahead(/\s*\(/)
|
|
21410
21444
|
),
|
|
@@ -21437,7 +21471,7 @@ function Vv(e) {
|
|
|
21437
21471
|
},
|
|
21438
21472
|
k
|
|
21439
21473
|
]
|
|
21440
|
-
}, I = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>",
|
|
21474
|
+
}, I = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", U = {
|
|
21441
21475
|
match: [
|
|
21442
21476
|
/const|var|let/,
|
|
21443
21477
|
/\s+/,
|
|
@@ -21487,7 +21521,7 @@ function Vv(e) {
|
|
|
21487
21521
|
match: r + t.lookahead(":"),
|
|
21488
21522
|
relevance: 0
|
|
21489
21523
|
},
|
|
21490
|
-
|
|
21524
|
+
U,
|
|
21491
21525
|
{
|
|
21492
21526
|
// "value" container
|
|
21493
21527
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
@@ -23035,28 +23069,28 @@ const Sa = yp, nd = Mn, rd = Symbol("nomatch"), Kk = 7, Tp = function(e) {
|
|
|
23035
23069
|
return a.noHighlightRe.test(I);
|
|
23036
23070
|
}
|
|
23037
23071
|
function c(I) {
|
|
23038
|
-
let
|
|
23039
|
-
|
|
23040
|
-
const
|
|
23041
|
-
if (
|
|
23042
|
-
const K = $(
|
|
23043
|
-
return K || (td(s.replace("{}",
|
|
23072
|
+
let U = I.className + " ";
|
|
23073
|
+
U += I.parentNode ? I.parentNode.className : "";
|
|
23074
|
+
const q = a.languageDetectRe.exec(U);
|
|
23075
|
+
if (q) {
|
|
23076
|
+
const K = $(q[1]);
|
|
23077
|
+
return K || (td(s.replace("{}", q[1])), td("Falling back to no-highlight mode for this block.", I)), K ? q[1] : "no-highlight";
|
|
23044
23078
|
}
|
|
23045
|
-
return
|
|
23079
|
+
return U.split(/\s+/).find((K) => l(K) || $(K));
|
|
23046
23080
|
}
|
|
23047
|
-
function u(I,
|
|
23081
|
+
function u(I, U, q) {
|
|
23048
23082
|
let K = "", w = "";
|
|
23049
|
-
typeof
|
|
23050
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K =
|
|
23083
|
+
typeof U == "object" ? (K = I, q = U.ignoreIllegals, w = U.language) : (Er("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Er("10.7.0", `Please use highlight(code, options) instead.
|
|
23084
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = U), q === void 0 && (q = !0);
|
|
23051
23085
|
const Q = {
|
|
23052
23086
|
code: K,
|
|
23053
23087
|
language: w
|
|
23054
23088
|
};
|
|
23055
23089
|
X("before:highlight", Q);
|
|
23056
|
-
const ae = Q.result ? Q.result : d(Q.language, Q.code,
|
|
23090
|
+
const ae = Q.result ? Q.result : d(Q.language, Q.code, q);
|
|
23057
23091
|
return ae.code = Q.code, X("after:highlight", ae), ae;
|
|
23058
23092
|
}
|
|
23059
|
-
function d(I,
|
|
23093
|
+
function d(I, U, q, K) {
|
|
23060
23094
|
const w = /* @__PURE__ */ Object.create(null);
|
|
23061
23095
|
function Q(S, R) {
|
|
23062
23096
|
return S.keywords[R];
|
|
@@ -23148,7 +23182,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23148
23182
|
return H.skip ? be += R : (H.excludeBegin && (be += R), he(), !H.returnBegin && !H.excludeBegin && (be = R)), ct(H, S), H.returnBegin ? 0 : R.length;
|
|
23149
23183
|
}
|
|
23150
23184
|
function ut(S) {
|
|
23151
|
-
const R = S[0], H =
|
|
23185
|
+
const R = S[0], H = U.substring(S.index), W = Ae(ie, S, H);
|
|
23152
23186
|
if (!W)
|
|
23153
23187
|
return rd;
|
|
23154
23188
|
const te = ie;
|
|
@@ -23170,7 +23204,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23170
23204
|
if (be += S, H == null)
|
|
23171
23205
|
return he(), 0;
|
|
23172
23206
|
if (Et.type === "begin" && R.type === "end" && Et.index === R.index && H === "") {
|
|
23173
|
-
if (be +=
|
|
23207
|
+
if (be += U.slice(R.index, R.index + 1), !i) {
|
|
23174
23208
|
const W = new Error(`0 width match regex (${I})`);
|
|
23175
23209
|
throw W.languageName = I, W.badRule = Et.rule, W;
|
|
23176
23210
|
}
|
|
@@ -23178,7 +23212,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23178
23212
|
}
|
|
23179
23213
|
if (Et = R, R.type === "begin")
|
|
23180
23214
|
return nt(R);
|
|
23181
|
-
if (R.type === "illegal" && !
|
|
23215
|
+
if (R.type === "illegal" && !q) {
|
|
23182
23216
|
const W = new Error('Illegal lexeme "' + H + '" for mode "' + (ie.scope || "<unnamed>") + '"');
|
|
23183
23217
|
throw W.mode = ie, W;
|
|
23184
23218
|
} else if (R.type === "end") {
|
|
@@ -23203,16 +23237,16 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23203
23237
|
let be = "", Ft = 0, dt = 0, Ke = 0, At = !1;
|
|
23204
23238
|
try {
|
|
23205
23239
|
if (Le.__emitTokens)
|
|
23206
|
-
Le.__emitTokens(
|
|
23240
|
+
Le.__emitTokens(U, ke);
|
|
23207
23241
|
else {
|
|
23208
23242
|
for (ie.matcher.considerAll(); ; ) {
|
|
23209
23243
|
Ke++, At ? At = !1 : ie.matcher.considerAll(), ie.matcher.lastIndex = dt;
|
|
23210
|
-
const S = ie.matcher.exec(
|
|
23244
|
+
const S = ie.matcher.exec(U);
|
|
23211
23245
|
if (!S) break;
|
|
23212
|
-
const R =
|
|
23246
|
+
const R = U.substring(dt, S.index), H = Nt(R, S);
|
|
23213
23247
|
dt = S.index + H;
|
|
23214
23248
|
}
|
|
23215
|
-
Nt(
|
|
23249
|
+
Nt(U.substring(dt));
|
|
23216
23250
|
}
|
|
23217
23251
|
return ke.finalize(), Ge = ke.toHTML(), {
|
|
23218
23252
|
language: I,
|
|
@@ -23226,13 +23260,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23226
23260
|
if (S.message && S.message.includes("Illegal"))
|
|
23227
23261
|
return {
|
|
23228
23262
|
language: I,
|
|
23229
|
-
value: Sa(
|
|
23263
|
+
value: Sa(U),
|
|
23230
23264
|
illegal: !0,
|
|
23231
23265
|
relevance: 0,
|
|
23232
23266
|
_illegalBy: {
|
|
23233
23267
|
message: S.message,
|
|
23234
23268
|
index: dt,
|
|
23235
|
-
context:
|
|
23269
|
+
context: U.slice(dt - 100, dt + 100),
|
|
23236
23270
|
mode: S.mode,
|
|
23237
23271
|
resultSoFar: Ge
|
|
23238
23272
|
},
|
|
@@ -23241,7 +23275,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23241
23275
|
if (i)
|
|
23242
23276
|
return {
|
|
23243
23277
|
language: I,
|
|
23244
|
-
value: Sa(
|
|
23278
|
+
value: Sa(U),
|
|
23245
23279
|
illegal: !1,
|
|
23246
23280
|
relevance: 0,
|
|
23247
23281
|
errorRaised: S,
|
|
@@ -23252,21 +23286,21 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23252
23286
|
}
|
|
23253
23287
|
}
|
|
23254
23288
|
function h(I) {
|
|
23255
|
-
const
|
|
23289
|
+
const U = {
|
|
23256
23290
|
value: Sa(I),
|
|
23257
23291
|
illegal: !1,
|
|
23258
23292
|
relevance: 0,
|
|
23259
23293
|
_top: o,
|
|
23260
23294
|
_emitter: new a.__emitter(a)
|
|
23261
23295
|
};
|
|
23262
|
-
return
|
|
23296
|
+
return U._emitter.addText(I), U;
|
|
23263
23297
|
}
|
|
23264
|
-
function f(I,
|
|
23265
|
-
|
|
23266
|
-
const
|
|
23298
|
+
function f(I, U) {
|
|
23299
|
+
U = U || a.languages || Object.keys(t);
|
|
23300
|
+
const q = h(I), K = U.filter($).filter(O).map(
|
|
23267
23301
|
(he) => d(he, I, !1)
|
|
23268
23302
|
);
|
|
23269
|
-
K.unshift(
|
|
23303
|
+
K.unshift(q);
|
|
23270
23304
|
const w = K.sort((he, se) => {
|
|
23271
23305
|
if (he.relevance !== se.relevance) return se.relevance - he.relevance;
|
|
23272
23306
|
if (he.language && se.language) {
|
|
@@ -23279,17 +23313,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23279
23313
|
}), [Q, ae] = w, v = Q;
|
|
23280
23314
|
return v.secondBest = ae, v;
|
|
23281
23315
|
}
|
|
23282
|
-
function p(I,
|
|
23283
|
-
const K =
|
|
23316
|
+
function p(I, U, q) {
|
|
23317
|
+
const K = U && n[U] || q;
|
|
23284
23318
|
I.classList.add("hljs"), I.classList.add(`language-${K}`);
|
|
23285
23319
|
}
|
|
23286
23320
|
function m(I) {
|
|
23287
|
-
let
|
|
23288
|
-
const
|
|
23289
|
-
if (l(
|
|
23321
|
+
let U = null;
|
|
23322
|
+
const q = c(I);
|
|
23323
|
+
if (l(q)) return;
|
|
23290
23324
|
if (X(
|
|
23291
23325
|
"before:highlightElement",
|
|
23292
|
-
{ el: I, language:
|
|
23326
|
+
{ el: I, language: q }
|
|
23293
23327
|
), I.dataset.highlighted) {
|
|
23294
23328
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", I);
|
|
23295
23329
|
return;
|
|
@@ -23299,9 +23333,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23299
23333
|
"One of your code blocks includes unescaped HTML.",
|
|
23300
23334
|
I.innerHTML
|
|
23301
23335
|
);
|
|
23302
|
-
|
|
23303
|
-
const K =
|
|
23304
|
-
I.innerHTML = w.value, I.dataset.highlighted = "yes", p(I,
|
|
23336
|
+
U = I;
|
|
23337
|
+
const K = U.textContent, w = q ? u(K, { language: q, ignoreIllegals: !0 }) : f(K);
|
|
23338
|
+
I.innerHTML = w.value, I.dataset.highlighted = "yes", p(I, q, w.language), I.result = {
|
|
23305
23339
|
language: w.language,
|
|
23306
23340
|
// TODO: remove with version 11.0
|
|
23307
23341
|
re: w.relevance,
|
|
@@ -23331,23 +23365,23 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23331
23365
|
}
|
|
23332
23366
|
document.querySelectorAll(a.cssSelector).forEach(m);
|
|
23333
23367
|
}
|
|
23334
|
-
function C(I,
|
|
23335
|
-
let
|
|
23368
|
+
function C(I, U) {
|
|
23369
|
+
let q = null;
|
|
23336
23370
|
try {
|
|
23337
|
-
|
|
23371
|
+
q = U(e);
|
|
23338
23372
|
} catch (K) {
|
|
23339
23373
|
if (Zn("Language definition for '{}' could not be registered.".replace("{}", I)), i)
|
|
23340
23374
|
Zn(K);
|
|
23341
23375
|
else
|
|
23342
23376
|
throw K;
|
|
23343
|
-
|
|
23377
|
+
q = o;
|
|
23344
23378
|
}
|
|
23345
|
-
|
|
23379
|
+
q.name || (q.name = I), t[I] = q, q.rawDefinition = U.bind(null, e), q.aliases && G(q.aliases, { languageName: I });
|
|
23346
23380
|
}
|
|
23347
23381
|
function k(I) {
|
|
23348
23382
|
delete t[I];
|
|
23349
|
-
for (const
|
|
23350
|
-
n[
|
|
23383
|
+
for (const U of Object.keys(n))
|
|
23384
|
+
n[U] === I && delete n[U];
|
|
23351
23385
|
}
|
|
23352
23386
|
function P() {
|
|
23353
23387
|
return Object.keys(t);
|
|
@@ -23355,23 +23389,23 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23355
23389
|
function $(I) {
|
|
23356
23390
|
return I = (I || "").toLowerCase(), t[I] || t[n[I]];
|
|
23357
23391
|
}
|
|
23358
|
-
function G(I, { languageName:
|
|
23359
|
-
typeof I == "string" && (I = [I]), I.forEach((
|
|
23360
|
-
n[
|
|
23392
|
+
function G(I, { languageName: U }) {
|
|
23393
|
+
typeof I == "string" && (I = [I]), I.forEach((q) => {
|
|
23394
|
+
n[q.toLowerCase()] = U;
|
|
23361
23395
|
});
|
|
23362
23396
|
}
|
|
23363
23397
|
function O(I) {
|
|
23364
|
-
const
|
|
23365
|
-
return
|
|
23398
|
+
const U = $(I);
|
|
23399
|
+
return U && !U.disableAutodetect;
|
|
23366
23400
|
}
|
|
23367
23401
|
function j(I) {
|
|
23368
|
-
I["before:highlightBlock"] && !I["before:highlightElement"] && (I["before:highlightElement"] = (
|
|
23402
|
+
I["before:highlightBlock"] && !I["before:highlightElement"] && (I["before:highlightElement"] = (U) => {
|
|
23369
23403
|
I["before:highlightBlock"](
|
|
23370
|
-
Object.assign({ block:
|
|
23404
|
+
Object.assign({ block: U.el }, U)
|
|
23371
23405
|
);
|
|
23372
|
-
}), I["after:highlightBlock"] && !I["after:highlightElement"] && (I["after:highlightElement"] = (
|
|
23406
|
+
}), I["after:highlightBlock"] && !I["after:highlightElement"] && (I["after:highlightElement"] = (U) => {
|
|
23373
23407
|
I["after:highlightBlock"](
|
|
23374
|
-
Object.assign({ block:
|
|
23408
|
+
Object.assign({ block: U.el }, U)
|
|
23375
23409
|
);
|
|
23376
23410
|
});
|
|
23377
23411
|
}
|
|
@@ -23379,13 +23413,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), w = I, K = q), F ===
|
|
|
23379
23413
|
j(I), r.push(I);
|
|
23380
23414
|
}
|
|
23381
23415
|
function re(I) {
|
|
23382
|
-
const
|
|
23383
|
-
|
|
23416
|
+
const U = r.indexOf(I);
|
|
23417
|
+
U !== -1 && r.splice(U, 1);
|
|
23384
23418
|
}
|
|
23385
|
-
function X(I,
|
|
23386
|
-
const
|
|
23419
|
+
function X(I, U) {
|
|
23420
|
+
const q = I;
|
|
23387
23421
|
r.forEach(function(K) {
|
|
23388
|
-
K[
|
|
23422
|
+
K[q] && K[q](U);
|
|
23389
23423
|
});
|
|
23390
23424
|
}
|
|
23391
23425
|
function Y(I) {
|
|
@@ -23821,9 +23855,9 @@ function iM({
|
|
|
23821
23855
|
onEdit: n,
|
|
23822
23856
|
showActions: r = !1
|
|
23823
23857
|
}) {
|
|
23824
|
-
return /* @__PURE__ */
|
|
23825
|
-
(t || r && n) && /* @__PURE__ */
|
|
23826
|
-
t && /* @__PURE__ */
|
|
23858
|
+
return /* @__PURE__ */ F("div", { className: "mx-auto max-w-4xl", children: [
|
|
23859
|
+
(t || r && n) && /* @__PURE__ */ F("div", { className: "mb-6 flex items-center justify-between", children: [
|
|
23860
|
+
t && /* @__PURE__ */ F(
|
|
23827
23861
|
"button",
|
|
23828
23862
|
{
|
|
23829
23863
|
onClick: t,
|
|
@@ -23851,7 +23885,7 @@ function iM({
|
|
|
23851
23885
|
]
|
|
23852
23886
|
}
|
|
23853
23887
|
),
|
|
23854
|
-
r && n && /* @__PURE__ */
|
|
23888
|
+
r && n && /* @__PURE__ */ F(
|
|
23855
23889
|
"button",
|
|
23856
23890
|
{
|
|
23857
23891
|
onClick: () => n(e),
|
|
@@ -23880,11 +23914,11 @@ function iM({
|
|
|
23880
23914
|
}
|
|
23881
23915
|
)
|
|
23882
23916
|
] }),
|
|
23883
|
-
/* @__PURE__ */
|
|
23884
|
-
/* @__PURE__ */
|
|
23917
|
+
/* @__PURE__ */ F("article", { className: "rounded-lg bg-white p-8 shadow-md", children: [
|
|
23918
|
+
/* @__PURE__ */ F("header", { className: "border-b border-gray-200 pb-6", children: [
|
|
23885
23919
|
/* @__PURE__ */ A("h1", { className: "text-4xl font-bold text-gray-900", children: e.title }),
|
|
23886
|
-
/* @__PURE__ */
|
|
23887
|
-
e.dateAt && /* @__PURE__ */
|
|
23920
|
+
/* @__PURE__ */ F("div", { className: "mt-6 flex flex-wrap items-center gap-4 text-sm text-gray-500", children: [
|
|
23921
|
+
e.dateAt && /* @__PURE__ */ F("span", { className: "flex items-center gap-2", children: [
|
|
23888
23922
|
/* @__PURE__ */ A(
|
|
23889
23923
|
"svg",
|
|
23890
23924
|
{
|
|
@@ -23918,7 +23952,7 @@ function iM({
|
|
|
23918
23952
|
}
|
|
23919
23953
|
)
|
|
23920
23954
|
] }),
|
|
23921
|
-
e.tags && e.tags.length > 0 && /* @__PURE__ */ A("div", { className: "mt-4 flex flex-wrap gap-2", children: e.tags.map((i) => /* @__PURE__ */
|
|
23955
|
+
e.tags && e.tags.length > 0 && /* @__PURE__ */ A("div", { className: "mt-4 flex flex-wrap gap-2", children: e.tags.map((i) => /* @__PURE__ */ F(
|
|
23922
23956
|
"span",
|
|
23923
23957
|
{
|
|
23924
23958
|
className: "rounded-md bg-gray-100 px-3 py-1 text-sm text-gray-700",
|
|
@@ -25997,7 +26031,7 @@ go.EQUAL = Fe;
|
|
|
25997
26031
|
var eO = go, Gs = { exports: {} };
|
|
25998
26032
|
Gs.exports;
|
|
25999
26033
|
(function(e, t) {
|
|
26000
|
-
var n = 200, r = "__lodash_hash_undefined__", i = 9007199254740991, s = "[object Arguments]", o = "[object Array]", a = "[object Boolean]", l = "[object Date]", c = "[object Error]", u = "[object Function]", d = "[object GeneratorFunction]", h = "[object Map]", f = "[object Number]", p = "[object Object]", m = "[object Promise]", b = "[object RegExp]", y = "[object Set]", x = "[object String]", _ = "[object Symbol]", T = "[object WeakMap]", C = "[object ArrayBuffer]", k = "[object DataView]", P = "[object Float32Array]", $ = "[object Float64Array]", G = "[object Int8Array]", O = "[object Int16Array]", j = "[object Int32Array]", B = "[object Uint8Array]", re = "[object Uint8ClampedArray]", X = "[object Uint16Array]", Y = "[object Uint32Array]", I = /[\\^$.*+?()[\]{}|]/g,
|
|
26034
|
+
var n = 200, r = "__lodash_hash_undefined__", i = 9007199254740991, s = "[object Arguments]", o = "[object Array]", a = "[object Boolean]", l = "[object Date]", c = "[object Error]", u = "[object Function]", d = "[object GeneratorFunction]", h = "[object Map]", f = "[object Number]", p = "[object Object]", m = "[object Promise]", b = "[object RegExp]", y = "[object Set]", x = "[object String]", _ = "[object Symbol]", T = "[object WeakMap]", C = "[object ArrayBuffer]", k = "[object DataView]", P = "[object Float32Array]", $ = "[object Float64Array]", G = "[object Int8Array]", O = "[object Int16Array]", j = "[object Int32Array]", B = "[object Uint8Array]", re = "[object Uint8ClampedArray]", X = "[object Uint16Array]", Y = "[object Uint32Array]", I = /[\\^$.*+?()[\]{}|]/g, U = /\w*$/, q = /^\[object .+?Constructor\]$/, K = /^(?:0|[1-9]\d*)$/, w = {};
|
|
26001
26035
|
w[s] = w[o] = w[C] = w[k] = w[a] = w[l] = w[P] = w[$] = w[G] = w[O] = w[j] = w[h] = w[f] = w[p] = w[b] = w[y] = w[x] = w[_] = w[B] = w[re] = w[X] = w[Y] = !0, w[c] = w[u] = w[T] = !1;
|
|
26002
26036
|
var Q = typeof Mt == "object" && Mt && Mt.Object === Object && Mt, ae = typeof self == "object" && self && self.Object === Object && self, v = Q || ae || Function("return this")(), he = t && !t.nodeType && t, se = he && !0 && e && !e.nodeType && e, _e = se && se.exports === he;
|
|
26003
26037
|
function ct(g, E) {
|
|
@@ -26240,7 +26274,7 @@ Gs.exports;
|
|
|
26240
26274
|
function Vo(g) {
|
|
26241
26275
|
if (!nn(g) || oa(g))
|
|
26242
26276
|
return !1;
|
|
26243
|
-
var E = si(g) || Nt(g) ? S :
|
|
26277
|
+
var E = si(g) || Nt(g) ? S : q;
|
|
26244
26278
|
return E.test(it(g));
|
|
26245
26279
|
}
|
|
26246
26280
|
function Yo(g) {
|
|
@@ -26270,7 +26304,7 @@ Gs.exports;
|
|
|
26270
26304
|
return ut(M, ct, new g.constructor());
|
|
26271
26305
|
}
|
|
26272
26306
|
function Ji(g) {
|
|
26273
|
-
var E = new g.constructor(g.source,
|
|
26307
|
+
var E = new g.constructor(g.source, U.exec(g));
|
|
26274
26308
|
return E.lastIndex = g.lastIndex, E;
|
|
26275
26309
|
}
|
|
26276
26310
|
function Zo(g, E, N) {
|
|
@@ -26442,8 +26476,8 @@ Gs.exports;
|
|
|
26442
26476
|
var fg = Gs.exports, Ks = { exports: {} };
|
|
26443
26477
|
Ks.exports;
|
|
26444
26478
|
(function(e, t) {
|
|
26445
|
-
var n = 200, r = "__lodash_hash_undefined__", i = 1, s = 2, o = 9007199254740991, a = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", u = "[object Boolean]", d = "[object Date]", h = "[object Error]", f = "[object Function]", p = "[object GeneratorFunction]", m = "[object Map]", b = "[object Number]", y = "[object Null]", x = "[object Object]", _ = "[object Promise]", T = "[object Proxy]", C = "[object RegExp]", k = "[object Set]", P = "[object String]", $ = "[object Symbol]", G = "[object Undefined]", O = "[object WeakMap]", j = "[object ArrayBuffer]", B = "[object DataView]", re = "[object Float32Array]", X = "[object Float64Array]", Y = "[object Int8Array]", I = "[object Int16Array]",
|
|
26446
|
-
se[re] = se[X] = se[Y] = se[I] = se[
|
|
26479
|
+
var n = 200, r = "__lodash_hash_undefined__", i = 1, s = 2, o = 9007199254740991, a = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", u = "[object Boolean]", d = "[object Date]", h = "[object Error]", f = "[object Function]", p = "[object GeneratorFunction]", m = "[object Map]", b = "[object Number]", y = "[object Null]", x = "[object Object]", _ = "[object Promise]", T = "[object Proxy]", C = "[object RegExp]", k = "[object Set]", P = "[object String]", $ = "[object Symbol]", G = "[object Undefined]", O = "[object WeakMap]", j = "[object ArrayBuffer]", B = "[object DataView]", re = "[object Float32Array]", X = "[object Float64Array]", Y = "[object Int8Array]", I = "[object Int16Array]", U = "[object Int32Array]", q = "[object Uint8Array]", K = "[object Uint8ClampedArray]", w = "[object Uint16Array]", Q = "[object Uint32Array]", ae = /[\\^$.*+?()[\]{}|]/g, v = /^\[object .+?Constructor\]$/, he = /^(?:0|[1-9]\d*)$/, se = {};
|
|
26480
|
+
se[re] = se[X] = se[Y] = se[I] = se[U] = se[q] = se[K] = se[w] = se[Q] = !0, se[a] = se[l] = se[j] = se[u] = se[B] = se[d] = se[h] = se[f] = se[m] = se[b] = se[x] = se[C] = se[k] = se[P] = se[O] = !1;
|
|
26447
26481
|
var _e = typeof Mt == "object" && Mt && Mt.Object === Object && Mt, ct = typeof self == "object" && self && self.Object === Object && self, Ae = _e || ct || Function("return this")(), tt = t && !t.nodeType && t, nt = tt && !0 && e && !e.nodeType && e, ut = nt && nt.exports === tt, Pt = ut && _e.process, Et = function() {
|
|
26448
26482
|
try {
|
|
26449
26483
|
return Pt && Pt.binding && Pt.binding("util");
|
|
@@ -31710,7 +31744,7 @@ function aR({
|
|
|
31710
31744
|
],
|
|
31711
31745
|
[]
|
|
31712
31746
|
);
|
|
31713
|
-
return /* @__PURE__ */
|
|
31747
|
+
return /* @__PURE__ */ F("div", { className: `quill-editor-wrapper rounded-md border ${r ? "border-red-300 dark:border-red-600" : "border-gray-300 dark:border-gray-600"}`, children: [
|
|
31714
31748
|
/* @__PURE__ */ A("style", { children: `
|
|
31715
31749
|
/* Dark mode styles for Quill editor */
|
|
31716
31750
|
.dark .quill-editor-wrapper .ql-toolbar {
|
|
@@ -33066,7 +33100,7 @@ const om = (e) => {
|
|
|
33066
33100
|
}
|
|
33067
33101
|
}
|
|
33068
33102
|
L.isString(G) || (G = G ? "include" : "omit");
|
|
33069
|
-
const I = s && "credentials" in n.prototype,
|
|
33103
|
+
const I = s && "credentials" in n.prototype, U = {
|
|
33070
33104
|
...O,
|
|
33071
33105
|
signal: B,
|
|
33072
33106
|
method: b.toUpperCase(),
|
|
@@ -33075,33 +33109,33 @@ const om = (e) => {
|
|
|
33075
33109
|
duplex: "half",
|
|
33076
33110
|
credentials: I ? G : void 0
|
|
33077
33111
|
};
|
|
33078
|
-
re = s && new n(m,
|
|
33079
|
-
let
|
|
33112
|
+
re = s && new n(m, U);
|
|
33113
|
+
let q = await (s ? j(re, O) : j(m, U));
|
|
33080
33114
|
const K = u && (P === "stream" || P === "response");
|
|
33081
33115
|
if (u && (C || K && X)) {
|
|
33082
33116
|
const Q = {};
|
|
33083
33117
|
["status", "statusText", "headers"].forEach((se) => {
|
|
33084
|
-
Q[se] =
|
|
33118
|
+
Q[se] = q[se];
|
|
33085
33119
|
});
|
|
33086
|
-
const ae = L.toFiniteNumber(
|
|
33120
|
+
const ae = L.toFiniteNumber(q.headers.get("content-length")), [v, he] = C && pf(
|
|
33087
33121
|
ae,
|
|
33088
33122
|
Ws(gf(C), !0)
|
|
33089
33123
|
) || [];
|
|
33090
|
-
|
|
33091
|
-
bf(
|
|
33124
|
+
q = new r(
|
|
33125
|
+
bf(q.body, yf, v, () => {
|
|
33092
33126
|
he && he(), X && X();
|
|
33093
33127
|
}),
|
|
33094
33128
|
Q
|
|
33095
33129
|
);
|
|
33096
33130
|
}
|
|
33097
33131
|
P = P || "text";
|
|
33098
|
-
let w = await d[L.findKey(d, P) || "text"](
|
|
33132
|
+
let w = await d[L.findKey(d, P) || "text"](q, p);
|
|
33099
33133
|
return !K && X && X(), await new Promise((Q, ae) => {
|
|
33100
33134
|
im(Q, ae, {
|
|
33101
33135
|
data: w,
|
|
33102
|
-
headers: bt.from(
|
|
33103
|
-
status:
|
|
33104
|
-
statusText:
|
|
33136
|
+
headers: bt.from(q.headers),
|
|
33137
|
+
status: q.status,
|
|
33138
|
+
statusText: q.statusText,
|
|
33105
33139
|
config: p,
|
|
33106
33140
|
request: re
|
|
33107
33141
|
});
|
|
@@ -33895,8 +33929,8 @@ function IM({
|
|
|
33895
33929
|
}) {
|
|
33896
33930
|
const { articleApi: s } = Vi(), [o, a] = ge(""), [l, c] = ge(""), [u, d] = ge(""), [h, f] = ge(""), [p, m] = ge(!1), [b, y] = ge(He.Draft), [x, _] = ge(null), [T, C] = ge(""), [k, P] = ge(""), [$, G] = ge(""), [O, j] = ge({});
|
|
33897
33931
|
Ys(() => {
|
|
33898
|
-
var I,
|
|
33899
|
-
e && (a(e.title), c(e.content), d(e.imageName || ""), console.log("imageName:", e.imageName), e.imageName && f(e.imageName), y(e.status), _(e.categoryId || null), C(e.dateAt ? new Date(e.dateAt).toISOString().slice(0, 16) : ""), P(((I = e.tags) == null ? void 0 : I.map((
|
|
33932
|
+
var I, U;
|
|
33933
|
+
e && (a(e.title), c(e.content), d(e.imageName || ""), console.log("imageName:", e.imageName), e.imageName && f(e.imageName), y(e.status), _(e.categoryId || null), C(e.dateAt ? new Date(e.dateAt).toISOString().slice(0, 16) : ""), P(((I = e.tags) == null ? void 0 : I.map((q) => q.title).join(", ")) || ""), G(((U = e.roles) == null ? void 0 : U.map((q) => q.slug).join(", ")) || ""));
|
|
33900
33934
|
}, [e]);
|
|
33901
33935
|
const B = () => {
|
|
33902
33936
|
const I = {};
|
|
@@ -33904,7 +33938,7 @@ function IM({
|
|
|
33904
33938
|
}, re = async (I) => {
|
|
33905
33939
|
if (I.preventDefault(), !B())
|
|
33906
33940
|
return;
|
|
33907
|
-
const
|
|
33941
|
+
const U = $.split(",").map((K) => K.trim()).filter((K) => K.length > 0), q = {
|
|
33908
33942
|
title: o.trim(),
|
|
33909
33943
|
content: l.trim(),
|
|
33910
33944
|
imageName: u || void 0,
|
|
@@ -33912,29 +33946,29 @@ function IM({
|
|
|
33912
33946
|
categoryId: x || void 0,
|
|
33913
33947
|
dateAt: T || void 0,
|
|
33914
33948
|
tagList: k.trim() || void 0,
|
|
33915
|
-
roleIds:
|
|
33949
|
+
roleIds: U.length > 0 ? U : void 0
|
|
33916
33950
|
};
|
|
33917
|
-
e ? await n({ articleId: e.articleId, ...
|
|
33951
|
+
e ? await n({ articleId: e.articleId, ...q }) : await n(q);
|
|
33918
33952
|
}, X = async (I) => {
|
|
33919
33953
|
var K;
|
|
33920
|
-
const
|
|
33921
|
-
if (!
|
|
33922
|
-
if (!
|
|
33954
|
+
const U = (K = I.target.files) == null ? void 0 : K[0];
|
|
33955
|
+
if (!U) return;
|
|
33956
|
+
if (!U.type.startsWith("image/")) {
|
|
33923
33957
|
j({ ...O, image: "Please select an image file" });
|
|
33924
33958
|
return;
|
|
33925
33959
|
}
|
|
33926
|
-
if (
|
|
33960
|
+
if (U.size > 5 * 1024 * 1024) {
|
|
33927
33961
|
j({ ...O, image: "Image size must be less than 5MB" });
|
|
33928
33962
|
return;
|
|
33929
33963
|
}
|
|
33930
33964
|
j({ ...O, image: "" });
|
|
33931
|
-
const
|
|
33932
|
-
|
|
33933
|
-
f(
|
|
33934
|
-
},
|
|
33965
|
+
const q = new FileReader();
|
|
33966
|
+
q.onloadend = () => {
|
|
33967
|
+
f(q.result);
|
|
33968
|
+
}, q.readAsDataURL(U);
|
|
33935
33969
|
try {
|
|
33936
33970
|
m(!0);
|
|
33937
|
-
const w = await s.uploadImage(
|
|
33971
|
+
const w = await s.uploadImage(U);
|
|
33938
33972
|
d(w), j({ ...O, image: "" });
|
|
33939
33973
|
} catch (w) {
|
|
33940
33974
|
console.error("Error uploading image:", w), j({ ...O, image: "Failed to upload image. Please try again." });
|
|
@@ -33944,10 +33978,10 @@ function IM({
|
|
|
33944
33978
|
}, Y = () => {
|
|
33945
33979
|
f(""), d("");
|
|
33946
33980
|
};
|
|
33947
|
-
return /* @__PURE__ */
|
|
33948
|
-
/* @__PURE__ */
|
|
33949
|
-
/* @__PURE__ */
|
|
33950
|
-
/* @__PURE__ */
|
|
33981
|
+
return /* @__PURE__ */ F("form", { onSubmit: re, className: "space-y-6", children: [
|
|
33982
|
+
/* @__PURE__ */ F("div", { className: "grid grid-cols-3 gap-4", children: [
|
|
33983
|
+
/* @__PURE__ */ F("div", { className: "col-span-2 p-4", children: [
|
|
33984
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
33951
33985
|
/* @__PURE__ */ A("label", { htmlFor: "title", className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Title *" }),
|
|
33952
33986
|
/* @__PURE__ */ A(
|
|
33953
33987
|
"input",
|
|
@@ -33962,7 +33996,7 @@ function IM({
|
|
|
33962
33996
|
),
|
|
33963
33997
|
O.title && /* @__PURE__ */ A("p", { className: "text-sm text-red-600 dark:text-red-400", children: O.title })
|
|
33964
33998
|
] }),
|
|
33965
|
-
/* @__PURE__ */
|
|
33999
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
33966
34000
|
/* @__PURE__ */ A("label", { htmlFor: "dateAt", className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Publication Date" }),
|
|
33967
34001
|
/* @__PURE__ */ A(
|
|
33968
34002
|
"input",
|
|
@@ -33975,9 +34009,9 @@ function IM({
|
|
|
33975
34009
|
}
|
|
33976
34010
|
)
|
|
33977
34011
|
] }),
|
|
33978
|
-
/* @__PURE__ */
|
|
34012
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
33979
34013
|
/* @__PURE__ */ A("label", { htmlFor: "category", className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Category" }),
|
|
33980
|
-
/* @__PURE__ */
|
|
34014
|
+
/* @__PURE__ */ F(
|
|
33981
34015
|
"select",
|
|
33982
34016
|
{
|
|
33983
34017
|
id: "category",
|
|
@@ -33991,9 +34025,9 @@ function IM({
|
|
|
33991
34025
|
}
|
|
33992
34026
|
)
|
|
33993
34027
|
] }),
|
|
33994
|
-
/* @__PURE__ */
|
|
34028
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
33995
34029
|
/* @__PURE__ */ A("label", { htmlFor: "status", className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Status" }),
|
|
33996
|
-
/* @__PURE__ */
|
|
34030
|
+
/* @__PURE__ */ F(
|
|
33997
34031
|
"select",
|
|
33998
34032
|
{
|
|
33999
34033
|
id: "status",
|
|
@@ -34011,9 +34045,9 @@ function IM({
|
|
|
34011
34045
|
)
|
|
34012
34046
|
] })
|
|
34013
34047
|
] }),
|
|
34014
|
-
/* @__PURE__ */ A("div", { className: "col-span-1", children: /* @__PURE__ */
|
|
34048
|
+
/* @__PURE__ */ A("div", { className: "col-span-1", children: /* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34015
34049
|
/* @__PURE__ */ A("label", { htmlFor: "image", className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Featured Image" }),
|
|
34016
|
-
h ? /* @__PURE__ */
|
|
34050
|
+
h ? /* @__PURE__ */ F("div", { className: "relative", children: [
|
|
34017
34051
|
/* @__PURE__ */ A(
|
|
34018
34052
|
"img",
|
|
34019
34053
|
{
|
|
@@ -34050,7 +34084,7 @@ function IM({
|
|
|
34050
34084
|
/* @__PURE__ */ A("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "JPG, PNG, GIF. Max 5MB" })
|
|
34051
34085
|
] }) })
|
|
34052
34086
|
] }),
|
|
34053
|
-
/* @__PURE__ */
|
|
34087
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34054
34088
|
/* @__PURE__ */ A("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Content *" }),
|
|
34055
34089
|
/* @__PURE__ */ A(
|
|
34056
34090
|
aR,
|
|
@@ -34063,7 +34097,7 @@ function IM({
|
|
|
34063
34097
|
),
|
|
34064
34098
|
O.content && /* @__PURE__ */ A("p", { className: "text-sm text-red-600 dark:text-red-400", children: O.content })
|
|
34065
34099
|
] }),
|
|
34066
|
-
/* @__PURE__ */
|
|
34100
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34067
34101
|
/* @__PURE__ */ A("label", { htmlFor: "tags", className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Tags" }),
|
|
34068
34102
|
/* @__PURE__ */ A(
|
|
34069
34103
|
"input",
|
|
@@ -34078,7 +34112,7 @@ function IM({
|
|
|
34078
34112
|
),
|
|
34079
34113
|
/* @__PURE__ */ A("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Comma-separated list of tags. Tags will be created automatically if they don't exist." })
|
|
34080
34114
|
] }),
|
|
34081
|
-
/* @__PURE__ */
|
|
34115
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34082
34116
|
/* @__PURE__ */ A("label", { htmlFor: "roles", className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Roles" }),
|
|
34083
34117
|
/* @__PURE__ */ A(
|
|
34084
34118
|
"input",
|
|
@@ -34093,7 +34127,7 @@ function IM({
|
|
|
34093
34127
|
),
|
|
34094
34128
|
/* @__PURE__ */ A("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Comma-separated list of role slugs." })
|
|
34095
34129
|
] }),
|
|
34096
|
-
/* @__PURE__ */
|
|
34130
|
+
/* @__PURE__ */ F("div", { className: "mt-6 flex justify-end gap-3", children: [
|
|
34097
34131
|
/* @__PURE__ */ A(
|
|
34098
34132
|
"button",
|
|
34099
34133
|
{
|
|
@@ -34119,9 +34153,9 @@ function IM({
|
|
|
34119
34153
|
function RM({
|
|
34120
34154
|
mode: e,
|
|
34121
34155
|
articleId: t,
|
|
34122
|
-
|
|
34123
|
-
|
|
34124
|
-
|
|
34156
|
+
isOpen: n,
|
|
34157
|
+
onSuccess: r,
|
|
34158
|
+
onClose: i
|
|
34125
34159
|
}) {
|
|
34126
34160
|
const { articleApi: s } = Vi(), [o, a] = ge(""), [l, c] = ge(!1), [u, d] = ge(!1), [h, f] = ge(null), [p, m] = ge(""), b = () => o.trim() ? o.trim().length < 10 ? (f("Prompt must be at least 10 characters long"), !1) : o.length > 2e3 ? (f("Prompt must be less than 2000 characters"), !1) : !0 : (f("Prompt is required"), !1), y = async () => {
|
|
34127
34161
|
if (b()) {
|
|
@@ -34138,7 +34172,7 @@ function RM({
|
|
|
34138
34172
|
};
|
|
34139
34173
|
l && m("Generating content and image with AI... This may take a few moments.");
|
|
34140
34174
|
let k;
|
|
34141
|
-
e === "create" ? k = await s.createArticleWithAI(C) : k = await s.updateArticleWithAI(C), m(""),
|
|
34175
|
+
e === "create" ? k = await s.createArticleWithAI(C) : k = await s.updateArticleWithAI(C), m(""), r(k), a(""), c(!1), i();
|
|
34142
34176
|
} catch (C) {
|
|
34143
34177
|
console.error("Error generating article with AI:", C), f(C.message || "Failed to generate article with AI. Please try again."), m("");
|
|
34144
34178
|
} finally {
|
|
@@ -34146,101 +34180,129 @@ function RM({
|
|
|
34146
34180
|
}
|
|
34147
34181
|
}
|
|
34148
34182
|
}, x = () => {
|
|
34149
|
-
|
|
34183
|
+
u || (a(""), c(!1), f(null), i());
|
|
34150
34184
|
}, _ = e === "create" ? 'Describe the article you want to create (e.g., "Write a comprehensive article about AI trends in 2024, including ChatGPT-4, Gemini, and practical applications in different industries")' : 'Describe the changes you want to make (e.g., "Add a new section about the latest ChatGPT-4 updates launched in January 2024 and improve the introduction to make it more engaging")', T = () => {
|
|
34151
34185
|
const C = "w-full rounded-md border px-4 py-2 bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed", k = h && !o.trim() ? "border-red-300 dark:border-red-600" : "border-gray-300 dark:border-gray-600";
|
|
34152
34186
|
return `${C} ${k}`;
|
|
34153
34187
|
};
|
|
34154
|
-
return /* @__PURE__ */
|
|
34155
|
-
/* @__PURE__ */ A(
|
|
34156
|
-
|
|
34157
|
-
|
|
34158
|
-
|
|
34159
|
-
|
|
34160
|
-
|
|
34161
|
-
|
|
34162
|
-
/* @__PURE__ */
|
|
34163
|
-
/* @__PURE__ */
|
|
34164
|
-
|
|
34165
|
-
|
|
34166
|
-
|
|
34167
|
-
|
|
34168
|
-
|
|
34169
|
-
|
|
34170
|
-
|
|
34171
|
-
|
|
34172
|
-
|
|
34173
|
-
|
|
34174
|
-
|
|
34175
|
-
|
|
34176
|
-
|
|
34177
|
-
|
|
34178
|
-
|
|
34179
|
-
|
|
34180
|
-
|
|
34181
|
-
|
|
34188
|
+
return n ? /* @__PURE__ */ A("div", { className: "fixed inset-0 z-50 overflow-y-auto", "aria-labelledby": "modal-title", role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ F("div", { className: "flex min-h-screen items-center justify-center p-4 text-center sm:p-0", children: [
|
|
34189
|
+
/* @__PURE__ */ A(
|
|
34190
|
+
"div",
|
|
34191
|
+
{
|
|
34192
|
+
className: "fixed inset-0 bg-gray-500 dark:bg-gray-900 bg-opacity-75 dark:bg-opacity-75 transition-opacity",
|
|
34193
|
+
onClick: x
|
|
34194
|
+
}
|
|
34195
|
+
),
|
|
34196
|
+
/* @__PURE__ */ F("div", { className: "relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl", children: [
|
|
34197
|
+
/* @__PURE__ */ F("div", { className: "bg-white dark:bg-gray-800 px-6 pb-4 pt-5", children: [
|
|
34198
|
+
/* @__PURE__ */ F("div", { className: "flex items-start justify-between mb-4", children: [
|
|
34199
|
+
/* @__PURE__ */ F("div", { className: "flex items-start gap-3", children: [
|
|
34200
|
+
/* @__PURE__ */ A("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900", children: /* @__PURE__ */ A("svg", { className: "h-6 w-6 text-blue-600 dark:text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ A("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }) }),
|
|
34201
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34202
|
+
/* @__PURE__ */ A("h3", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", id: "modal-title", children: e === "create" ? "Create Article with AI" : "Update Article with AI" }),
|
|
34203
|
+
/* @__PURE__ */ A("p", { className: "text-sm text-gray-500 dark:text-gray-400 mt-1", children: e === "create" ? "Use AI to generate a complete article with title, content, and tags based on your description." : "Use AI to modify the existing article content based on your instructions." })
|
|
34204
|
+
] })
|
|
34205
|
+
] }),
|
|
34206
|
+
/* @__PURE__ */ F(
|
|
34207
|
+
"button",
|
|
34208
|
+
{
|
|
34209
|
+
type: "button",
|
|
34210
|
+
onClick: x,
|
|
34211
|
+
disabled: u,
|
|
34212
|
+
className: "rounded-md text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 disabled:opacity-50",
|
|
34213
|
+
children: [
|
|
34214
|
+
/* @__PURE__ */ A("span", { className: "sr-only", children: "Close" }),
|
|
34215
|
+
/* @__PURE__ */ A("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ A("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
34216
|
+
]
|
|
34217
|
+
}
|
|
34218
|
+
)
|
|
34182
34219
|
] }),
|
|
34183
|
-
|
|
34184
|
-
|
|
34185
|
-
|
|
34186
|
-
|
|
34187
|
-
|
|
34220
|
+
/* @__PURE__ */ F("div", { className: "space-y-4", children: [
|
|
34221
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34222
|
+
/* @__PURE__ */ A("label", { htmlFor: "prompt", className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: "Description / Instructions *" }),
|
|
34223
|
+
/* @__PURE__ */ A(
|
|
34224
|
+
"textarea",
|
|
34225
|
+
{
|
|
34226
|
+
id: "prompt",
|
|
34227
|
+
value: o,
|
|
34228
|
+
onChange: (C) => a(C.target.value),
|
|
34229
|
+
rows: 6,
|
|
34230
|
+
disabled: u,
|
|
34231
|
+
className: T(),
|
|
34232
|
+
placeholder: _,
|
|
34233
|
+
minLength: 10,
|
|
34234
|
+
maxLength: 2e3
|
|
34235
|
+
}
|
|
34236
|
+
),
|
|
34237
|
+
/* @__PURE__ */ F("div", { className: "flex justify-between items-center", children: [
|
|
34238
|
+
/* @__PURE__ */ F("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
|
|
34239
|
+
o.length,
|
|
34240
|
+
" / 2000 characters (minimum 10)"
|
|
34241
|
+
] }),
|
|
34242
|
+
h && /* @__PURE__ */ A("p", { className: "text-sm text-red-600 dark:text-red-400", children: h })
|
|
34243
|
+
] })
|
|
34244
|
+
] }),
|
|
34245
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34246
|
+
/* @__PURE__ */ F("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
34247
|
+
/* @__PURE__ */ A(
|
|
34248
|
+
"input",
|
|
34249
|
+
{
|
|
34250
|
+
type: "checkbox",
|
|
34251
|
+
checked: l,
|
|
34252
|
+
onChange: (C) => c(C.target.checked),
|
|
34253
|
+
disabled: u,
|
|
34254
|
+
className: "h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
34255
|
+
}
|
|
34256
|
+
),
|
|
34257
|
+
/* @__PURE__ */ A("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: "Generate image with DALL-E 3" })
|
|
34258
|
+
] }),
|
|
34259
|
+
/* @__PURE__ */ A("p", { className: "text-xs text-gray-500 dark:text-gray-400 ml-6", children: "AI will create an illustrative image for the article. This may take a few extra seconds." })
|
|
34260
|
+
] }),
|
|
34261
|
+
u && p && /* @__PURE__ */ A("div", { className: "rounded-lg border border-yellow-200 dark:border-yellow-800 bg-yellow-50 dark:bg-yellow-900/20 p-4", children: /* @__PURE__ */ F("div", { className: "flex items-center gap-3", children: [
|
|
34262
|
+
/* @__PURE__ */ F("svg", { className: "h-5 w-5 text-yellow-600 dark:text-yellow-400 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [
|
|
34263
|
+
/* @__PURE__ */ A("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
34264
|
+
/* @__PURE__ */ A("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
34265
|
+
] }),
|
|
34266
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34267
|
+
/* @__PURE__ */ A("p", { className: "text-sm font-medium text-yellow-900 dark:text-yellow-100", children: p }),
|
|
34268
|
+
/* @__PURE__ */ A("p", { className: "text-xs text-yellow-700 dark:text-yellow-300 mt-1", children: "Please wait..." })
|
|
34269
|
+
] })
|
|
34270
|
+
] }) })
|
|
34271
|
+
] })
|
|
34272
|
+
] }),
|
|
34273
|
+
/* @__PURE__ */ F("div", { className: "bg-gray-50 dark:bg-gray-900 px-6 py-4 flex justify-end gap-3", children: [
|
|
34188
34274
|
/* @__PURE__ */ A(
|
|
34189
|
-
"
|
|
34275
|
+
"button",
|
|
34190
34276
|
{
|
|
34191
|
-
type: "
|
|
34192
|
-
|
|
34193
|
-
onChange: (C) => c(C.target.checked),
|
|
34277
|
+
type: "button",
|
|
34278
|
+
onClick: x,
|
|
34194
34279
|
disabled: u,
|
|
34195
|
-
className: "
|
|
34280
|
+
className: "rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
34281
|
+
children: "Cancel"
|
|
34196
34282
|
}
|
|
34197
34283
|
),
|
|
34198
|
-
/* @__PURE__ */ A(
|
|
34199
|
-
|
|
34200
|
-
|
|
34201
|
-
|
|
34202
|
-
|
|
34203
|
-
|
|
34204
|
-
|
|
34205
|
-
|
|
34206
|
-
|
|
34207
|
-
|
|
34208
|
-
|
|
34209
|
-
|
|
34284
|
+
/* @__PURE__ */ A(
|
|
34285
|
+
"button",
|
|
34286
|
+
{
|
|
34287
|
+
type: "button",
|
|
34288
|
+
onClick: y,
|
|
34289
|
+
disabled: u || o.trim().length < 10,
|
|
34290
|
+
className: "rounded-md bg-gradient-to-r from-blue-600 to-purple-600 px-6 py-2 text-white hover:from-blue-700 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",
|
|
34291
|
+
children: u ? /* @__PURE__ */ F(Wa, { children: [
|
|
34292
|
+
/* @__PURE__ */ F("svg", { className: "h-4 w-4 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [
|
|
34293
|
+
/* @__PURE__ */ A("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
34294
|
+
/* @__PURE__ */ A("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
34295
|
+
] }),
|
|
34296
|
+
/* @__PURE__ */ A("span", { children: "Generating..." })
|
|
34297
|
+
] }) : /* @__PURE__ */ F(Wa, { children: [
|
|
34298
|
+
/* @__PURE__ */ A("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ A("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }),
|
|
34299
|
+
/* @__PURE__ */ A("span", { children: e === "create" ? "Create with AI" : "Update with AI" })
|
|
34300
|
+
] })
|
|
34301
|
+
}
|
|
34302
|
+
)
|
|
34210
34303
|
] })
|
|
34211
|
-
] }) }),
|
|
34212
|
-
/* @__PURE__ */ U("div", { className: "flex justify-end gap-3 pt-4", children: [
|
|
34213
|
-
r && /* @__PURE__ */ A(
|
|
34214
|
-
"button",
|
|
34215
|
-
{
|
|
34216
|
-
type: "button",
|
|
34217
|
-
onClick: x,
|
|
34218
|
-
disabled: u,
|
|
34219
|
-
className: "rounded-md border border-gray-300 dark:border-gray-600 px-6 py-2 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
34220
|
-
children: "Cancel"
|
|
34221
|
-
}
|
|
34222
|
-
),
|
|
34223
|
-
/* @__PURE__ */ A(
|
|
34224
|
-
"button",
|
|
34225
|
-
{
|
|
34226
|
-
type: "button",
|
|
34227
|
-
onClick: y,
|
|
34228
|
-
disabled: u || o.trim().length < 10,
|
|
34229
|
-
className: "rounded-md bg-gradient-to-r from-blue-600 to-purple-600 px-6 py-2 text-white hover:from-blue-700 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",
|
|
34230
|
-
children: u ? /* @__PURE__ */ U(Wa, { children: [
|
|
34231
|
-
/* @__PURE__ */ U("svg", { className: "h-4 w-4 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [
|
|
34232
|
-
/* @__PURE__ */ A("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
34233
|
-
/* @__PURE__ */ A("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
34234
|
-
] }),
|
|
34235
|
-
/* @__PURE__ */ A("span", { children: "Generating..." })
|
|
34236
|
-
] }) : /* @__PURE__ */ U(Wa, { children: [
|
|
34237
|
-
/* @__PURE__ */ A("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ A("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }),
|
|
34238
|
-
/* @__PURE__ */ A("span", { children: e === "create" ? "Create with AI" : "Update with AI" })
|
|
34239
|
-
] })
|
|
34240
|
-
}
|
|
34241
|
-
)
|
|
34242
34304
|
] })
|
|
34243
|
-
] });
|
|
34305
|
+
] }) }) : null;
|
|
34244
34306
|
}
|
|
34245
34307
|
function LM({
|
|
34246
34308
|
value: e,
|
|
@@ -34251,10 +34313,10 @@ function LM({
|
|
|
34251
34313
|
minHeight: s = "400px"
|
|
34252
34314
|
}) {
|
|
34253
34315
|
const [o, a] = ge("edit");
|
|
34254
|
-
return /* @__PURE__ */
|
|
34316
|
+
return /* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34255
34317
|
r && /* @__PURE__ */ A("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300", children: r }),
|
|
34256
|
-
/* @__PURE__ */
|
|
34257
|
-
/* @__PURE__ */
|
|
34318
|
+
/* @__PURE__ */ F("div", { className: "overflow-hidden rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-900", children: [
|
|
34319
|
+
/* @__PURE__ */ F("div", { className: "flex border-b border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800", children: [
|
|
34258
34320
|
/* @__PURE__ */ A(
|
|
34259
34321
|
"button",
|
|
34260
34322
|
{
|
|
@@ -34293,46 +34355,46 @@ function LM({
|
|
|
34293
34355
|
) : /* @__PURE__ */ A("div", { className: "text-gray-400 dark:text-gray-500", children: "Nothing to preview" }) }) })
|
|
34294
34356
|
] }),
|
|
34295
34357
|
i && /* @__PURE__ */ A("p", { className: "text-sm text-red-600 dark:text-red-400", children: i }),
|
|
34296
|
-
/* @__PURE__ */
|
|
34358
|
+
/* @__PURE__ */ F("div", { className: "rounded-md bg-gray-50 dark:bg-gray-800 p-3 text-xs text-gray-600 dark:text-gray-400", children: [
|
|
34297
34359
|
/* @__PURE__ */ A("p", { className: "font-medium", children: "Markdown Syntax Help:" }),
|
|
34298
|
-
/* @__PURE__ */
|
|
34299
|
-
/* @__PURE__ */
|
|
34360
|
+
/* @__PURE__ */ F("div", { className: "mt-1 grid grid-cols-2 gap-2", children: [
|
|
34361
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34300
34362
|
/* @__PURE__ */ A("strong", { children: "# Heading 1" }),
|
|
34301
34363
|
" - Main heading"
|
|
34302
34364
|
] }),
|
|
34303
|
-
/* @__PURE__ */
|
|
34365
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34304
34366
|
/* @__PURE__ */ A("strong", { children: "## Heading 2" }),
|
|
34305
34367
|
" - Subheading"
|
|
34306
34368
|
] }),
|
|
34307
|
-
/* @__PURE__ */
|
|
34369
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34308
34370
|
/* @__PURE__ */ A("strong", { children: "**bold text**" }),
|
|
34309
34371
|
" - Bold"
|
|
34310
34372
|
] }),
|
|
34311
|
-
/* @__PURE__ */
|
|
34373
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34312
34374
|
/* @__PURE__ */ A("strong", { children: "*italic text*" }),
|
|
34313
34375
|
" - Italic"
|
|
34314
34376
|
] }),
|
|
34315
|
-
/* @__PURE__ */
|
|
34377
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34316
34378
|
/* @__PURE__ */ A("strong", { children: "[link](url)" }),
|
|
34317
34379
|
" - Link"
|
|
34318
34380
|
] }),
|
|
34319
|
-
/* @__PURE__ */
|
|
34381
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34320
34382
|
/* @__PURE__ */ A("strong", { children: "" }),
|
|
34321
34383
|
" - Image"
|
|
34322
34384
|
] }),
|
|
34323
|
-
/* @__PURE__ */
|
|
34385
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34324
34386
|
/* @__PURE__ */ A("strong", { children: "- item" }),
|
|
34325
34387
|
" - Bullet list"
|
|
34326
34388
|
] }),
|
|
34327
|
-
/* @__PURE__ */
|
|
34389
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34328
34390
|
/* @__PURE__ */ A("strong", { children: "1. item" }),
|
|
34329
34391
|
" - Numbered list"
|
|
34330
34392
|
] }),
|
|
34331
|
-
/* @__PURE__ */
|
|
34393
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34332
34394
|
/* @__PURE__ */ A("strong", { children: "`code`" }),
|
|
34333
34395
|
" - Inline code"
|
|
34334
34396
|
] }),
|
|
34335
|
-
/* @__PURE__ */
|
|
34397
|
+
/* @__PURE__ */ F("div", { children: [
|
|
34336
34398
|
/* @__PURE__ */ A("strong", { children: "```language```" }),
|
|
34337
34399
|
" - Code block"
|
|
34338
34400
|
] })
|
|
@@ -34464,17 +34526,17 @@ function MM({
|
|
|
34464
34526
|
showActions: o = !1,
|
|
34465
34527
|
emptyMessage: a = "No categories found"
|
|
34466
34528
|
}) {
|
|
34467
|
-
return t ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: "Loading categories..." }) }) : n ? /* @__PURE__ */ A("div", { className: "rounded-md bg-red-50 p-4", children: /* @__PURE__ */
|
|
34529
|
+
return t ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: "Loading categories..." }) }) : n ? /* @__PURE__ */ A("div", { className: "rounded-md bg-red-50 p-4", children: /* @__PURE__ */ F("div", { className: "text-sm text-red-800", children: [
|
|
34468
34530
|
"Error loading categories: ",
|
|
34469
34531
|
n.message
|
|
34470
|
-
] }) }) : e.length === 0 ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: a }) }) : /* @__PURE__ */ A("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */
|
|
34471
|
-
/* @__PURE__ */ A("thead", { className: "bg-gray-50 dark:bg-gray-800", children: /* @__PURE__ */
|
|
34532
|
+
] }) }) : e.length === 0 ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: a }) }) : /* @__PURE__ */ A("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ F("table", { className: "w-full table-fixed divide-y divide-gray-200 dark:divide-gray-700", children: [
|
|
34533
|
+
/* @__PURE__ */ A("thead", { className: "bg-gray-50 dark:bg-gray-800", children: /* @__PURE__ */ F("tr", { children: [
|
|
34472
34534
|
/* @__PURE__ */ A("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[40%]", children: "Title" }),
|
|
34473
34535
|
/* @__PURE__ */ A("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[20%]", children: "Articles" }),
|
|
34474
34536
|
/* @__PURE__ */ A("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[25%]", children: "Parent" }),
|
|
34475
34537
|
o && /* @__PURE__ */ A("th", { scope: "col", className: "px-6 py-3 text-right text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider w-[15%]", children: "Actions" })
|
|
34476
34538
|
] }) }),
|
|
34477
|
-
/* @__PURE__ */ A("tbody", { className: "bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700", children: e.map((l) => /* @__PURE__ */
|
|
34539
|
+
/* @__PURE__ */ A("tbody", { className: "bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700", children: e.map((l) => /* @__PURE__ */ F("tr", { className: "hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors", children: [
|
|
34478
34540
|
/* @__PURE__ */ A("td", { className: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100", children: /* @__PURE__ */ A(
|
|
34479
34541
|
"div",
|
|
34480
34542
|
{
|
|
@@ -34485,7 +34547,7 @@ function MM({
|
|
|
34485
34547
|
) }),
|
|
34486
34548
|
/* @__PURE__ */ A("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400", children: l.articleCount || 0 }),
|
|
34487
34549
|
/* @__PURE__ */ A("td", { className: "px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400", children: l.parentId ? `Parent ID: ${l.parentId}` : "-" }),
|
|
34488
|
-
o && /* @__PURE__ */ A("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm", children: /* @__PURE__ */
|
|
34550
|
+
o && /* @__PURE__ */ A("td", { className: "px-6 py-4 whitespace-nowrap text-right text-sm", children: /* @__PURE__ */ F("div", { className: "flex justify-end gap-2", children: [
|
|
34489
34551
|
i && /* @__PURE__ */ A(
|
|
34490
34552
|
"button",
|
|
34491
34553
|
{
|
|
@@ -34540,10 +34602,10 @@ function DM({
|
|
|
34540
34602
|
};
|
|
34541
34603
|
if (!n) return null;
|
|
34542
34604
|
const m = t.filter((b) => b.categoryId !== (e == null ? void 0 : e.categoryId));
|
|
34543
|
-
return /* @__PURE__ */ A("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50", children: /* @__PURE__ */
|
|
34605
|
+
return /* @__PURE__ */ A("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50", children: /* @__PURE__ */ F("div", { className: "w-full max-w-lg rounded-lg bg-white p-6 shadow-xl", children: [
|
|
34544
34606
|
/* @__PURE__ */ A("h2", { className: "mb-4 text-2xl font-bold text-gray-900", children: e ? "Edit Category" : "Create Category" }),
|
|
34545
|
-
/* @__PURE__ */
|
|
34546
|
-
/* @__PURE__ */
|
|
34607
|
+
/* @__PURE__ */ F("form", { onSubmit: p, className: "space-y-4", children: [
|
|
34608
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34547
34609
|
/* @__PURE__ */ A("label", { htmlFor: "title", className: "block text-sm font-medium text-gray-700", children: "Title *" }),
|
|
34548
34610
|
/* @__PURE__ */ A(
|
|
34549
34611
|
"input",
|
|
@@ -34558,9 +34620,9 @@ function DM({
|
|
|
34558
34620
|
),
|
|
34559
34621
|
u.title && /* @__PURE__ */ A("p", { className: "text-sm text-red-600", children: u.title })
|
|
34560
34622
|
] }),
|
|
34561
|
-
m.length > 0 && /* @__PURE__ */
|
|
34623
|
+
m.length > 0 && /* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34562
34624
|
/* @__PURE__ */ A("label", { htmlFor: "parent", className: "block text-sm font-medium text-gray-700", children: "Parent Category" }),
|
|
34563
|
-
/* @__PURE__ */
|
|
34625
|
+
/* @__PURE__ */ F(
|
|
34564
34626
|
"select",
|
|
34565
34627
|
{
|
|
34566
34628
|
id: "parent",
|
|
@@ -34574,7 +34636,7 @@ function DM({
|
|
|
34574
34636
|
}
|
|
34575
34637
|
)
|
|
34576
34638
|
] }),
|
|
34577
|
-
/* @__PURE__ */
|
|
34639
|
+
/* @__PURE__ */ F("div", { className: "flex justify-end gap-3 pt-4", children: [
|
|
34578
34640
|
/* @__PURE__ */ A(
|
|
34579
34641
|
"button",
|
|
34580
34642
|
{
|
|
@@ -34609,15 +34671,15 @@ function PM({
|
|
|
34609
34671
|
showActions: a = !1,
|
|
34610
34672
|
emptyMessage: l = "No tags found"
|
|
34611
34673
|
}) {
|
|
34612
|
-
return t ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: "Loading tags..." }) }) : n ? /* @__PURE__ */ A("div", { className: "rounded-md bg-red-50 p-4", children: /* @__PURE__ */
|
|
34674
|
+
return t ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: "Loading tags..." }) }) : n ? /* @__PURE__ */ A("div", { className: "rounded-md bg-red-50 p-4", children: /* @__PURE__ */ F("div", { className: "text-sm text-red-800", children: [
|
|
34613
34675
|
"Error loading tags: ",
|
|
34614
34676
|
n.message
|
|
34615
|
-
] }) }) : e.length === 0 ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: l }) }) : /* @__PURE__ */ A("div", { className: "flex flex-wrap gap-3", children: e.map((c) => /* @__PURE__ */
|
|
34677
|
+
] }) }) : e.length === 0 ? /* @__PURE__ */ A("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ A("div", { className: "text-gray-500", children: l }) }) : /* @__PURE__ */ A("div", { className: "flex flex-wrap gap-3", children: e.map((c) => /* @__PURE__ */ F(
|
|
34616
34678
|
"div",
|
|
34617
34679
|
{
|
|
34618
34680
|
className: "group relative flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-4 py-2 shadow-sm hover:shadow-md transition-shadow",
|
|
34619
34681
|
children: [
|
|
34620
|
-
/* @__PURE__ */
|
|
34682
|
+
/* @__PURE__ */ F(
|
|
34621
34683
|
"span",
|
|
34622
34684
|
{
|
|
34623
34685
|
className: `text-sm font-medium text-gray-900 ${r ? "cursor-pointer hover:text-blue-600" : ""}`,
|
|
@@ -34629,7 +34691,7 @@ function PM({
|
|
|
34629
34691
|
}
|
|
34630
34692
|
),
|
|
34631
34693
|
c.articleCount !== void 0 && /* @__PURE__ */ A("span", { className: "text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full", children: c.articleCount }),
|
|
34632
|
-
a && (i || s || o) && /* @__PURE__ */
|
|
34694
|
+
a && (i || s || o) && /* @__PURE__ */ F("div", { className: "flex gap-1 ml-2", children: [
|
|
34633
34695
|
i && /* @__PURE__ */ A(
|
|
34634
34696
|
"button",
|
|
34635
34697
|
{
|
|
@@ -34692,10 +34754,10 @@ function BM({
|
|
|
34692
34754
|
console.error("Failed to save tag:", b);
|
|
34693
34755
|
}
|
|
34694
34756
|
};
|
|
34695
|
-
return t ? /* @__PURE__ */ A("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50", children: /* @__PURE__ */
|
|
34757
|
+
return t ? /* @__PURE__ */ A("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50", children: /* @__PURE__ */ F("div", { className: "w-full max-w-md rounded-lg bg-white p-6 shadow-xl", children: [
|
|
34696
34758
|
/* @__PURE__ */ A("h2", { className: "mb-4 text-2xl font-bold text-gray-900", children: e ? "Edit Tag" : "Create Tag" }),
|
|
34697
|
-
/* @__PURE__ */
|
|
34698
|
-
/* @__PURE__ */
|
|
34759
|
+
/* @__PURE__ */ F("form", { onSubmit: f, className: "space-y-4", children: [
|
|
34760
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34699
34761
|
/* @__PURE__ */ A("label", { htmlFor: "title", className: "block text-sm font-medium text-gray-700", children: "Title *" }),
|
|
34700
34762
|
/* @__PURE__ */ A(
|
|
34701
34763
|
"input",
|
|
@@ -34710,7 +34772,7 @@ function BM({
|
|
|
34710
34772
|
),
|
|
34711
34773
|
c.title && /* @__PURE__ */ A("p", { className: "text-sm text-red-600", children: c.title })
|
|
34712
34774
|
] }),
|
|
34713
|
-
/* @__PURE__ */
|
|
34775
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34714
34776
|
/* @__PURE__ */ A("label", { htmlFor: "slug", className: "block text-sm font-medium text-gray-700", children: "Slug" }),
|
|
34715
34777
|
/* @__PURE__ */ A(
|
|
34716
34778
|
"input",
|
|
@@ -34725,7 +34787,7 @@ function BM({
|
|
|
34725
34787
|
),
|
|
34726
34788
|
/* @__PURE__ */ A("p", { className: "text-xs text-gray-500", children: "URL-friendly version of the title. Leave empty to auto-generate." })
|
|
34727
34789
|
] }),
|
|
34728
|
-
/* @__PURE__ */
|
|
34790
|
+
/* @__PURE__ */ F("div", { className: "flex justify-end gap-3 pt-4", children: [
|
|
34729
34791
|
/* @__PURE__ */ A(
|
|
34730
34792
|
"button",
|
|
34731
34793
|
{
|
|
@@ -34774,35 +34836,35 @@ function FM({
|
|
|
34774
34836
|
console.error("Failed to merge tags:", p);
|
|
34775
34837
|
}
|
|
34776
34838
|
};
|
|
34777
|
-
return n ? /* @__PURE__ */ A("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50", children: /* @__PURE__ */
|
|
34839
|
+
return n ? /* @__PURE__ */ A("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50", children: /* @__PURE__ */ F("div", { className: "w-full max-w-md rounded-lg bg-white p-6 shadow-xl", children: [
|
|
34778
34840
|
/* @__PURE__ */ A("h2", { className: "mb-4 text-2xl font-bold text-gray-900", children: "Merge Tags" }),
|
|
34779
|
-
/* @__PURE__ */ A("div", { className: "mb-6 rounded-md bg-blue-50 p-4", children: /* @__PURE__ */
|
|
34841
|
+
/* @__PURE__ */ A("div", { className: "mb-6 rounded-md bg-blue-50 p-4", children: /* @__PURE__ */ F("p", { className: "text-sm text-blue-800", children: [
|
|
34780
34842
|
"All articles tagged with",
|
|
34781
34843
|
" ",
|
|
34782
|
-
/* @__PURE__ */
|
|
34844
|
+
/* @__PURE__ */ F("strong", { className: "font-semibold", children: [
|
|
34783
34845
|
"#",
|
|
34784
34846
|
e.title
|
|
34785
34847
|
] }),
|
|
34786
34848
|
" will be moved to the selected target tag, and the source tag will be deleted."
|
|
34787
34849
|
] }) }),
|
|
34788
|
-
/* @__PURE__ */
|
|
34789
|
-
/* @__PURE__ */
|
|
34850
|
+
/* @__PURE__ */ F("form", { onSubmit: h, className: "space-y-4", children: [
|
|
34851
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34790
34852
|
/* @__PURE__ */ A("label", { className: "block text-sm font-medium text-gray-700", children: "Source Tag" }),
|
|
34791
|
-
/* @__PURE__ */
|
|
34792
|
-
/* @__PURE__ */
|
|
34853
|
+
/* @__PURE__ */ F("div", { className: "rounded-md border border-gray-300 bg-gray-50 px-4 py-2", children: [
|
|
34854
|
+
/* @__PURE__ */ F("span", { className: "font-medium text-gray-900", children: [
|
|
34793
34855
|
"#",
|
|
34794
34856
|
e.title
|
|
34795
34857
|
] }),
|
|
34796
|
-
e.slug && /* @__PURE__ */
|
|
34858
|
+
e.slug && /* @__PURE__ */ F("span", { className: "ml-2 text-xs font-mono text-gray-500", children: [
|
|
34797
34859
|
"(",
|
|
34798
34860
|
e.slug,
|
|
34799
34861
|
")"
|
|
34800
34862
|
] })
|
|
34801
34863
|
] })
|
|
34802
34864
|
] }),
|
|
34803
|
-
/* @__PURE__ */
|
|
34865
|
+
/* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
34804
34866
|
/* @__PURE__ */ A("label", { htmlFor: "targetTag", className: "block text-sm font-medium text-gray-700", children: "Target Tag *" }),
|
|
34805
|
-
/* @__PURE__ */
|
|
34867
|
+
/* @__PURE__ */ F(
|
|
34806
34868
|
"select",
|
|
34807
34869
|
{
|
|
34808
34870
|
id: "targetTag",
|
|
@@ -34811,7 +34873,7 @@ function FM({
|
|
|
34811
34873
|
className: `w-full rounded-md border ${l.targetTag ? "border-red-300" : "border-gray-300"} px-4 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`,
|
|
34812
34874
|
children: [
|
|
34813
34875
|
/* @__PURE__ */ A("option", { value: "", children: "Select target tag" }),
|
|
34814
|
-
u.map((f) => /* @__PURE__ */
|
|
34876
|
+
u.map((f) => /* @__PURE__ */ F("option", { value: f.tagId, children: [
|
|
34815
34877
|
"#",
|
|
34816
34878
|
f.title,
|
|
34817
34879
|
" ",
|
|
@@ -34824,7 +34886,7 @@ function FM({
|
|
|
34824
34886
|
/* @__PURE__ */ A("p", { className: "text-xs text-gray-500", children: "Select the tag that will receive all articles from the source tag" })
|
|
34825
34887
|
] }),
|
|
34826
34888
|
u.length === 0 && /* @__PURE__ */ A("div", { className: "rounded-md bg-yellow-50 p-4", children: /* @__PURE__ */ A("p", { className: "text-sm text-yellow-800", children: "No other tags available. You need at least 2 tags to perform a merge." }) }),
|
|
34827
|
-
/* @__PURE__ */
|
|
34889
|
+
/* @__PURE__ */ F("div", { className: "flex justify-end gap-3 pt-4", children: [
|
|
34828
34890
|
/* @__PURE__ */ A(
|
|
34829
34891
|
"button",
|
|
34830
34892
|
{
|
|
@@ -35487,7 +35549,7 @@ const Oe = (e) => {
|
|
|
35487
35549
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
35488
35550
|
g2.test(e) && !m2.test(e)
|
|
35489
35551
|
), Nm = () => !1, S2 = (e) => b2.test(e), T2 = (e) => y2.test(e), C2 = () => {
|
|
35490
|
-
const e = Oe("colors"), t = Oe("spacing"), n = Oe("blur"), r = Oe("brightness"), i = Oe("borderColor"), s = Oe("borderRadius"), o = Oe("borderSpacing"), a = Oe("borderWidth"), l = Oe("contrast"), c = Oe("grayscale"), u = Oe("hueRotate"), d = Oe("invert"), h = Oe("gap"), f = Oe("gradientColorStops"), p = Oe("gradientColorStopPositions"), m = Oe("inset"), b = Oe("margin"), y = Oe("opacity"), x = Oe("padding"), _ = Oe("saturate"), T = Oe("scale"), C = Oe("sepia"), k = Oe("skew"), P = Oe("space"), $ = Oe("translate"), G = () => ["auto", "contain", "none"], O = () => ["auto", "hidden", "clip", "visible", "scroll"], j = () => ["auto", ue, t], B = () => [ue, t], re = () => ["", wn, On], X = () => ["auto", Lr, ue], Y = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], I = () => ["solid", "dashed", "dotted", "double", "none"],
|
|
35552
|
+
const e = Oe("colors"), t = Oe("spacing"), n = Oe("blur"), r = Oe("brightness"), i = Oe("borderColor"), s = Oe("borderRadius"), o = Oe("borderSpacing"), a = Oe("borderWidth"), l = Oe("contrast"), c = Oe("grayscale"), u = Oe("hueRotate"), d = Oe("invert"), h = Oe("gap"), f = Oe("gradientColorStops"), p = Oe("gradientColorStopPositions"), m = Oe("inset"), b = Oe("margin"), y = Oe("opacity"), x = Oe("padding"), _ = Oe("saturate"), T = Oe("scale"), C = Oe("sepia"), k = Oe("skew"), P = Oe("space"), $ = Oe("translate"), G = () => ["auto", "contain", "none"], O = () => ["auto", "hidden", "clip", "visible", "scroll"], j = () => ["auto", ue, t], B = () => [ue, t], re = () => ["", wn, On], X = () => ["auto", Lr, ue], Y = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], I = () => ["solid", "dashed", "dotted", "double", "none"], U = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], q = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], K = () => ["", "0", ue], w = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Q = () => [Lr, ue];
|
|
35491
35553
|
return {
|
|
35492
35554
|
cacheSize: 500,
|
|
35493
35555
|
separator: ":",
|
|
@@ -35891,7 +35953,7 @@ const Oe = (e) => {
|
|
|
35891
35953
|
* @see https://tailwindcss.com/docs/justify-content
|
|
35892
35954
|
*/
|
|
35893
35955
|
"justify-content": [{
|
|
35894
|
-
justify: ["normal", ...
|
|
35956
|
+
justify: ["normal", ...q()]
|
|
35895
35957
|
}],
|
|
35896
35958
|
/**
|
|
35897
35959
|
* Justify Items
|
|
@@ -35912,7 +35974,7 @@ const Oe = (e) => {
|
|
|
35912
35974
|
* @see https://tailwindcss.com/docs/align-content
|
|
35913
35975
|
*/
|
|
35914
35976
|
"align-content": [{
|
|
35915
|
-
content: ["normal", ...
|
|
35977
|
+
content: ["normal", ...q(), "baseline"]
|
|
35916
35978
|
}],
|
|
35917
35979
|
/**
|
|
35918
35980
|
* Align Items
|
|
@@ -35933,7 +35995,7 @@ const Oe = (e) => {
|
|
|
35933
35995
|
* @see https://tailwindcss.com/docs/place-content
|
|
35934
35996
|
*/
|
|
35935
35997
|
"place-content": [{
|
|
35936
|
-
"place-content": [...
|
|
35998
|
+
"place-content": [...q(), "baseline"]
|
|
35937
35999
|
}],
|
|
35938
36000
|
/**
|
|
35939
36001
|
* Place Items
|
|
@@ -36881,14 +36943,14 @@ const Oe = (e) => {
|
|
|
36881
36943
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
36882
36944
|
*/
|
|
36883
36945
|
"mix-blend": [{
|
|
36884
|
-
"mix-blend": [...
|
|
36946
|
+
"mix-blend": [...U(), "plus-lighter", "plus-darker"]
|
|
36885
36947
|
}],
|
|
36886
36948
|
/**
|
|
36887
36949
|
* Background Blend Mode
|
|
36888
36950
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
36889
36951
|
*/
|
|
36890
36952
|
"bg-blend": [{
|
|
36891
|
-
"bg-blend":
|
|
36953
|
+
"bg-blend": U()
|
|
36892
36954
|
}],
|
|
36893
36955
|
// Filters
|
|
36894
36956
|
/**
|