minerva-design 1.0.0 → 1.0.2
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/CHANGELOG.md +12 -0
- package/custom-elements.json +663 -0
- package/dist/angular/fesm2022/minerva-angular.mjs +1163 -34
- package/dist/angular/fesm2022/minerva-angular.mjs.map +1 -1
- package/dist/angular/types/minerva-angular.d.ts +237 -1
- package/dist/core/calendar-date.d.cts +5 -0
- package/dist/core/calendar-date.d.ts +5 -0
- package/dist/core/contracts.cjs +1 -1
- package/dist/core/contracts.cjs.map +1 -1
- package/dist/core/contracts.js +1 -1
- package/dist/core/contracts.js.map +1 -1
- package/dist/core/index.cjs +6 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +671 -630
- package/dist/core/index.js.map +1 -1
- package/dist/core/styling-hooks/components/date-picker.d.cts +45 -0
- package/dist/core/styling-hooks/components/date-picker.d.ts +45 -0
- package/dist/core/styling-hooks/manifest.d.cts +44 -0
- package/dist/core/styling-hooks/manifest.d.ts +44 -0
- package/dist/core/styling-hooks.cjs +1 -1
- package/dist/core/styling-hooks.cjs.map +1 -1
- package/dist/core/styling-hooks.js +62 -0
- package/dist/core/styling-hooks.js.map +1 -1
- package/dist/native/components/Calendar/Calendar.cjs +1 -1
- package/dist/native/components/Calendar/Calendar.cjs.map +1 -1
- package/dist/native/components/Calendar/Calendar.d.cts +2 -0
- package/dist/native/components/Calendar/Calendar.d.ts +2 -0
- package/dist/native/components/Calendar/Calendar.js +115 -112
- package/dist/native/components/Calendar/Calendar.js.map +1 -1
- package/dist/native/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/native/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/native/components/Checkbox/Checkbox.js +8 -8
- package/dist/native/components/Checkbox/CheckboxGroup.cjs +1 -1
- package/dist/native/components/Checkbox/CheckboxGroup.cjs.map +1 -1
- package/dist/native/components/Checkbox/CheckboxGroup.js +6 -6
- package/dist/native/components/DatePicker/DatePicker.cjs +2 -0
- package/dist/native/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/native/components/DatePicker/DatePicker.d.cts +40 -0
- package/dist/native/components/DatePicker/DatePicker.d.ts +40 -0
- package/dist/native/components/DatePicker/DatePicker.js +110 -0
- package/dist/native/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/native/components/DatePicker/index.cjs +1 -0
- package/dist/native/components/DatePicker/index.d.cts +2 -0
- package/dist/native/components/DatePicker/index.d.ts +2 -0
- package/dist/native/components/DatePicker/index.js +2 -0
- package/dist/native/components/Radio/RadioGroup.cjs +1 -1
- package/dist/native/components/Radio/RadioGroup.cjs.map +1 -1
- package/dist/native/components/Radio/RadioGroup.js +9 -9
- package/dist/native/components/Switch/Switch.cjs +1 -1
- package/dist/native/components/Switch/Switch.cjs.map +1 -1
- package/dist/native/components/Switch/Switch.js +23 -23
- package/dist/native/components/Switch/Switch.js.map +1 -1
- package/dist/native/index.cjs +1 -1
- package/dist/native/index.d.cts +1 -0
- package/dist/native/index.d.ts +1 -0
- package/dist/native/index.js +70 -68
- package/dist/native/source/components/Calendar/Calendar.tsx +14 -6
- package/dist/native/source/components/DatePicker/DatePicker.tsx +201 -0
- package/dist/native/source/components/DatePicker/index.ts +2 -0
- package/dist/native/source/index.ts +1 -0
- package/dist/native/source/manifest.ts +6 -0
- package/dist/react/components/DatePicker/DatePicker.cjs +2 -0
- package/dist/react/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/react/components/DatePicker/DatePicker.d.cts +13 -0
- package/dist/react/components/DatePicker/DatePicker.d.ts +13 -0
- package/dist/react/components/DatePicker/DatePicker.js +315 -0
- package/dist/react/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.cjs +2 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.cjs.map +1 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.js +23 -0
- package/dist/react/components/DatePicker/datePicker.module.scss.js.map +1 -0
- package/dist/react/components/DatePicker/index.cjs +1 -0
- package/dist/react/components/DatePicker/index.d.cts +5 -0
- package/dist/react/components/DatePicker/index.d.ts +5 -0
- package/dist/react/components/DatePicker/index.js +3 -0
- package/dist/react/components/DatePicker/types.d.cts +97 -0
- package/dist/react/components/DatePicker/types.d.ts +97 -0
- package/dist/react/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/react/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/react/components/Tooltip/Tooltip.js +5 -5
- package/dist/react/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/react/components/index.cjs +1 -1
- package/dist/react/components/index.d.cts +1 -0
- package/dist/react/components/index.d.ts +1 -0
- package/dist/react/components/index.js +3 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +7 -6
- package/dist/react/style.css +1 -0
- package/dist/react/styles/date-picker.css +7 -0
- package/dist/taro/date-picker.d.ts +20 -0
- package/dist/taro/index.d.ts +1 -0
- package/dist/taro/index.js +1155 -990
- package/dist/uni/DatePicker.vue +225 -0
- package/dist/uni/DatePicker.vue.d.ts +36 -0
- package/dist/uni/MonthCalendar.vue +2 -0
- package/dist/uni/MonthCalendar.vue.d.ts +2 -0
- package/dist/uni/index.d.ts +1 -0
- package/dist/uni/index.js +1 -0
- package/dist/uni/manifest.d.ts +7 -0
- package/dist/uni/manifest.js +8 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.d.ts +36 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.js +7 -0
- package/dist/vue/components/DatePicker/DatePicker.vue.js.map +1 -0
- package/dist/vue/components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +380 -0
- package/dist/vue/components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/DatePicker/index.d.ts +2 -0
- package/dist/vue/components/DatePicker/index.js +2 -0
- package/dist/vue/components/DatePicker/types.d.ts +26 -0
- package/dist/vue/components/MonthCalendar/MonthCalendar.vue.d.ts +1 -1
- package/dist/vue/global.d.ts +108 -0
- package/dist/vue/groups/forms-pickers.d.ts +1 -0
- package/dist/vue/groups/forms-pickers.js +5 -2
- package/dist/vue/groups/forms-pickers.js.map +1 -1
- package/dist/vue/index.js +95 -94
- package/dist/weapp/controls.js +259 -76
- package/dist/weapp/date-picker/index.js +1 -0
- package/dist/weapp/date-picker/index.json +1 -0
- package/dist/weapp/date-picker/index.wxml +1 -0
- package/dist/weapp/date-picker/index.wxss +1 -0
- package/dist/weapp/types.d.ts +19 -0
- package/dist/web-components/cdn/minerva.js +461 -335
- package/dist/web-components/cdn/minerva.js.map +1 -1
- package/dist/web-components/components/date-picker/date-picker.d.ts +110 -0
- package/dist/web-components/components/date-picker/date-picker.js +378 -0
- package/dist/web-components/components/date-picker/date-picker.js.map +1 -0
- package/dist/web-components/elements/date-picker.d.ts +1 -0
- package/dist/web-components/elements/date-picker.js +8 -0
- package/dist/web-components/elements/date-picker.js.map +1 -0
- package/dist/web-components/html-custom-data.json +85 -0
- package/dist/web-components/index.d.ts +1 -0
- package/dist/web-components/index.js +8 -6
- package/dist/web-components/styles/DatePicker/datePicker.css.js +6 -0
- package/dist/web-components/styles/DatePicker/datePicker.css.js.map +1 -0
- package/dist/web-components/types/react.d.ts +12 -0
- package/dist/web-components/types/solid.d.ts +9 -0
- package/dist/web-components/types/svelte.d.ts +9 -0
- package/dist/web-components/types/vue.d.ts +10 -0
- package/package.json +9 -1
package/dist/taro/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as
|
|
2
|
-
import { Children as
|
|
3
|
-
import { Image as
|
|
4
|
-
import { addDays as
|
|
5
|
-
import
|
|
6
|
-
import { Fragment as
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as I, u as L, v as R, w as ee, x as z, y as te, z as ne } from "./components-LmhBVvPj.js";
|
|
2
|
+
import { Children as re, Fragment as ie, cloneElement as ae, createContext as oe, isValidElement as se, useContext as B, useEffect as V, useId as H, useMemo as ce, useRef as U, useState as W } from "react";
|
|
3
|
+
import { Image as le, Navigator as ue, ScrollView as de, Text as G, View as K } from "@tarojs/components";
|
|
4
|
+
import { addDays as fe, cn as q, computeFixedColumnLayout as pe, dayKey as me, formatHasSeconds as he, formatTime as ge, getColumnCompare as _e, getPaginationItems as ve, getPaginationVisibleRange as ye, getTabsTabStop as be, getVirtualRange as xe, isSafeUrl as Se, matchesAccept as Ce, matchesShortcut as we, monthStart as Te, nextSortState as Ee, normalizeShortcuts as De, parseDayKey as Oe, parseTimeInput as ke, resolveSize as Ae, resolveTimeFormat as je, resolveTokens as Me, secondsOfDay as Ne, startOfToday as Pe } from "../core/index.js";
|
|
5
|
+
import J from "@tarojs/taro";
|
|
6
|
+
import { Fragment as Fe, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
7
7
|
//#region src/navigation.tsx
|
|
8
|
-
var
|
|
8
|
+
var Ie = oe({
|
|
9
9
|
value: "",
|
|
10
10
|
set: (() => {}),
|
|
11
11
|
id: "tabs",
|
|
@@ -15,9 +15,9 @@ var Re = le({
|
|
|
15
15
|
dir: void 0,
|
|
16
16
|
orientation: "horizontal"
|
|
17
17
|
});
|
|
18
|
-
function
|
|
19
|
-
let [d, f] = g(e, n, r), p =
|
|
20
|
-
return /* @__PURE__ */
|
|
18
|
+
function Le({ value: e, defaultValue: n = "", onChange: r, orientation: i = "horizontal", variant: a = "line", color: o = "primary", dir: s, activationMode: c = "automatic", children: l, ...u }) {
|
|
19
|
+
let [d, f] = g(e, n, r), p = H();
|
|
20
|
+
return /* @__PURE__ */ Y(Ie.Provider, {
|
|
21
21
|
value: {
|
|
22
22
|
value: d,
|
|
23
23
|
set: f,
|
|
@@ -28,26 +28,26 @@ function ze({ value: e, defaultValue: n = "", onChange: r, orientation: i = "hor
|
|
|
28
28
|
activationMode: c,
|
|
29
29
|
dir: s
|
|
30
30
|
},
|
|
31
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ Y(t, {
|
|
32
32
|
name: "tabs",
|
|
33
33
|
...u,
|
|
34
34
|
style: {
|
|
35
35
|
direction: s,
|
|
36
36
|
...u.style
|
|
37
37
|
},
|
|
38
|
-
className:
|
|
38
|
+
className: q(`mn-direction-${i}`, `mn-tabs-${a}`, u.className),
|
|
39
39
|
children: l
|
|
40
40
|
})
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function Re(e) {
|
|
44
|
+
return re.toArray(e).flatMap((e) => !se(e) || e.type === Le ? [] : e.type === Be && e.props.value !== void 0 ? [{
|
|
45
45
|
value: e.props.value,
|
|
46
46
|
disabled: e.props.disabled
|
|
47
|
-
}] :
|
|
47
|
+
}] : Re(e.props.children));
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
let a =
|
|
49
|
+
function ze({ children: n, loop: r = !0, ...i }) {
|
|
50
|
+
let a = B(Ie), o = H(), s = i.id ?? o;
|
|
51
51
|
e(s, {
|
|
52
52
|
selector: "[role=\"tab\"]",
|
|
53
53
|
orientation: a.orientation,
|
|
@@ -55,13 +55,13 @@ function Ve({ children: n, loop: r = !0, ...i }) {
|
|
|
55
55
|
loop: r,
|
|
56
56
|
automatic: a.activationMode === "automatic"
|
|
57
57
|
});
|
|
58
|
-
let c =
|
|
59
|
-
return /* @__PURE__ */
|
|
58
|
+
let c = be(Re(n), a.value)?.value;
|
|
59
|
+
return /* @__PURE__ */ Y(Ie.Provider, {
|
|
60
60
|
value: {
|
|
61
61
|
...a,
|
|
62
62
|
tabStop: c
|
|
63
63
|
},
|
|
64
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ Y(t, {
|
|
65
65
|
name: "tabs",
|
|
66
66
|
part: "list",
|
|
67
67
|
role: "tablist",
|
|
@@ -76,9 +76,9 @@ function Ve({ children: n, loop: r = !0, ...i }) {
|
|
|
76
76
|
})
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
let i =
|
|
81
|
-
return /* @__PURE__ */
|
|
79
|
+
function Be({ value: e, disabled: t, children: n, ...r }) {
|
|
80
|
+
let i = B(Ie);
|
|
81
|
+
return /* @__PURE__ */ Y(I, {
|
|
82
82
|
...r,
|
|
83
83
|
variant: "ghost",
|
|
84
84
|
color: r.color ?? i.color,
|
|
@@ -88,14 +88,14 @@ function He({ value: e, disabled: t, children: n, ...r }) {
|
|
|
88
88
|
"aria-selected": i.value === e,
|
|
89
89
|
tabIndex: i.tabStop === e ? 0 : -1,
|
|
90
90
|
disabled: t,
|
|
91
|
-
className:
|
|
91
|
+
className: q("mn-tab", i.value === e && "mn-selected", r.className),
|
|
92
92
|
onClick: () => i.set(e),
|
|
93
93
|
children: n
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
let a =
|
|
98
|
-
return a.value !== e && !n ? null : /* @__PURE__ */
|
|
96
|
+
function Ve({ value: e, forceMount: n, children: r, ...i }) {
|
|
97
|
+
let a = B(Ie);
|
|
98
|
+
return a.value !== e && !n ? null : /* @__PURE__ */ Y(t, {
|
|
99
99
|
name: "tabs",
|
|
100
100
|
part: "panel",
|
|
101
101
|
role: "tabpanel",
|
|
@@ -109,38 +109,38 @@ function Ue({ value: e, forceMount: n, children: r, ...i }) {
|
|
|
109
109
|
children: r
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function He({ items: e, value: n, defaultValue: r = 0, onChange: i, readOnly: a = !1, ...o }) {
|
|
113
113
|
let { t: c } = s(), [l, u] = g(n, r, i);
|
|
114
|
-
return /* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ Y(t, {
|
|
115
115
|
name: "steps",
|
|
116
116
|
...o,
|
|
117
117
|
"aria-label": o["aria-label"] ?? c("steps.label"),
|
|
118
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
119
|
-
className:
|
|
120
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: e.map((e, t) => /* @__PURE__ */ X(K, {
|
|
119
|
+
className: q("mn-step", t === l && "mn-selected", t < l && "mn-complete", e.status && `mn-status-${e.status}`),
|
|
120
|
+
children: [/* @__PURE__ */ X(I, {
|
|
121
121
|
variant: "ghost",
|
|
122
122
|
"aria-label": typeof e.title == "string" ? e.title : void 0,
|
|
123
123
|
"aria-current": t === l ? "step" : void 0,
|
|
124
124
|
disabled: a || e.disabled,
|
|
125
125
|
onClick: () => u(t),
|
|
126
|
-
children: [e.icon ?? /* @__PURE__ */
|
|
126
|
+
children: [e.icon ?? /* @__PURE__ */ Y(G, {
|
|
127
127
|
className: "mn-step-number",
|
|
128
128
|
children: t < l ? "✓" : t + 1
|
|
129
129
|
}), e.title]
|
|
130
|
-
}), e.description && /* @__PURE__ */
|
|
130
|
+
}), e.description && /* @__PURE__ */ Y(G, { children: e.description })]
|
|
131
131
|
}, t))
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
var
|
|
134
|
+
var Ue = oe({
|
|
135
135
|
value: "",
|
|
136
136
|
set: (() => {}),
|
|
137
137
|
itemId: (e) => e
|
|
138
138
|
});
|
|
139
|
-
function
|
|
140
|
-
let { t: u } = s(), d =
|
|
139
|
+
function We({ activeValue: e = "", onChange: n, children: r, actions: i, scrollLeftLabel: a, scrollRightLabel: o, dir: c, ...l }) {
|
|
140
|
+
let { t: u } = s(), d = H().replace(/[^a-zA-Z0-9_-]/g, ""), f = l.id ?? `mn-pages-${d}`, p = (e) => `${f}-item-${Array.from(e).map((e) => e.codePointAt(0).toString(16)).join("-")}`, [m, h] = W({
|
|
141
141
|
width: 0,
|
|
142
142
|
content: 0
|
|
143
|
-
}), [g, _] =
|
|
143
|
+
}), [g, _] = W(0), [v, y] = W(""), b = U({
|
|
144
144
|
offset: g,
|
|
145
145
|
size: m
|
|
146
146
|
});
|
|
@@ -148,10 +148,10 @@ function Ke({ activeValue: e = "", onChange: n, children: r, actions: i, scrollL
|
|
|
148
148
|
offset: g,
|
|
149
149
|
size: m
|
|
150
150
|
};
|
|
151
|
-
let x =
|
|
152
|
-
|
|
151
|
+
let x = re.toArray(r).map((e) => se(e) ? e.props.value ?? e.key : "").join("|");
|
|
152
|
+
V(() => {
|
|
153
153
|
let t = !1;
|
|
154
|
-
return y(""),
|
|
154
|
+
return y(""), J.nextTick(() => {
|
|
155
155
|
!t && e && y(p(e));
|
|
156
156
|
}), () => {
|
|
157
157
|
t = !0;
|
|
@@ -160,9 +160,9 @@ function Ke({ activeValue: e = "", onChange: n, children: r, actions: i, scrollL
|
|
|
160
160
|
e,
|
|
161
161
|
x,
|
|
162
162
|
f
|
|
163
|
-
]),
|
|
163
|
+
]), V(() => {
|
|
164
164
|
let e = !1, t = () => {
|
|
165
|
-
let t =
|
|
165
|
+
let t = J.createSelectorQuery?.();
|
|
166
166
|
if (!t) return;
|
|
167
167
|
let n = 0, r = 0;
|
|
168
168
|
t.select(`#${f}-scroll`).boundingClientRect((e) => {
|
|
@@ -176,20 +176,20 @@ function Ke({ activeValue: e = "", onChange: n, children: r, actions: i, scrollL
|
|
|
176
176
|
});
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
|
-
return t(),
|
|
180
|
-
e = !0,
|
|
179
|
+
return t(), J.onWindowResize?.(t), () => {
|
|
180
|
+
e = !0, J.offWindowResize?.(t);
|
|
181
181
|
};
|
|
182
182
|
}, [f, x]);
|
|
183
183
|
let S = Math.max(0, m.content - m.width), C = (c ?? l.style?.direction) === "rtl", w = (e) => {
|
|
184
184
|
y(""), _(Math.max(0, Math.min(S, g + e * m.width * .8)));
|
|
185
185
|
};
|
|
186
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ Y(Ue.Provider, {
|
|
187
187
|
value: {
|
|
188
188
|
value: e,
|
|
189
189
|
set: n ?? (() => {}),
|
|
190
190
|
itemId: p
|
|
191
191
|
},
|
|
192
|
-
children: /* @__PURE__ */
|
|
192
|
+
children: /* @__PURE__ */ X(t, {
|
|
193
193
|
name: "page-tabs",
|
|
194
194
|
role: "navigation",
|
|
195
195
|
...l,
|
|
@@ -199,14 +199,14 @@ function Ke({ activeValue: e = "", onChange: n, children: r, actions: i, scrollL
|
|
|
199
199
|
...l.style
|
|
200
200
|
},
|
|
201
201
|
children: [
|
|
202
|
-
S > 1 && /* @__PURE__ */
|
|
202
|
+
S > 1 && /* @__PURE__ */ Y(I, {
|
|
203
203
|
variant: "ghost",
|
|
204
204
|
"aria-label": C ? o ?? u("pageTabs.scrollRight") : a ?? u("pageTabs.scrollLeft"),
|
|
205
205
|
disabled: g <= 1,
|
|
206
206
|
onClick: () => w(-1),
|
|
207
207
|
children: C ? "›" : "‹"
|
|
208
208
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ Y(de, {
|
|
210
210
|
id: `${f}-scroll`,
|
|
211
211
|
scrollX: !0,
|
|
212
212
|
scrollLeft: C ? -g : g,
|
|
@@ -219,14 +219,14 @@ function Ke({ activeValue: e = "", onChange: n, children: r, actions: i, scrollL
|
|
|
219
219
|
content: e.detail.scrollWidth
|
|
220
220
|
});
|
|
221
221
|
},
|
|
222
|
-
children: /* @__PURE__ */ K
|
|
222
|
+
children: /* @__PURE__ */ Y(K, {
|
|
223
223
|
id: `${f}-content`,
|
|
224
224
|
className: "mn-page-tabs-content",
|
|
225
225
|
role: "tablist",
|
|
226
226
|
children: r
|
|
227
227
|
})
|
|
228
228
|
}),
|
|
229
|
-
S > 1 && /* @__PURE__ */
|
|
229
|
+
S > 1 && /* @__PURE__ */ Y(I, {
|
|
230
230
|
variant: "ghost",
|
|
231
231
|
"aria-label": C ? a ?? u("pageTabs.scrollLeft") : o ?? u("pageTabs.scrollRight"),
|
|
232
232
|
disabled: g >= S - 1,
|
|
@@ -238,16 +238,16 @@ function Ke({ activeValue: e = "", onChange: n, children: r, actions: i, scrollL
|
|
|
238
238
|
})
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Ge({ value: e, label: t, active: n, disabled: r, icon: i, action: a, closable: o, closeLabel: c, onClose: l, onClick: u, onSelect: d, ...f }) {
|
|
242
242
|
let { t: p } = s();
|
|
243
243
|
c ??= p("pageTabs.close", { label: typeof t == "string" ? t : e });
|
|
244
|
-
let m =
|
|
245
|
-
return /* @__PURE__ */
|
|
244
|
+
let m = B(Ue);
|
|
245
|
+
return /* @__PURE__ */ X(K, {
|
|
246
246
|
className: "mn-page-tab",
|
|
247
247
|
id: m.itemId(e),
|
|
248
248
|
"data-value": e,
|
|
249
249
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ X(I, {
|
|
251
251
|
...f,
|
|
252
252
|
role: "tab",
|
|
253
253
|
variant: "ghost",
|
|
@@ -260,7 +260,7 @@ function qe({ value: e, label: t, active: n, disabled: r, icon: i, action: a, cl
|
|
|
260
260
|
children: [i, t]
|
|
261
261
|
}),
|
|
262
262
|
a,
|
|
263
|
-
o && /* @__PURE__ */
|
|
263
|
+
o && /* @__PURE__ */ Y(I, {
|
|
264
264
|
variant: "ghost",
|
|
265
265
|
"aria-label": c,
|
|
266
266
|
disabled: r,
|
|
@@ -270,113 +270,113 @@ function qe({ value: e, label: t, active: n, disabled: r, icon: i, action: a, cl
|
|
|
270
270
|
]
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Ke({ current: e, defaultCurrent: n = 1, total: r = 0, pageSize: i, defaultPageSize: a = 10, onChange: o, onPageSizeChange: c, disabled: l, siblingCount: u, boundaryCount: d, showTotal: f, totalRender: p, itemRender: m, showQuickJumper: h, showSizeChanger: _, pageSizeOptions: v = [
|
|
274
274
|
10,
|
|
275
275
|
20,
|
|
276
276
|
50,
|
|
277
277
|
100
|
|
278
278
|
], hideEdges: y = !1, hideNumbers: b, simple: x, responsive: S, size: C = "medium", shape: w = "rounded", variant: T = "solid", labels: E, icons: D, ...O }) {
|
|
279
|
-
let { t: k } = s(), [A,
|
|
280
|
-
|
|
281
|
-
let
|
|
279
|
+
let { t: k } = s(), [A, M] = g(i, a), [N, P] = g(e, n), F = Number.isFinite(A) && A > 0 ? Math.floor(A) : 10, L = Number.isFinite(r) ? Math.max(0, Math.floor(r)) : 0, R = Math.max(1, Math.ceil(L / F)), ee = Math.min(R, Math.max(1, Number.isFinite(N) ? Math.floor(N) : 1)), [z, te] = W(null);
|
|
280
|
+
V(() => te(null), [ee]);
|
|
281
|
+
let ne = (e) => {
|
|
282
282
|
if (l || !Number.isFinite(e)) return;
|
|
283
|
-
let t = Math.min(
|
|
284
|
-
t !==
|
|
285
|
-
},
|
|
283
|
+
let t = Math.min(R, Math.max(1, Math.floor(e)));
|
|
284
|
+
t !== ee && (P(t), o?.(t, F));
|
|
285
|
+
}, re = (e) => {
|
|
286
286
|
if (l || !Number.isFinite(e) || e <= 0) return;
|
|
287
287
|
let t = Math.floor(e);
|
|
288
|
-
(t !==
|
|
289
|
-
},
|
|
290
|
-
page:
|
|
291
|
-
totalPages:
|
|
288
|
+
(t !== F || ee !== 1) && (M(t), P(1), c?.(t), o?.(1, t));
|
|
289
|
+
}, ie = ye(ee, F, L), ae = typeof f == "function" ? f(L, ie) : p?.(L, ie) ?? E?.total?.(L) ?? k("pagination.total", { total: L }), oe = ve({
|
|
290
|
+
page: ee,
|
|
291
|
+
totalPages: R,
|
|
292
292
|
siblingCount: u,
|
|
293
293
|
boundaryCount: d,
|
|
294
294
|
hideEdges: y
|
|
295
|
-
}),
|
|
295
|
+
}), se = /* @__PURE__ */ Y(j, {
|
|
296
296
|
"aria-label": E?.currentPage ?? k("pagination.currentPage"),
|
|
297
|
-
value:
|
|
297
|
+
value: z ?? String(ee),
|
|
298
298
|
disabled: l,
|
|
299
299
|
type: "number",
|
|
300
|
-
onChange:
|
|
300
|
+
onChange: te,
|
|
301
301
|
onConfirm: () => {
|
|
302
|
-
|
|
302
|
+
z !== null && z.trim() && ne(Number(z)), te(null);
|
|
303
303
|
},
|
|
304
304
|
onBlur: () => {
|
|
305
|
-
|
|
305
|
+
z !== null && z.trim() && ne(Number(z)), te(null);
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ X(t, {
|
|
309
309
|
name: "pagination",
|
|
310
310
|
role: "navigation",
|
|
311
311
|
...O,
|
|
312
312
|
"aria-label": O["aria-label"] ?? E?.nav ?? k("pagination.nav"),
|
|
313
|
-
className:
|
|
313
|
+
className: q(S && "mn-pagination-responsive", O.className),
|
|
314
314
|
children: [
|
|
315
|
-
f && /* @__PURE__ */
|
|
316
|
-
|
|
317
|
-
if (e.kind === "ellipsis") return x || b ? null : /* @__PURE__ */
|
|
315
|
+
f && /* @__PURE__ */ Y(G, { children: ae }),
|
|
316
|
+
oe.map((e) => {
|
|
317
|
+
if (e.kind === "ellipsis") return x || b ? null : /* @__PURE__ */ Y(G, { children: "…" }, e.key);
|
|
318
318
|
if ((x || b) && e.kind !== "prev" && e.kind !== "next") return null;
|
|
319
319
|
let t = e.kind, n = t === "page" ? E?.page?.(e.page) ?? k("pagination.page", { page: e.page }) : t === "prev" ? E?.previous ?? E?.prev ?? k("pagination.prev") : t === "next" ? E?.next ?? k("pagination.next") : t === "jump-prev" ? E?.jumpPrev ?? k("pagination.jumpPrev") : E?.jumpNext ?? k("pagination.jumpNext"), r = t === "prev" ? D?.prev ?? "‹" : t === "next" ? D?.next ?? "›" : t === "jump-prev" ? D?.jumpPrev ?? "«" : t === "jump-next" ? D?.jumpNext ?? "»" : e.page;
|
|
320
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ Y(I, {
|
|
321
321
|
size: C,
|
|
322
322
|
shape: w,
|
|
323
|
-
variant: t === "page" && e.page ===
|
|
323
|
+
variant: t === "page" && e.page === ee ? T : "ghost",
|
|
324
324
|
className: t === "page" ? "mn-pagination-number" : "",
|
|
325
325
|
"aria-label": n,
|
|
326
|
-
"aria-current": t === "page" && e.page ===
|
|
327
|
-
disabled: l || e.page < 1 || e.page >
|
|
328
|
-
onClick: () =>
|
|
326
|
+
"aria-current": t === "page" && e.page === ee ? "page" : void 0,
|
|
327
|
+
disabled: l || e.page < 1 || e.page > R,
|
|
328
|
+
onClick: () => ne(e.page),
|
|
329
329
|
children: m ? m(e.page, t) : r
|
|
330
330
|
}, e.key);
|
|
331
331
|
}),
|
|
332
|
-
x ? /* @__PURE__ */
|
|
332
|
+
x ? /* @__PURE__ */ X(K, {
|
|
333
333
|
className: "mn-pagination-counter",
|
|
334
|
-
children: [
|
|
335
|
-
}) : b ? /* @__PURE__ */
|
|
336
|
-
|
|
334
|
+
children: [se, /* @__PURE__ */ X(G, { children: ["/ ", R] })]
|
|
335
|
+
}) : b ? /* @__PURE__ */ X(G, { children: [
|
|
336
|
+
ee,
|
|
337
337
|
" / ",
|
|
338
|
-
|
|
338
|
+
R
|
|
339
339
|
] }) : null,
|
|
340
|
-
h && !x && /* @__PURE__ */
|
|
340
|
+
h && !x && /* @__PURE__ */ X(K, {
|
|
341
341
|
className: "mn-pagination-jumper",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ Y(G, { children: E?.jumpTo ?? k("pagination.jumpTo") }), /* @__PURE__ */ Y(j, {
|
|
343
343
|
"aria-label": E?.jumpToInput ?? k("pagination.jumpToInput"),
|
|
344
344
|
type: "number",
|
|
345
345
|
disabled: l,
|
|
346
|
-
onConfirm: (e) =>
|
|
346
|
+
onConfirm: (e) => ne(Number(e.detail.value))
|
|
347
347
|
})]
|
|
348
348
|
}),
|
|
349
|
-
_ && /* @__PURE__ */
|
|
349
|
+
_ && /* @__PURE__ */ Y(t, {
|
|
350
350
|
name: "pagination",
|
|
351
351
|
part: "sizes",
|
|
352
352
|
role: "group",
|
|
353
353
|
"aria-label": E?.pageSize ?? k("pagination.pageSize"),
|
|
354
|
-
children: v.filter((e) => Number.isFinite(e) && e > 0 && Number.isInteger(e)).map((e) => /* @__PURE__ */
|
|
354
|
+
children: v.filter((e) => Number.isFinite(e) && e > 0 && Number.isInteger(e)).map((e) => /* @__PURE__ */ Y(I, {
|
|
355
355
|
size: C,
|
|
356
|
-
variant:
|
|
356
|
+
variant: F === e ? "solid" : "ghost",
|
|
357
357
|
disabled: l,
|
|
358
358
|
"aria-label": E?.pageSizeOption?.(e) ?? k("pagination.pageSizeOption", { size: e }),
|
|
359
|
-
onClick: () =>
|
|
359
|
+
onClick: () => re(e),
|
|
360
360
|
children: e
|
|
361
361
|
}, e))
|
|
362
362
|
})
|
|
363
363
|
]
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Z(e, t) {
|
|
367
367
|
for (let n of e) {
|
|
368
368
|
if (n.id === t) return [];
|
|
369
369
|
if (n.children) {
|
|
370
370
|
if (n.children.some((e) => e.id === t)) return [n.id];
|
|
371
|
-
let e =
|
|
371
|
+
let e = Z(n.children, t);
|
|
372
372
|
if (e.length) return [n.id, ...e];
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
return [];
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
let { t: p } = s(), [m, h] = g(a, o, c), [_, v] =
|
|
379
|
-
let a = !!e.children?.length, o = e.id === n, s = y.has(e.id), c = a && (m.includes(e.id) || s && !_.has(e.id)), f =
|
|
377
|
+
function qe({ sections: e, activeId: n, onSelect: r, onItemSelect: i, expandedIds: a, defaultExpandedIds: o = [], onExpandedChange: c, collapsed: l = !1, wrapLabels: u = !1, renderLink: d, ...f }) {
|
|
378
|
+
let { t: p } = s(), [m, h] = g(a, o, c), [_, v] = W(() => /* @__PURE__ */ new Set()), y = new Set(Z(e.flatMap((e) => e.items), n)), b = (e, t = 0) => e.map((e) => {
|
|
379
|
+
let a = !!e.children?.length, o = e.id === n, s = y.has(e.id), c = a && (m.includes(e.id) || s && !_.has(e.id)), f = q("mn-nav-tree-item", o && "mn-selected", u && "mn-nav-tree-wrap"), p = {
|
|
380
380
|
active: o,
|
|
381
381
|
ancestorActive: s,
|
|
382
382
|
expanded: c,
|
|
@@ -385,7 +385,7 @@ function J({ sections: e, activeId: n, onSelect: r, onItemSelect: i, expandedIds
|
|
|
385
385
|
hasChildren: a,
|
|
386
386
|
disabled: !!e.disabled,
|
|
387
387
|
className: f
|
|
388
|
-
}, g = /* @__PURE__ */
|
|
388
|
+
}, g = /* @__PURE__ */ X(Fe, { children: [e.icon, !l && e.label] }), x = () => {
|
|
389
389
|
if (!e.disabled) {
|
|
390
390
|
if (a) {
|
|
391
391
|
let t = new Set(_);
|
|
@@ -394,15 +394,15 @@ function J({ sections: e, activeId: n, onSelect: r, onItemSelect: i, expandedIds
|
|
|
394
394
|
i?.(e);
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
|
-
return /* @__PURE__ */
|
|
397
|
+
return /* @__PURE__ */ X(K, {
|
|
398
398
|
className: "mn-nav-tree-node",
|
|
399
|
-
children: [!a && d ? /* @__PURE__ */ K
|
|
399
|
+
children: [!a && d ? /* @__PURE__ */ Y(K, {
|
|
400
400
|
role: "treeitem",
|
|
401
401
|
"aria-selected": o,
|
|
402
402
|
"aria-disabled": e.disabled,
|
|
403
403
|
onClick: x,
|
|
404
404
|
children: d(e, g, p)
|
|
405
|
-
}) : /* @__PURE__ */
|
|
405
|
+
}) : /* @__PURE__ */ Y(I, {
|
|
406
406
|
variant: "ghost",
|
|
407
407
|
role: "treeitem",
|
|
408
408
|
className: f,
|
|
@@ -411,33 +411,33 @@ function J({ sections: e, activeId: n, onSelect: r, onItemSelect: i, expandedIds
|
|
|
411
411
|
disabled: e.disabled,
|
|
412
412
|
onClick: x,
|
|
413
413
|
children: g
|
|
414
|
-
}), a && c && !l && /* @__PURE__ */ K
|
|
414
|
+
}), a && c && !l && /* @__PURE__ */ Y(K, {
|
|
415
415
|
role: "group",
|
|
416
416
|
className: "mn-nav-tree-children",
|
|
417
417
|
children: b(e.children, t + 1)
|
|
418
418
|
})]
|
|
419
419
|
}, e.id);
|
|
420
420
|
});
|
|
421
|
-
return /* @__PURE__ */
|
|
421
|
+
return /* @__PURE__ */ Y(t, {
|
|
422
422
|
name: "nav-tree",
|
|
423
423
|
role: "tree",
|
|
424
424
|
...f,
|
|
425
425
|
"aria-label": f["aria-label"] ?? p("navTree.label"),
|
|
426
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
426
|
+
children: e.map((e, t) => /* @__PURE__ */ X(K, { children: [!l && (e.title ?? e.label), b(e.items)] }, e.id ?? t))
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
429
|
//#endregion
|
|
430
430
|
//#region src/overlays.tsx
|
|
431
|
-
var
|
|
431
|
+
var Je = oe({
|
|
432
432
|
open: !1,
|
|
433
433
|
modal: !0,
|
|
434
434
|
headingId: void 0,
|
|
435
435
|
setHeadingId: (() => {}),
|
|
436
436
|
set: (() => {})
|
|
437
437
|
});
|
|
438
|
-
function
|
|
439
|
-
let [a, o] = g(e, t, n), [s, c] =
|
|
440
|
-
return /* @__PURE__ */
|
|
438
|
+
function Ye({ open: e, defaultOpen: t = !1, onOpenChange: n, children: r, modal: i = !0 }) {
|
|
439
|
+
let [a, o] = g(e, t, n), [s, c] = W();
|
|
440
|
+
return /* @__PURE__ */ Y(Je.Provider, {
|
|
441
441
|
value: {
|
|
442
442
|
open: a,
|
|
443
443
|
set: o,
|
|
@@ -448,39 +448,39 @@ function Ze({ open: e, defaultOpen: t = !1, onOpenChange: n, children: r, modal:
|
|
|
448
448
|
children: r
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
let o =
|
|
451
|
+
function Xe({ children: e, asChild: t = !1, disabled: n, onClick: r, close: i = !1, ...a }) {
|
|
452
|
+
let o = B(Je), s = se(e) ? e : null, c = (e) => {
|
|
453
453
|
n || t && s?.props.disabled || (t && s?.props.onClick?.(e), r?.(e), "defaultPrevented" in e && e.defaultPrevented || o.set(!i && !o.open));
|
|
454
454
|
};
|
|
455
|
-
return t && s ?
|
|
455
|
+
return t && s ? ae(s, {
|
|
456
456
|
...a,
|
|
457
457
|
disabled: n ?? s.props.disabled,
|
|
458
|
-
className:
|
|
458
|
+
className: q(s.props.className, a.className),
|
|
459
459
|
style: {
|
|
460
460
|
...s.props.style,
|
|
461
461
|
...a.style
|
|
462
462
|
},
|
|
463
463
|
onClick: c
|
|
464
|
-
}) : /* @__PURE__ */
|
|
464
|
+
}) : /* @__PURE__ */ Y(I, {
|
|
465
465
|
...a,
|
|
466
466
|
disabled: n,
|
|
467
467
|
onClick: c,
|
|
468
468
|
children: e
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
return /* @__PURE__ */
|
|
471
|
+
function Ze(e) {
|
|
472
|
+
return /* @__PURE__ */ Y(Xe, { ...e });
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
return /* @__PURE__ */
|
|
474
|
+
function Qe(e) {
|
|
475
|
+
return /* @__PURE__ */ Y(Xe, {
|
|
476
476
|
...e,
|
|
477
477
|
close: !0
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function $e({ kind: e, forceMount: n, hideCloseButton: r, closeLabel: i, description: a, hiddenDescription: o, onPointerDownOutside: c, onInteractOutside: l, children: u, role: d = "dialog", side: f = "right", size: p = "medium", overlayClassName: m, ...h }) {
|
|
481
481
|
let { t: g } = s();
|
|
482
482
|
i ??= g(`${e}.close`);
|
|
483
|
-
let _ =
|
|
483
|
+
let _ = B(Je), v = H(), y = H(), b = h.id ?? y;
|
|
484
484
|
O(b, _.open, _.modal, (e) => {
|
|
485
485
|
if (e && e.type !== "keydown") {
|
|
486
486
|
let t = {
|
|
@@ -495,11 +495,11 @@ function tt({ kind: e, forceMount: n, hideCloseButton: r, closeLabel: i, descrip
|
|
|
495
495
|
_.set(!1);
|
|
496
496
|
});
|
|
497
497
|
let x = a != null && a !== !1 && a !== "" || e === "drawer" || o !== void 0;
|
|
498
|
-
return !_.open && !n ? null : /* @__PURE__ */
|
|
499
|
-
className:
|
|
498
|
+
return !_.open && !n ? null : /* @__PURE__ */ X(K, {
|
|
499
|
+
className: q("mn-overlay", !_.modal && "mn-overlay-nonmodal"),
|
|
500
500
|
style: { display: _.open ? void 0 : "none" },
|
|
501
|
-
children: [_.modal && /* @__PURE__ */ K
|
|
502
|
-
className:
|
|
501
|
+
children: [_.modal && /* @__PURE__ */ Y(K, {
|
|
502
|
+
className: q("mn-overlay-mask", m),
|
|
503
503
|
onClick: (e) => {
|
|
504
504
|
let t = {
|
|
505
505
|
nativeEvent: e,
|
|
@@ -510,7 +510,7 @@ function tt({ kind: e, forceMount: n, hideCloseButton: r, closeLabel: i, descrip
|
|
|
510
510
|
};
|
|
511
511
|
c?.(t), l?.(t), t.defaultPrevented || _.set(!1);
|
|
512
512
|
}
|
|
513
|
-
}), /* @__PURE__ */
|
|
513
|
+
}), /* @__PURE__ */ X(t, {
|
|
514
514
|
name: e,
|
|
515
515
|
id: b,
|
|
516
516
|
part: "content",
|
|
@@ -520,16 +520,16 @@ function tt({ kind: e, forceMount: n, hideCloseButton: r, closeLabel: i, descrip
|
|
|
520
520
|
"aria-describedby": x ? v : void 0,
|
|
521
521
|
"data-state": _.open ? "open" : "closed",
|
|
522
522
|
...h,
|
|
523
|
-
className:
|
|
523
|
+
className: q(`mn-${e}-${f}`, `mn-${e}-${p}`, h.className),
|
|
524
524
|
children: [
|
|
525
|
-
!r && /* @__PURE__ */
|
|
525
|
+
!r && /* @__PURE__ */ Y(I, {
|
|
526
526
|
variant: "ghost",
|
|
527
527
|
className: "mn-overlay-close",
|
|
528
528
|
"aria-label": i,
|
|
529
529
|
onClick: () => _.set(!1),
|
|
530
530
|
children: "×"
|
|
531
531
|
}),
|
|
532
|
-
x && /* @__PURE__ */
|
|
532
|
+
x && /* @__PURE__ */ Y(G, {
|
|
533
533
|
id: v,
|
|
534
534
|
className: a ? "mn-overlay-description" : "mn-visually-hidden",
|
|
535
535
|
children: a ?? o ?? g(`${e}.description`)
|
|
@@ -539,118 +539,118 @@ function tt({ kind: e, forceMount: n, hideCloseButton: r, closeLabel: i, descrip
|
|
|
539
539
|
})]
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
return /* @__PURE__ */
|
|
542
|
+
function et(e) {
|
|
543
|
+
return /* @__PURE__ */ Y($e, {
|
|
544
544
|
kind: "modal",
|
|
545
545
|
...e
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
let r =
|
|
550
|
-
return
|
|
548
|
+
function tt({ kind: e, ...n }) {
|
|
549
|
+
let r = B(Je), i = H(), a = n.id ?? i, o = r.setHeadingId;
|
|
550
|
+
return V(() => (o(a), () => o(void 0)), [a, o]), /* @__PURE__ */ Y(t, {
|
|
551
551
|
name: e,
|
|
552
552
|
part: "header",
|
|
553
553
|
...n,
|
|
554
554
|
id: a
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
return /* @__PURE__ */
|
|
557
|
+
function nt(e) {
|
|
558
|
+
return /* @__PURE__ */ Y(tt, {
|
|
559
559
|
kind: "modal",
|
|
560
560
|
...e
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
return /* @__PURE__ */
|
|
563
|
+
function rt(e) {
|
|
564
|
+
return /* @__PURE__ */ Y(t, {
|
|
565
565
|
name: "modal",
|
|
566
566
|
part: "body",
|
|
567
567
|
...e
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
return /* @__PURE__ */
|
|
570
|
+
function it(e) {
|
|
571
|
+
return /* @__PURE__ */ Y(t, {
|
|
572
572
|
name: "modal",
|
|
573
573
|
part: "footer",
|
|
574
574
|
...e
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
let s =
|
|
579
|
-
return /* @__PURE__ */
|
|
577
|
+
function at({ open: e, defaultOpen: t, onOpenChange: n, trigger: r, title: i, children: a, ...o }) {
|
|
578
|
+
let s = H();
|
|
579
|
+
return /* @__PURE__ */ X(Ye, {
|
|
580
580
|
open: e,
|
|
581
581
|
defaultOpen: t,
|
|
582
582
|
onOpenChange: n,
|
|
583
|
-
children: [r && /* @__PURE__ */
|
|
583
|
+
children: [r && /* @__PURE__ */ Y(Ze, {
|
|
584
584
|
asChild: !0,
|
|
585
585
|
children: r
|
|
586
|
-
}), /* @__PURE__ */
|
|
586
|
+
}), /* @__PURE__ */ X(et, {
|
|
587
587
|
...o,
|
|
588
588
|
"aria-labelledby": o["aria-label"] ? void 0 : o["aria-labelledby"] ?? (i ? s : void 0),
|
|
589
|
-
children: [i && /* @__PURE__ */
|
|
589
|
+
children: [i && /* @__PURE__ */ Y(nt, {
|
|
590
590
|
id: s,
|
|
591
591
|
children: i
|
|
592
592
|
}), a]
|
|
593
593
|
})]
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
return /* @__PURE__ */
|
|
596
|
+
function ot(e) {
|
|
597
|
+
return /* @__PURE__ */ Y(Ye, { ...e });
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
return /* @__PURE__ */
|
|
599
|
+
function st(e) {
|
|
600
|
+
return /* @__PURE__ */ Y(Xe, { ...e });
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
return /* @__PURE__ */
|
|
602
|
+
function ct(e) {
|
|
603
|
+
return /* @__PURE__ */ Y($e, {
|
|
604
604
|
kind: "drawer",
|
|
605
605
|
...e
|
|
606
606
|
});
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
return /* @__PURE__ */
|
|
608
|
+
function lt(e) {
|
|
609
|
+
return /* @__PURE__ */ Y(tt, {
|
|
610
610
|
kind: "drawer",
|
|
611
611
|
...e
|
|
612
612
|
});
|
|
613
613
|
}
|
|
614
|
-
function
|
|
615
|
-
return /* @__PURE__ */
|
|
614
|
+
function ut(e) {
|
|
615
|
+
return /* @__PURE__ */ Y(t, {
|
|
616
616
|
name: "drawer",
|
|
617
617
|
part: "body",
|
|
618
618
|
...e
|
|
619
619
|
});
|
|
620
620
|
}
|
|
621
|
-
function
|
|
622
|
-
return /* @__PURE__ */
|
|
621
|
+
function dt(e) {
|
|
622
|
+
return /* @__PURE__ */ Y(t, {
|
|
623
623
|
name: "drawer",
|
|
624
624
|
part: "footer",
|
|
625
625
|
...e
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
return /* @__PURE__ */
|
|
628
|
+
function ft(e) {
|
|
629
|
+
return /* @__PURE__ */ Y(Xe, {
|
|
630
630
|
...e,
|
|
631
631
|
close: !0
|
|
632
632
|
});
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
let s =
|
|
636
|
-
return /* @__PURE__ */
|
|
634
|
+
function pt({ open: e, defaultOpen: t, onOpenChange: n, trigger: r, title: i, children: a, ...o }) {
|
|
635
|
+
let s = H();
|
|
636
|
+
return /* @__PURE__ */ X(ot, {
|
|
637
637
|
open: e,
|
|
638
638
|
defaultOpen: t,
|
|
639
639
|
onOpenChange: n,
|
|
640
|
-
children: [r && /* @__PURE__ */
|
|
640
|
+
children: [r && /* @__PURE__ */ Y(st, {
|
|
641
641
|
asChild: !0,
|
|
642
642
|
children: r
|
|
643
|
-
}), /* @__PURE__ */
|
|
643
|
+
}), /* @__PURE__ */ X(ct, {
|
|
644
644
|
...o,
|
|
645
645
|
"aria-labelledby": o["aria-label"] ? void 0 : o["aria-labelledby"] ?? (i ? s : void 0),
|
|
646
|
-
children: [i && /* @__PURE__ */
|
|
646
|
+
children: [i && /* @__PURE__ */ Y(lt, {
|
|
647
647
|
id: s,
|
|
648
648
|
children: i
|
|
649
649
|
}), a]
|
|
650
650
|
})]
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
|
-
var
|
|
653
|
+
var mt = oe({
|
|
654
654
|
anchorId: "",
|
|
655
655
|
setAnchorId: (() => {}),
|
|
656
656
|
triggerId: "",
|
|
@@ -660,9 +660,9 @@ var gt = le({
|
|
|
660
660
|
arrow: !1,
|
|
661
661
|
label: void 0
|
|
662
662
|
});
|
|
663
|
-
function
|
|
664
|
-
let c =
|
|
665
|
-
return /* @__PURE__ */
|
|
663
|
+
function ht({ children: e, side: n = "bottom", align: r = "center", arrow: i = !1, modal: a = !1, label: o, ...s }) {
|
|
664
|
+
let c = H().replace(/[^a-zA-Z0-9_-]/g, ""), l = `mn-popover-${c}-trigger`, u = `mn-popover-${c}-panel`, [d, f] = W(l);
|
|
665
|
+
return /* @__PURE__ */ Y(mt.Provider, {
|
|
666
666
|
value: {
|
|
667
667
|
anchorId: d,
|
|
668
668
|
setAnchorId: f,
|
|
@@ -673,42 +673,42 @@ function _t({ children: e, side: n = "bottom", align: r = "center", arrow: i = !
|
|
|
673
673
|
arrow: i,
|
|
674
674
|
label: o
|
|
675
675
|
},
|
|
676
|
-
children: /* @__PURE__ */
|
|
676
|
+
children: /* @__PURE__ */ Y(Ye, {
|
|
677
677
|
...s,
|
|
678
678
|
modal: a,
|
|
679
|
-
children: /* @__PURE__ */
|
|
679
|
+
children: /* @__PURE__ */ Y(t, {
|
|
680
680
|
name: "popover",
|
|
681
681
|
children: e
|
|
682
682
|
})
|
|
683
683
|
})
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
let t =
|
|
688
|
-
return /* @__PURE__ */ K
|
|
686
|
+
function gt(e) {
|
|
687
|
+
let t = B(mt);
|
|
688
|
+
return /* @__PURE__ */ Y(K, {
|
|
689
689
|
id: t.triggerId,
|
|
690
690
|
className: "mn-popover-trigger",
|
|
691
|
-
children: /* @__PURE__ */
|
|
691
|
+
children: /* @__PURE__ */ Y(Xe, {
|
|
692
692
|
asChild: !0,
|
|
693
693
|
...e
|
|
694
694
|
})
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
let i =
|
|
699
|
-
return
|
|
697
|
+
function _t({ asChild: e, children: n, ...r }) {
|
|
698
|
+
let i = B(mt), a = `${i.triggerId}-anchor`;
|
|
699
|
+
return V(() => (i.setAnchorId(a), () => i.setAnchorId(i.triggerId)), [
|
|
700
700
|
a,
|
|
701
701
|
i.setAnchorId,
|
|
702
702
|
i.triggerId
|
|
703
|
-
]), e &&
|
|
703
|
+
]), e && se(n) ? ae(n, {
|
|
704
704
|
...r,
|
|
705
705
|
id: a,
|
|
706
|
-
className:
|
|
706
|
+
className: q("mn-popover__anchor", n.props.className, r.className),
|
|
707
707
|
style: {
|
|
708
708
|
...n.props.style,
|
|
709
709
|
...r.style
|
|
710
710
|
}
|
|
711
|
-
}) : /* @__PURE__ */
|
|
711
|
+
}) : /* @__PURE__ */ Y(t, {
|
|
712
712
|
name: "popover",
|
|
713
713
|
part: "anchor",
|
|
714
714
|
...r,
|
|
@@ -716,15 +716,15 @@ function yt({ asChild: e, children: n, ...r }) {
|
|
|
716
716
|
children: n
|
|
717
717
|
});
|
|
718
718
|
}
|
|
719
|
-
function
|
|
720
|
-
return /* @__PURE__ */
|
|
719
|
+
function vt(e) {
|
|
720
|
+
return /* @__PURE__ */ Y(Xe, {
|
|
721
721
|
asChild: !0,
|
|
722
722
|
...e,
|
|
723
723
|
close: !0
|
|
724
724
|
});
|
|
725
725
|
}
|
|
726
|
-
function
|
|
727
|
-
let d =
|
|
726
|
+
function yt({ forceMount: e, children: n, side: r, align: i, sideOffset: a, alignOffset: o, collisionPadding: s, matchAnchorWidth: c, arrow: l, ...u }) {
|
|
727
|
+
let d = B(Je), f = B(mt);
|
|
728
728
|
O(f.panelId, d.open, d.modal, () => d.set(!1), f.triggerId, !0);
|
|
729
729
|
let p = _(f.anchorId, f.panelId, d.open, {
|
|
730
730
|
side: r ?? f.side,
|
|
@@ -734,10 +734,10 @@ function xt({ forceMount: e, children: n, side: r, align: i, sideOffset: a, alig
|
|
|
734
734
|
collisionPadding: s,
|
|
735
735
|
matchAnchorWidth: c
|
|
736
736
|
});
|
|
737
|
-
return !d.open && !e ? null : /* @__PURE__ */
|
|
737
|
+
return !d.open && !e ? null : /* @__PURE__ */ X(Fe, { children: [d.open && /* @__PURE__ */ Y(K, {
|
|
738
738
|
className: "mn-popover-backdrop",
|
|
739
739
|
onClick: () => d.set(!1)
|
|
740
|
-
}), /* @__PURE__ */
|
|
740
|
+
}), /* @__PURE__ */ X(t, {
|
|
741
741
|
name: "popover",
|
|
742
742
|
part: "content",
|
|
743
743
|
role: "dialog",
|
|
@@ -752,101 +752,101 @@ function xt({ forceMount: e, children: n, side: r, align: i, sideOffset: a, alig
|
|
|
752
752
|
display: d.open ? void 0 : "none",
|
|
753
753
|
...u.style
|
|
754
754
|
},
|
|
755
|
-
children: [/* @__PURE__ */ K
|
|
755
|
+
children: [/* @__PURE__ */ Y(K, {
|
|
756
756
|
className: "mn-floating-body",
|
|
757
757
|
style: {
|
|
758
758
|
maxHeight: p.style.maxHeight,
|
|
759
759
|
overflow: "auto"
|
|
760
760
|
},
|
|
761
761
|
children: n
|
|
762
|
-
}), (l ?? f.arrow) && /* @__PURE__ */ K
|
|
762
|
+
}), (l ?? f.arrow) && /* @__PURE__ */ Y(K, {
|
|
763
763
|
"aria-hidden": !0,
|
|
764
764
|
className: "mn-floating-arrow",
|
|
765
765
|
style: p.arrow
|
|
766
766
|
})]
|
|
767
767
|
})] });
|
|
768
768
|
}
|
|
769
|
-
var
|
|
770
|
-
function
|
|
771
|
-
let w =
|
|
769
|
+
var bt = oe(null);
|
|
770
|
+
function xt({ content: e, children: n, open: r, defaultOpen: i = !1, onOpenChange: a, disabled: o, enterDelay: s, leaveDelay: c, placement: l = "top", color: u = "neutral", variant: d = "solid", shape: f = "default", arrow: p, animation: m = "fade", offset: h, zIndex: v = 1500, asChild: y, onOpen: b, onClose: x, contentClassName: S, ...C }) {
|
|
771
|
+
let w = B(bt), T = H().replace(/[^a-zA-Z0-9_-]/g, ""), E = `mn-tooltip-${T}-anchor`, D = `mn-tooltip-${T}-panel`, [O, k] = l.split("-"), [A, j] = g(r, i, a), M = _(E, D, A && !o, {
|
|
772
772
|
side: O,
|
|
773
773
|
align: k ?? "center",
|
|
774
774
|
sideOffset: h ? O === "top" || O === "bottom" ? h[1] : h[0] : 8,
|
|
775
775
|
alignOffset: h ? O === "top" || O === "bottom" ? h[0] : h[1] : 0
|
|
776
|
-
}),
|
|
776
|
+
}), N = U(void 0), P = U({
|
|
777
777
|
disabled: o,
|
|
778
778
|
set: j,
|
|
779
779
|
current: A,
|
|
780
780
|
onOpen: b,
|
|
781
781
|
onClose: x
|
|
782
782
|
});
|
|
783
|
-
|
|
783
|
+
P.current = {
|
|
784
784
|
disabled: o,
|
|
785
785
|
set: j,
|
|
786
786
|
current: A,
|
|
787
787
|
onOpen: b,
|
|
788
788
|
onClose: x
|
|
789
789
|
};
|
|
790
|
-
let
|
|
791
|
-
|
|
790
|
+
let F = () => {
|
|
791
|
+
N.current !== void 0 && clearTimeout(N.current), N.current = void 0;
|
|
792
792
|
};
|
|
793
|
-
|
|
794
|
-
let
|
|
793
|
+
V(() => (o && F(), F), [o]);
|
|
794
|
+
let I = () => {
|
|
795
795
|
if (o) return;
|
|
796
|
-
|
|
796
|
+
F();
|
|
797
797
|
let e = !A, t = e ? w?.shouldSkipDelay() ? 0 : s ?? w?.enterDelay ?? 200 : c ?? w?.leaveDelay ?? 0, n = () => {
|
|
798
|
-
|
|
798
|
+
N.current = void 0, !P.current.disabled && (P.current.set(e), e ? P.current.onOpen?.() : P.current.onClose?.(), e || w?.markClosed());
|
|
799
799
|
};
|
|
800
|
-
t <= 0 ? n() :
|
|
801
|
-
},
|
|
800
|
+
t <= 0 ? n() : N.current = setTimeout(n, t);
|
|
801
|
+
}, L = A && !o && /* @__PURE__ */ X(t, {
|
|
802
802
|
name: "tooltip",
|
|
803
803
|
role: "tooltip",
|
|
804
804
|
...C,
|
|
805
805
|
id: D,
|
|
806
|
-
"data-side":
|
|
806
|
+
"data-side": M.side,
|
|
807
807
|
style: {
|
|
808
|
-
...
|
|
808
|
+
...M.style,
|
|
809
809
|
overflow: "visible",
|
|
810
810
|
zIndex: v,
|
|
811
811
|
...C.style
|
|
812
812
|
},
|
|
813
|
-
className:
|
|
814
|
-
children: [/* @__PURE__ */ K
|
|
813
|
+
className: q(`mn-tooltip-${M.side}`, `mn-tooltip-animation-${m}`, `mn-color-${u}`, `mn-variant-${d}`, `mn-tooltip-shape-${f}`, S),
|
|
814
|
+
children: [/* @__PURE__ */ Y(K, {
|
|
815
815
|
className: "mn-floating-body",
|
|
816
816
|
style: {
|
|
817
|
-
maxHeight:
|
|
817
|
+
maxHeight: M.style.maxHeight,
|
|
818
818
|
overflow: "auto"
|
|
819
819
|
},
|
|
820
820
|
children: e
|
|
821
|
-
}), p && /* @__PURE__ */ K
|
|
821
|
+
}), p && /* @__PURE__ */ Y(K, {
|
|
822
822
|
"aria-hidden": !0,
|
|
823
823
|
className: "mn-floating-arrow",
|
|
824
|
-
style:
|
|
824
|
+
style: M.arrow
|
|
825
825
|
})]
|
|
826
826
|
});
|
|
827
|
-
if (y &&
|
|
828
|
-
let e =
|
|
827
|
+
if (y && se(n)) {
|
|
828
|
+
let e = ae(n, {
|
|
829
829
|
id: E,
|
|
830
|
-
className:
|
|
830
|
+
className: q("mn-tooltip-anchor", n.props.className, C.className),
|
|
831
831
|
onClick: (e) => {
|
|
832
|
-
n.props.onClick?.(e), n.props.disabled ||
|
|
832
|
+
n.props.onClick?.(e), n.props.disabled || I();
|
|
833
833
|
},
|
|
834
834
|
onLongPress: (e) => {
|
|
835
|
-
n.props.onLongPress?.(e), n.props.disabled ||
|
|
835
|
+
n.props.onLongPress?.(e), n.props.disabled || I();
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
|
-
return /* @__PURE__ */
|
|
838
|
+
return /* @__PURE__ */ X(Fe, { children: [e, L] });
|
|
839
839
|
}
|
|
840
|
-
return /* @__PURE__ */
|
|
840
|
+
return /* @__PURE__ */ X(K, {
|
|
841
841
|
id: E,
|
|
842
|
-
className:
|
|
843
|
-
onLongPress:
|
|
844
|
-
onClick:
|
|
845
|
-
children: [n,
|
|
842
|
+
className: q("mn-tooltip-anchor", C.className),
|
|
843
|
+
onLongPress: I,
|
|
844
|
+
onClick: I,
|
|
845
|
+
children: [n, L]
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
|
-
function
|
|
849
|
-
let i =
|
|
848
|
+
function St({ children: e, enterDelay: t, leaveDelay: n, skipDelay: r = 300 }) {
|
|
849
|
+
let i = U(null), a = ce(() => ({
|
|
850
850
|
enterDelay: t,
|
|
851
851
|
leaveDelay: n,
|
|
852
852
|
markClosed: () => {
|
|
@@ -858,18 +858,18 @@ function wt({ children: e, enterDelay: t, leaveDelay: n, skipDelay: r = 300 }) {
|
|
|
858
858
|
n,
|
|
859
859
|
r
|
|
860
860
|
]);
|
|
861
|
-
return /* @__PURE__ */
|
|
861
|
+
return /* @__PURE__ */ Y(bt.Provider, {
|
|
862
862
|
value: a,
|
|
863
863
|
children: e
|
|
864
864
|
});
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Ct({ confirmLabel: e, cancelLabel: t, loading: n, confirmDisabled: r, onConfirm: i, onCancel: a, open: o, defaultOpen: c = !1, onOpenChange: l, color: u = "primary", ...d }) {
|
|
867
867
|
let { t: f } = s();
|
|
868
868
|
e ??= f(u === "danger" ? "confirm.delete" : "confirm.confirm"), t ??= f("confirm.cancel");
|
|
869
869
|
let [p, m] = g(o, c, l), h = () => {
|
|
870
870
|
n || (m(!1), a?.());
|
|
871
871
|
};
|
|
872
|
-
return /* @__PURE__ */
|
|
872
|
+
return /* @__PURE__ */ Y(at, {
|
|
873
873
|
...d,
|
|
874
874
|
size: d.size ?? "small",
|
|
875
875
|
open: p,
|
|
@@ -877,12 +877,12 @@ function Tt({ confirmLabel: e, cancelLabel: t, loading: n, confirmDisabled: r, o
|
|
|
877
877
|
onOpenChange: (e) => {
|
|
878
878
|
e || h();
|
|
879
879
|
},
|
|
880
|
-
children: /* @__PURE__ */
|
|
880
|
+
children: /* @__PURE__ */ X(it, { children: [/* @__PURE__ */ Y(I, {
|
|
881
881
|
variant: "outline",
|
|
882
882
|
disabled: n,
|
|
883
883
|
onClick: h,
|
|
884
884
|
children: t
|
|
885
|
-
}), /* @__PURE__ */
|
|
885
|
+
}), /* @__PURE__ */ Y(I, {
|
|
886
886
|
color: u,
|
|
887
887
|
disabled: r,
|
|
888
888
|
loading: n,
|
|
@@ -891,32 +891,32 @@ function Tt({ confirmLabel: e, cancelLabel: t, loading: n, confirmDisabled: r, o
|
|
|
891
891
|
})] })
|
|
892
892
|
});
|
|
893
893
|
}
|
|
894
|
-
async function
|
|
894
|
+
async function wt(e) {
|
|
895
895
|
if (typeof e.title != "string" || e.description !== void 0 && typeof e.description != "string" || e.confirmLabel !== void 0 && typeof e.confirmLabel != "string" || e.cancelLabel !== void 0 && typeof e.cancelLabel != "string") throw TypeError("Native confirm requires string title/description/button labels; use ConfirmProvider for composed content.");
|
|
896
|
-
return (await
|
|
896
|
+
return (await J.showModal({
|
|
897
897
|
title: e.title,
|
|
898
898
|
content: e.description,
|
|
899
899
|
confirmText: typeof e.confirmLabel == "string" ? e.confirmLabel : e.color === "danger" ? "Delete" : "Confirm",
|
|
900
900
|
cancelText: typeof e.cancelLabel == "string" ? e.cancelLabel : "Cancel",
|
|
901
|
-
confirmColor:
|
|
901
|
+
confirmColor: Me().colors[`${e.color ?? "primary"}-color`],
|
|
902
902
|
showCancel: !0
|
|
903
903
|
})).confirm;
|
|
904
904
|
}
|
|
905
|
-
var
|
|
906
|
-
function
|
|
907
|
-
let [t, n] =
|
|
908
|
-
r.current = t,
|
|
905
|
+
var Tt = oe(null);
|
|
906
|
+
function Et({ children: e }) {
|
|
907
|
+
let [t, n] = W(null), r = U(t);
|
|
908
|
+
r.current = t, V(() => () => r.current?.resolve(!1), []);
|
|
909
909
|
let i = (e) => {
|
|
910
910
|
t?.resolve(e), n(null);
|
|
911
911
|
};
|
|
912
|
-
return /* @__PURE__ */
|
|
912
|
+
return /* @__PURE__ */ X(Tt.Provider, {
|
|
913
913
|
value: (e) => new Promise((t) => {
|
|
914
914
|
r.current?.resolve(!1), n({
|
|
915
915
|
options: e,
|
|
916
916
|
resolve: t
|
|
917
917
|
});
|
|
918
918
|
}),
|
|
919
|
-
children: [e, t && /* @__PURE__ */
|
|
919
|
+
children: [e, t && /* @__PURE__ */ Y(Ct, {
|
|
920
920
|
...t.options,
|
|
921
921
|
open: !0,
|
|
922
922
|
onConfirm: () => i(!0),
|
|
@@ -924,19 +924,19 @@ function Ot({ children: e }) {
|
|
|
924
924
|
})]
|
|
925
925
|
});
|
|
926
926
|
}
|
|
927
|
-
function
|
|
928
|
-
let e =
|
|
927
|
+
function Dt() {
|
|
928
|
+
let e = B(Tt);
|
|
929
929
|
if (!e) throw Error("useConfirm requires ConfirmProvider");
|
|
930
930
|
return e;
|
|
931
931
|
}
|
|
932
|
-
var
|
|
932
|
+
var Ot = oe({
|
|
933
933
|
close: () => {},
|
|
934
934
|
dir: "ltr",
|
|
935
935
|
size: "medium"
|
|
936
936
|
});
|
|
937
|
-
function
|
|
938
|
-
let o =
|
|
939
|
-
return /* @__PURE__ */
|
|
937
|
+
function kt({ children: e, disabled: t, onSelect: n, keepOpen: r, value: i, ...a }) {
|
|
938
|
+
let o = B(Ot);
|
|
939
|
+
return /* @__PURE__ */ X(I, {
|
|
940
940
|
...a,
|
|
941
941
|
variant: "ghost",
|
|
942
942
|
role: "menuitem",
|
|
@@ -944,12 +944,12 @@ function jt({ children: e, disabled: t, onSelect: n, keepOpen: r, value: i, ...a
|
|
|
944
944
|
onClick: () => {
|
|
945
945
|
n?.(i), r || o.close();
|
|
946
946
|
},
|
|
947
|
-
children: [e, a.shortcut && /* @__PURE__ */
|
|
947
|
+
children: [e, a.shortcut && /* @__PURE__ */ Y(G, { children: a.shortcut })]
|
|
948
948
|
});
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
let [s, c] = g(e, t, n), l =
|
|
952
|
-
return /* @__PURE__ */
|
|
950
|
+
function At({ checked: e, defaultChecked: t = !1, onCheckedChange: n, children: r, disabled: i, closeOnSelect: a, ...o }) {
|
|
951
|
+
let [s, c] = g(e, t, n), l = B(Ot);
|
|
952
|
+
return /* @__PURE__ */ X(I, {
|
|
953
953
|
...o,
|
|
954
954
|
variant: "ghost",
|
|
955
955
|
role: "menuitemcheckbox",
|
|
@@ -961,8 +961,8 @@ function Mt({ checked: e, defaultChecked: t = !1, onCheckedChange: n, children:
|
|
|
961
961
|
children: [s ? "✓ " : "", r]
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
return /* @__PURE__ */
|
|
964
|
+
function jt({ checked: e, onSelect: t, children: n, disabled: r, value: i, ...a }) {
|
|
965
|
+
return /* @__PURE__ */ X(I, {
|
|
966
966
|
...a,
|
|
967
967
|
variant: "ghost",
|
|
968
968
|
role: "menuitemradio",
|
|
@@ -972,8 +972,8 @@ function Nt({ checked: e, onSelect: t, children: n, disabled: r, value: i, ...a
|
|
|
972
972
|
children: [e ? "● " : "", n]
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
|
-
function
|
|
976
|
-
return /* @__PURE__ */
|
|
975
|
+
function Mt(e) {
|
|
976
|
+
return /* @__PURE__ */ X(t, {
|
|
977
977
|
name: "menu",
|
|
978
978
|
part: "group",
|
|
979
979
|
role: "group",
|
|
@@ -981,26 +981,26 @@ function Pt(e) {
|
|
|
981
981
|
children: [e.label, e.children]
|
|
982
982
|
});
|
|
983
983
|
}
|
|
984
|
-
function
|
|
985
|
-
return /* @__PURE__ */
|
|
984
|
+
function Nt(e) {
|
|
985
|
+
return /* @__PURE__ */ Y(t, {
|
|
986
986
|
name: "menu",
|
|
987
987
|
part: "label",
|
|
988
988
|
...e
|
|
989
989
|
});
|
|
990
990
|
}
|
|
991
|
-
function
|
|
992
|
-
return /* @__PURE__ */
|
|
991
|
+
function Pt(e) {
|
|
992
|
+
return /* @__PURE__ */ Y(t, {
|
|
993
993
|
name: "menu",
|
|
994
994
|
part: "separator",
|
|
995
995
|
role: "separator",
|
|
996
996
|
...e
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
|
-
function
|
|
1000
|
-
let [t, n] = g(e.value, e.defaultValue ?? "", e.onValueChange), r =
|
|
1001
|
-
return /* @__PURE__ */
|
|
999
|
+
function Ft({ entry: e }) {
|
|
1000
|
+
let [t, n] = g(e.value, e.defaultValue ?? "", e.onValueChange), r = B(Ot);
|
|
1001
|
+
return /* @__PURE__ */ Y(Mt, {
|
|
1002
1002
|
label: e.label,
|
|
1003
|
-
children: e.items.map((i) => /* @__PURE__ */
|
|
1003
|
+
children: e.items.map((i) => /* @__PURE__ */ Y(jt, {
|
|
1004
1004
|
...i,
|
|
1005
1005
|
checked: t === i.value,
|
|
1006
1006
|
onSelect: (t) => {
|
|
@@ -1010,16 +1010,16 @@ function Lt({ entry: e }) {
|
|
|
1010
1010
|
}, i.value))
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1014
|
-
let o =
|
|
1013
|
+
function It({ item: e, open: n, toggle: r, onSelect: i, closeOnSelect: a }) {
|
|
1014
|
+
let o = B(Ot), s = H().replace(/[^a-zA-Z0-9_-]/g, ""), c = `mn-menu-sub-${s}-anchor`, l = `mn-menu-sub-${s}-panel`, u = _(c, l, n, {
|
|
1015
1015
|
side: o.dir === "rtl" ? "left" : "right",
|
|
1016
1016
|
align: "start",
|
|
1017
1017
|
sideOffset: 4,
|
|
1018
1018
|
alignOffset: -5
|
|
1019
1019
|
});
|
|
1020
|
-
return /* @__PURE__ */
|
|
1020
|
+
return /* @__PURE__ */ X(K, {
|
|
1021
1021
|
id: c,
|
|
1022
|
-
children: [/* @__PURE__ */
|
|
1022
|
+
children: [/* @__PURE__ */ X(kt, {
|
|
1023
1023
|
disabled: e.disabled,
|
|
1024
1024
|
keepOpen: !0,
|
|
1025
1025
|
onSelect: r,
|
|
@@ -1030,25 +1030,25 @@ function Rt({ item: e, open: n, toggle: r, onSelect: i, closeOnSelect: a }) {
|
|
|
1030
1030
|
e.icon,
|
|
1031
1031
|
e.label,
|
|
1032
1032
|
e.shortcut,
|
|
1033
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ Y(G, {
|
|
1034
1034
|
"aria-hidden": !0,
|
|
1035
1035
|
className: "mn-menu-chevron",
|
|
1036
1036
|
children: o.dir === "rtl" ? "‹" : "›"
|
|
1037
1037
|
})
|
|
1038
1038
|
]
|
|
1039
|
-
}), n && /* @__PURE__ */
|
|
1039
|
+
}), n && /* @__PURE__ */ Y(t, {
|
|
1040
1040
|
name: "menu",
|
|
1041
1041
|
part: "submenu",
|
|
1042
1042
|
role: "menu",
|
|
1043
1043
|
id: l,
|
|
1044
1044
|
"aria-label": typeof e.label == "string" ? e.label : void 0,
|
|
1045
1045
|
"data-side": u.side,
|
|
1046
|
-
className:
|
|
1046
|
+
className: q("mn-menu__content", "mn-menu-submenu-float", `mn-size-${o.size}`),
|
|
1047
1047
|
style: {
|
|
1048
1048
|
...u.style,
|
|
1049
1049
|
direction: o.dir
|
|
1050
1050
|
},
|
|
1051
|
-
children: /* @__PURE__ */
|
|
1051
|
+
children: /* @__PURE__ */ Y(Lt, {
|
|
1052
1052
|
items: e.children ?? [],
|
|
1053
1053
|
onSelect: i,
|
|
1054
1054
|
closeOnSelect: a
|
|
@@ -1056,25 +1056,25 @@ function Rt({ item: e, open: n, toggle: r, onSelect: i, closeOnSelect: a }) {
|
|
|
1056
1056
|
})]
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1060
|
-
let [r, i] =
|
|
1061
|
-
return /* @__PURE__ */
|
|
1059
|
+
function Lt({ items: e, onSelect: t, closeOnSelect: n }) {
|
|
1060
|
+
let [r, i] = W(null);
|
|
1061
|
+
return /* @__PURE__ */ Y(Fe, { children: e.map((e) => e.type === "separator" ? /* @__PURE__ */ Y(Pt, {}, e.key) : e.type === "group" ? /* @__PURE__ */ Y(Mt, {
|
|
1062
1062
|
label: e.label,
|
|
1063
|
-
children: /* @__PURE__ */
|
|
1063
|
+
children: /* @__PURE__ */ Y(Lt, {
|
|
1064
1064
|
items: e.items,
|
|
1065
1065
|
onSelect: t,
|
|
1066
1066
|
closeOnSelect: n
|
|
1067
1067
|
})
|
|
1068
|
-
}, e.key) : e.type === "checkbox" ? /* @__PURE__ */
|
|
1068
|
+
}, e.key) : e.type === "checkbox" ? /* @__PURE__ */ Y(At, {
|
|
1069
1069
|
...e,
|
|
1070
1070
|
children: e.label
|
|
1071
|
-
}) : e.type === "radio-group" ? /* @__PURE__ */
|
|
1071
|
+
}) : e.type === "radio-group" ? /* @__PURE__ */ Y(Ft, { entry: e }, e.key) : e.children ? /* @__PURE__ */ Y(It, {
|
|
1072
1072
|
item: e,
|
|
1073
1073
|
open: r === e.key,
|
|
1074
1074
|
toggle: () => i(r === e.key ? null : e.key),
|
|
1075
1075
|
onSelect: t,
|
|
1076
1076
|
closeOnSelect: n
|
|
1077
|
-
}, e.key) : /* @__PURE__ */ K
|
|
1077
|
+
}, e.key) : /* @__PURE__ */ Y(K, { children: /* @__PURE__ */ X(kt, {
|
|
1078
1078
|
disabled: e.disabled,
|
|
1079
1079
|
keepOpen: !(e.closeOnSelect ?? n),
|
|
1080
1080
|
onSelect: () => t?.(e),
|
|
@@ -1085,8 +1085,8 @@ function zt({ items: e, onSelect: t, closeOnSelect: n }) {
|
|
|
1085
1085
|
]
|
|
1086
1086
|
}) }, e.key)) });
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
let [y, b] = g(s, c, l), x = m ?? (v.style?.direction === "rtl" ? "rtl" : "ltr"), S =
|
|
1088
|
+
function Rt({ items: n, onSelect: r, closeOnSelect: i = !0, disabled: a, children: o, open: s, defaultOpen: c = !1, onOpenChange: l, size: u = "medium", side: d = "bottom", align: f = "end", modal: p = !0, dir: m, activateOnPress: h = !0, ...v }) {
|
|
1089
|
+
let [y, b] = g(s, c, l), x = m ?? (v.style?.direction === "rtl" ? "rtl" : "ltr"), S = H().replace(/[^a-zA-Z0-9_-]/g, ""), C = `mn-menu-${S}-anchor`, w = `mn-menu-${S}-panel`;
|
|
1090
1090
|
e(v.id ?? C + "-root", {
|
|
1091
1091
|
open: y,
|
|
1092
1092
|
setOpen: b,
|
|
@@ -1095,7 +1095,7 @@ function Bt({ items: n, onSelect: r, closeOnSelect: i = !0, disabled: a, childre
|
|
|
1095
1095
|
let T = _(C, w, y, {
|
|
1096
1096
|
side: d,
|
|
1097
1097
|
align: x === "rtl" && f !== "center" ? f === "start" ? "end" : "start" : f
|
|
1098
|
-
}), E = o, D =
|
|
1098
|
+
}), E = o, D = ae(E, {
|
|
1099
1099
|
disabled: a || E.props.disabled,
|
|
1100
1100
|
"aria-haspopup": "menu",
|
|
1101
1101
|
"aria-expanded": y,
|
|
@@ -1104,7 +1104,7 @@ function Bt({ items: n, onSelect: r, closeOnSelect: i = !0, disabled: a, childre
|
|
|
1104
1104
|
a || E.props.disabled || (E.props.onClick?.(e), h && !("defaultPrevented" in e && e.defaultPrevented) && b(!y));
|
|
1105
1105
|
}
|
|
1106
1106
|
});
|
|
1107
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ X(t, {
|
|
1108
1108
|
name: "menu",
|
|
1109
1109
|
className: v.className,
|
|
1110
1110
|
style: {
|
|
@@ -1112,31 +1112,31 @@ function Bt({ items: n, onSelect: r, closeOnSelect: i = !0, disabled: a, childre
|
|
|
1112
1112
|
direction: x
|
|
1113
1113
|
},
|
|
1114
1114
|
id: v.id ?? C + "-root",
|
|
1115
|
-
children: [/* @__PURE__ */ K
|
|
1115
|
+
children: [/* @__PURE__ */ Y(K, {
|
|
1116
1116
|
id: C,
|
|
1117
1117
|
children: D
|
|
1118
|
-
}), y && /* @__PURE__ */
|
|
1118
|
+
}), y && /* @__PURE__ */ X(Ot.Provider, {
|
|
1119
1119
|
value: {
|
|
1120
1120
|
close: () => b(!1),
|
|
1121
1121
|
dir: x,
|
|
1122
1122
|
size: u
|
|
1123
1123
|
},
|
|
1124
|
-
children: [p && /* @__PURE__ */ K
|
|
1124
|
+
children: [p && /* @__PURE__ */ Y(K, {
|
|
1125
1125
|
className: "mn-menu-backdrop",
|
|
1126
1126
|
onClick: () => b(!1)
|
|
1127
|
-
}), /* @__PURE__ */
|
|
1127
|
+
}), /* @__PURE__ */ Y(t, {
|
|
1128
1128
|
name: "menu",
|
|
1129
1129
|
part: "content",
|
|
1130
1130
|
role: "menu",
|
|
1131
1131
|
id: w,
|
|
1132
1132
|
"data-side": T.side,
|
|
1133
|
-
className:
|
|
1133
|
+
className: q(`mn-size-${u}`, `mn-menu-${T.side}`),
|
|
1134
1134
|
style: {
|
|
1135
1135
|
...T.style,
|
|
1136
1136
|
direction: x
|
|
1137
1137
|
},
|
|
1138
1138
|
"aria-label": v["aria-label"],
|
|
1139
|
-
children: /* @__PURE__ */
|
|
1139
|
+
children: /* @__PURE__ */ Y(Lt, {
|
|
1140
1140
|
items: n,
|
|
1141
1141
|
onSelect: r,
|
|
1142
1142
|
closeOnSelect: i
|
|
@@ -1145,16 +1145,16 @@ function Bt({ items: n, onSelect: r, closeOnSelect: i = !0, disabled: a, childre
|
|
|
1145
1145
|
})]
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1149
|
-
return /* @__PURE__ */
|
|
1148
|
+
function zt(e) {
|
|
1149
|
+
return /* @__PURE__ */ Y(Rt, { ...e });
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function Bt({ children: e, ...t }) {
|
|
1152
1152
|
let [n, r] = g(t.open, t.defaultOpen ?? !1, t.onOpenChange);
|
|
1153
|
-
return /* @__PURE__ */ K
|
|
1153
|
+
return /* @__PURE__ */ Y(K, {
|
|
1154
1154
|
onLongPress: () => {
|
|
1155
1155
|
t.disabled || r(!0);
|
|
1156
1156
|
},
|
|
1157
|
-
children: /* @__PURE__ */
|
|
1157
|
+
children: /* @__PURE__ */ Y(Rt, {
|
|
1158
1158
|
...t,
|
|
1159
1159
|
open: n,
|
|
1160
1160
|
onOpenChange: r,
|
|
@@ -1163,21 +1163,21 @@ function Ht({ children: e, ...t }) {
|
|
|
1163
1163
|
})
|
|
1164
1164
|
});
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1166
|
+
function Vt({ items: n, title: r, placeholder: i, emptyText: a, resultsLabel: o, enterLabel: c, shortcutLabel: l, shortcut: u, maxResults: d = 12, onSelect: f, filter: p, ...m }) {
|
|
1167
1167
|
let { t: h } = s();
|
|
1168
1168
|
r ??= h("command.title"), i ??= h("command.placeholder"), a ??= h("command.empty");
|
|
1169
|
-
let [_, v] =
|
|
1170
|
-
|
|
1169
|
+
let [_, v] = W(""), [y, b] = g(m.open, m.defaultOpen ?? !1, m.onOpenChange);
|
|
1170
|
+
V(() => {
|
|
1171
1171
|
y || v("");
|
|
1172
1172
|
}, [y]);
|
|
1173
|
-
let x =
|
|
1173
|
+
let x = U({
|
|
1174
1174
|
shortcut: u,
|
|
1175
1175
|
setOpen: b
|
|
1176
1176
|
});
|
|
1177
1177
|
x.current = {
|
|
1178
1178
|
shortcut: u,
|
|
1179
1179
|
setOpen: b
|
|
1180
|
-
},
|
|
1180
|
+
}, V(() => {
|
|
1181
1181
|
if (typeof document > "u") return;
|
|
1182
1182
|
let e = (e) => {
|
|
1183
1183
|
if (e.defaultPrevented || e.isComposing) return;
|
|
@@ -1186,18 +1186,18 @@ function Ut({ items: n, title: r, placeholder: i, emptyText: a, resultsLabel: o,
|
|
|
1186
1186
|
"INPUT",
|
|
1187
1187
|
"TEXTAREA",
|
|
1188
1188
|
"SELECT"
|
|
1189
|
-
].includes(t?.tagName) || e.ctrlKey || e.metaKey || e.altKey) &&
|
|
1189
|
+
].includes(t?.tagName) || e.ctrlKey || e.metaKey || e.altKey) && De(x.current.shortcut).some((t) => we(e, t)) && (e.preventDefault(), x.current.setOpen(!0));
|
|
1190
1190
|
};
|
|
1191
1191
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1192
1192
|
}, []);
|
|
1193
|
-
let S =
|
|
1193
|
+
let S = H();
|
|
1194
1194
|
e(S, {
|
|
1195
1195
|
input: !0,
|
|
1196
1196
|
open: y,
|
|
1197
1197
|
setOpen: b
|
|
1198
1198
|
});
|
|
1199
1199
|
let C = n.filter((e) => !e.disabled), w = (p && _.trim() ? p(C, _.trim()) : C.filter((e) => `${e.title ?? e.label ?? ""} ${e.description ?? ""} ${e.group ?? ""} ${Array.isArray(e.keywords) ? e.keywords.join(" ") : e.keywords ?? ""}`.toLowerCase().includes(_.trim().toLowerCase()))).slice(0, d);
|
|
1200
|
-
return /* @__PURE__ */
|
|
1200
|
+
return /* @__PURE__ */ X(at, {
|
|
1201
1201
|
...m,
|
|
1202
1202
|
description: m.description ?? h("command.description"),
|
|
1203
1203
|
open: y,
|
|
@@ -1205,70 +1205,70 @@ function Ut({ items: n, title: r, placeholder: i, emptyText: a, resultsLabel: o,
|
|
|
1205
1205
|
title: r,
|
|
1206
1206
|
id: S,
|
|
1207
1207
|
children: [
|
|
1208
|
-
/* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ Y(j, {
|
|
1209
1209
|
value: _,
|
|
1210
1210
|
onChange: v,
|
|
1211
1211
|
placeholder: i,
|
|
1212
1212
|
"aria-label": i
|
|
1213
1213
|
}),
|
|
1214
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ Y(t, {
|
|
1215
1215
|
name: "command",
|
|
1216
1216
|
part: "results",
|
|
1217
1217
|
role: "listbox",
|
|
1218
1218
|
"aria-label": o ?? h("command.results"),
|
|
1219
|
-
children: w.length ? w.map((e) => /* @__PURE__ */
|
|
1219
|
+
children: w.length ? w.map((e) => /* @__PURE__ */ X(I, {
|
|
1220
1220
|
variant: "ghost",
|
|
1221
1221
|
role: "option",
|
|
1222
1222
|
disabled: e.disabled,
|
|
1223
1223
|
onClick: () => {
|
|
1224
1224
|
e.onSelect?.(), f?.(e), b(!1);
|
|
1225
1225
|
},
|
|
1226
|
-
children: [/* @__PURE__ */
|
|
1226
|
+
children: [/* @__PURE__ */ X(K, {
|
|
1227
1227
|
className: "mn-command-copy",
|
|
1228
|
-
children: [/* @__PURE__ */
|
|
1228
|
+
children: [/* @__PURE__ */ Y(G, { children: e.title ?? e.label }), e.description && /* @__PURE__ */ Y(G, {
|
|
1229
1229
|
className: "mn-command-description",
|
|
1230
1230
|
children: e.description
|
|
1231
1231
|
})]
|
|
1232
|
-
}), e.group && /* @__PURE__ */
|
|
1232
|
+
}), e.group && /* @__PURE__ */ Y(G, {
|
|
1233
1233
|
className: "mn-command-group",
|
|
1234
1234
|
children: e.group
|
|
1235
1235
|
})]
|
|
1236
|
-
}, e.id)) : /* @__PURE__ */
|
|
1236
|
+
}, e.id)) : /* @__PURE__ */ Y(G, { children: a })
|
|
1237
1237
|
}),
|
|
1238
|
-
/* @__PURE__ */
|
|
1238
|
+
/* @__PURE__ */ Y(G, {
|
|
1239
1239
|
className: "mn-command-hint",
|
|
1240
1240
|
children: c ?? h("command.enter")
|
|
1241
1241
|
}),
|
|
1242
|
-
l && /* @__PURE__ */
|
|
1242
|
+
l && /* @__PURE__ */ Y(G, {
|
|
1243
1243
|
className: "mn-command-hint",
|
|
1244
1244
|
children: l
|
|
1245
1245
|
})
|
|
1246
1246
|
]
|
|
1247
1247
|
});
|
|
1248
1248
|
}
|
|
1249
|
-
var
|
|
1250
|
-
function
|
|
1251
|
-
return
|
|
1249
|
+
var Ht = oe(null);
|
|
1250
|
+
function Ut({ item: e, dismiss: n, closeLabel: r }) {
|
|
1251
|
+
return V(() => {
|
|
1252
1252
|
let t = e.duration ?? (e.loading ? 0 : 4e3);
|
|
1253
1253
|
if (!t) return;
|
|
1254
1254
|
let r = setTimeout(() => n(e.id), t);
|
|
1255
1255
|
return () => clearTimeout(r);
|
|
1256
|
-
}, [e, n]), /* @__PURE__ */
|
|
1256
|
+
}, [e, n]), /* @__PURE__ */ X(t, {
|
|
1257
1257
|
name: "toast",
|
|
1258
1258
|
role: e.color === "danger" && !e.loading ? "alert" : "status",
|
|
1259
1259
|
className: e.color && `mn-color-${e.color}`,
|
|
1260
1260
|
children: [
|
|
1261
1261
|
e.icon,
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
e.description && /* @__PURE__ */
|
|
1264
|
-
e.action && /* @__PURE__ */
|
|
1262
|
+
/* @__PURE__ */ Y(G, { children: e.title }),
|
|
1263
|
+
e.description && /* @__PURE__ */ Y(G, { children: e.description }),
|
|
1264
|
+
e.action && /* @__PURE__ */ Y(I, {
|
|
1265
1265
|
variant: "ghost",
|
|
1266
1266
|
onClick: () => {
|
|
1267
1267
|
e.action?.onClick(), n(e.id);
|
|
1268
1268
|
},
|
|
1269
1269
|
children: e.action.label
|
|
1270
1270
|
}),
|
|
1271
|
-
e.closable !== !1 && /* @__PURE__ */
|
|
1271
|
+
e.closable !== !1 && /* @__PURE__ */ Y(I, {
|
|
1272
1272
|
variant: "ghost",
|
|
1273
1273
|
"aria-label": r,
|
|
1274
1274
|
onClick: () => n(e.id),
|
|
@@ -1277,8 +1277,8 @@ function Gt({ item: e, dismiss: n, closeLabel: r }) {
|
|
|
1277
1277
|
]
|
|
1278
1278
|
});
|
|
1279
1279
|
}
|
|
1280
|
-
var
|
|
1281
|
-
function
|
|
1280
|
+
var Wt = [];
|
|
1281
|
+
function Gt(e, t, n) {
|
|
1282
1282
|
let r = Object.assign((t) => e(t), {
|
|
1283
1283
|
show: e,
|
|
1284
1284
|
update: t,
|
|
@@ -1328,21 +1328,21 @@ function qt(e, t, n) {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
}, r;
|
|
1330
1330
|
}
|
|
1331
|
-
var
|
|
1332
|
-
let t =
|
|
1331
|
+
var Kt = Gt((e) => {
|
|
1332
|
+
let t = Wt.at(-1);
|
|
1333
1333
|
if (!t) throw Error("toast requires a mounted ToastProvider");
|
|
1334
1334
|
return t.show(e);
|
|
1335
|
-
}, (e, t) =>
|
|
1336
|
-
function
|
|
1335
|
+
}, (e, t) => Wt.at(-1)?.update(e, t), (e) => Wt.at(-1)?.dismiss(e));
|
|
1336
|
+
function qt({ children: e, max: n = Infinity, position: r = "top-right", closeLabel: i, "aria-label": a }) {
|
|
1337
1337
|
let { t: o } = s();
|
|
1338
1338
|
i ??= o("toast.close");
|
|
1339
|
-
let [c, l] =
|
|
1339
|
+
let [c, l] = W([]), u = U([]), d = U(0), f = U(n);
|
|
1340
1340
|
f.current = n;
|
|
1341
|
-
let p =
|
|
1341
|
+
let p = ce(() => {
|
|
1342
1342
|
let e = (e) => {
|
|
1343
1343
|
u.current = e, l(e);
|
|
1344
1344
|
};
|
|
1345
|
-
return
|
|
1345
|
+
return Gt((t) => {
|
|
1346
1346
|
let n = typeof t == "string" ? { title: t } : t, r = n.id ?? `toast-${++d.current}`, i = [...u.current.filter((e) => e.id !== r), {
|
|
1347
1347
|
...n,
|
|
1348
1348
|
id: r
|
|
@@ -1357,18 +1357,18 @@ function Yt({ children: e, max: n = Infinity, position: r = "top-right", closeLa
|
|
|
1357
1357
|
e(u.current.filter((e) => !n.includes(e))), n.forEach((e) => e.onClose?.(e.id));
|
|
1358
1358
|
});
|
|
1359
1359
|
}, []);
|
|
1360
|
-
return
|
|
1361
|
-
let e =
|
|
1362
|
-
e >= 0 &&
|
|
1363
|
-
}), [p]), /* @__PURE__ */
|
|
1360
|
+
return V(() => (Wt.push(p), () => {
|
|
1361
|
+
let e = Wt.indexOf(p);
|
|
1362
|
+
e >= 0 && Wt.splice(e, 1), u.current.forEach((e) => e.onClose?.(e.id)), u.current = [];
|
|
1363
|
+
}), [p]), /* @__PURE__ */ X(Ht.Provider, {
|
|
1364
1364
|
value: p,
|
|
1365
|
-
children: [e, /* @__PURE__ */
|
|
1365
|
+
children: [e, /* @__PURE__ */ Y(t, {
|
|
1366
1366
|
name: "toast",
|
|
1367
1367
|
part: "viewport",
|
|
1368
1368
|
role: "region",
|
|
1369
1369
|
"aria-label": a ?? o("toast.region"),
|
|
1370
1370
|
className: `mn-toast-${r}`,
|
|
1371
|
-
children: c.map((e) => /* @__PURE__ */
|
|
1371
|
+
children: c.map((e) => /* @__PURE__ */ Y(Ut, {
|
|
1372
1372
|
item: e,
|
|
1373
1373
|
dismiss: p.dismiss,
|
|
1374
1374
|
closeLabel: i
|
|
@@ -1376,25 +1376,25 @@ function Yt({ children: e, max: n = Infinity, position: r = "top-right", closeLa
|
|
|
1376
1376
|
})]
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1380
|
-
let e =
|
|
1379
|
+
function Jt() {
|
|
1380
|
+
let e = B(Ht);
|
|
1381
1381
|
if (!e) throw Error("useToast requires ToastProvider");
|
|
1382
1382
|
return e;
|
|
1383
1383
|
}
|
|
1384
1384
|
//#endregion
|
|
1385
1385
|
//#region ../../node_modules/.pnpm/dompurify@3.4.16/node_modules/dompurify/dist/purify.es.mjs
|
|
1386
|
-
function
|
|
1386
|
+
function Yt(e, t) {
|
|
1387
1387
|
this.v = e, this.k = t;
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1389
|
+
function Xt(e, t) {
|
|
1390
1390
|
(t == null || t > e.length) && (t = e.length);
|
|
1391
1391
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
1392
1392
|
return r;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1394
|
+
function Zt(e) {
|
|
1395
1395
|
if (Array.isArray(e)) return e;
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function Qt(e, t) {
|
|
1398
1398
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1399
1399
|
if (n != null) {
|
|
1400
1400
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -1415,24 +1415,24 @@ function en(e, t) {
|
|
|
1415
1415
|
return s;
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function $t() {
|
|
1419
1419
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1422
|
-
return
|
|
1421
|
+
function en(e, t) {
|
|
1422
|
+
return Zt(e) || Qt(e, t) || tn(e, t) || $t();
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function tn(e, t) {
|
|
1425
1425
|
if (e) {
|
|
1426
|
-
if (typeof e == "string") return
|
|
1426
|
+
if (typeof e == "string") return Xt(e, t);
|
|
1427
1427
|
var n = {}.toString.call(e).slice(8, -1);
|
|
1428
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ?
|
|
1428
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Xt(e, t) : void 0;
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function nn(e) {
|
|
1432
1432
|
var t, n;
|
|
1433
1433
|
function r(t, n) {
|
|
1434
1434
|
try {
|
|
1435
|
-
var a = e[t](n), o = a.value, s = o instanceof
|
|
1435
|
+
var a = e[t](n), o = a.value, s = o instanceof Yt;
|
|
1436
1436
|
Promise.resolve(s ? o.v : o).then(function(n) {
|
|
1437
1437
|
if (s) {
|
|
1438
1438
|
var c = t === "return" && o.k ? t : "next";
|
|
@@ -1466,19 +1466,19 @@ function an(e) {
|
|
|
1466
1466
|
});
|
|
1467
1467
|
}, typeof e.return != "function" && (this.return = void 0);
|
|
1468
1468
|
}
|
|
1469
|
-
|
|
1469
|
+
nn.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
|
|
1470
1470
|
return this;
|
|
1471
|
-
},
|
|
1471
|
+
}, nn.prototype.next = function(e) {
|
|
1472
1472
|
return this._invoke("next", e);
|
|
1473
|
-
},
|
|
1473
|
+
}, nn.prototype.throw = function(e) {
|
|
1474
1474
|
return this._invoke("throw", e);
|
|
1475
|
-
},
|
|
1475
|
+
}, nn.prototype.return = function(e) {
|
|
1476
1476
|
return this._invoke("return", e);
|
|
1477
1477
|
};
|
|
1478
|
-
var
|
|
1479
|
-
|
|
1478
|
+
var rn = Object.entries, an = Object.setPrototypeOf, on = Object.isFrozen, sn = Object.getPrototypeOf, cn = Object.getOwnPropertyDescriptor, ln = Object.freeze, un = Object.seal, dn = Object.create, fn = typeof Reflect < "u" && Reflect, pn = fn.apply, mn = fn.construct;
|
|
1479
|
+
ln ||= function(e) {
|
|
1480
1480
|
return e;
|
|
1481
|
-
},
|
|
1481
|
+
}, un ||= function(e) {
|
|
1482
1482
|
return e;
|
|
1483
1483
|
}, pn ||= function(e, t) {
|
|
1484
1484
|
var n = [...arguments].slice(2);
|
|
@@ -1490,7 +1490,7 @@ var hn = Q(Array.prototype.forEach);
|
|
|
1490
1490
|
Array.prototype.indexOf;
|
|
1491
1491
|
var gn = Q(Array.prototype.lastIndexOf), _n = Q(Array.prototype.pop), vn = Q(Array.prototype.push);
|
|
1492
1492
|
Array.prototype.slice;
|
|
1493
|
-
var yn = Q(Array.prototype.splice), bn = Array.isArray, xn = Q(String.prototype.toLowerCase), Sn = Q(String.prototype.toString), Cn = Q(String.prototype.match), wn = Q(String.prototype.replace), Tn = Q(String.prototype.indexOf), En = Q(String.prototype.trim), Dn = Q(Number.prototype.toString), On = Q(Boolean.prototype.toString), kn = typeof BigInt > "u" ? null : Q(BigInt.prototype.toString), An = typeof Symbol > "u" ? null : Q(Symbol.prototype.toString), jn = Q(Object.prototype.hasOwnProperty), Mn = Q(Object.prototype.toString),
|
|
1493
|
+
var yn = Q(Array.prototype.splice), bn = Array.isArray, xn = Q(String.prototype.toLowerCase), Sn = Q(String.prototype.toString), Cn = Q(String.prototype.match), wn = Q(String.prototype.replace), Tn = Q(String.prototype.indexOf), En = Q(String.prototype.trim), Dn = Q(Number.prototype.toString), On = Q(Boolean.prototype.toString), kn = typeof BigInt > "u" ? null : Q(BigInt.prototype.toString), An = typeof Symbol > "u" ? null : Q(Symbol.prototype.toString), jn = Q(Object.prototype.hasOwnProperty), Mn = Q(Object.prototype.toString), Nn = Q(RegExp.prototype.test), Pn = Fn(TypeError);
|
|
1494
1494
|
function Q(e) {
|
|
1495
1495
|
return function(t) {
|
|
1496
1496
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -1498,39 +1498,39 @@ function Q(e) {
|
|
|
1498
1498
|
return pn(e, t, n);
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function Fn(e) {
|
|
1502
1502
|
return function() {
|
|
1503
1503
|
return mn(e, [...arguments]);
|
|
1504
1504
|
};
|
|
1505
1505
|
}
|
|
1506
1506
|
function $(e, t) {
|
|
1507
1507
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : xn;
|
|
1508
|
-
if (
|
|
1508
|
+
if (an && an(e, null), !bn(t)) return e;
|
|
1509
1509
|
let r = t.length;
|
|
1510
1510
|
for (; r--;) {
|
|
1511
1511
|
let i = t[r];
|
|
1512
1512
|
if (typeof i == "string") {
|
|
1513
1513
|
let e = n(i);
|
|
1514
|
-
e !== i && (
|
|
1514
|
+
e !== i && (on(t) || (t[r] = e), i = e);
|
|
1515
1515
|
}
|
|
1516
1516
|
e[i] = !0;
|
|
1517
1517
|
}
|
|
1518
1518
|
return e;
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1520
|
+
function In(e) {
|
|
1521
1521
|
for (let t = 0; t < e.length; t++) jn(e, t) || (e[t] = null);
|
|
1522
1522
|
return e;
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function Ln(e) {
|
|
1525
1525
|
let t = dn(null);
|
|
1526
|
-
for (let r of
|
|
1527
|
-
var n =
|
|
1526
|
+
for (let r of rn(e)) {
|
|
1527
|
+
var n = en(r, 2);
|
|
1528
1528
|
let i = n[0], a = n[1];
|
|
1529
|
-
jn(e, i) && (t[i] = bn(a) ?
|
|
1529
|
+
jn(e, i) && (t[i] = bn(a) ? In(a) : a && typeof a == "object" && a.constructor === Object ? Ln(a) : a);
|
|
1530
1530
|
}
|
|
1531
1531
|
return t;
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1533
|
+
function Rn(e) {
|
|
1534
1534
|
switch (typeof e) {
|
|
1535
1535
|
case "string": return e;
|
|
1536
1536
|
case "number": return Dn(e);
|
|
@@ -1541,7 +1541,7 @@ function Ln(e) {
|
|
|
1541
1541
|
case "function":
|
|
1542
1542
|
case "object": {
|
|
1543
1543
|
if (e === null) return Mn(e);
|
|
1544
|
-
let t = e, n =
|
|
1544
|
+
let t = e, n = zn(t, "toString");
|
|
1545
1545
|
if (typeof n == "function") {
|
|
1546
1546
|
let e = n(t);
|
|
1547
1547
|
return typeof e == "string" ? e : Mn(e);
|
|
@@ -1551,28 +1551,28 @@ function Ln(e) {
|
|
|
1551
1551
|
default: return Mn(e);
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function zn(e, t) {
|
|
1555
1555
|
for (; e !== null;) {
|
|
1556
|
-
let n =
|
|
1556
|
+
let n = cn(e, t);
|
|
1557
1557
|
if (n) {
|
|
1558
1558
|
if (n.get) return Q(n.get);
|
|
1559
1559
|
if (typeof n.value == "function") return Q(n.value);
|
|
1560
1560
|
}
|
|
1561
|
-
e =
|
|
1561
|
+
e = sn(e);
|
|
1562
1562
|
}
|
|
1563
1563
|
function n() {
|
|
1564
1564
|
return null;
|
|
1565
1565
|
}
|
|
1566
1566
|
return n;
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function Bn(e) {
|
|
1569
1569
|
try {
|
|
1570
|
-
return
|
|
1570
|
+
return Nn(e, ""), !0;
|
|
1571
1571
|
} catch {
|
|
1572
1572
|
return !1;
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
|
-
var
|
|
1575
|
+
var Vn = ln(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Hn = ln(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Un = ln([
|
|
1576
1576
|
"feBlend",
|
|
1577
1577
|
"feColorMatrix",
|
|
1578
1578
|
"feComponentTransfer",
|
|
@@ -1598,7 +1598,7 @@ var Bn = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1598
1598
|
"feSpotLight",
|
|
1599
1599
|
"feTile",
|
|
1600
1600
|
"feTurbulence"
|
|
1601
|
-
]),
|
|
1601
|
+
]), Wn = ln([
|
|
1602
1602
|
"animate",
|
|
1603
1603
|
"color-profile",
|
|
1604
1604
|
"cursor",
|
|
@@ -1621,7 +1621,7 @@ var Bn = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1621
1621
|
"solidcolor",
|
|
1622
1622
|
"unknown",
|
|
1623
1623
|
"use"
|
|
1624
|
-
]),
|
|
1624
|
+
]), Gn = ln(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Kn = ln([
|
|
1625
1625
|
"maction",
|
|
1626
1626
|
"maligngroup",
|
|
1627
1627
|
"malignmark",
|
|
@@ -1637,13 +1637,13 @@ var Bn = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1637
1637
|
"annotation-xml",
|
|
1638
1638
|
"mprescripts",
|
|
1639
1639
|
"none"
|
|
1640
|
-
]),
|
|
1640
|
+
]), qn = ln(["#text"]), Jn = ln(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Yn = ln(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Xn = ln(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Zn = ln([
|
|
1641
1641
|
"xlink:href",
|
|
1642
1642
|
"xml:id",
|
|
1643
1643
|
"xlink:title",
|
|
1644
1644
|
"xml:space",
|
|
1645
1645
|
"xmlns:xlink"
|
|
1646
|
-
]),
|
|
1646
|
+
]), Qn = un(/{{[\w\W]*|^[\w\W]*}}/g), $n = un(/<%[\w\W]*|^[\w\W]*%>/g), er = un(/\${[\w\W]*/g), tr = un(/^data-[\-\w.\u00B7-\uFFFF]+$/), nr = un(/^aria-[\-\w]+$/), rr = un(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), ir = un(/^(?:\w+script|data):/i), ar = un(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), or = un(/^html$/i), sr = un(/^[a-z][.\w]*(-[.\w]+)+$/i), cr = un(/<[/\w!]/g), lr = un(/<[/\w]/g), ur = un(/<\/no(script|embed|frames)/i), dr = un(/\/>/i), fr = {
|
|
1647
1647
|
element: 1,
|
|
1648
1648
|
attribute: 2,
|
|
1649
1649
|
text: 3,
|
|
@@ -1656,7 +1656,7 @@ var Bn = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1656
1656
|
documentType: 10,
|
|
1657
1657
|
documentFragment: 11,
|
|
1658
1658
|
notation: 12
|
|
1659
|
-
},
|
|
1659
|
+
}, pr = [
|
|
1660
1660
|
"style",
|
|
1661
1661
|
"script",
|
|
1662
1662
|
"xmp",
|
|
@@ -1665,14 +1665,14 @@ var Bn = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1665
1665
|
"noframes",
|
|
1666
1666
|
"plaintext",
|
|
1667
1667
|
"noscript"
|
|
1668
|
-
],
|
|
1668
|
+
], mr = ln($({}, pr)), hr = function() {
|
|
1669
1669
|
let e = {};
|
|
1670
|
-
return hn(
|
|
1671
|
-
e[t] =
|
|
1672
|
-
}),
|
|
1673
|
-
}(),
|
|
1670
|
+
return hn(pr, (t) => {
|
|
1671
|
+
e[t] = un(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
1672
|
+
}), ln(e);
|
|
1673
|
+
}(), gr = function() {
|
|
1674
1674
|
return typeof window > "u" ? null : window;
|
|
1675
|
-
},
|
|
1675
|
+
}, _r = function(e, t) {
|
|
1676
1676
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
1677
1677
|
let n = null, r = "data-tt-policy-suffix";
|
|
1678
1678
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -1689,7 +1689,7 @@ var Bn = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1689
1689
|
} catch {
|
|
1690
1690
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
1691
1691
|
}
|
|
1692
|
-
},
|
|
1692
|
+
}, vr = function() {
|
|
1693
1693
|
return {
|
|
1694
1694
|
afterSanitizeAttributes: [],
|
|
1695
1695
|
afterSanitizeElements: [],
|
|
@@ -1701,20 +1701,20 @@ var Bn = Y(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
1701
1701
|
uponSanitizeElement: [],
|
|
1702
1702
|
uponSanitizeShadowNode: []
|
|
1703
1703
|
};
|
|
1704
|
-
},
|
|
1705
|
-
return jn(e, t) && bn(e[t]) ? $(r.base ?
|
|
1706
|
-
},
|
|
1704
|
+
}, yr = function(e, t, n, r) {
|
|
1705
|
+
return jn(e, t) && bn(e[t]) ? $(r.base ? Ln(r.base) : {}, e[t], r.transform) : n;
|
|
1706
|
+
}, br = function(e, t, n) {
|
|
1707
1707
|
let r = jn(e, t) ? e[t] : void 0;
|
|
1708
|
-
return r && typeof r == "object" ?
|
|
1708
|
+
return r && typeof r == "object" ? Ln(r) : n();
|
|
1709
1709
|
};
|
|
1710
|
-
function
|
|
1711
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
1712
|
-
if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !==
|
|
1710
|
+
function xr() {
|
|
1711
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gr(), t = (e) => xr(e);
|
|
1712
|
+
if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== fr.document || !e.Element) return t.isSupported = !1, t;
|
|
1713
1713
|
let n = e.document, r = n, i = r.currentScript;
|
|
1714
1714
|
e.DocumentFragment;
|
|
1715
1715
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
1716
1716
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
1717
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f =
|
|
1717
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = zn(d, "cloneNode"), p = zn(d, "remove"), m = zn(d, "removeAttributeNode"), h = zn(d, "nextSibling"), g = zn(d, "childNodes"), _ = zn(d, "parentNode"), v = zn(d, "shadowRoot"), y = zn(d, "attributes"), b = o && o.prototype ? zn(o.prototype, "nodeType") : null, x = o && o.prototype ? zn(o.prototype, "nodeName") : null, S = o && o.prototype ? zn(o.prototype, "ownerDocument") : null, C = function(e) {
|
|
1718
1718
|
return b ? b(e) : e.nodeType;
|
|
1719
1719
|
}, w = function(e) {
|
|
1720
1720
|
return x ? x(e) : e.nodeName;
|
|
@@ -1724,7 +1724,7 @@ function br() {
|
|
|
1724
1724
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
1725
1725
|
}
|
|
1726
1726
|
let T, E = "", D, O = !1, k = 0, A = function() {
|
|
1727
|
-
if (k > 0) throw
|
|
1727
|
+
if (k > 0) throw Pn("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
|
|
1728
1728
|
}, j = function(e) {
|
|
1729
1729
|
A(), k++;
|
|
1730
1730
|
try {
|
|
@@ -1732,29 +1732,29 @@ function br() {
|
|
|
1732
1732
|
} finally {
|
|
1733
1733
|
k--;
|
|
1734
1734
|
}
|
|
1735
|
-
},
|
|
1735
|
+
}, M = function(e) {
|
|
1736
1736
|
A(), k++;
|
|
1737
1737
|
try {
|
|
1738
1738
|
return T.createScriptURL(e);
|
|
1739
1739
|
} finally {
|
|
1740
1740
|
k--;
|
|
1741
1741
|
}
|
|
1742
|
-
},
|
|
1743
|
-
return O ||= (D =
|
|
1744
|
-
},
|
|
1745
|
-
t.isSupported = typeof
|
|
1746
|
-
let
|
|
1747
|
-
...Bn,
|
|
1742
|
+
}, N = function() {
|
|
1743
|
+
return O ||= (D = _r(u, i), !0), D;
|
|
1744
|
+
}, P = n, F = P.implementation, I = P.createNodeIterator, L = P.createDocumentFragment, R = P.getElementsByTagName, ee = r.importNode, z = vr();
|
|
1745
|
+
t.isSupported = typeof rn == "function" && typeof _ == "function" && F && F.createHTMLDocument !== void 0;
|
|
1746
|
+
let te = Qn, ne = $n, re = er, ie = tr, ae = nr, oe = ir, se = ar, B = sr, V = rr, H = null, ce = $({}, [
|
|
1748
1747
|
...Vn,
|
|
1749
1748
|
...Hn,
|
|
1750
|
-
...
|
|
1751
|
-
...
|
|
1752
|
-
|
|
1753
|
-
|
|
1749
|
+
...Un,
|
|
1750
|
+
...Gn,
|
|
1751
|
+
...qn
|
|
1752
|
+
]), U = null, W = $({}, [
|
|
1754
1753
|
...Jn,
|
|
1755
1754
|
...Yn,
|
|
1756
|
-
...Xn
|
|
1757
|
-
|
|
1755
|
+
...Xn,
|
|
1756
|
+
...Zn
|
|
1757
|
+
]), le = Object.seal(dn(null, {
|
|
1758
1758
|
tagNameCheck: {
|
|
1759
1759
|
writable: !0,
|
|
1760
1760
|
configurable: !1,
|
|
@@ -1773,7 +1773,7 @@ function br() {
|
|
|
1773
1773
|
enumerable: !0,
|
|
1774
1774
|
value: !1
|
|
1775
1775
|
}
|
|
1776
|
-
})),
|
|
1776
|
+
})), ue = null, de = null, G = Object.seal(dn(null, {
|
|
1777
1777
|
tagCheck: {
|
|
1778
1778
|
writable: !0,
|
|
1779
1779
|
configurable: !1,
|
|
@@ -1786,14 +1786,14 @@ function br() {
|
|
|
1786
1786
|
enumerable: !0,
|
|
1787
1787
|
value: null
|
|
1788
1788
|
}
|
|
1789
|
-
})),
|
|
1789
|
+
})), K = !0, fe = !0, q = !1, pe = !0, me = !1, he = !0, ge = !1, _e = !1, ve = null, ye = null, be = !1, xe = !1, Se = !1, Ce = !1, we = !0, Te = !1, Ee = "user-content-", De = !0, Oe = !1, ke = {}, Ae = null, je = $({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Me = null, Ne = $({}, [
|
|
1790
1790
|
"audio",
|
|
1791
1791
|
"video",
|
|
1792
1792
|
"img",
|
|
1793
1793
|
"source",
|
|
1794
1794
|
"image",
|
|
1795
1795
|
"track"
|
|
1796
|
-
]),
|
|
1796
|
+
]), Pe = null, J = $({}, [
|
|
1797
1797
|
"alt",
|
|
1798
1798
|
"class",
|
|
1799
1799
|
"for",
|
|
@@ -1808,42 +1808,42 @@ function br() {
|
|
|
1808
1808
|
"value",
|
|
1809
1809
|
"style",
|
|
1810
1810
|
"xmlns"
|
|
1811
|
-
]),
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
], Sn),
|
|
1811
|
+
]), Fe = "http://www.w3.org/1998/Math/MathML", Y = "http://www.w3.org/2000/svg", X = "http://www.w3.org/1999/xhtml", Ie = X, Le = !1, Re = null, ze = $({}, [
|
|
1812
|
+
Fe,
|
|
1813
|
+
Y,
|
|
1814
|
+
X
|
|
1815
|
+
], Sn), Be = ln([
|
|
1816
1816
|
"mi",
|
|
1817
1817
|
"mo",
|
|
1818
1818
|
"mn",
|
|
1819
1819
|
"ms",
|
|
1820
1820
|
"mtext"
|
|
1821
|
-
]),
|
|
1821
|
+
]), Ve = $({}, Be), He = ln(["annotation-xml"]), Ue = $({}, He), We = $({}, [
|
|
1822
1822
|
"title",
|
|
1823
1823
|
"style",
|
|
1824
1824
|
"font",
|
|
1825
1825
|
"a",
|
|
1826
1826
|
"script"
|
|
1827
|
-
]),
|
|
1827
|
+
]), Ge = null, Ke = ["application/xhtml+xml", "text/html"], Z = null, qe = null, Je = n.createElement("form"), Ye = function(e) {
|
|
1828
1828
|
return e instanceof RegExp || e instanceof Function;
|
|
1829
|
-
},
|
|
1829
|
+
}, Xe = function() {
|
|
1830
1830
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1831
|
-
if (
|
|
1832
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
1833
|
-
transform:
|
|
1834
|
-
base:
|
|
1835
|
-
}),
|
|
1836
|
-
transform:
|
|
1837
|
-
base:
|
|
1838
|
-
}),
|
|
1839
|
-
let t =
|
|
1840
|
-
if (
|
|
1831
|
+
if (qe && qe === e) return;
|
|
1832
|
+
(!e || typeof e != "object") && (e = {}), e = Ln(e), Ge = Ke.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Z = Ge === "application/xhtml+xml" ? Sn : xn, H = yr(e, "ALLOWED_TAGS", ce, { transform: Z }), U = yr(e, "ALLOWED_ATTR", W, { transform: Z }), Re = yr(e, "ALLOWED_NAMESPACES", ze, { transform: Sn }), Pe = yr(e, "ADD_URI_SAFE_ATTR", J, {
|
|
1833
|
+
transform: Z,
|
|
1834
|
+
base: J
|
|
1835
|
+
}), Me = yr(e, "ADD_DATA_URI_TAGS", Ne, {
|
|
1836
|
+
transform: Z,
|
|
1837
|
+
base: Ne
|
|
1838
|
+
}), Ae = yr(e, "FORBID_CONTENTS", je, { transform: Z }), ue = yr(e, "FORBID_TAGS", Ln({}), { transform: Z }), de = yr(e, "FORBID_ATTR", Ln({}), { transform: Z }), ke = jn(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Ln(e.USE_PROFILES) : e.USE_PROFILES : !1, K = e.ALLOW_ARIA_ATTR !== !1, fe = e.ALLOW_DATA_ATTR !== !1, q = e.ALLOW_UNKNOWN_PROTOCOLS || !1, pe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, me = e.SAFE_FOR_TEMPLATES || !1, he = e.SAFE_FOR_XML !== !1, ge = e.WHOLE_DOCUMENT || !1, xe = e.RETURN_DOM || !1, Se = e.RETURN_DOM_FRAGMENT || !1, Ce = e.RETURN_TRUSTED_TYPE || !1, be = e.FORCE_BODY || !1, we = e.SANITIZE_DOM !== !1, Te = e.SANITIZE_NAMED_PROPS || !1, De = e.KEEP_CONTENT !== !1, Oe = e.IN_PLACE || !1, V = Bn(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : rr, Ie = typeof e.NAMESPACE == "string" ? e.NAMESPACE : X, Ve = br(e, "MATHML_TEXT_INTEGRATION_POINTS", () => $({}, Be)), Ue = br(e, "HTML_INTEGRATION_POINTS", () => $({}, He));
|
|
1839
|
+
let t = br(e, "CUSTOM_ELEMENT_HANDLING", () => dn(null));
|
|
1840
|
+
if (le = dn(null), jn(t, "tagNameCheck") && Ye(t.tagNameCheck) && (le.tagNameCheck = t.tagNameCheck), jn(t, "attributeNameCheck") && Ye(t.attributeNameCheck) && (le.attributeNameCheck = t.attributeNameCheck), jn(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (le.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), un(le), me && (fe = !1), Se && (xe = !0), ke && (H = $({}, qn), U = dn(null), ke.html === !0 && ($(H, Vn), $(U, Jn)), ke.svg === !0 && ($(H, Hn), $(U, Yn), $(U, Zn)), ke.svgFilters === !0 && ($(H, Un), $(U, Yn), $(U, Zn)), ke.mathMl === !0 && ($(H, Gn), $(U, Xn), $(U, Zn))), G.tagCheck = null, G.attributeCheck = null, jn(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? G.tagCheck = e.ADD_TAGS : bn(e.ADD_TAGS) && (H === ce && (H = Ln(H)), $(H, e.ADD_TAGS, Z))), jn(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? G.attributeCheck = e.ADD_ATTR : bn(e.ADD_ATTR) && (U === W && (U = Ln(U)), $(U, e.ADD_ATTR, Z))), jn(e, "ADD_FORBID_CONTENTS") && bn(e.ADD_FORBID_CONTENTS) && (Ae === je && (Ae = Ln(Ae)), $(Ae, e.ADD_FORBID_CONTENTS, Z)), De && (H["#text"] = !0), ge && $(H, [
|
|
1841
1841
|
"html",
|
|
1842
1842
|
"head",
|
|
1843
1843
|
"body"
|
|
1844
|
-
]),
|
|
1845
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
1846
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
1844
|
+
]), H.table && ($(H, ["tbody"]), delete ue.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
1845
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Pn("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
1846
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Pn("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
1847
1847
|
let t = T;
|
|
1848
1848
|
T = e.TRUSTED_TYPES_POLICY;
|
|
1849
1849
|
try {
|
|
@@ -1851,34 +1851,34 @@ function br() {
|
|
|
1851
1851
|
} catch (e) {
|
|
1852
1852
|
throw T = t, e;
|
|
1853
1853
|
}
|
|
1854
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, E = "") : (T === void 0 && (T =
|
|
1855
|
-
|
|
1856
|
-
},
|
|
1857
|
-
...Vn,
|
|
1854
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, E = "") : (T === void 0 && (T = N()), T && typeof E == "string" && (E = j("")));
|
|
1855
|
+
ln && ln(e), qe = e;
|
|
1856
|
+
}, Ze = $({}, [
|
|
1858
1857
|
...Hn,
|
|
1859
|
-
...Un
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1858
|
+
...Un,
|
|
1859
|
+
...Wn
|
|
1860
|
+
]), Qe = $({}, [...Gn, ...Kn]), $e = function(e, t, n) {
|
|
1861
|
+
return t.namespaceURI === X ? e === "svg" : t.namespaceURI === Fe ? e === "svg" && (n === "annotation-xml" || Ve[n]) : !!Ze[e];
|
|
1862
|
+
}, et = function(e, t, n) {
|
|
1863
|
+
return t.namespaceURI === X ? e === "math" : t.namespaceURI === Y ? e === "math" && Ue[n] : !!Qe[e];
|
|
1864
|
+
}, tt = function(e, t, n) {
|
|
1865
|
+
return t.namespaceURI === Y && !Ue[n] || t.namespaceURI === Fe && !Ve[n] ? !1 : !Qe[e] && (We[e] || !Ze[e]);
|
|
1866
|
+
}, nt = function(e) {
|
|
1867
1867
|
let t = _(e);
|
|
1868
1868
|
(!t || !t.tagName) && (t = {
|
|
1869
|
-
namespaceURI:
|
|
1869
|
+
namespaceURI: Ie,
|
|
1870
1870
|
tagName: "template"
|
|
1871
1871
|
});
|
|
1872
1872
|
let n = xn(e.tagName), r = xn(t.tagName);
|
|
1873
|
-
return
|
|
1874
|
-
},
|
|
1873
|
+
return Re[e.namespaceURI] ? e.namespaceURI === Y ? $e(n, t, r) : e.namespaceURI === Fe ? et(n, t, r) : e.namespaceURI === X ? tt(n, t, r) : !!(Ge === "application/xhtml+xml" && Re[e.namespaceURI]) : !1;
|
|
1874
|
+
}, rt = function(e) {
|
|
1875
1875
|
vn(t.removed, { element: e });
|
|
1876
1876
|
try {
|
|
1877
1877
|
_(e).removeChild(e);
|
|
1878
1878
|
} catch {
|
|
1879
|
-
if (p(e), !_(e)) throw
|
|
1879
|
+
if (p(e), !_(e)) throw Pn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
1880
1880
|
}
|
|
1881
|
-
},
|
|
1881
|
+
}, it = function(e, t, n) {
|
|
1882
1882
|
try {
|
|
1883
1883
|
m(e, t);
|
|
1884
1884
|
} catch {
|
|
@@ -1886,8 +1886,8 @@ function br() {
|
|
|
1886
1886
|
e.removeAttribute(n);
|
|
1887
1887
|
} catch {}
|
|
1888
1888
|
}
|
|
1889
|
-
},
|
|
1890
|
-
|
|
1889
|
+
}, at = function(e) {
|
|
1890
|
+
ct(e);
|
|
1891
1891
|
let t = g(e);
|
|
1892
1892
|
if (t) {
|
|
1893
1893
|
let e = [];
|
|
@@ -1902,9 +1902,9 @@ function br() {
|
|
|
1902
1902
|
let n = y(e);
|
|
1903
1903
|
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
1904
1904
|
let r = n[t], i = r && r.name;
|
|
1905
|
-
typeof i == "string" &&
|
|
1905
|
+
typeof i == "string" && it(e, r, i);
|
|
1906
1906
|
}
|
|
1907
|
-
},
|
|
1907
|
+
}, ot = function(e, n, r) {
|
|
1908
1908
|
if (!r) try {
|
|
1909
1909
|
r = n.getAttributeNode(e);
|
|
1910
1910
|
} catch {
|
|
@@ -1922,93 +1922,93 @@ function br() {
|
|
|
1922
1922
|
} catch {}
|
|
1923
1923
|
}
|
|
1924
1924
|
if (e === "is") {
|
|
1925
|
-
if (
|
|
1926
|
-
|
|
1925
|
+
if (xe || Se) try {
|
|
1926
|
+
rt(n);
|
|
1927
1927
|
} catch {}
|
|
1928
1928
|
else try {
|
|
1929
1929
|
n.setAttribute(e, "");
|
|
1930
1930
|
} catch {}
|
|
1931
1931
|
}
|
|
1932
|
-
},
|
|
1932
|
+
}, st = function(e) {
|
|
1933
1933
|
let t = y(e);
|
|
1934
1934
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
1935
1935
|
let r = t[n], i = r && r.name;
|
|
1936
|
-
typeof i != "string" ||
|
|
1936
|
+
typeof i != "string" || U[Z(i)] || it(e, r, i);
|
|
1937
1937
|
}
|
|
1938
|
-
},
|
|
1938
|
+
}, ct = function(e) {
|
|
1939
1939
|
let t = [e];
|
|
1940
1940
|
for (; t.length > 0;) {
|
|
1941
1941
|
let e = t.pop();
|
|
1942
|
-
C(e) ===
|
|
1942
|
+
C(e) === fr.element && st(e);
|
|
1943
1943
|
let n = g(e);
|
|
1944
1944
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
1945
1945
|
}
|
|
1946
|
-
},
|
|
1947
|
-
return
|
|
1948
|
-
},
|
|
1949
|
-
if (!
|
|
1946
|
+
}, lt = function(e, t) {
|
|
1947
|
+
return he ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
|
|
1948
|
+
}, ut = function(e) {
|
|
1949
|
+
if (!he) return;
|
|
1950
1950
|
let t = [e];
|
|
1951
1951
|
for (; t.length > 0;) {
|
|
1952
1952
|
let e = t.pop(), n = C(e);
|
|
1953
|
-
if (n ===
|
|
1953
|
+
if (n === fr.processingInstruction || n === fr.comment && Nn(lr, e.data)) {
|
|
1954
1954
|
try {
|
|
1955
1955
|
p(e);
|
|
1956
1956
|
} catch {}
|
|
1957
1957
|
continue;
|
|
1958
1958
|
}
|
|
1959
|
-
if (n ===
|
|
1960
|
-
let t = e, n =
|
|
1959
|
+
if (n === fr.element) {
|
|
1960
|
+
let t = e, n = Z(w(e));
|
|
1961
1961
|
try {
|
|
1962
|
-
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") &&
|
|
1962
|
+
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && lt("for", n) && t.removeAttribute("for");
|
|
1963
1963
|
} catch {}
|
|
1964
1964
|
}
|
|
1965
1965
|
let r = g(e);
|
|
1966
1966
|
if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
|
|
1967
1967
|
}
|
|
1968
|
-
},
|
|
1968
|
+
}, dt = function(e) {
|
|
1969
1969
|
let t = null, r = null;
|
|
1970
|
-
if (
|
|
1970
|
+
if (be) e = "<remove></remove>" + e;
|
|
1971
1971
|
else {
|
|
1972
1972
|
let t = Cn(e, /^[\r\n\t ]+/);
|
|
1973
1973
|
r = t && t[0];
|
|
1974
1974
|
}
|
|
1975
|
-
|
|
1975
|
+
Ge === "application/xhtml+xml" && Ie === X && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
1976
1976
|
let i = T ? j(e) : e;
|
|
1977
|
-
if (
|
|
1978
|
-
t = new l().parseFromString(i,
|
|
1977
|
+
if (Ie === X) try {
|
|
1978
|
+
t = new l().parseFromString(i, Ge);
|
|
1979
1979
|
} catch {}
|
|
1980
1980
|
if (!t || !t.documentElement) {
|
|
1981
|
-
t =
|
|
1981
|
+
t = F.createDocument(Ie, "template", null);
|
|
1982
1982
|
try {
|
|
1983
|
-
t.documentElement.innerHTML =
|
|
1983
|
+
t.documentElement.innerHTML = Le ? E : i;
|
|
1984
1984
|
} catch {}
|
|
1985
1985
|
}
|
|
1986
1986
|
let a = t.body || t.documentElement;
|
|
1987
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
1988
|
-
},
|
|
1987
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ie === X ? R.call(t, ge ? "html" : "body")[0] : ge ? t.documentElement : a;
|
|
1988
|
+
}, ft = function(e) {
|
|
1989
1989
|
let t = S ? S(e) : e.ownerDocument;
|
|
1990
|
-
return
|
|
1991
|
-
},
|
|
1992
|
-
return e = wn(e,
|
|
1993
|
-
},
|
|
1990
|
+
return I.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
1991
|
+
}, pt = function(e) {
|
|
1992
|
+
return e = wn(e, te, " "), e = wn(e, ne, " "), e = wn(e, re, " "), e;
|
|
1993
|
+
}, mt = function(e) {
|
|
1994
1994
|
e.normalize();
|
|
1995
|
-
let t = S ? S(e) : e.ownerDocument, n =
|
|
1996
|
-
for (; r;) r.data =
|
|
1995
|
+
let t = S ? S(e) : e.ownerDocument, n = I.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
1996
|
+
for (; r;) r.data = pt(r.data), r = n.nextNode();
|
|
1997
1997
|
let i = e.querySelectorAll?.call(e, "template");
|
|
1998
1998
|
i && hn(i, (e) => {
|
|
1999
|
-
|
|
1999
|
+
gt(e.content) && mt(e.content);
|
|
2000
2000
|
});
|
|
2001
|
-
},
|
|
2001
|
+
}, ht = function(e) {
|
|
2002
2002
|
let t = x ? x(e) : null;
|
|
2003
|
-
return typeof t != "string" ||
|
|
2004
|
-
},
|
|
2003
|
+
return typeof t != "string" || Z(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== y(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== b(e) || e.childNodes !== g(e);
|
|
2004
|
+
}, gt = function(e) {
|
|
2005
2005
|
if (!b || typeof e != "object" || !e) return !1;
|
|
2006
2006
|
try {
|
|
2007
|
-
return b(e) ===
|
|
2007
|
+
return b(e) === fr.documentFragment;
|
|
2008
2008
|
} catch {
|
|
2009
2009
|
return !1;
|
|
2010
2010
|
}
|
|
2011
|
-
},
|
|
2011
|
+
}, _t = function(e) {
|
|
2012
2012
|
if (!b || typeof e != "object" || !e) return !1;
|
|
2013
2013
|
try {
|
|
2014
2014
|
return typeof b(e) == "number";
|
|
@@ -2016,18 +2016,18 @@ function br() {
|
|
|
2016
2016
|
return !1;
|
|
2017
2017
|
}
|
|
2018
2018
|
};
|
|
2019
|
-
function
|
|
2019
|
+
function vt(e, n, r) {
|
|
2020
2020
|
e.length !== 0 && hn(e, (e) => {
|
|
2021
|
-
e.call(t, n, r,
|
|
2021
|
+
e.call(t, n, r, qe);
|
|
2022
2022
|
});
|
|
2023
2023
|
}
|
|
2024
|
-
let
|
|
2025
|
-
return !!(
|
|
2026
|
-
},
|
|
2027
|
-
return e instanceof RegExp ?
|
|
2028
|
-
},
|
|
2029
|
-
if (!
|
|
2030
|
-
if (
|
|
2024
|
+
let yt = function(e, t) {
|
|
2025
|
+
return !!(he && e.hasChildNodes() && !_t(e.firstElementChild) && Nn(cr, e.textContent) && Nn(cr, e.innerHTML) || he && e.namespaceURI === X && mr[t] && (_t(e.firstElementChild) || typeof e.textContent == "string" && Nn(hr[t], e.textContent)) || e.nodeType === fr.processingInstruction || he && e.nodeType === fr.comment && Nn(lr, e.data));
|
|
2026
|
+
}, bt = function(e, t) {
|
|
2027
|
+
return e instanceof RegExp ? Nn(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
|
|
2028
|
+
}, xt = function(e, t, n) {
|
|
2029
|
+
if (!ue[t] && Dt(t) && bt(le.tagNameCheck, t)) return !1;
|
|
2030
|
+
if (De && !Ae[t]) {
|
|
2031
2031
|
let t = _(e), r = g(e);
|
|
2032
2032
|
if (r && t) {
|
|
2033
2033
|
let i = r.length;
|
|
@@ -2037,35 +2037,35 @@ function br() {
|
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
2039
2039
|
}
|
|
2040
|
-
return
|
|
2041
|
-
},
|
|
2042
|
-
return e.length === 0 ? t : t === n || t === r ?
|
|
2043
|
-
},
|
|
2044
|
-
return e === t || _(e) !== null ? !1 : (
|
|
2045
|
-
},
|
|
2046
|
-
if (
|
|
2047
|
-
if (
|
|
2048
|
-
let r =
|
|
2049
|
-
if (
|
|
2040
|
+
return rt(e), !0;
|
|
2041
|
+
}, St = function(e, t, n, r) {
|
|
2042
|
+
return e.length === 0 ? t : t === n || t === r ? Ln(t) : t;
|
|
2043
|
+
}, Ct = function(e, t) {
|
|
2044
|
+
return e === t || _(e) !== null ? !1 : (Oe && ct(e), !0);
|
|
2045
|
+
}, wt = function(e, n) {
|
|
2046
|
+
if (vt(z.beforeSanitizeElements, e, null), Ct(e, n)) return !0;
|
|
2047
|
+
if (ht(e)) return rt(e), !0;
|
|
2048
|
+
let r = Z(w(e));
|
|
2049
|
+
if (H = St(z.uponSanitizeElement, H, ce, ve), vt(z.uponSanitizeElement, e, {
|
|
2050
2050
|
tagName: r,
|
|
2051
|
-
allowedTags:
|
|
2052
|
-
}),
|
|
2053
|
-
if (
|
|
2054
|
-
if (
|
|
2055
|
-
let t =
|
|
2056
|
-
return t === !1 && (
|
|
2051
|
+
allowedTags: H
|
|
2052
|
+
}), Ct(e, n)) return !0;
|
|
2053
|
+
if (yt(e, r)) return rt(e), !0;
|
|
2054
|
+
if (ue[r] || !(G.tagCheck instanceof Function && G.tagCheck(r)) && !H[r]) {
|
|
2055
|
+
let t = xt(e, r, n);
|
|
2056
|
+
return t === !1 && (vt(z.afterSanitizeElements, e, null), Ct(e, n)) ? !0 : t;
|
|
2057
2057
|
}
|
|
2058
|
-
if (C(e) ===
|
|
2059
|
-
if (
|
|
2060
|
-
let n =
|
|
2058
|
+
if (C(e) === fr.element && !nt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && Nn(ur, e.innerHTML)) return rt(e), !0;
|
|
2059
|
+
if (me && e.nodeType === fr.text) {
|
|
2060
|
+
let n = pt(e.textContent);
|
|
2061
2061
|
e.textContent !== n && (vn(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
2062
2062
|
}
|
|
2063
|
-
return
|
|
2064
|
-
},
|
|
2065
|
-
if (
|
|
2066
|
-
let i =
|
|
2067
|
-
return
|
|
2068
|
-
},
|
|
2063
|
+
return vt(z.afterSanitizeElements, e, null), Ct(e, n);
|
|
2064
|
+
}, Tt = function(e, t, r) {
|
|
2065
|
+
if (de[t] || lt(t, e) || we && (t === "id" || t === "name") && (r in n || r in Je)) return !1;
|
|
2066
|
+
let i = U[t] || G.attributeCheck instanceof Function && G.attributeCheck(t, e);
|
|
2067
|
+
return fe && Nn(ie, t) || K && Nn(ae, t) ? !0 : i ? Pe[t] || Nn(V, wn(r, se, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Tn(r, "data:") === 0 && Me[e] || q && !Nn(oe, wn(r, se, "")) ? !0 : !r : Dt(e) && bt(le.tagNameCheck, e) && bt(le.attributeNameCheck, t, e) || t === "is" && le.allowCustomizedBuiltInElements && bt(le.tagNameCheck, r);
|
|
2068
|
+
}, Et = $({}, [
|
|
2069
2069
|
"annotation-xml",
|
|
2070
2070
|
"color-profile",
|
|
2071
2071
|
"font-face",
|
|
@@ -2074,67 +2074,67 @@ function br() {
|
|
|
2074
2074
|
"font-face-src",
|
|
2075
2075
|
"font-face-uri",
|
|
2076
2076
|
"missing-glyph"
|
|
2077
|
-
]),
|
|
2078
|
-
return !
|
|
2079
|
-
},
|
|
2077
|
+
]), Dt = function(e) {
|
|
2078
|
+
return !Et[xn(e)] && Nn(B, e);
|
|
2079
|
+
}, Ot = function(e, t, n, r) {
|
|
2080
2080
|
if (T && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
2081
2081
|
case "TrustedHTML": return j(r);
|
|
2082
|
-
case "TrustedScriptURL": return
|
|
2082
|
+
case "TrustedScriptURL": return M(r);
|
|
2083
2083
|
}
|
|
2084
2084
|
return r;
|
|
2085
|
-
},
|
|
2085
|
+
}, kt = function(e, t, n, r) {
|
|
2086
2086
|
try {
|
|
2087
|
-
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !
|
|
2087
|
+
return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !ht(e) || (rt(e), !1);
|
|
2088
2088
|
} catch {
|
|
2089
|
-
return
|
|
2089
|
+
return ot(t, e), !1;
|
|
2090
2090
|
}
|
|
2091
|
-
},
|
|
2092
|
-
if (
|
|
2091
|
+
}, At = function(e, n) {
|
|
2092
|
+
if (vt(z.beforeSanitizeAttributes, e, null), Ct(e, n)) return;
|
|
2093
2093
|
let r = e.attributes;
|
|
2094
|
-
if (!r ||
|
|
2095
|
-
|
|
2094
|
+
if (!r || ht(e)) return;
|
|
2095
|
+
U = St(z.uponSanitizeAttribute, U, W, ye);
|
|
2096
2096
|
let i = {
|
|
2097
2097
|
attrName: "",
|
|
2098
2098
|
attrValue: "",
|
|
2099
2099
|
keepAttr: !0,
|
|
2100
|
-
allowedAttributes:
|
|
2100
|
+
allowedAttributes: U,
|
|
2101
2101
|
forceKeepAttr: void 0
|
|
2102
|
-
}, a = r.length, o =
|
|
2102
|
+
}, a = r.length, o = Z(e.nodeName);
|
|
2103
2103
|
for (; a--;) {
|
|
2104
|
-
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u =
|
|
2105
|
-
if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0,
|
|
2106
|
-
|
|
2104
|
+
let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = Z(s), d = l, f = s === "value" ? d : En(d), p = !1;
|
|
2105
|
+
if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, vt(z.uponSanitizeAttribute, e, i), f = i.attrValue, Te && (u === "id" || u === "name") && Tn(f, Ee) !== 0 && (ot(s, e, n), f = Ee + f, p = !0), he && Nn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
|
|
2106
|
+
ot(s, e, n);
|
|
2107
2107
|
continue;
|
|
2108
2108
|
}
|
|
2109
2109
|
if (u === "attributename" && Cn(f, "href")) {
|
|
2110
|
-
|
|
2110
|
+
ot(s, e, n);
|
|
2111
2111
|
continue;
|
|
2112
2112
|
}
|
|
2113
2113
|
if (!i.forceKeepAttr) {
|
|
2114
2114
|
if (!i.keepAttr) {
|
|
2115
|
-
|
|
2115
|
+
ot(s, e, n);
|
|
2116
2116
|
continue;
|
|
2117
2117
|
}
|
|
2118
|
-
if (!
|
|
2119
|
-
|
|
2118
|
+
if (!pe && Nn(dr, f)) {
|
|
2119
|
+
ot(s, e, n);
|
|
2120
2120
|
continue;
|
|
2121
2121
|
}
|
|
2122
|
-
if (
|
|
2123
|
-
|
|
2122
|
+
if (me && (f = pt(f)), !Tt(o, u, f)) {
|
|
2123
|
+
ot(s, e, n);
|
|
2124
2124
|
continue;
|
|
2125
2125
|
}
|
|
2126
|
-
f =
|
|
2126
|
+
f = Ot(o, u, c, f), f !== d && kt(e, s, c, f) && p && _n(t.removed);
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
|
-
|
|
2130
|
-
},
|
|
2131
|
-
let t = null, n =
|
|
2132
|
-
for (
|
|
2129
|
+
vt(z.afterSanitizeAttributes, e, null), Ct(e, n);
|
|
2130
|
+
}, jt = function(e) {
|
|
2131
|
+
let t = null, n = ft(e);
|
|
2132
|
+
for (vt(z.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (vt(z.uponSanitizeShadowNode, t, null), wt(t, e), At(t, e), gt(t.content) && jt(t.content), C(t) === fr.element) {
|
|
2133
2133
|
let e = v(t);
|
|
2134
|
-
|
|
2134
|
+
gt(e) && (Mt(e), jt(e));
|
|
2135
2135
|
}
|
|
2136
|
-
|
|
2137
|
-
},
|
|
2136
|
+
vt(z.afterSanitizeShadowDOM, e, null);
|
|
2137
|
+
}, Mt = function(e) {
|
|
2138
2138
|
let t = [{
|
|
2139
2139
|
node: e,
|
|
2140
2140
|
shadow: null
|
|
@@ -2142,19 +2142,19 @@ function br() {
|
|
|
2142
2142
|
for (; t.length > 0;) {
|
|
2143
2143
|
let e = t.pop();
|
|
2144
2144
|
if (e.shadow) {
|
|
2145
|
-
|
|
2145
|
+
jt(e.shadow);
|
|
2146
2146
|
continue;
|
|
2147
2147
|
}
|
|
2148
|
-
let n = e.node, r = C(n) ===
|
|
2148
|
+
let n = e.node, r = C(n) === fr.element, i = g(n);
|
|
2149
2149
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
2150
2150
|
node: i[e],
|
|
2151
2151
|
shadow: null
|
|
2152
2152
|
});
|
|
2153
2153
|
if (r) {
|
|
2154
2154
|
let e = x ? x(n) : null;
|
|
2155
|
-
if (typeof e == "string" &&
|
|
2155
|
+
if (typeof e == "string" && Z(e) === "template") {
|
|
2156
2156
|
let e = n.content;
|
|
2157
|
-
|
|
2157
|
+
gt(e) && t.push({
|
|
2158
2158
|
node: e,
|
|
2159
2159
|
shadow: null
|
|
2160
2160
|
});
|
|
@@ -2162,7 +2162,7 @@ function br() {
|
|
|
2162
2162
|
}
|
|
2163
2163
|
if (r) {
|
|
2164
2164
|
let e = v(n);
|
|
2165
|
-
|
|
2165
|
+
gt(e) && t.push({
|
|
2166
2166
|
node: null,
|
|
2167
2167
|
shadow: e
|
|
2168
2168
|
}, {
|
|
@@ -2174,78 +2174,78 @@ function br() {
|
|
|
2174
2174
|
};
|
|
2175
2175
|
return t.sanitize = function(e) {
|
|
2176
2176
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
2177
|
-
if (
|
|
2177
|
+
if (Le = !e, Le && (e = "<!-->"), typeof e != "string" && !_t(e) && (e = Rn(e), typeof e != "string")) throw Pn("dirty is not a string, aborting");
|
|
2178
2178
|
if (!t.isSupported) return e;
|
|
2179
|
-
|
|
2180
|
-
let c =
|
|
2179
|
+
_e ? (H = ve, U = ye) : Xe(n), (z.uponSanitizeElement.length > 0 || z.uponSanitizeAttribute.length > 0) && (H = Ln(H)), z.uponSanitizeAttribute.length > 0 && (U = Ln(U)), t.removed = [];
|
|
2180
|
+
let c = Oe && typeof e != "string" && _t(e);
|
|
2181
2181
|
if (c) {
|
|
2182
|
-
|
|
2182
|
+
ut(e);
|
|
2183
2183
|
let t = w(e);
|
|
2184
2184
|
if (typeof t == "string") {
|
|
2185
|
-
let n =
|
|
2186
|
-
if (!
|
|
2185
|
+
let n = Z(t);
|
|
2186
|
+
if (!H[n] || ue[n]) throw at(e), Pn("root node is forbidden and cannot be sanitized in-place");
|
|
2187
2187
|
}
|
|
2188
|
-
if (
|
|
2188
|
+
if (ht(e)) throw at(e), Pn("root node is clobbered and cannot be sanitized in-place");
|
|
2189
2189
|
try {
|
|
2190
|
-
|
|
2190
|
+
Mt(e);
|
|
2191
2191
|
} catch (t) {
|
|
2192
|
-
throw
|
|
2192
|
+
throw at(e), t;
|
|
2193
2193
|
}
|
|
2194
|
-
} else if (
|
|
2194
|
+
} else if (_t(e)) i = dt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === fr.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Mt(i);
|
|
2195
2195
|
else {
|
|
2196
|
-
if (!
|
|
2197
|
-
if (i =
|
|
2196
|
+
if (!xe && !me && !ge && e.indexOf("<") === -1) return T && Ce ? j(e) : e;
|
|
2197
|
+
if (i = dt(e), !i) return xe ? null : Ce ? E : "";
|
|
2198
2198
|
}
|
|
2199
|
-
i &&
|
|
2199
|
+
i && be && rt(i.firstChild);
|
|
2200
2200
|
let l = c ? e : i;
|
|
2201
2201
|
try {
|
|
2202
|
-
let e =
|
|
2203
|
-
for (; o = e.nextNode();)
|
|
2202
|
+
let e = ft(l);
|
|
2203
|
+
for (; o = e.nextNode();) wt(o, l), At(o, l), gt(o.content) && jt(o.content);
|
|
2204
2204
|
} catch (n) {
|
|
2205
|
-
throw c && (
|
|
2206
|
-
e.element &&
|
|
2205
|
+
throw c && (at(e), hn(t.removed, (e) => {
|
|
2206
|
+
e.element && ct(e.element);
|
|
2207
2207
|
})), n;
|
|
2208
2208
|
}
|
|
2209
2209
|
if (c) {
|
|
2210
2210
|
let n = !1;
|
|
2211
2211
|
if (hn(t.removed, (t) => {
|
|
2212
|
-
t.element && (t.element === e && (n = !0),
|
|
2213
|
-
}), n) throw
|
|
2214
|
-
return
|
|
2212
|
+
t.element && (t.element === e && (n = !0), ct(t.element));
|
|
2213
|
+
}), n) throw Pn("a node selected for removal could not be safely returned; refusing to sanitize in place");
|
|
2214
|
+
return me && mt(e), e;
|
|
2215
2215
|
}
|
|
2216
|
-
if (
|
|
2217
|
-
if (
|
|
2216
|
+
if (xe) {
|
|
2217
|
+
if (me && mt(i), Se) for (s = L.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
2218
2218
|
else s = i;
|
|
2219
|
-
return (
|
|
2219
|
+
return (U.shadowroot || U.shadowrootmode) && (s = ee.call(r, s, !0)), s;
|
|
2220
2220
|
}
|
|
2221
|
-
let u =
|
|
2222
|
-
return
|
|
2221
|
+
let u = ge ? i.outerHTML : i.innerHTML;
|
|
2222
|
+
return ge && H["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && Nn(or, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), me && (u = pt(u)), T && Ce ? j(u) : u;
|
|
2223
2223
|
}, t.setConfig = function() {
|
|
2224
2224
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2225
|
-
|
|
2225
|
+
Xe(e), _e = !0, ve = H, ye = U;
|
|
2226
2226
|
}, t.clearConfig = function() {
|
|
2227
|
-
|
|
2227
|
+
qe = null, _e = !1, ve = null, ye = null, T = D, E = "";
|
|
2228
2228
|
}, t.isValidAttribute = function(e, t, n) {
|
|
2229
|
-
|
|
2230
|
-
let r =
|
|
2231
|
-
return
|
|
2229
|
+
qe || Xe({});
|
|
2230
|
+
let r = Z(e), i = Z(t);
|
|
2231
|
+
return Tt(r, i, n);
|
|
2232
2232
|
}, t.addHook = function(e, t) {
|
|
2233
|
-
typeof t == "function" && jn(
|
|
2233
|
+
typeof t == "function" && jn(z, e) && vn(z[e], t);
|
|
2234
2234
|
}, t.removeHook = function(e, t) {
|
|
2235
|
-
if (jn(
|
|
2235
|
+
if (jn(z, e)) {
|
|
2236
2236
|
if (t !== void 0) {
|
|
2237
|
-
let n = gn(
|
|
2238
|
-
return n === -1 ? void 0 : yn(
|
|
2237
|
+
let n = gn(z[e], t);
|
|
2238
|
+
return n === -1 ? void 0 : yn(z[e], n, 1)[0];
|
|
2239
2239
|
}
|
|
2240
|
-
return _n(
|
|
2240
|
+
return _n(z[e]);
|
|
2241
2241
|
}
|
|
2242
2242
|
}, t.removeHooks = function(e) {
|
|
2243
|
-
jn(
|
|
2243
|
+
jn(z, e) && (z[e] = []);
|
|
2244
2244
|
}, t.removeAllHooks = function() {
|
|
2245
|
-
|
|
2245
|
+
z = vr();
|
|
2246
2246
|
}, t;
|
|
2247
2247
|
}
|
|
2248
|
-
var
|
|
2248
|
+
var Sr = xr(), Cr = "default-src 'none'; script-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'none'; object-src 'none'; frame-src 'none'; font-src 'none'; media-src 'none'; form-action 'none'; base-uri 'none'", wr = {
|
|
2249
2249
|
ALLOWED_TAGS: "a abbr b bdi bdo blockquote br caption center code col colgroup dd del div dl dt em figcaption figure h1 h2 h3 h4 h5 h6 hr i img ins li ol p pre s section small span strong style sub sup table tbody td tfoot th thead tr u ul wbr".split(" "),
|
|
2250
2250
|
ALLOWED_ATTR: "alt title class style lang dir role width height align valign bgcolor border cellpadding cellspacing colspan rowspan scope src".split(" "),
|
|
2251
2251
|
ALLOW_DATA_ATTR: !1,
|
|
@@ -2277,21 +2277,21 @@ var xr = br(), Sr = "default-src 'none'; script-src 'none'; style-src 'unsafe-in
|
|
|
2277
2277
|
],
|
|
2278
2278
|
FORCE_BODY: !0,
|
|
2279
2279
|
RETURN_TRUSTED_TYPE: !1
|
|
2280
|
-
},
|
|
2281
|
-
function
|
|
2280
|
+
}, Tr = "<p title=\"t\" onclick=\"x()\">ok</p><script>x()<\/script><img alt=\"a\" src=\"https://x.invalid/p\" onerror=\"x()\">", Er = "<p title=\"t\">ok</p><img alt=\"a\">";
|
|
2281
|
+
function Dr(e) {
|
|
2282
2282
|
let t = "";
|
|
2283
2283
|
if (e && typeof window < "u") {
|
|
2284
|
-
let n =
|
|
2284
|
+
let n = Sr(window);
|
|
2285
2285
|
n.isSupported && (n.addHook("uponSanitizeAttribute", (e, t) => {
|
|
2286
2286
|
t.attrName === "src" && (e.nodeName !== "IMG" || !/^data:image\/(?:png|jpeg|gif|webp|avif);base64,[a-z0-9+/=\s]+$/i.test(t.attrValue)) && (t.keepAttr = !1);
|
|
2287
|
-
}), n.sanitize(
|
|
2287
|
+
}), n.sanitize(Tr, wr) === Er && (t = n.sanitize(e, wr)));
|
|
2288
2288
|
}
|
|
2289
|
-
return `<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${
|
|
2289
|
+
return `<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${Cr}"><meta name="referrer" content="no-referrer"><meta name="viewport" content="width=device-width, initial-scale=1"></head><body>${t}</body></html>`;
|
|
2290
2290
|
}
|
|
2291
2291
|
//#endregion
|
|
2292
2292
|
//#region src/display.tsx
|
|
2293
|
-
function
|
|
2294
|
-
let { t: d } = s(), [f, p] =
|
|
2293
|
+
function Or({ src: e, name: n = "", alt: r, fallback: i, children: a, shape: o = "circle", size: c = "medium", stacked: l, ...u }) {
|
|
2294
|
+
let { t: d } = s(), [f, p] = W(), m = u["aria-label"] ?? (n || d("avatar.default")), h = typeof c == "number" ? c : {
|
|
2295
2295
|
xsmall: 24,
|
|
2296
2296
|
small: 32,
|
|
2297
2297
|
medium: 48,
|
|
@@ -2299,58 +2299,58 @@ function Dr({ src: e, name: n = "", alt: r, fallback: i, children: a, shape: o =
|
|
|
2299
2299
|
xlarge: 80,
|
|
2300
2300
|
xxlarge: 96
|
|
2301
2301
|
}[c], g = n.trim(), _ = /[\u3400-\u9fff\uf900-\ufaff]/.test(g[0] ?? "") ? g[0] : g.split(/\s+/).slice(0, 2).map((e) => e[0]).join("").toUpperCase(), v = !!e && f !== e;
|
|
2302
|
-
return /* @__PURE__ */
|
|
2302
|
+
return /* @__PURE__ */ Y(t, {
|
|
2303
2303
|
name: "avatar",
|
|
2304
2304
|
...u,
|
|
2305
2305
|
role: v ? void 0 : "img",
|
|
2306
2306
|
"aria-label": v ? u["aria-label"] : m,
|
|
2307
|
-
className:
|
|
2307
|
+
className: q(l && "mn-avatar-stacked", u.className),
|
|
2308
2308
|
style: {
|
|
2309
2309
|
width: h,
|
|
2310
2310
|
height: h,
|
|
2311
2311
|
borderRadius: o === "circle" ? "50%" : o === "square" ? 0 : "var(--radius-md,8px)",
|
|
2312
2312
|
...u.style
|
|
2313
2313
|
},
|
|
2314
|
-
children: v ? /* @__PURE__ */
|
|
2314
|
+
children: v ? /* @__PURE__ */ Y(le, {
|
|
2315
2315
|
src: e,
|
|
2316
2316
|
mode: "aspectFill",
|
|
2317
2317
|
"aria-label": r ?? m,
|
|
2318
2318
|
onError: () => p(e)
|
|
2319
|
-
}) : /* @__PURE__ */
|
|
2319
|
+
}) : /* @__PURE__ */ Y(G, {
|
|
2320
2320
|
"aria-hidden": !0,
|
|
2321
2321
|
children: i ?? (_ || a)
|
|
2322
2322
|
})
|
|
2323
2323
|
});
|
|
2324
2324
|
}
|
|
2325
|
-
function
|
|
2326
|
-
let { t: a } = s(), o =
|
|
2327
|
-
return /* @__PURE__ */
|
|
2325
|
+
function kr({ max: e, count: n = 0, children: r, ...i }) {
|
|
2326
|
+
let { t: a } = s(), o = re.toArray(r), c = e === void 0 ? o : o.slice(0, Math.max(0, e)), l = Math.max(0, n + o.length - c.length);
|
|
2327
|
+
return /* @__PURE__ */ X(t, {
|
|
2328
2328
|
name: "avatar-group",
|
|
2329
2329
|
role: "group",
|
|
2330
2330
|
...i,
|
|
2331
2331
|
"aria-label": i["aria-label"] ?? (l ? a("avatar.groupWithMore", { count: l }) : a("avatar.group")),
|
|
2332
|
-
children: [c.map((e, t) => /* @__PURE__ */ K
|
|
2332
|
+
children: [c.map((e, t) => /* @__PURE__ */ Y(K, {
|
|
2333
2333
|
className: "mn-avatar-group-item",
|
|
2334
2334
|
children: e
|
|
2335
|
-
},
|
|
2335
|
+
}, se(e) ? e.key ?? t : t)), l > 0 && /* @__PURE__ */ X(K, {
|
|
2336
2336
|
"aria-hidden": !0,
|
|
2337
2337
|
className: "mn-avatar mn-avatar-overflow",
|
|
2338
2338
|
children: ["+", l]
|
|
2339
2339
|
})]
|
|
2340
2340
|
});
|
|
2341
2341
|
}
|
|
2342
|
-
function
|
|
2342
|
+
function Ar({ children: e, content: n, dot: r, color: i = "primary", variant: a = "solid", size: o = "medium", position: c = "top-right", icon: l, borderRadius: u, borderWidth: d, role: f = "status", ...p }) {
|
|
2343
2343
|
let { t: m } = s(), h = e != null && e !== !1, g = typeof e == "string" || typeof e == "number", _ = !h || g && n === void 0, v = _ ? {} : {
|
|
2344
2344
|
position: "absolute",
|
|
2345
2345
|
[c.startsWith("top") ? "top" : "bottom"]: 0,
|
|
2346
2346
|
[c.endsWith("left") ? "left" : "right"]: 0,
|
|
2347
2347
|
transform: `translate(${c.endsWith("left") ? "-50%" : "50%"},${c.startsWith("top") ? "-50%" : "50%"})`
|
|
2348
|
-
}, y = /* @__PURE__ */
|
|
2348
|
+
}, y = /* @__PURE__ */ X(t, {
|
|
2349
2349
|
name: "badge",
|
|
2350
2350
|
part: _ ? "root" : "badge",
|
|
2351
2351
|
role: f,
|
|
2352
2352
|
...p,
|
|
2353
|
-
className:
|
|
2353
|
+
className: q("mn-badge-content", _ && "mn-badge-standalone", r && "mn-badge-dot", `mn-color-${i}`, `mn-variant-${a}`, `mn-size-${o}`, p.className),
|
|
2354
2354
|
style: {
|
|
2355
2355
|
...v,
|
|
2356
2356
|
borderRadius: u,
|
|
@@ -2359,12 +2359,12 @@ function kr({ children: e, content: n, dot: r, color: i = "primary", variant: a
|
|
|
2359
2359
|
},
|
|
2360
2360
|
children: [l, !r && (n === void 0 ? g ? e : h ? m("badge.default") : null : n)]
|
|
2361
2361
|
});
|
|
2362
|
-
return _ ? y : /* @__PURE__ */
|
|
2362
|
+
return _ ? y : /* @__PURE__ */ X(K, {
|
|
2363
2363
|
className: "mn-badge-wrapper",
|
|
2364
2364
|
children: [e, y]
|
|
2365
2365
|
});
|
|
2366
2366
|
}
|
|
2367
|
-
function
|
|
2367
|
+
function jr(e) {
|
|
2368
2368
|
return typeof e == "string" && e in {
|
|
2369
2369
|
none: 0,
|
|
2370
2370
|
small: 8,
|
|
@@ -2377,133 +2377,133 @@ function Ar(e) {
|
|
|
2377
2377
|
large: 24
|
|
2378
2378
|
}[e] : e;
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2380
|
+
function Mr({ children: e, interactive: n, disabled: r, onClick: i, href: a, variant: o = "default", padding: s, type: c = "button", ...l }) {
|
|
2381
2381
|
let u = {
|
|
2382
|
-
padding:
|
|
2382
|
+
padding: jr(s),
|
|
2383
2383
|
...l.style
|
|
2384
2384
|
};
|
|
2385
|
-
return a &&
|
|
2385
|
+
return a && Se(a) && !r ? /* @__PURE__ */ Y(ue, {
|
|
2386
2386
|
url: a,
|
|
2387
|
-
className:
|
|
2387
|
+
className: q("mn-card", l.className),
|
|
2388
2388
|
style: u,
|
|
2389
2389
|
children: e
|
|
2390
|
-
}) : n ? /* @__PURE__ */
|
|
2390
|
+
}) : n ? /* @__PURE__ */ Y(I, {
|
|
2391
2391
|
type: c,
|
|
2392
2392
|
variant: "ghost",
|
|
2393
|
-
className:
|
|
2393
|
+
className: q("mn-card", `mn-card-${o}`, l.className),
|
|
2394
2394
|
disabled: r,
|
|
2395
2395
|
onClick: i,
|
|
2396
2396
|
style: u,
|
|
2397
2397
|
children: e
|
|
2398
|
-
}) : /* @__PURE__ */
|
|
2398
|
+
}) : /* @__PURE__ */ Y(t, {
|
|
2399
2399
|
name: "card",
|
|
2400
2400
|
...l,
|
|
2401
2401
|
style: u,
|
|
2402
|
-
className:
|
|
2402
|
+
className: q(`mn-card-${o}`, l.className),
|
|
2403
2403
|
children: e
|
|
2404
2404
|
});
|
|
2405
2405
|
}
|
|
2406
|
-
function
|
|
2407
|
-
return /* @__PURE__ */
|
|
2406
|
+
function Nr({ padding: e, ...n }) {
|
|
2407
|
+
return /* @__PURE__ */ Y(t, {
|
|
2408
2408
|
name: "card",
|
|
2409
2409
|
part: "header",
|
|
2410
2410
|
...n,
|
|
2411
2411
|
style: {
|
|
2412
|
-
padding:
|
|
2412
|
+
padding: jr(e),
|
|
2413
2413
|
...n.style
|
|
2414
2414
|
}
|
|
2415
2415
|
});
|
|
2416
2416
|
}
|
|
2417
|
-
function
|
|
2418
|
-
return /* @__PURE__ */
|
|
2417
|
+
function Pr(e) {
|
|
2418
|
+
return /* @__PURE__ */ Y(t, {
|
|
2419
2419
|
name: "card",
|
|
2420
2420
|
part: "title",
|
|
2421
2421
|
role: "heading",
|
|
2422
2422
|
...e
|
|
2423
2423
|
});
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2426
|
-
return /* @__PURE__ */
|
|
2425
|
+
function Fr(e) {
|
|
2426
|
+
return /* @__PURE__ */ Y(t, {
|
|
2427
2427
|
name: "card",
|
|
2428
2428
|
part: "description",
|
|
2429
2429
|
...e
|
|
2430
2430
|
});
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2432
|
+
function Ir({ padding: e, animation: n, ...r }) {
|
|
2433
2433
|
let i = n === !0 ? "fadeIn" : n;
|
|
2434
|
-
return /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ Y(t, {
|
|
2435
2435
|
name: "card",
|
|
2436
2436
|
part: "content",
|
|
2437
2437
|
...r,
|
|
2438
|
-
className:
|
|
2438
|
+
className: q(i && `mn-card-animation-${i}`, r.className),
|
|
2439
2439
|
style: {
|
|
2440
|
-
padding:
|
|
2440
|
+
padding: jr(e),
|
|
2441
2441
|
...r.style
|
|
2442
2442
|
}
|
|
2443
2443
|
});
|
|
2444
2444
|
}
|
|
2445
|
-
function
|
|
2446
|
-
return /* @__PURE__ */
|
|
2445
|
+
function Lr({ padding: e, ...n }) {
|
|
2446
|
+
return /* @__PURE__ */ Y(t, {
|
|
2447
2447
|
name: "card",
|
|
2448
2448
|
part: "footer",
|
|
2449
2449
|
...n,
|
|
2450
2450
|
style: {
|
|
2451
|
-
padding:
|
|
2451
|
+
padding: jr(e),
|
|
2452
2452
|
...n.style
|
|
2453
2453
|
}
|
|
2454
2454
|
});
|
|
2455
2455
|
}
|
|
2456
|
-
function
|
|
2457
|
-
return /* @__PURE__ */
|
|
2456
|
+
function Rr({ label: e, value: t, icon: n, description: r, ...i }) {
|
|
2457
|
+
return /* @__PURE__ */ X(Mr, {
|
|
2458
2458
|
...i,
|
|
2459
2459
|
children: [
|
|
2460
|
-
/* @__PURE__ */
|
|
2461
|
-
/* @__PURE__ */
|
|
2460
|
+
/* @__PURE__ */ X(Nr, { children: [n, /* @__PURE__ */ Y(G, { children: e })] }),
|
|
2461
|
+
/* @__PURE__ */ Y(Ir, { children: /* @__PURE__ */ Y(G, {
|
|
2462
2462
|
className: "mn-stat-value",
|
|
2463
2463
|
children: t
|
|
2464
2464
|
}) }),
|
|
2465
|
-
r && /* @__PURE__ */
|
|
2465
|
+
r && /* @__PURE__ */ Y(Fr, { children: r })
|
|
2466
2466
|
]
|
|
2467
2467
|
});
|
|
2468
2468
|
}
|
|
2469
|
-
function
|
|
2470
|
-
let { t: m } = s(), [h, _] = g(r, i ?? !1, a), v = r !== void 0 || i !== void 0 || !!a, y = /* @__PURE__ */
|
|
2469
|
+
function zr({ icon: e, children: t, label: n, pressed: r, defaultPressed: i, onPressedChange: a, onClick: o, tooltip: c, showTooltip: l = !!n, color: u = "neutral", variant: d = "ghost", shape: f = "circle", ...p }) {
|
|
2470
|
+
let { t: m } = s(), [h, _] = g(r, i ?? !1, a), v = r !== void 0 || i !== void 0 || !!a, y = /* @__PURE__ */ Y(I, {
|
|
2471
2471
|
...p,
|
|
2472
2472
|
color: u,
|
|
2473
2473
|
variant: d,
|
|
2474
2474
|
shape: f,
|
|
2475
2475
|
"aria-label": n ?? p["aria-label"] ?? m("iconButton.default"),
|
|
2476
2476
|
"aria-pressed": v ? h : void 0,
|
|
2477
|
-
className:
|
|
2477
|
+
className: q("mn-icon-button", p.className),
|
|
2478
2478
|
onClick: (e) => {
|
|
2479
2479
|
v && _(!h), o?.(e);
|
|
2480
2480
|
},
|
|
2481
2481
|
children: e ?? t
|
|
2482
2482
|
});
|
|
2483
|
-
return l ? /* @__PURE__ */
|
|
2483
|
+
return l ? /* @__PURE__ */ Y(xt, {
|
|
2484
2484
|
...c,
|
|
2485
2485
|
content: c?.content ?? n,
|
|
2486
2486
|
disabled: p.disabled || p.loading,
|
|
2487
2487
|
children: y
|
|
2488
2488
|
}) : y;
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2491
|
-
let { t: j } = s(), [
|
|
2490
|
+
function Br({ title: e, children: n, color: r = "info", variant: i = "subtle", size: a = "medium", icon: o, showIcon: c = !0, closable: l, closeIcon: u, onClose: d, action: f, collapsible: p, expanded: m, defaultExpanded: h = !0, onExpand: _, onExpandedChange: v, closeLabel: y, expandLabel: b, collapseLabel: x, iconLabel: S, role: C, animation: w = !0, animationName: T = "slideIn", banner: E, elevation: D, rounded: O = !0, borderRadius: k, ...A }) {
|
|
2491
|
+
let { t: j } = s(), [M, N] = W(!0), [P, F] = g(m, h, (e) => {
|
|
2492
2492
|
_?.(e), v?.(e);
|
|
2493
2493
|
});
|
|
2494
|
-
if (!
|
|
2495
|
-
let
|
|
2496
|
-
return /* @__PURE__ */
|
|
2494
|
+
if (!M) return null;
|
|
2495
|
+
let L = p && !!e;
|
|
2496
|
+
return /* @__PURE__ */ X(t, {
|
|
2497
2497
|
name: "alert",
|
|
2498
2498
|
role: C ?? (r === "danger" || r === "warning" ? "alert" : "status"),
|
|
2499
2499
|
...A,
|
|
2500
|
-
className:
|
|
2500
|
+
className: q(`mn-color-${r}`, `mn-variant-${i}`, `mn-size-${a}`, w && `mn-alert-${T}`, D && "mn-elevated", E && "mn-alert-banner", A.className),
|
|
2501
2501
|
style: {
|
|
2502
2502
|
borderRadius: k ?? (E ? 0 : O ? "var(--radius-lg)" : "var(--radius-sm)"),
|
|
2503
2503
|
...A.style
|
|
2504
2504
|
},
|
|
2505
2505
|
children: [
|
|
2506
|
-
c && /* @__PURE__ */
|
|
2506
|
+
c && /* @__PURE__ */ Y(G, {
|
|
2507
2507
|
className: "mn-alert-icon",
|
|
2508
2508
|
role: "img",
|
|
2509
2509
|
"aria-label": S ?? j(`alert.icon.${r}`),
|
|
@@ -2514,48 +2514,48 @@ function zr({ title: e, children: n, color: r = "info", variant: i = "subtle", s
|
|
|
2514
2514
|
danger: "!"
|
|
2515
2515
|
}[r] ?? "ⓘ"
|
|
2516
2516
|
}),
|
|
2517
|
-
/* @__PURE__ */
|
|
2517
|
+
/* @__PURE__ */ X(K, {
|
|
2518
2518
|
className: "mn-alert-content",
|
|
2519
2519
|
children: [
|
|
2520
|
-
e && /* @__PURE__ */
|
|
2520
|
+
e && /* @__PURE__ */ Y(G, {
|
|
2521
2521
|
className: "mn-alert-title",
|
|
2522
2522
|
children: e
|
|
2523
2523
|
}),
|
|
2524
|
-
(!
|
|
2524
|
+
(!L || P) && /* @__PURE__ */ Y(K, { children: n }),
|
|
2525
2525
|
f
|
|
2526
2526
|
]
|
|
2527
2527
|
}),
|
|
2528
|
-
|
|
2528
|
+
L && /* @__PURE__ */ Y(I, {
|
|
2529
2529
|
variant: "ghost",
|
|
2530
|
-
"aria-label":
|
|
2531
|
-
"aria-expanded":
|
|
2532
|
-
onClick: () =>
|
|
2533
|
-
children:
|
|
2530
|
+
"aria-label": P ? x ?? j("alert.collapse") : b ?? j("alert.expand"),
|
|
2531
|
+
"aria-expanded": P,
|
|
2532
|
+
onClick: () => F(!P),
|
|
2533
|
+
children: P ? "−" : "+"
|
|
2534
2534
|
}),
|
|
2535
|
-
l && /* @__PURE__ */
|
|
2535
|
+
l && /* @__PURE__ */ Y(I, {
|
|
2536
2536
|
variant: "ghost",
|
|
2537
2537
|
"aria-label": y ?? j("alert.close"),
|
|
2538
2538
|
onClick: (e) => {
|
|
2539
|
-
|
|
2539
|
+
N(!1), d?.(e);
|
|
2540
2540
|
},
|
|
2541
2541
|
children: u ?? "×"
|
|
2542
2542
|
})
|
|
2543
2543
|
]
|
|
2544
2544
|
});
|
|
2545
2545
|
}
|
|
2546
|
-
function
|
|
2547
|
-
return
|
|
2546
|
+
function Vr(e) {
|
|
2547
|
+
return re.toArray(e).map((e) => typeof e == "string" || typeof e == "number" ? String(e) : se(e) ? Vr(e.props.children) : "").join("");
|
|
2548
2548
|
}
|
|
2549
|
-
function
|
|
2550
|
-
let { t: S } = s(), C =
|
|
2551
|
-
|
|
2549
|
+
function Hr({ children: e, color: n = "neutral", variant: r = "subtle", size: i = "medium", shape: a = "rounded", closable: o, closeLabel: c, closeIcon: l, onClose: u, clickable: d, onClick: f, pressed: p, onPressedChange: m, disabled: h, icon: g, avatar: _, loading: v, elevation: y, ripple: b = !0, ...x }) {
|
|
2550
|
+
let { t: S } = s(), C = H().replace(/[^a-zA-Z0-9_-]/g, ""), w = x.id ?? `mn-tag-${C}`, T = U(!0), [E, D] = W([]), O = U(0), k = U(/* @__PURE__ */ new Set());
|
|
2551
|
+
V(() => {
|
|
2552
2552
|
T.current = !0;
|
|
2553
2553
|
let e = k.current;
|
|
2554
2554
|
return () => {
|
|
2555
2555
|
T.current = !1, e.forEach(clearTimeout), e.clear();
|
|
2556
2556
|
};
|
|
2557
2557
|
}, []);
|
|
2558
|
-
let A =
|
|
2558
|
+
let A = Vr(e), j = typeof c == "function" ? c(A) : c ?? (A ? S("tag.closeWithLabel", { label: A }) : S("tag.close")), M = (e) => {
|
|
2559
2559
|
if (!b) return;
|
|
2560
2560
|
let t = ++O.current, n = (e) => {
|
|
2561
2561
|
if (!T.current) return;
|
|
@@ -2567,7 +2567,7 @@ function Vr({ children: e, color: n = "neutral", variant: r = "subtle", size: i
|
|
|
2567
2567
|
D((e) => e.filter((e) => e.id !== t)), k.current.delete(n);
|
|
2568
2568
|
}, 600);
|
|
2569
2569
|
k.current.add(n);
|
|
2570
|
-
}, r = e, i = r.changedTouches?.[0], a = typeof r.detail == "object" ? r.detail : void 0, o = i?.clientX ?? a?.x ?? r.clientX, s = i?.clientY ?? a?.y ?? r.clientY, c =
|
|
2570
|
+
}, r = e, i = r.changedTouches?.[0], a = typeof r.detail == "object" ? r.detail : void 0, o = i?.clientX ?? a?.x ?? r.clientX, s = i?.clientY ?? a?.y ?? r.clientY, c = J.createSelectorQuery?.();
|
|
2571
2571
|
if (!c) {
|
|
2572
2572
|
n();
|
|
2573
2573
|
return;
|
|
@@ -2589,31 +2589,31 @@ function Vr({ children: e, color: n = "neutral", variant: r = "subtle", size: i
|
|
|
2589
2589
|
});
|
|
2590
2590
|
}).exec();
|
|
2591
2591
|
};
|
|
2592
|
-
return /* @__PURE__ */
|
|
2592
|
+
return /* @__PURE__ */ X(t, {
|
|
2593
2593
|
name: "tag",
|
|
2594
2594
|
...x,
|
|
2595
2595
|
id: w,
|
|
2596
2596
|
"aria-busy": v || void 0,
|
|
2597
|
-
className:
|
|
2597
|
+
className: q(`mn-color-${n}`, `mn-variant-${r}`, `mn-size-${i}`, y && "mn-elevated", p && "mn-selected", h && "mn-disabled", x.className),
|
|
2598
2598
|
style: {
|
|
2599
2599
|
borderRadius: a === "square" ? 0 : a === "circle" ? "9999px" : "var(--radius-md,8px)",
|
|
2600
2600
|
...x.style
|
|
2601
2601
|
},
|
|
2602
2602
|
children: [
|
|
2603
|
-
v ? /* @__PURE__ */ K
|
|
2603
|
+
v ? /* @__PURE__ */ Y(K, {
|
|
2604
2604
|
className: "mn-spinner",
|
|
2605
2605
|
"aria-hidden": !0
|
|
2606
|
-
}) : /* @__PURE__ */
|
|
2607
|
-
d ? /* @__PURE__ */
|
|
2606
|
+
}) : /* @__PURE__ */ X(Fe, { children: [_, g] }),
|
|
2607
|
+
d ? /* @__PURE__ */ Y(I, {
|
|
2608
2608
|
variant: "ghost",
|
|
2609
2609
|
disabled: h || v,
|
|
2610
2610
|
"aria-pressed": p,
|
|
2611
2611
|
onClick: (e) => {
|
|
2612
|
-
|
|
2612
|
+
M(e), f?.(e), p !== void 0 && m?.(!p);
|
|
2613
2613
|
},
|
|
2614
2614
|
children: e
|
|
2615
|
-
}) : /* @__PURE__ */
|
|
2616
|
-
o && !v && /* @__PURE__ */
|
|
2615
|
+
}) : /* @__PURE__ */ Y(G, { children: e }),
|
|
2616
|
+
o && !v && /* @__PURE__ */ Y(I, {
|
|
2617
2617
|
variant: "ghost",
|
|
2618
2618
|
disabled: h,
|
|
2619
2619
|
"aria-label": j,
|
|
@@ -2622,7 +2622,7 @@ function Vr({ children: e, color: n = "neutral", variant: r = "subtle", size: i
|
|
|
2622
2622
|
},
|
|
2623
2623
|
children: l ?? "×"
|
|
2624
2624
|
}),
|
|
2625
|
-
E.map(({ id: e, style: t }) => /* @__PURE__ */ K
|
|
2625
|
+
E.map(({ id: e, style: t }) => /* @__PURE__ */ Y(K, {
|
|
2626
2626
|
style: t,
|
|
2627
2627
|
"aria-hidden": !0,
|
|
2628
2628
|
className: "mn-tag-ripple"
|
|
@@ -2630,19 +2630,19 @@ function Vr({ children: e, color: n = "neutral", variant: r = "subtle", size: i
|
|
|
2630
2630
|
]
|
|
2631
2631
|
});
|
|
2632
2632
|
}
|
|
2633
|
-
function
|
|
2634
|
-
let d = e === "vertical", f = !d &&
|
|
2633
|
+
function Ur({ orientation: e = "horizontal", variant: n = "solid", children: r, thickness: i = 1, spacing: a = 16, length: o, textAlign: s = "center", elevation: c, flexItem: l, ...u }) {
|
|
2634
|
+
let d = e === "vertical", f = !d && re.count(r) > 0, p = {
|
|
2635
2635
|
borderStyle: n,
|
|
2636
2636
|
borderWidth: 0,
|
|
2637
2637
|
[d ? "borderLeftWidth" : "borderTopWidth"]: i,
|
|
2638
2638
|
borderColor: "var(--divider-color,var(--border-color,#d1d5db))"
|
|
2639
2639
|
};
|
|
2640
|
-
return /* @__PURE__ */
|
|
2640
|
+
return /* @__PURE__ */ Y(t, {
|
|
2641
2641
|
name: "divider",
|
|
2642
2642
|
role: "separator",
|
|
2643
2643
|
...u,
|
|
2644
2644
|
"aria-orientation": e,
|
|
2645
|
-
className:
|
|
2645
|
+
className: q(`mn-divider-${e}`, c && "mn-elevated", u.className),
|
|
2646
2646
|
style: {
|
|
2647
2647
|
...f ? {} : p,
|
|
2648
2648
|
width: d ? void 0 : o ?? "100%",
|
|
@@ -2656,8 +2656,8 @@ function Hr({ orientation: e = "horizontal", variant: n = "solid", children: r,
|
|
|
2656
2656
|
alignItems: f ? "center" : void 0,
|
|
2657
2657
|
...u.style
|
|
2658
2658
|
},
|
|
2659
|
-
children: f && /* @__PURE__ */
|
|
2660
|
-
/* @__PURE__ */ K
|
|
2659
|
+
children: f && /* @__PURE__ */ X(Fe, { children: [
|
|
2660
|
+
/* @__PURE__ */ Y(K, {
|
|
2661
2661
|
className: "mn-divider-line",
|
|
2662
2662
|
style: {
|
|
2663
2663
|
...p,
|
|
@@ -2665,11 +2665,11 @@ function Hr({ orientation: e = "horizontal", variant: n = "solid", children: r,
|
|
|
2665
2665
|
width: s === "left" ? 24 : void 0
|
|
2666
2666
|
}
|
|
2667
2667
|
}),
|
|
2668
|
-
/* @__PURE__ */
|
|
2668
|
+
/* @__PURE__ */ Y(G, {
|
|
2669
2669
|
className: "mn-divider-text",
|
|
2670
2670
|
children: r
|
|
2671
2671
|
}),
|
|
2672
|
-
/* @__PURE__ */ K
|
|
2672
|
+
/* @__PURE__ */ Y(K, {
|
|
2673
2673
|
className: "mn-divider-line",
|
|
2674
2674
|
style: {
|
|
2675
2675
|
...p,
|
|
@@ -2680,11 +2680,11 @@ function Hr({ orientation: e = "horizontal", variant: n = "solid", children: r,
|
|
|
2680
2680
|
] })
|
|
2681
2681
|
});
|
|
2682
2682
|
}
|
|
2683
|
-
function
|
|
2684
|
-
let { t: m } = s(), { colors: h } =
|
|
2683
|
+
function Wr({ title: e, description: n, icon: r, action: i, secondaryAction: a, size: o, useSvg: c = !1, width: l, height: u, showShadow: d, children: f, ...p }) {
|
|
2684
|
+
let { t: m } = s(), { colors: h } = ne(), g = H(), _ = H();
|
|
2685
2685
|
n === void 0 && (n = m("empty.description"));
|
|
2686
2686
|
let v = e != null && e !== !1 && e !== "", y = n != null && n !== !1 && n !== "";
|
|
2687
|
-
return /* @__PURE__ */
|
|
2687
|
+
return /* @__PURE__ */ X(t, {
|
|
2688
2688
|
name: "empty",
|
|
2689
2689
|
role: "status",
|
|
2690
2690
|
...p,
|
|
@@ -2696,77 +2696,77 @@ function Ur({ title: e, description: n, icon: r, action: i, secondaryAction: a,
|
|
|
2696
2696
|
boxShadow: d ? "var(--shadow-md)" : void 0,
|
|
2697
2697
|
...p.style
|
|
2698
2698
|
},
|
|
2699
|
-
className:
|
|
2699
|
+
className: q(o && `mn-size-${o}`, o && "mn-empty-sized", p.className),
|
|
2700
2700
|
children: [
|
|
2701
|
-
r !== null && r !== !1 && (r ? /* @__PURE__ */ K
|
|
2701
|
+
r !== null && r !== !1 && (r ? /* @__PURE__ */ Y(K, {
|
|
2702
2702
|
className: "mn-empty-icon",
|
|
2703
2703
|
children: r
|
|
2704
|
-
}) : c ? /* @__PURE__ */
|
|
2704
|
+
}) : c ? /* @__PURE__ */ Y(le, {
|
|
2705
2705
|
className: "mn-empty-illustration",
|
|
2706
2706
|
mode: "aspectFit",
|
|
2707
2707
|
src: `data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="64" height="41" viewBox="0 0 64 41"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse cx="32" cy="33" rx="32" ry="7" fill="${h["surface-muted-color"]}"/><g fill-rule="nonzero" stroke="${h["border-strong-color"]}"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"/><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="${h["surface-color"]}"/></g></g></svg>`)}`
|
|
2708
|
-
}) : /* @__PURE__ */
|
|
2708
|
+
}) : /* @__PURE__ */ Y(G, {
|
|
2709
2709
|
className: "mn-empty-icon",
|
|
2710
2710
|
children: "◇"
|
|
2711
2711
|
})),
|
|
2712
|
-
v && /* @__PURE__ */
|
|
2712
|
+
v && /* @__PURE__ */ Y(G, {
|
|
2713
2713
|
id: g,
|
|
2714
2714
|
className: "mn-empty-title",
|
|
2715
2715
|
children: e
|
|
2716
2716
|
}),
|
|
2717
|
-
y && /* @__PURE__ */
|
|
2717
|
+
y && /* @__PURE__ */ Y(G, {
|
|
2718
2718
|
id: _,
|
|
2719
2719
|
children: n
|
|
2720
2720
|
}),
|
|
2721
|
-
(i || a) && /* @__PURE__ */
|
|
2721
|
+
(i || a) && /* @__PURE__ */ X(K, {
|
|
2722
2722
|
className: "mn-empty-actions",
|
|
2723
2723
|
children: [i, a]
|
|
2724
2724
|
}),
|
|
2725
|
-
f && /* @__PURE__ */ K
|
|
2725
|
+
f && /* @__PURE__ */ Y(K, {
|
|
2726
2726
|
className: "mn-empty-footer",
|
|
2727
2727
|
children: f
|
|
2728
2728
|
})
|
|
2729
2729
|
]
|
|
2730
2730
|
});
|
|
2731
2731
|
}
|
|
2732
|
-
function
|
|
2732
|
+
function Gr({ loading: e = !0, children: n, width: r, height: i, variant: a = "text", animation: o = "pulse", borderRadius: c, lines: l = 1, avatar: u, avatarSize: d = 40, avatarShape: f = "circle", size: p, decorative: m, paragraph: h, title: g, active: _, ...v }) {
|
|
2733
2733
|
let { t: y } = s();
|
|
2734
|
-
if (!e) return /* @__PURE__ */
|
|
2735
|
-
let b = o === !0 ? "pulse" : o, x =
|
|
2734
|
+
if (!e) return /* @__PURE__ */ Y(Fe, { children: n });
|
|
2735
|
+
let b = o === !0 ? "pulse" : o, x = q("mn-skeleton-placeholder", `mn-skeleton-${a}`, b && b !== "false" && `mn-skeleton-${b}`), S = Number.isFinite(l) ? Math.max(0, Math.floor(l)) : 0, C = a === "circular" || a === "circle", w = {
|
|
2736
2736
|
width: C ? p ?? r ?? 32 : r,
|
|
2737
2737
|
height: C ? p ?? r ?? 32 : i,
|
|
2738
2738
|
borderRadius: c ?? (C ? "50%" : void 0)
|
|
2739
2739
|
};
|
|
2740
|
-
return m ? /* @__PURE__ */
|
|
2740
|
+
return m ? /* @__PURE__ */ Y(t, {
|
|
2741
2741
|
name: "skeleton",
|
|
2742
2742
|
...v,
|
|
2743
2743
|
"aria-hidden": !0,
|
|
2744
|
-
className:
|
|
2744
|
+
className: q(x, v.className),
|
|
2745
2745
|
style: {
|
|
2746
2746
|
...w,
|
|
2747
2747
|
...v.style
|
|
2748
2748
|
}
|
|
2749
|
-
}) : /* @__PURE__ */
|
|
2749
|
+
}) : /* @__PURE__ */ X(t, {
|
|
2750
2750
|
name: "skeleton",
|
|
2751
2751
|
...v,
|
|
2752
2752
|
role: "status",
|
|
2753
2753
|
"aria-busy": !0,
|
|
2754
2754
|
"aria-label": v["aria-label"] ?? y("common.loading"),
|
|
2755
|
-
className:
|
|
2756
|
-
children: [u && /* @__PURE__ */ K
|
|
2755
|
+
className: q("mn-skeleton-container", u && "mn-skeleton-with-avatar", a === "card" && "mn-skeleton-card", _ && "mn-skeleton-active", v.className),
|
|
2756
|
+
children: [u && /* @__PURE__ */ Y(K, {
|
|
2757
2757
|
"data-part": "avatar",
|
|
2758
|
-
className:
|
|
2758
|
+
className: q(x, "mn-skeleton-avatar"),
|
|
2759
2759
|
style: {
|
|
2760
2760
|
width: d,
|
|
2761
2761
|
height: d,
|
|
2762
2762
|
borderRadius: f === "circle" ? "50%" : 0
|
|
2763
2763
|
}
|
|
2764
|
-
}), /* @__PURE__ */
|
|
2764
|
+
}), /* @__PURE__ */ X(K, {
|
|
2765
2765
|
className: "mn-skeleton-content",
|
|
2766
2766
|
children: [
|
|
2767
|
-
g && /* @__PURE__ */ K
|
|
2767
|
+
g && /* @__PURE__ */ Y(K, {
|
|
2768
2768
|
"data-part": "title",
|
|
2769
|
-
className:
|
|
2769
|
+
className: q(x, "mn-skeleton-title")
|
|
2770
2770
|
}),
|
|
2771
2771
|
" ",
|
|
2772
2772
|
h ? [
|
|
@@ -2774,14 +2774,14 @@ function Wr({ loading: e = !0, children: n, width: r, height: i, variant: a = "t
|
|
|
2774
2774
|
"100%",
|
|
2775
2775
|
"92%",
|
|
2776
2776
|
"60%"
|
|
2777
|
-
].map((e, t) => /* @__PURE__ */ K
|
|
2777
|
+
].map((e, t) => /* @__PURE__ */ Y(K, {
|
|
2778
2778
|
"data-part": "line",
|
|
2779
2779
|
className: x,
|
|
2780
2780
|
style: {
|
|
2781
2781
|
width: e,
|
|
2782
2782
|
height: 16
|
|
2783
2783
|
}
|
|
2784
|
-
}, t)) : !g && a !== "card" && Array.from({ length: S }, (e, t) => /* @__PURE__ */ K
|
|
2784
|
+
}, t)) : !g && a !== "card" && Array.from({ length: S }, (e, t) => /* @__PURE__ */ Y(K, {
|
|
2785
2785
|
"data-part": "line",
|
|
2786
2786
|
className: x,
|
|
2787
2787
|
style: {
|
|
@@ -2793,19 +2793,19 @@ function Wr({ loading: e = !0, children: n, width: r, height: i, variant: a = "t
|
|
|
2793
2793
|
})]
|
|
2794
2794
|
});
|
|
2795
2795
|
}
|
|
2796
|
-
function
|
|
2796
|
+
function Kr({ lines: e = 3, lineHeight: n = "1em", gap: r = 2, shrinkLast: i = !0, animation: a = "pulse", ...o }) {
|
|
2797
2797
|
let s = Number.isFinite(e) ? Math.max(0, Math.floor(e)) : 0;
|
|
2798
|
-
return /* @__PURE__ */
|
|
2798
|
+
return /* @__PURE__ */ Y(t, {
|
|
2799
2799
|
name: "skeleton-text",
|
|
2800
2800
|
...o,
|
|
2801
2801
|
"aria-hidden": !0,
|
|
2802
2802
|
style: {
|
|
2803
2803
|
display: "flex",
|
|
2804
2804
|
flexDirection: "column",
|
|
2805
|
-
gap:
|
|
2805
|
+
gap: ri(r),
|
|
2806
2806
|
...o.style
|
|
2807
2807
|
},
|
|
2808
|
-
children: Array.from({ length: s }, (e, t) => /* @__PURE__ */
|
|
2808
|
+
children: Array.from({ length: s }, (e, t) => /* @__PURE__ */ Y(Gr, {
|
|
2809
2809
|
decorative: !0,
|
|
2810
2810
|
animation: a,
|
|
2811
2811
|
height: n,
|
|
@@ -2813,7 +2813,7 @@ function Gr({ lines: e = 3, lineHeight: n = "1em", gap: r = 2, shrinkLast: i = !
|
|
|
2813
2813
|
}, t))
|
|
2814
2814
|
});
|
|
2815
2815
|
}
|
|
2816
|
-
function
|
|
2816
|
+
function qr({ label: e, variant: n = "spinner", size: r = "medium", color: i = "primary", decorative: a, icon: o, full: c, width: l, ...u }) {
|
|
2817
2817
|
let { t: d } = s(), f = {
|
|
2818
2818
|
xsmall: 12,
|
|
2819
2819
|
small: 16,
|
|
@@ -2821,111 +2821,111 @@ function Kr({ label: e, variant: n = "spinner", size: r = "medium", color: i = "
|
|
|
2821
2821
|
large: 32,
|
|
2822
2822
|
xlarge: 48
|
|
2823
2823
|
}[r];
|
|
2824
|
-
return /* @__PURE__ */
|
|
2824
|
+
return /* @__PURE__ */ X(t, {
|
|
2825
2825
|
name: "progress-indicator",
|
|
2826
2826
|
role: a ? void 0 : "progressbar",
|
|
2827
2827
|
...u,
|
|
2828
2828
|
"aria-hidden": a || void 0,
|
|
2829
2829
|
"aria-label": u["aria-label"] ?? (typeof e == "string" ? e : d("common.loading")),
|
|
2830
|
-
className:
|
|
2830
|
+
className: q(`mn-progress-${n}`, `mn-color-${i}`, `mn-size-${r}`, u.className),
|
|
2831
2831
|
style: {
|
|
2832
2832
|
width: c ? "100%" : l ?? (n === "bar" || n === "dottedBar" ? 200 : void 0),
|
|
2833
2833
|
...u.style
|
|
2834
2834
|
},
|
|
2835
2835
|
children: [
|
|
2836
2836
|
o,
|
|
2837
|
-
n === "bar" ? /* @__PURE__ */ K
|
|
2837
|
+
n === "bar" ? /* @__PURE__ */ Y(K, {
|
|
2838
2838
|
className: "mn-progress-bar-track",
|
|
2839
|
-
children: /* @__PURE__ */ K
|
|
2840
|
-
}) : n === "wave" || n === "dottedBar" ? /* @__PURE__ */ K
|
|
2839
|
+
children: /* @__PURE__ */ Y(K, { className: "mn-progress-bar-fill" })
|
|
2840
|
+
}) : n === "wave" || n === "dottedBar" ? /* @__PURE__ */ Y(K, {
|
|
2841
2841
|
className: "mn-progress-sequence",
|
|
2842
|
-
children: Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ K
|
|
2842
|
+
children: Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ Y(K, {
|
|
2843
2843
|
className: n === "wave" ? "mn-progress-wave-bar" : "mn-progress-dot",
|
|
2844
2844
|
style: {
|
|
2845
2845
|
animationDelay: `${t * .1}s`,
|
|
2846
2846
|
height: n === "wave" ? f : Math.max(4, f / 4)
|
|
2847
2847
|
}
|
|
2848
2848
|
}, t))
|
|
2849
|
-
}) : /* @__PURE__ */ K
|
|
2850
|
-
className:
|
|
2849
|
+
}) : /* @__PURE__ */ Y(K, {
|
|
2850
|
+
className: q("mn-spinner", n === "circle" && "mn-progress-circle"),
|
|
2851
2851
|
style: {
|
|
2852
2852
|
width: f,
|
|
2853
2853
|
height: f
|
|
2854
2854
|
}
|
|
2855
2855
|
}),
|
|
2856
|
-
e && /* @__PURE__ */
|
|
2856
|
+
e && /* @__PURE__ */ Y(G, { children: e })
|
|
2857
2857
|
]
|
|
2858
2858
|
});
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2860
|
+
function Jr({ label: e, size: n, ...r }) {
|
|
2861
2861
|
let { t: i } = s();
|
|
2862
|
-
return e ??= i("loadingState.label"), /* @__PURE__ */
|
|
2862
|
+
return e ??= i("loadingState.label"), /* @__PURE__ */ Y(t, {
|
|
2863
2863
|
name: "loading-state",
|
|
2864
2864
|
...r,
|
|
2865
|
-
children: /* @__PURE__ */
|
|
2865
|
+
children: /* @__PURE__ */ Y(qr, {
|
|
2866
2866
|
label: e,
|
|
2867
2867
|
size: n
|
|
2868
2868
|
})
|
|
2869
2869
|
});
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2872
|
-
return !e || !
|
|
2871
|
+
function Yr({ href: e, children: t, variant: n = "primary", ...r }) {
|
|
2872
|
+
return !e || !Se(e) ? /* @__PURE__ */ Y(G, {
|
|
2873
2873
|
className: "mn-text-link",
|
|
2874
2874
|
onClick: r.onClick,
|
|
2875
2875
|
children: t
|
|
2876
|
-
}) : /* @__PURE__ */
|
|
2876
|
+
}) : /* @__PURE__ */ Y(ue, {
|
|
2877
2877
|
url: e,
|
|
2878
2878
|
"aria-label": r["aria-label"],
|
|
2879
|
-
className:
|
|
2879
|
+
className: q("mn-text-link", `mn-color-${n}`, r.className),
|
|
2880
2880
|
children: t
|
|
2881
2881
|
});
|
|
2882
2882
|
}
|
|
2883
|
-
function
|
|
2884
|
-
return /* @__PURE__ */
|
|
2883
|
+
function Xr({ items: e, bordered: n, striped: r, children: i, ...a }) {
|
|
2884
|
+
return /* @__PURE__ */ X(t, {
|
|
2885
2885
|
name: "description-list",
|
|
2886
2886
|
...a,
|
|
2887
|
-
className:
|
|
2888
|
-
children: [e?.map((e, t) => /* @__PURE__ */
|
|
2887
|
+
className: q(n && "mn-bordered", r && "mn-striped", a.className),
|
|
2888
|
+
children: [e?.map((e, t) => /* @__PURE__ */ Y(Zr, {
|
|
2889
2889
|
label: e.label,
|
|
2890
2890
|
children: e.value
|
|
2891
2891
|
}, t)), i]
|
|
2892
2892
|
});
|
|
2893
2893
|
}
|
|
2894
|
-
function
|
|
2895
|
-
return /* @__PURE__ */
|
|
2894
|
+
function Zr({ label: e, children: n, ...r }) {
|
|
2895
|
+
return /* @__PURE__ */ X(t, {
|
|
2896
2896
|
name: "description-list",
|
|
2897
2897
|
part: "item",
|
|
2898
2898
|
...r,
|
|
2899
|
-
children: [/* @__PURE__ */
|
|
2899
|
+
children: [/* @__PURE__ */ Y(G, {
|
|
2900
2900
|
className: "mn-description-label",
|
|
2901
2901
|
children: e
|
|
2902
|
-
}), /* @__PURE__ */ K
|
|
2902
|
+
}), /* @__PURE__ */ Y(K, {
|
|
2903
2903
|
className: "mn-description-value",
|
|
2904
2904
|
children: n
|
|
2905
2905
|
})]
|
|
2906
2906
|
});
|
|
2907
2907
|
}
|
|
2908
|
-
function
|
|
2909
|
-
return /* @__PURE__ */
|
|
2908
|
+
function Qr({ density: e = "medium", bordered: n, dividers: r = !0, ...i }) {
|
|
2909
|
+
return /* @__PURE__ */ Y(t, {
|
|
2910
2910
|
name: "list",
|
|
2911
2911
|
role: "list",
|
|
2912
2912
|
...i,
|
|
2913
|
-
className:
|
|
2913
|
+
className: q(`mn-density-${e}`, n && "mn-bordered", r && "mn-dividers", i.className)
|
|
2914
2914
|
});
|
|
2915
2915
|
}
|
|
2916
|
-
function
|
|
2917
|
-
return /* @__PURE__ */
|
|
2916
|
+
function $r({ primary: e, secondary: n, icon: r, actions: i, children: a, ...o }) {
|
|
2917
|
+
return /* @__PURE__ */ X(t, {
|
|
2918
2918
|
name: "list",
|
|
2919
2919
|
part: "item",
|
|
2920
2920
|
role: "listitem",
|
|
2921
2921
|
...o,
|
|
2922
2922
|
children: [
|
|
2923
2923
|
r,
|
|
2924
|
-
/* @__PURE__ */
|
|
2924
|
+
/* @__PURE__ */ X(K, {
|
|
2925
2925
|
className: "mn-list-content",
|
|
2926
2926
|
children: [
|
|
2927
|
-
/* @__PURE__ */
|
|
2928
|
-
n && /* @__PURE__ */
|
|
2927
|
+
/* @__PURE__ */ Y(G, { children: e }),
|
|
2928
|
+
n && /* @__PURE__ */ Y(G, {
|
|
2929
2929
|
className: "mn-muted",
|
|
2930
2930
|
children: n
|
|
2931
2931
|
}),
|
|
@@ -2936,21 +2936,21 @@ function Qr({ primary: e, secondary: n, icon: r, actions: i, children: a, ...o }
|
|
|
2936
2936
|
]
|
|
2937
2937
|
});
|
|
2938
2938
|
}
|
|
2939
|
-
function
|
|
2940
|
-
let { t: c } = s(), [l, u] =
|
|
2941
|
-
return /* @__PURE__ */
|
|
2939
|
+
function ei({ code: e = "", language: n, copyable: r = !0, wrap: i = !0, maxHeight: a, ...o }) {
|
|
2940
|
+
let { t: c } = s(), [l, u] = W(!1);
|
|
2941
|
+
return /* @__PURE__ */ X(t, {
|
|
2942
2942
|
name: "code-block",
|
|
2943
2943
|
...o,
|
|
2944
|
-
children: [/* @__PURE__ */
|
|
2944
|
+
children: [/* @__PURE__ */ X(K, {
|
|
2945
2945
|
className: "mn-code-toolbar",
|
|
2946
|
-
children: [/* @__PURE__ */
|
|
2946
|
+
children: [/* @__PURE__ */ Y(G, { children: n }), r && /* @__PURE__ */ Y(I, {
|
|
2947
2947
|
variant: "ghost",
|
|
2948
2948
|
onClick: async () => {
|
|
2949
|
-
await
|
|
2949
|
+
await J.setClipboardData({ data: e }), u(!0);
|
|
2950
2950
|
},
|
|
2951
2951
|
children: c(l ? "codeBlock.copied" : "codeBlock.copy")
|
|
2952
2952
|
})]
|
|
2953
|
-
}), /* @__PURE__ */
|
|
2953
|
+
}), /* @__PURE__ */ Y(G, {
|
|
2954
2954
|
selectable: !0,
|
|
2955
2955
|
className: "mn-code",
|
|
2956
2956
|
style: {
|
|
@@ -2961,66 +2961,66 @@ function $r({ code: e = "", language: n, copyable: r = !0, wrap: i = !0, maxHeig
|
|
|
2961
2961
|
})]
|
|
2962
2962
|
});
|
|
2963
2963
|
}
|
|
2964
|
-
function
|
|
2965
|
-
return /* @__PURE__ */
|
|
2964
|
+
function ti(e) {
|
|
2965
|
+
return /* @__PURE__ */ Y(t, {
|
|
2966
2966
|
name: "prose",
|
|
2967
2967
|
...e
|
|
2968
2968
|
});
|
|
2969
2969
|
}
|
|
2970
|
-
function
|
|
2971
|
-
return typeof document < "u" &&
|
|
2970
|
+
function ni({ html: e, title: n, viewport: r = "desktop", height: i = 600, mobileWidth: a = 375, ...o }) {
|
|
2971
|
+
return typeof document < "u" && J.getEnv() === J.ENV_TYPE.WEB ? /* @__PURE__ */ Y(t, {
|
|
2972
2972
|
name: "html-preview",
|
|
2973
2973
|
...o,
|
|
2974
|
-
children: /* @__PURE__ */
|
|
2974
|
+
children: /* @__PURE__ */ Y("iframe", {
|
|
2975
2975
|
title: n ?? "HTML preview",
|
|
2976
2976
|
sandbox: "",
|
|
2977
2977
|
referrerPolicy: "no-referrer",
|
|
2978
|
-
srcDoc:
|
|
2978
|
+
srcDoc: Dr(e),
|
|
2979
2979
|
style: {
|
|
2980
2980
|
width: r === "mobile" ? a : "100%",
|
|
2981
2981
|
height: i,
|
|
2982
2982
|
border: 0
|
|
2983
2983
|
}
|
|
2984
2984
|
})
|
|
2985
|
-
}) : /* @__PURE__ */
|
|
2985
|
+
}) : /* @__PURE__ */ X(t, {
|
|
2986
2986
|
name: "html-preview",
|
|
2987
2987
|
...o,
|
|
2988
|
-
children: [/* @__PURE__ */
|
|
2988
|
+
children: [/* @__PURE__ */ X(G, {
|
|
2989
2989
|
className: "mn-muted",
|
|
2990
2990
|
children: [n ? `${n} — ` : "", "HTML source preview (native platforms do not execute HTML)"]
|
|
2991
|
-
}), /* @__PURE__ */
|
|
2991
|
+
}), /* @__PURE__ */ Y(ei, {
|
|
2992
2992
|
code: e,
|
|
2993
2993
|
language: "html",
|
|
2994
2994
|
copyable: !1
|
|
2995
2995
|
})]
|
|
2996
2996
|
});
|
|
2997
2997
|
}
|
|
2998
|
-
function
|
|
2998
|
+
function ri(e) {
|
|
2999
2999
|
if (e === void 0) return;
|
|
3000
3000
|
let t = String(e).trim();
|
|
3001
3001
|
return /^\d+(\.\d+)?$/.test(t) ? `var(--space-${t.replace(".", "-")}, ${Number(t) * 4}px)` : t;
|
|
3002
3002
|
}
|
|
3003
|
-
function
|
|
3004
|
-
return /* @__PURE__ */
|
|
3003
|
+
function ii({ p: e, px: n, py: r, pt: i, pr: a, pb: o, pl: s, m: c, mx: l, my: u, mt: d, mr: f, mb: p, ml: m, w: h, h: g, minW: _, minH: v, maxW: y, maxH: b, bg: x, rounded: S, border: C, boxShadow: w, ...T }) {
|
|
3004
|
+
return /* @__PURE__ */ Y(t, {
|
|
3005
3005
|
name: "box",
|
|
3006
3006
|
...T,
|
|
3007
3007
|
style: {
|
|
3008
|
-
padding:
|
|
3009
|
-
paddingLeft:
|
|
3010
|
-
paddingRight:
|
|
3011
|
-
paddingTop:
|
|
3012
|
-
paddingBottom:
|
|
3013
|
-
margin:
|
|
3014
|
-
marginLeft:
|
|
3015
|
-
marginRight:
|
|
3016
|
-
marginTop:
|
|
3017
|
-
marginBottom:
|
|
3018
|
-
width: h === void 0 ? void 0 :
|
|
3019
|
-
height: g === void 0 ? void 0 :
|
|
3020
|
-
minWidth: _ === void 0 ? void 0 :
|
|
3021
|
-
minHeight: v === void 0 ? void 0 :
|
|
3022
|
-
maxWidth: y === void 0 ? void 0 :
|
|
3023
|
-
maxHeight: b === void 0 ? void 0 :
|
|
3008
|
+
padding: ri(e),
|
|
3009
|
+
paddingLeft: ri(s ?? n ?? e),
|
|
3010
|
+
paddingRight: ri(a ?? n ?? e),
|
|
3011
|
+
paddingTop: ri(i ?? r ?? e),
|
|
3012
|
+
paddingBottom: ri(o ?? r ?? e),
|
|
3013
|
+
margin: ri(c),
|
|
3014
|
+
marginLeft: ri(m ?? l ?? c),
|
|
3015
|
+
marginRight: ri(f ?? l ?? c),
|
|
3016
|
+
marginTop: ri(d ?? u ?? c),
|
|
3017
|
+
marginBottom: ri(p ?? u ?? c),
|
|
3018
|
+
width: h === void 0 ? void 0 : Ae(h),
|
|
3019
|
+
height: g === void 0 ? void 0 : Ae(g),
|
|
3020
|
+
minWidth: _ === void 0 ? void 0 : Ae(_),
|
|
3021
|
+
minHeight: v === void 0 ? void 0 : Ae(v),
|
|
3022
|
+
maxWidth: y === void 0 ? void 0 : Ae(y),
|
|
3023
|
+
maxHeight: b === void 0 ? void 0 : Ae(b),
|
|
3024
3024
|
background: x ? {
|
|
3025
3025
|
bg: "var(--surface-color)",
|
|
3026
3026
|
"bg.subtle": "var(--surface-subtle-color)",
|
|
@@ -3049,57 +3049,57 @@ function ri({ p: e, px: n, py: r, pt: i, pr: a, pb: o, pl: s, m: c, mx: l, my: u
|
|
|
3049
3049
|
}
|
|
3050
3050
|
});
|
|
3051
3051
|
}
|
|
3052
|
-
function
|
|
3053
|
-
let d =
|
|
3054
|
-
return /* @__PURE__ */
|
|
3052
|
+
function ai({ direction: e = "column", gap: n, align: r, justify: i, wrap: a, separator: o, attached: s, children: c, role: l, ...u }) {
|
|
3053
|
+
let d = re.toArray(c);
|
|
3054
|
+
return /* @__PURE__ */ Y(t, {
|
|
3055
3055
|
name: "stack",
|
|
3056
3056
|
role: l ?? (s ? "group" : void 0),
|
|
3057
3057
|
...u,
|
|
3058
|
-
className:
|
|
3058
|
+
className: q(s && "mn-stack-attached", `mn-stack-${e}`, u.className),
|
|
3059
3059
|
style: {
|
|
3060
3060
|
display: "flex",
|
|
3061
3061
|
flexDirection: e,
|
|
3062
|
-
gap: s ? 0 :
|
|
3062
|
+
gap: s ? 0 : ri(n),
|
|
3063
3063
|
alignItems: r === "start" ? "flex-start" : r === "end" ? "flex-end" : r,
|
|
3064
3064
|
justifyContent: i === "between" ? "space-between" : i === "around" ? "space-around" : i === "evenly" ? "space-evenly" : i === "start" ? "flex-start" : i === "end" ? "flex-end" : i,
|
|
3065
3065
|
flexWrap: a ? "wrap" : "nowrap",
|
|
3066
3066
|
...u.style
|
|
3067
3067
|
},
|
|
3068
|
-
children: d.map((e, t) => /* @__PURE__ */
|
|
3068
|
+
children: d.map((e, t) => /* @__PURE__ */ X(ie, { children: [t > 0 && !s && o, s && se(e) ? ae(e, { className: q(e.props.className, "mn-stack-attached-item", t > 0 && "mn-stack-has-before", t < d.length - 1 && "mn-stack-has-after") }) : e] }, se(e) ? e.key ?? t : t))
|
|
3069
3069
|
});
|
|
3070
3070
|
}
|
|
3071
|
-
function
|
|
3072
|
-
return /* @__PURE__ */
|
|
3071
|
+
function oi(e) {
|
|
3072
|
+
return /* @__PURE__ */ Y(ai, {
|
|
3073
3073
|
...e,
|
|
3074
3074
|
direction: "row"
|
|
3075
3075
|
});
|
|
3076
3076
|
}
|
|
3077
|
-
function
|
|
3078
|
-
return /* @__PURE__ */
|
|
3077
|
+
function si(e) {
|
|
3078
|
+
return /* @__PURE__ */ Y(ai, {
|
|
3079
3079
|
...e,
|
|
3080
3080
|
direction: "column"
|
|
3081
3081
|
});
|
|
3082
3082
|
}
|
|
3083
|
-
function
|
|
3083
|
+
function ci({ columns: e = 1, gap: n = 4, rowGap: r, columnGap: i, ...a }) {
|
|
3084
3084
|
let [s, c] = o(a.id);
|
|
3085
3085
|
if ((typeof e == "number" ? [e] : Object.values(e)).some((e) => e !== void 0 && (!Number.isInteger(e) || e < 1 || e > 12))) throw RangeError("Grid columns must be integers from 1 to 12");
|
|
3086
3086
|
let l = typeof e == "number" ? e : e.base ?? 1;
|
|
3087
|
-
return typeof e != "number" && (c >= 480 && (l = e.sm ?? l), c >= 768 && (l = e.md ?? l), c >= 1200 && (l = e.lg ?? l), c >= 1536 && (l = e.xl ?? l)), /* @__PURE__ */
|
|
3087
|
+
return typeof e != "number" && (c >= 480 && (l = e.sm ?? l), c >= 768 && (l = e.md ?? l), c >= 1200 && (l = e.lg ?? l), c >= 1536 && (l = e.xl ?? l)), /* @__PURE__ */ Y(t, {
|
|
3088
3088
|
name: "responsive-grid",
|
|
3089
3089
|
...a,
|
|
3090
3090
|
id: s,
|
|
3091
3091
|
style: {
|
|
3092
3092
|
display: "grid",
|
|
3093
3093
|
gridTemplateColumns: `repeat(${l}, minmax(0, 1fr))`,
|
|
3094
|
-
gap:
|
|
3095
|
-
rowGap:
|
|
3096
|
-
columnGap:
|
|
3094
|
+
gap: ri(n),
|
|
3095
|
+
rowGap: ri(r ?? n),
|
|
3096
|
+
columnGap: ri(i ?? n),
|
|
3097
3097
|
...a.style
|
|
3098
3098
|
}
|
|
3099
3099
|
});
|
|
3100
3100
|
}
|
|
3101
|
-
function
|
|
3102
|
-
return /* @__PURE__ */
|
|
3101
|
+
function li({ fullWidth: e, ...n }) {
|
|
3102
|
+
return /* @__PURE__ */ Y(t, {
|
|
3103
3103
|
name: "grid-item",
|
|
3104
3104
|
...n,
|
|
3105
3105
|
style: {
|
|
@@ -3108,38 +3108,38 @@ function ci({ fullWidth: e, ...n }) {
|
|
|
3108
3108
|
}
|
|
3109
3109
|
});
|
|
3110
3110
|
}
|
|
3111
|
-
function
|
|
3112
|
-
return /* @__PURE__ */
|
|
3111
|
+
function ui(e) {
|
|
3112
|
+
return /* @__PURE__ */ Y(ci, {
|
|
3113
3113
|
...e,
|
|
3114
|
-
className:
|
|
3114
|
+
className: q("mn-form-layout", e.className)
|
|
3115
3115
|
});
|
|
3116
3116
|
}
|
|
3117
|
-
function
|
|
3117
|
+
function di({ aside: e, asideWidth: n = 320, gap: r = 6, collapseBelow: i = "md", children: a, ...s }) {
|
|
3118
3118
|
let [c, l] = o(s.id);
|
|
3119
3119
|
if (!Number.isFinite(n) || n <= 0) throw RangeError("asideWidth must be finite and positive");
|
|
3120
3120
|
let u = l < (i === "lg" ? 1200 : 768), d = e != null && e !== !1;
|
|
3121
|
-
return /* @__PURE__ */
|
|
3121
|
+
return /* @__PURE__ */ X(t, {
|
|
3122
3122
|
name: "split-layout",
|
|
3123
3123
|
...s,
|
|
3124
3124
|
id: c,
|
|
3125
3125
|
style: {
|
|
3126
|
-
gap:
|
|
3126
|
+
gap: ri(r),
|
|
3127
3127
|
flexDirection: u ? "column" : "row",
|
|
3128
3128
|
...s.style
|
|
3129
3129
|
},
|
|
3130
|
-
children: [/* @__PURE__ */ K
|
|
3130
|
+
children: [/* @__PURE__ */ Y(K, {
|
|
3131
3131
|
className: "mn-split-main",
|
|
3132
3132
|
style: { width: u ? "100%" : void 0 },
|
|
3133
3133
|
children: a
|
|
3134
|
-
}), d && /* @__PURE__ */ K
|
|
3134
|
+
}), d && /* @__PURE__ */ Y(K, {
|
|
3135
3135
|
className: "mn-split-aside",
|
|
3136
3136
|
style: { width: u ? "100%" : Math.min(n, l / 2) },
|
|
3137
3137
|
children: e
|
|
3138
3138
|
})]
|
|
3139
3139
|
});
|
|
3140
3140
|
}
|
|
3141
|
-
function
|
|
3142
|
-
return /* @__PURE__ */
|
|
3141
|
+
function fi({ maxWidth: e = 1200, ...n }) {
|
|
3142
|
+
return /* @__PURE__ */ Y(t, {
|
|
3143
3143
|
name: "page",
|
|
3144
3144
|
...n,
|
|
3145
3145
|
style: {
|
|
@@ -3148,17 +3148,17 @@ function di({ maxWidth: e = 1200, ...n }) {
|
|
|
3148
3148
|
}
|
|
3149
3149
|
});
|
|
3150
3150
|
}
|
|
3151
|
-
function
|
|
3152
|
-
return /* @__PURE__ */
|
|
3151
|
+
function pi({ title: e, description: n, actions: r, children: i, ...a }) {
|
|
3152
|
+
return /* @__PURE__ */ X(t, {
|
|
3153
3153
|
name: "page",
|
|
3154
3154
|
part: "header",
|
|
3155
3155
|
...a,
|
|
3156
|
-
children: [/* @__PURE__ */
|
|
3157
|
-
/* @__PURE__ */
|
|
3156
|
+
children: [/* @__PURE__ */ X(K, { children: [
|
|
3157
|
+
/* @__PURE__ */ Y(G, {
|
|
3158
3158
|
className: "mn-page-title",
|
|
3159
3159
|
children: e
|
|
3160
3160
|
}),
|
|
3161
|
-
n && /* @__PURE__ */
|
|
3161
|
+
n && /* @__PURE__ */ Y(G, {
|
|
3162
3162
|
className: "mn-muted",
|
|
3163
3163
|
children: n
|
|
3164
3164
|
}),
|
|
@@ -3166,21 +3166,21 @@ function fi({ title: e, description: n, actions: r, children: i, ...a }) {
|
|
|
3166
3166
|
] }), r]
|
|
3167
3167
|
});
|
|
3168
3168
|
}
|
|
3169
|
-
function
|
|
3170
|
-
return /* @__PURE__ */
|
|
3169
|
+
function mi({ title: e, description: n, actions: r, icon: i, children: a, ...o }) {
|
|
3170
|
+
return /* @__PURE__ */ X(t, {
|
|
3171
3171
|
name: "page",
|
|
3172
3172
|
part: "section",
|
|
3173
3173
|
...o,
|
|
3174
3174
|
children: [
|
|
3175
|
-
/* @__PURE__ */
|
|
3175
|
+
/* @__PURE__ */ X(K, {
|
|
3176
3176
|
className: "mn-page-section-heading",
|
|
3177
3177
|
children: [
|
|
3178
3178
|
i,
|
|
3179
|
-
/* @__PURE__ */
|
|
3179
|
+
/* @__PURE__ */ Y(G, { children: e }),
|
|
3180
3180
|
r
|
|
3181
3181
|
]
|
|
3182
3182
|
}),
|
|
3183
|
-
n && /* @__PURE__ */
|
|
3183
|
+
n && /* @__PURE__ */ Y(G, {
|
|
3184
3184
|
className: "mn-muted",
|
|
3185
3185
|
children: n
|
|
3186
3186
|
}),
|
|
@@ -3188,21 +3188,21 @@ function pi({ title: e, description: n, actions: r, icon: i, children: a, ...o }
|
|
|
3188
3188
|
]
|
|
3189
3189
|
});
|
|
3190
3190
|
}
|
|
3191
|
-
function
|
|
3192
|
-
return /* @__PURE__ */
|
|
3191
|
+
function hi({ wrap: e = !0, density: n = "medium", ...r }) {
|
|
3192
|
+
return /* @__PURE__ */ Y(t, {
|
|
3193
3193
|
name: "toolbar",
|
|
3194
3194
|
role: "toolbar",
|
|
3195
3195
|
...r,
|
|
3196
|
-
className:
|
|
3196
|
+
className: q(`mn-density-${n}`, r.className),
|
|
3197
3197
|
style: {
|
|
3198
3198
|
flexWrap: e ? "wrap" : "nowrap",
|
|
3199
3199
|
...r.style
|
|
3200
3200
|
}
|
|
3201
3201
|
});
|
|
3202
3202
|
}
|
|
3203
|
-
function
|
|
3204
|
-
let { t: _ } = s(), [v, y] = o(h.id), b = y <= 768, [x, S] = g(d, f, p), [C, w] =
|
|
3205
|
-
|
|
3203
|
+
function gi({ brand: e, brandIcon: n, navigation: r, navigationLabel: i, navigationKey: a, headerActions: c, pageNavigation: l, children: u, sidebarMode: d, defaultSidebarMode: f = "expanded", onSidebarModeChange: p, labels: m, ...h }) {
|
|
3204
|
+
let { t: _ } = s(), [v, y] = o(h.id), b = y <= 768, [x, S] = g(d, f, p), [C, w] = W(!1), [T, E] = W(!1);
|
|
3205
|
+
V(() => {
|
|
3206
3206
|
w(!1), E(!1);
|
|
3207
3207
|
}, [a, b]);
|
|
3208
3208
|
let D = !b && x !== "expanded" && !(x === "floating" && T), O = typeof r == "function" ? r({
|
|
@@ -3215,16 +3215,16 @@ function hi({ brand: e, brandIcon: n, navigation: r, navigationLabel: i, navigat
|
|
|
3215
3215
|
}) : r, k = (e) => m?.[e] ?? _(`appShell.${e}`), A = () => {
|
|
3216
3216
|
b ? w(!0) : x === "floating" ? E(!T) : S(x === "expanded" ? "compact" : "expanded");
|
|
3217
3217
|
};
|
|
3218
|
-
return /* @__PURE__ */
|
|
3218
|
+
return /* @__PURE__ */ X(t, {
|
|
3219
3219
|
name: "app-shell",
|
|
3220
3220
|
...h,
|
|
3221
3221
|
id: v,
|
|
3222
|
-
className:
|
|
3222
|
+
className: q(`mn-sidebar-${x}`, h.className),
|
|
3223
3223
|
children: [
|
|
3224
|
-
/* @__PURE__ */
|
|
3224
|
+
/* @__PURE__ */ X(K, {
|
|
3225
3225
|
className: "mn-app-header",
|
|
3226
3226
|
children: [
|
|
3227
|
-
/* @__PURE__ */
|
|
3227
|
+
/* @__PURE__ */ Y(I, {
|
|
3228
3228
|
variant: "ghost",
|
|
3229
3229
|
"aria-label": k(b ? "openNavigation" : D ? "expand" : "collapse"),
|
|
3230
3230
|
onClick: A,
|
|
@@ -3233,7 +3233,7 @@ function hi({ brand: e, brandIcon: n, navigation: r, navigationLabel: i, navigat
|
|
|
3233
3233
|
n,
|
|
3234
3234
|
e,
|
|
3235
3235
|
c,
|
|
3236
|
-
!b && /* @__PURE__ */
|
|
3236
|
+
!b && /* @__PURE__ */ Y(I, {
|
|
3237
3237
|
variant: "ghost",
|
|
3238
3238
|
"aria-label": k(x === "floating" ? "disableFloating" : "enableFloating"),
|
|
3239
3239
|
"aria-pressed": x === "floating",
|
|
@@ -3244,26 +3244,26 @@ function hi({ brand: e, brandIcon: n, navigation: r, navigationLabel: i, navigat
|
|
|
3244
3244
|
})
|
|
3245
3245
|
]
|
|
3246
3246
|
}),
|
|
3247
|
-
/* @__PURE__ */
|
|
3247
|
+
/* @__PURE__ */ X(K, {
|
|
3248
3248
|
className: "mn-app-body",
|
|
3249
3249
|
style: {
|
|
3250
3250
|
position: "relative",
|
|
3251
3251
|
flexDirection: "row"
|
|
3252
3252
|
},
|
|
3253
3253
|
children: [
|
|
3254
|
-
!b && x === "floating" && T && /* @__PURE__ */ K
|
|
3254
|
+
!b && x === "floating" && T && /* @__PURE__ */ Y(K, {
|
|
3255
3255
|
className: "mn-app-floating-backdrop",
|
|
3256
3256
|
onClick: () => E(!1)
|
|
3257
3257
|
}),
|
|
3258
3258
|
" ",
|
|
3259
|
-
!b && /* @__PURE__ */ K
|
|
3259
|
+
!b && /* @__PURE__ */ Y(K, {
|
|
3260
3260
|
className: "mn-app-sidebar-space",
|
|
3261
3261
|
style: {
|
|
3262
3262
|
width: x === "expanded" ? 240 : 64,
|
|
3263
3263
|
flexShrink: 0
|
|
3264
3264
|
},
|
|
3265
|
-
children: /* @__PURE__ */ K
|
|
3266
|
-
className:
|
|
3265
|
+
children: /* @__PURE__ */ Y(K, {
|
|
3266
|
+
className: q("mn-app-sidebar", x === "floating" && "mn-app-floating"),
|
|
3267
3267
|
"aria-label": i ?? _("appShell.navigation"),
|
|
3268
3268
|
style: {
|
|
3269
3269
|
width: D ? 64 : 240,
|
|
@@ -3275,14 +3275,14 @@ function hi({ brand: e, brandIcon: n, navigation: r, navigationLabel: i, navigat
|
|
|
3275
3275
|
children: O
|
|
3276
3276
|
})
|
|
3277
3277
|
}),
|
|
3278
|
-
/* @__PURE__ */
|
|
3278
|
+
/* @__PURE__ */ X(K, {
|
|
3279
3279
|
className: "mn-app-main",
|
|
3280
3280
|
role: "main",
|
|
3281
3281
|
children: [l, u]
|
|
3282
3282
|
})
|
|
3283
3283
|
]
|
|
3284
3284
|
}),
|
|
3285
|
-
b && /* @__PURE__ */
|
|
3285
|
+
b && /* @__PURE__ */ Y(pt, {
|
|
3286
3286
|
open: C,
|
|
3287
3287
|
onOpenChange: w,
|
|
3288
3288
|
title: i ?? _("appShell.navigation"),
|
|
@@ -3295,21 +3295,21 @@ function hi({ brand: e, brandIcon: n, navigation: r, navigationLabel: i, navigat
|
|
|
3295
3295
|
}
|
|
3296
3296
|
//#endregion
|
|
3297
3297
|
//#region src/data.tsx
|
|
3298
|
-
var
|
|
3299
|
-
function
|
|
3300
|
-
return /* @__PURE__ */
|
|
3298
|
+
var _i = oe(!1);
|
|
3299
|
+
function vi({ scroll: e, variant: n = "simple", size: r = "medium", hoverable: i = !1, children: a, ...o }) {
|
|
3300
|
+
return /* @__PURE__ */ Y(_i.Provider, {
|
|
3301
3301
|
value: i,
|
|
3302
|
-
children: /* @__PURE__ */
|
|
3302
|
+
children: /* @__PURE__ */ Y(de, {
|
|
3303
3303
|
scrollX: !0,
|
|
3304
3304
|
scrollY: !!e?.y,
|
|
3305
|
-
style: { maxHeight: e?.y === void 0 ? void 0 :
|
|
3306
|
-
children: /* @__PURE__ */
|
|
3305
|
+
style: { maxHeight: e?.y === void 0 ? void 0 : Ae(e.y) },
|
|
3306
|
+
children: /* @__PURE__ */ Y(t, {
|
|
3307
3307
|
name: "table",
|
|
3308
3308
|
role: "table",
|
|
3309
3309
|
...o,
|
|
3310
|
-
className:
|
|
3310
|
+
className: q(`mn-table-${n}`, `mn-size-${r}`, o.className),
|
|
3311
3311
|
style: {
|
|
3312
|
-
minWidth: e?.x === void 0 ? void 0 :
|
|
3312
|
+
minWidth: e?.x === void 0 ? void 0 : Ae(e.x),
|
|
3313
3313
|
...o.style
|
|
3314
3314
|
},
|
|
3315
3315
|
children: a
|
|
@@ -3317,25 +3317,25 @@ function _i({ scroll: e, variant: n = "simple", size: r = "medium", hoverable: i
|
|
|
3317
3317
|
})
|
|
3318
3318
|
});
|
|
3319
3319
|
}
|
|
3320
|
-
function
|
|
3321
|
-
return /* @__PURE__ */
|
|
3320
|
+
function yi(e) {
|
|
3321
|
+
return /* @__PURE__ */ Y(t, {
|
|
3322
3322
|
name: "table",
|
|
3323
3323
|
part: "head",
|
|
3324
3324
|
role: "rowgroup",
|
|
3325
3325
|
...e
|
|
3326
3326
|
});
|
|
3327
3327
|
}
|
|
3328
|
-
function
|
|
3329
|
-
return /* @__PURE__ */
|
|
3328
|
+
function bi(e) {
|
|
3329
|
+
return /* @__PURE__ */ Y(t, {
|
|
3330
3330
|
name: "table",
|
|
3331
3331
|
part: "body",
|
|
3332
3332
|
role: "rowgroup",
|
|
3333
3333
|
...e
|
|
3334
3334
|
});
|
|
3335
3335
|
}
|
|
3336
|
-
function
|
|
3337
|
-
let n =
|
|
3338
|
-
return /* @__PURE__ */
|
|
3336
|
+
function xi(e) {
|
|
3337
|
+
let n = B(_i);
|
|
3338
|
+
return /* @__PURE__ */ Y(t, {
|
|
3339
3339
|
name: "table",
|
|
3340
3340
|
part: "row",
|
|
3341
3341
|
role: "row",
|
|
@@ -3343,40 +3343,40 @@ function bi(e) {
|
|
|
3343
3343
|
...e
|
|
3344
3344
|
});
|
|
3345
3345
|
}
|
|
3346
|
-
function
|
|
3347
|
-
return /* @__PURE__ */
|
|
3346
|
+
function Si(e) {
|
|
3347
|
+
return /* @__PURE__ */ Y(t, {
|
|
3348
3348
|
name: "table",
|
|
3349
3349
|
part: "header",
|
|
3350
3350
|
role: "columnheader",
|
|
3351
3351
|
...e
|
|
3352
3352
|
});
|
|
3353
3353
|
}
|
|
3354
|
-
function
|
|
3355
|
-
return /* @__PURE__ */
|
|
3354
|
+
function Ci(e) {
|
|
3355
|
+
return /* @__PURE__ */ Y(t, {
|
|
3356
3356
|
name: "table",
|
|
3357
3357
|
part: "cell",
|
|
3358
3358
|
role: "cell",
|
|
3359
3359
|
...e
|
|
3360
3360
|
});
|
|
3361
3361
|
}
|
|
3362
|
-
function
|
|
3363
|
-
return /* @__PURE__ */
|
|
3362
|
+
function wi({ primary: e, secondary: n, monospace: r, maxWidth: i = 360, ...a }) {
|
|
3363
|
+
return /* @__PURE__ */ X(t, {
|
|
3364
3364
|
name: "table-cell-content",
|
|
3365
3365
|
...a,
|
|
3366
3366
|
style: {
|
|
3367
3367
|
maxWidth: i,
|
|
3368
3368
|
...a.style
|
|
3369
3369
|
},
|
|
3370
|
-
children: [/* @__PURE__ */
|
|
3370
|
+
children: [/* @__PURE__ */ Y(G, {
|
|
3371
3371
|
className: r ? "mn-code" : "",
|
|
3372
3372
|
children: e
|
|
3373
|
-
}), n && /* @__PURE__ */
|
|
3373
|
+
}), n && /* @__PURE__ */ Y(G, {
|
|
3374
3374
|
className: "mn-muted",
|
|
3375
3375
|
children: n
|
|
3376
3376
|
})]
|
|
3377
3377
|
});
|
|
3378
3378
|
}
|
|
3379
|
-
function
|
|
3379
|
+
function Ti({ columns: e, data: t, rowKey: n = (e, t) => t, emptyText: r, loading: i, loadingRows: a = 5, sortState: o, defaultSortState: c = null, onSortChange: l, manualSort: u, rowSelection: d, ...f }) {
|
|
3380
3380
|
let { t: p } = s();
|
|
3381
3381
|
r ??= p("table.empty");
|
|
3382
3382
|
let [m, h] = g(o, c, (e) => {
|
|
@@ -3387,10 +3387,10 @@ function wi({ columns: e, data: t, rowKey: n = (e, t) => t, emptyText: r, loadin
|
|
|
3387
3387
|
key: n(e, t)
|
|
3388
3388
|
}));
|
|
3389
3389
|
if (m?.order && !u) {
|
|
3390
|
-
let t = e.find((e) => e.key === m.key), n = t &&
|
|
3390
|
+
let t = e.find((e) => e.key === m.key), n = t && _e(t);
|
|
3391
3391
|
n && y.sort((e, t) => n(e.row, t.row) * (m.order === "descend" ? -1 : 1));
|
|
3392
3392
|
}
|
|
3393
|
-
let b = y.filter(({ row: e }) => !d?.getCheckboxProps?.(e).disabled).map((e) => e.key), x = b.length > 0 && b.every((e) => _.includes(e)), S =
|
|
3393
|
+
let b = y.filter(({ row: e }) => !d?.getCheckboxProps?.(e).disabled).map((e) => e.key), x = b.length > 0 && b.every((e) => _.includes(e)), S = pe(e), C = (e) => ({
|
|
3394
3394
|
position: e.fixed ? "sticky" : void 0,
|
|
3395
3395
|
left: e.fixed === "left" ? S.leftOffsets[e.key] + (d ? 48 : 0) : void 0,
|
|
3396
3396
|
right: e.fixed === "right" ? S.rightOffsets[e.key] : void 0,
|
|
@@ -3404,72 +3404,72 @@ function wi({ columns: e, data: t, rowKey: n = (e, t) => t, emptyText: r, loadin
|
|
|
3404
3404
|
textOverflow: e.ellipsis ? "ellipsis" : void 0,
|
|
3405
3405
|
whiteSpace: e.ellipsis ? "nowrap" : void 0
|
|
3406
3406
|
});
|
|
3407
|
-
return /* @__PURE__ */
|
|
3407
|
+
return /* @__PURE__ */ X(vi, {
|
|
3408
3408
|
...f,
|
|
3409
|
-
children: [/* @__PURE__ */
|
|
3409
|
+
children: [/* @__PURE__ */ Y(yi, { children: /* @__PURE__ */ X(xi, { children: [d && /* @__PURE__ */ Y(Si, {
|
|
3410
3410
|
style: { flex: "0 0 48px" },
|
|
3411
|
-
children: /* @__PURE__ */
|
|
3411
|
+
children: /* @__PURE__ */ Y(F, {
|
|
3412
3412
|
label: p("table.selectAll"),
|
|
3413
3413
|
checked: x,
|
|
3414
3414
|
indeterminate: !x && b.some((e) => _.includes(e)),
|
|
3415
3415
|
disabled: i || !b.length,
|
|
3416
3416
|
onChange: (e) => v(e ? [.../* @__PURE__ */ new Set([..._, ...b])] : _.filter((e) => !b.includes(e)))
|
|
3417
3417
|
})
|
|
3418
|
-
}), e.map((e) => /* @__PURE__ */
|
|
3418
|
+
}), e.map((e) => /* @__PURE__ */ Y(Si, {
|
|
3419
3419
|
style: C(e),
|
|
3420
|
-
children: e.sortable ? /* @__PURE__ */
|
|
3420
|
+
children: e.sortable ? /* @__PURE__ */ X(I, {
|
|
3421
3421
|
variant: "ghost",
|
|
3422
|
-
onClick: () => h(
|
|
3422
|
+
onClick: () => h(Ee(m, e.key)),
|
|
3423
3423
|
children: [e.header, m?.key === e.key && m.order && (m.order === "ascend" ? " ↑" : " ↓")]
|
|
3424
3424
|
}) : e.header
|
|
3425
|
-
}, e.key))] }) }), /* @__PURE__ */
|
|
3425
|
+
}, e.key))] }) }), /* @__PURE__ */ Y(bi, { children: i ? Array.from({ length: a }, (t, n) => /* @__PURE__ */ X(xi, {
|
|
3426
3426
|
"aria-hidden": !0,
|
|
3427
|
-
children: [d && /* @__PURE__ */
|
|
3427
|
+
children: [d && /* @__PURE__ */ Y(Ci, { style: { flex: "0 0 48px" } }), e.map((e) => /* @__PURE__ */ Y(Ci, {
|
|
3428
3428
|
style: C(e),
|
|
3429
|
-
children: /* @__PURE__ */ K
|
|
3429
|
+
children: /* @__PURE__ */ Y(K, { className: "mn-table-skeleton" })
|
|
3430
3430
|
}, e.key))]
|
|
3431
|
-
}, `skeleton-${n}`)) : y.length ? y.map(({ row: t, index: n, key: r }) => /* @__PURE__ */
|
|
3431
|
+
}, `skeleton-${n}`)) : y.length ? y.map(({ row: t, index: n, key: r }) => /* @__PURE__ */ X(xi, {
|
|
3432
3432
|
className: _.includes(r) ? "mn-table-selected" : void 0,
|
|
3433
|
-
children: [d && /* @__PURE__ */
|
|
3433
|
+
children: [d && /* @__PURE__ */ Y(Ci, {
|
|
3434
3434
|
style: { flex: "0 0 48px" },
|
|
3435
|
-
children: /* @__PURE__ */
|
|
3435
|
+
children: /* @__PURE__ */ Y(F, {
|
|
3436
3436
|
label: p("table.selectRow", { row: d.getRowLabel?.(t, n) ?? r }),
|
|
3437
3437
|
checked: _.includes(r),
|
|
3438
3438
|
disabled: d.getCheckboxProps?.(t).disabled,
|
|
3439
3439
|
onChange: (e) => v(e ? [..._, r] : _.filter((e) => e !== r))
|
|
3440
3440
|
})
|
|
3441
|
-
}), e.map((e) => /* @__PURE__ */
|
|
3441
|
+
}), e.map((e) => /* @__PURE__ */ Y(Ci, {
|
|
3442
3442
|
style: {
|
|
3443
3443
|
...C(e),
|
|
3444
3444
|
..._.includes(r) && e.fixed ? { background: "var(--table-selected-bg,var(--selected-color))" } : {}
|
|
3445
3445
|
},
|
|
3446
3446
|
children: e.render?.(t, n) ?? String(t[e.key] ?? "")
|
|
3447
3447
|
}, e.key))]
|
|
3448
|
-
}, r)) : /* @__PURE__ */
|
|
3448
|
+
}, r)) : /* @__PURE__ */ Y(Wr, { title: r }) })]
|
|
3449
3449
|
});
|
|
3450
3450
|
}
|
|
3451
|
-
function
|
|
3451
|
+
function Ei({ pagination: e, error: n, onRetry: r, retryLabel: i, ...a }) {
|
|
3452
3452
|
let { t: o } = s();
|
|
3453
|
-
return i ??= o("table.retry"), n ? /* @__PURE__ */
|
|
3453
|
+
return i ??= o("table.retry"), n ? /* @__PURE__ */ Y(Br, {
|
|
3454
3454
|
color: "danger",
|
|
3455
|
-
action: r && /* @__PURE__ */
|
|
3455
|
+
action: r && /* @__PURE__ */ Y(I, {
|
|
3456
3456
|
onClick: r,
|
|
3457
3457
|
children: i
|
|
3458
3458
|
}),
|
|
3459
3459
|
children: n
|
|
3460
|
-
}) : /* @__PURE__ */
|
|
3460
|
+
}) : /* @__PURE__ */ X(t, {
|
|
3461
3461
|
name: "data-table",
|
|
3462
|
-
children: [/* @__PURE__ */
|
|
3462
|
+
children: [/* @__PURE__ */ Y(Ti, { ...a }), e && /* @__PURE__ */ Y(Ke, { ...e })]
|
|
3463
3463
|
});
|
|
3464
3464
|
}
|
|
3465
|
-
function
|
|
3466
|
-
let [f, p] =
|
|
3467
|
-
|
|
3465
|
+
function Di({ items: e, itemHeight: t, itemPadding: n = 8, maxHeight: r = 320, overscan: i = 5, renderItem: a, onLoadMore: o, loadMoreThreshold: s = 100, loading: c, highPerformance: l = !1, onItemClick: u, ...d }) {
|
|
3466
|
+
let [f, p] = W(0), [m, h] = W(40), g = H().replace(/[^a-zA-Z0-9_-]/g, ""), _ = d.id ?? `mn-virtual-${g}`, v = t && t > 0 ? t : m, y = U(!1), b = U(), x = U(0);
|
|
3467
|
+
V(() => () => {
|
|
3468
3468
|
b.current && clearTimeout(b.current);
|
|
3469
|
-
}, []),
|
|
3469
|
+
}, []), V(() => {
|
|
3470
3470
|
if (t !== void 0 || !e.length) return;
|
|
3471
3471
|
let n = !1;
|
|
3472
|
-
return
|
|
3472
|
+
return J.createSelectorQuery?.()?.select(`#${_}-measure`).boundingClientRect((e) => {
|
|
3473
3473
|
!n && e && "height" in e && e.height > 0 && h(e.height);
|
|
3474
3474
|
}).exec(), () => {
|
|
3475
3475
|
n = !0;
|
|
@@ -3492,17 +3492,17 @@ function Ei({ items: e, itemHeight: t, itemPadding: n = 8, maxHeight: r = 320, o
|
|
|
3492
3492
|
throw y.current = !1, e;
|
|
3493
3493
|
}
|
|
3494
3494
|
}
|
|
3495
|
-
}, C =
|
|
3495
|
+
}, C = xe({
|
|
3496
3496
|
scrollTop: f,
|
|
3497
3497
|
viewportHeight: r,
|
|
3498
3498
|
itemHeight: v,
|
|
3499
3499
|
itemCount: e.length,
|
|
3500
3500
|
overscan: i
|
|
3501
3501
|
});
|
|
3502
|
-
return /* @__PURE__ */
|
|
3502
|
+
return /* @__PURE__ */ X(de, {
|
|
3503
3503
|
id: _,
|
|
3504
3504
|
scrollY: !0,
|
|
3505
|
-
className:
|
|
3505
|
+
className: q("mn-virtual-list", d.className),
|
|
3506
3506
|
style: {
|
|
3507
3507
|
height: Math.min(r, e.length * v),
|
|
3508
3508
|
maxHeight: r,
|
|
@@ -3517,7 +3517,7 @@ function Ei({ items: e, itemHeight: t, itemPadding: n = 8, maxHeight: r = 320, o
|
|
|
3517
3517
|
lowerThreshold: s,
|
|
3518
3518
|
onScrollToLower: S,
|
|
3519
3519
|
children: [
|
|
3520
|
-
t === void 0 && e.length > 0 && /* @__PURE__ */ K
|
|
3520
|
+
t === void 0 && e.length > 0 && /* @__PURE__ */ Y(K, {
|
|
3521
3521
|
id: `${_}-measure`,
|
|
3522
3522
|
"aria-hidden": !0,
|
|
3523
3523
|
style: {
|
|
@@ -3531,14 +3531,14 @@ function Ei({ items: e, itemHeight: t, itemPadding: n = 8, maxHeight: r = 320, o
|
|
|
3531
3531
|
},
|
|
3532
3532
|
children: a(e[0], 0)
|
|
3533
3533
|
}),
|
|
3534
|
-
/* @__PURE__ */ K
|
|
3534
|
+
/* @__PURE__ */ Y(K, {
|
|
3535
3535
|
style: {
|
|
3536
3536
|
height: e.length * v,
|
|
3537
3537
|
position: "relative"
|
|
3538
3538
|
},
|
|
3539
3539
|
children: e.slice(C.start, C.end).map((e, t) => {
|
|
3540
3540
|
let r = C.start + t;
|
|
3541
|
-
return /* @__PURE__ */ K
|
|
3541
|
+
return /* @__PURE__ */ Y(K, {
|
|
3542
3542
|
className: "mn-virtual-list-item",
|
|
3543
3543
|
style: {
|
|
3544
3544
|
position: "absolute",
|
|
@@ -3554,11 +3554,11 @@ function Ei({ items: e, itemHeight: t, itemPadding: n = 8, maxHeight: r = 320, o
|
|
|
3554
3554
|
}, typeof e == "object" && e && "id" in e ? String(e.id) : r);
|
|
3555
3555
|
})
|
|
3556
3556
|
}),
|
|
3557
|
-
c && /* @__PURE__ */
|
|
3557
|
+
c && /* @__PURE__ */ Y(Jr, {})
|
|
3558
3558
|
]
|
|
3559
3559
|
});
|
|
3560
3560
|
}
|
|
3561
|
-
function
|
|
3561
|
+
function Oi({ month: n, defaultMonth: r = /* @__PURE__ */ new Date(), onMonthChange: i, value: a, defaultValue: o = "", onChange: c, events: l = [], onEventClick: u, rangeStart: d, rangeEnd: f, disabled: p, showSelectedDayEvents: m = !0, previousMonthLabel: h, nextMonthLabel: _, todayLabel: v, locale: y, weekdayLabels: b, getDayLabel: x, getEventsLabel: S, emptyEventsText: C, size: w = "medium", ...T }) {
|
|
3562
3562
|
let { t: E, language: D } = s();
|
|
3563
3563
|
y ??= D, h ??= E("monthCalendar.previousMonth"), _ ??= E("monthCalendar.nextMonth"), v ??= E("monthCalendar.today"), b ??= [
|
|
3564
3564
|
"mon",
|
|
@@ -3569,203 +3569,203 @@ function Di({ month: n, defaultMonth: r = /* @__PURE__ */ new Date(), onMonthCha
|
|
|
3569
3569
|
"sat",
|
|
3570
3570
|
"sun"
|
|
3571
3571
|
].map((e) => E(`monthCalendar.weekdays.${e}`)), C ??= E("monthCalendar.noEvents");
|
|
3572
|
-
let [O, k] = g(n, r, i), [A, j] = g(a, o, c),
|
|
3573
|
-
e(
|
|
3572
|
+
let [O, k] = g(n, r, i), [A, j] = g(a, o, c), M = Te(O), N = fe(M, -((M.getDay() + 6) % 7)), P = d && f && /^\d{4}-\d{2}-\d{2}$/.test(d) && /^\d{4}-\d{2}-\d{2}$/.test(f) ? [d, f].sort() : void 0, F = H(), L = T.id ?? F;
|
|
3573
|
+
e(L, {
|
|
3574
3574
|
selector: ".mn-calendar-day",
|
|
3575
3575
|
grid: !0,
|
|
3576
3576
|
loop: !1
|
|
3577
3577
|
});
|
|
3578
|
-
let
|
|
3579
|
-
return /* @__PURE__ */
|
|
3578
|
+
let R = l.filter((e) => e.date === A);
|
|
3579
|
+
return /* @__PURE__ */ X(t, {
|
|
3580
3580
|
name: "month-calendar",
|
|
3581
3581
|
...T,
|
|
3582
|
-
id:
|
|
3583
|
-
className:
|
|
3582
|
+
id: L,
|
|
3583
|
+
className: q(`mn-size-${w}`, T.className),
|
|
3584
3584
|
children: [
|
|
3585
|
-
/* @__PURE__ */
|
|
3585
|
+
/* @__PURE__ */ X(K, {
|
|
3586
3586
|
className: "mn-calendar-toolbar",
|
|
3587
3587
|
children: [
|
|
3588
|
-
/* @__PURE__ */
|
|
3588
|
+
/* @__PURE__ */ Y(I, {
|
|
3589
3589
|
variant: "ghost",
|
|
3590
3590
|
"aria-label": h,
|
|
3591
3591
|
disabled: p,
|
|
3592
|
-
onClick: () => k(
|
|
3592
|
+
onClick: () => k(Te(O, -1)),
|
|
3593
3593
|
children: "‹"
|
|
3594
3594
|
}),
|
|
3595
|
-
/* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ Y(G, { children: O.toLocaleDateString(y, {
|
|
3596
3596
|
year: "numeric",
|
|
3597
3597
|
month: "long"
|
|
3598
3598
|
}) }),
|
|
3599
|
-
/* @__PURE__ */
|
|
3599
|
+
/* @__PURE__ */ Y(I, {
|
|
3600
3600
|
variant: "ghost",
|
|
3601
3601
|
"aria-label": _,
|
|
3602
3602
|
disabled: p,
|
|
3603
|
-
onClick: () => k(
|
|
3603
|
+
onClick: () => k(Te(O, 1)),
|
|
3604
3604
|
children: "›"
|
|
3605
3605
|
}),
|
|
3606
|
-
/* @__PURE__ */
|
|
3606
|
+
/* @__PURE__ */ Y(I, {
|
|
3607
3607
|
variant: "ghost",
|
|
3608
3608
|
disabled: p,
|
|
3609
3609
|
onClick: () => {
|
|
3610
|
-
k(
|
|
3610
|
+
k(Te(/* @__PURE__ */ new Date())), j(me(/* @__PURE__ */ new Date()));
|
|
3611
3611
|
},
|
|
3612
3612
|
children: v
|
|
3613
3613
|
})
|
|
3614
3614
|
]
|
|
3615
3615
|
}),
|
|
3616
|
-
/* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ X(K, {
|
|
3617
3617
|
className: "mn-calendar-grid",
|
|
3618
|
-
children: [b.map((e) => /* @__PURE__ */
|
|
3619
|
-
let n =
|
|
3620
|
-
return /* @__PURE__ */
|
|
3618
|
+
children: [b.map((e) => /* @__PURE__ */ Y(G, { children: e }, e)), Array.from({ length: 42 }, (e, t) => {
|
|
3619
|
+
let n = fe(N, t), r = me(n), i = l.filter((e) => e.date === r).length;
|
|
3620
|
+
return /* @__PURE__ */ X(I, {
|
|
3621
3621
|
"aria-label": x?.(r, i) ?? (i ? E("monthCalendar.dayWithEvents", {
|
|
3622
3622
|
date: r,
|
|
3623
3623
|
count: i
|
|
3624
3624
|
}) : r),
|
|
3625
|
-
"aria-current": r ===
|
|
3625
|
+
"aria-current": r === me(/* @__PURE__ */ new Date()) ? "date" : void 0,
|
|
3626
3626
|
"aria-pressed": A === r,
|
|
3627
3627
|
disabled: p,
|
|
3628
3628
|
variant: A === r ? "solid" : "ghost",
|
|
3629
|
-
className:
|
|
3629
|
+
className: q("mn-calendar-day", n.getMonth() !== O.getMonth() && "mn-muted", P && r >= P[0] && r <= P[1] && "mn-in-range"),
|
|
3630
3630
|
onClick: () => {
|
|
3631
|
-
j(r), (n.getMonth() !== O.getMonth() || n.getFullYear() !== O.getFullYear()) && k(
|
|
3631
|
+
j(r), (n.getMonth() !== O.getMonth() || n.getFullYear() !== O.getFullYear()) && k(Te(n));
|
|
3632
3632
|
},
|
|
3633
|
-
children: [n.getDate(), /* @__PURE__ */
|
|
3633
|
+
children: [n.getDate(), /* @__PURE__ */ Y(G, {
|
|
3634
3634
|
"aria-hidden": !0,
|
|
3635
|
-
className:
|
|
3635
|
+
className: q("mn-calendar-event-count", !!i && "mn-has-events"),
|
|
3636
3636
|
children: i ? i > 99 ? "99+" : i : " "
|
|
3637
3637
|
})]
|
|
3638
3638
|
}, r);
|
|
3639
3639
|
})]
|
|
3640
3640
|
}),
|
|
3641
|
-
m && A && /* @__PURE__ */
|
|
3641
|
+
m && A && /* @__PURE__ */ Y(t, {
|
|
3642
3642
|
name: "month-calendar",
|
|
3643
3643
|
part: "events",
|
|
3644
3644
|
role: "region",
|
|
3645
3645
|
"aria-label": S?.(A) ?? E("monthCalendar.eventsLabel", { date: A }),
|
|
3646
|
-
children:
|
|
3646
|
+
children: R.length ? R.map((e) => u ? /* @__PURE__ */ Y(I, {
|
|
3647
3647
|
variant: "ghost",
|
|
3648
3648
|
disabled: p,
|
|
3649
3649
|
onClick: () => u(e),
|
|
3650
3650
|
children: e.title
|
|
3651
|
-
}, e.id) : /* @__PURE__ */
|
|
3651
|
+
}, e.id) : /* @__PURE__ */ Y(G, { children: e.title }, e.id)) : /* @__PURE__ */ Y(G, { children: C })
|
|
3652
3652
|
})
|
|
3653
3653
|
]
|
|
3654
3654
|
});
|
|
3655
3655
|
}
|
|
3656
|
-
function
|
|
3657
|
-
let { t: E } = s(), D = d(), O = (i ?? D.disabled) || (a ?? D.readOnly), [k, A] = g(e, n, (e) => r?.(e ?? void 0)), [
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
}, [e,
|
|
3661
|
-
O &&
|
|
3656
|
+
function ki({ value: e, defaultValue: n, onChange: r, disabled: i, readOnly: a, required: o, invalid: c, clearable: l = !0, placeholder: u, label: f, minTime: p, maxTime: m, format: h, use12Hours: _ = !1, showSecond: v = !0, hourStep: y = 1, minuteStep: b = 1, secondStep: x = 1, name: S = "time-picker", size: C = "medium", onOpenChange: w, ...T }) {
|
|
3657
|
+
let { t: E } = s(), D = d(), O = (i ?? D.disabled) || (a ?? D.readOnly), [k, A] = g(e, n, (e) => r?.(e ?? void 0)), [M, N] = g(void 0, !1, w), [P, F] = W(null), L = je(h ?? (_ ? "hh:mm:ss a" : "HH:mm:ss"), v), R = he(L);
|
|
3658
|
+
V(() => {
|
|
3659
|
+
F(null);
|
|
3660
|
+
}, [e, L]), V(() => {
|
|
3661
|
+
O && N(!1);
|
|
3662
3662
|
}, [O]);
|
|
3663
|
-
let
|
|
3664
|
-
if (!O &&
|
|
3665
|
-
if (!
|
|
3663
|
+
let ee = (e) => (!p || Ne(e) >= Ne(p)) && (!m || Ne(e) <= Ne(m)), z = () => {
|
|
3664
|
+
if (!O && P !== null) {
|
|
3665
|
+
if (!P.trim()) k && A(void 0);
|
|
3666
3666
|
else {
|
|
3667
|
-
let e =
|
|
3667
|
+
let e = ke(P, L, {
|
|
3668
3668
|
strict: !1,
|
|
3669
3669
|
base: k ?? void 0
|
|
3670
3670
|
});
|
|
3671
|
-
e &&
|
|
3671
|
+
e && ee(e) && e.getTime() !== k?.getTime() && A(e);
|
|
3672
3672
|
}
|
|
3673
|
-
|
|
3673
|
+
F(null);
|
|
3674
3674
|
}
|
|
3675
|
-
},
|
|
3676
|
-
let n = new Date(
|
|
3677
|
-
return e === "hour" ? n.setHours(_ ? t % 12 + (
|
|
3678
|
-
},
|
|
3675
|
+
}, te = k ?? Pe(), ne = te.getHours(), re = te.getMinutes(), ie = te.getSeconds(), ae = (e, t) => {
|
|
3676
|
+
let n = new Date(te);
|
|
3677
|
+
return e === "hour" ? n.setHours(_ ? t % 12 + (ne >= 12 ? 12 : 0) : t) : e === "minute" ? n.setMinutes(t) : e === "second" ? n.setSeconds(t) : n.setHours(ne % 12 + (t ? 12 : 0)), R || n.setSeconds(0), n.setMilliseconds(0), n;
|
|
3678
|
+
}, oe = (e, t, n = 0) => Array.from({ length: Math.ceil(e / (Number.isFinite(t) ? Math.max(1, Math.floor(t)) : 1)) }, (e, r) => n + r * (Number.isFinite(t) ? Math.max(1, Math.floor(t)) : 1)), se = [{
|
|
3679
3679
|
kind: "hour",
|
|
3680
3680
|
label: E("timePicker.hours"),
|
|
3681
|
-
values:
|
|
3682
|
-
selected: _ ?
|
|
3681
|
+
values: oe(_ ? 12 : 24, y, +!!_),
|
|
3682
|
+
selected: _ ? ne % 12 || 12 : ne
|
|
3683
3683
|
}, {
|
|
3684
3684
|
kind: "minute",
|
|
3685
3685
|
label: E("timePicker.minutes"),
|
|
3686
|
-
values:
|
|
3687
|
-
selected:
|
|
3686
|
+
values: oe(60, b),
|
|
3687
|
+
selected: re
|
|
3688
3688
|
}];
|
|
3689
|
-
|
|
3689
|
+
R && se.push({
|
|
3690
3690
|
kind: "second",
|
|
3691
3691
|
label: E("timePicker.seconds"),
|
|
3692
|
-
values:
|
|
3693
|
-
selected:
|
|
3694
|
-
}), _ &&
|
|
3692
|
+
values: oe(60, x),
|
|
3693
|
+
selected: ie
|
|
3694
|
+
}), _ && se.push({
|
|
3695
3695
|
kind: "ampm",
|
|
3696
3696
|
label: E("timePicker.period"),
|
|
3697
3697
|
values: [0, 1],
|
|
3698
|
-
selected: +(
|
|
3698
|
+
selected: +(ne >= 12)
|
|
3699
3699
|
});
|
|
3700
|
-
let
|
|
3701
|
-
let n =
|
|
3702
|
-
return e === "hour" ? !!(p && n.getHours() < p.getHours() || m && n.getHours() > m.getHours()) : e === "minute" ? !!(p &&
|
|
3700
|
+
let B = (e, t) => {
|
|
3701
|
+
let n = ae(e, t);
|
|
3702
|
+
return e === "hour" ? !!(p && n.getHours() < p.getHours() || m && n.getHours() > m.getHours()) : e === "minute" ? !!(p && ne === p.getHours() && t < p.getMinutes() || m && ne === m.getHours() && t > m.getMinutes()) : !ee(n);
|
|
3703
3703
|
};
|
|
3704
|
-
return /* @__PURE__ */
|
|
3704
|
+
return /* @__PURE__ */ X(t, {
|
|
3705
3705
|
name: "time-picker",
|
|
3706
3706
|
...T,
|
|
3707
|
-
className:
|
|
3707
|
+
className: q(`mn-size-${C}`, T.className),
|
|
3708
3708
|
children: [
|
|
3709
|
-
f && /* @__PURE__ */
|
|
3710
|
-
/* @__PURE__ */
|
|
3709
|
+
f && /* @__PURE__ */ Y(G, { children: f }),
|
|
3710
|
+
/* @__PURE__ */ Y(j, {
|
|
3711
3711
|
id: T.id ?? D.id,
|
|
3712
3712
|
name: S,
|
|
3713
|
-
value:
|
|
3713
|
+
value: P ?? (k ? ge(k, L) : ""),
|
|
3714
3714
|
size: C,
|
|
3715
3715
|
placeholder: u ?? E("timePicker.placeholder"),
|
|
3716
3716
|
"aria-label": f ?? T["aria-label"] ?? E("timePicker.label"),
|
|
3717
3717
|
"aria-labelledby": T["aria-labelledby"],
|
|
3718
3718
|
"aria-describedby": T["aria-describedby"],
|
|
3719
|
-
"aria-expanded":
|
|
3719
|
+
"aria-expanded": M && !O,
|
|
3720
3720
|
disabled: i ?? D.disabled,
|
|
3721
3721
|
readOnly: a ?? D.readOnly,
|
|
3722
3722
|
required: o ?? D.required,
|
|
3723
3723
|
invalid: c ?? D.invalid,
|
|
3724
3724
|
onClick: () => {
|
|
3725
|
-
O ||
|
|
3725
|
+
O || N(!M);
|
|
3726
3726
|
},
|
|
3727
3727
|
onChange: (e) => {
|
|
3728
|
-
|
|
3729
|
-
let t =
|
|
3728
|
+
F(e);
|
|
3729
|
+
let t = ke(e, L, {
|
|
3730
3730
|
strict: !0,
|
|
3731
3731
|
base: k ?? void 0
|
|
3732
3732
|
});
|
|
3733
|
-
t &&
|
|
3733
|
+
t && ee(t) && A(t);
|
|
3734
3734
|
},
|
|
3735
|
-
onBlur:
|
|
3735
|
+
onBlur: z,
|
|
3736
3736
|
onConfirm: () => {
|
|
3737
|
-
|
|
3737
|
+
z(), N(!1);
|
|
3738
3738
|
}
|
|
3739
3739
|
}),
|
|
3740
|
-
l && k && /* @__PURE__ */
|
|
3740
|
+
l && k && /* @__PURE__ */ Y(I, {
|
|
3741
3741
|
variant: "ghost",
|
|
3742
3742
|
"aria-label": E("timePicker.clear"),
|
|
3743
3743
|
disabled: O,
|
|
3744
3744
|
onClick: () => {
|
|
3745
|
-
|
|
3745
|
+
F(null), A(void 0);
|
|
3746
3746
|
},
|
|
3747
3747
|
children: "×"
|
|
3748
3748
|
}),
|
|
3749
|
-
|
|
3749
|
+
M && !O && /* @__PURE__ */ X(Fe, { children: [/* @__PURE__ */ Y(K, {
|
|
3750
3750
|
className: "mn-time-backdrop",
|
|
3751
|
-
onClick: () =>
|
|
3752
|
-
}), /* @__PURE__ */ K
|
|
3751
|
+
onClick: () => N(!1)
|
|
3752
|
+
}), /* @__PURE__ */ Y(K, {
|
|
3753
3753
|
className: "mn-time-panel",
|
|
3754
|
-
children:
|
|
3754
|
+
children: se.map((e) => /* @__PURE__ */ Y(de, {
|
|
3755
3755
|
scrollY: !0,
|
|
3756
3756
|
className: "mn-time-column",
|
|
3757
|
-
children: /* @__PURE__ */ K
|
|
3757
|
+
children: /* @__PURE__ */ Y(K, {
|
|
3758
3758
|
className: "mn-time-options",
|
|
3759
3759
|
role: "listbox",
|
|
3760
3760
|
"aria-label": e.label,
|
|
3761
|
-
children: e.values.map((t) => /* @__PURE__ */
|
|
3761
|
+
children: e.values.map((t) => /* @__PURE__ */ Y(I, {
|
|
3762
3762
|
variant: "ghost",
|
|
3763
3763
|
role: "option",
|
|
3764
3764
|
"aria-selected": !!k && e.selected === t,
|
|
3765
|
-
className:
|
|
3766
|
-
disabled:
|
|
3765
|
+
className: q("mn-time-option", !!k && e.selected === t && "mn-selected"),
|
|
3766
|
+
disabled: B(e.kind, t),
|
|
3767
3767
|
onClick: () => {
|
|
3768
|
-
|
|
3768
|
+
F(null), A(ae(e.kind, t));
|
|
3769
3769
|
},
|
|
3770
3770
|
children: e.kind === "ampm" ? t ? "PM" : "AM" : String(t).padStart(2, "0")
|
|
3771
3771
|
}, t))
|
|
@@ -3775,10 +3775,10 @@ function Oi({ value: e, defaultValue: n, onChange: r, disabled: i, readOnly: a,
|
|
|
3775
3775
|
]
|
|
3776
3776
|
});
|
|
3777
3777
|
}
|
|
3778
|
-
function
|
|
3779
|
-
let { t: x } = s(), [S, C] =
|
|
3778
|
+
function Ai({ value: e = [], onChange: n, onSelect: r, onFilesSelected: i, onRemove: a, onRetry: o, onReject: c, labels: l = {}, label: u, accept: d, multiple: f, replace: p, maxCount: m = f ? 50 : 1, maxSize: h = Infinity, loading: g, disabled: _, removable: v = !0, retryable: y = !0, ...b }) {
|
|
3779
|
+
let { t: x } = s(), [S, C] = W(""), w = (e) => {
|
|
3780
3780
|
C(e), c?.(e);
|
|
3781
|
-
}, T = p && !f, [E, D] =
|
|
3781
|
+
}, T = p && !f, [E, D] = W(!1), O = U(null), k = typeof document < "u" && J.getEnv() === J.ENV_TYPE.WEB, A = (t) => {
|
|
3782
3782
|
if (_ || g || E) return;
|
|
3783
3783
|
if (!f && t.length > 1 || t.length + (T ? 0 : e.length) > m) {
|
|
3784
3784
|
w(l.tooMany?.(m) ?? x("upload.tooMany", { count: m }));
|
|
@@ -3786,7 +3786,7 @@ function ki({ value: e = [], onChange: n, onSelect: r, onFilesSelected: i, onRem
|
|
|
3786
3786
|
}
|
|
3787
3787
|
let a = t.find((e) => {
|
|
3788
3788
|
let t = e.name.split(".").pop()?.toLowerCase(), n = e.type?.includes("/") ? e.type : e.type === "image" ? `image/${t === "jpg" ? "jpeg" : t}` : e.type === "video" ? "video/mp4" : "";
|
|
3789
|
-
return !!d && !
|
|
3789
|
+
return !!d && !Ce({
|
|
3790
3790
|
name: e.name,
|
|
3791
3791
|
type: n
|
|
3792
3792
|
}, d);
|
|
@@ -3819,15 +3819,15 @@ function ki({ value: e = [], onChange: n, onSelect: r, onFilesSelected: i, onRem
|
|
|
3819
3819
|
D(!0);
|
|
3820
3820
|
try {
|
|
3821
3821
|
let t = Math.max(1, Math.min(f ? 9 : 1, m - (T ? 0 : e.length)));
|
|
3822
|
-
if (typeof
|
|
3823
|
-
let e = await
|
|
3822
|
+
if (typeof J.chooseMessageFile == "function") {
|
|
3823
|
+
let e = await J.chooseMessageFile({
|
|
3824
3824
|
count: t,
|
|
3825
3825
|
type: "all",
|
|
3826
3826
|
extension: d?.split(",").filter((e) => e.trim().startsWith(".")).map((e) => e.trim().slice(1))
|
|
3827
3827
|
});
|
|
3828
3828
|
A(e.tempFiles);
|
|
3829
|
-
} else if (typeof
|
|
3830
|
-
let e = await
|
|
3829
|
+
} else if (typeof J.chooseMedia == "function" && d?.split(",").every((e) => /^(image|video)\//.test(e.trim()))) {
|
|
3830
|
+
let e = await J.chooseMedia({
|
|
3831
3831
|
count: t,
|
|
3832
3832
|
mediaType: d.includes("video/") ? d.includes("image/") ? ["image", "video"] : ["video"] : ["image"]
|
|
3833
3833
|
});
|
|
@@ -3846,7 +3846,7 @@ function ki({ value: e = [], onChange: n, onSelect: r, onFilesSelected: i, onRem
|
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
3848
|
};
|
|
3849
|
-
return /* @__PURE__ */
|
|
3849
|
+
return /* @__PURE__ */ X(t, {
|
|
3850
3850
|
name: "upload",
|
|
3851
3851
|
onDragOver: (e) => e.preventDefault(),
|
|
3852
3852
|
onDrop: (e) => {
|
|
@@ -3857,7 +3857,7 @@ function ki({ value: e = [], onChange: n, onSelect: r, onFilesSelected: i, onRem
|
|
|
3857
3857
|
"aria-busy": !!(g || E),
|
|
3858
3858
|
...b,
|
|
3859
3859
|
children: [
|
|
3860
|
-
k && /* @__PURE__ */
|
|
3860
|
+
k && /* @__PURE__ */ Y("input", {
|
|
3861
3861
|
ref: O,
|
|
3862
3862
|
type: "file",
|
|
3863
3863
|
accept: d,
|
|
@@ -3869,43 +3869,43 @@ function ki({ value: e = [], onChange: n, onSelect: r, onFilesSelected: i, onRem
|
|
|
3869
3869
|
A(Array.from(e.currentTarget.files ?? [])), e.currentTarget.value = "";
|
|
3870
3870
|
}
|
|
3871
3871
|
}),
|
|
3872
|
-
u && /* @__PURE__ */
|
|
3872
|
+
u && /* @__PURE__ */ Y(G, {
|
|
3873
3873
|
className: "mn-upload-label",
|
|
3874
3874
|
children: u
|
|
3875
3875
|
}),
|
|
3876
|
-
/* @__PURE__ */
|
|
3876
|
+
/* @__PURE__ */ Y(I, {
|
|
3877
3877
|
disabled: _ || !T && e.length >= m,
|
|
3878
3878
|
loading: g || E,
|
|
3879
3879
|
onClick: j,
|
|
3880
3880
|
children: l.select ?? x("upload.select")
|
|
3881
3881
|
}),
|
|
3882
|
-
S && /* @__PURE__ */
|
|
3882
|
+
S && /* @__PURE__ */ Y(G, {
|
|
3883
3883
|
role: "alert",
|
|
3884
3884
|
className: "mn-error",
|
|
3885
3885
|
children: S
|
|
3886
3886
|
}),
|
|
3887
|
-
e.map((t) => /* @__PURE__ */
|
|
3887
|
+
e.map((t) => /* @__PURE__ */ X(K, {
|
|
3888
3888
|
className: "mn-upload-item",
|
|
3889
3889
|
children: [
|
|
3890
|
-
t.previewUrl && /* @__PURE__ */
|
|
3890
|
+
t.previewUrl && /* @__PURE__ */ Y(le, {
|
|
3891
3891
|
className: "mn-upload-preview",
|
|
3892
3892
|
src: t.previewUrl,
|
|
3893
3893
|
mode: "aspectFill"
|
|
3894
3894
|
}),
|
|
3895
|
-
/* @__PURE__ */
|
|
3896
|
-
t.status === "uploading" && /* @__PURE__ */
|
|
3897
|
-
t.status === "done" && /* @__PURE__ */
|
|
3898
|
-
t.status === "error" && /* @__PURE__ */
|
|
3895
|
+
/* @__PURE__ */ Y(G, { children: t.name }),
|
|
3896
|
+
t.status === "uploading" && /* @__PURE__ */ X(G, { children: [l.uploading ?? x("upload.uploading"), t.progress === void 0 ? "" : ` ${t.progress}%`] }),
|
|
3897
|
+
t.status === "done" && /* @__PURE__ */ Y(G, { children: l.done ?? x("upload.done") }),
|
|
3898
|
+
t.status === "error" && /* @__PURE__ */ Y(G, {
|
|
3899
3899
|
role: "alert",
|
|
3900
3900
|
children: t.error || l.failed || x("upload.failed")
|
|
3901
3901
|
}),
|
|
3902
|
-
t.status === "error" && y && o && /* @__PURE__ */
|
|
3902
|
+
t.status === "error" && y && o && /* @__PURE__ */ Y(I, {
|
|
3903
3903
|
variant: "ghost",
|
|
3904
3904
|
disabled: _ || g || E,
|
|
3905
3905
|
onClick: () => o(t),
|
|
3906
3906
|
children: l.retry?.(t.name) ?? x("upload.retry", { name: t.name })
|
|
3907
3907
|
}),
|
|
3908
|
-
v && (a || n) && /* @__PURE__ */
|
|
3908
|
+
v && (a || n) && /* @__PURE__ */ Y(I, {
|
|
3909
3909
|
variant: "ghost",
|
|
3910
3910
|
disabled: _,
|
|
3911
3911
|
"aria-label": l.remove?.(t.name) ?? x("upload.remove", { name: t.name }),
|
|
@@ -3920,4 +3920,169 @@ function ki({ value: e = [], onChange: n, onSelect: r, onFilesSelected: i, onRem
|
|
|
3920
3920
|
});
|
|
3921
3921
|
}
|
|
3922
3922
|
//#endregion
|
|
3923
|
-
|
|
3923
|
+
//#region src/date-picker.tsx
|
|
3924
|
+
function ji({ value: e, defaultValue: n = "", onChange: r, onOpenChange: i, minDate: a, maxDate: o, disabled: c, readOnly: l, required: u, invalid: f, clearable: p = !0, placeholder: m, label: h, name: g = "date-picker", locale: _, size: v = "medium", ...y }) {
|
|
3925
|
+
let b = d(), { t: x, language: S } = s(), C = (c ?? b.disabled) || (l ?? b.readOnly), [w, T] = W(n), E = e === void 0 ? w : e ?? "", [D, O] = W(null), [k, A] = W(!1), [M, N] = W(() => Te(Oe(E) ?? /* @__PURE__ */ new Date())), P = U(!1), F = (e) => {
|
|
3926
|
+
e && C || e === k || (A(e), i?.(e), e && N(Te(Oe(E) ?? /* @__PURE__ */ new Date())));
|
|
3927
|
+
};
|
|
3928
|
+
V(() => {
|
|
3929
|
+
O(null);
|
|
3930
|
+
}, [e]), V(() => {
|
|
3931
|
+
C && F(!1);
|
|
3932
|
+
}, [C]);
|
|
3933
|
+
let L = (e) => (!a || e >= a) && (!o || e <= o), R = (t) => {
|
|
3934
|
+
C || (e === void 0 && T(t), r?.(t));
|
|
3935
|
+
}, ee = () => {
|
|
3936
|
+
if (P.current) {
|
|
3937
|
+
P.current = !1;
|
|
3938
|
+
return;
|
|
3939
|
+
}
|
|
3940
|
+
if (C || D === null) return;
|
|
3941
|
+
let e = Oe(D.trim(), !1);
|
|
3942
|
+
if (!D.trim()) E && R("");
|
|
3943
|
+
else if (e) {
|
|
3944
|
+
let t = me(e);
|
|
3945
|
+
L(t) && t !== E && (R(t), N(Te(e)));
|
|
3946
|
+
}
|
|
3947
|
+
O(null);
|
|
3948
|
+
}, z = (e) => {
|
|
3949
|
+
P.current = !1, !C && L(e) && (O(null), R(e), F(!1));
|
|
3950
|
+
}, te = Te(M), ne = fe(te, -((te.getDay() + 6) % 7)), re = h ?? y["aria-label"] ?? x("datePicker.label");
|
|
3951
|
+
return /* @__PURE__ */ X(t, {
|
|
3952
|
+
name: "date-picker",
|
|
3953
|
+
...y,
|
|
3954
|
+
style: {
|
|
3955
|
+
position: "relative",
|
|
3956
|
+
...y.style
|
|
3957
|
+
},
|
|
3958
|
+
children: [
|
|
3959
|
+
h && /* @__PURE__ */ Y(G, { children: h }),
|
|
3960
|
+
/* @__PURE__ */ Y(j, {
|
|
3961
|
+
id: y.id ?? b.id,
|
|
3962
|
+
value: D ?? E,
|
|
3963
|
+
name: g,
|
|
3964
|
+
size: v,
|
|
3965
|
+
"aria-label": re,
|
|
3966
|
+
"aria-labelledby": y["aria-labelledby"],
|
|
3967
|
+
"aria-describedby": y["aria-describedby"],
|
|
3968
|
+
placeholder: m ?? x("datePicker.placeholder"),
|
|
3969
|
+
disabled: c ?? b.disabled,
|
|
3970
|
+
readOnly: l ?? b.readOnly,
|
|
3971
|
+
required: u ?? b.required,
|
|
3972
|
+
invalid: f ?? b.invalid,
|
|
3973
|
+
onClick: () => F(!k),
|
|
3974
|
+
onBlur: ee,
|
|
3975
|
+
onConfirm: () => {
|
|
3976
|
+
ee(), F(!1);
|
|
3977
|
+
},
|
|
3978
|
+
onChange: (e) => {
|
|
3979
|
+
if (!C) {
|
|
3980
|
+
if (O(e), !e) R("");
|
|
3981
|
+
else {
|
|
3982
|
+
let t = Oe(e, !0);
|
|
3983
|
+
t && L(me(t)) && (R(me(t)), N(Te(t)));
|
|
3984
|
+
}
|
|
3985
|
+
}
|
|
3986
|
+
}
|
|
3987
|
+
}),
|
|
3988
|
+
p && E && !C && /* @__PURE__ */ Y(I, {
|
|
3989
|
+
variant: "ghost",
|
|
3990
|
+
"aria-label": x("datePicker.clear"),
|
|
3991
|
+
onTouchStart: () => {
|
|
3992
|
+
P.current = !0;
|
|
3993
|
+
},
|
|
3994
|
+
onTouchCancel: () => {
|
|
3995
|
+
P.current = !1;
|
|
3996
|
+
},
|
|
3997
|
+
onClick: () => {
|
|
3998
|
+
P.current = !1, O(null), R("");
|
|
3999
|
+
},
|
|
4000
|
+
children: "×"
|
|
4001
|
+
}),
|
|
4002
|
+
k && !C && /* @__PURE__ */ X(Fe, { children: [/* @__PURE__ */ Y(K, {
|
|
4003
|
+
className: "mn-time-backdrop",
|
|
4004
|
+
onClick: () => F(!1)
|
|
4005
|
+
}), /* @__PURE__ */ X(K, {
|
|
4006
|
+
className: "mn-calendar mn-time-panel",
|
|
4007
|
+
role: "dialog",
|
|
4008
|
+
"aria-label": re,
|
|
4009
|
+
style: {
|
|
4010
|
+
display: "block",
|
|
4011
|
+
width: "320px",
|
|
4012
|
+
maxWidth: "calc(100vw - 32px)"
|
|
4013
|
+
},
|
|
4014
|
+
children: [
|
|
4015
|
+
/* @__PURE__ */ X(K, {
|
|
4016
|
+
className: "mn-row",
|
|
4017
|
+
children: [
|
|
4018
|
+
/* @__PURE__ */ Y(I, {
|
|
4019
|
+
variant: "ghost",
|
|
4020
|
+
"aria-label": x("monthCalendar.previousMonth"),
|
|
4021
|
+
onClick: () => N(Te(M, -1)),
|
|
4022
|
+
children: "‹"
|
|
4023
|
+
}),
|
|
4024
|
+
/* @__PURE__ */ Y(G, { children: new Intl.DateTimeFormat(_ ?? S, {
|
|
4025
|
+
month: "long",
|
|
4026
|
+
year: "numeric"
|
|
4027
|
+
}).format(M) }),
|
|
4028
|
+
/* @__PURE__ */ Y(I, {
|
|
4029
|
+
variant: "ghost",
|
|
4030
|
+
"aria-label": x("monthCalendar.nextMonth"),
|
|
4031
|
+
onClick: () => N(Te(M, 1)),
|
|
4032
|
+
children: "›"
|
|
4033
|
+
})
|
|
4034
|
+
]
|
|
4035
|
+
}),
|
|
4036
|
+
/* @__PURE__ */ X(K, {
|
|
4037
|
+
className: "mn-calendar-grid",
|
|
4038
|
+
role: "grid",
|
|
4039
|
+
children: [[
|
|
4040
|
+
"mon",
|
|
4041
|
+
"tue",
|
|
4042
|
+
"wed",
|
|
4043
|
+
"thu",
|
|
4044
|
+
"fri",
|
|
4045
|
+
"sat",
|
|
4046
|
+
"sun"
|
|
4047
|
+
].map((e) => /* @__PURE__ */ Y(G, {
|
|
4048
|
+
role: "columnheader",
|
|
4049
|
+
children: x(`monthCalendar.weekdays.${e}`)
|
|
4050
|
+
}, e)), Array.from({ length: 42 }, (e, t) => fe(ne, t)).map((e) => {
|
|
4051
|
+
let t = me(e);
|
|
4052
|
+
return /* @__PURE__ */ Y(I, {
|
|
4053
|
+
role: "gridcell",
|
|
4054
|
+
variant: "ghost",
|
|
4055
|
+
className: "mn-calendar-day",
|
|
4056
|
+
"aria-label": t,
|
|
4057
|
+
"aria-selected": t === E,
|
|
4058
|
+
active: t === E,
|
|
4059
|
+
disabled: !L(t),
|
|
4060
|
+
onTouchStart: () => {
|
|
4061
|
+
P.current = !0;
|
|
4062
|
+
},
|
|
4063
|
+
onTouchCancel: () => {
|
|
4064
|
+
P.current = !1;
|
|
4065
|
+
},
|
|
4066
|
+
onClick: () => z(t),
|
|
4067
|
+
children: e.getDate()
|
|
4068
|
+
}, t);
|
|
4069
|
+
})]
|
|
4070
|
+
}),
|
|
4071
|
+
/* @__PURE__ */ Y(I, {
|
|
4072
|
+
variant: "ghost",
|
|
4073
|
+
disabled: !L(me(/* @__PURE__ */ new Date())),
|
|
4074
|
+
onClick: () => z(me(/* @__PURE__ */ new Date())),
|
|
4075
|
+
children: x("datePicker.today")
|
|
4076
|
+
}),
|
|
4077
|
+
/* @__PURE__ */ Y(I, {
|
|
4078
|
+
variant: "ghost",
|
|
4079
|
+
onClick: () => F(!1),
|
|
4080
|
+
children: x("modal.close")
|
|
4081
|
+
})
|
|
4082
|
+
]
|
|
4083
|
+
})] })
|
|
4084
|
+
]
|
|
4085
|
+
});
|
|
4086
|
+
}
|
|
4087
|
+
//#endregion
|
|
4088
|
+
export { Br as Alert, gi as AppShell, y as AutoComplete, Or as Avatar, kr as AvatarGroup, Ar as Badge, ii as Box, I as Button, Mr as Card, Ir as CardContent, Fr as CardDescription, Lr as CardFooter, Nr as CardHeader, Pr as CardTitle, M as Cascader, F as Checkbox, x as CheckboxGroup, ei as CodeBlock, Vt as CommandDialog, D as ConfigProvider, Ct as ConfirmDialog, Et as ConfirmProvider, Bt as ContextMenu, Ei as DataTable, ji as DatePicker, Zr as DescriptionItem, Xr as DescriptionList, Ur as Divider, pt as Drawer, ut as DrawerBody, ft as DrawerClose, ct as DrawerContent, dt as DrawerFooter, lt as DrawerHeader, ot as DrawerRoot, st as DrawerTrigger, Wr as Empty, k as FormControl, L as FormErrorMessage, S as FormField, C as FormHelperText, N as FormLabel, ui as FormLayout, li as GridItem, oi as HStack, ni as HtmlPreview, zr as IconButton, j as Input, A as JsonField, T as KeyValueEditor, Qr as List, $r as ListItem, Jr as LoadingState, zt as Menu, At as MenuCheckboxItem, Mt as MenuGroup, kt as MenuItem, Nt as MenuLabel, jt as MenuRadioItem, Pt as MenuSeparator, at as Modal, rt as ModalBody, Qe as ModalClose, et as ModalContent, it as ModalFooter, nt as ModalHeader, Ye as ModalRoot, Ze as ModalTrigger, Oi as MonthCalendar, qe as NavTree, w as NumberInput, fi as Page, pi as PageHeader, mi as PageSection, Ge as PageTab, We as PageTabs, Ke as Pagination, l as PaletteToggle, ht as Popover, _t as PopoverAnchor, vt as PopoverClose, yt as PopoverContent, gt as PopoverTrigger, u as PresetToggle, qr as ProgressIndicator, ti as Prose, v as Radio, R as RadioGroup, te as Rating, b as RatingScale, ci as ResponsiveGrid, z as Select, m as SelectGroup, n as SelectItem, ee as SelectLabel, h as SelectSeparator, Gr as Skeleton, Kr as SkeletonText, di as SplitLayout, ai as Stack, Rr as StatCard, He as Steps, P as Switch, Be as Tab, ze as TabList, Ve as TabPanel, Ti as Table, bi as TableBody, Ci as TableCell, wi as TableCellContent, yi as TableHead, Si as TableHeader, vi as TableRoot, xi as TableRow, Le as Tabs, Hr as Tag, i as TagInput, Yr as TextLink, r as Textarea, f as ThemeProvider, a as ThemeToggle, ki as TimePicker, qt as ToastProvider, hi as Toolbar, xt as Tooltip, St as TooltipProvider, Ai as Upload, si as VStack, Di as VirtualList, wt as confirm, E as miniTokenClassNames, Kt as toast, Dt as useConfirm, d as useFieldState, s as useI18n, c as useOptionalTheme, p as useTheme, ne as useThemeTokens, Jt as useToast };
|