zs_library 0.3.15 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,660 +1,28 @@
1
- var qr = Object.defineProperty;
2
- var Ur = (d, r, i) => r in d ? qr(d, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : d[r] = i;
3
- var Fe = (d, r, i) => Ur(d, typeof r != "symbol" ? r + "" : r, i);
1
+ var Ae = Object.defineProperty;
2
+ var je = (a, e, r) => e in a ? Ae(a, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[e] = r;
3
+ var ie = (a, e, r) => je(a, typeof e != "symbol" ? e + "" : e, r);
4
4
  import "./zs_library.css";
5
- import sr, { createContext as cr, useMemo as De, useContext as dr, useState as Q, useRef as Ce, useEffect as ye } from "react";
6
- import { cx as V, css as p } from "@emotion/css";
7
- import Gr from "react-slick";
8
- import { ReactSortable as Ye } from "react-sortablejs";
9
- import { AnimatePresence as We, motion as T, useMotionValue as Hr, useTransform as ke, useSpring as _e } from "framer-motion";
10
- import { useLocalStorageState as Jr, useDebounceEffect as Kr } from "ahooks";
11
- import { v4 as nr } from "uuid";
12
- import Zr from "rc-tooltip";
13
- import { RiPencilRuler2Line as Qr, RiShareLine as eo, RiInformationLine as ro, RiCloseCircleLine as oo, RiMoreLine as to } from "@remixicon/react";
14
- import ur from "rc-dialog";
15
- import no from "react-json-view";
16
- import { MDXEditor as ao, toolbarPlugin as io, DiffSourceToggleWrapper as lo, UndoRedo as so, Separator as me, BoldItalicUnderlineToggles as co, CodeToggle as uo, StrikeThroughSupSubToggles as mo, ListsToggle as go, CreateLink as po, InsertImage as fo, InsertTable as ho, InsertThematicBreak as bo, InsertCodeBlock as vo, InsertFrontmatter as ko, diffSourcePlugin as xo, listsPlugin as wo, quotePlugin as yo, headingsPlugin as Co, linkPlugin as jo, linkDialogPlugin as So, imagePlugin as Io, tablePlugin as To, thematicBreakPlugin as Ro, frontmatterPlugin as Mo, codeBlockPlugin as Eo, codeMirrorPlugin as _o, markdownShortcutPlugin as Po, directivesPlugin as Do, AdmonitionDirectiveDescriptor as No } from "@mdxeditor/editor";
17
- import $o from "react-markdown";
18
- import Oo from "remark-gfm";
19
- import Bo from "remark-emoji";
20
- import Ao from "rehype-raw";
21
- import { Prism as Lo } from "react-syntax-highlighter";
22
- import { clsx as Fo } from "clsx";
23
- import { twMerge as zo } from "tailwind-merge";
24
- var Pe = { exports: {} }, xe = {};
25
- /**
26
- * @license React
27
- * react-jsx-runtime.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */
34
- var ar;
35
- function Yo() {
36
- if (ar) return xe;
37
- ar = 1;
38
- var d = sr, r = Symbol.for("react.element"), i = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, c = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
39
- function u(h, l, y) {
40
- var v, _ = {}, E = null, F = null;
41
- y !== void 0 && (E = "" + y), l.key !== void 0 && (E = "" + l.key), l.ref !== void 0 && (F = l.ref);
42
- for (v in l) n.call(l, v) && !s.hasOwnProperty(v) && (_[v] = l[v]);
43
- if (h && h.defaultProps) for (v in l = h.defaultProps, l) _[v] === void 0 && (_[v] = l[v]);
44
- return { $$typeof: r, type: h, key: E, ref: F, props: _, _owner: c.current };
45
- }
46
- return xe.Fragment = i, xe.jsx = u, xe.jsxs = u, xe;
47
- }
48
- var we = {};
49
- /**
50
- * @license React
51
- * react-jsx-runtime.development.js
52
- *
53
- * Copyright (c) Facebook, Inc. and its affiliates.
54
- *
55
- * This source code is licensed under the MIT license found in the
56
- * LICENSE file in the root directory of this source tree.
57
- */
58
- var ir;
59
- function Wo() {
60
- return ir || (ir = 1, process.env.NODE_ENV !== "production" && function() {
61
- var d = sr, r = Symbol.for("react.element"), i = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), h = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), z = Symbol.iterator, b = "@@iterator";
62
- function m(e) {
63
- if (e === null || typeof e != "object")
64
- return null;
65
- var t = z && e[z] || e[b];
66
- return typeof t == "function" ? t : null;
67
- }
68
- var R = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
69
- function f(e) {
70
- {
71
- for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), g = 1; g < t; g++)
72
- a[g - 1] = arguments[g];
73
- Y("error", e, a);
74
- }
75
- }
76
- function Y(e, t, a) {
77
- {
78
- var g = R.ReactDebugCurrentFrame, M = g.getStackAddendum();
79
- M !== "" && (t += "%s", a = a.concat([M]));
80
- var O = a.map(function(S) {
81
- return String(S);
82
- });
83
- O.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, O);
84
- }
85
- }
86
- var k = !1, N = !1, P = !1, x = !1, C = !1, U;
87
- U = Symbol.for("react.module.reference");
88
- function ce(e) {
89
- return !!(typeof e == "string" || typeof e == "function" || e === n || e === s || C || e === c || e === y || e === v || x || e === F || k || N || P || typeof e == "object" && e !== null && (e.$$typeof === E || e.$$typeof === _ || e.$$typeof === u || e.$$typeof === h || e.$$typeof === l || // This needs to include all possible module reference object
90
- // types supported by any Flight configuration anywhere since
91
- // we don't know which Flight build this will end up being used
92
- // with.
93
- e.$$typeof === U || e.getModuleId !== void 0));
94
- }
95
- function H(e, t, a) {
96
- var g = e.displayName;
97
- if (g)
98
- return g;
99
- var M = t.displayName || t.name || "";
100
- return M !== "" ? a + "(" + M + ")" : a;
101
- }
102
- function pe(e) {
103
- return e.displayName || "Context";
104
- }
105
- function G(e) {
106
- if (e == null)
107
- return null;
108
- if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
109
- return e.displayName || e.name || null;
110
- if (typeof e == "string")
111
- return e;
112
- switch (e) {
113
- case n:
114
- return "Fragment";
115
- case i:
116
- return "Portal";
117
- case s:
118
- return "Profiler";
119
- case c:
120
- return "StrictMode";
121
- case y:
122
- return "Suspense";
123
- case v:
124
- return "SuspenseList";
125
- }
126
- if (typeof e == "object")
127
- switch (e.$$typeof) {
128
- case h:
129
- var t = e;
130
- return pe(t) + ".Consumer";
131
- case u:
132
- var a = e;
133
- return pe(a._context) + ".Provider";
134
- case l:
135
- return H(e, e.render, "ForwardRef");
136
- case _:
137
- var g = e.displayName || null;
138
- return g !== null ? g : G(e.type) || "Memo";
139
- case E: {
140
- var M = e, O = M._payload, S = M._init;
141
- try {
142
- return G(S(O));
143
- } catch {
144
- return null;
145
- }
146
- }
147
- }
148
- return null;
149
- }
150
- var oe = Object.assign, le = 0, A, ne, se, je, Se, Ie, Te;
151
- function I() {
152
- }
153
- I.__reactDisabledLog = !0;
154
- function K() {
155
- {
156
- if (le === 0) {
157
- A = console.log, ne = console.info, se = console.warn, je = console.error, Se = console.group, Ie = console.groupCollapsed, Te = console.groupEnd;
158
- var e = {
159
- configurable: !0,
160
- enumerable: !0,
161
- value: I,
162
- writable: !0
163
- };
164
- Object.defineProperties(console, {
165
- info: e,
166
- log: e,
167
- warn: e,
168
- error: e,
169
- group: e,
170
- groupCollapsed: e,
171
- groupEnd: e
172
- });
173
- }
174
- le++;
175
- }
176
- }
177
- function J() {
178
- {
179
- if (le--, le === 0) {
180
- var e = {
181
- configurable: !0,
182
- enumerable: !0,
183
- writable: !0
184
- };
185
- Object.defineProperties(console, {
186
- log: oe({}, e, {
187
- value: A
188
- }),
189
- info: oe({}, e, {
190
- value: ne
191
- }),
192
- warn: oe({}, e, {
193
- value: se
194
- }),
195
- error: oe({}, e, {
196
- value: je
197
- }),
198
- group: oe({}, e, {
199
- value: Se
200
- }),
201
- groupCollapsed: oe({}, e, {
202
- value: Ie
203
- }),
204
- groupEnd: oe({}, e, {
205
- value: Te
206
- })
207
- });
208
- }
209
- le < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
210
- }
211
- }
212
- var $ = R.ReactCurrentDispatcher, L;
213
- function B(e, t, a) {
214
- {
215
- if (L === void 0)
216
- try {
217
- throw Error();
218
- } catch (M) {
219
- var g = M.stack.trim().match(/\n( *(at )?)/);
220
- L = g && g[1] || "";
221
- }
222
- return `
223
- ` + L + e;
224
- }
225
- }
226
- var j = !1, D;
227
- {
228
- var q = typeof WeakMap == "function" ? WeakMap : Map;
229
- D = new q();
230
- }
231
- function te(e, t) {
232
- if (!e || j)
233
- return "";
234
- {
235
- var a = D.get(e);
236
- if (a !== void 0)
237
- return a;
238
- }
239
- var g;
240
- j = !0;
241
- var M = Error.prepareStackTrace;
242
- Error.prepareStackTrace = void 0;
243
- var O;
244
- O = $.current, $.current = null, K();
245
- try {
246
- if (t) {
247
- var S = function() {
248
- throw Error();
249
- };
250
- if (Object.defineProperty(S.prototype, "props", {
251
- set: function() {
252
- throw Error();
253
- }
254
- }), typeof Reflect == "object" && Reflect.construct) {
255
- try {
256
- Reflect.construct(S, []);
257
- } catch (re) {
258
- g = re;
259
- }
260
- Reflect.construct(e, [], S);
261
- } else {
262
- try {
263
- S.call();
264
- } catch (re) {
265
- g = re;
266
- }
267
- e.call(S.prototype);
268
- }
269
- } else {
270
- try {
271
- throw Error();
272
- } catch (re) {
273
- g = re;
274
- }
275
- e();
276
- }
277
- } catch (re) {
278
- if (re && g && typeof re.stack == "string") {
279
- for (var w = re.stack.split(`
280
- `), Z = g.stack.split(`
281
- `), W = w.length - 1, X = Z.length - 1; W >= 1 && X >= 0 && w[W] !== Z[X]; )
282
- X--;
283
- for (; W >= 1 && X >= 0; W--, X--)
284
- if (w[W] !== Z[X]) {
285
- if (W !== 1 || X !== 1)
286
- do
287
- if (W--, X--, X < 0 || w[W] !== Z[X]) {
288
- var ae = `
289
- ` + w[W].replace(" at new ", " at ");
290
- return e.displayName && ae.includes("<anonymous>") && (ae = ae.replace("<anonymous>", e.displayName)), typeof e == "function" && D.set(e, ae), ae;
291
- }
292
- while (W >= 1 && X >= 0);
293
- break;
294
- }
295
- }
296
- } finally {
297
- j = !1, $.current = O, J(), Error.prepareStackTrace = M;
298
- }
299
- var he = e ? e.displayName || e.name : "", ue = he ? B(he) : "";
300
- return typeof e == "function" && D.set(e, ue), ue;
301
- }
302
- function Re(e, t, a) {
303
- return te(e, !1);
304
- }
305
- function Me(e) {
306
- var t = e.prototype;
307
- return !!(t && t.isReactComponent);
308
- }
309
- function ee(e, t, a) {
310
- if (e == null)
311
- return "";
312
- if (typeof e == "function")
313
- return te(e, Me(e));
314
- if (typeof e == "string")
315
- return B(e);
316
- switch (e) {
317
- case y:
318
- return B("Suspense");
319
- case v:
320
- return B("SuspenseList");
321
- }
322
- if (typeof e == "object")
323
- switch (e.$$typeof) {
324
- case l:
325
- return Re(e.render);
326
- case _:
327
- return ee(e.type, t, a);
328
- case E: {
329
- var g = e, M = g._payload, O = g._init;
330
- try {
331
- return ee(O(M), t, a);
332
- } catch {
333
- }
334
- }
335
- }
336
- return "";
337
- }
338
- var de = Object.prototype.hasOwnProperty, Xe = {}, qe = R.ReactDebugCurrentFrame;
339
- function Ee(e) {
340
- if (e) {
341
- var t = e._owner, a = ee(e.type, e._source, t ? t.type : null);
342
- qe.setExtraStackFrame(a);
343
- } else
344
- qe.setExtraStackFrame(null);
345
- }
346
- function jr(e, t, a, g, M) {
347
- {
348
- var O = Function.call.bind(de);
349
- for (var S in e)
350
- if (O(e, S)) {
351
- var w = void 0;
352
- try {
353
- if (typeof e[S] != "function") {
354
- var Z = Error((g || "React class") + ": " + a + " type `" + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[S] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
355
- throw Z.name = "Invariant Violation", Z;
356
- }
357
- w = e[S](t, S, g, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
358
- } catch (W) {
359
- w = W;
360
- }
361
- w && !(w instanceof Error) && (Ee(M), f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", a, S, typeof w), Ee(null)), w instanceof Error && !(w.message in Xe) && (Xe[w.message] = !0, Ee(M), f("Failed %s type: %s", a, w.message), Ee(null));
362
- }
363
- }
364
- }
365
- var Sr = Array.isArray;
366
- function Ne(e) {
367
- return Sr(e);
368
- }
369
- function Ir(e) {
370
- {
371
- var t = typeof Symbol == "function" && Symbol.toStringTag, a = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
372
- return a;
373
- }
374
- }
375
- function Tr(e) {
376
- try {
377
- return Ue(e), !1;
378
- } catch {
379
- return !0;
380
- }
381
- }
382
- function Ue(e) {
383
- return "" + e;
384
- }
385
- function Ge(e) {
386
- if (Tr(e))
387
- return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ir(e)), Ue(e);
388
- }
389
- var ve = R.ReactCurrentOwner, Rr = {
390
- key: !0,
391
- ref: !0,
392
- __self: !0,
393
- __source: !0
394
- }, He, Je, $e;
395
- $e = {};
396
- function Mr(e) {
397
- if (de.call(e, "ref")) {
398
- var t = Object.getOwnPropertyDescriptor(e, "ref").get;
399
- if (t && t.isReactWarning)
400
- return !1;
401
- }
402
- return e.ref !== void 0;
403
- }
404
- function Er(e) {
405
- if (de.call(e, "key")) {
406
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
407
- if (t && t.isReactWarning)
408
- return !1;
409
- }
410
- return e.key !== void 0;
411
- }
412
- function _r(e, t) {
413
- if (typeof e.ref == "string" && ve.current && t && ve.current.stateNode !== t) {
414
- var a = G(ve.current.type);
415
- $e[a] || (f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', G(ve.current.type), e.ref), $e[a] = !0);
416
- }
417
- }
418
- function Pr(e, t) {
419
- {
420
- var a = function() {
421
- He || (He = !0, f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
422
- };
423
- a.isReactWarning = !0, Object.defineProperty(e, "key", {
424
- get: a,
425
- configurable: !0
426
- });
427
- }
428
- }
429
- function Dr(e, t) {
430
- {
431
- var a = function() {
432
- Je || (Je = !0, f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
433
- };
434
- a.isReactWarning = !0, Object.defineProperty(e, "ref", {
435
- get: a,
436
- configurable: !0
437
- });
438
- }
439
- }
440
- var Nr = function(e, t, a, g, M, O, S) {
441
- var w = {
442
- // This tag allows us to uniquely identify this as a React Element
443
- $$typeof: r,
444
- // Built-in properties that belong on the element
445
- type: e,
446
- key: t,
447
- ref: a,
448
- props: S,
449
- // Record the component responsible for creating this element.
450
- _owner: O
451
- };
452
- return w._store = {}, Object.defineProperty(w._store, "validated", {
453
- configurable: !1,
454
- enumerable: !1,
455
- writable: !0,
456
- value: !1
457
- }), Object.defineProperty(w, "_self", {
458
- configurable: !1,
459
- enumerable: !1,
460
- writable: !1,
461
- value: g
462
- }), Object.defineProperty(w, "_source", {
463
- configurable: !1,
464
- enumerable: !1,
465
- writable: !1,
466
- value: M
467
- }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
468
- };
469
- function $r(e, t, a, g, M) {
470
- {
471
- var O, S = {}, w = null, Z = null;
472
- a !== void 0 && (Ge(a), w = "" + a), Er(t) && (Ge(t.key), w = "" + t.key), Mr(t) && (Z = t.ref, _r(t, M));
473
- for (O in t)
474
- de.call(t, O) && !Rr.hasOwnProperty(O) && (S[O] = t[O]);
475
- if (e && e.defaultProps) {
476
- var W = e.defaultProps;
477
- for (O in W)
478
- S[O] === void 0 && (S[O] = W[O]);
479
- }
480
- if (w || Z) {
481
- var X = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
482
- w && Pr(S, X), Z && Dr(S, X);
483
- }
484
- return Nr(e, w, Z, M, g, ve.current, S);
485
- }
486
- }
487
- var Oe = R.ReactCurrentOwner, Ke = R.ReactDebugCurrentFrame;
488
- function fe(e) {
489
- if (e) {
490
- var t = e._owner, a = ee(e.type, e._source, t ? t.type : null);
491
- Ke.setExtraStackFrame(a);
492
- } else
493
- Ke.setExtraStackFrame(null);
494
- }
495
- var Be;
496
- Be = !1;
497
- function Ae(e) {
498
- return typeof e == "object" && e !== null && e.$$typeof === r;
499
- }
500
- function Ze() {
501
- {
502
- if (Oe.current) {
503
- var e = G(Oe.current.type);
504
- if (e)
505
- return `
506
-
507
- Check the render method of \`` + e + "`.";
508
- }
509
- return "";
510
- }
511
- }
512
- function Or(e) {
513
- return "";
514
- }
515
- var Qe = {};
516
- function Br(e) {
517
- {
518
- var t = Ze();
519
- if (!t) {
520
- var a = typeof e == "string" ? e : e.displayName || e.name;
521
- a && (t = `
522
-
523
- Check the top-level render call using <` + a + ">.");
524
- }
525
- return t;
526
- }
527
- }
528
- function er(e, t) {
529
- {
530
- if (!e._store || e._store.validated || e.key != null)
531
- return;
532
- e._store.validated = !0;
533
- var a = Br(t);
534
- if (Qe[a])
535
- return;
536
- Qe[a] = !0;
537
- var g = "";
538
- e && e._owner && e._owner !== Oe.current && (g = " It was passed a child from " + G(e._owner.type) + "."), fe(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, g), fe(null);
539
- }
540
- }
541
- function rr(e, t) {
542
- {
543
- if (typeof e != "object")
544
- return;
545
- if (Ne(e))
546
- for (var a = 0; a < e.length; a++) {
547
- var g = e[a];
548
- Ae(g) && er(g, t);
549
- }
550
- else if (Ae(e))
551
- e._store && (e._store.validated = !0);
552
- else if (e) {
553
- var M = m(e);
554
- if (typeof M == "function" && M !== e.entries)
555
- for (var O = M.call(e), S; !(S = O.next()).done; )
556
- Ae(S.value) && er(S.value, t);
557
- }
558
- }
559
- }
560
- function Ar(e) {
561
- {
562
- var t = e.type;
563
- if (t == null || typeof t == "string")
564
- return;
565
- var a;
566
- if (typeof t == "function")
567
- a = t.propTypes;
568
- else if (typeof t == "object" && (t.$$typeof === l || // Note: Memo only checks outer props here.
569
- // Inner props are checked in the reconciler.
570
- t.$$typeof === _))
571
- a = t.propTypes;
572
- else
573
- return;
574
- if (a) {
575
- var g = G(t);
576
- jr(a, e.props, "prop", g, e);
577
- } else if (t.PropTypes !== void 0 && !Be) {
578
- Be = !0;
579
- var M = G(t);
580
- f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
581
- }
582
- typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
583
- }
584
- }
585
- function Lr(e) {
586
- {
587
- for (var t = Object.keys(e.props), a = 0; a < t.length; a++) {
588
- var g = t[a];
589
- if (g !== "children" && g !== "key") {
590
- fe(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), fe(null);
591
- break;
592
- }
593
- }
594
- e.ref !== null && (fe(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), fe(null));
595
- }
596
- }
597
- var or = {};
598
- function tr(e, t, a, g, M, O) {
599
- {
600
- var S = ce(e);
601
- if (!S) {
602
- var w = "";
603
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
604
- var Z = Or();
605
- Z ? w += Z : w += Ze();
606
- var W;
607
- e === null ? W = "null" : Ne(e) ? W = "array" : e !== void 0 && e.$$typeof === r ? (W = "<" + (G(e.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : W = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, w);
608
- }
609
- var X = $r(e, t, a, M, O);
610
- if (X == null)
611
- return X;
612
- if (S) {
613
- var ae = t.children;
614
- if (ae !== void 0)
615
- if (g)
616
- if (Ne(ae)) {
617
- for (var he = 0; he < ae.length; he++)
618
- rr(ae[he], e);
619
- Object.freeze && Object.freeze(ae);
620
- } else
621
- f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
622
- else
623
- rr(ae, e);
624
- }
625
- if (de.call(t, "key")) {
626
- var ue = G(e), re = Object.keys(t).filter(function(Xr) {
627
- return Xr !== "key";
628
- }), Le = re.length > 0 ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}";
629
- if (!or[ue + Le]) {
630
- var Vr = re.length > 0 ? "{" + re.join(": ..., ") + ": ...}" : "{}";
631
- f(`A props object containing a "key" prop is being spread into JSX:
632
- let props = %s;
633
- <%s {...props} />
634
- React keys must be passed directly to JSX without using spread:
635
- let props = %s;
636
- <%s key={someKey} {...props} />`, Le, ue, Vr, ue), or[ue + Le] = !0;
637
- }
638
- }
639
- return e === n ? Lr(X) : Ar(X), X;
640
- }
641
- }
642
- function Fr(e, t, a) {
643
- return tr(e, t, a, !0);
644
- }
645
- function zr(e, t, a) {
646
- return tr(e, t, a, !1);
647
- }
648
- var Yr = zr, Wr = Fr;
649
- we.Fragment = n, we.jsx = Yr, we.jsxs = Wr;
650
- }()), we;
651
- }
652
- var lr;
653
- function Vo() {
654
- return lr || (lr = 1, process.env.NODE_ENV === "production" ? Pe.exports = Yo() : Pe.exports = Wo()), Pe.exports;
655
- }
656
- var o = Vo();
657
- const mr = {
5
+ import { jsx as o, jsxs as H, Fragment as ce } from "react/jsx-runtime";
6
+ import { cx as D, css as i } from "@emotion/css";
7
+ import { createContext as fe, useMemo as le, useContext as be, useState as F, useRef as te, useEffect as oe } from "react";
8
+ import Ee from "react-slick";
9
+ import { ReactSortable as de } from "react-sortablejs";
10
+ import { AnimatePresence as ue, motion as f, useMotionValue as Xe, useTransform as ee, useSpring as ne } from "framer-motion";
11
+ import { useLocalStorageState as Fe, useDebounceEffect as Ge } from "ahooks";
12
+ import { v4 as he } from "uuid";
13
+ import He from "rc-tooltip";
14
+ import { RiPencilRuler2Line as qe, RiShareLine as Ye, RiInformationLine as Ve, RiCloseCircleLine as _e, RiMoreLine as Oe } from "@remixicon/react";
15
+ import ke from "rc-dialog";
16
+ import Ue from "react-json-view";
17
+ import { MDXEditor as We, toolbarPlugin as Je, DiffSourceToggleWrapper as Ke, UndoRedo as Ze, Separator as J, BoldItalicUnderlineToggles as Qe, CodeToggle as eo, StrikeThroughSupSubToggles as oo, ListsToggle as to, CreateLink as ro, InsertImage as no, InsertTable as lo, InsertThematicBreak as ao, InsertCodeBlock as io, InsertFrontmatter as so, diffSourcePlugin as co, listsPlugin as uo, quotePlugin as mo, headingsPlugin as go, linkPlugin as po, linkDialogPlugin as ho, imagePlugin as fo, tablePlugin as bo, thematicBreakPlugin as ko, frontmatterPlugin as vo, codeBlockPlugin as xo, codeMirrorPlugin as wo, markdownShortcutPlugin as Co, directivesPlugin as yo, AdmonitionDirectiveDescriptor as Io } from "@mdxeditor/editor";
18
+ import Mo from "react-markdown";
19
+ import So from "remark-gfm";
20
+ import To from "remark-emoji";
21
+ import No from "rehype-raw";
22
+ import { Prism as Bo } from "react-syntax-highlighter";
23
+ import { clsx as Do } from "clsx";
24
+ import { twMerge as $o } from "tailwind-merge";
25
+ const ve = {
658
26
  token: {
659
27
  itemNameColor: "#1a1a1a",
660
28
  itemIconBackgroundColor: "white",
@@ -667,7 +35,7 @@ const mr = {
667
35
  contextMenuBackgroundColor: "white",
668
36
  contextMenuShadowColor: "rgba(0, 0, 0, 0.1)"
669
37
  }
670
- }, gr = {
38
+ }, xe = {
671
39
  token: {
672
40
  itemNameColor: "white",
673
41
  itemIconBackgroundColor: "#1f2937",
@@ -680,28 +48,28 @@ const mr = {
680
48
  contextMenuBackgroundColor: "#1a1a1a",
681
49
  contextMenuShadowColor: "rgba(255, 255, 255, 0.1)"
682
50
  }
683
- }, pr = cr(
51
+ }, we = fe(
684
52
  {}
685
- ), Xo = (d) => {
686
- const { children: r, theme: i, ...n } = d, c = De(() => i === "light" ? mr : i === "dark" ? gr : i, [i]);
687
- return /* @__PURE__ */ o.jsx(pr.Provider, { value: { theme: c, ...n }, children: r });
688
- }, ge = () => dr(pr), fr = {
53
+ ), Po = (a) => {
54
+ const { children: e, theme: r, ...t } = a, l = le(() => r === "light" ? ve : r === "dark" ? xe : r, [r]);
55
+ return /* @__PURE__ */ o(we.Provider, { value: { theme: l, ...t }, children: e });
56
+ }, K = () => be(we), Ce = {
689
57
  maxRow: 2,
690
58
  maxCol: 2
691
- }, qo = {
692
- ...fr
693
- }, hr = {
694
- app: fr,
695
- group: qo
59
+ }, Ro = {
60
+ ...Ce
61
+ }, ye = {
62
+ app: Ce,
63
+ group: Ro
696
64
  };
697
- class ie {
65
+ class q {
698
66
  }
699
67
  /** 清理重复id */
700
- Fe(ie, "uniqueArray", (r) => r.reduce((i, n) => i.find((s) => s.id === n.id) ? i : i.concat([n]), [])), Fe(ie, "getTheme", (r) => {
701
- const i = mr.token, n = gr.token, c = { ...i, ...r == null ? void 0 : r.token }, s = { ...n, ...r == null ? void 0 : r.token };
702
- return { light: c, dark: s };
68
+ ie(q, "uniqueArray", (e) => e.reduce((r, t) => r.find((n) => n.id === t.id) ? r : r.concat([t]), [])), ie(q, "getTheme", (e) => {
69
+ const r = ve.token, t = xe.token, l = { ...r, ...e == null ? void 0 : e.token }, n = { ...t, ...e == null ? void 0 : e.token };
70
+ return { light: l, dark: n };
703
71
  });
704
- const br = cr({
72
+ const Ie = fe({
705
73
  list: [],
706
74
  setList: () => {
707
75
  },
@@ -736,197 +104,197 @@ const br = cr({
736
104
  moveTargetId: null,
737
105
  setMoveTargetId: () => {
738
106
  }
739
- }), Uo = (d) => {
107
+ }), Lo = (a) => {
740
108
  const {
741
- children: r,
742
- list: i = [],
743
- onChange: n,
744
- storageKey: c = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
745
- enableCaching: s = !0
746
- } = d, [u, h] = Q(), [l, y] = Q(), [v, _] = Q(null), E = Ce(v), [F, z] = Q(null), [b, m] = Q([]), [R, f] = Q(
109
+ children: e,
110
+ list: r = [],
111
+ onChange: t,
112
+ storageKey: l = "ZS_LIBRARY_DESKTOP_SORTABLE_CONFIG",
113
+ enableCaching: n = !0
114
+ } = a, [d, p] = F(), [s, v] = F(), [C, R] = F(null), T = te(C), [A, L] = F(null), [u, c] = F([]), [I, x] = F(
747
115
  null
748
- ), [Y, k] = Q(
116
+ ), [$, m] = F(
749
117
  null
750
- ), [N, P] = Q(!1), [x, C] = Q(null), [U, ce] = Q(
118
+ ), [y, w] = F(!1), [g, h] = F(null), [j, O] = F(
751
119
  null
752
- ), [H, pe] = Q(!1), [G, oe] = Jr(c, {
120
+ ), [E, ae] = F(!1), [U, Q] = Fe(l, {
753
121
  defaultValue: [],
754
122
  listenStorageChange: !0
755
- }), le = () => {
756
- z(null), clearTimeout(u), h(void 0), E.current = null;
757
- }, A = (I, K) => {
758
- z({ ...I, pageX: I.pageX, pageY: I.pageY, data: K }), clearTimeout(u);
759
- }, ne = (I, K = !0) => {
760
- const { config: J = {} } = I;
761
- return J.allowContextMenu === !1 ? {} : {
762
- onMouseDown: ($) => {
763
- h(
123
+ }), re = () => {
124
+ L(null), clearTimeout(d), p(void 0), T.current = null;
125
+ }, N = (b, G) => {
126
+ L({ ...b, pageX: b.pageX, pageY: b.pageY, data: G }), clearTimeout(d);
127
+ }, V = (b, G = !0) => {
128
+ const { config: X = {} } = b;
129
+ return X.allowContextMenu === !1 ? {} : {
130
+ onMouseDown: (M) => {
131
+ p(
764
132
  setTimeout(() => {
765
- K && E.current === null && A($, I);
133
+ G && T.current === null && N(M, b);
766
134
  }, 800)
767
- ), P(!1), y(
135
+ ), w(!1), v(
768
136
  setTimeout(() => {
769
- P(!0);
137
+ w(!0);
770
138
  }, 800)
771
139
  );
772
140
  },
773
141
  onMouseUp: () => {
774
- clearTimeout(l), y(void 0), clearTimeout(u), h(void 0);
142
+ clearTimeout(s), v(void 0), clearTimeout(d), p(void 0);
775
143
  },
776
- onContextMenu: ($) => {
777
- K && ($.preventDefault(), A($, I));
144
+ onContextMenu: (M) => {
145
+ G && (M.preventDefault(), N(M, b));
778
146
  }
779
147
  };
780
- }, se = (I, K) => {
781
- const J = [...K || []];
782
- if (J.length > 0)
783
- m(($) => {
784
- const L = [...$], B = (j) => {
785
- var Re, Me;
786
- const D = J.shift(), q = j.find((ee) => ee.id === D), te = j.findIndex((ee) => ee.id === D);
787
- if (J.length && q) {
788
- if (((Re = q.children) == null ? void 0 : Re.filter(
789
- (ee) => !I.some((de) => de.id === ee.id)
790
- ).length) === 1 && I.length === 1) {
791
- const ee = { ...I[0] };
792
- return j.splice(te, 1, ee), n == null || n(j), j;
148
+ }, W = (b, G) => {
149
+ const X = [...G || []];
150
+ if (X.length > 0)
151
+ c((M) => {
152
+ const P = [...M], B = (k) => {
153
+ var ge, pe;
154
+ const S = X.shift(), z = k.find((_) => _.id === S), Y = k.findIndex((_) => _.id === S);
155
+ if (X.length && z) {
156
+ if (((ge = z.children) == null ? void 0 : ge.filter(
157
+ (_) => !b.some((ze) => ze.id === _.id)
158
+ ).length) === 1 && b.length === 1) {
159
+ const _ = { ...b[0] };
160
+ return k.splice(Y, 1, _), t == null || t(k), k;
793
161
  }
794
- return q.children = B(q.children || []), j.splice(te, 1, q), n == null || n(j), j;
162
+ return z.children = B(z.children || []), k.splice(Y, 1, z), t == null || t(k), k;
795
163
  }
796
- if (q) {
797
- if (!((Me = q.children) != null && Me.length) && I.length) {
798
- const ee = { ...q };
799
- return q.data = { name: "文件夹" }, q.type = "group", q.children = [ee, ...I], q.id = nr(), j.splice(te, 1, q), n == null || n(j), j;
164
+ if (z) {
165
+ if (!((pe = z.children) != null && pe.length) && b.length) {
166
+ const _ = { ...z };
167
+ return z.data = { name: "文件夹" }, z.type = "group", z.children = [_, ...b], z.id = he(), k.splice(Y, 1, z), t == null || t(k), k;
800
168
  }
801
- return q.children = ie.uniqueArray(I), j.splice(te, 1, q), n == null || n(j), j;
169
+ return z.children = q.uniqueArray(b), k.splice(Y, 1, z), t == null || t(k), k;
802
170
  }
803
- return ie.uniqueArray(I);
171
+ return q.uniqueArray(b);
804
172
  };
805
- return ie.uniqueArray(B(L));
173
+ return q.uniqueArray(B(P));
806
174
  });
807
175
  else {
808
- const $ = ie.uniqueArray(I);
809
- n == null || n($), m($);
810
- }
811
- }, je = (I, K) => {
812
- m((J) => {
813
- const $ = [...J], L = (B) => {
814
- var j;
815
- for (let D = 0; D < B.length; D++)
816
- if (B[D].id === I) {
817
- B[D].config = K;
176
+ const M = q.uniqueArray(b);
177
+ t == null || t(M), c(M);
178
+ }
179
+ }, $e = (b, G) => {
180
+ c((X) => {
181
+ const M = [...X], P = (B) => {
182
+ var k;
183
+ for (let S = 0; S < B.length; S++)
184
+ if (B[S].id === b) {
185
+ B[S].config = G;
818
186
  break;
819
- } else ((j = B[D].children) == null ? void 0 : j.length) !== void 0 && L(B[D].children);
187
+ } else ((k = B[S].children) == null ? void 0 : k.length) !== void 0 && P(B[S].children);
820
188
  };
821
- return L($), n == null || n($), $;
189
+ return P(M), t == null || t(M), M;
822
190
  });
823
- }, Se = (I, K) => {
824
- m((J) => {
825
- const $ = [...J], L = (B) => {
826
- var j;
827
- for (let D = 0; D < B.length; D++)
828
- if (B[D].id === I) {
829
- B[D].data = K;
191
+ }, Pe = (b, G) => {
192
+ c((X) => {
193
+ const M = [...X], P = (B) => {
194
+ var k;
195
+ for (let S = 0; S < B.length; S++)
196
+ if (B[S].id === b) {
197
+ B[S].data = G;
830
198
  break;
831
- } else ((j = B[D].children) == null ? void 0 : j.length) !== void 0 && L(B[D].children);
199
+ } else ((k = B[S].children) == null ? void 0 : k.length) !== void 0 && P(B[S].children);
832
200
  };
833
- return L($), n == null || n($), $;
201
+ return P(M), t == null || t(M), M;
834
202
  });
835
- }, Ie = (I) => {
836
- m((K) => {
837
- const J = [...K], $ = (L) => {
203
+ }, Re = (b) => {
204
+ c((G) => {
205
+ const X = [...G], M = (P) => {
838
206
  var B;
839
- for (let j = 0; j < L.length; j++)
840
- if (L[j].id === I) {
841
- L.splice(j, 1);
207
+ for (let k = 0; k < P.length; k++)
208
+ if (P[k].id === b) {
209
+ P.splice(k, 1);
842
210
  break;
843
- } else ((B = L[j].children) == null ? void 0 : B.length) !== void 0 && $(L[j].children);
211
+ } else ((B = P[k].children) == null ? void 0 : B.length) !== void 0 && M(P[k].children);
844
212
  };
845
- return $(J), n == null || n(J), J;
213
+ return M(X), t == null || t(X), X;
846
214
  });
847
- }, Te = (I, K) => {
848
- const J = [...b], $ = (L, B) => {
849
- const j = B.shift(), D = L.find((te) => te.id === j), q = L.findIndex((te) => te.id === j);
850
- if (D) {
215
+ }, Le = (b, G) => {
216
+ const X = [...u], M = (P, B) => {
217
+ const k = B.shift(), S = P.find((Y) => Y.id === k), z = P.findIndex((Y) => Y.id === k);
218
+ if (S) {
851
219
  if (B.length)
852
- D.children = $(D.children || [], B);
220
+ S.children = M(S.children || [], B);
853
221
  else {
854
- const te = (I == null ? void 0 : I.type) ?? "app";
855
- D.children = [
856
- ...D.children ?? [],
222
+ const Y = (b == null ? void 0 : b.type) ?? "app";
223
+ S.children = [
224
+ ...S.children ?? [],
857
225
  {
858
- ...I,
859
- id: nr(),
860
- config: (I == null ? void 0 : I.config) ?? hr[te]
226
+ ...b,
227
+ id: he(),
228
+ config: (b == null ? void 0 : b.config) ?? ye[Y]
861
229
  }
862
230
  ];
863
231
  }
864
- return L.splice(q, 1, D), L;
232
+ return P.splice(z, 1, S), P;
865
233
  } else
866
- return L;
234
+ return P;
867
235
  };
868
- m($(J, K));
236
+ c(M(X, G));
869
237
  };
870
- return ye(() => {
871
- (i == null ? void 0 : i.length) > 0 && b.length === 0 && se(i);
872
- }, [i]), ye(() => {
873
- E.current = v, v !== null && le();
874
- }, [v]), ye(() => {
875
- s && G != null && G.length && !H && (se(G), pe(!0));
876
- }, [G, H, s]), Kr(
238
+ return oe(() => {
239
+ (r == null ? void 0 : r.length) > 0 && u.length === 0 && W(r);
240
+ }, [r]), oe(() => {
241
+ T.current = C, C !== null && re();
242
+ }, [C]), oe(() => {
243
+ n && U != null && U.length && !E && (W(U), ae(!0));
244
+ }, [U, E, n]), Ge(
877
245
  () => {
878
- s && oe(b);
246
+ n && Q(u);
879
247
  },
880
- [b, s],
248
+ [u, n],
881
249
  {
882
250
  wait: 1e3
883
251
  }
884
- ), /* @__PURE__ */ o.jsx(
885
- br.Provider,
252
+ ), /* @__PURE__ */ o(
253
+ Ie.Provider,
886
254
  {
887
255
  value: {
888
- list: b,
889
- setList: se,
890
- contextMenu: F,
891
- setContextMenu: z,
892
- listStatus: v,
893
- setListStatus: _,
894
- contextMenuFuns: ne,
895
- hideContextMenu: le,
896
- showInfoItemData: R,
897
- setShowInfoItemData: f,
898
- openGroupItemData: Y,
899
- setOpenGroupItemData: k,
900
- longPressTriggered: N,
901
- updateItemConfig: je,
902
- updateItem: Se,
903
- removeItem: Ie,
904
- addItem: Te,
905
- moveItemId: x,
906
- setMoveItemId: C,
907
- moveTargetId: U,
908
- setMoveTargetId: ce
256
+ list: u,
257
+ setList: W,
258
+ contextMenu: A,
259
+ setContextMenu: L,
260
+ listStatus: C,
261
+ setListStatus: R,
262
+ contextMenuFuns: V,
263
+ hideContextMenu: re,
264
+ showInfoItemData: I,
265
+ setShowInfoItemData: x,
266
+ openGroupItemData: $,
267
+ setOpenGroupItemData: m,
268
+ longPressTriggered: y,
269
+ updateItemConfig: $e,
270
+ updateItem: Pe,
271
+ removeItem: Re,
272
+ addItem: Le,
273
+ moveItemId: g,
274
+ setMoveItemId: h,
275
+ moveTargetId: j,
276
+ setMoveTargetId: O
909
277
  },
910
- children: r
278
+ children: e
911
279
  }
912
280
  );
913
- }, be = () => dr(br), Go = {
281
+ }, Z = () => be(Ie), zo = {
914
282
  menuShow: {
915
283
  opacity: 1,
916
284
  y: 0,
917
285
  transition: { type: "spring", stiffness: 300, damping: 24 }
918
286
  },
919
287
  menuHide: { opacity: 0, y: 20, transition: { duration: 0.2 } }
920
- }, ze = (d) => {
921
- const { icon: r, title: i, onClick: n } = d, { theme: c } = ge(), { light: s, dark: u } = ie.getTheme(c);
922
- return /* @__PURE__ */ o.jsx(
923
- T.div,
288
+ }, se = (a) => {
289
+ const { icon: e, title: r, onClick: t } = a, { theme: l } = K(), { light: n, dark: d } = q.getTheme(l);
290
+ return /* @__PURE__ */ o(
291
+ f.div,
924
292
  {
925
- className: p`
293
+ className: i`
926
294
  &:hover {
927
- background-color: ${s.contextMenuActiveColor};
295
+ background-color: ${n.contextMenuActiveColor};
928
296
  @media (prefers-color-scheme: dark) {
929
- background-color: ${u.contextMenuActiveColor};
297
+ background-color: ${d.contextMenuActiveColor};
930
298
  }
931
299
  }
932
300
  @media (prefers-color-scheme: dark) {
@@ -939,16 +307,16 @@ const br = cr({
939
307
  user-select: none;
940
308
  border-radius: 0.5rem;
941
309
  `,
942
- onClick: (h) => {
943
- h.stopPropagation(), n == null || n();
310
+ onClick: (p) => {
311
+ p.stopPropagation(), t == null || t();
944
312
  },
945
- variants: Go,
946
- children: /* @__PURE__ */ o.jsxs(
947
- T.div,
313
+ variants: zo,
314
+ children: /* @__PURE__ */ H(
315
+ f.div,
948
316
  {
949
- className: V(
317
+ className: D(
950
318
  "py-1.5 px-3 rounded-lg",
951
- p`
319
+ i`
952
320
  padding-top: 0.375rem;
953
321
  padding-bottom: 0.375rem;
954
322
  padding-left: 0.75rem;
@@ -958,78 +326,78 @@ const br = cr({
958
326
  ),
959
327
  whileTap: { scale: 0.9 },
960
328
  children: [
961
- /* @__PURE__ */ o.jsx(
962
- T.div,
329
+ /* @__PURE__ */ o(
330
+ f.div,
963
331
  {
964
- className: V(
965
- p`
332
+ className: D(
333
+ i`
966
334
  margin-bottom: 0.375rem;
967
335
  display: flex;
968
336
  justify-content: center;
969
337
  `
970
338
  ),
971
- children: r
339
+ children: e
972
340
  }
973
341
  ),
974
- /* @__PURE__ */ o.jsx(T.div, { children: i })
342
+ /* @__PURE__ */ o(f.div, { children: r })
975
343
  ]
976
344
  }
977
345
  )
978
346
  }
979
347
  );
980
- }, Ho = (d) => {
348
+ }, Ao = (a) => {
981
349
  const {
982
- showInfoButton: r = !0,
983
- showRemoveButton: i = !0,
984
- showShareButton: n = !0,
985
- showSizeButton: c = !0,
986
- onInfoClick: s,
987
- onShareClick: u,
988
- onRemoveClick: h
989
- } = d, {
990
- contextMenu: l,
991
- setContextMenu: y,
992
- hideContextMenu: v,
993
- setShowInfoItemData: _,
994
- removeItem: E,
995
- updateItemConfig: F
996
- } = be(), { theme: z } = ge(), { light: b, dark: m } = ie.getTheme(z), { data: R } = l ?? {}, { config: f = {} } = R ?? {}, Y = () => {
997
- var P;
998
- const k = hr[(P = l == null ? void 0 : l.data) == null ? void 0 : P.type], N = [];
999
- for (let x = 1; x <= ((k == null ? void 0 : k.maxRow) ?? 2); x++)
1000
- for (let C = 1; C <= ((k == null ? void 0 : k.maxCol) ?? 2); C++)
1001
- N.push(`${x}x${C}`);
1002
- return N;
350
+ showInfoButton: e = !0,
351
+ showRemoveButton: r = !0,
352
+ showShareButton: t = !0,
353
+ showSizeButton: l = !0,
354
+ onInfoClick: n,
355
+ onShareClick: d,
356
+ onRemoveClick: p
357
+ } = a, {
358
+ contextMenu: s,
359
+ setContextMenu: v,
360
+ hideContextMenu: C,
361
+ setShowInfoItemData: R,
362
+ removeItem: T,
363
+ updateItemConfig: A
364
+ } = Z(), { theme: L } = K(), { light: u, dark: c } = q.getTheme(L), { data: I } = s ?? {}, { config: x = {} } = I ?? {}, $ = () => {
365
+ var w;
366
+ const m = ye[(w = s == null ? void 0 : s.data) == null ? void 0 : w.type], y = [];
367
+ for (let g = 1; g <= ((m == null ? void 0 : m.maxRow) ?? 2); g++)
368
+ for (let h = 1; h <= ((m == null ? void 0 : m.maxCol) ?? 2); h++)
369
+ y.push(`${g}x${h}`);
370
+ return y;
1003
371
  };
1004
- return /* @__PURE__ */ o.jsx(We, { children: l && /* @__PURE__ */ o.jsxs(
1005
- T.div,
372
+ return /* @__PURE__ */ o(ue, { children: s && /* @__PURE__ */ H(
373
+ f.div,
1006
374
  {
1007
375
  initial: { opacity: 0 },
1008
376
  animate: { opacity: 1 },
1009
377
  exit: { opacity: 0 },
1010
- onMouseDown: (k) => {
1011
- k.stopPropagation(), k.preventDefault();
378
+ onMouseDown: (m) => {
379
+ m.stopPropagation(), m.preventDefault();
1012
380
  },
1013
381
  children: [
1014
- /* @__PURE__ */ o.jsx(
1015
- T.div,
382
+ /* @__PURE__ */ o(
383
+ f.div,
1016
384
  {
1017
- className: V(
1018
- p`
385
+ className: D(
386
+ i`
1019
387
  border-radius: 0.5rem;
1020
388
  overflow: hidden;
1021
- background-color: ${b.contextMenuBackgroundColor};
1022
- box-shadow: 0 0 0.5rem ${b.contextMenuShadowColor};
389
+ background-color: ${u.contextMenuBackgroundColor};
390
+ box-shadow: 0 0 0.5rem ${u.contextMenuShadowColor};
1023
391
  @media (prefers-color-scheme: dark) {
1024
- background-color: ${m.contextMenuBackgroundColor};
1025
- box-shadow: 0 0 0.5rem ${m.contextMenuShadowColor};
392
+ background-color: ${c.contextMenuBackgroundColor};
393
+ box-shadow: 0 0 0.5rem ${c.contextMenuShadowColor};
1026
394
  }
1027
395
  `
1028
396
  ),
1029
- children: c && f.allowResize !== !1 && /* @__PURE__ */ o.jsx(
1030
- T.ul,
397
+ children: l && x.allowResize !== !1 && /* @__PURE__ */ o(
398
+ f.ul,
1031
399
  {
1032
- className: p`
400
+ className: i`
1033
401
  background-color: white;
1034
402
  padding: 0.25rem;
1035
403
  margin: 0;
@@ -1038,33 +406,33 @@ const br = cr({
1038
406
  {
1039
407
  label: "修改大小",
1040
408
  key: "size",
1041
- icon: /* @__PURE__ */ o.jsx(Qr, { size: 14 }),
1042
- items: Y().map((k) => ({
1043
- label: k,
1044
- key: k,
409
+ icon: /* @__PURE__ */ o(qe, { size: 14 }),
410
+ items: $().map((m) => ({
411
+ label: m,
412
+ key: m,
1045
413
  onClick: () => {
1046
- const [N, P] = k.split("x").map(Number);
1047
- F(l.data.id, {
1048
- row: N,
1049
- col: P
414
+ const [y, w] = m.split("x").map(Number);
415
+ A(s.data.id, {
416
+ row: y,
417
+ col: w
1050
418
  });
1051
419
  }
1052
420
  }))
1053
421
  }
1054
- ].map((k) => /* @__PURE__ */ o.jsxs(
1055
- T.li,
422
+ ].map((m) => /* @__PURE__ */ H(
423
+ f.li,
1056
424
  {
1057
- className: p`
425
+ className: i`
1058
426
  padding-top: 0.5rem;
1059
427
  padding-bottom: 0.5rem;
1060
428
  padding-left: 0.75rem;
1061
429
  padding-right: 0.75rem;
1062
430
  `,
1063
431
  children: [
1064
- /* @__PURE__ */ o.jsxs(
1065
- T.p,
432
+ /* @__PURE__ */ H(
433
+ f.p,
1066
434
  {
1067
- className: p`
435
+ className: i`
1068
436
  display: flex;
1069
437
  align-items: center;
1070
438
  font-size: 0.875rem;
@@ -1074,26 +442,26 @@ const br = cr({
1074
442
  margin: 0;
1075
443
  `,
1076
444
  children: [
1077
- k.icon,
445
+ m.icon,
1078
446
  " ",
1079
- k.label
447
+ m.label
1080
448
  ]
1081
449
  }
1082
450
  ),
1083
- /* @__PURE__ */ o.jsx(
1084
- T.div,
451
+ /* @__PURE__ */ o(
452
+ f.div,
1085
453
  {
1086
- className: p`
454
+ className: i`
1087
455
  display: grid;
1088
456
  grid-template-columns: repeat(2, minmax(0, 1fr));
1089
457
  gap: 0.25rem;
1090
458
  `,
1091
- children: k.items.map((N) => /* @__PURE__ */ o.jsx(
1092
- T.div,
459
+ children: m.items.map((y) => /* @__PURE__ */ o(
460
+ f.div,
1093
461
  {
1094
- className: V(
462
+ className: D(
1095
463
  "py-1 px-2 hover:bg-gray-100 rounded transition-all cursor-pointer text-center text-sm",
1096
- p`
464
+ i`
1097
465
  padding-top: 0.25rem;
1098
466
  padding-bottom: 0.25rem;
1099
467
  padding-left: 0.5rem;
@@ -1104,49 +472,49 @@ const br = cr({
1104
472
  line-height: 1.25rem;
1105
473
  cursor: pointer;
1106
474
  text-align: center;
1107
- color: ${b.contextMenuTextColor};
475
+ color: ${u.contextMenuTextColor};
1108
476
  @media (prefers-color-scheme: dark) {
1109
- color: ${m.contextMenuTextColor};
477
+ color: ${c.contextMenuTextColor};
1110
478
  }
1111
479
  &:hover {
1112
- background-color: ${b.contextMenuActiveColor};
480
+ background-color: ${u.contextMenuActiveColor};
1113
481
  @media (prefers-color-scheme: dark) {
1114
- background-color: ${m.contextMenuActiveColor};
482
+ background-color: ${c.contextMenuActiveColor};
1115
483
  }
1116
484
  }
1117
485
  `,
1118
- `${f.row}x${f.col}` === N.key && p`
1119
- background-color: ${b.contextMenuActiveColor};
486
+ `${x.row}x${x.col}` === y.key && i`
487
+ background-color: ${u.contextMenuActiveColor};
1120
488
  @media (prefers-color-scheme: dark) {
1121
- background-color: ${m.contextMenuActiveColor};
489
+ background-color: ${c.contextMenuActiveColor};
1122
490
  }
1123
491
  `
1124
492
  ),
1125
- onClick: N.onClick,
1126
- children: N.label
493
+ onClick: y.onClick,
494
+ children: y.label
1127
495
  },
1128
- N.key
496
+ y.key
1129
497
  ))
1130
498
  }
1131
499
  )
1132
500
  ]
1133
501
  },
1134
- k.key
502
+ m.key
1135
503
  ))
1136
504
  }
1137
505
  )
1138
506
  }
1139
507
  ),
1140
- /* @__PURE__ */ o.jsxs(
1141
- T.div,
508
+ /* @__PURE__ */ H(
509
+ f.div,
1142
510
  {
1143
- className: V(
1144
- p`
1145
- background-color: ${b.contextMenuBackgroundColor};
1146
- box-shadow: 0 0 0.5rem ${b.contextMenuShadowColor};
511
+ className: D(
512
+ i`
513
+ background-color: ${u.contextMenuBackgroundColor};
514
+ box-shadow: 0 0 0.5rem ${u.contextMenuShadowColor};
1147
515
  @media (prefers-color-scheme: dark) {
1148
- background-color: ${m.contextMenuBackgroundColor};
1149
- box-shadow: 0 0 0.5rem ${m.contextMenuShadowColor};
516
+ background-color: ${c.contextMenuBackgroundColor};
517
+ box-shadow: 0 0 0.5rem ${c.contextMenuShadowColor};
1150
518
  }
1151
519
  display: flex;
1152
520
  justify-content: space-around;
@@ -1158,48 +526,48 @@ const br = cr({
1158
526
  `
1159
527
  ),
1160
528
  children: [
1161
- n && /* @__PURE__ */ o.jsx(
1162
- ze,
529
+ t && /* @__PURE__ */ o(
530
+ se,
1163
531
  {
1164
- icon: /* @__PURE__ */ o.jsx(eo, { size: 20 }),
532
+ icon: /* @__PURE__ */ o(Ye, { size: 20 }),
1165
533
  title: "分享",
1166
534
  onClick: () => {
1167
- if (u) {
1168
- u(l.data);
535
+ if (d) {
536
+ d(s.data);
1169
537
  return;
1170
538
  }
1171
539
  }
1172
540
  }
1173
541
  ),
1174
- r && /* @__PURE__ */ o.jsx(
1175
- ze,
542
+ e && /* @__PURE__ */ o(
543
+ se,
1176
544
  {
1177
- icon: /* @__PURE__ */ o.jsx(ro, { size: 20 }),
545
+ icon: /* @__PURE__ */ o(Ve, { size: 20 }),
1178
546
  title: "信息",
1179
547
  onClick: () => {
1180
- if (s) {
1181
- s(l.data);
548
+ if (n) {
549
+ n(s.data);
1182
550
  return;
1183
551
  }
1184
- _({
1185
- ...l.data,
1186
- pageX: l.pageX,
1187
- pageY: l.pageY
1188
- }), v();
552
+ R({
553
+ ...s.data,
554
+ pageX: s.pageX,
555
+ pageY: s.pageY
556
+ }), C();
1189
557
  }
1190
558
  }
1191
559
  ),
1192
- i && /* @__PURE__ */ o.jsx(
1193
- ze,
560
+ r && /* @__PURE__ */ o(
561
+ se,
1194
562
  {
1195
- icon: /* @__PURE__ */ o.jsx(oo, { size: 20 }),
563
+ icon: /* @__PURE__ */ o(_e, { size: 20 }),
1196
564
  title: "移除",
1197
565
  onClick: () => {
1198
- if (h) {
1199
- h(l.data, E);
566
+ if (p) {
567
+ p(s.data, T);
1200
568
  return;
1201
569
  }
1202
- y(null), E(l.data.id);
570
+ v(null), T(s.data.id);
1203
571
  }
1204
572
  }
1205
573
  )
@@ -1209,84 +577,84 @@ const br = cr({
1209
577
  ]
1210
578
  }
1211
579
  ) });
1212
- }, Jo = (d) => {
1213
- const { data: r, noLetters: i = !1 } = d, { contextMenuFuns: n } = be(), { itemIconBuilder: c, theme: s, contextMenu: u } = ge(), { light: h, dark: l } = ie.getTheme(s), { data: y = {} } = r, { name: v } = y;
1214
- return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1215
- /* @__PURE__ */ o.jsx(
1216
- T.div,
580
+ }, jo = (a) => {
581
+ const { data: e, noLetters: r = !1 } = a, { contextMenuFuns: t } = Z(), { itemIconBuilder: l, theme: n, contextMenu: d } = K(), { light: p, dark: s } = q.getTheme(n), { data: v = {} } = e, { name: C } = v;
582
+ return /* @__PURE__ */ H(ce, { children: [
583
+ /* @__PURE__ */ o(
584
+ f.div,
1217
585
  {
1218
- className: p`
586
+ className: i`
1219
587
  width: 4rem;
1220
588
  height: 4rem;
1221
- background-color: ${h.itemIconBackgroundColor};
589
+ background-color: ${p.itemIconBackgroundColor};
1222
590
  border-radius: 0.75rem;
1223
- box-shadow: 0 0 0.5rem ${h.itemIconShadowColor};
591
+ box-shadow: 0 0 0.5rem ${p.itemIconShadowColor};
1224
592
  cursor: pointer;
1225
593
  position: relative;
1226
594
  overflow: hidden;
1227
595
  @media (prefers-color-scheme: dark) {
1228
- background-color: ${l.itemIconBackgroundColor};
1229
- box-shadow: 0 0 0.5rem ${l.itemIconShadowColor};
596
+ background-color: ${s.itemIconBackgroundColor};
597
+ box-shadow: 0 0 0.5rem ${s.itemIconShadowColor};
1230
598
  }
1231
599
  `,
1232
600
  whileTap: { scale: 0.9 },
1233
- children: /* @__PURE__ */ o.jsx(
601
+ children: /* @__PURE__ */ o(
1234
602
  "div",
1235
603
  {
1236
- className: p`
604
+ className: i`
1237
605
  position: absolute;
1238
606
  left: 0;
1239
607
  top: 0;
1240
608
  width: 100%;
1241
609
  height: 100%;
1242
- color: ${h.itemNameColor};
610
+ color: ${p.itemNameColor};
1243
611
  @media (prefers-color-scheme: dark) {
1244
- color: ${l.itemNameColor};
612
+ color: ${s.itemNameColor};
1245
613
  }
1246
614
  `,
1247
- ...n(r, u !== !1),
1248
- children: c == null ? void 0 : c(r)
615
+ ...t(e, d !== !1),
616
+ children: l == null ? void 0 : l(e)
1249
617
  }
1250
618
  )
1251
619
  }
1252
620
  ),
1253
- /* @__PURE__ */ o.jsx(
1254
- T.p,
621
+ /* @__PURE__ */ o(
622
+ f.p,
1255
623
  {
1256
- className: V(
1257
- p`
624
+ className: D(
625
+ i`
1258
626
  text-align: center;
1259
627
  margin-top: 0.25rem;
1260
628
  margin-bottom: 0;
1261
- color: ${h.itemNameColor};
629
+ color: ${p.itemNameColor};
1262
630
  @media (prefers-color-scheme: dark) {
1263
- color: ${l.itemNameColor};
631
+ color: ${s.itemNameColor};
1264
632
  }
1265
633
  `,
1266
- i && p`
634
+ r && i`
1267
635
  color: transparent;
1268
636
  `
1269
637
  ),
1270
- children: v
638
+ children: C
1271
639
  }
1272
640
  )
1273
641
  ] });
1274
- }, Ve = (d) => {
642
+ }, me = (a) => {
1275
643
  const {
1276
- data: r,
1277
- className: i,
1278
- itemIndex: n,
1279
- onClick: c,
1280
- disabledDrag: s = !1,
1281
- children: u,
1282
- parentIds: h,
1283
- childrenLength: l
1284
- } = d, { contextMenu: y, setContextMenu: v } = be(), { contextMenu: _ } = ge();
1285
- return /* @__PURE__ */ o.jsx(
1286
- Zr,
644
+ data: e,
645
+ className: r,
646
+ itemIndex: t,
647
+ onClick: l,
648
+ disabledDrag: n = !1,
649
+ children: d,
650
+ parentIds: p,
651
+ childrenLength: s
652
+ } = a, { contextMenu: v, setContextMenu: C } = Z(), { contextMenu: R } = K();
653
+ return /* @__PURE__ */ o(
654
+ He,
1287
655
  {
1288
656
  placement: "bottom",
1289
- overlayClassName: p`
657
+ overlayClassName: i`
1290
658
  background-color: transparent;
1291
659
  .rc-tooltip-inner {
1292
660
  background-color: transparent;
@@ -1294,122 +662,122 @@ const br = cr({
1294
662
  border: none;
1295
663
  }
1296
664
  `,
1297
- overlay: /* @__PURE__ */ o.jsx(Ho, { ..._ }),
1298
- visible: (y == null ? void 0 : y.data.id) === r.id,
1299
- onVisibleChange: (E) => {
1300
- E || v(null);
665
+ overlay: /* @__PURE__ */ o(Ao, { ...R }),
666
+ visible: (v == null ? void 0 : v.data.id) === e.id,
667
+ onVisibleChange: (T) => {
668
+ T || C(null);
1301
669
  },
1302
670
  destroyTooltipOnHide: !0,
1303
- children: /* @__PURE__ */ o.jsx(
1304
- T.div,
671
+ children: /* @__PURE__ */ o(
672
+ f.div,
1305
673
  {
1306
- "data-id": r.id,
1307
- "data-index": n,
1308
- "data-parent-ids": h == null ? void 0 : h.join(","),
1309
- "data-children-length": l,
1310
- onClick: () => c == null ? void 0 : c(r),
1311
- className: V(s && "drag-disabled", i),
1312
- children: u ?? /* @__PURE__ */ o.jsx(Jo, { ...d })
674
+ "data-id": e.id,
675
+ "data-index": t,
676
+ "data-parent-ids": p == null ? void 0 : p.join(","),
677
+ "data-children-length": s,
678
+ onClick: () => l == null ? void 0 : l(e),
679
+ className: D(n && "drag-disabled", r),
680
+ children: d ?? /* @__PURE__ */ o(jo, { ...a })
1313
681
  }
1314
682
  )
1315
683
  }
1316
684
  );
1317
- }, Ko = (d) => {
685
+ }, Eo = (a) => {
1318
686
  const {
1319
- data: r,
1320
- className: i,
1321
- parentIds: n,
1322
- itemIndex: c,
1323
- onClick: s,
1324
- noLetters: u = !1
1325
- } = d, {
1326
- contextMenuFuns: h,
1327
- setList: l,
1328
- setOpenGroupItemData: y,
1329
- longPressTriggered: v,
1330
- moveItemId: _,
1331
- moveTargetId: E,
1332
- setMoveTargetId: F,
1333
- listStatus: z
1334
- } = be(), { itemIconBuilder: b, theme: m, contextMenu: R } = ge(), { light: f, dark: Y } = ie.getTheme(m), { children: k, data: N, config: P } = r, { row: x = 1, col: C = 1 } = P ?? {}, U = {
687
+ data: e,
688
+ className: r,
689
+ parentIds: t,
690
+ itemIndex: l,
691
+ onClick: n,
692
+ noLetters: d = !1
693
+ } = a, {
694
+ contextMenuFuns: p,
695
+ setList: s,
696
+ setOpenGroupItemData: v,
697
+ longPressTriggered: C,
698
+ moveItemId: R,
699
+ moveTargetId: T,
700
+ setMoveTargetId: A,
701
+ listStatus: L
702
+ } = Z(), { itemIconBuilder: u, theme: c, contextMenu: I } = K(), { light: x, dark: $ } = q.getTheme(c), { children: m, data: y, config: w } = e, { row: g = 1, col: h = 1 } = w ?? {}, j = {
1335
703
  visible: { opacity: 1, scale: 1 },
1336
704
  hidden: { opacity: 0, scale: 0.95 }
1337
- }, ce = ((k == null ? void 0 : k.length) ?? 0) === 0, H = ce ? [r] : [...k ?? []].slice(0, 9), pe = De(() => _ === r.id.toString(), [r.id, _]), G = De(() => E === r.id, [r.id, E]), oe = p`
705
+ }, O = ((m == null ? void 0 : m.length) ?? 0) === 0, E = O ? [e] : [...m ?? []].slice(0, 9), ae = le(() => R === e.id.toString(), [e.id, R]), U = le(() => T === e.id, [e.id, T]), Q = i`
1338
706
  overflow: hidden;
1339
707
  cursor: pointer;
1340
- background-color: ${f.itemIconBackgroundColor};
1341
- box-shadow: 0 0 0.5rem ${f.itemIconShadowColor};
708
+ background-color: ${x.itemIconBackgroundColor};
709
+ box-shadow: 0 0 0.5rem ${x.itemIconShadowColor};
1342
710
  @media (prefers-color-scheme: dark) {
1343
- background-color: ${Y.itemIconBackgroundColor};
1344
- box-shadow: 0 0 0.5rem ${Y.itemIconShadowColor};
711
+ background-color: ${$.itemIconBackgroundColor};
712
+ box-shadow: 0 0 0.5rem ${$.itemIconShadowColor};
1345
713
  }
1346
- `, le = () => {
1347
- if (ce)
1348
- return /* @__PURE__ */ o.jsx(
1349
- T.div,
714
+ `, re = () => {
715
+ if (O)
716
+ return /* @__PURE__ */ o(
717
+ f.div,
1350
718
  {
1351
- className: V(
719
+ className: D(
1352
720
  "sortable-group-item",
1353
- p`
721
+ i`
1354
722
  overflow: hidden;
1355
723
  cursor: pointer;
1356
724
  width: 100%;
1357
725
  height: 100%;
1358
- background-color: ${f.itemIconBackgroundColor};
726
+ background-color: ${x.itemIconBackgroundColor};
1359
727
  position: absolute;
1360
728
  left: 0;
1361
729
  top: 0;
1362
730
  border-radius: 0.75rem;
1363
731
  @media (prefers-color-scheme: dark) {
1364
- background-color: ${Y.itemIconBackgroundColor};
732
+ background-color: ${$.itemIconBackgroundColor};
1365
733
  }
1366
734
  `
1367
735
  ),
1368
- onClick: (A) => {
1369
- A.stopPropagation(), s == null || s(r);
736
+ onClick: (N) => {
737
+ N.stopPropagation(), n == null || n(e);
1370
738
  },
1371
- children: b == null ? void 0 : b(r)
739
+ children: u == null ? void 0 : u(e)
1372
740
  }
1373
741
  );
1374
- if (x === 1 && C === 1 || x === 2 && C === 2)
1375
- return /* @__PURE__ */ o.jsx(
1376
- T.div,
742
+ if (g === 1 && h === 1 || g === 2 && h === 2)
743
+ return /* @__PURE__ */ o(
744
+ f.div,
1377
745
  {
1378
- className: p`
746
+ className: i`
1379
747
  display: grid;
1380
748
  width: 100%;
1381
749
  height: 100%;
1382
750
  grid-template-columns: repeat(3, minmax(0, 1fr));
1383
751
  grid-template-rows: repeat(3, minmax(0, 1fr));
1384
- padding: ${C === 1 ? "0.125rem" : "0.25rem"};
1385
- gap: ${C === 1 ? "0.125rem" : "0.5rem"};
752
+ padding: ${h === 1 ? "0.125rem" : "0.25rem"};
753
+ gap: ${h === 1 ? "0.125rem" : "0.5rem"};
1386
754
  place-items: center;
1387
755
  `,
1388
- children: H == null ? void 0 : H.slice(0, 9).map((A) => /* @__PURE__ */ o.jsx(
1389
- T.div,
756
+ children: E == null ? void 0 : E.slice(0, 9).map((N) => /* @__PURE__ */ o(
757
+ f.div,
1390
758
  {
1391
- className: V(
1392
- oe,
1393
- p`
1394
- border-radius: ${C === 1 ? "0.25rem" : "0.5rem"};
759
+ className: D(
760
+ Q,
761
+ i`
762
+ border-radius: ${h === 1 ? "0.25rem" : "0.5rem"};
1395
763
  width: 100%;
1396
764
  height: 100%;
1397
765
  `
1398
766
  ),
1399
- onClick: (ne) => {
1400
- ne.stopPropagation(), s == null || s(A);
767
+ onClick: (V) => {
768
+ V.stopPropagation(), n == null || n(N);
1401
769
  },
1402
- children: b == null ? void 0 : b(A)
770
+ children: u == null ? void 0 : u(N)
1403
771
  },
1404
- A.id
772
+ N.id
1405
773
  ))
1406
774
  }
1407
775
  );
1408
- if (x === 1 && C === 2)
1409
- return /* @__PURE__ */ o.jsx(
1410
- T.div,
776
+ if (g === 1 && h === 2)
777
+ return /* @__PURE__ */ o(
778
+ f.div,
1411
779
  {
1412
- className: p`
780
+ className: i`
1413
781
  display: grid;
1414
782
  grid-template-columns: repeat(10, minmax(0, 1fr));
1415
783
  grid-template-rows: repeat(4, minmax(0, 1fr));
@@ -1419,18 +787,18 @@ const br = cr({
1419
787
  height: 52px;
1420
788
  place-items: center;
1421
789
  `,
1422
- children: H == null ? void 0 : H.slice(0, 4).map((A, ne) => /* @__PURE__ */ o.jsx(
1423
- T.div,
790
+ children: E == null ? void 0 : E.slice(0, 4).map((N, V) => /* @__PURE__ */ o(
791
+ f.div,
1424
792
  {
1425
- className: V(
1426
- oe,
1427
- ne < 2 ? p`
793
+ className: D(
794
+ Q,
795
+ V < 2 ? i`
1428
796
  width: 52px;
1429
797
  height: 52px;
1430
798
  border-radius: 0.5rem;
1431
799
  grid-column: span 4 / span 4;
1432
800
  grid-row: span 4 / span 4;
1433
- ` : p`
801
+ ` : i`
1434
802
  width: 1.5rem;
1435
803
  height: 1.5rem;
1436
804
  border-radius: 0.375rem;
@@ -1438,20 +806,20 @@ const br = cr({
1438
806
  grid-row: span 2 / span 2;
1439
807
  `
1440
808
  ),
1441
- onClick: (se) => {
1442
- ne > 2 || (se.stopPropagation(), s == null || s(A));
809
+ onClick: (W) => {
810
+ V > 2 || (W.stopPropagation(), n == null || n(N));
1443
811
  },
1444
- children: b == null ? void 0 : b(A)
812
+ children: u == null ? void 0 : u(N)
1445
813
  },
1446
- A.id
814
+ N.id
1447
815
  ))
1448
816
  }
1449
817
  );
1450
- if (x === 2 && C === 1)
1451
- return /* @__PURE__ */ o.jsx(
1452
- T.div,
818
+ if (g === 2 && h === 1)
819
+ return /* @__PURE__ */ o(
820
+ f.div,
1453
821
  {
1454
- className: p`
822
+ className: i`
1455
823
  display: grid;
1456
824
  grid-template-columns: repeat(4, minmax(0, 1fr));
1457
825
  grid-template-rows: repeat(10, minmax(0, 1fr));
@@ -1461,80 +829,80 @@ const br = cr({
1461
829
  height: 144px;
1462
830
  place-items: center;
1463
831
  `,
1464
- children: H == null ? void 0 : H.slice(0, 4).map((A, ne) => /* @__PURE__ */ o.jsx(
1465
- T.div,
832
+ children: E == null ? void 0 : E.slice(0, 4).map((N, V) => /* @__PURE__ */ o(
833
+ f.div,
1466
834
  {
1467
- className: V(
1468
- oe,
1469
- ne < 2 ? p`
835
+ className: D(
836
+ Q,
837
+ V < 2 ? i`
1470
838
  width: 52px;
1471
839
  height: 52px;
1472
840
  border-radius: 0.5rem;
1473
841
  grid-column: span 4 / span 4;
1474
842
  grid-row: span 4 / span 4;
1475
- ` : p`
843
+ ` : i`
1476
844
  width: 1.5rem;
1477
845
  height: 1.5rem;
1478
846
  grid-column: span 2 / span 2;
1479
847
  grid-row: span 2 / span 2;
1480
848
  `
1481
849
  ),
1482
- onClick: (se) => {
1483
- ne > 2 || (se.stopPropagation(), s == null || s(A));
850
+ onClick: (W) => {
851
+ V > 2 || (W.stopPropagation(), n == null || n(N));
1484
852
  },
1485
- children: b == null ? void 0 : b(A)
853
+ children: u == null ? void 0 : u(N)
1486
854
  },
1487
- A.id
855
+ N.id
1488
856
  ))
1489
857
  }
1490
858
  );
1491
859
  };
1492
- return /* @__PURE__ */ o.jsxs(
1493
- Ve,
860
+ return /* @__PURE__ */ H(
861
+ me,
1494
862
  {
1495
- data: r,
1496
- itemIndex: c,
1497
- parentIds: n,
1498
- childrenLength: k == null ? void 0 : k.length,
1499
- className: V(
1500
- p`
1501
- grid-row: span ${x};
1502
- grid-column: span ${C};
863
+ data: e,
864
+ itemIndex: l,
865
+ parentIds: t,
866
+ childrenLength: m == null ? void 0 : m.length,
867
+ className: D(
868
+ i`
869
+ grid-row: span ${g};
870
+ grid-column: span ${h};
1503
871
  `,
1504
- i
872
+ r
1505
873
  ),
1506
874
  children: [
1507
- /* @__PURE__ */ o.jsx(
1508
- T.div,
875
+ /* @__PURE__ */ o(
876
+ f.div,
1509
877
  {
1510
878
  whileTap: { scale: 0.9 },
1511
- className: V(
1512
- G ? "!scale-110" : "",
1513
- p`
879
+ className: D(
880
+ U ? "!scale-110" : "",
881
+ i`
1514
882
  cursor: pointer;
1515
883
  position: relative;
1516
884
  border-radius: 0.75rem;
1517
- background-color: ${f.groupItemIconBackgroundColor};
1518
- box-shadow: 0 0 0.5rem ${f.groupItemIconShadowColor};
885
+ background-color: ${x.groupItemIconBackgroundColor};
886
+ box-shadow: 0 0 0.5rem ${x.groupItemIconShadowColor};
1519
887
  @media (prefers-color-scheme: dark) {
1520
- background-color: ${Y.groupItemIconBackgroundColor};
1521
- box-shadow: 0 0 0.5rem ${Y.groupItemIconShadowColor};
888
+ background-color: ${$.groupItemIconBackgroundColor};
889
+ box-shadow: 0 0 0.5rem ${$.groupItemIconShadowColor};
1522
890
  }
1523
891
  /* overflow: hidden; */
1524
892
  transition: all 0.3s;
1525
893
  margin: 0 auto;
1526
- width: ${C * 64 + 32 * (C - 1)}px;
1527
- height: ${x * 64 + 32 * (x - 1)}px;
894
+ width: ${h * 64 + 32 * (h - 1)}px;
895
+ height: ${g * 64 + 32 * (g - 1)}px;
1528
896
  `
1529
897
  ),
1530
- onClick: (A) => {
1531
- !ce && !v && (r.parentIds = n, r.pageX = A.pageX, r.pageY = A.pageY, y(r));
898
+ onClick: (N) => {
899
+ !O && !C && (e.parentIds = t, e.pageX = N.pageX, e.pageY = N.pageY, v(e));
1532
900
  },
1533
- ...h(r, R !== !1),
1534
- children: /* @__PURE__ */ o.jsxs(
1535
- T.div,
901
+ ...p(e, I !== !1),
902
+ children: /* @__PURE__ */ H(
903
+ f.div,
1536
904
  {
1537
- className: p`
905
+ className: i`
1538
906
  position: relative;
1539
907
  width: 100%;
1540
908
  height: 100%;
@@ -1544,20 +912,20 @@ const br = cr({
1544
912
  padding: 0.375rem;
1545
913
  `,
1546
914
  children: [
1547
- le(),
1548
- /* @__PURE__ */ o.jsx(
1549
- Ye,
915
+ re(),
916
+ /* @__PURE__ */ o(
917
+ de,
1550
918
  {
1551
- className: V(
919
+ className: D(
1552
920
  "sortable-group-item",
1553
- p`
921
+ i`
1554
922
  position: absolute;
1555
923
  cursor: pointer;
1556
924
  left: 0.375rem;
1557
925
  top: 0.375rem;
1558
926
  width: calc(100% - 0.75rem);
1559
927
  height: calc(100% - 0.75rem);
1560
- pointer-events: ${z === null ? "none" : "auto"};
928
+ pointer-events: ${L === null ? "none" : "auto"};
1561
929
  > * {
1562
930
  opacity: 0;
1563
931
  }
@@ -1566,12 +934,12 @@ const br = cr({
1566
934
  group: { name: "nested", pull: !1, put: !0 },
1567
935
  animation: 150,
1568
936
  fallbackOnBody: !0,
1569
- list: k ?? [],
1570
- setList: (A) => l(A, n),
937
+ list: m ?? [],
938
+ setList: (N) => s(N, t),
1571
939
  filter: () => !0,
1572
- "data-id": r.id,
940
+ "data-id": e.id,
1573
941
  onChange: () => {
1574
- F(r.id);
942
+ A(e.id);
1575
943
  }
1576
944
  }
1577
945
  )
@@ -1580,32 +948,32 @@ const br = cr({
1580
948
  )
1581
949
  }
1582
950
  ),
1583
- /* @__PURE__ */ o.jsx(
1584
- T.p,
951
+ /* @__PURE__ */ o(
952
+ f.p,
1585
953
  {
1586
- className: V(
1587
- p`
954
+ className: D(
955
+ i`
1588
956
  text-align: center;
1589
957
  margin-top: 0.25rem;
1590
958
  margin-bottom: 0;
1591
- color: ${f.itemNameColor};
959
+ color: ${x.itemNameColor};
1592
960
  @media (prefers-color-scheme: dark) {
1593
- color: ${Y.itemNameColor};
961
+ color: ${$.itemNameColor};
1594
962
  }
1595
963
  `,
1596
- u && p`
964
+ d && i`
1597
965
  color: transparent;
1598
966
  `
1599
967
  ),
1600
- variants: U,
1601
- animate: pe ? "hidden" : "visible",
1602
- children: (N == null ? void 0 : N.name) ?? "文件夹"
968
+ variants: j,
969
+ animate: ae ? "hidden" : "visible",
970
+ children: (y == null ? void 0 : y.name) ?? "文件夹"
1603
971
  }
1604
972
  )
1605
973
  ]
1606
974
  }
1607
975
  );
1608
- }, vr = p`
976
+ }, Me = i`
1609
977
  padding: 8px;
1610
978
  transition: all 0.2s;
1611
979
  > div {
@@ -1617,35 +985,35 @@ const br = cr({
1617
985
  transition: all 0.2s;
1618
986
  }
1619
987
  }
1620
- `, Zo = (d) => {
1621
- const { data: r, onClose: i, onItemClick: n } = d, {
1622
- list: c,
1623
- setList: s,
1624
- setListStatus: u,
1625
- setMoveItemId: h,
1626
- setMoveTargetId: l,
1627
- updateItem: y
1628
- } = be(), { theme: v } = ge(), { light: _, dark: E } = ie.getTheme(v), [F, z] = Q("文件夹"), b = [...(r == null ? void 0 : r.children) ?? []];
1629
- return ye(() => {
1630
- var m;
1631
- r && z((m = r.data) == null ? void 0 : m.name);
1632
- }, [r]), /* @__PURE__ */ o.jsx(
1633
- ur,
988
+ `, Xo = (a) => {
989
+ const { data: e, onClose: r, onItemClick: t } = a, {
990
+ list: l,
991
+ setList: n,
992
+ setListStatus: d,
993
+ setMoveItemId: p,
994
+ setMoveTargetId: s,
995
+ updateItem: v
996
+ } = Z(), { theme: C } = K(), { light: R, dark: T } = q.getTheme(C), [A, L] = F("文件夹"), u = [...(e == null ? void 0 : e.children) ?? []];
997
+ return oe(() => {
998
+ var c;
999
+ e && L((c = e.data) == null ? void 0 : c.name);
1000
+ }, [e]), /* @__PURE__ */ o(
1001
+ ke,
1634
1002
  {
1635
- visible: !!r,
1003
+ visible: !!e,
1636
1004
  onClose: () => {
1637
- i();
1005
+ r();
1638
1006
  },
1639
1007
  animation: "zoom",
1640
1008
  maskAnimation: "fade",
1641
- mousePosition: r != null && r.pageX && (r != null && r.pageY) ? {
1642
- x: r == null ? void 0 : r.pageX,
1643
- y: r == null ? void 0 : r.pageY
1009
+ mousePosition: e != null && e.pageX && (e != null && e.pageY) ? {
1010
+ x: e == null ? void 0 : e.pageX,
1011
+ y: e == null ? void 0 : e.pageY
1644
1012
  } : null,
1645
- title: /* @__PURE__ */ o.jsx(
1013
+ title: /* @__PURE__ */ o(
1646
1014
  "input",
1647
1015
  {
1648
- className: p`
1016
+ className: i`
1649
1017
  background-color: transparent;
1650
1018
  border-style: none;
1651
1019
  text-align: center;
@@ -1659,23 +1027,23 @@ const br = cr({
1659
1027
  outline: none;
1660
1028
  }
1661
1029
  `,
1662
- value: F,
1663
- onChange: (m) => {
1664
- z(m.target.value);
1030
+ value: A,
1031
+ onChange: (c) => {
1032
+ L(c.target.value);
1665
1033
  },
1666
1034
  onBlur: () => {
1667
- r && y(r.id, {
1668
- ...r.data,
1669
- name: F
1035
+ e && v(e.id, {
1036
+ ...e.data,
1037
+ name: A
1670
1038
  });
1671
1039
  }
1672
1040
  }
1673
1041
  ),
1674
1042
  footer: null,
1675
1043
  closable: !1,
1676
- className: V(
1044
+ className: D(
1677
1045
  "group-item-modal",
1678
- p`
1046
+ i`
1679
1047
  .rc-dialog-content {
1680
1048
  background-color: transparent;
1681
1049
  box-shadow: none;
@@ -1690,9 +1058,9 @@ const br = cr({
1690
1058
  }
1691
1059
  }
1692
1060
  .rc-dialog-body {
1693
- background-color: ${_.groupItemModalBackgroundColor};
1061
+ background-color: ${R.groupItemModalBackgroundColor};
1694
1062
  @media (prefers-color-scheme: dark) {
1695
- background-color: ${E.groupItemModalBackgroundColor};
1063
+ background-color: ${T.groupItemModalBackgroundColor};
1696
1064
  }
1697
1065
  border-radius: 0.5rem;
1698
1066
  overflow: hidden;
@@ -1702,24 +1070,24 @@ const br = cr({
1702
1070
  ),
1703
1071
  width: 600,
1704
1072
  destroyOnClose: !0,
1705
- children: /* @__PURE__ */ o.jsx(
1073
+ children: /* @__PURE__ */ o(
1706
1074
  "div",
1707
1075
  {
1708
- className: p`
1076
+ className: i`
1709
1077
  overflow-y: auto;
1710
1078
  max-height: 60vh;
1711
1079
  padding: 1.25rem 0;
1712
1080
  `,
1713
- onDragLeave: (m) => {
1714
- const R = m.relatedTarget;
1715
- R && (m.currentTarget.contains(R) || setTimeout(() => {
1716
- i();
1081
+ onDragLeave: (c) => {
1082
+ const I = c.relatedTarget;
1083
+ I && (c.currentTarget.contains(I) || setTimeout(() => {
1084
+ r();
1717
1085
  }, 500));
1718
1086
  },
1719
- children: /* @__PURE__ */ o.jsx(
1720
- Ye,
1087
+ children: /* @__PURE__ */ o(
1088
+ de,
1721
1089
  {
1722
- className: p`
1090
+ className: i`
1723
1091
  display: grid;
1724
1092
  gap: 1rem;
1725
1093
  place-items: center;
@@ -1730,29 +1098,29 @@ const br = cr({
1730
1098
  group: { name: "nested", pull: !0, put: !1 },
1731
1099
  animation: 150,
1732
1100
  fallbackOnBody: !0,
1733
- list: (r == null ? void 0 : r.children) ?? [],
1734
- setList: (m) => {
1735
- var Y, k;
1736
- const R = m.map((N) => N.id), f = (k = (Y = c.find((N) => N.id === (r == null ? void 0 : r.id))) == null ? void 0 : Y.children) == null ? void 0 : k.map((N) => N.id);
1737
- R.length === (f == null ? void 0 : f.length) && R.every((N, P) => N === f[P]) || R.length < ((f == null ? void 0 : f.length) ?? 0) || s(m, [...(r == null ? void 0 : r.parentIds) ?? [], r == null ? void 0 : r.id]);
1101
+ list: (e == null ? void 0 : e.children) ?? [],
1102
+ setList: (c) => {
1103
+ var $, m;
1104
+ const I = c.map((y) => y.id), x = (m = ($ = l.find((y) => y.id === (e == null ? void 0 : e.id))) == null ? void 0 : $.children) == null ? void 0 : m.map((y) => y.id);
1105
+ I.length === (x == null ? void 0 : x.length) && I.every((y, w) => y === x[w]) || I.length < ((x == null ? void 0 : x.length) ?? 0) || n(c, [...(e == null ? void 0 : e.parentIds) ?? [], e == null ? void 0 : e.id]);
1738
1106
  },
1739
- onMove: () => (l(null), u("onMove"), !0),
1740
- onStart: (m) => {
1741
- const R = m.item.dataset;
1742
- R != null && R.id && h(R.id), u("onMove");
1107
+ onMove: () => (s(null), d("onMove"), !0),
1108
+ onStart: (c) => {
1109
+ const I = c.item.dataset;
1110
+ I != null && I.id && p(I.id), d("onMove");
1743
1111
  },
1744
1112
  onEnd: () => {
1745
- h(null), l(null), u(null);
1113
+ p(null), s(null), d(null);
1746
1114
  },
1747
- ghostClass: vr,
1748
- children: b.map((m, R) => /* @__PURE__ */ o.jsx(
1749
- Ve,
1115
+ ghostClass: Me,
1116
+ children: u.map((c, I) => /* @__PURE__ */ o(
1117
+ me,
1750
1118
  {
1751
- data: m,
1752
- itemIndex: R,
1753
- onClick: n
1119
+ data: c,
1120
+ itemIndex: I,
1121
+ onClick: t
1754
1122
  },
1755
- m.id
1123
+ c.id
1756
1124
  ))
1757
1125
  }
1758
1126
  )
@@ -1760,50 +1128,50 @@ const br = cr({
1760
1128
  )
1761
1129
  }
1762
1130
  );
1763
- }, Qo = (d) => {
1764
- var n;
1765
- const { data: r, onClose: i } = d;
1766
- return /* @__PURE__ */ o.jsx(
1767
- ur,
1131
+ }, Fo = (a) => {
1132
+ var t;
1133
+ const { data: e, onClose: r } = a;
1134
+ return /* @__PURE__ */ o(
1135
+ ke,
1768
1136
  {
1769
- visible: !!r,
1137
+ visible: !!e,
1770
1138
  onClose: () => {
1771
- i();
1139
+ r();
1772
1140
  },
1773
1141
  animation: "zoom",
1774
1142
  maskAnimation: "fade",
1775
- mousePosition: r != null && r.pageX && (r != null && r.pageY) ? {
1776
- x: r == null ? void 0 : r.pageX,
1777
- y: r == null ? void 0 : r.pageY
1143
+ mousePosition: e != null && e.pageX && (e != null && e.pageY) ? {
1144
+ x: e == null ? void 0 : e.pageX,
1145
+ y: e == null ? void 0 : e.pageY
1778
1146
  } : null,
1779
1147
  footer: null,
1780
- title: ((n = r == null ? void 0 : r.data) == null ? void 0 : n.name) ?? "信息",
1781
- children: r && /* @__PURE__ */ o.jsxs("div", { children: [
1782
- /* @__PURE__ */ o.jsx("div", { className: "mb-2", children: "开发者信息" }),
1783
- /* @__PURE__ */ o.jsx("div", { className: "p-2 rounded-md bg-[#272822]", children: /* @__PURE__ */ o.jsx(no, { src: r, theme: "monokai" }) })
1148
+ title: ((t = e == null ? void 0 : e.data) == null ? void 0 : t.name) ?? "信息",
1149
+ children: e && /* @__PURE__ */ H("div", { children: [
1150
+ /* @__PURE__ */ o("div", { className: "mb-2", children: "开发者信息" }),
1151
+ /* @__PURE__ */ o("div", { className: "p-2 rounded-md bg-[#272822]", children: /* @__PURE__ */ o(Ue, { src: e, theme: "monokai" }) })
1784
1152
  ] })
1785
1153
  }
1786
1154
  );
1787
- }, et = (d) => {
1155
+ }, Go = (a) => {
1788
1156
  const {
1789
- pagination: r = { position: "bottom" },
1790
- className: i,
1791
- sliderProps: n,
1792
- sliderRef: c,
1793
- onItemClick: s
1794
- } = d, u = Ce(null), h = Ce(null), {
1795
- list: l,
1796
- setList: y,
1797
- setListStatus: v,
1798
- showInfoItemData: _,
1799
- setShowInfoItemData: E,
1800
- openGroupItemData: F,
1801
- setOpenGroupItemData: z,
1802
- setMoveItemId: b,
1803
- setMoveTargetId: m,
1804
- addItem: R
1805
- } = be(), { pagingDotBuilder: f, pagingDotsBuilder: Y, itemBuilder: k } = ge(), N = De(() => r === !1 ? {} : {
1806
- top: p`
1157
+ pagination: e = { position: "bottom" },
1158
+ className: r,
1159
+ sliderProps: t,
1160
+ sliderRef: l,
1161
+ onItemClick: n
1162
+ } = a, d = te(null), p = te(null), {
1163
+ list: s,
1164
+ setList: v,
1165
+ setListStatus: C,
1166
+ showInfoItemData: R,
1167
+ setShowInfoItemData: T,
1168
+ openGroupItemData: A,
1169
+ setOpenGroupItemData: L,
1170
+ setMoveItemId: u,
1171
+ setMoveTargetId: c,
1172
+ addItem: I
1173
+ } = Z(), { pagingDotBuilder: x, pagingDotsBuilder: $, itemBuilder: m } = K(), y = le(() => e === !1 ? {} : {
1174
+ top: i`
1807
1175
  display: flex;
1808
1176
  flex-direction: column;
1809
1177
  .slick-list {
@@ -1813,12 +1181,12 @@ const br = cr({
1813
1181
  position: static;
1814
1182
  }
1815
1183
  `,
1816
- bottom: p`
1184
+ bottom: i`
1817
1185
  .slick-dots {
1818
1186
  position: static;
1819
1187
  }
1820
1188
  `,
1821
- left: p`
1189
+ left: i`
1822
1190
  .slick-dots {
1823
1191
  position: absolute;
1824
1192
  width: auto;
@@ -1834,7 +1202,7 @@ const br = cr({
1834
1202
  }
1835
1203
  }
1836
1204
  `,
1837
- right: p`
1205
+ right: i`
1838
1206
  .slick-dots {
1839
1207
  position: absolute;
1840
1208
  width: auto;
@@ -1850,22 +1218,22 @@ const br = cr({
1850
1218
  }
1851
1219
  }
1852
1220
  `
1853
- }[r.position ?? "bottom"], [r]);
1854
- return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
1855
- /* @__PURE__ */ o.jsx(
1856
- Gr,
1221
+ }[e.position ?? "bottom"], [e]);
1222
+ return /* @__PURE__ */ H(ce, { children: [
1223
+ /* @__PURE__ */ o(
1224
+ Ee,
1857
1225
  {
1858
1226
  useCSS: !0,
1859
1227
  useTransform: !0,
1860
1228
  arrows: !1,
1861
- ref: c ?? u,
1229
+ ref: l ?? d,
1862
1230
  infinite: !1,
1863
1231
  dots: !0,
1864
1232
  touchMove: !1,
1865
1233
  lazyLoad: "anticipated",
1866
- className: V(
1867
- N,
1868
- p`
1234
+ className: D(
1235
+ y,
1236
+ i`
1869
1237
  .slick-track {
1870
1238
  display: flex;
1871
1239
  align-items: stretch;
@@ -1881,28 +1249,28 @@ const br = cr({
1881
1249
  }
1882
1250
  }
1883
1251
  `,
1884
- i
1252
+ r
1885
1253
  ),
1886
- customPaging: (P) => {
1887
- var x, C;
1888
- return f ? f(l[P], P) : /* @__PURE__ */ o.jsx(
1254
+ customPaging: (w) => {
1255
+ var g, h;
1256
+ return x ? x(s[w], w) : /* @__PURE__ */ o(
1889
1257
  "div",
1890
1258
  {
1891
1259
  onDragEnter: () => {
1892
- var U;
1893
- (U = (c ?? u).current) == null || U.slickGoTo(P);
1260
+ var j;
1261
+ (j = (l ?? d).current) == null || j.slickGoTo(w);
1894
1262
  },
1895
- children: (C = (x = l[P]) == null ? void 0 : x.data) == null ? void 0 : C.name
1263
+ children: (h = (g = s[w]) == null ? void 0 : g.data) == null ? void 0 : h.name
1896
1264
  }
1897
1265
  );
1898
1266
  },
1899
- appendDots: (P) => Y ? Y(P) : r === !1 ? /* @__PURE__ */ o.jsx("div", {}) : /* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsx(
1267
+ appendDots: (w) => $ ? $(w) : e === !1 ? /* @__PURE__ */ o("div", {}) : /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
1900
1268
  "ul",
1901
1269
  {
1902
- ref: h,
1903
- className: V(
1270
+ ref: p,
1271
+ className: D(
1904
1272
  "slick-dots-default",
1905
- p`
1273
+ i`
1906
1274
  padding: 0.5rem;
1907
1275
  display: inline-flex;
1908
1276
  justify-content: center;
@@ -1923,31 +1291,31 @@ const br = cr({
1923
1291
  }
1924
1292
  `
1925
1293
  ),
1926
- children: P
1294
+ children: w
1927
1295
  }
1928
1296
  ) }),
1929
- ...n,
1930
- children: l.map((P) => /* @__PURE__ */ o.jsx(
1297
+ ...t,
1298
+ children: s.map((w) => /* @__PURE__ */ o(
1931
1299
  "div",
1932
1300
  {
1933
- onDrop: (x) => {
1934
- x.preventDefault();
1935
- const C = x.dataTransfer.getData("text/plain");
1936
- if (C !== "")
1301
+ onDrop: (g) => {
1302
+ g.preventDefault();
1303
+ const h = g.dataTransfer.getData("text/plain");
1304
+ if (h !== "")
1937
1305
  try {
1938
- R(JSON.parse(C), [P.id]);
1939
- } catch (U) {
1940
- console.log("drag error", U);
1306
+ I(JSON.parse(h), [w.id]);
1307
+ } catch (j) {
1308
+ console.log("drag error", j);
1941
1309
  }
1942
1310
  },
1943
- onDragOver: (x) => {
1944
- x.preventDefault();
1311
+ onDragOver: (g) => {
1312
+ g.preventDefault();
1945
1313
  },
1946
- children: /* @__PURE__ */ o.jsx(
1947
- Ye,
1314
+ children: /* @__PURE__ */ o(
1315
+ de,
1948
1316
  {
1949
- className: V(
1950
- p`
1317
+ className: D(
1318
+ i`
1951
1319
  display: grid;
1952
1320
  transition: all 0.3s;
1953
1321
  grid-template-columns: repeat(auto-fill, 96px);
@@ -1962,113 +1330,113 @@ const br = cr({
1962
1330
  fallbackOnBody: !0,
1963
1331
  swapThreshold: 0.65,
1964
1332
  group: "nested",
1965
- list: P.children ?? [],
1966
- setList: (x) => y(x, [P.id]),
1333
+ list: w.children ?? [],
1334
+ setList: (g) => v(g, [w.id]),
1967
1335
  filter: ".drag-disabled",
1968
- onMove: (x) => {
1969
- v("onMove");
1970
- const { dragged: C, related: U } = x, ce = C.dataset, H = U.dataset;
1971
- return m(null), !((Object.keys(H).length === 0 || H.parentIds) && Number(ce.childrenLength) > 0 && U.classList.contains("sortable-group-item"));
1336
+ onMove: (g) => {
1337
+ C("onMove");
1338
+ const { dragged: h, related: j } = g, O = h.dataset, E = j.dataset;
1339
+ return c(null), !((Object.keys(E).length === 0 || E.parentIds) && Number(O.childrenLength) > 0 && j.classList.contains("sortable-group-item"));
1972
1340
  },
1973
- onStart: (x) => {
1974
- const C = x.item.dataset;
1975
- C != null && C.id && b(C.id), v("onMove");
1341
+ onStart: (g) => {
1342
+ const h = g.item.dataset;
1343
+ h != null && h.id && u(h.id), C("onMove");
1976
1344
  },
1977
1345
  onEnd: () => {
1978
- b(null), m(null), v(null);
1346
+ u(null), c(null), C(null);
1979
1347
  },
1980
- ghostClass: vr,
1981
- children: (P.children ?? []).map((x, C) => {
1982
- let U;
1983
- if (k)
1984
- return k(x);
1985
- switch (x.type) {
1348
+ ghostClass: Me,
1349
+ children: (w.children ?? []).map((g, h) => {
1350
+ let j;
1351
+ if (m)
1352
+ return m(g);
1353
+ switch (g.type) {
1986
1354
  case "group":
1987
1355
  case "app":
1988
- U = /* @__PURE__ */ o.jsx(
1989
- Ko,
1356
+ j = /* @__PURE__ */ o(
1357
+ Eo,
1990
1358
  {
1991
- data: x,
1992
- itemIndex: C,
1993
- parentIds: [P.id, x.id],
1994
- onClick: s
1359
+ data: g,
1360
+ itemIndex: h,
1361
+ parentIds: [w.id, g.id],
1362
+ onClick: n
1995
1363
  },
1996
- x.id
1364
+ g.id
1997
1365
  );
1998
1366
  break;
1999
1367
  default:
2000
- U = /* @__PURE__ */ o.jsx(
2001
- Ve,
1368
+ j = /* @__PURE__ */ o(
1369
+ me,
2002
1370
  {
2003
- data: x,
2004
- itemIndex: C,
2005
- onClick: s
1371
+ data: g,
1372
+ itemIndex: h,
1373
+ onClick: n
2006
1374
  },
2007
- x.id
1375
+ g.id
2008
1376
  );
2009
1377
  break;
2010
1378
  }
2011
- return U;
1379
+ return j;
2012
1380
  })
2013
1381
  }
2014
1382
  )
2015
1383
  },
2016
- P.id
1384
+ w.id
2017
1385
  ))
2018
1386
  }
2019
1387
  ),
2020
- /* @__PURE__ */ o.jsx(
2021
- Qo,
1388
+ /* @__PURE__ */ o(
1389
+ Fo,
2022
1390
  {
2023
- data: _,
1391
+ data: R,
2024
1392
  onClose: () => {
2025
- E(null);
1393
+ T(null);
2026
1394
  }
2027
1395
  }
2028
1396
  ),
2029
- /* @__PURE__ */ o.jsx(
2030
- Zo,
1397
+ /* @__PURE__ */ o(
1398
+ Xo,
2031
1399
  {
2032
- data: F,
1400
+ data: A,
2033
1401
  onClose: () => {
2034
- z(null);
1402
+ L(null);
2035
1403
  },
2036
- onItemClick: s
1404
+ onItemClick: n
2037
1405
  }
2038
1406
  )
2039
1407
  ] });
2040
- }, _t = (d) => {
1408
+ }, vt = (a) => {
2041
1409
  const {
2042
- list: r,
2043
- onChange: i,
2044
- storageKey: n,
2045
- enableCaching: c,
2046
- theme: s,
2047
- noLetters: u,
2048
- contextMenu: h,
2049
- contextMenuBuilder: l,
2050
- itemBuilder: y,
2051
- itemIconBuilder: v,
2052
- pagingDotBuilder: _,
2053
- pagingDotsBuilder: E,
2054
- ...F
2055
- } = d, z = {
2056
- list: r,
2057
- onChange: i,
2058
- storageKey: n,
2059
- enableCaching: c
2060
- }, b = {
2061
- theme: s,
2062
- noLetters: u,
2063
- contextMenu: h,
2064
- pagingDotsBuilder: E,
2065
- pagingDotBuilder: _,
2066
- itemBuilder: y,
2067
- itemIconBuilder: v,
2068
- contextMenuBuilder: l
2069
- };
2070
- return /* @__PURE__ */ o.jsx(Uo, { ...z, children: /* @__PURE__ */ o.jsx(Xo, { ...b, children: /* @__PURE__ */ o.jsx(et, { ...F }) }) });
2071
- }, rt = {
1410
+ list: e,
1411
+ onChange: r,
1412
+ storageKey: t,
1413
+ enableCaching: l,
1414
+ theme: n,
1415
+ noLetters: d,
1416
+ contextMenu: p,
1417
+ contextMenuBuilder: s,
1418
+ itemBuilder: v,
1419
+ itemIconBuilder: C,
1420
+ pagingDotBuilder: R,
1421
+ pagingDotsBuilder: T,
1422
+ ...A
1423
+ } = a;
1424
+ return /* @__PURE__ */ o(Lo, { ...{
1425
+ list: e,
1426
+ onChange: r,
1427
+ storageKey: t,
1428
+ enableCaching: l
1429
+ }, children: /* @__PURE__ */ o(Po, { ...{
1430
+ theme: n,
1431
+ noLetters: d,
1432
+ contextMenu: p,
1433
+ pagingDotsBuilder: T,
1434
+ pagingDotBuilder: R,
1435
+ itemBuilder: v,
1436
+ itemIconBuilder: C,
1437
+ contextMenuBuilder: s
1438
+ }, children: /* @__PURE__ */ o(Go, { ...A }) }) });
1439
+ }, Ho = {
2072
1440
  frontmatterEditor: {
2073
1441
  title: "编辑前置元数据",
2074
1442
  key: "键",
@@ -2185,13 +1553,13 @@ const br = cr({
2185
1553
  image: {
2186
1554
  delete: "删除图片"
2187
1555
  }
2188
- }, ot = (d, r, i) => {
2189
- const c = d.split(".").reduce(
2190
- (s, u) => typeof s == "string" ? s : s[u],
2191
- rt
1556
+ }, qo = (a, e, r) => {
1557
+ const l = a.split(".").reduce(
1558
+ (n, d) => typeof n == "string" ? n : n[d],
1559
+ Ho
2192
1560
  );
2193
- return typeof c != "string" ? r : i ? c.replace(/{{(.*?)}}/g, (s, u) => i[u]) : c;
2194
- }, tt = p`
1561
+ return typeof l != "string" ? e : r ? l.replace(/{{(.*?)}}/g, (n, d) => r[d]) : l;
1562
+ }, Yo = i`
2195
1563
  [class*="_toolbarRoot"] {
2196
1564
  flex-wrap: wrap;
2197
1565
  }
@@ -2260,9 +1628,9 @@ const br = cr({
2260
1628
  margin-bottom: 0;
2261
1629
  }
2262
1630
  }
2263
- `, kr = V(
1631
+ `, Se = D(
2264
1632
  "markdown-body",
2265
- p`
1633
+ i`
2266
1634
  p {
2267
1635
  margin-bottom: 8px;
2268
1636
  }
@@ -2283,7 +1651,7 @@ const br = cr({
2283
1651
  }
2284
1652
  }
2285
1653
  `
2286
- ), nt = {
1654
+ ), Vo = {
2287
1655
  'code[class*="language-"]': {
2288
1656
  background: "hsl(230, 1%, 98%)",
2289
1657
  color: "hsl(230, 8%, 24%)",
@@ -2771,42 +2139,42 @@ const br = cr({
2771
2139
  ".prism-previewer-easing.prism-previewer-easing line": {
2772
2140
  stroke: "hsl(230, 8%, 24%)"
2773
2141
  }
2774
- }, at = (d) => {
2775
- const { children: r = "", className: i } = d;
2776
- return /* @__PURE__ */ o.jsx(
2777
- $o,
2142
+ }, _o = (a) => {
2143
+ const { children: e = "", className: r } = a;
2144
+ return /* @__PURE__ */ o(
2145
+ Mo,
2778
2146
  {
2779
- className: V(kr, i),
2780
- remarkPlugins: [Oo, Bo],
2781
- rehypePlugins: [Ao],
2147
+ className: D(Se, r),
2148
+ remarkPlugins: [So, To],
2149
+ rehypePlugins: [No],
2782
2150
  components: {
2783
- code(n) {
2784
- const { children: c, className: s, node: u, ref: h, ...l } = n, y = /language-(\w+)/.exec(s || "");
2785
- return y ? /* @__PURE__ */ o.jsx(
2786
- Lo,
2151
+ code(t) {
2152
+ const { children: l, className: n, node: d, ref: p, ...s } = t, v = /language-(\w+)/.exec(n || "");
2153
+ return v ? /* @__PURE__ */ o(
2154
+ Bo,
2787
2155
  {
2788
- ...l,
2156
+ ...s,
2789
2157
  PreTag: "div",
2790
- children: String(c).replace(/\n$/, ""),
2791
- language: y[1],
2792
- style: nt
2158
+ children: String(l).replace(/\n$/, ""),
2159
+ language: v[1],
2160
+ style: Vo
2793
2161
  }
2794
- ) : /* @__PURE__ */ o.jsx("code", { ...l, className: s, children: c });
2162
+ ) : /* @__PURE__ */ o("code", { ...s, className: n, children: l });
2795
2163
  }
2796
2164
  },
2797
- children: r
2165
+ children: e
2798
2166
  }
2799
2167
  );
2800
- }, it = (d) => {
2801
- const { value: r, onChange: i, translation: n, pluginConfig: c, ...s } = d, u = Ce(null), {
2802
- image: h,
2803
- diffSource: l = {
2168
+ }, Oo = (a) => {
2169
+ const { value: e, onChange: r, translation: t, pluginConfig: l, ...n } = a, d = te(null), {
2170
+ image: p,
2171
+ diffSource: s = {
2804
2172
  viewMode: "rich-text"
2805
2173
  },
2806
- headings: y,
2807
- link: v,
2808
- codeBlock: _,
2809
- codeMirror: E = {
2174
+ headings: v,
2175
+ link: C,
2176
+ codeBlock: R,
2177
+ codeMirror: T = {
2810
2178
  codeBlockLanguages: {
2811
2179
  js: "JavaScript",
2812
2180
  css: "CSS",
@@ -2815,164 +2183,164 @@ const br = cr({
2815
2183
  "": "Unspecified"
2816
2184
  }
2817
2185
  },
2818
- directives: F = {
2819
- directiveDescriptors: [No]
2820
- }
2821
- } = c ?? {}, [z, b] = Q("");
2822
- return ye(() => {
2823
- var m;
2824
- r !== void 0 && u.current && ((m = u.current) == null || m.setMarkdown(r), b(r));
2825
- }, [r, u]), /* @__PURE__ */ o.jsx(
2826
- ao,
2186
+ directives: A = {
2187
+ directiveDescriptors: [Io]
2188
+ }
2189
+ } = l ?? {}, [L, u] = F("");
2190
+ return oe(() => {
2191
+ var c;
2192
+ e !== void 0 && d.current && ((c = d.current) == null || c.setMarkdown(e), u(e));
2193
+ }, [e, d]), /* @__PURE__ */ o(
2194
+ We,
2827
2195
  {
2828
- ref: u,
2829
- className: tt,
2830
- contentEditableClassName: kr,
2831
- markdown: z,
2832
- onChange: (m) => {
2833
- !r && !i && b(m), i && i(m);
2196
+ ref: d,
2197
+ className: Yo,
2198
+ contentEditableClassName: Se,
2199
+ markdown: L,
2200
+ onChange: (c) => {
2201
+ !e && !r && u(c), r && r(c);
2834
2202
  },
2835
- translation: n ?? ot,
2203
+ translation: t ?? qo,
2836
2204
  plugins: [
2837
- io({
2838
- toolbarContents: () => /* @__PURE__ */ o.jsxs(lo, { options: ["rich-text", "source"], children: [
2839
- /* @__PURE__ */ o.jsx(so, {}),
2840
- /* @__PURE__ */ o.jsx(me, {}),
2841
- /* @__PURE__ */ o.jsx(co, {}),
2842
- /* @__PURE__ */ o.jsx(uo, {}),
2843
- /* @__PURE__ */ o.jsx(me, {}),
2844
- /* @__PURE__ */ o.jsx(mo, {}),
2845
- /* @__PURE__ */ o.jsx(me, {}),
2846
- /* @__PURE__ */ o.jsx(go, {}),
2847
- /* @__PURE__ */ o.jsx(me, {}),
2848
- /* @__PURE__ */ o.jsx(po, {}),
2849
- /* @__PURE__ */ o.jsx(fo, {}),
2850
- /* @__PURE__ */ o.jsx(me, {}),
2851
- /* @__PURE__ */ o.jsx(ho, {}),
2852
- /* @__PURE__ */ o.jsx(bo, {}),
2853
- /* @__PURE__ */ o.jsx(me, {}),
2854
- /* @__PURE__ */ o.jsx(vo, {}),
2855
- /* @__PURE__ */ o.jsx(me, {}),
2856
- /* @__PURE__ */ o.jsx(ko, {})
2205
+ Je({
2206
+ toolbarContents: () => /* @__PURE__ */ H(Ke, { options: ["rich-text", "source"], children: [
2207
+ /* @__PURE__ */ o(Ze, {}),
2208
+ /* @__PURE__ */ o(J, {}),
2209
+ /* @__PURE__ */ o(Qe, {}),
2210
+ /* @__PURE__ */ o(eo, {}),
2211
+ /* @__PURE__ */ o(J, {}),
2212
+ /* @__PURE__ */ o(oo, {}),
2213
+ /* @__PURE__ */ o(J, {}),
2214
+ /* @__PURE__ */ o(to, {}),
2215
+ /* @__PURE__ */ o(J, {}),
2216
+ /* @__PURE__ */ o(ro, {}),
2217
+ /* @__PURE__ */ o(no, {}),
2218
+ /* @__PURE__ */ o(J, {}),
2219
+ /* @__PURE__ */ o(lo, {}),
2220
+ /* @__PURE__ */ o(ao, {}),
2221
+ /* @__PURE__ */ o(J, {}),
2222
+ /* @__PURE__ */ o(io, {}),
2223
+ /* @__PURE__ */ o(J, {}),
2224
+ /* @__PURE__ */ o(so, {})
2857
2225
  ] })
2858
2226
  }),
2859
- xo(l),
2860
- wo(),
2861
- yo(),
2862
- Co(y),
2863
- jo(v),
2864
- So(),
2865
- Io(h),
2866
- To(),
2867
- Ro(),
2868
- Mo(),
2869
- Eo(_),
2870
- _o(E),
2871
- Po(),
2872
- Do(F)
2227
+ co(s),
2228
+ uo(),
2229
+ mo(),
2230
+ go(v),
2231
+ po(C),
2232
+ ho(),
2233
+ fo(p),
2234
+ bo(),
2235
+ ko(),
2236
+ vo(),
2237
+ xo(R),
2238
+ wo(T),
2239
+ Co(),
2240
+ yo(A)
2873
2241
  ],
2874
- ...s
2242
+ ...n
2875
2243
  }
2876
2244
  );
2877
- }, lt = it;
2878
- lt.Preview = at;
2879
- function xr(...d) {
2880
- return zo(Fo(d));
2245
+ }, Uo = Oo;
2246
+ Uo.Preview = _o;
2247
+ function Te(...a) {
2248
+ return $o(Do(a));
2881
2249
  }
2882
- const st = (d) => {
2883
- const { mouseX: r, title: i, icon: n, href: c } = d, s = Ce(null), u = ke(r, (R) => {
2884
- var Y;
2885
- const f = ((Y = s.current) == null ? void 0 : Y.getBoundingClientRect()) ?? { x: 0, width: 0 };
2886
- return R - f.x - f.width / 2;
2887
- }), h = ke(u, [-150, 0, 150], [40, 80, 40]), l = ke(u, [-150, 0, 150], [40, 80, 40]), y = ke(
2888
- u,
2250
+ const Wo = (a) => {
2251
+ const { mouseX: e, title: r, icon: t, href: l } = a, n = te(null), d = ee(e, (I) => {
2252
+ var $;
2253
+ const x = (($ = n.current) == null ? void 0 : $.getBoundingClientRect()) ?? { x: 0, width: 0 };
2254
+ return I - x.x - x.width / 2;
2255
+ }), p = ee(d, [-150, 0, 150], [40, 80, 40]), s = ee(d, [-150, 0, 150], [40, 80, 40]), v = ee(
2256
+ d,
2889
2257
  [-150, 0, 150],
2890
2258
  [20, 40, 20]
2891
- ), v = ke(
2892
- u,
2259
+ ), C = ee(
2260
+ d,
2893
2261
  [-150, 0, 150],
2894
2262
  [20, 40, 20]
2895
- ), _ = _e(h, {
2263
+ ), R = ne(p, {
2896
2264
  mass: 0.1,
2897
2265
  stiffness: 150,
2898
2266
  damping: 12
2899
- }), E = _e(l, {
2267
+ }), T = ne(s, {
2900
2268
  mass: 0.1,
2901
2269
  stiffness: 150,
2902
2270
  damping: 12
2903
- }), F = _e(y, {
2271
+ }), A = ne(v, {
2904
2272
  mass: 0.1,
2905
2273
  stiffness: 150,
2906
2274
  damping: 12
2907
- }), z = _e(v, {
2275
+ }), L = ne(C, {
2908
2276
  mass: 0.1,
2909
2277
  stiffness: 150,
2910
2278
  damping: 12
2911
- }), [b, m] = Q(!1);
2912
- return /* @__PURE__ */ o.jsx("a", { href: c, children: /* @__PURE__ */ o.jsxs(
2913
- T.div,
2279
+ }), [u, c] = F(!1);
2280
+ return /* @__PURE__ */ o("a", { href: l, children: /* @__PURE__ */ H(
2281
+ f.div,
2914
2282
  {
2915
- ref: s,
2916
- style: { width: _, height: E },
2917
- onMouseEnter: () => m(!0),
2918
- onMouseLeave: () => m(!1),
2283
+ ref: n,
2284
+ style: { width: R, height: T },
2285
+ onMouseEnter: () => c(!0),
2286
+ onMouseLeave: () => c(!1),
2919
2287
  className: "aspect-square rounded-full bg-gray-200 dark:bg-neutral-800 flex items-center justify-center relative",
2920
2288
  children: [
2921
- /* @__PURE__ */ o.jsx(We, { children: b && /* @__PURE__ */ o.jsx(
2922
- T.div,
2289
+ /* @__PURE__ */ o(ue, { children: u && /* @__PURE__ */ o(
2290
+ f.div,
2923
2291
  {
2924
2292
  initial: { opacity: 0, y: 10, x: "-50%" },
2925
2293
  animate: { opacity: 1, y: 0, x: "-50%" },
2926
2294
  exit: { opacity: 0, y: 2, x: "-50%" },
2927
2295
  className: "px-2 py-0.5 whitespace-pre rounded-md bg-gray-100 border dark:bg-neutral-800 dark:border-neutral-900 dark:text-white border-gray-200 text-neutral-700 absolute left-1/2 -translate-x-1/2 -top-8 w-fit text-xs",
2928
- children: i
2296
+ children: r
2929
2297
  }
2930
2298
  ) }),
2931
- /* @__PURE__ */ o.jsx(
2932
- T.div,
2299
+ /* @__PURE__ */ o(
2300
+ f.div,
2933
2301
  {
2934
- style: { width: F, height: z },
2302
+ style: { width: A, height: L },
2935
2303
  className: "flex items-center justify-center",
2936
- children: n
2304
+ children: t
2937
2305
  }
2938
2306
  )
2939
2307
  ]
2940
2308
  }
2941
2309
  ) });
2942
- }, wr = (d) => {
2943
- const { items: r, className: i } = d, n = Hr(1 / 0);
2944
- return /* @__PURE__ */ o.jsx(
2945
- T.div,
2310
+ }, Ne = (a) => {
2311
+ const { items: e, className: r } = a, t = Xe(1 / 0);
2312
+ return /* @__PURE__ */ o(
2313
+ f.div,
2946
2314
  {
2947
- onMouseMove: (c) => n.set(c.pageX),
2948
- onMouseLeave: () => n.set(1 / 0),
2949
- className: xr(
2315
+ onMouseMove: (l) => t.set(l.pageX),
2316
+ onMouseLeave: () => t.set(1 / 0),
2317
+ className: Te(
2950
2318
  "mx-auto hidden md:flex h-16 gap-4 items-end rounded-2xl bg-gray-50 dark:bg-neutral-900 px-4 pb-3",
2951
- i
2319
+ r
2952
2320
  ),
2953
- children: r.map((c) => /* @__PURE__ */ o.jsx(st, { mouseX: n, ...c }, c.title))
2321
+ children: e.map((l) => /* @__PURE__ */ o(Wo, { mouseX: t, ...l }, l.title))
2954
2322
  }
2955
2323
  );
2956
- }, yr = (d) => {
2957
- const { items: r, className: i, collapseIcon: n, autoHidden: c = !1 } = d, [s, u] = Q(!1), h = () => {
2958
- u(!s);
2324
+ }, Be = (a) => {
2325
+ const { items: e, className: r, collapseIcon: t, autoHidden: l = !1 } = a, [n, d] = F(!1), p = () => {
2326
+ d(!n);
2959
2327
  };
2960
- return /* @__PURE__ */ o.jsxs(
2328
+ return /* @__PURE__ */ H(
2961
2329
  "div",
2962
2330
  {
2963
- className: xr(
2331
+ className: Te(
2964
2332
  "relative block",
2965
- c ? "md:hidden" : "",
2966
- i
2333
+ l ? "md:hidden" : "",
2334
+ r
2967
2335
  ),
2968
2336
  children: [
2969
- /* @__PURE__ */ o.jsx(We, { children: s && /* @__PURE__ */ o.jsx(
2970
- T.div,
2337
+ /* @__PURE__ */ o(ue, { children: n && /* @__PURE__ */ o(
2338
+ f.div,
2971
2339
  {
2972
2340
  layoutId: "nav",
2973
2341
  className: "absolute bottom-full mb-2 inset-x-0 flex flex-col gap-2",
2974
- children: r.map((l, y) => /* @__PURE__ */ o.jsx(
2975
- T.div,
2342
+ children: e.map((s, v) => /* @__PURE__ */ o(
2343
+ f.div,
2976
2344
  {
2977
2345
  initial: { opacity: 0, y: 10 },
2978
2346
  animate: {
@@ -2983,54 +2351,54 @@ const st = (d) => {
2983
2351
  opacity: 0,
2984
2352
  y: 10,
2985
2353
  transition: {
2986
- delay: y * 0.05
2354
+ delay: v * 0.05
2987
2355
  }
2988
2356
  },
2989
- transition: { delay: (r.length - 1 - y) * 0.05 },
2990
- children: /* @__PURE__ */ o.jsx(
2357
+ transition: { delay: (e.length - 1 - v) * 0.05 },
2358
+ children: /* @__PURE__ */ o(
2991
2359
  "a",
2992
2360
  {
2993
- href: l.href,
2361
+ href: s.href,
2994
2362
  className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-900 flex items-center justify-center",
2995
- children: /* @__PURE__ */ o.jsx("div", { className: "h-4 w-4", children: l.icon })
2363
+ children: /* @__PURE__ */ o("div", { className: "h-4 w-4", children: s.icon })
2996
2364
  },
2997
- l.title
2365
+ s.title
2998
2366
  )
2999
2367
  },
3000
- l.title
2368
+ s.title
3001
2369
  ))
3002
2370
  }
3003
2371
  ) }),
3004
- /* @__PURE__ */ o.jsx(
2372
+ /* @__PURE__ */ o(
3005
2373
  "button",
3006
2374
  {
3007
- onClick: h,
2375
+ onClick: p,
3008
2376
  className: "h-10 w-10 rounded-full bg-gray-50 dark:bg-neutral-800 flex items-center justify-center",
3009
- children: n || /* @__PURE__ */ o.jsx(to, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
2377
+ children: t || /* @__PURE__ */ o(Oe, { className: "h-5 w-5 text-neutral-500 dark:text-neutral-400" })
3010
2378
  }
3011
2379
  )
3012
2380
  ]
3013
2381
  }
3014
2382
  );
3015
- }, ct = (d) => {
3016
- const { items: r, desktopClassName: i, mobileClassName: n, ...c } = d;
3017
- return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
3018
- /* @__PURE__ */ o.jsx(wr, { items: r, className: i, ...c }),
3019
- /* @__PURE__ */ o.jsx(
3020
- yr,
2383
+ }, Jo = (a) => {
2384
+ const { items: e, desktopClassName: r, mobileClassName: t, ...l } = a;
2385
+ return /* @__PURE__ */ H(ce, { children: [
2386
+ /* @__PURE__ */ o(Ne, { items: e, className: r, ...l }),
2387
+ /* @__PURE__ */ o(
2388
+ Be,
3021
2389
  {
3022
- items: r,
3023
- className: n,
2390
+ items: e,
2391
+ className: t,
3024
2392
  autoHidden: !0,
3025
- ...c
2393
+ ...l
3026
2394
  }
3027
2395
  )
3028
2396
  ] });
3029
- }, Cr = ct;
3030
- Cr.Desktop = wr;
3031
- Cr.Mobile = yr;
2397
+ }, De = Jo;
2398
+ De.Desktop = Ne;
2399
+ De.Mobile = Be;
3032
2400
  export {
3033
- _t as Desktop,
3034
- Cr as Dock,
3035
- lt as MdEditor
2401
+ vt as Desktop,
2402
+ De as Dock,
2403
+ Uo as MdEditor
3036
2404
  };