@nice2dev/ui 1.0.29 → 1.0.31

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.
Files changed (108) hide show
  1. package/CHANGELOG.md +512 -0
  2. package/README.md +30 -31
  3. package/dist/NiceBackupStatusBadge.doc-Bx2bFmBQ.cjs +1 -0
  4. package/dist/NiceBackupStatusBadge.doc-CdDxIQ-M.js +25 -0
  5. package/dist/NiceCalendarScheduler.doc-BEtQkZjV.cjs +9 -0
  6. package/dist/NiceCalendarScheduler.doc-D__LRgOx.js +33 -0
  7. package/dist/NiceConfirmDialog-B57cl_F7.cjs +1 -0
  8. package/dist/NiceConfirmDialog-BiTJVR4-.js +81 -0
  9. package/dist/NiceConfirmDialog-Bjw_rN4o.cjs +1 -0
  10. package/dist/NiceConfirmDialog-N9fBTLYm.js +81 -0
  11. package/dist/NiceDrawingCanvas.doc-Dv5vB4gY.js +32 -0
  12. package/dist/NiceDrawingCanvas.doc-Ww9zz17x.cjs +8 -0
  13. package/dist/NiceErrorBoundary-1H751jK7.cjs +1 -0
  14. package/dist/NiceErrorBoundary-B-txoU3Y.js +709 -0
  15. package/dist/NiceErrorBoundary-BD-uqk_q.js +709 -0
  16. package/dist/NiceErrorBoundary-CIPXaYik.cjs +1 -0
  17. package/dist/NiceFileManagerViews.doc-CKlnm6cX.cjs +1 -0
  18. package/dist/NiceFileManagerViews.doc-Cg21DArG.js +25 -0
  19. package/dist/NiceForm-BNZB31Pg.js +4499 -0
  20. package/dist/NiceForm-CPyAXxBO.cjs +1 -0
  21. package/dist/NiceForm-DGUTmaZT.js +5014 -0
  22. package/dist/NiceForm-DmU-gmyv.cjs +382 -0
  23. package/dist/NiceMegaMenu.doc-7UyOCd3l.cjs +7 -0
  24. package/dist/NiceMegaMenu.doc-zeIyVa65.js +31 -0
  25. package/dist/NiceModal-BClAtR5T.js +95 -0
  26. package/dist/NiceModal-Bj53SKLI.js +95 -0
  27. package/dist/NiceModal-DC0UlQhc.cjs +1 -0
  28. package/dist/NiceModal-iKwtagFB.cjs +1 -0
  29. package/dist/NiceModuleLifecyclePanel-BBOg9g0b.cjs +1 -0
  30. package/dist/NiceModuleLifecyclePanel-BO8Hw_W9.js +7619 -0
  31. package/dist/NiceModuleLifecyclePanel-Ch7HRRoy.cjs +1 -0
  32. package/dist/NiceModuleLifecyclePanel-DtuXRiLR.js +6991 -0
  33. package/dist/NiceModuleLifecyclePanel.css +1 -1
  34. package/dist/NicePagination-BVo-4KAD.js +172 -0
  35. package/dist/NicePagination-Bjxy9aEc.js +172 -0
  36. package/dist/NicePagination-CaohvQsY.cjs +1 -0
  37. package/dist/NicePagination-CfFfNwrg.cjs +1 -0
  38. package/dist/NicePinCodeInput-DsyLuc0b.cjs +696 -0
  39. package/dist/NicePinCodeInput-nuRCN-9R.js +13223 -0
  40. package/dist/NiceSavedQueryPanel-BBFV4qiF.js +6969 -0
  41. package/dist/NiceSavedQueryPanel-CH5c3rUG.js +6988 -0
  42. package/dist/NiceSavedQueryPanel-CsiVNkCT.cjs +596 -0
  43. package/dist/NiceSavedQueryPanel-aQrEmmcC.cjs +596 -0
  44. package/dist/NiceScannerControl-Cd5KXJA9.js +12769 -0
  45. package/dist/NiceScannerControl-DZsERSw_.cjs +698 -0
  46. package/dist/NiceScannerControl.css +1 -0
  47. package/dist/NiceWindow-BoDzlGk-.js +1621 -0
  48. package/dist/NiceWindow-Cm9E6EAi.cjs +1 -0
  49. package/dist/NiceWindow-DgONWxBm.cjs +1 -0
  50. package/dist/NiceWindow-FMrVS7zo.js +1603 -0
  51. package/dist/charts-B90sSFeJ.cjs +761 -0
  52. package/dist/charts-Bs0aDM0X.js +4671 -0
  53. package/dist/charts-DaLf19vS.js +4671 -0
  54. package/dist/charts-DjjKkw0q.cjs +761 -0
  55. package/dist/charts.cjs +1 -1
  56. package/dist/charts.mjs +1 -1
  57. package/dist/core-BUTtIHg0.js +27766 -0
  58. package/dist/core-BUsZ7_vI.js +27914 -0
  59. package/dist/core-CESNSRyS.cjs +122 -0
  60. package/dist/core-CLfcCDKc.cjs +122 -0
  61. package/dist/data-branching-ByQdcjKO.cjs +1 -0
  62. package/dist/data-branching-D7l_kILW.cjs +1 -0
  63. package/dist/data-branching-lJ07lDN-.js +6255 -0
  64. package/dist/data-branching-psTzlcrT.js +6255 -0
  65. package/dist/data-branching.cjs +1 -1
  66. package/dist/data-branching.mjs +1 -1
  67. package/dist/data.cjs +1 -1
  68. package/dist/data.d.ts +41 -37
  69. package/dist/data.mjs +18 -19
  70. package/dist/devops-Bi8MXtko.js +8165 -0
  71. package/dist/devops-D7bQ3rE4.cjs +17 -0
  72. package/dist/devops-On_1wRf9.cjs +17 -0
  73. package/dist/devops-jCmpD6O-.js +8165 -0
  74. package/dist/devops.cjs +1 -1
  75. package/dist/devops.mjs +3 -3
  76. package/dist/editors.cjs +1 -1
  77. package/dist/editors.d.ts +219 -431
  78. package/dist/editors.mjs +48 -56
  79. package/dist/feedback.cjs +1 -1
  80. package/dist/feedback.mjs +3 -3
  81. package/dist/index-BDH1yDSg.js +69235 -0
  82. package/dist/index-BpixglWg.js +69337 -0
  83. package/dist/index-C9njkNOD.cjs +5470 -0
  84. package/dist/index-DLR-aWZR.cjs +5506 -0
  85. package/dist/index.cjs +1 -1
  86. package/dist/index.css +1 -1
  87. package/dist/index.d.ts +798 -1059
  88. package/dist/index.mjs +741 -756
  89. package/dist/lazy.cjs +1 -1
  90. package/dist/lazy.mjs +24 -24
  91. package/dist/navigation.cjs +1 -1
  92. package/dist/navigation.d.ts +25 -213
  93. package/dist/navigation.mjs +143 -151
  94. package/dist/no-code-8lO7o6xi.js +7425 -0
  95. package/dist/no-code-BHo5WrXr.js +7425 -0
  96. package/dist/no-code-DyA_1_Th.cjs +332 -0
  97. package/dist/no-code-K8tOLNew.cjs +332 -0
  98. package/dist/no-code.cjs +1 -1
  99. package/dist/no-code.mjs +1 -1
  100. package/dist/overlays.cjs +1 -1
  101. package/dist/overlays.d.ts +12 -0
  102. package/dist/overlays.mjs +82 -82
  103. package/dist/pickerCommons-BEc3pZ_s.js +2044 -0
  104. package/dist/pickerCommons-CORo9j2a.js +2119 -0
  105. package/dist/pickerCommons-CrITwM88.cjs +1 -0
  106. package/dist/pickerCommons-D3WShRrR.cjs +1 -0
  107. package/dist/style.css +5 -5
  108. package/package.json +3 -3
@@ -0,0 +1,1621 @@
1
+ import { jsxs as g, Fragment as Fe, jsx as e } from "react/jsx-runtime";
2
+ import { G as Ye, a as _t, b as He, o as me, m as gt, D as vt } from "./core-BUsZ7_vI.js";
3
+ import bt, { useRef as V, useState as B, useCallback as k, useEffect as A, useReducer as yt, useMemo as Pe, useContext as je, createContext as Ve, forwardRef as Ue } from "react";
4
+ const At = ({
5
+ visible: t,
6
+ onClose: n,
7
+ title: i,
8
+ items: s,
9
+ showCancelButton: m = !0,
10
+ cancelText: h,
11
+ size: p = "md",
12
+ disabled: w,
13
+ loading: d,
14
+ error: y,
15
+ className: l,
16
+ style: x
17
+ }) => {
18
+ const { t: Y } = Ye();
19
+ if (!t)
20
+ return null;
21
+ const M = w || d;
22
+ return /* @__PURE__ */ g(Fe, { children: [
23
+ /* @__PURE__ */ e("div", { className: "nice-actionsheet__overlay", onClick: n }),
24
+ /* @__PURE__ */ g(
25
+ "div",
26
+ {
27
+ className: `nice-actionsheet nice-actionsheet--${p} ${w ? "nice-actionsheet--disabled" : ""} ${d ? "nice-actionsheet--loading" : ""} ${y ? "nice-actionsheet--error" : ""} ${l || ""}`,
28
+ style: x,
29
+ "aria-disabled": w || void 0,
30
+ "aria-busy": d || void 0,
31
+ children: [
32
+ y && /* @__PURE__ */ e("div", { className: "nice-actionsheet__error", role: "alert", children: y }),
33
+ d && /* @__PURE__ */ e("span", { className: "nice-actionsheet__spinner", "aria-hidden": "true", children: /* @__PURE__ */ e("span", { className: "nice-spinner nice-spinner--sm" }) }),
34
+ i && /* @__PURE__ */ e("div", { className: "nice-actionsheet__title", children: i }),
35
+ /* @__PURE__ */ e("div", { className: "nice-actionsheet__items", children: s.map((v, R) => /* @__PURE__ */ g(
36
+ "button",
37
+ {
38
+ className: `nice-actionsheet__item ${v.type === "danger" ? "nice-actionsheet__item--danger" : ""}`,
39
+ disabled: v.disabled || M,
40
+ onClick: () => {
41
+ M || (v.onClick?.(), n());
42
+ },
43
+ children: [
44
+ v.icon && /* @__PURE__ */ e("span", { className: "nice-actionsheet__icon", children: v.icon }),
45
+ v.text
46
+ ]
47
+ },
48
+ R
49
+ )) }),
50
+ m && /* @__PURE__ */ e("button", { className: "nice-actionsheet__cancel", onClick: n, children: h || Y("cancel", "Cancel") })
51
+ ]
52
+ }
53
+ )
54
+ ] });
55
+ }, Ft = ({
56
+ visible: t,
57
+ onClose: n,
58
+ targetRef: i,
59
+ position: s = "bottom",
60
+ title: m,
61
+ showArrow: h = !0,
62
+ width: p,
63
+ children: w,
64
+ className: d,
65
+ style: y,
66
+ displayStyle: l
67
+ }) => {
68
+ _t("tooltip", l);
69
+ const x = V(null), [Y, M] = B({ top: 0, left: 0 }), v = k(() => {
70
+ const R = i.current, O = x.current;
71
+ if (!R || !O)
72
+ return;
73
+ const c = R.getBoundingClientRect(), b = O.getBoundingClientRect();
74
+ let r = 0, z = 0;
75
+ const _ = 8;
76
+ switch (s) {
77
+ case "top":
78
+ r = c.top - b.height - _, z = c.left + (c.width - b.width) / 2;
79
+ break;
80
+ case "bottom":
81
+ r = c.bottom + _, z = c.left + (c.width - b.width) / 2;
82
+ break;
83
+ case "left":
84
+ r = c.top + (c.height - b.height) / 2, z = c.left - b.width - _;
85
+ break;
86
+ case "right":
87
+ r = c.top + (c.height - b.height) / 2, z = c.right + _;
88
+ break;
89
+ }
90
+ M({ top: r + window.scrollY, left: z + window.scrollX });
91
+ }, [i, s]);
92
+ return A(() => {
93
+ if (t) {
94
+ requestAnimationFrame(v);
95
+ const R = (O) => {
96
+ x.current && !x.current.contains(O.target) && i.current && !i.current.contains(O.target) && n();
97
+ };
98
+ return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
99
+ }
100
+ }, [t, v, n, i]), t ? /* @__PURE__ */ g(
101
+ "div",
102
+ {
103
+ ref: x,
104
+ className: `nice-popover nice-popover--${s} ${d || ""}`,
105
+ style: { ...y, position: "absolute", top: Y.top, left: Y.left, width: p },
106
+ children: [
107
+ h && /* @__PURE__ */ e("div", { className: `nice-popover__arrow nice-popover__arrow--${s}` }),
108
+ m && /* @__PURE__ */ e("div", { className: "nice-popover__title", children: m }),
109
+ /* @__PURE__ */ e("div", { className: "nice-popover__content", children: w })
110
+ ]
111
+ }
112
+ ) : null;
113
+ }, Ht = ({
114
+ visible: t,
115
+ message: n,
116
+ container: i,
117
+ showIndicator: s = !0,
118
+ shading: m = !0,
119
+ className: h,
120
+ style: p
121
+ }) => {
122
+ const { t: w } = Ye();
123
+ if (!t)
124
+ return null;
125
+ const d = !!i?.current, y = /* @__PURE__ */ g("div", { className: `nice-loadpanel ${h || ""}`, style: p, children: [
126
+ m && /* @__PURE__ */ e("div", { className: "nice-loadpanel__shade" }),
127
+ /* @__PURE__ */ g("div", { className: "nice-loadpanel__box", children: [
128
+ s && /* @__PURE__ */ e("div", { className: "nice-spinner nice-spinner--md" }),
129
+ /* @__PURE__ */ e("span", { className: "nice-loadpanel__text", children: n || w("loading", "Loading...") })
130
+ ] })
131
+ ] });
132
+ if (d && i.current) {
133
+ const l = i.current;
134
+ return l.style.position = l.style.position || "relative", y;
135
+ }
136
+ return y;
137
+ }, Ut = ({
138
+ direction: t = "row",
139
+ align: n,
140
+ justify: i,
141
+ wrap: s,
142
+ gap: m,
143
+ flex: h,
144
+ children: p,
145
+ className: w,
146
+ style: d
147
+ }) => /* @__PURE__ */ e(
148
+ "div",
149
+ {
150
+ className: `nice-box ${w || ""}`,
151
+ style: {
152
+ display: "flex",
153
+ flexDirection: t,
154
+ alignItems: n,
155
+ justifyContent: i,
156
+ flexWrap: s ? "wrap" : void 0,
157
+ gap: m,
158
+ flex: h,
159
+ ...d
160
+ },
161
+ children: p
162
+ }
163
+ ), Gt = ({
164
+ direction: t = "row",
165
+ items: n,
166
+ gap: i,
167
+ className: s,
168
+ style: m
169
+ }) => /* @__PURE__ */ e(
170
+ "div",
171
+ {
172
+ className: `nice-responsivebox ${s || ""}`,
173
+ style: { display: "flex", flexDirection: t, gap: i, ...m },
174
+ children: n.map((h, p) => /* @__PURE__ */ e(
175
+ "div",
176
+ {
177
+ style: { flex: h.ratio ?? 1, flexBasis: h.baseSize, flexShrink: h.shrink ?? 1 },
178
+ children: h.children
179
+ },
180
+ p
181
+ ))
182
+ }
183
+ ), Kt = ({
184
+ width: t = 200,
185
+ height: n = 200,
186
+ minWidth: i = 50,
187
+ minHeight: s = 50,
188
+ maxWidth: m = 1 / 0,
189
+ maxHeight: h = 1 / 0,
190
+ handles: p = ["right", "bottom", "bottomRight"],
191
+ onResize: w,
192
+ children: d,
193
+ className: y,
194
+ style: l
195
+ }) => {
196
+ const [x, Y] = B({ width: t, height: n }), M = V(null), v = (c, b) => {
197
+ b.preventDefault();
198
+ const r = b.clientX, z = b.clientY, _ = x.width, j = x.height, $ = {
199
+ n: "top",
200
+ s: "bottom",
201
+ e: "right",
202
+ w: "left",
203
+ ne: "topRight",
204
+ se: "bottomRight",
205
+ sw: "bottomLeft",
206
+ nw: "topLeft"
207
+ }[c] ?? c, o = $ === "right" || $ === "topRight" || $ === "bottomRight", C = $ === "left" || $ === "topLeft" || $ === "bottomLeft", E = $ === "bottom" || $ === "bottomRight" || $ === "bottomLeft", S = $ === "top" || $ === "topRight" || $ === "topLeft", a = (u) => {
208
+ const T = u.clientX - r, f = u.clientY - z;
209
+ let D = _, F = j;
210
+ o && (D = _ + T), C && (D = _ - T), E && (F = j + f), S && (F = j - f), D = Math.max(i, Math.min(m, D)), F = Math.max(s, Math.min(h, F)), Y({ width: D, height: F }), w?.({ width: D, height: F });
211
+ }, N = () => {
212
+ document.removeEventListener("pointermove", a), document.removeEventListener("pointerup", N);
213
+ };
214
+ document.addEventListener("pointermove", a), document.addEventListener("pointerup", N);
215
+ }, R = (c) => {
216
+ switch (c) {
217
+ case "top":
218
+ case "bottom":
219
+ return "ns-resize";
220
+ case "left":
221
+ case "right":
222
+ return "ew-resize";
223
+ case "topLeft":
224
+ case "bottomRight":
225
+ return "nwse-resize";
226
+ case "topRight":
227
+ case "bottomLeft":
228
+ return "nesw-resize";
229
+ default:
230
+ return "default";
231
+ }
232
+ }, O = (c) => {
233
+ const b = { position: "absolute", zIndex: 1 }, r = 8;
234
+ return c === "right" ? {
235
+ ...b,
236
+ top: 0,
237
+ right: -r / 2,
238
+ width: r,
239
+ height: "100%",
240
+ cursor: R(c)
241
+ } : c === "bottom" ? {
242
+ ...b,
243
+ left: 0,
244
+ bottom: -r / 2,
245
+ width: "100%",
246
+ height: r,
247
+ cursor: R(c)
248
+ } : c === "left" ? { ...b, top: 0, left: -r / 2, width: r, height: "100%", cursor: R(c) } : c === "top" ? { ...b, top: -r / 2, left: 0, width: "100%", height: r, cursor: R(c) } : c === "bottomRight" ? {
249
+ ...b,
250
+ bottom: -r / 2,
251
+ right: -r / 2,
252
+ width: r * 2,
253
+ height: r * 2,
254
+ cursor: R(c)
255
+ } : c === "bottomLeft" ? {
256
+ ...b,
257
+ bottom: -r / 2,
258
+ left: -r / 2,
259
+ width: r * 2,
260
+ height: r * 2,
261
+ cursor: R(c)
262
+ } : c === "topRight" ? {
263
+ ...b,
264
+ top: -r / 2,
265
+ right: -r / 2,
266
+ width: r * 2,
267
+ height: r * 2,
268
+ cursor: R(c)
269
+ } : c === "topLeft" ? {
270
+ ...b,
271
+ top: -r / 2,
272
+ left: -r / 2,
273
+ width: r * 2,
274
+ height: r * 2,
275
+ cursor: R(c)
276
+ } : b;
277
+ };
278
+ return /* @__PURE__ */ g(
279
+ "div",
280
+ {
281
+ ref: M,
282
+ className: `nice-resizable ${y || ""}`,
283
+ style: {
284
+ ...l,
285
+ width: x.width,
286
+ height: x.height,
287
+ position: "relative",
288
+ overflow: "hidden"
289
+ },
290
+ children: [
291
+ d,
292
+ p.map((c) => /* @__PURE__ */ e("div", { style: O(c), onPointerDown: (b) => v(c, b) }, c))
293
+ ]
294
+ }
295
+ );
296
+ }, jt = ({
297
+ direction: t = "vertical",
298
+ showScrollbar: n = "onInteraction",
299
+ width: i,
300
+ height: s,
301
+ onScroll: m,
302
+ children: h,
303
+ className: p,
304
+ style: w
305
+ }) => {
306
+ const d = t === "horizontal" || t === "both" ? "auto" : "hidden", y = t === "vertical" || t === "both" ? "auto" : "hidden";
307
+ return /* @__PURE__ */ e(
308
+ "div",
309
+ {
310
+ className: `nice-scrollview ${n === "never" ? "nice-scrollview--hide-sb" : n === "always" ? "nice-scrollview--show-sb" : ""} ${p || ""}`,
311
+ style: { ...w, width: i, height: s, overflowX: d, overflowY: y },
312
+ onScroll: m,
313
+ children: h
314
+ }
315
+ );
316
+ };
317
+ function Ae(t, n) {
318
+ if (!t)
319
+ return { score: 1, indices: [] };
320
+ const i = t.toLowerCase(), s = n.toLowerCase();
321
+ let m = 0;
322
+ const h = [];
323
+ let p = 0, w = -1;
324
+ for (let d = 0; d < s.length && m < i.length; d++)
325
+ s[d] === i[m] && (h.push(d), w === d - 1 && (p += 3), (d === 0 || /[\s\-_/.]/.test(n[d - 1])) && (p += 5), n[d] === t[m] && (p += 1), p += 1, w = d, m++);
326
+ return m < i.length ? null : (p -= h[0] * 0.1, { score: p, indices: h });
327
+ }
328
+ function xt(t, n) {
329
+ if (n.length === 0)
330
+ return [t];
331
+ const i = [];
332
+ let s = 0;
333
+ const m = new Set(n);
334
+ for (let h = 0; h < t.length; h++)
335
+ m.has(h) && (s < h && i.push(t.slice(s, h)), i.push(
336
+ bt.createElement(
337
+ "mark",
338
+ { key: `m-${h}`, className: "nice-command-palette__match" },
339
+ t[h]
340
+ )
341
+ ), s = h + 1);
342
+ return s < t.length && i.push(t.slice(s)), i;
343
+ }
344
+ function Nt(t, n) {
345
+ switch (n.type) {
346
+ case "REGISTER": {
347
+ const i = new Map(t.commands);
348
+ return i.set(n.command.id, n.command), { ...t, commands: i };
349
+ }
350
+ case "REGISTER_BATCH": {
351
+ const i = new Map(t.commands);
352
+ for (const s of n.commands)
353
+ i.set(s.id, s);
354
+ return { ...t, commands: i };
355
+ }
356
+ case "UNREGISTER": {
357
+ const i = new Map(t.commands);
358
+ return i.delete(n.id), { ...t, commands: i };
359
+ }
360
+ case "OPEN":
361
+ return { ...t, isOpen: !0, query: "", selectedIndex: 0 };
362
+ case "CLOSE":
363
+ return { ...t, isOpen: !1, query: "", selectedIndex: 0 };
364
+ case "SET_QUERY":
365
+ return { ...t, query: n.query, selectedIndex: 0 };
366
+ case "SET_SELECTED":
367
+ return { ...t, selectedIndex: n.index };
368
+ case "ADD_RECENT": {
369
+ const i = t.recentIds.filter((s) => s !== n.id);
370
+ return {
371
+ ...t,
372
+ recentIds: [n.id, ...i].slice(0, n.maxRecent)
373
+ };
374
+ }
375
+ default:
376
+ return t;
377
+ }
378
+ }
379
+ const Qe = Ve(null);
380
+ function kt() {
381
+ const t = je(Qe);
382
+ if (!t)
383
+ throw new Error("useCommandPalette must be used within NiceCommandPaletteProvider");
384
+ return t;
385
+ }
386
+ const Et = ({
387
+ children: t,
388
+ commands: n,
389
+ placeholder: i = "Type a command...",
390
+ maxVisible: s = 10,
391
+ maxRecent: m = 5,
392
+ className: h,
393
+ emptyText: p = "No commands found",
394
+ closeOnAction: w = !0,
395
+ onOpen: d,
396
+ onClose: y
397
+ }) => {
398
+ const [l, x] = yt(Nt, {
399
+ commands: new Map(n?.map((a) => [a.id, a]) ?? []),
400
+ isOpen: !1,
401
+ query: "",
402
+ selectedIndex: 0,
403
+ recentIds: []
404
+ }), Y = V(null), M = V(null), [v, R] = B(!1), O = k((a) => {
405
+ x({ type: "REGISTER", command: a });
406
+ }, []), c = k((a) => {
407
+ x({ type: "UNREGISTER", id: a });
408
+ }, []), b = k((a) => {
409
+ x({ type: "REGISTER_BATCH", commands: a });
410
+ }, []), r = k(() => {
411
+ x({ type: "OPEN" }), d?.();
412
+ }, [d]), z = k(() => {
413
+ x({ type: "CLOSE" }), y?.();
414
+ }, [y]), _ = k(() => {
415
+ l.isOpen ? z() : r();
416
+ }, [l.isOpen, z, r]), W = Pe(() => {
417
+ const a = Array.from(l.commands.values()).filter((u) => !u.hidden);
418
+ if (!l.query.trim()) {
419
+ const u = l.recentIds.map((f) => l.commands.get(f)).filter((f) => !!f && !f.hidden), T = a.filter((f) => !l.recentIds.includes(f.id));
420
+ return T.sort((f, D) => f.label.localeCompare(D.label)), [...u, ...T].map((f) => ({
421
+ command: f,
422
+ match: null,
423
+ isRecent: l.recentIds.includes(f.id)
424
+ }));
425
+ }
426
+ return a.map((u) => {
427
+ const T = Ae(l.query, u.label), f = u.description ? Ae(l.query, u.description) : null, D = u.keywords?.map((Q) => Ae(l.query, Q)).filter(Boolean)[0] ?? null, F = [T, f, D].filter(Boolean).sort((Q, ne) => (ne?.score ?? 0) - (Q?.score ?? 0))[0];
428
+ return { command: u, match: F, isRecent: !1 };
429
+ }).filter((u) => u.match !== null).sort((u, T) => (T.match?.score ?? 0) - (u.match?.score ?? 0));
430
+ }, [l.commands, l.query, l.recentIds]).slice(0, s), $ = k(
431
+ async (a) => {
432
+ const N = l.commands.get(a);
433
+ if (!(!N || N.disabled)) {
434
+ R(!0);
435
+ try {
436
+ await N.action(), x({ type: "ADD_RECENT", id: a, maxRecent: m });
437
+ } finally {
438
+ R(!1), w && z();
439
+ }
440
+ }
441
+ },
442
+ [l.commands, m, w, z]
443
+ );
444
+ A(() => {
445
+ const a = (N) => {
446
+ (N.metaKey || N.ctrlKey) && N.key === "k" && (N.preventDefault(), _()), N.key === "Escape" && l.isOpen && (N.preventDefault(), z());
447
+ };
448
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
449
+ }, [_, l.isOpen, z]), A(() => {
450
+ l.isOpen && requestAnimationFrame(() => Y.current?.focus());
451
+ }, [l.isOpen]);
452
+ const o = k(
453
+ (a) => {
454
+ const N = W.length;
455
+ if (N) {
456
+ if (a.key === "ArrowDown")
457
+ a.preventDefault(), x({ type: "SET_SELECTED", index: (l.selectedIndex + 1) % N });
458
+ else if (a.key === "ArrowUp")
459
+ a.preventDefault(), x({ type: "SET_SELECTED", index: (l.selectedIndex - 1 + N) % N });
460
+ else if (a.key === "Enter") {
461
+ a.preventDefault();
462
+ const u = W[l.selectedIndex];
463
+ u && $(u.command.id);
464
+ }
465
+ }
466
+ },
467
+ [W, l.selectedIndex, $]
468
+ );
469
+ A(() => {
470
+ if (!M.current)
471
+ return;
472
+ M.current.children[l.selectedIndex]?.scrollIntoView({ block: "nearest" });
473
+ }, [l.selectedIndex]);
474
+ const C = Pe(
475
+ () => ({
476
+ registerCommand: O,
477
+ unregisterCommand: c,
478
+ registerCommands: b,
479
+ open: r,
480
+ close: z,
481
+ toggle: _,
482
+ isOpen: l.isOpen,
483
+ executeCommand: $
484
+ }),
485
+ [
486
+ O,
487
+ c,
488
+ b,
489
+ r,
490
+ z,
491
+ _,
492
+ l.isOpen,
493
+ $
494
+ ]
495
+ ), E = Pe(() => {
496
+ const a = /* @__PURE__ */ new Map();
497
+ for (const N of W) {
498
+ const u = N.command.category ?? "General";
499
+ a.has(u) || a.set(u, []), a.get(u).push(N);
500
+ }
501
+ return a;
502
+ }, [W]);
503
+ let S = 0;
504
+ return /* @__PURE__ */ g(Qe.Provider, { value: C, children: [
505
+ t,
506
+ l.isOpen && /* @__PURE__ */ e("div", { className: `nice-command-palette__overlay ${h ?? ""}`, onClick: z, children: /* @__PURE__ */ g(
507
+ "div",
508
+ {
509
+ className: "nice-command-palette",
510
+ role: "dialog",
511
+ "aria-label": "Command Palette",
512
+ "aria-modal": "true",
513
+ onClick: (a) => a.stopPropagation(),
514
+ children: [
515
+ /* @__PURE__ */ e("div", { className: "nice-command-palette__input-wrapper", children: /* @__PURE__ */ e(
516
+ "input",
517
+ {
518
+ ref: Y,
519
+ className: "nice-command-palette__input",
520
+ type: "text",
521
+ placeholder: i,
522
+ value: l.query,
523
+ onChange: (a) => x({ type: "SET_QUERY", query: a.target.value }),
524
+ onKeyDown: o,
525
+ "aria-label": "Search commands",
526
+ "aria-autocomplete": "list",
527
+ "aria-controls": "nice-command-palette-list",
528
+ "aria-activedescendant": W[l.selectedIndex] ? `nice-cmd-${W[l.selectedIndex].command.id}` : void 0
529
+ }
530
+ ) }),
531
+ /* @__PURE__ */ g(
532
+ "div",
533
+ {
534
+ ref: M,
535
+ id: "nice-command-palette-list",
536
+ className: "nice-command-palette__list",
537
+ role: "listbox",
538
+ children: [
539
+ W.length === 0 && /* @__PURE__ */ e("div", { className: "nice-command-palette__empty", children: p }),
540
+ Array.from(E.entries()).map(([a, N]) => /* @__PURE__ */ g("div", { className: "nice-command-palette__group", children: [
541
+ /* @__PURE__ */ e("div", { className: "nice-command-palette__category", children: a }),
542
+ N.map((u) => {
543
+ const T = S++, f = T === l.selectedIndex;
544
+ return /* @__PURE__ */ g(
545
+ "div",
546
+ {
547
+ id: `nice-cmd-${u.command.id}`,
548
+ className: `nice-command-palette__item ${f ? "nice-command-palette__item--selected" : ""} ${u.command.disabled ? "nice-command-palette__item--disabled" : ""}`,
549
+ role: "option",
550
+ "aria-selected": f,
551
+ "aria-disabled": u.command.disabled,
552
+ onClick: () => !u.command.disabled && $(u.command.id),
553
+ onMouseEnter: () => x({ type: "SET_SELECTED", index: T }),
554
+ children: [
555
+ u.command.icon && /* @__PURE__ */ e("span", { className: "nice-command-palette__icon", children: u.command.icon }),
556
+ /* @__PURE__ */ g("div", { className: "nice-command-palette__label-group", children: [
557
+ /* @__PURE__ */ e("span", { className: "nice-command-palette__label", children: u.match && l.query ? xt(u.command.label, u.match.indices) : u.command.label }),
558
+ u.command.description && /* @__PURE__ */ e("span", { className: "nice-command-palette__description", children: u.command.description })
559
+ ] }),
560
+ u.command.shortcut && /* @__PURE__ */ e("kbd", { className: "nice-command-palette__shortcut", children: u.command.shortcut }),
561
+ u.isRecent && /* @__PURE__ */ e("span", { className: "nice-command-palette__recent-badge", children: "Recent" })
562
+ ]
563
+ },
564
+ u.command.id
565
+ );
566
+ })
567
+ ] }, a))
568
+ ]
569
+ }
570
+ ),
571
+ v && /* @__PURE__ */ e("div", { className: "nice-command-palette__executing", children: "Executing..." })
572
+ ]
573
+ }
574
+ ) })
575
+ ] });
576
+ };
577
+ Et.displayName = "NiceCommandPaletteProvider";
578
+ function Vt(t) {
579
+ const { registerCommands: n, unregisterCommand: i } = kt();
580
+ A(() => (n(t), () => {
581
+ for (const s of t)
582
+ i(s.id);
583
+ }), []);
584
+ }
585
+ const zt = Ue(
586
+ ({ blocked: t, message: n, spinner: i, blur: s, children: m, className: h, style: p, id: w }, d) => {
587
+ const y = He(w);
588
+ return /* @__PURE__ */ g(
589
+ "div",
590
+ {
591
+ ref: d,
592
+ id: y,
593
+ className: `nice-block-ui ${h || ""}`,
594
+ style: { position: "relative", ...p },
595
+ children: [
596
+ m,
597
+ t && /* @__PURE__ */ e(
598
+ "div",
599
+ {
600
+ className: `nice-block-ui__overlay${s ? " nice-block-ui__overlay--blur" : ""}`,
601
+ "aria-busy": "true",
602
+ role: "alert",
603
+ children: (i || n) && /* @__PURE__ */ g("div", { className: "nice-block-ui__content", children: [
604
+ i && /* @__PURE__ */ e("div", { className: "nice-block-ui__spinner", "aria-hidden": "true" }),
605
+ n && /* @__PURE__ */ e("div", { className: "nice-block-ui__message", children: n })
606
+ ] })
607
+ }
608
+ )
609
+ ]
610
+ }
611
+ );
612
+ }
613
+ );
614
+ zt.displayName = "NiceBlockUI";
615
+ const Ct = Ue(
616
+ ({
617
+ windows: t,
618
+ children: n,
619
+ onChange: i,
620
+ onClose: s,
621
+ onFocus: m,
622
+ showTaskbar: h = !0,
623
+ size: p = "md",
624
+ className: w,
625
+ style: d,
626
+ id: y,
627
+ ...l
628
+ }, x) => {
629
+ const Y = He(y), { t: M } = Ye(), [v, R] = B(null), O = V(null), c = t ?? [], b = Math.max(1, ...c.map((o) => o.zIndex ?? 1)), r = k(
630
+ (o, C) => {
631
+ const E = c.map((S) => S.key === o ? { ...S, ...C } : S);
632
+ i?.(E);
633
+ },
634
+ [c, i]
635
+ ), z = k(
636
+ (o) => {
637
+ r(o, { zIndex: b + 1 }), m?.(o);
638
+ },
639
+ [r, b, m]
640
+ ), _ = k(
641
+ (o) => {
642
+ s?.(o), i?.(c.filter((C) => C.key !== o));
643
+ },
644
+ [c, i, s]
645
+ ), j = k(
646
+ (o) => {
647
+ const C = c.find((E) => E.key === o);
648
+ C && r(o, { minimized: !C.minimized, maximized: !1 });
649
+ },
650
+ [c, r]
651
+ ), W = k(
652
+ (o) => {
653
+ const C = c.find((E) => E.key === o);
654
+ C && r(o, { maximized: !C.maximized, minimized: !1 });
655
+ },
656
+ [c, r]
657
+ );
658
+ A(() => {
659
+ if (!v)
660
+ return;
661
+ const o = (E) => {
662
+ const S = c.find((a) => a.key === v.key);
663
+ if (S)
664
+ if (v.mode === "move")
665
+ r(v.key, {
666
+ x: E.clientX - v.offsetX,
667
+ y: E.clientY - v.offsetY
668
+ });
669
+ else {
670
+ const N = O.current?.getBoundingClientRect(), u = N?.left ?? 0, T = N?.top ?? 0;
671
+ r(v.key, {
672
+ width: Math.max(200, E.clientX - u - S.x),
673
+ height: Math.max(100, E.clientY - T - S.y)
674
+ });
675
+ }
676
+ }, C = () => R(null);
677
+ return document.addEventListener("mousemove", o), document.addEventListener("mouseup", C), () => {
678
+ document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", C);
679
+ };
680
+ }, [v, c, r]);
681
+ const $ = k(
682
+ (o, C, E) => {
683
+ C.preventDefault();
684
+ const S = c.find((a) => a.key === o);
685
+ S && (z(o), R({
686
+ key: o,
687
+ offsetX: E === "move" ? C.clientX - S.x : 0,
688
+ offsetY: E === "move" ? C.clientY - S.y : 0,
689
+ mode: E
690
+ }));
691
+ },
692
+ [c, z]
693
+ );
694
+ return /* @__PURE__ */ g(
695
+ "div",
696
+ {
697
+ ref: (o) => {
698
+ O.current = o, typeof x == "function" ? x(o) : x && (x.current = o);
699
+ },
700
+ id: Y,
701
+ className: `nice-wm nice-wm--${p} ${w ?? ""}`,
702
+ style: { ...d, position: "relative", overflow: "hidden" },
703
+ ...l,
704
+ children: [
705
+ c.map((o) => {
706
+ if (o.minimized)
707
+ return null;
708
+ const C = o.maximized, E = C ? {
709
+ position: "absolute",
710
+ top: 0,
711
+ left: 0,
712
+ width: "100%",
713
+ height: "100%",
714
+ zIndex: o.zIndex ?? 1
715
+ } : {
716
+ position: "absolute",
717
+ top: o.y,
718
+ left: o.x,
719
+ width: o.width,
720
+ height: o.height,
721
+ zIndex: o.zIndex ?? 1
722
+ };
723
+ return /* @__PURE__ */ g(
724
+ "div",
725
+ {
726
+ className: `nice-wm__window ${C ? "nice-wm__window--maximized" : ""}`,
727
+ style: E,
728
+ onMouseDown: () => z(o.key),
729
+ role: "dialog",
730
+ "aria-label": o.title,
731
+ children: [
732
+ /* @__PURE__ */ g(
733
+ "div",
734
+ {
735
+ className: "nice-wm__titlebar",
736
+ onMouseDown: (S) => !C && $(o.key, S, "move"),
737
+ children: [
738
+ o.icon && /* @__PURE__ */ e("span", { className: "nice-wm__icon", children: o.icon }),
739
+ /* @__PURE__ */ e("span", { className: "nice-wm__title", children: o.title }),
740
+ /* @__PURE__ */ g("div", { className: "nice-wm__controls", children: [
741
+ (o.minimizable ?? !0) && /* @__PURE__ */ e(
742
+ "button",
743
+ {
744
+ type: "button",
745
+ className: "nice-wm__ctrl-btn nice-wm__ctrl-btn--min",
746
+ onClick: () => j(o.key),
747
+ title: M("wm.minimize", "Minimize"),
748
+ children: /* @__PURE__ */ e(me, { name: "minus", size: 14 })
749
+ }
750
+ ),
751
+ (o.maximizable ?? !0) && /* @__PURE__ */ e(
752
+ "button",
753
+ {
754
+ type: "button",
755
+ className: "nice-wm__ctrl-btn nice-wm__ctrl-btn--max",
756
+ onClick: () => W(o.key),
757
+ title: M("wm.maximize", "Maximize"),
758
+ children: /* @__PURE__ */ e(me, { name: C ? "copy" : "window", size: 14 })
759
+ }
760
+ ),
761
+ (o.closable ?? !0) && /* @__PURE__ */ e(
762
+ "button",
763
+ {
764
+ type: "button",
765
+ className: "nice-wm__ctrl-btn nice-wm__ctrl-btn--close",
766
+ onClick: () => _(o.key),
767
+ title: M("wm.close", "Close"),
768
+ children: /* @__PURE__ */ e(me, { name: "close", size: 14 })
769
+ }
770
+ )
771
+ ] })
772
+ ]
773
+ }
774
+ ),
775
+ /* @__PURE__ */ e("div", { className: "nice-wm__body", children: o.content }),
776
+ (o.resizable ?? !0) && !C && /* @__PURE__ */ e(
777
+ "div",
778
+ {
779
+ className: "nice-wm__resize-handle",
780
+ onMouseDown: (S) => $(o.key, S, "resize")
781
+ }
782
+ )
783
+ ]
784
+ },
785
+ o.key
786
+ );
787
+ }),
788
+ t === void 0 && n,
789
+ h && /* @__PURE__ */ e("div", { className: "nice-wm__taskbar", role: "toolbar", "aria-label": M("wm.taskbar", "Taskbar"), children: c.map((o) => /* @__PURE__ */ g(
790
+ "button",
791
+ {
792
+ type: "button",
793
+ className: `nice-wm__taskbar-btn ${o.minimized ? "nice-wm__taskbar-btn--minimized" : ""}`,
794
+ onClick: () => {
795
+ o.minimized && j(o.key), z(o.key);
796
+ },
797
+ children: [
798
+ o.icon && /* @__PURE__ */ e("span", { className: "nice-wm__taskbar-icon", children: o.icon }),
799
+ /* @__PURE__ */ e("span", { className: "nice-wm__taskbar-label", children: o.title })
800
+ ]
801
+ },
802
+ o.key
803
+ )) })
804
+ ]
805
+ }
806
+ );
807
+ }
808
+ );
809
+ Ct.displayName = "NiceWindowManager";
810
+ function It(t, n) {
811
+ const i = document.querySelector(t);
812
+ if (!i)
813
+ return null;
814
+ const s = i.getBoundingClientRect();
815
+ return {
816
+ top: s.top - n + window.scrollY,
817
+ left: s.left - n + window.scrollX,
818
+ width: s.width + n * 2,
819
+ height: s.height + n * 2
820
+ };
821
+ }
822
+ function Mt(t, n, i, s) {
823
+ const h = { w: window.innerWidth, h: window.innerHeight + window.scrollY }, p = {
824
+ top: {
825
+ top: t.top - i - 12,
826
+ left: t.left + t.width / 2 - n / 2
827
+ },
828
+ bottom: {
829
+ top: t.top + t.height + 12,
830
+ left: t.left + t.width / 2 - n / 2
831
+ },
832
+ left: {
833
+ top: t.top + t.height / 2 - i / 2,
834
+ left: t.left - n - 12
835
+ },
836
+ right: {
837
+ top: t.top + t.height / 2 - i / 2,
838
+ left: t.left + t.width + 12
839
+ }
840
+ };
841
+ if (s && s !== "auto")
842
+ return { ...p[s], actualPlacement: s };
843
+ for (const w of ["bottom", "top", "right", "left"]) {
844
+ const d = p[w];
845
+ if (d.top >= 0 && d.left >= 0 && d.top + i <= h.h && d.left + n <= h.w)
846
+ return { ...d, actualPlacement: w };
847
+ }
848
+ return { ...p.bottom, actualPlacement: "bottom" };
849
+ }
850
+ const ke = {
851
+ width: 16,
852
+ height: 16,
853
+ viewBox: "0 0 24 24",
854
+ fill: "none",
855
+ stroke: "currentColor",
856
+ strokeWidth: 2,
857
+ strokeLinecap: "round",
858
+ strokeLinejoin: "round",
859
+ "aria-hidden": !0
860
+ };
861
+ function Lt() {
862
+ return /* @__PURE__ */ g("svg", { ...ke, children: [
863
+ /* @__PURE__ */ e("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
864
+ /* @__PURE__ */ e("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
865
+ ] });
866
+ }
867
+ function Rt() {
868
+ return /* @__PURE__ */ e("svg", { ...ke, children: /* @__PURE__ */ e("polyline", { points: "15 18 9 12 15 6" }) });
869
+ }
870
+ function $t() {
871
+ return /* @__PURE__ */ e("svg", { ...ke, children: /* @__PURE__ */ e("polyline", { points: "9 18 15 12 9 6" }) });
872
+ }
873
+ function St() {
874
+ return /* @__PURE__ */ g("svg", { ...ke, children: [
875
+ /* @__PURE__ */ e("polygon", { points: "5 4 15 12 5 20 5 4" }),
876
+ /* @__PURE__ */ e("line", { x1: "19", y1: "5", x2: "19", y2: "19" })
877
+ ] });
878
+ }
879
+ function Tt() {
880
+ return /* @__PURE__ */ e("svg", { ...ke, children: /* @__PURE__ */ e("polygon", { points: "6 4 20 12 6 20 6 4", fill: "currentColor" }) });
881
+ }
882
+ function Pt() {
883
+ return /* @__PURE__ */ g("svg", { ...ke, children: [
884
+ /* @__PURE__ */ e("rect", { x: "6", y: "4", width: "4", height: "16", fill: "currentColor" }),
885
+ /* @__PURE__ */ e("rect", { x: "14", y: "4", width: "4", height: "16", fill: "currentColor" })
886
+ ] });
887
+ }
888
+ function Te(t, n, i) {
889
+ return i === "text" ? /* @__PURE__ */ e("span", { className: "nice-tutorial__btn-label", children: n }) : i === "icon-text" ? /* @__PURE__ */ g(Fe, { children: [
890
+ t,
891
+ /* @__PURE__ */ e("span", { className: "nice-tutorial__btn-label", children: n })
892
+ ] }) : t;
893
+ }
894
+ const Ze = ({
895
+ steps: t,
896
+ active: n,
897
+ onFinish: i,
898
+ onSkip: s,
899
+ onStepChange: m,
900
+ closeOnEscape: h = !0,
901
+ closeOnOverlayClick: p = !1,
902
+ showProgress: w = !0,
903
+ showSkipButton: d = !0,
904
+ labels: y,
905
+ animationDuration: l = 300,
906
+ overlayOpacity: x = 0.6,
907
+ zIndex: Y = 1e4,
908
+ buttonsPlacement: M = "floating-bottom",
909
+ buttonsDisplay: v = "icon",
910
+ showAutoplay: R = !0,
911
+ autoplayInterval: O = 5e3,
912
+ autoplaySpeedRange: c = { min: 2e3, max: 15e3 },
913
+ onAutoplayChange: b
914
+ }) => {
915
+ const [r, z] = B(0), [_, j] = B(null), [W, $] = B({ w: 340, h: 200 }), [o, C] = B(!0), [E, S] = B(!1), [a, N] = B(O), u = V(null), T = V(-1), f = t[r], D = r === t.length - 1, F = r === 0, Q = y?.next ?? "Next", ne = y?.back ?? "Back", ie = y?.finish ?? "Finish", pe = y?.skip ?? "Skip", we = y?.stepOf ?? "of", _e = y?.play ?? "Play", ge = y?.pause ?? "Pause", $e = y?.speed ?? "Speed", Ee = y?.close ?? "Close";
916
+ A(() => {
917
+ n && (z(0), S(!1), N(O));
918
+ }, [n, O]), A(() => {
919
+ if (u.current) {
920
+ const L = u.current.getBoundingClientRect();
921
+ $({ w: L.width, h: L.height });
922
+ }
923
+ }, [r, n]), A(() => {
924
+ if (!n || !f)
925
+ return;
926
+ const L = f.highlightPadding ?? 0, P = () => {
927
+ const U = It(f.target, L);
928
+ j(U);
929
+ };
930
+ if (P(), f.scrollIntoView !== !1) {
931
+ document.querySelector(f.target)?.scrollIntoView({ behavior: "smooth", block: "center" });
932
+ const Z = setTimeout(P, 350);
933
+ return () => clearTimeout(Z);
934
+ }
935
+ }, [n, f, r]), A(() => {
936
+ !n || !f || T.current !== r && (T.current >= 0 && T.current < t.length && t[T.current]?.onLeave?.(), f.onEnter?.(), T.current = r);
937
+ }, [n, f, r, t]);
938
+ const oe = k(() => {
939
+ if (D)
940
+ f?.onLeave?.(), i?.();
941
+ else {
942
+ const L = r + 1;
943
+ z(L), m?.(L);
944
+ }
945
+ }, [r, D, i, m, f]), ve = k(() => {
946
+ if (!F) {
947
+ const L = r - 1;
948
+ z(L), m?.(L);
949
+ }
950
+ }, [r, F, m]);
951
+ A(() => {
952
+ if (!n || !f?.advanceOn)
953
+ return;
954
+ const L = document.querySelector(f.target);
955
+ if (!L)
956
+ return;
957
+ const P = () => oe();
958
+ return L.addEventListener(f.advanceOn.event, P), () => L.removeEventListener(f.advanceOn.event, P);
959
+ }, [n, f, r, oe]), A(() => {
960
+ if (!n)
961
+ return;
962
+ const L = (P) => {
963
+ P.key === "Escape" && h ? s?.() : P.key === "ArrowRight" ? oe() : P.key === "ArrowLeft" && ve();
964
+ };
965
+ return document.addEventListener("keydown", L), () => document.removeEventListener("keydown", L);
966
+ }, [n, r, h, oe, ve, s]), A(() => {
967
+ C(!0);
968
+ const L = setTimeout(() => C(!1), l);
969
+ return () => clearTimeout(L);
970
+ }, [r, l]), A(() => {
971
+ if (!n || !E)
972
+ return;
973
+ const L = setInterval(
974
+ () => {
975
+ z((P) => {
976
+ if (P >= t.length - 1)
977
+ return S(!1), b?.(!1), t[P]?.onLeave?.(), i?.(), P;
978
+ const U = P + 1;
979
+ return m?.(U), U;
980
+ });
981
+ },
982
+ Math.max(500, a)
983
+ );
984
+ return () => clearInterval(L);
985
+ }, [n, E, a, t, b, i, m]);
986
+ const Se = k(() => {
987
+ S((L) => {
988
+ const P = !L;
989
+ return b?.(P), P;
990
+ });
991
+ }, [b]), be = Pe(() => _ ? Mt(_, W.w, W.h, f?.placement) : {
992
+ top: typeof window < "u" ? window.innerHeight / 2 : 0,
993
+ left: typeof window < "u" ? window.innerWidth / 2 : 0,
994
+ actualPlacement: "bottom"
995
+ }, [_, W, f?.placement]), ze = t.length === 0 ? 0 : (r + 1) / t.length * 100, ce = k(
996
+ (L) => {
997
+ const P = R && t.length > 1, U = d && !D && /* @__PURE__ */ e(
998
+ "button",
999
+ {
1000
+ type: "button",
1001
+ className: `nice-tutorial__btn nice-tutorial__btn--skip nice-tutorial__btn--${v}`,
1002
+ onClick: s,
1003
+ "aria-label": pe,
1004
+ title: pe,
1005
+ children: Te(/* @__PURE__ */ e(St, {}), pe, v)
1006
+ }
1007
+ ), Z = !F && /* @__PURE__ */ e(
1008
+ "button",
1009
+ {
1010
+ type: "button",
1011
+ className: `nice-tutorial__btn nice-tutorial__btn--back nice-tutorial__btn--${v}`,
1012
+ onClick: ve,
1013
+ "aria-label": ne,
1014
+ title: ne,
1015
+ children: Te(/* @__PURE__ */ e(Rt, {}), ne, v)
1016
+ }
1017
+ ), ye = !f?.waitForAction && /* @__PURE__ */ e(
1018
+ "button",
1019
+ {
1020
+ type: "button",
1021
+ className: `nice-tutorial__btn nice-tutorial__btn--next nice-tutorial__btn--${v}`,
1022
+ onClick: oe,
1023
+ "aria-label": D ? ie : Q,
1024
+ title: D ? ie : Q,
1025
+ children: Te(/* @__PURE__ */ e($t, {}), D ? ie : Q, v)
1026
+ }
1027
+ ), xe = P && /* @__PURE__ */ e(
1028
+ "button",
1029
+ {
1030
+ type: "button",
1031
+ className: [
1032
+ "nice-tutorial__btn",
1033
+ "nice-tutorial__btn--play",
1034
+ `nice-tutorial__btn--${v}`,
1035
+ E ? "nice-tutorial__btn--active" : ""
1036
+ ].filter(Boolean).join(" "),
1037
+ onClick: Se,
1038
+ "aria-label": E ? ge : _e,
1039
+ title: E ? ge : _e,
1040
+ "aria-pressed": E,
1041
+ children: Te(
1042
+ E ? /* @__PURE__ */ e(Pt, {}) : /* @__PURE__ */ e(Tt, {}),
1043
+ E ? ge : _e,
1044
+ v
1045
+ )
1046
+ }
1047
+ );
1048
+ return /* @__PURE__ */ g(
1049
+ "div",
1050
+ {
1051
+ className: [
1052
+ "nice-tutorial__controls",
1053
+ L ? "nice-tutorial__controls--inline" : "nice-tutorial__controls--floating-bottom"
1054
+ ].join(" "),
1055
+ style: L ? void 0 : { zIndex: Y + 2 },
1056
+ role: "group",
1057
+ "aria-label": "Tutorial controls",
1058
+ children: [
1059
+ U,
1060
+ Z,
1061
+ w && /* @__PURE__ */ g("span", { className: "nice-tutorial__step-label", "aria-live": "polite", children: [
1062
+ r + 1,
1063
+ " ",
1064
+ we,
1065
+ " ",
1066
+ t.length
1067
+ ] }),
1068
+ ye,
1069
+ P && /* @__PURE__ */ e(
1070
+ "div",
1071
+ {
1072
+ className: "nice-tutorial__progress-bar",
1073
+ role: "progressbar",
1074
+ "aria-valuenow": Math.round(ze),
1075
+ "aria-valuemin": 0,
1076
+ "aria-valuemax": 100,
1077
+ "aria-label": `${r + 1} ${we} ${t.length}`,
1078
+ children: /* @__PURE__ */ e(
1079
+ "div",
1080
+ {
1081
+ className: "nice-tutorial__progress-bar-fill",
1082
+ style: { width: `${ze}%` }
1083
+ }
1084
+ )
1085
+ }
1086
+ ),
1087
+ xe,
1088
+ P && /* @__PURE__ */ g("label", { className: "nice-tutorial__speed", children: [
1089
+ /* @__PURE__ */ e(
1090
+ "input",
1091
+ {
1092
+ type: "range",
1093
+ className: "nice-tutorial__speed-slider",
1094
+ min: c.min,
1095
+ max: c.max,
1096
+ step: 500,
1097
+ value: c.min + c.max - a,
1098
+ onChange: (De) => N(c.min + c.max - Number(De.target.value)),
1099
+ "aria-label": $e
1100
+ }
1101
+ ),
1102
+ /* @__PURE__ */ g("span", { className: "nice-tutorial__speed-value", children: [
1103
+ (a / 1e3).toFixed(1),
1104
+ "s"
1105
+ ] })
1106
+ ] })
1107
+ ]
1108
+ }
1109
+ );
1110
+ },
1111
+ [
1112
+ R,
1113
+ d,
1114
+ w,
1115
+ v,
1116
+ F,
1117
+ D,
1118
+ s,
1119
+ pe,
1120
+ ne,
1121
+ Q,
1122
+ ie,
1123
+ _e,
1124
+ ge,
1125
+ $e,
1126
+ we,
1127
+ ve,
1128
+ oe,
1129
+ f,
1130
+ E,
1131
+ Se,
1132
+ r,
1133
+ t.length,
1134
+ ze,
1135
+ a,
1136
+ c,
1137
+ Y
1138
+ ]
1139
+ );
1140
+ if (!n || !f)
1141
+ return null;
1142
+ const Ce = typeof document < "u" ? Math.max(document.documentElement.scrollWidth, window.innerWidth) : 0, q = typeof document < "u" ? Math.max(document.documentElement.scrollHeight, window.innerHeight) : 0;
1143
+ return /* @__PURE__ */ g(
1144
+ "div",
1145
+ {
1146
+ className: "nice-tutorial",
1147
+ style: { zIndex: Y },
1148
+ "aria-modal": "true",
1149
+ role: "dialog",
1150
+ "aria-label": "Tutorial",
1151
+ children: [
1152
+ /* @__PURE__ */ g(
1153
+ "svg",
1154
+ {
1155
+ className: "nice-tutorial__overlay",
1156
+ style: {
1157
+ position: "absolute",
1158
+ top: 0,
1159
+ left: 0,
1160
+ width: Ce,
1161
+ height: q,
1162
+ pointerEvents: "auto"
1163
+ },
1164
+ onClick: p ? s : void 0,
1165
+ children: [
1166
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ g("mask", { id: "nice-tutorial-mask", children: [
1167
+ /* @__PURE__ */ e("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: "white" }),
1168
+ _ && /* @__PURE__ */ e(
1169
+ "rect",
1170
+ {
1171
+ x: _.left,
1172
+ y: _.top,
1173
+ width: _.width,
1174
+ height: _.height,
1175
+ rx: "4",
1176
+ fill: "black",
1177
+ className: o ? "nice-tutorial__spotlight--entering" : ""
1178
+ }
1179
+ )
1180
+ ] }) }),
1181
+ /* @__PURE__ */ e(
1182
+ "rect",
1183
+ {
1184
+ x: "0",
1185
+ y: "0",
1186
+ width: "100%",
1187
+ height: "100%",
1188
+ fill: `rgba(0,0,0,${x})`,
1189
+ mask: "url(#nice-tutorial-mask)"
1190
+ }
1191
+ )
1192
+ ]
1193
+ }
1194
+ ),
1195
+ _ && /* @__PURE__ */ e(
1196
+ "div",
1197
+ {
1198
+ className: `nice-tutorial__highlight ${o ? "nice-tutorial__highlight--entering" : ""}`,
1199
+ style: {
1200
+ position: "absolute",
1201
+ top: _.top,
1202
+ left: _.left,
1203
+ width: _.width,
1204
+ height: _.height,
1205
+ transition: `all ${l}ms ease`
1206
+ }
1207
+ }
1208
+ ),
1209
+ f.disableInteraction && _ && /* @__PURE__ */ e(
1210
+ "div",
1211
+ {
1212
+ className: "nice-tutorial__blocker",
1213
+ style: {
1214
+ position: "absolute",
1215
+ top: _.top,
1216
+ left: _.left,
1217
+ width: _.width,
1218
+ height: _.height
1219
+ }
1220
+ }
1221
+ ),
1222
+ /* @__PURE__ */ g(
1223
+ "div",
1224
+ {
1225
+ ref: u,
1226
+ className: `nice-tutorial__tooltip nice-tutorial__tooltip--${be.actualPlacement} ${o ? "nice-tutorial__tooltip--entering" : ""}`,
1227
+ style: {
1228
+ position: "absolute",
1229
+ top: be.top,
1230
+ left: be.left,
1231
+ transition: `all ${l}ms ease`,
1232
+ maxWidth: 380,
1233
+ zIndex: Y + 1
1234
+ },
1235
+ children: [
1236
+ f.showArrow !== !1 && /* @__PURE__ */ e(
1237
+ "div",
1238
+ {
1239
+ className: `nice-tutorial__arrow nice-tutorial__arrow--${be.actualPlacement}`
1240
+ }
1241
+ ),
1242
+ /* @__PURE__ */ g("div", { className: "nice-tutorial__header", children: [
1243
+ /* @__PURE__ */ e("h4", { className: "nice-tutorial__title", children: f.title }),
1244
+ d && /* @__PURE__ */ e(
1245
+ "button",
1246
+ {
1247
+ type: "button",
1248
+ className: "nice-tutorial__close",
1249
+ onClick: s,
1250
+ "aria-label": Ee,
1251
+ title: Ee,
1252
+ children: /* @__PURE__ */ e(Lt, {})
1253
+ }
1254
+ )
1255
+ ] }),
1256
+ /* @__PURE__ */ e(
1257
+ "div",
1258
+ {
1259
+ className: "nice-tutorial__content",
1260
+ dangerouslySetInnerHTML: { __html: gt(f.content) }
1261
+ }
1262
+ ),
1263
+ M === "inline" && ce(!0)
1264
+ ]
1265
+ }
1266
+ ),
1267
+ M === "floating-bottom" && ce(!1)
1268
+ ]
1269
+ }
1270
+ );
1271
+ };
1272
+ Ze.displayName = "NiceTutorial";
1273
+ const Je = Ve({
1274
+ startTutorial: () => {
1275
+ },
1276
+ stopTutorial: () => {
1277
+ },
1278
+ isActive: !1,
1279
+ currentStep: 0,
1280
+ nextStep: () => {
1281
+ },
1282
+ prevStep: () => {
1283
+ },
1284
+ goToStep: () => {
1285
+ }
1286
+ });
1287
+ function Qt() {
1288
+ return je(Je);
1289
+ }
1290
+ const Yt = ({ children: t }) => {
1291
+ const [n, i] = B([]), [s, m] = B(!1), [h, p] = B(0), w = k((M) => {
1292
+ i(M), p(0), m(!0);
1293
+ }, []), d = k(() => {
1294
+ m(!1), p(0), i([]);
1295
+ }, []), y = k(() => {
1296
+ p((M) => Math.min(M + 1, n.length - 1));
1297
+ }, [n.length]), l = k(() => {
1298
+ p((M) => Math.max(M - 1, 0));
1299
+ }, []), x = k(
1300
+ (M) => {
1301
+ p(Math.max(0, Math.min(M, n.length - 1)));
1302
+ },
1303
+ [n.length]
1304
+ ), Y = {
1305
+ startTutorial: w,
1306
+ stopTutorial: d,
1307
+ isActive: s,
1308
+ currentStep: h,
1309
+ nextStep: y,
1310
+ prevStep: l,
1311
+ goToStep: x
1312
+ };
1313
+ return /* @__PURE__ */ g(Je.Provider, { value: Y, children: [
1314
+ t,
1315
+ s && n.length > 0 && /* @__PURE__ */ e(
1316
+ Ze,
1317
+ {
1318
+ steps: n,
1319
+ active: s,
1320
+ onFinish: d,
1321
+ onSkip: d,
1322
+ onStepChange: p
1323
+ }
1324
+ )
1325
+ ] });
1326
+ };
1327
+ Yt.displayName = "NiceTutorialProvider";
1328
+ function Dt(t, n, i, s, m) {
1329
+ const h = t <= m, p = t + m >= i, w = n <= m, d = n + m >= s;
1330
+ return w && h ? "top-left" : w && p ? "top-right" : d && h ? "bottom-left" : d && p ? "bottom-right" : h ? "left" : p ? "right" : w ? "top" : d ? "bottom" : "none";
1331
+ }
1332
+ function Xt(t) {
1333
+ switch (t) {
1334
+ case "left":
1335
+ return { left: 0, top: 0, width: "50%", height: "100%" };
1336
+ case "right":
1337
+ return { left: "50%", top: 0, width: "50%", height: "100%" };
1338
+ case "top":
1339
+ return { left: 0, top: 0, width: "100%", height: "50%" };
1340
+ case "bottom":
1341
+ return { left: 0, top: "50%", width: "100%", height: "50%" };
1342
+ case "top-left":
1343
+ return { left: 0, top: 0, width: "50%", height: "50%" };
1344
+ case "top-right":
1345
+ return { left: "50%", top: 0, width: "50%", height: "50%" };
1346
+ case "bottom-left":
1347
+ return { left: 0, top: "50%", width: "50%", height: "50%" };
1348
+ case "bottom-right":
1349
+ return { left: "50%", top: "50%", width: "50%", height: "50%" };
1350
+ default:
1351
+ return null;
1352
+ }
1353
+ }
1354
+ const Bt = Ue(
1355
+ ({
1356
+ windowKey: t,
1357
+ title: n,
1358
+ icon: i,
1359
+ children: s,
1360
+ footer: m,
1361
+ x: h,
1362
+ y: p,
1363
+ defaultPosition: w,
1364
+ width: d = 480,
1365
+ height: y = 360,
1366
+ minWidth: l = 200,
1367
+ minHeight: x = 120,
1368
+ maxWidth: Y,
1369
+ maxHeight: M,
1370
+ zIndex: v = 1,
1371
+ closable: R = !0,
1372
+ minimizable: O = !0,
1373
+ maximizable: c = !0,
1374
+ fullscreenable: b = !1,
1375
+ pinnable: r = !1,
1376
+ resizable: z = !0,
1377
+ draggable: _ = !0,
1378
+ snappable: j = !0,
1379
+ snapThreshold: W = 20,
1380
+ minimized: $,
1381
+ maximized: o,
1382
+ fullscreen: C,
1383
+ pinned: E,
1384
+ focused: S,
1385
+ onClose: a,
1386
+ onMinimize: N,
1387
+ onMaximize: u,
1388
+ onFullscreen: T,
1389
+ onPin: f,
1390
+ onFocus: D,
1391
+ onMove: F,
1392
+ onResize: Q,
1393
+ onSnap: ne,
1394
+ onTitleBarDoubleClick: ie,
1395
+ size: pe = "md",
1396
+ statusBar: we,
1397
+ titleBarActions: _e,
1398
+ className: ge,
1399
+ style: $e,
1400
+ id: Ee,
1401
+ accessMode: oe,
1402
+ ...ve
1403
+ }, Se) => {
1404
+ const be = He(Ee), ze = vt(oe, Ee), { t: ce } = Ye(), Ce = V(null);
1405
+ Ce.current == null && (Ce.current = `nice-window-${Math.random().toString(36).slice(2, 10)}`);
1406
+ const q = t ?? Ce.current, L = h ?? w?.x ?? 100, P = p ?? w?.y ?? 100;
1407
+ if (ze === "hidden")
1408
+ return null;
1409
+ const [U, Z] = B({ x: L, y: P }), [ye, xe] = B({ width: d, height: y }), [De, et] = B(!1), [tt, nt] = B(!1), [it, ot] = B(!1), [ct, rt] = B(!1), [ee, Xe] = B("none"), st = $ ?? De, J = o ?? tt, G = C ?? it, Ie = E ?? ct, Be = S ?? !0, he = U.x, fe = U.y, re = ye.width, se = ye.height, le = V(
1410
+ null
1411
+ ), K = V(null), X = V(null), lt = k(() => {
1412
+ a?.(q);
1413
+ }, [q, a]), at = k(() => {
1414
+ et(!0), N?.(q);
1415
+ }, [q, N]), Oe = k(() => {
1416
+ const I = !J;
1417
+ nt(I), !I && X.current ? (Z({ x: X.current.x, y: X.current.y }), xe({ width: X.current.w, height: X.current.h }), X.current = null) : I && (X.current = { x: he, y: fe, w: re, h: se }), Xe("none"), u?.(q, I);
1418
+ }, [q, J, he, fe, re, se, u]), qe = k(() => {
1419
+ const I = !G;
1420
+ ot(I), I ? X.current = { x: he, y: fe, w: re, h: se } : X.current && (Z({ x: X.current.x, y: X.current.y }), xe({ width: X.current.w, height: X.current.h }), X.current = null), T?.(q, I);
1421
+ }, [q, G, he, fe, re, se, T]), dt = k(() => {
1422
+ const I = !Ie;
1423
+ rt(I), f?.(q, I);
1424
+ }, [q, Ie, f]), Me = k(() => {
1425
+ D?.(q);
1426
+ }, [q, D]), ut = k(() => {
1427
+ ie ? ie(q) : c && Oe();
1428
+ }, [q, c, Oe, ie]);
1429
+ A(() => {
1430
+ const I = (ae) => {
1431
+ if (!le.current)
1432
+ return;
1433
+ const te = ae.clientX - le.current.startX + le.current.origX, Le = ae.clientY - le.current.startY + le.current.origY;
1434
+ Z({ x: te, y: Le }), F?.(q, { x: te, y: Le });
1435
+ }, H = (ae) => {
1436
+ if (le.current) {
1437
+ if (j) {
1438
+ const te = Dt(
1439
+ ae.clientX,
1440
+ ae.clientY,
1441
+ window.innerWidth,
1442
+ window.innerHeight,
1443
+ W
1444
+ );
1445
+ te !== "none" && (X.current = { x: U.x, y: U.y, w: re, h: se }, Xe(te), ne?.(q, te));
1446
+ }
1447
+ le.current = null;
1448
+ }
1449
+ };
1450
+ return document.addEventListener("mousemove", I), document.addEventListener("mouseup", H), () => {
1451
+ document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", H);
1452
+ };
1453
+ });
1454
+ const mt = k(
1455
+ (I) => {
1456
+ !_ || J || G || (I.preventDefault(), ee !== "none" && (X.current && (Z({ x: X.current.x, y: X.current.y }), xe({ width: X.current.w, height: X.current.h })), Xe("none")), Me(), le.current = { startX: I.clientX, startY: I.clientY, origX: he, origY: fe });
1457
+ },
1458
+ [_, J, G, ee, he, fe, Me]
1459
+ );
1460
+ A(() => {
1461
+ const I = (ae) => {
1462
+ if (!K.current)
1463
+ return;
1464
+ const te = ae.clientX - K.current.startX, Le = ae.clientY - K.current.startY, Ne = K.current.handle;
1465
+ let de = K.current.origW, ue = K.current.origH;
1466
+ if (Ne.includes("e") && (de = K.current.origW + te), Ne.includes("w") && (de = K.current.origW - te), Ne.includes("s") && (ue = K.current.origH + Le), Ne.includes("n") && (ue = K.current.origH - Le), de = Math.max(l, Y ? Math.min(Y, de) : de), ue = Math.max(x, M ? Math.min(M, ue) : ue), Ne.includes("w")) {
1467
+ const We = ye.width - de;
1468
+ Z((Re) => ({ ...Re, x: Re.x + We }));
1469
+ }
1470
+ if (Ne.includes("n")) {
1471
+ const We = ye.height - ue;
1472
+ Z((Re) => ({ ...Re, y: Re.y + We }));
1473
+ }
1474
+ xe({ width: de, height: ue }), Q?.(q, { width: de, height: ue });
1475
+ }, H = () => {
1476
+ K.current = null;
1477
+ };
1478
+ return document.addEventListener("mousemove", I), document.addEventListener("mouseup", H), () => {
1479
+ document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", H);
1480
+ };
1481
+ });
1482
+ const ht = k(
1483
+ (I, H) => {
1484
+ !z || J || G || ee !== "none" || (H.preventDefault(), H.stopPropagation(), Me(), K.current = { startX: H.clientX, startY: H.clientY, origW: re, origH: se, handle: I });
1485
+ },
1486
+ [z, J, G, ee, re, se, Me]
1487
+ );
1488
+ if (A(() => {
1489
+ if (!Be)
1490
+ return;
1491
+ const I = (H) => {
1492
+ H.key === "Escape" && G && qe();
1493
+ };
1494
+ return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
1495
+ }, [Be, G, qe]), st)
1496
+ return null;
1497
+ const Ge = ee !== "none" ? Xt(ee) : null, Ke = J || G, ft = G ? { position: "fixed", top: 0, left: 0, width: "100vw", height: "100vh", zIndex: 999999 } : J ? { position: "absolute", top: 0, left: 0, width: "100%", height: "100%", zIndex: v } : Ge ? { position: "absolute", ...Ge, zIndex: v } : { position: "absolute", top: fe, left: he, width: re, height: se, zIndex: v }, pt = ["n", "e", "s", "w", "ne", "se", "sw", "nw"], wt = {
1498
+ n: "ns-resize",
1499
+ s: "ns-resize",
1500
+ e: "ew-resize",
1501
+ w: "ew-resize",
1502
+ ne: "nesw-resize",
1503
+ sw: "nesw-resize",
1504
+ nw: "nwse-resize",
1505
+ se: "nwse-resize"
1506
+ };
1507
+ return /* @__PURE__ */ g(
1508
+ "div",
1509
+ {
1510
+ ref: Se,
1511
+ id: be,
1512
+ className: `nice-window nice-window--${pe} ${Be ? "nice-window--focused" : ""} ${Ie ? "nice-window--pinned" : ""} ${Ke ? "nice-window--maximized" : ""} ${ee !== "none" ? `nice-window--snapped-${ee}` : ""} ${ge ?? ""}`,
1513
+ style: { ...ft, ...$e },
1514
+ onMouseDown: Me,
1515
+ role: "dialog",
1516
+ "aria-label": n,
1517
+ ...ve,
1518
+ children: [
1519
+ /* @__PURE__ */ g(
1520
+ "div",
1521
+ {
1522
+ className: "nice-window__titlebar",
1523
+ onMouseDown: mt,
1524
+ onDoubleClick: ut,
1525
+ children: [
1526
+ i && /* @__PURE__ */ e("span", { className: "nice-window__icon", children: i }),
1527
+ /* @__PURE__ */ e("span", { className: "nice-window__title", children: n }),
1528
+ /* @__PURE__ */ g("div", { className: "nice-window__actions", children: [
1529
+ _e,
1530
+ r && /* @__PURE__ */ e(
1531
+ "button",
1532
+ {
1533
+ type: "button",
1534
+ className: `nice-window__action nice-window__action--pin ${Ie ? "nice-window__action--active" : ""}`,
1535
+ onClick: dt,
1536
+ title: ce("window.pin", Ie ? "Unpin" : "Pin"),
1537
+ children: /* @__PURE__ */ e(me, { name: "paperclip", size: 14 })
1538
+ }
1539
+ ),
1540
+ O && /* @__PURE__ */ e(
1541
+ "button",
1542
+ {
1543
+ type: "button",
1544
+ className: "nice-window__action nice-window__action--minimize",
1545
+ onClick: at,
1546
+ title: ce("window.minimize", "Minimize"),
1547
+ children: /* @__PURE__ */ e(me, { name: "minus", size: 14 })
1548
+ }
1549
+ ),
1550
+ c && /* @__PURE__ */ e(
1551
+ "button",
1552
+ {
1553
+ type: "button",
1554
+ className: "nice-window__action nice-window__action--maximize",
1555
+ onClick: Oe,
1556
+ title: ce("window.maximize", J ? "Restore" : "Maximize"),
1557
+ children: /* @__PURE__ */ e(me, { name: J ? "copy" : "window", size: 14 })
1558
+ }
1559
+ ),
1560
+ b && /* @__PURE__ */ e(
1561
+ "button",
1562
+ {
1563
+ type: "button",
1564
+ className: "nice-window__action nice-window__action--fullscreen",
1565
+ onClick: qe,
1566
+ title: ce("window.fullscreen", G ? "Exit Full Screen" : "Full Screen"),
1567
+ children: /* @__PURE__ */ e(me, { name: G ? "collapse" : "expand", size: 14 })
1568
+ }
1569
+ ),
1570
+ R && /* @__PURE__ */ e(
1571
+ "button",
1572
+ {
1573
+ type: "button",
1574
+ className: "nice-window__action nice-window__action--close",
1575
+ onClick: lt,
1576
+ title: ce("window.close", "Close"),
1577
+ children: /* @__PURE__ */ e(me, { name: "close", size: 14 })
1578
+ }
1579
+ )
1580
+ ] })
1581
+ ]
1582
+ }
1583
+ ),
1584
+ /* @__PURE__ */ e("div", { className: "nice-window__body", children: s }),
1585
+ m && /* @__PURE__ */ e("div", { className: "nice-window__footer", children: m }),
1586
+ we && /* @__PURE__ */ e("div", { className: "nice-window__statusbar", children: we }),
1587
+ z && !Ke && ee === "none" && /* @__PURE__ */ e(Fe, { children: pt.map((I) => /* @__PURE__ */ e(
1588
+ "div",
1589
+ {
1590
+ className: `nice-window__resize nice-window__resize--${I}`,
1591
+ style: { cursor: wt[I] },
1592
+ onMouseDown: (H) => ht(I, H)
1593
+ },
1594
+ I
1595
+ )) })
1596
+ ]
1597
+ }
1598
+ );
1599
+ }
1600
+ );
1601
+ Bt.displayName = "NiceWindow";
1602
+ export {
1603
+ At as N,
1604
+ zt as a,
1605
+ Ut as b,
1606
+ Et as c,
1607
+ Ht as d,
1608
+ Ft as e,
1609
+ Kt as f,
1610
+ Gt as g,
1611
+ jt as h,
1612
+ Ze as i,
1613
+ Yt as j,
1614
+ Bt as k,
1615
+ Ct as l,
1616
+ Vt as m,
1617
+ Ae as n,
1618
+ xt as o,
1619
+ Qt as p,
1620
+ kt as u
1621
+ };