@pittorica/dialog-react 0.23.2 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Dialog.d.ts +29 -15
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/index.js +853 -856
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as Y, jsxs as
|
|
1
|
+
import { jsx as Y, jsxs as bt, Fragment as ht } from "react/jsx-runtime";
|
|
2
2
|
import * as ir from "react";
|
|
3
|
-
import
|
|
4
|
-
import { createPortal as
|
|
5
|
-
function
|
|
3
|
+
import Q, { useState as fe, createContext as Pr, forwardRef as _r, useRef as Oe, useCallback as pe, useEffect as we, useMemo as gt, Fragment as Et, PureComponent as Tt, useId as ur, useLayoutEffect as xt, use as Ot } from "react";
|
|
4
|
+
import { createPortal as wt } from "react-dom";
|
|
5
|
+
function St(e, r) {
|
|
6
6
|
if (e == null) return {};
|
|
7
7
|
var t = {};
|
|
8
8
|
for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
|
|
@@ -11,19 +11,19 @@ function Ot(e, r) {
|
|
|
11
11
|
}
|
|
12
12
|
return t;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function ye() {
|
|
15
|
+
return ye = Object.assign ? Object.assign.bind() : function(e) {
|
|
16
16
|
for (var r = 1; r < arguments.length; r++) {
|
|
17
17
|
var t = arguments[r];
|
|
18
18
|
for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
|
-
},
|
|
21
|
+
}, ye.apply(null, arguments);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Pt(e) {
|
|
24
24
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
25
25
|
}
|
|
26
|
-
var ke = { exports: {} },
|
|
26
|
+
var ke = { exports: {} }, xe = { exports: {} }, N = {};
|
|
27
27
|
/** @license React v16.13.1
|
|
28
28
|
* react-is.production.min.js
|
|
29
29
|
*
|
|
@@ -33,29 +33,29 @@ var ke = { exports: {} }, Oe = { exports: {} }, $ = {};
|
|
|
33
33
|
* LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
35
|
var cr;
|
|
36
|
-
function
|
|
37
|
-
if (cr) return
|
|
36
|
+
function _t() {
|
|
37
|
+
if (cr) return N;
|
|
38
38
|
cr = 1;
|
|
39
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110,
|
|
40
|
-
function
|
|
39
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, l = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, E = e ? Symbol.for("react.lazy") : 60116, b = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
|
|
40
|
+
function T(s) {
|
|
41
41
|
if (typeof s == "object" && s !== null) {
|
|
42
42
|
var k = s.$$typeof;
|
|
43
43
|
switch (k) {
|
|
44
44
|
case r:
|
|
45
45
|
switch (s = s.type, s) {
|
|
46
|
-
case
|
|
46
|
+
case y:
|
|
47
47
|
case f:
|
|
48
48
|
case n:
|
|
49
49
|
case a:
|
|
50
50
|
case o:
|
|
51
|
-
case
|
|
51
|
+
case l:
|
|
52
52
|
return s;
|
|
53
53
|
default:
|
|
54
54
|
switch (s = s && s.$$typeof, s) {
|
|
55
55
|
case u:
|
|
56
56
|
case v:
|
|
57
|
+
case E:
|
|
57
58
|
case g:
|
|
58
|
-
case h:
|
|
59
59
|
case i:
|
|
60
60
|
return s;
|
|
61
61
|
default:
|
|
@@ -67,38 +67,38 @@ function xt() {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
70
|
+
function A(s) {
|
|
71
|
+
return T(s) === f;
|
|
72
72
|
}
|
|
73
|
-
return
|
|
74
|
-
return
|
|
75
|
-
},
|
|
76
|
-
return
|
|
77
|
-
},
|
|
78
|
-
return
|
|
79
|
-
},
|
|
73
|
+
return N.AsyncMode = y, N.ConcurrentMode = f, N.ContextConsumer = u, N.ContextProvider = i, N.Element = r, N.ForwardRef = v, N.Fragment = n, N.Lazy = E, N.Memo = g, N.Portal = t, N.Profiler = a, N.StrictMode = o, N.Suspense = l, N.isAsyncMode = function(s) {
|
|
74
|
+
return A(s) || T(s) === y;
|
|
75
|
+
}, N.isConcurrentMode = A, N.isContextConsumer = function(s) {
|
|
76
|
+
return T(s) === u;
|
|
77
|
+
}, N.isContextProvider = function(s) {
|
|
78
|
+
return T(s) === i;
|
|
79
|
+
}, N.isElement = function(s) {
|
|
80
80
|
return typeof s == "object" && s !== null && s.$$typeof === r;
|
|
81
|
-
},
|
|
82
|
-
return
|
|
83
|
-
},
|
|
84
|
-
return
|
|
85
|
-
},
|
|
86
|
-
return
|
|
87
|
-
},
|
|
88
|
-
return
|
|
89
|
-
},
|
|
90
|
-
return
|
|
91
|
-
},
|
|
92
|
-
return
|
|
93
|
-
},
|
|
94
|
-
return
|
|
95
|
-
},
|
|
96
|
-
return
|
|
97
|
-
},
|
|
98
|
-
return typeof s == "string" || typeof s == "function" || s === n || s === f || s === a || s === o || s ===
|
|
99
|
-
},
|
|
81
|
+
}, N.isForwardRef = function(s) {
|
|
82
|
+
return T(s) === v;
|
|
83
|
+
}, N.isFragment = function(s) {
|
|
84
|
+
return T(s) === n;
|
|
85
|
+
}, N.isLazy = function(s) {
|
|
86
|
+
return T(s) === E;
|
|
87
|
+
}, N.isMemo = function(s) {
|
|
88
|
+
return T(s) === g;
|
|
89
|
+
}, N.isPortal = function(s) {
|
|
90
|
+
return T(s) === t;
|
|
91
|
+
}, N.isProfiler = function(s) {
|
|
92
|
+
return T(s) === a;
|
|
93
|
+
}, N.isStrictMode = function(s) {
|
|
94
|
+
return T(s) === o;
|
|
95
|
+
}, N.isSuspense = function(s) {
|
|
96
|
+
return T(s) === l;
|
|
97
|
+
}, N.isValidElementType = function(s) {
|
|
98
|
+
return typeof s == "string" || typeof s == "function" || s === n || s === f || s === a || s === o || s === l || s === p || typeof s == "object" && s !== null && (s.$$typeof === E || s.$$typeof === g || s.$$typeof === i || s.$$typeof === u || s.$$typeof === v || s.$$typeof === w || s.$$typeof === $ || s.$$typeof === x || s.$$typeof === b);
|
|
99
|
+
}, N.typeOf = T, N;
|
|
100
100
|
}
|
|
101
|
-
var
|
|
101
|
+
var D = {};
|
|
102
102
|
/** @license React v16.13.1
|
|
103
103
|
* react-is.development.js
|
|
104
104
|
*
|
|
@@ -108,91 +108,91 @@ var N = {};
|
|
|
108
108
|
* LICENSE file in the root directory of this source tree.
|
|
109
109
|
*/
|
|
110
110
|
var sr;
|
|
111
|
-
function
|
|
111
|
+
function Ft() {
|
|
112
112
|
return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
113
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110,
|
|
114
|
-
function
|
|
115
|
-
return typeof
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
function
|
|
119
|
-
if (typeof
|
|
120
|
-
var
|
|
121
|
-
switch (
|
|
113
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, y = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, l = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, E = e ? Symbol.for("react.lazy") : 60116, b = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
|
|
114
|
+
function T(d) {
|
|
115
|
+
return typeof d == "string" || typeof d == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
116
|
+
d === n || d === f || d === a || d === o || d === l || d === p || typeof d == "object" && d !== null && (d.$$typeof === E || d.$$typeof === g || d.$$typeof === i || d.$$typeof === u || d.$$typeof === v || d.$$typeof === w || d.$$typeof === $ || d.$$typeof === x || d.$$typeof === b);
|
|
117
|
+
}
|
|
118
|
+
function A(d) {
|
|
119
|
+
if (typeof d == "object" && d !== null) {
|
|
120
|
+
var B = d.$$typeof;
|
|
121
|
+
switch (B) {
|
|
122
122
|
case r:
|
|
123
|
-
var ue =
|
|
123
|
+
var ue = d.type;
|
|
124
124
|
switch (ue) {
|
|
125
|
-
case
|
|
125
|
+
case y:
|
|
126
126
|
case f:
|
|
127
127
|
case n:
|
|
128
128
|
case a:
|
|
129
129
|
case o:
|
|
130
|
-
case
|
|
130
|
+
case l:
|
|
131
131
|
return ue;
|
|
132
132
|
default:
|
|
133
133
|
var Te = ue && ue.$$typeof;
|
|
134
134
|
switch (Te) {
|
|
135
135
|
case u:
|
|
136
136
|
case v:
|
|
137
|
+
case E:
|
|
137
138
|
case g:
|
|
138
|
-
case h:
|
|
139
139
|
case i:
|
|
140
140
|
return Te;
|
|
141
141
|
default:
|
|
142
|
-
return
|
|
142
|
+
return B;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
case t:
|
|
146
|
-
return
|
|
146
|
+
return B;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
var s =
|
|
151
|
-
function ie(
|
|
152
|
-
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), c(
|
|
150
|
+
var s = y, k = f, U = u, z = i, h = r, H = v, te = n, ne = E, X = g, V = t, oe = a, q = o, J = l, ae = !1;
|
|
151
|
+
function ie(d) {
|
|
152
|
+
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), c(d) || A(d) === y;
|
|
153
153
|
}
|
|
154
|
-
function c(
|
|
155
|
-
return
|
|
154
|
+
function c(d) {
|
|
155
|
+
return A(d) === f;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
157
|
+
function m(d) {
|
|
158
|
+
return A(d) === u;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
return
|
|
160
|
+
function P(d) {
|
|
161
|
+
return A(d) === i;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
return typeof
|
|
163
|
+
function S(d) {
|
|
164
|
+
return typeof d == "object" && d !== null && d.$$typeof === r;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
return
|
|
166
|
+
function O(d) {
|
|
167
|
+
return A(d) === v;
|
|
168
168
|
}
|
|
169
|
-
function R(
|
|
170
|
-
return
|
|
169
|
+
function R(d) {
|
|
170
|
+
return A(d) === n;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
return
|
|
172
|
+
function _(d) {
|
|
173
|
+
return A(d) === E;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return
|
|
175
|
+
function F(d) {
|
|
176
|
+
return A(d) === g;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return
|
|
178
|
+
function I(d) {
|
|
179
|
+
return A(d) === t;
|
|
180
180
|
}
|
|
181
|
-
function M(
|
|
182
|
-
return
|
|
181
|
+
function M(d) {
|
|
182
|
+
return A(d) === a;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
return
|
|
184
|
+
function C(d) {
|
|
185
|
+
return A(d) === o;
|
|
186
186
|
}
|
|
187
|
-
function L(
|
|
188
|
-
return
|
|
187
|
+
function L(d) {
|
|
188
|
+
return A(d) === l;
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
}()),
|
|
190
|
+
D.AsyncMode = s, D.ConcurrentMode = k, D.ContextConsumer = U, D.ContextProvider = z, D.Element = h, D.ForwardRef = H, D.Fragment = te, D.Lazy = ne, D.Memo = X, D.Portal = V, D.Profiler = oe, D.StrictMode = q, D.Suspense = J, D.isAsyncMode = ie, D.isConcurrentMode = c, D.isContextConsumer = m, D.isContextProvider = P, D.isElement = S, D.isForwardRef = O, D.isFragment = R, D.isLazy = _, D.isMemo = F, D.isPortal = I, D.isProfiler = M, D.isStrictMode = C, D.isSuspense = L, D.isValidElementType = T, D.typeOf = A;
|
|
191
|
+
}()), D;
|
|
192
192
|
}
|
|
193
193
|
var fr;
|
|
194
|
-
function
|
|
195
|
-
return fr || (fr = 1, process.env.NODE_ENV === "production" ?
|
|
194
|
+
function Fr() {
|
|
195
|
+
return fr || (fr = 1, process.env.NODE_ENV === "production" ? xe.exports = _t() : xe.exports = Ft()), xe.exports;
|
|
196
196
|
}
|
|
197
197
|
/*
|
|
198
198
|
object-assign
|
|
@@ -200,7 +200,7 @@ object-assign
|
|
|
200
200
|
@license MIT
|
|
201
201
|
*/
|
|
202
202
|
var _e, dr;
|
|
203
|
-
function
|
|
203
|
+
function At() {
|
|
204
204
|
if (dr) return _e;
|
|
205
205
|
dr = 1;
|
|
206
206
|
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
@@ -218,10 +218,10 @@ function Pt() {
|
|
|
218
218
|
return !1;
|
|
219
219
|
for (var i = {}, u = 0; u < 10; u++)
|
|
220
220
|
i["_" + String.fromCharCode(u)] = u;
|
|
221
|
-
var
|
|
221
|
+
var y = Object.getOwnPropertyNames(i).map(function(v) {
|
|
222
222
|
return i[v];
|
|
223
223
|
});
|
|
224
|
-
if (
|
|
224
|
+
if (y.join("") !== "0123456789")
|
|
225
225
|
return !1;
|
|
226
226
|
var f = {};
|
|
227
227
|
return "abcdefghijklmnopqrst".split("").forEach(function(v) {
|
|
@@ -232,38 +232,38 @@ function Pt() {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
return _e = o() ? Object.assign : function(a, i) {
|
|
235
|
-
for (var u,
|
|
235
|
+
for (var u, y = n(a), f, v = 1; v < arguments.length; v++) {
|
|
236
236
|
u = Object(arguments[v]);
|
|
237
|
-
for (var
|
|
238
|
-
r.call(u,
|
|
237
|
+
for (var l in u)
|
|
238
|
+
r.call(u, l) && (y[l] = u[l]);
|
|
239
239
|
if (e) {
|
|
240
240
|
f = e(u);
|
|
241
241
|
for (var p = 0; p < f.length; p++)
|
|
242
|
-
t.call(u, f[p]) && (
|
|
242
|
+
t.call(u, f[p]) && (y[f[p]] = u[f[p]]);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
return
|
|
245
|
+
return y;
|
|
246
246
|
}, _e;
|
|
247
247
|
}
|
|
248
248
|
var Fe, lr;
|
|
249
|
-
function
|
|
249
|
+
function ze() {
|
|
250
250
|
if (lr) return Fe;
|
|
251
251
|
lr = 1;
|
|
252
252
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
253
253
|
return Fe = e, Fe;
|
|
254
254
|
}
|
|
255
|
-
var
|
|
256
|
-
function
|
|
257
|
-
return vr || (vr = 1,
|
|
255
|
+
var Ae, vr;
|
|
256
|
+
function Ar() {
|
|
257
|
+
return vr || (vr = 1, Ae = Function.call.bind(Object.prototype.hasOwnProperty)), Ae;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
if (pr) return
|
|
259
|
+
var Re, pr;
|
|
260
|
+
function Rt() {
|
|
261
|
+
if (pr) return Re;
|
|
262
262
|
pr = 1;
|
|
263
263
|
var e = function() {
|
|
264
264
|
};
|
|
265
265
|
if (process.env.NODE_ENV !== "production") {
|
|
266
|
-
var r =
|
|
266
|
+
var r = ze(), t = {}, n = Ar();
|
|
267
267
|
e = function(a) {
|
|
268
268
|
var i = "Warning: " + a;
|
|
269
269
|
typeof console < "u" && console.error(i);
|
|
@@ -273,29 +273,29 @@ function _t() {
|
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
function o(a, i, u,
|
|
276
|
+
function o(a, i, u, y, f) {
|
|
277
277
|
if (process.env.NODE_ENV !== "production") {
|
|
278
278
|
for (var v in a)
|
|
279
279
|
if (n(a, v)) {
|
|
280
|
-
var
|
|
280
|
+
var l;
|
|
281
281
|
try {
|
|
282
282
|
if (typeof a[v] != "function") {
|
|
283
283
|
var p = Error(
|
|
284
|
-
(
|
|
284
|
+
(y || "React class") + ": " + u + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
285
285
|
);
|
|
286
286
|
throw p.name = "Invariant Violation", p;
|
|
287
287
|
}
|
|
288
|
-
|
|
289
|
-
} catch (
|
|
290
|
-
|
|
288
|
+
l = a[v](i, v, y, u, null, r);
|
|
289
|
+
} catch (E) {
|
|
290
|
+
l = E;
|
|
291
291
|
}
|
|
292
|
-
if (
|
|
293
|
-
(
|
|
294
|
-
),
|
|
295
|
-
t[
|
|
296
|
-
var
|
|
292
|
+
if (l && !(l instanceof Error) && e(
|
|
293
|
+
(y || "React class") + ": type specification of " + u + " `" + v + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof l + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
294
|
+
), l instanceof Error && !(l.message in t)) {
|
|
295
|
+
t[l.message] = !0;
|
|
296
|
+
var g = f ? f() : "";
|
|
297
297
|
e(
|
|
298
|
-
"Failed " + u + " type: " +
|
|
298
|
+
"Failed " + u + " type: " + l.message + (g ?? "")
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
@@ -303,258 +303,258 @@ function _t() {
|
|
|
303
303
|
}
|
|
304
304
|
return o.resetWarningCache = function() {
|
|
305
305
|
process.env.NODE_ENV !== "production" && (t = {});
|
|
306
|
-
},
|
|
306
|
+
}, Re = o, Re;
|
|
307
307
|
}
|
|
308
|
-
var Ie,
|
|
309
|
-
function
|
|
310
|
-
if (
|
|
311
|
-
|
|
312
|
-
var e =
|
|
308
|
+
var Ie, mr;
|
|
309
|
+
function It() {
|
|
310
|
+
if (mr) return Ie;
|
|
311
|
+
mr = 1;
|
|
312
|
+
var e = Fr(), r = At(), t = ze(), n = Ar(), o = Rt(), a = function() {
|
|
313
313
|
};
|
|
314
314
|
process.env.NODE_ENV !== "production" && (a = function(u) {
|
|
315
|
-
var
|
|
316
|
-
typeof console < "u" && console.error(
|
|
315
|
+
var y = "Warning: " + u;
|
|
316
|
+
typeof console < "u" && console.error(y);
|
|
317
317
|
try {
|
|
318
|
-
throw new Error(
|
|
318
|
+
throw new Error(y);
|
|
319
319
|
} catch {
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
322
|
function i() {
|
|
323
323
|
return null;
|
|
324
324
|
}
|
|
325
|
-
return Ie = function(u,
|
|
325
|
+
return Ie = function(u, y) {
|
|
326
326
|
var f = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
|
|
327
|
-
function
|
|
328
|
-
var
|
|
329
|
-
if (typeof
|
|
330
|
-
return
|
|
331
|
-
}
|
|
332
|
-
var p = "<<anonymous>>",
|
|
333
|
-
array:
|
|
334
|
-
bigint:
|
|
335
|
-
bool:
|
|
336
|
-
func:
|
|
337
|
-
number:
|
|
338
|
-
object:
|
|
339
|
-
string:
|
|
340
|
-
symbol:
|
|
341
|
-
any:
|
|
342
|
-
arrayOf:
|
|
343
|
-
element:
|
|
327
|
+
function l(c) {
|
|
328
|
+
var m = c && (f && c[f] || c[v]);
|
|
329
|
+
if (typeof m == "function")
|
|
330
|
+
return m;
|
|
331
|
+
}
|
|
332
|
+
var p = "<<anonymous>>", g = {
|
|
333
|
+
array: $("array"),
|
|
334
|
+
bigint: $("bigint"),
|
|
335
|
+
bool: $("boolean"),
|
|
336
|
+
func: $("function"),
|
|
337
|
+
number: $("number"),
|
|
338
|
+
object: $("object"),
|
|
339
|
+
string: $("string"),
|
|
340
|
+
symbol: $("symbol"),
|
|
341
|
+
any: x(),
|
|
342
|
+
arrayOf: T,
|
|
343
|
+
element: A(),
|
|
344
344
|
elementType: s(),
|
|
345
345
|
instanceOf: k,
|
|
346
|
-
node:
|
|
347
|
-
objectOf:
|
|
348
|
-
oneOf:
|
|
349
|
-
oneOfType:
|
|
350
|
-
shape:
|
|
351
|
-
exact:
|
|
346
|
+
node: H(),
|
|
347
|
+
objectOf: z,
|
|
348
|
+
oneOf: U,
|
|
349
|
+
oneOfType: h,
|
|
350
|
+
shape: ne,
|
|
351
|
+
exact: X
|
|
352
352
|
};
|
|
353
|
-
function
|
|
354
|
-
return c ===
|
|
353
|
+
function E(c, m) {
|
|
354
|
+
return c === m ? c !== 0 || 1 / c === 1 / m : c !== c && m !== m;
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
this.message = c, this.data =
|
|
356
|
+
function b(c, m) {
|
|
357
|
+
this.message = c, this.data = m && typeof m == "object" ? m : {}, this.stack = "";
|
|
358
358
|
}
|
|
359
|
-
|
|
360
|
-
function
|
|
359
|
+
b.prototype = Error.prototype;
|
|
360
|
+
function w(c) {
|
|
361
361
|
if (process.env.NODE_ENV !== "production")
|
|
362
|
-
var
|
|
363
|
-
function
|
|
364
|
-
if (
|
|
365
|
-
if (
|
|
366
|
-
var
|
|
362
|
+
var m = {}, P = 0;
|
|
363
|
+
function S(R, _, F, I, M, C, L) {
|
|
364
|
+
if (I = I || p, C = C || F, L !== t) {
|
|
365
|
+
if (y) {
|
|
366
|
+
var d = new Error(
|
|
367
367
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
368
368
|
);
|
|
369
|
-
throw
|
|
369
|
+
throw d.name = "Invariant Violation", d;
|
|
370
370
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
371
|
-
var
|
|
372
|
-
!
|
|
373
|
-
|
|
374
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
375
|
-
),
|
|
371
|
+
var B = I + ":" + F;
|
|
372
|
+
!m[B] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
373
|
+
P < 3 && (a(
|
|
374
|
+
"You are manually calling a React.PropTypes validation function for the `" + C + "` prop on `" + I + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
375
|
+
), m[B] = !0, P++);
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
return
|
|
378
|
+
return _[F] == null ? R ? _[F] === null ? new b("The " + M + " `" + C + "` is marked as required " + ("in `" + I + "`, but its value is `null`.")) : new b("The " + M + " `" + C + "` is marked as required in " + ("`" + I + "`, but its value is `undefined`.")) : null : c(_, F, I, M, C);
|
|
379
379
|
}
|
|
380
|
-
var
|
|
381
|
-
return
|
|
380
|
+
var O = S.bind(null, !1);
|
|
381
|
+
return O.isRequired = S.bind(null, !0), O;
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
function
|
|
385
|
-
var
|
|
383
|
+
function $(c) {
|
|
384
|
+
function m(P, S, O, R, _, F) {
|
|
385
|
+
var I = P[S], M = q(I);
|
|
386
386
|
if (M !== c) {
|
|
387
|
-
var
|
|
388
|
-
return new
|
|
389
|
-
"Invalid " + R + " `" +
|
|
387
|
+
var C = J(I);
|
|
388
|
+
return new b(
|
|
389
|
+
"Invalid " + R + " `" + _ + "` of type " + ("`" + C + "` supplied to `" + O + "`, expected ") + ("`" + c + "`."),
|
|
390
390
|
{ expectedType: c }
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
393
|
return null;
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return w(m);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
397
|
+
function x() {
|
|
398
|
+
return w(i);
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
function
|
|
400
|
+
function T(c) {
|
|
401
|
+
function m(P, S, O, R, _) {
|
|
402
402
|
if (typeof c != "function")
|
|
403
|
-
return new
|
|
404
|
-
var
|
|
405
|
-
if (!Array.isArray(
|
|
406
|
-
var
|
|
407
|
-
return new
|
|
403
|
+
return new b("Property `" + _ + "` of component `" + O + "` has invalid PropType notation inside arrayOf.");
|
|
404
|
+
var F = P[S];
|
|
405
|
+
if (!Array.isArray(F)) {
|
|
406
|
+
var I = q(F);
|
|
407
|
+
return new b("Invalid " + R + " `" + _ + "` of type " + ("`" + I + "` supplied to `" + O + "`, expected an array."));
|
|
408
408
|
}
|
|
409
|
-
for (var M = 0; M <
|
|
410
|
-
var
|
|
411
|
-
if (
|
|
412
|
-
return
|
|
409
|
+
for (var M = 0; M < F.length; M++) {
|
|
410
|
+
var C = c(F, M, O, R, _ + "[" + M + "]", t);
|
|
411
|
+
if (C instanceof Error)
|
|
412
|
+
return C;
|
|
413
413
|
}
|
|
414
414
|
return null;
|
|
415
415
|
}
|
|
416
|
-
return
|
|
417
|
-
}
|
|
418
|
-
function
|
|
419
|
-
function c(
|
|
420
|
-
var
|
|
421
|
-
if (!u(
|
|
422
|
-
var
|
|
423
|
-
return new
|
|
416
|
+
return w(m);
|
|
417
|
+
}
|
|
418
|
+
function A() {
|
|
419
|
+
function c(m, P, S, O, R) {
|
|
420
|
+
var _ = m[P];
|
|
421
|
+
if (!u(_)) {
|
|
422
|
+
var F = q(_);
|
|
423
|
+
return new b("Invalid " + O + " `" + R + "` of type " + ("`" + F + "` supplied to `" + S + "`, expected a single ReactElement."));
|
|
424
424
|
}
|
|
425
425
|
return null;
|
|
426
426
|
}
|
|
427
|
-
return
|
|
427
|
+
return w(c);
|
|
428
428
|
}
|
|
429
429
|
function s() {
|
|
430
|
-
function c(
|
|
431
|
-
var
|
|
432
|
-
if (!e.isValidElementType(
|
|
433
|
-
var
|
|
434
|
-
return new
|
|
430
|
+
function c(m, P, S, O, R) {
|
|
431
|
+
var _ = m[P];
|
|
432
|
+
if (!e.isValidElementType(_)) {
|
|
433
|
+
var F = q(_);
|
|
434
|
+
return new b("Invalid " + O + " `" + R + "` of type " + ("`" + F + "` supplied to `" + S + "`, expected a single ReactElement type."));
|
|
435
435
|
}
|
|
436
436
|
return null;
|
|
437
437
|
}
|
|
438
|
-
return
|
|
438
|
+
return w(c);
|
|
439
439
|
}
|
|
440
440
|
function k(c) {
|
|
441
|
-
function
|
|
442
|
-
if (!(
|
|
443
|
-
var
|
|
444
|
-
return new
|
|
441
|
+
function m(P, S, O, R, _) {
|
|
442
|
+
if (!(P[S] instanceof c)) {
|
|
443
|
+
var F = c.name || p, I = ie(P[S]);
|
|
444
|
+
return new b("Invalid " + R + " `" + _ + "` of type " + ("`" + I + "` supplied to `" + O + "`, expected ") + ("instance of `" + F + "`."));
|
|
445
445
|
}
|
|
446
446
|
return null;
|
|
447
447
|
}
|
|
448
|
-
return
|
|
448
|
+
return w(m);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function U(c) {
|
|
451
451
|
if (!Array.isArray(c))
|
|
452
452
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
453
453
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
454
454
|
) : a("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
455
|
-
function
|
|
456
|
-
for (var
|
|
457
|
-
if (
|
|
455
|
+
function m(P, S, O, R, _) {
|
|
456
|
+
for (var F = P[S], I = 0; I < c.length; I++)
|
|
457
|
+
if (E(F, c[I]))
|
|
458
458
|
return null;
|
|
459
|
-
var M = JSON.stringify(c, function(L,
|
|
460
|
-
var
|
|
461
|
-
return
|
|
459
|
+
var M = JSON.stringify(c, function(L, d) {
|
|
460
|
+
var B = J(d);
|
|
461
|
+
return B === "symbol" ? String(d) : d;
|
|
462
462
|
});
|
|
463
|
-
return new
|
|
463
|
+
return new b("Invalid " + R + " `" + _ + "` of value `" + String(F) + "` " + ("supplied to `" + O + "`, expected one of " + M + "."));
|
|
464
464
|
}
|
|
465
|
-
return
|
|
465
|
+
return w(m);
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
function
|
|
467
|
+
function z(c) {
|
|
468
|
+
function m(P, S, O, R, _) {
|
|
469
469
|
if (typeof c != "function")
|
|
470
|
-
return new
|
|
471
|
-
var
|
|
472
|
-
if (
|
|
473
|
-
return new
|
|
474
|
-
for (var M in
|
|
475
|
-
if (n(
|
|
476
|
-
var
|
|
477
|
-
if (
|
|
478
|
-
return
|
|
470
|
+
return new b("Property `" + _ + "` of component `" + O + "` has invalid PropType notation inside objectOf.");
|
|
471
|
+
var F = P[S], I = q(F);
|
|
472
|
+
if (I !== "object")
|
|
473
|
+
return new b("Invalid " + R + " `" + _ + "` of type " + ("`" + I + "` supplied to `" + O + "`, expected an object."));
|
|
474
|
+
for (var M in F)
|
|
475
|
+
if (n(F, M)) {
|
|
476
|
+
var C = c(F, M, O, R, _ + "." + M, t);
|
|
477
|
+
if (C instanceof Error)
|
|
478
|
+
return C;
|
|
479
479
|
}
|
|
480
480
|
return null;
|
|
481
481
|
}
|
|
482
|
-
return
|
|
482
|
+
return w(m);
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function h(c) {
|
|
485
485
|
if (!Array.isArray(c))
|
|
486
486
|
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), i;
|
|
487
|
-
for (var
|
|
488
|
-
var
|
|
489
|
-
if (typeof
|
|
487
|
+
for (var m = 0; m < c.length; m++) {
|
|
488
|
+
var P = c[m];
|
|
489
|
+
if (typeof P != "function")
|
|
490
490
|
return a(
|
|
491
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(
|
|
491
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(P) + " at index " + m + "."
|
|
492
492
|
), i;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
495
|
-
for (var M = [],
|
|
496
|
-
var L = c[
|
|
497
|
-
if (
|
|
494
|
+
function S(O, R, _, F, I) {
|
|
495
|
+
for (var M = [], C = 0; C < c.length; C++) {
|
|
496
|
+
var L = c[C], d = L(O, R, _, F, I, t);
|
|
497
|
+
if (d == null)
|
|
498
498
|
return null;
|
|
499
|
-
|
|
499
|
+
d.data && n(d.data, "expectedType") && M.push(d.data.expectedType);
|
|
500
500
|
}
|
|
501
|
-
var
|
|
502
|
-
return new
|
|
501
|
+
var B = M.length > 0 ? ", expected one of type [" + M.join(", ") + "]" : "";
|
|
502
|
+
return new b("Invalid " + F + " `" + I + "` supplied to " + ("`" + _ + "`" + B + "."));
|
|
503
503
|
}
|
|
504
|
-
return
|
|
504
|
+
return w(S);
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
function c(
|
|
508
|
-
return
|
|
506
|
+
function H() {
|
|
507
|
+
function c(m, P, S, O, R) {
|
|
508
|
+
return V(m[P]) ? null : new b("Invalid " + O + " `" + R + "` supplied to " + ("`" + S + "`, expected a ReactNode."));
|
|
509
509
|
}
|
|
510
|
-
return
|
|
510
|
+
return w(c);
|
|
511
511
|
}
|
|
512
|
-
function
|
|
513
|
-
return new
|
|
514
|
-
(c || "React class") + ": " +
|
|
512
|
+
function te(c, m, P, S, O) {
|
|
513
|
+
return new b(
|
|
514
|
+
(c || "React class") + ": " + m + " type `" + P + "." + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + O + "`."
|
|
515
515
|
);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
518
|
-
function
|
|
519
|
-
var
|
|
520
|
-
if (
|
|
521
|
-
return new
|
|
517
|
+
function ne(c) {
|
|
518
|
+
function m(P, S, O, R, _) {
|
|
519
|
+
var F = P[S], I = q(F);
|
|
520
|
+
if (I !== "object")
|
|
521
|
+
return new b("Invalid " + R + " `" + _ + "` of type `" + I + "` " + ("supplied to `" + O + "`, expected `object`."));
|
|
522
522
|
for (var M in c) {
|
|
523
|
-
var
|
|
524
|
-
if (typeof
|
|
525
|
-
return
|
|
526
|
-
var L =
|
|
523
|
+
var C = c[M];
|
|
524
|
+
if (typeof C != "function")
|
|
525
|
+
return te(O, R, _, M, J(C));
|
|
526
|
+
var L = C(F, M, O, R, _ + "." + M, t);
|
|
527
527
|
if (L)
|
|
528
528
|
return L;
|
|
529
529
|
}
|
|
530
530
|
return null;
|
|
531
531
|
}
|
|
532
|
-
return
|
|
533
|
-
}
|
|
534
|
-
function
|
|
535
|
-
function
|
|
536
|
-
var
|
|
537
|
-
if (
|
|
538
|
-
return new
|
|
539
|
-
var M = r({},
|
|
540
|
-
for (var
|
|
541
|
-
var L = c[
|
|
542
|
-
if (n(c,
|
|
543
|
-
return
|
|
532
|
+
return w(m);
|
|
533
|
+
}
|
|
534
|
+
function X(c) {
|
|
535
|
+
function m(P, S, O, R, _) {
|
|
536
|
+
var F = P[S], I = q(F);
|
|
537
|
+
if (I !== "object")
|
|
538
|
+
return new b("Invalid " + R + " `" + _ + "` of type `" + I + "` " + ("supplied to `" + O + "`, expected `object`."));
|
|
539
|
+
var M = r({}, P[S], c);
|
|
540
|
+
for (var C in M) {
|
|
541
|
+
var L = c[C];
|
|
542
|
+
if (n(c, C) && typeof L != "function")
|
|
543
|
+
return te(O, R, _, C, J(L));
|
|
544
544
|
if (!L)
|
|
545
|
-
return new
|
|
546
|
-
"Invalid " + R + " `" +
|
|
545
|
+
return new b(
|
|
546
|
+
"Invalid " + R + " `" + _ + "` key `" + C + "` supplied to `" + O + "`.\nBad object: " + JSON.stringify(P[S], null, " ") + `
|
|
547
547
|
Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
548
548
|
);
|
|
549
|
-
var
|
|
550
|
-
if (
|
|
551
|
-
return
|
|
549
|
+
var d = L(F, C, O, R, _ + "." + C, t);
|
|
550
|
+
if (d)
|
|
551
|
+
return d;
|
|
552
552
|
}
|
|
553
553
|
return null;
|
|
554
554
|
}
|
|
555
|
-
return
|
|
555
|
+
return w(m);
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function V(c) {
|
|
558
558
|
switch (typeof c) {
|
|
559
559
|
case "number":
|
|
560
560
|
case "string":
|
|
@@ -564,20 +564,20 @@ Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
|
564
564
|
return !c;
|
|
565
565
|
case "object":
|
|
566
566
|
if (Array.isArray(c))
|
|
567
|
-
return c.every(
|
|
567
|
+
return c.every(V);
|
|
568
568
|
if (c === null || u(c))
|
|
569
569
|
return !0;
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
var
|
|
573
|
-
if (
|
|
574
|
-
for (; !(
|
|
575
|
-
if (!
|
|
570
|
+
var m = l(c);
|
|
571
|
+
if (m) {
|
|
572
|
+
var P = m.call(c), S;
|
|
573
|
+
if (m !== c.entries) {
|
|
574
|
+
for (; !(S = P.next()).done; )
|
|
575
|
+
if (!V(S.value))
|
|
576
576
|
return !1;
|
|
577
577
|
} else
|
|
578
|
-
for (; !(
|
|
579
|
-
var
|
|
580
|
-
if (
|
|
578
|
+
for (; !(S = P.next()).done; ) {
|
|
579
|
+
var O = S.value;
|
|
580
|
+
if (O && !V(O[1]))
|
|
581
581
|
return !1;
|
|
582
582
|
}
|
|
583
583
|
} else
|
|
@@ -587,57 +587,57 @@ Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
|
587
587
|
return !1;
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
function oe(c,
|
|
591
|
-
return c === "symbol" ? !0 :
|
|
590
|
+
function oe(c, m) {
|
|
591
|
+
return c === "symbol" ? !0 : m ? m["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && m instanceof Symbol : !1;
|
|
592
592
|
}
|
|
593
593
|
function q(c) {
|
|
594
|
-
var
|
|
595
|
-
return Array.isArray(c) ? "array" : c instanceof RegExp ? "object" : oe(
|
|
594
|
+
var m = typeof c;
|
|
595
|
+
return Array.isArray(c) ? "array" : c instanceof RegExp ? "object" : oe(m, c) ? "symbol" : m;
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function J(c) {
|
|
598
598
|
if (typeof c > "u" || c === null)
|
|
599
599
|
return "" + c;
|
|
600
|
-
var
|
|
601
|
-
if (
|
|
600
|
+
var m = q(c);
|
|
601
|
+
if (m === "object") {
|
|
602
602
|
if (c instanceof Date)
|
|
603
603
|
return "date";
|
|
604
604
|
if (c instanceof RegExp)
|
|
605
605
|
return "regexp";
|
|
606
606
|
}
|
|
607
|
-
return
|
|
607
|
+
return m;
|
|
608
608
|
}
|
|
609
609
|
function ae(c) {
|
|
610
|
-
var
|
|
611
|
-
switch (
|
|
610
|
+
var m = J(c);
|
|
611
|
+
switch (m) {
|
|
612
612
|
case "array":
|
|
613
613
|
case "object":
|
|
614
|
-
return "an " +
|
|
614
|
+
return "an " + m;
|
|
615
615
|
case "boolean":
|
|
616
616
|
case "date":
|
|
617
617
|
case "regexp":
|
|
618
|
-
return "a " +
|
|
618
|
+
return "a " + m;
|
|
619
619
|
default:
|
|
620
|
-
return
|
|
620
|
+
return m;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
function ie(c) {
|
|
624
624
|
return !c.constructor || !c.constructor.name ? p : c.constructor.name;
|
|
625
625
|
}
|
|
626
|
-
return
|
|
626
|
+
return g.checkPropTypes = o, g.resetWarningCache = o.resetWarningCache, g.PropTypes = g, g;
|
|
627
627
|
}, Ie;
|
|
628
628
|
}
|
|
629
|
-
var Ce,
|
|
630
|
-
function
|
|
631
|
-
if (
|
|
632
|
-
|
|
633
|
-
var e =
|
|
629
|
+
var Ce, yr;
|
|
630
|
+
function Ct() {
|
|
631
|
+
if (yr) return Ce;
|
|
632
|
+
yr = 1;
|
|
633
|
+
var e = ze();
|
|
634
634
|
function r() {
|
|
635
635
|
}
|
|
636
636
|
function t() {
|
|
637
637
|
}
|
|
638
638
|
return t.resetWarningCache = r, Ce = function() {
|
|
639
|
-
function n(i, u,
|
|
640
|
-
if (
|
|
639
|
+
function n(i, u, y, f, v, l) {
|
|
640
|
+
if (l !== e) {
|
|
641
641
|
var p = new Error(
|
|
642
642
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
643
643
|
);
|
|
@@ -675,17 +675,17 @@ function Rt() {
|
|
|
675
675
|
}, Ce;
|
|
676
676
|
}
|
|
677
677
|
if (process.env.NODE_ENV !== "production") {
|
|
678
|
-
var
|
|
679
|
-
ke.exports =
|
|
678
|
+
var $t = Fr(), Mt = !0;
|
|
679
|
+
ke.exports = It()($t.isElement, Mt);
|
|
680
680
|
} else
|
|
681
|
-
ke.exports =
|
|
681
|
+
ke.exports = Ct()();
|
|
682
682
|
var j = ke.exports;
|
|
683
|
-
const Rr = /* @__PURE__ */
|
|
684
|
-
var Le = "data-focus-lock",
|
|
685
|
-
function
|
|
683
|
+
const Rr = /* @__PURE__ */ Pt(j);
|
|
684
|
+
var Le = "data-focus-lock", Ir = "data-focus-lock-disabled", Nt = "data-no-focus-lock", Dt = "data-autofocus-inside", jt = "data-no-autofocus";
|
|
685
|
+
function $e(e, r) {
|
|
686
686
|
return typeof e == "function" ? e(r) : e && (e.current = r), e;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function kt(e, r) {
|
|
689
689
|
var t = fe(function() {
|
|
690
690
|
return {
|
|
691
691
|
// value
|
|
@@ -706,27 +706,27 @@ function Nt(e, r) {
|
|
|
706
706
|
})[0];
|
|
707
707
|
return t.callback = r, t.facade;
|
|
708
708
|
}
|
|
709
|
-
var
|
|
710
|
-
function
|
|
711
|
-
var t =
|
|
709
|
+
var Lt = typeof window < "u" ? ir.useLayoutEffect : ir.useEffect, br = /* @__PURE__ */ new WeakMap();
|
|
710
|
+
function Wt(e, r) {
|
|
711
|
+
var t = kt(null, function(n) {
|
|
712
712
|
return e.forEach(function(o) {
|
|
713
|
-
return
|
|
713
|
+
return $e(o, n);
|
|
714
714
|
});
|
|
715
715
|
});
|
|
716
|
-
return
|
|
716
|
+
return Lt(function() {
|
|
717
717
|
var n = br.get(t);
|
|
718
718
|
if (n) {
|
|
719
719
|
var o = new Set(n), a = new Set(e), i = t.current;
|
|
720
720
|
o.forEach(function(u) {
|
|
721
|
-
a.has(u) ||
|
|
721
|
+
a.has(u) || $e(u, null);
|
|
722
722
|
}), a.forEach(function(u) {
|
|
723
|
-
o.has(u) ||
|
|
723
|
+
o.has(u) || $e(u, i);
|
|
724
724
|
});
|
|
725
725
|
}
|
|
726
726
|
br.set(t, e);
|
|
727
727
|
}, [e]), t;
|
|
728
728
|
}
|
|
729
|
-
var
|
|
729
|
+
var Me = {
|
|
730
730
|
width: "1px",
|
|
731
731
|
height: "0px",
|
|
732
732
|
padding: 0,
|
|
@@ -745,11 +745,11 @@ var We = function() {
|
|
|
745
745
|
return r;
|
|
746
746
|
}, We.apply(this, arguments);
|
|
747
747
|
};
|
|
748
|
-
function
|
|
748
|
+
function Cr(e) {
|
|
749
749
|
return e;
|
|
750
750
|
}
|
|
751
|
-
function
|
|
752
|
-
r === void 0 && (r =
|
|
751
|
+
function $r(e, r) {
|
|
752
|
+
r === void 0 && (r = Cr);
|
|
753
753
|
var t = [], n = !1, o = {
|
|
754
754
|
read: function() {
|
|
755
755
|
if (n)
|
|
@@ -785,11 +785,11 @@ function Cr(e, r) {
|
|
|
785
785
|
var u = t;
|
|
786
786
|
t = [], u.forEach(a), i = t;
|
|
787
787
|
}
|
|
788
|
-
var
|
|
788
|
+
var y = function() {
|
|
789
789
|
var v = i;
|
|
790
790
|
i = [], v.forEach(a);
|
|
791
791
|
}, f = function() {
|
|
792
|
-
return Promise.resolve().then(
|
|
792
|
+
return Promise.resolve().then(y);
|
|
793
793
|
};
|
|
794
794
|
f(), t = {
|
|
795
795
|
push: function(v) {
|
|
@@ -803,102 +803,102 @@ function Cr(e, r) {
|
|
|
803
803
|
};
|
|
804
804
|
return o;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
return r === void 0 && (r =
|
|
806
|
+
function Ge(e, r) {
|
|
807
|
+
return r === void 0 && (r = Cr), $r(e, r);
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function qt(e) {
|
|
810
810
|
e === void 0 && (e = {});
|
|
811
|
-
var r =
|
|
811
|
+
var r = $r(null);
|
|
812
812
|
return r.options = We({ async: !0, ssr: !1 }, e), r;
|
|
813
813
|
}
|
|
814
|
-
var Mr =
|
|
814
|
+
var Mr = Ge({}, function(e) {
|
|
815
815
|
var r = e.target, t = e.currentTarget;
|
|
816
816
|
return {
|
|
817
817
|
target: r,
|
|
818
818
|
currentTarget: t
|
|
819
819
|
};
|
|
820
|
-
}),
|
|
820
|
+
}), Nr = Ge(), Bt = Ge(), Ut = qt({
|
|
821
821
|
async: !0,
|
|
822
822
|
ssr: typeof document < "u"
|
|
823
|
-
}),
|
|
824
|
-
var n, o = fe(), a = o[0], i = o[1], u =
|
|
825
|
-
var ce =
|
|
823
|
+
}), Yt = /* @__PURE__ */ Pr(void 0), zt = [], He = /* @__PURE__ */ _r(function(r, t) {
|
|
824
|
+
var n, o = fe(), a = o[0], i = o[1], u = Oe(), y = Oe(!1), f = Oe(null), v = fe({}), l = v[1], p = r.children, g = r.disabled, E = g === void 0 ? !1 : g, b = r.noFocusGuards, w = b === void 0 ? !1 : b, $ = r.persistentFocus, x = $ === void 0 ? !1 : $, T = r.crossFrame, A = T === void 0 ? !0 : T, s = r.autoFocus, k = s === void 0 ? !0 : s, U = r.allowTextSelection, z = r.group, h = r.className, H = r.whiteList, te = r.hasPositiveIndices, ne = r.shards, X = ne === void 0 ? zt : ne, V = r.as, oe = V === void 0 ? "div" : V, q = r.lockProps, J = q === void 0 ? {} : q, ae = r.sideCar, ie = r.returnFocus, c = ie === void 0 ? !1 : ie, m = r.focusOptions, P = r.onActivation, S = r.onDeactivation, O = fe({}), R = O[0], _ = pe(function(K) {
|
|
825
|
+
var ce = K.captureFocusRestore;
|
|
826
826
|
if (!f.current) {
|
|
827
|
-
var se,
|
|
828
|
-
f.current =
|
|
827
|
+
var se, Z = (se = document) == null ? void 0 : se.activeElement;
|
|
828
|
+
f.current = Z, Z !== document.body && (f.current = ce(Z));
|
|
829
829
|
}
|
|
830
|
-
u.current &&
|
|
831
|
-
}, [
|
|
832
|
-
|
|
833
|
-
}, [
|
|
830
|
+
u.current && P && P(u.current), y.current = !0, l();
|
|
831
|
+
}, [P]), F = pe(function() {
|
|
832
|
+
y.current = !1, S && S(u.current), l();
|
|
833
|
+
}, [S]), I = pe(function(K) {
|
|
834
834
|
var ce = f.current;
|
|
835
835
|
if (ce) {
|
|
836
|
-
var se = (typeof ce == "function" ? ce() : ce) || document.body,
|
|
837
|
-
if (
|
|
838
|
-
var ar = typeof
|
|
839
|
-
f.current = null,
|
|
836
|
+
var se = (typeof ce == "function" ? ce() : ce) || document.body, Z = typeof c == "function" ? c(se) : c;
|
|
837
|
+
if (Z) {
|
|
838
|
+
var ar = typeof Z == "object" ? Z : void 0;
|
|
839
|
+
f.current = null, K ? Promise.resolve().then(function() {
|
|
840
840
|
return se.focus(ar);
|
|
841
841
|
}) : se.focus(ar);
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
-
}, [c]), M = pe(function(
|
|
845
|
-
|
|
846
|
-
}, []),
|
|
847
|
-
u.current !==
|
|
844
|
+
}, [c]), M = pe(function(K) {
|
|
845
|
+
y.current && Mr.useMedium(K);
|
|
846
|
+
}, []), C = Nr.useMedium, L = pe(function(K) {
|
|
847
|
+
u.current !== K && (u.current = K, i(K));
|
|
848
848
|
}, []);
|
|
849
|
-
process.env.NODE_ENV !== "production" && (typeof
|
|
849
|
+
process.env.NODE_ENV !== "production" && (typeof U < "u" && console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"), we(function() {
|
|
850
850
|
!u.current && typeof oe != "string" && console.error("FocusLock: could not obtain ref to internal node");
|
|
851
851
|
}, []));
|
|
852
|
-
var
|
|
852
|
+
var d = ye((n = {}, n[Ir] = E && "disabled", n[Le] = z, n), J), B = w !== !0, ue = B && w !== "tail", Te = Wt([t, L]), yt = gt(function() {
|
|
853
853
|
return {
|
|
854
854
|
observed: u,
|
|
855
|
-
shards:
|
|
856
|
-
enabled: !
|
|
855
|
+
shards: X,
|
|
856
|
+
enabled: !E,
|
|
857
857
|
get active() {
|
|
858
|
-
return
|
|
858
|
+
return y.current;
|
|
859
859
|
}
|
|
860
860
|
};
|
|
861
|
-
}, [
|
|
862
|
-
return /* @__PURE__ */
|
|
863
|
-
/* @__PURE__ */
|
|
861
|
+
}, [E, y, X, u]);
|
|
862
|
+
return /* @__PURE__ */ Q.createElement(Et, null, B && [
|
|
863
|
+
/* @__PURE__ */ Q.createElement("div", {
|
|
864
864
|
key: "guard-first",
|
|
865
865
|
"data-focus-guard": !0,
|
|
866
|
-
tabIndex:
|
|
867
|
-
style:
|
|
866
|
+
tabIndex: E ? -1 : 0,
|
|
867
|
+
style: Me
|
|
868
868
|
}),
|
|
869
|
-
|
|
869
|
+
te ? /* @__PURE__ */ Q.createElement("div", {
|
|
870
870
|
key: "guard-nearest",
|
|
871
871
|
"data-focus-guard": !0,
|
|
872
|
-
tabIndex:
|
|
873
|
-
style:
|
|
872
|
+
tabIndex: E ? -1 : 1,
|
|
873
|
+
style: Me
|
|
874
874
|
}) : null
|
|
875
|
-
], !
|
|
875
|
+
], !E && /* @__PURE__ */ Q.createElement(ae, {
|
|
876
876
|
id: R,
|
|
877
|
-
sideCar:
|
|
877
|
+
sideCar: Ut,
|
|
878
878
|
observed: a,
|
|
879
|
-
disabled:
|
|
880
|
-
persistentFocus:
|
|
881
|
-
crossFrame:
|
|
879
|
+
disabled: E,
|
|
880
|
+
persistentFocus: x,
|
|
881
|
+
crossFrame: A,
|
|
882
882
|
autoFocus: k,
|
|
883
|
-
whiteList:
|
|
884
|
-
shards:
|
|
885
|
-
onActivation:
|
|
886
|
-
onDeactivation:
|
|
887
|
-
returnFocus:
|
|
888
|
-
focusOptions:
|
|
889
|
-
noFocusGuards:
|
|
890
|
-
}), /* @__PURE__ */
|
|
883
|
+
whiteList: H,
|
|
884
|
+
shards: X,
|
|
885
|
+
onActivation: _,
|
|
886
|
+
onDeactivation: F,
|
|
887
|
+
returnFocus: I,
|
|
888
|
+
focusOptions: m,
|
|
889
|
+
noFocusGuards: w
|
|
890
|
+
}), /* @__PURE__ */ Q.createElement(oe, ye({
|
|
891
891
|
ref: Te
|
|
892
|
-
},
|
|
893
|
-
className:
|
|
894
|
-
onBlur:
|
|
892
|
+
}, d, {
|
|
893
|
+
className: h,
|
|
894
|
+
onBlur: C,
|
|
895
895
|
onFocus: M
|
|
896
|
-
}), /* @__PURE__ */
|
|
897
|
-
value:
|
|
898
|
-
}, p)), ue && /* @__PURE__ */
|
|
896
|
+
}), /* @__PURE__ */ Q.createElement(Yt.Provider, {
|
|
897
|
+
value: yt
|
|
898
|
+
}, p)), ue && /* @__PURE__ */ Q.createElement("div", {
|
|
899
899
|
"data-focus-guard": !0,
|
|
900
|
-
tabIndex:
|
|
901
|
-
style:
|
|
900
|
+
tabIndex: E ? -1 : 0,
|
|
901
|
+
style: Me
|
|
902
902
|
}));
|
|
903
903
|
});
|
|
904
904
|
He.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -927,7 +927,7 @@ function qe(e, r) {
|
|
|
927
927
|
return t.__proto__ = n, t;
|
|
928
928
|
}, qe(e, r);
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Gt(e, r) {
|
|
931
931
|
e.prototype = Object.create(r.prototype), e.prototype.constructor = e, qe(e, r);
|
|
932
932
|
}
|
|
933
933
|
function be(e) {
|
|
@@ -938,7 +938,7 @@ function be(e) {
|
|
|
938
938
|
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
939
939
|
}, be(e);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function Ht(e, r) {
|
|
942
942
|
if (be(e) != "object" || !e) return e;
|
|
943
943
|
var t = e[Symbol.toPrimitive];
|
|
944
944
|
if (t !== void 0) {
|
|
@@ -948,19 +948,19 @@ function Yt(e, r) {
|
|
|
948
948
|
}
|
|
949
949
|
return (r === "string" ? String : Number)(e);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
952
|
-
var r =
|
|
951
|
+
function Vt(e) {
|
|
952
|
+
var r = Ht(e, "string");
|
|
953
953
|
return be(r) == "symbol" ? r : r + "";
|
|
954
954
|
}
|
|
955
|
-
function
|
|
956
|
-
return (r =
|
|
955
|
+
function Jt(e, r, t) {
|
|
956
|
+
return (r = Vt(r)) in e ? Object.defineProperty(e, r, {
|
|
957
957
|
value: t,
|
|
958
958
|
enumerable: !0,
|
|
959
959
|
configurable: !0,
|
|
960
960
|
writable: !0
|
|
961
961
|
}) : e[r] = t, e;
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function Kt(e, r) {
|
|
964
964
|
if (process.env.NODE_ENV !== "production") {
|
|
965
965
|
if (typeof e != "function")
|
|
966
966
|
throw new Error("Expected reducePropsToState to be a function.");
|
|
@@ -979,88 +979,88 @@ function Ht(e, r) {
|
|
|
979
979
|
return f.props;
|
|
980
980
|
})), r(i);
|
|
981
981
|
}
|
|
982
|
-
var
|
|
983
|
-
|
|
982
|
+
var y = /* @__PURE__ */ function(f) {
|
|
983
|
+
Gt(v, f);
|
|
984
984
|
function v() {
|
|
985
985
|
return f.apply(this, arguments) || this;
|
|
986
986
|
}
|
|
987
987
|
v.peek = function() {
|
|
988
988
|
return i;
|
|
989
989
|
};
|
|
990
|
-
var
|
|
991
|
-
return
|
|
990
|
+
var l = v.prototype;
|
|
991
|
+
return l.componentDidMount = function() {
|
|
992
992
|
a.push(this), u();
|
|
993
|
-
},
|
|
993
|
+
}, l.componentDidUpdate = function() {
|
|
994
994
|
u();
|
|
995
|
-
},
|
|
996
|
-
var
|
|
997
|
-
a.splice(
|
|
998
|
-
},
|
|
999
|
-
return /* @__PURE__ */
|
|
995
|
+
}, l.componentWillUnmount = function() {
|
|
996
|
+
var g = a.indexOf(this);
|
|
997
|
+
a.splice(g, 1), u();
|
|
998
|
+
}, l.render = function() {
|
|
999
|
+
return /* @__PURE__ */ Q.createElement(o, this.props);
|
|
1000
1000
|
}, v;
|
|
1001
|
-
}(
|
|
1002
|
-
return
|
|
1001
|
+
}(Tt);
|
|
1002
|
+
return Jt(y, "displayName", "SideEffect(" + t(o) + ")"), y;
|
|
1003
1003
|
};
|
|
1004
1004
|
}
|
|
1005
|
-
var
|
|
1005
|
+
var G = function(e) {
|
|
1006
1006
|
for (var r = Array(e.length), t = 0; t < e.length; ++t)
|
|
1007
1007
|
r[t] = e[t];
|
|
1008
1008
|
return r;
|
|
1009
|
-
},
|
|
1009
|
+
}, re = function(e) {
|
|
1010
1010
|
return Array.isArray(e) ? e : [e];
|
|
1011
|
-
},
|
|
1011
|
+
}, Dr = function(e) {
|
|
1012
1012
|
return Array.isArray(e) ? e[0] : e;
|
|
1013
|
-
},
|
|
1013
|
+
}, Qt = function(e) {
|
|
1014
1014
|
if (e.nodeType !== Node.ELEMENT_NODE)
|
|
1015
1015
|
return !1;
|
|
1016
1016
|
var r = window.getComputedStyle(e, null);
|
|
1017
1017
|
return !r || !r.getPropertyValue ? !1 : r.getPropertyValue("display") === "none" || r.getPropertyValue("visibility") === "hidden";
|
|
1018
|
-
},
|
|
1018
|
+
}, jr = function(e) {
|
|
1019
1019
|
return e.parentNode && e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? (
|
|
1020
1020
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1021
1021
|
e.parentNode.host
|
|
1022
1022
|
) : e.parentNode;
|
|
1023
|
-
},
|
|
1023
|
+
}, kr = function(e) {
|
|
1024
1024
|
return e === document || e && e.nodeType === Node.DOCUMENT_NODE;
|
|
1025
|
-
},
|
|
1025
|
+
}, Xt = function(e) {
|
|
1026
1026
|
return e.hasAttribute("inert");
|
|
1027
|
-
},
|
|
1028
|
-
return !e ||
|
|
1029
|
-
},
|
|
1027
|
+
}, Zt = function(e, r) {
|
|
1028
|
+
return !e || kr(e) || !Qt(e) && !Xt(e) && r(jr(e));
|
|
1029
|
+
}, Lr = function(e, r) {
|
|
1030
1030
|
var t = e.get(r);
|
|
1031
1031
|
if (t !== void 0)
|
|
1032
1032
|
return t;
|
|
1033
|
-
var n =
|
|
1033
|
+
var n = Zt(r, Lr.bind(void 0, e));
|
|
1034
1034
|
return e.set(r, n), n;
|
|
1035
|
-
},
|
|
1036
|
-
return e && !
|
|
1037
|
-
},
|
|
1035
|
+
}, en = function(e, r) {
|
|
1036
|
+
return e && !kr(e) ? nn(e) ? r(jr(e)) : !1 : !0;
|
|
1037
|
+
}, Wr = function(e, r) {
|
|
1038
1038
|
var t = e.get(r);
|
|
1039
1039
|
if (t !== void 0)
|
|
1040
1040
|
return t;
|
|
1041
|
-
var n =
|
|
1041
|
+
var n = en(r, Wr.bind(void 0, e));
|
|
1042
1042
|
return e.set(r, n), n;
|
|
1043
|
-
},
|
|
1043
|
+
}, qr = function(e) {
|
|
1044
1044
|
return e.dataset;
|
|
1045
|
-
},
|
|
1045
|
+
}, rn = function(e) {
|
|
1046
1046
|
return e.tagName === "BUTTON";
|
|
1047
|
-
},
|
|
1047
|
+
}, Br = function(e) {
|
|
1048
1048
|
return e.tagName === "INPUT";
|
|
1049
1049
|
}, Ur = function(e) {
|
|
1050
|
-
return
|
|
1051
|
-
},
|
|
1052
|
-
return !((
|
|
1053
|
-
},
|
|
1054
|
-
var r = e.getAttribute(
|
|
1050
|
+
return Br(e) && e.type === "radio";
|
|
1051
|
+
}, tn = function(e) {
|
|
1052
|
+
return !((Br(e) || rn(e)) && (e.type === "hidden" || e.disabled));
|
|
1053
|
+
}, nn = function(e) {
|
|
1054
|
+
var r = e.getAttribute(jt);
|
|
1055
1055
|
return ![!0, "true", ""].includes(r);
|
|
1056
|
-
},
|
|
1056
|
+
}, Ve = function(e) {
|
|
1057
1057
|
var r;
|
|
1058
|
-
return !!(e && (!((r =
|
|
1059
|
-
},
|
|
1060
|
-
return !
|
|
1061
|
-
},
|
|
1058
|
+
return !!(e && (!((r = qr(e)) === null || r === void 0) && r.focusGuard));
|
|
1059
|
+
}, Be = function(e) {
|
|
1060
|
+
return !Ve(e);
|
|
1061
|
+
}, on = function(e) {
|
|
1062
1062
|
return !!e;
|
|
1063
|
-
},
|
|
1063
|
+
}, an = function(e, r) {
|
|
1064
1064
|
var t = Math.max(0, e.tabIndex), n = Math.max(0, r.tabIndex), o = t - n, a = e.index - r.index;
|
|
1065
1065
|
if (o) {
|
|
1066
1066
|
if (!t)
|
|
@@ -1069,11 +1069,11 @@ var H = function(e) {
|
|
|
1069
1069
|
return -1;
|
|
1070
1070
|
}
|
|
1071
1071
|
return o || a;
|
|
1072
|
-
},
|
|
1072
|
+
}, un = function(e) {
|
|
1073
1073
|
return e.tabIndex < 0 && !e.hasAttribute("tabindex") ? 0 : e.tabIndex;
|
|
1074
1074
|
}, Je = function(e, r, t) {
|
|
1075
|
-
return
|
|
1076
|
-
var a =
|
|
1075
|
+
return G(e).map(function(n, o) {
|
|
1076
|
+
var a = un(n);
|
|
1077
1077
|
return {
|
|
1078
1078
|
node: n,
|
|
1079
1079
|
index: o,
|
|
@@ -1081,8 +1081,8 @@ var H = function(e) {
|
|
|
1081
1081
|
};
|
|
1082
1082
|
}).filter(function(n) {
|
|
1083
1083
|
return !r || n.tabIndex >= 0;
|
|
1084
|
-
}).sort(
|
|
1085
|
-
},
|
|
1084
|
+
}).sort(an);
|
|
1085
|
+
}, cn = [
|
|
1086
1086
|
"button:enabled",
|
|
1087
1087
|
"select:enabled",
|
|
1088
1088
|
"textarea:enabled",
|
|
@@ -1100,60 +1100,60 @@ var H = function(e) {
|
|
|
1100
1100
|
"[tabindex]",
|
|
1101
1101
|
"[contenteditable]",
|
|
1102
1102
|
"[autofocus]"
|
|
1103
|
-
], Ke =
|
|
1104
|
-
return
|
|
1105
|
-
return t.concat(n.matches(r ?
|
|
1103
|
+
], Ke = cn.join(","), sn = "".concat(Ke, ", [data-focus-guard]"), Yr = function(e, r) {
|
|
1104
|
+
return G((e.shadowRoot || e).children).reduce(function(t, n) {
|
|
1105
|
+
return t.concat(n.matches(r ? sn : Ke) ? [n] : [], Yr(n));
|
|
1106
1106
|
}, []);
|
|
1107
|
-
},
|
|
1107
|
+
}, fn = function(e, r) {
|
|
1108
1108
|
var t;
|
|
1109
1109
|
return e instanceof HTMLIFrameElement && (!((t = e.contentDocument) === null || t === void 0) && t.body) ? ve([e.contentDocument.body], r) : [e];
|
|
1110
1110
|
}, ve = function(e, r) {
|
|
1111
1111
|
return e.reduce(function(t, n) {
|
|
1112
|
-
var o, a =
|
|
1113
|
-
return
|
|
1112
|
+
var o, a = Yr(n, r), i = (o = []).concat.apply(o, a.map(function(u) {
|
|
1113
|
+
return fn(u, r);
|
|
1114
1114
|
}));
|
|
1115
1115
|
return t.concat(
|
|
1116
1116
|
// add all tabbables inside and within shadow DOMs in DOM order
|
|
1117
1117
|
i,
|
|
1118
1118
|
// add if node is tabbable itself
|
|
1119
|
-
n.parentNode ?
|
|
1119
|
+
n.parentNode ? G(n.parentNode.querySelectorAll(Ke)).filter(function(u) {
|
|
1120
1120
|
return u === n;
|
|
1121
1121
|
}) : []
|
|
1122
1122
|
);
|
|
1123
1123
|
}, []);
|
|
1124
|
-
},
|
|
1125
|
-
var r = e.querySelectorAll("[".concat(
|
|
1126
|
-
return
|
|
1124
|
+
}, dn = function(e) {
|
|
1125
|
+
var r = e.querySelectorAll("[".concat(Dt, "]"));
|
|
1126
|
+
return G(r).map(function(t) {
|
|
1127
1127
|
return ve([t]);
|
|
1128
1128
|
}).reduce(function(t, n) {
|
|
1129
1129
|
return t.concat(n);
|
|
1130
1130
|
}, []);
|
|
1131
1131
|
}, Qe = function(e, r) {
|
|
1132
|
-
return
|
|
1133
|
-
return
|
|
1132
|
+
return G(e).filter(function(t) {
|
|
1133
|
+
return Lr(r, t);
|
|
1134
1134
|
}).filter(function(t) {
|
|
1135
|
-
return
|
|
1135
|
+
return tn(t);
|
|
1136
1136
|
});
|
|
1137
1137
|
}, hr = function(e, r) {
|
|
1138
|
-
return r === void 0 && (r = /* @__PURE__ */ new Map()),
|
|
1139
|
-
return
|
|
1138
|
+
return r === void 0 && (r = /* @__PURE__ */ new Map()), G(e).filter(function(t) {
|
|
1139
|
+
return Wr(r, t);
|
|
1140
1140
|
});
|
|
1141
1141
|
}, Xe = function(e, r, t) {
|
|
1142
1142
|
return Je(Qe(ve(e, t), r), !0, t);
|
|
1143
1143
|
}, he = function(e, r) {
|
|
1144
1144
|
return Je(Qe(ve(e), r), !1);
|
|
1145
|
-
},
|
|
1146
|
-
return Qe(
|
|
1147
|
-
},
|
|
1148
|
-
return e.shadowRoot ?
|
|
1145
|
+
}, ln = function(e, r) {
|
|
1146
|
+
return Qe(dn(e), r);
|
|
1147
|
+
}, ee = function(e, r) {
|
|
1148
|
+
return e.shadowRoot ? ee(e.shadowRoot, r) : Object.getPrototypeOf(e).contains !== void 0 && Object.getPrototypeOf(e).contains.call(e, r) ? !0 : G(e.children).some(function(t) {
|
|
1149
1149
|
var n;
|
|
1150
1150
|
if (t instanceof HTMLIFrameElement) {
|
|
1151
1151
|
var o = (n = t.contentDocument) === null || n === void 0 ? void 0 : n.body;
|
|
1152
|
-
return o ?
|
|
1152
|
+
return o ? ee(o, r) : !1;
|
|
1153
1153
|
}
|
|
1154
|
-
return
|
|
1154
|
+
return ee(t, r);
|
|
1155
1155
|
});
|
|
1156
|
-
},
|
|
1156
|
+
}, vn = function(e) {
|
|
1157
1157
|
for (var r = /* @__PURE__ */ new Set(), t = e.length, n = 0; n < t; n += 1)
|
|
1158
1158
|
for (var o = n + 1; o < t; o += 1) {
|
|
1159
1159
|
var a = e[n].compareDocumentPosition(e[o]);
|
|
@@ -1162,15 +1162,15 @@ var H = function(e) {
|
|
|
1162
1162
|
return e.filter(function(i, u) {
|
|
1163
1163
|
return !r.has(u);
|
|
1164
1164
|
});
|
|
1165
|
-
},
|
|
1166
|
-
return e.parentNode ?
|
|
1165
|
+
}, zr = function(e) {
|
|
1166
|
+
return e.parentNode ? zr(e.parentNode) : e;
|
|
1167
1167
|
}, Ze = function(e) {
|
|
1168
|
-
var r =
|
|
1168
|
+
var r = re(e);
|
|
1169
1169
|
return r.filter(Boolean).reduce(function(t, n) {
|
|
1170
1170
|
var o = n.getAttribute(Le);
|
|
1171
|
-
return t.push.apply(t, o ?
|
|
1171
|
+
return t.push.apply(t, o ? vn(G(zr(n).querySelectorAll("[".concat(Le, '="').concat(o, '"]:not([').concat(Ir, '="disabled"])')))) : [n]), t;
|
|
1172
1172
|
}, []);
|
|
1173
|
-
},
|
|
1173
|
+
}, pn = function(e) {
|
|
1174
1174
|
try {
|
|
1175
1175
|
return e();
|
|
1176
1176
|
} catch {
|
|
@@ -1179,35 +1179,35 @@ var H = function(e) {
|
|
|
1179
1179
|
}, ge = function(e) {
|
|
1180
1180
|
if (e === void 0 && (e = document), !(!e || !e.activeElement)) {
|
|
1181
1181
|
var r = e.activeElement;
|
|
1182
|
-
return r.shadowRoot ? ge(r.shadowRoot) : r instanceof HTMLIFrameElement &&
|
|
1182
|
+
return r.shadowRoot ? ge(r.shadowRoot) : r instanceof HTMLIFrameElement && pn(function() {
|
|
1183
1183
|
return r.contentWindow.document;
|
|
1184
1184
|
}) ? ge(r.contentWindow.document) : r;
|
|
1185
1185
|
}
|
|
1186
|
-
},
|
|
1186
|
+
}, mn = function(e, r) {
|
|
1187
1187
|
return e === r;
|
|
1188
|
-
},
|
|
1189
|
-
return !!
|
|
1190
|
-
return
|
|
1188
|
+
}, yn = function(e, r) {
|
|
1189
|
+
return !!G(e.querySelectorAll("iframe")).some(function(t) {
|
|
1190
|
+
return mn(t, r);
|
|
1191
1191
|
});
|
|
1192
1192
|
}, Gr = function(e, r) {
|
|
1193
|
-
return r === void 0 && (r = ge(
|
|
1194
|
-
return
|
|
1193
|
+
return r === void 0 && (r = ge(Dr(e).ownerDocument)), !r || r.dataset && r.dataset.focusGuard ? !1 : Ze(e).some(function(t) {
|
|
1194
|
+
return ee(t, r) || yn(t, r);
|
|
1195
1195
|
});
|
|
1196
|
-
},
|
|
1196
|
+
}, bn = function(e) {
|
|
1197
1197
|
e === void 0 && (e = document);
|
|
1198
1198
|
var r = ge(e);
|
|
1199
|
-
return r ?
|
|
1200
|
-
return
|
|
1199
|
+
return r ? G(e.querySelectorAll("[".concat(Nt, "]"))).some(function(t) {
|
|
1200
|
+
return ee(t, r);
|
|
1201
1201
|
}) : !1;
|
|
1202
|
-
},
|
|
1202
|
+
}, hn = function(e, r) {
|
|
1203
1203
|
return r.filter(Ur).filter(function(t) {
|
|
1204
1204
|
return t.name === e.name;
|
|
1205
1205
|
}).filter(function(t) {
|
|
1206
1206
|
return t.checked;
|
|
1207
1207
|
})[0] || e;
|
|
1208
1208
|
}, er = function(e, r) {
|
|
1209
|
-
return Ur(e) && e.name ?
|
|
1210
|
-
},
|
|
1209
|
+
return Ur(e) && e.name ? hn(e, r) : e;
|
|
1210
|
+
}, gn = function(e) {
|
|
1211
1211
|
var r = /* @__PURE__ */ new Set();
|
|
1212
1212
|
return e.forEach(function(t) {
|
|
1213
1213
|
return r.add(er(t, e));
|
|
@@ -1218,42 +1218,42 @@ var H = function(e) {
|
|
|
1218
1218
|
return e[0] && e.length > 1 ? er(e[0], e) : e[0];
|
|
1219
1219
|
}, Er = function(e, r) {
|
|
1220
1220
|
return e.indexOf(er(r, e));
|
|
1221
|
-
},
|
|
1222
|
-
var a = e.length, i = e[0], u = e[a - 1],
|
|
1221
|
+
}, Ue = "NEW_FOCUS", En = function(e, r, t, n, o) {
|
|
1222
|
+
var a = e.length, i = e[0], u = e[a - 1], y = Ve(n);
|
|
1223
1223
|
if (!(n && e.indexOf(n) >= 0)) {
|
|
1224
|
-
var f = n !== void 0 ? t.indexOf(n) : -1, v = o ? t.indexOf(o) : f,
|
|
1224
|
+
var f = n !== void 0 ? t.indexOf(n) : -1, v = o ? t.indexOf(o) : f, l = o ? e.indexOf(o) : -1;
|
|
1225
1225
|
if (f === -1)
|
|
1226
|
-
return
|
|
1227
|
-
if (
|
|
1228
|
-
return
|
|
1229
|
-
var p = f - v,
|
|
1230
|
-
return
|
|
1231
|
-
}),
|
|
1226
|
+
return l !== -1 ? l : Ue;
|
|
1227
|
+
if (l === -1)
|
|
1228
|
+
return Ue;
|
|
1229
|
+
var p = f - v, g = t.indexOf(i), E = t.indexOf(u), b = gn(t), w = n !== void 0 ? b.indexOf(n) : -1, $ = o ? b.indexOf(o) : w, x = b.filter(function(z) {
|
|
1230
|
+
return z.tabIndex >= 0;
|
|
1231
|
+
}), T = n !== void 0 ? x.indexOf(n) : -1, A = o ? x.indexOf(o) : T, s = T >= 0 && A >= 0 ? (
|
|
1232
1232
|
// old/new are tabbables, measure distance in tabbable space
|
|
1233
|
-
|
|
1233
|
+
A - T
|
|
1234
1234
|
) : (
|
|
1235
1235
|
// or else measure in focusable space
|
|
1236
|
-
|
|
1236
|
+
$ - w
|
|
1237
1237
|
);
|
|
1238
|
-
if (!p &&
|
|
1239
|
-
return
|
|
1240
|
-
var k = Er(e, r[0]),
|
|
1241
|
-
if (f <=
|
|
1242
|
-
return
|
|
1243
|
-
if (f >=
|
|
1238
|
+
if (!p && l >= 0 || r.length === 0)
|
|
1239
|
+
return l;
|
|
1240
|
+
var k = Er(e, r[0]), U = Er(e, r[r.length - 1]);
|
|
1241
|
+
if (f <= g && y && Math.abs(p) > 1)
|
|
1242
|
+
return U;
|
|
1243
|
+
if (f >= E && y && Math.abs(p) > 1)
|
|
1244
1244
|
return k;
|
|
1245
1245
|
if (p && Math.abs(s) > 1)
|
|
1246
|
-
return
|
|
1247
|
-
if (f <=
|
|
1248
|
-
return
|
|
1249
|
-
if (f >
|
|
1246
|
+
return l;
|
|
1247
|
+
if (f <= g)
|
|
1248
|
+
return U;
|
|
1249
|
+
if (f > E)
|
|
1250
1250
|
return k;
|
|
1251
1251
|
if (p)
|
|
1252
|
-
return Math.abs(p) > 1 ?
|
|
1252
|
+
return Math.abs(p) > 1 ? l : (a + l + p) % a;
|
|
1253
1253
|
}
|
|
1254
|
-
},
|
|
1254
|
+
}, Tn = function(e) {
|
|
1255
1255
|
return function(r) {
|
|
1256
|
-
var t, n = (t =
|
|
1256
|
+
var t, n = (t = qr(r)) === null || t === void 0 ? void 0 : t.autofocus;
|
|
1257
1257
|
return (
|
|
1258
1258
|
// @ts-expect-error
|
|
1259
1259
|
r.autofocus || //
|
|
@@ -1265,7 +1265,7 @@ var H = function(e) {
|
|
|
1265
1265
|
var n = e.map(function(a) {
|
|
1266
1266
|
var i = a.node;
|
|
1267
1267
|
return i;
|
|
1268
|
-
}), o = hr(n.filter(
|
|
1268
|
+
}), o = hr(n.filter(Tn(t)));
|
|
1269
1269
|
return o && o.length ? gr(o) : gr(hr(r));
|
|
1270
1270
|
}, Ye = function(e, r) {
|
|
1271
1271
|
return r === void 0 && (r = []), r.push(e), e.parentNode && Ye(e.parentNode.host || e.parentNode, r), r;
|
|
@@ -1276,72 +1276,72 @@ var H = function(e) {
|
|
|
1276
1276
|
return a;
|
|
1277
1277
|
}
|
|
1278
1278
|
return !1;
|
|
1279
|
-
},
|
|
1280
|
-
var n =
|
|
1279
|
+
}, Hr = function(e, r, t) {
|
|
1280
|
+
var n = re(e), o = re(r), a = n[0], i = !1;
|
|
1281
1281
|
return o.filter(Boolean).forEach(function(u) {
|
|
1282
|
-
i = Ne(i || u, u) || i, t.filter(Boolean).forEach(function(
|
|
1283
|
-
var f = Ne(a,
|
|
1284
|
-
f && (!i ||
|
|
1282
|
+
i = Ne(i || u, u) || i, t.filter(Boolean).forEach(function(y) {
|
|
1283
|
+
var f = Ne(a, y);
|
|
1284
|
+
f && (!i || ee(f, i) ? i = f : i = Ne(f, i));
|
|
1285
1285
|
});
|
|
1286
1286
|
}), i;
|
|
1287
|
-
},
|
|
1287
|
+
}, xr = function(e, r) {
|
|
1288
1288
|
return e.reduce(function(t, n) {
|
|
1289
|
-
return t.concat(
|
|
1289
|
+
return t.concat(ln(n, r));
|
|
1290
1290
|
}, []);
|
|
1291
|
-
},
|
|
1291
|
+
}, xn = function(e, r) {
|
|
1292
1292
|
var t = /* @__PURE__ */ new Map();
|
|
1293
1293
|
return r.forEach(function(n) {
|
|
1294
1294
|
return t.set(n.node, n);
|
|
1295
1295
|
}), e.map(function(n) {
|
|
1296
1296
|
return t.get(n);
|
|
1297
|
-
}).filter(
|
|
1298
|
-
},
|
|
1299
|
-
var t = ge(
|
|
1300
|
-
var
|
|
1301
|
-
return
|
|
1297
|
+
}).filter(on);
|
|
1298
|
+
}, On = function(e, r) {
|
|
1299
|
+
var t = ge(re(e).length > 0 ? document : Dr(e).ownerDocument), n = Ze(e).filter(Be), o = Hr(t || e, e, n), a = /* @__PURE__ */ new Map(), i = he(n, a), u = i.filter(function(E) {
|
|
1300
|
+
var b = E.node;
|
|
1301
|
+
return Be(b);
|
|
1302
1302
|
});
|
|
1303
1303
|
if (u[0]) {
|
|
1304
|
-
var
|
|
1305
|
-
var
|
|
1306
|
-
return
|
|
1307
|
-
}), f =
|
|
1308
|
-
var
|
|
1309
|
-
return
|
|
1310
|
-
}),
|
|
1311
|
-
var
|
|
1312
|
-
return
|
|
1313
|
-
}).map(function(
|
|
1314
|
-
var
|
|
1315
|
-
return
|
|
1316
|
-
}), p =
|
|
1317
|
-
if (p ===
|
|
1318
|
-
var
|
|
1304
|
+
var y = he([o], a).map(function(E) {
|
|
1305
|
+
var b = E.node;
|
|
1306
|
+
return b;
|
|
1307
|
+
}), f = xn(y, u), v = f.map(function(E) {
|
|
1308
|
+
var b = E.node;
|
|
1309
|
+
return b;
|
|
1310
|
+
}), l = f.filter(function(E) {
|
|
1311
|
+
var b = E.tabIndex;
|
|
1312
|
+
return b >= 0;
|
|
1313
|
+
}).map(function(E) {
|
|
1314
|
+
var b = E.node;
|
|
1315
|
+
return b;
|
|
1316
|
+
}), p = En(v, l, y, t, r);
|
|
1317
|
+
if (p === Ue) {
|
|
1318
|
+
var g = (
|
|
1319
1319
|
// first try only tabbable, and the fallback to all focusable, as long as at least one element should be picked for focus
|
|
1320
|
-
Tr(i,
|
|
1320
|
+
Tr(i, l, xr(n, a)) || Tr(i, v, xr(n, a))
|
|
1321
1321
|
);
|
|
1322
|
-
if (
|
|
1323
|
-
return { node:
|
|
1322
|
+
if (g)
|
|
1323
|
+
return { node: g };
|
|
1324
1324
|
console.warn("focus-lock: cannot find any node to move focus into");
|
|
1325
1325
|
return;
|
|
1326
1326
|
}
|
|
1327
1327
|
return p === void 0 ? p : f[p];
|
|
1328
1328
|
}
|
|
1329
|
-
},
|
|
1330
|
-
var r = Ze(e).filter(
|
|
1329
|
+
}, wn = function(e) {
|
|
1330
|
+
var r = Ze(e).filter(Be), t = Hr(e, e, r), n = Je(ve([t], !0), !0, !0), o = ve(r, !1);
|
|
1331
1331
|
return n.map(function(a) {
|
|
1332
1332
|
var i = a.node, u = a.index;
|
|
1333
1333
|
return {
|
|
1334
1334
|
node: i,
|
|
1335
1335
|
index: u,
|
|
1336
1336
|
lockItem: o.indexOf(i) >= 0,
|
|
1337
|
-
guard:
|
|
1337
|
+
guard: Ve(i)
|
|
1338
1338
|
};
|
|
1339
1339
|
});
|
|
1340
1340
|
}, rr = function(e, r) {
|
|
1341
1341
|
e && ("focus" in e && e.focus(r), "contentWindow" in e && e.contentWindow && e.contentWindow.focus());
|
|
1342
|
-
}, De = 0, je = !1,
|
|
1342
|
+
}, De = 0, je = !1, Vr = function(e, r, t) {
|
|
1343
1343
|
t === void 0 && (t = {});
|
|
1344
|
-
var n =
|
|
1344
|
+
var n = On(e, r);
|
|
1345
1345
|
if (!je && n) {
|
|
1346
1346
|
if (De > 2) {
|
|
1347
1347
|
console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"), je = !0, setTimeout(function() {
|
|
@@ -1352,7 +1352,7 @@ var H = function(e) {
|
|
|
1352
1352
|
De++, rr(n.node, t.focusOptions), De--;
|
|
1353
1353
|
}
|
|
1354
1354
|
};
|
|
1355
|
-
function
|
|
1355
|
+
function me(e) {
|
|
1356
1356
|
if (!e)
|
|
1357
1357
|
return null;
|
|
1358
1358
|
if (typeof WeakRef > "u")
|
|
@@ -1364,60 +1364,60 @@ function ye(e) {
|
|
|
1364
1364
|
return (r == null ? void 0 : r.deref()) || null;
|
|
1365
1365
|
};
|
|
1366
1366
|
}
|
|
1367
|
-
var
|
|
1367
|
+
var Sn = function(e) {
|
|
1368
1368
|
if (!e)
|
|
1369
1369
|
return null;
|
|
1370
1370
|
for (var r = [], t = e; t && t !== document.body; )
|
|
1371
1371
|
r.push({
|
|
1372
|
-
current:
|
|
1373
|
-
parent:
|
|
1374
|
-
left:
|
|
1375
|
-
right:
|
|
1372
|
+
current: me(t),
|
|
1373
|
+
parent: me(t.parentElement),
|
|
1374
|
+
left: me(t.previousElementSibling),
|
|
1375
|
+
right: me(t.nextElementSibling)
|
|
1376
1376
|
}), t = t.parentElement;
|
|
1377
1377
|
return {
|
|
1378
|
-
element:
|
|
1378
|
+
element: me(e),
|
|
1379
1379
|
stack: r,
|
|
1380
1380
|
ownerDocument: e.ownerDocument
|
|
1381
1381
|
};
|
|
1382
|
-
},
|
|
1382
|
+
}, Pn = function(e) {
|
|
1383
1383
|
var r, t, n, o, a;
|
|
1384
1384
|
if (e)
|
|
1385
|
-
for (var i = e.stack, u = e.ownerDocument,
|
|
1386
|
-
var
|
|
1385
|
+
for (var i = e.stack, u = e.ownerDocument, y = /* @__PURE__ */ new Map(), f = 0, v = i; f < v.length; f++) {
|
|
1386
|
+
var l = v[f], p = (r = l.parent) === null || r === void 0 ? void 0 : r.call(l);
|
|
1387
1387
|
if (p && u.contains(p)) {
|
|
1388
|
-
for (var
|
|
1388
|
+
for (var g = (t = l.left) === null || t === void 0 ? void 0 : t.call(l), E = l.current(), b = p.contains(E) ? E : void 0, w = (n = l.right) === null || n === void 0 ? void 0 : n.call(l), $ = Xe([p], y), x = (
|
|
1389
1389
|
// that is element itself
|
|
1390
|
-
(a = (o =
|
|
1391
|
-
(
|
|
1390
|
+
(a = (o = b ?? // or something in it's place
|
|
1391
|
+
(g == null ? void 0 : g.nextElementSibling)) !== null && o !== void 0 ? o : (
|
|
1392
1392
|
// or somebody to the right, still close enough
|
|
1393
|
-
|
|
1393
|
+
w
|
|
1394
1394
|
)) !== null && a !== void 0 ? a : (
|
|
1395
1395
|
// or somebody to the left, something?
|
|
1396
|
-
|
|
1396
|
+
g
|
|
1397
1397
|
)
|
|
1398
|
-
);
|
|
1399
|
-
for (var
|
|
1400
|
-
var s =
|
|
1401
|
-
if (
|
|
1398
|
+
); x; ) {
|
|
1399
|
+
for (var T = 0, A = $; T < A.length; T++) {
|
|
1400
|
+
var s = A[T];
|
|
1401
|
+
if (x != null && x.contains(s.node))
|
|
1402
1402
|
return s.node;
|
|
1403
1403
|
}
|
|
1404
|
-
|
|
1404
|
+
x = x.nextElementSibling;
|
|
1405
1405
|
}
|
|
1406
|
-
if (
|
|
1407
|
-
return
|
|
1406
|
+
if ($.length)
|
|
1407
|
+
return $[0].node;
|
|
1408
1408
|
}
|
|
1409
1409
|
}
|
|
1410
|
-
},
|
|
1411
|
-
var r =
|
|
1410
|
+
}, Jr = function(e) {
|
|
1411
|
+
var r = Sn(e);
|
|
1412
1412
|
return function() {
|
|
1413
|
-
return
|
|
1413
|
+
return Pn(r);
|
|
1414
1414
|
};
|
|
1415
|
-
},
|
|
1415
|
+
}, _n = function(e, r, t) {
|
|
1416
1416
|
if (!e || !r)
|
|
1417
1417
|
return console.error("no element or scope given"), {};
|
|
1418
|
-
var n =
|
|
1418
|
+
var n = re(r);
|
|
1419
1419
|
if (n.every(function(i) {
|
|
1420
|
-
return !
|
|
1420
|
+
return !ee(i, e);
|
|
1421
1421
|
}))
|
|
1422
1422
|
return console.error("Active element is not contained in the scope"), {};
|
|
1423
1423
|
var o = t ? Xe(n, /* @__PURE__ */ new Map()) : he(n, /* @__PURE__ */ new Map()), a = o.findIndex(function(i) {
|
|
@@ -1431,67 +1431,67 @@ var On = function(e) {
|
|
|
1431
1431
|
first: o[0],
|
|
1432
1432
|
last: o[o.length - 1]
|
|
1433
1433
|
};
|
|
1434
|
-
},
|
|
1435
|
-
var t = r ? Xe(
|
|
1434
|
+
}, Fn = function(e, r) {
|
|
1435
|
+
var t = r ? Xe(re(e), /* @__PURE__ */ new Map()) : he(re(e), /* @__PURE__ */ new Map());
|
|
1436
1436
|
return {
|
|
1437
1437
|
first: t[0],
|
|
1438
1438
|
last: t[t.length - 1]
|
|
1439
1439
|
};
|
|
1440
|
-
},
|
|
1440
|
+
}, An = function(e) {
|
|
1441
1441
|
return Object.assign({
|
|
1442
1442
|
scope: document.body,
|
|
1443
1443
|
cycle: !0,
|
|
1444
1444
|
onlyTabbable: !0
|
|
1445
1445
|
}, e);
|
|
1446
|
-
},
|
|
1446
|
+
}, Kr = function(e, r, t) {
|
|
1447
1447
|
r === void 0 && (r = {});
|
|
1448
|
-
var n =
|
|
1448
|
+
var n = An(r), o = _n(e, n.scope, n.onlyTabbable);
|
|
1449
1449
|
if (o) {
|
|
1450
1450
|
var a = t(o, n.cycle);
|
|
1451
1451
|
a && rr(a.node, n.focusOptions);
|
|
1452
1452
|
}
|
|
1453
|
-
},
|
|
1454
|
-
r === void 0 && (r = {}),
|
|
1453
|
+
}, Rn = function(e, r) {
|
|
1454
|
+
r === void 0 && (r = {}), Kr(e, r, function(t, n) {
|
|
1455
1455
|
var o = t.next, a = t.first;
|
|
1456
1456
|
return o || n && a;
|
|
1457
1457
|
});
|
|
1458
|
-
},
|
|
1459
|
-
r === void 0 && (r = {}),
|
|
1458
|
+
}, In = function(e, r) {
|
|
1459
|
+
r === void 0 && (r = {}), Kr(e, r, function(t, n) {
|
|
1460
1460
|
var o = t.prev, a = t.last;
|
|
1461
1461
|
return o || n && a;
|
|
1462
1462
|
});
|
|
1463
|
-
},
|
|
1464
|
-
var n, o =
|
|
1463
|
+
}, Qr = function(e, r, t) {
|
|
1464
|
+
var n, o = Fn(e, (n = r.onlyTabbable) !== null && n !== void 0 ? n : !0), a = o[t];
|
|
1465
1465
|
a && rr(a.node, r.focusOptions);
|
|
1466
|
-
},
|
|
1467
|
-
r === void 0 && (r = {}),
|
|
1468
|
-
},
|
|
1469
|
-
r === void 0 && (r = {}),
|
|
1466
|
+
}, Cn = function(e, r) {
|
|
1467
|
+
r === void 0 && (r = {}), Qr(e, r, "first");
|
|
1468
|
+
}, $n = function(e, r) {
|
|
1469
|
+
r === void 0 && (r = {}), Qr(e, r, "last");
|
|
1470
1470
|
};
|
|
1471
1471
|
function tr(e) {
|
|
1472
1472
|
setTimeout(e, 1);
|
|
1473
1473
|
}
|
|
1474
|
-
var
|
|
1474
|
+
var Mn = function(r) {
|
|
1475
1475
|
return r && "current" in r ? r.current : r;
|
|
1476
|
-
},
|
|
1476
|
+
}, Xr = function() {
|
|
1477
1477
|
return document && document.activeElement === document.body;
|
|
1478
|
-
},
|
|
1479
|
-
return
|
|
1480
|
-
}, de = null, W = null,
|
|
1478
|
+
}, Nn = function() {
|
|
1479
|
+
return Xr() || bn();
|
|
1480
|
+
}, de = null, W = null, Or = function() {
|
|
1481
1481
|
return null;
|
|
1482
|
-
}, le = null, Ee = !1, nr = !1,
|
|
1482
|
+
}, le = null, Ee = !1, nr = !1, Dn = function() {
|
|
1483
1483
|
return !0;
|
|
1484
|
-
},
|
|
1485
|
-
return (de.whiteList ||
|
|
1486
|
-
},
|
|
1484
|
+
}, jn = function(r) {
|
|
1485
|
+
return (de.whiteList || Dn)(r);
|
|
1486
|
+
}, kn = function(r, t) {
|
|
1487
1487
|
le = {
|
|
1488
1488
|
observerNode: r,
|
|
1489
1489
|
portaledElement: t
|
|
1490
1490
|
};
|
|
1491
|
-
},
|
|
1491
|
+
}, Ln = function(r) {
|
|
1492
1492
|
return le && le.portaledElement === r;
|
|
1493
1493
|
};
|
|
1494
|
-
function
|
|
1494
|
+
function wr(e, r, t, n) {
|
|
1495
1495
|
var o = null, a = e;
|
|
1496
1496
|
do {
|
|
1497
1497
|
var i = n[a];
|
|
@@ -1506,308 +1506,284 @@ function xr(e, r, t, n) {
|
|
|
1506
1506
|
} while ((a += t) !== r);
|
|
1507
1507
|
o && (o.node.tabIndex = 0);
|
|
1508
1508
|
}
|
|
1509
|
-
var
|
|
1509
|
+
var Wn = function(r) {
|
|
1510
1510
|
return r ? !!Ee : Ee === "meanwhile";
|
|
1511
|
-
},
|
|
1511
|
+
}, qn = function e(r, t, n) {
|
|
1512
1512
|
return t && (t.host === r && (!t.activeElement || n.contains(t.activeElement)) || t.parentNode && e(r, t.parentNode, n));
|
|
1513
|
-
},
|
|
1513
|
+
}, Bn = function(r, t) {
|
|
1514
1514
|
return t.some(function(n) {
|
|
1515
|
-
return
|
|
1515
|
+
return qn(r, n, n);
|
|
1516
1516
|
});
|
|
1517
|
-
},
|
|
1517
|
+
}, Zr = function(r) {
|
|
1518
1518
|
return he(r, /* @__PURE__ */ new Map());
|
|
1519
|
-
},
|
|
1520
|
-
return !
|
|
1519
|
+
}, Un = function(r) {
|
|
1520
|
+
return !Zr([r.parentNode]).some(function(t) {
|
|
1521
1521
|
return t.node === r;
|
|
1522
1522
|
});
|
|
1523
1523
|
}, Se = function() {
|
|
1524
1524
|
var r = !1;
|
|
1525
1525
|
if (de) {
|
|
1526
|
-
var t = de, n = t.observed, o = t.persistentFocus, a = t.autoFocus, i = t.shards, u = t.crossFrame,
|
|
1527
|
-
if (
|
|
1528
|
-
var
|
|
1529
|
-
|
|
1526
|
+
var t = de, n = t.observed, o = t.persistentFocus, a = t.autoFocus, i = t.shards, u = t.crossFrame, y = t.focusOptions, f = t.noFocusGuards, v = n || le && le.portaledElement;
|
|
1527
|
+
if (Xr() && W && W !== document.body && (!document.body.contains(W) || Un(W))) {
|
|
1528
|
+
var l = Or();
|
|
1529
|
+
l && l.focus();
|
|
1530
1530
|
}
|
|
1531
1531
|
var p = document && document.activeElement;
|
|
1532
1532
|
if (v) {
|
|
1533
|
-
var
|
|
1534
|
-
if (!
|
|
1533
|
+
var g = [v].concat(i.map(Mn).filter(Boolean)), E = function() {
|
|
1534
|
+
if (!Wn(u) || !f || !W || nr)
|
|
1535
1535
|
return !1;
|
|
1536
|
-
var
|
|
1536
|
+
var T = Zr(g), A = T.findIndex(function(s) {
|
|
1537
1537
|
var k = s.node;
|
|
1538
1538
|
return k === W;
|
|
1539
1539
|
});
|
|
1540
|
-
return
|
|
1540
|
+
return A === 0 || A === T.length - 1;
|
|
1541
1541
|
};
|
|
1542
|
-
if ((!p ||
|
|
1543
|
-
focusOptions:
|
|
1544
|
-
}), le = {})), W = document && document.activeElement, W !== document.body && (
|
|
1545
|
-
var
|
|
1546
|
-
var
|
|
1547
|
-
return
|
|
1548
|
-
}).indexOf(
|
|
1549
|
-
|
|
1550
|
-
var
|
|
1551
|
-
return
|
|
1552
|
-
}).forEach(function(
|
|
1553
|
-
var
|
|
1554
|
-
return
|
|
1555
|
-
}),
|
|
1542
|
+
if ((!p || jn(p)) && (o || E() || !Nn() || !W && a) && (v && !(Gr(g) || p && Bn(p, g) || Ln(p)) && (document && !W && p && !a ? (p.blur && p.blur(), document.body.focus()) : (r = Vr(g, W, {
|
|
1543
|
+
focusOptions: y
|
|
1544
|
+
}), le = {})), W = document && document.activeElement, W !== document.body && (Or = Jr(W)), Ee = !1), document && p !== document.activeElement && document.querySelector("[data-focus-auto-guard]")) {
|
|
1545
|
+
var b = document && document.activeElement, w = wn(g), $ = w.map(function(x) {
|
|
1546
|
+
var T = x.node;
|
|
1547
|
+
return T;
|
|
1548
|
+
}).indexOf(b);
|
|
1549
|
+
$ > -1 && (w.filter(function(x) {
|
|
1550
|
+
var T = x.guard, A = x.node;
|
|
1551
|
+
return T && A.dataset.focusAutoGuard;
|
|
1552
|
+
}).forEach(function(x) {
|
|
1553
|
+
var T = x.node;
|
|
1554
|
+
return T.removeAttribute("tabIndex");
|
|
1555
|
+
}), wr($, w.length, 1, w), wr($, -1, -1, w));
|
|
1556
1556
|
}
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
return r;
|
|
1560
|
-
},
|
|
1560
|
+
}, et = function(r) {
|
|
1561
1561
|
Se() && r && (r.stopPropagation(), r.preventDefault());
|
|
1562
1562
|
}, or = function() {
|
|
1563
1563
|
return tr(Se);
|
|
1564
|
-
},
|
|
1564
|
+
}, Yn = function(r) {
|
|
1565
1565
|
var t = r.target, n = r.currentTarget;
|
|
1566
|
-
n.contains(t) ||
|
|
1567
|
-
},
|
|
1566
|
+
n.contains(t) || kn(n, t);
|
|
1567
|
+
}, zn = function() {
|
|
1568
1568
|
return null;
|
|
1569
1569
|
};
|
|
1570
1570
|
process.env.NODE_ENV !== "production" && Rr.node.isRequired;
|
|
1571
|
-
var
|
|
1571
|
+
var rt = function() {
|
|
1572
1572
|
nr = !0;
|
|
1573
|
-
},
|
|
1573
|
+
}, tt = function() {
|
|
1574
1574
|
nr = !1, Ee = "just", tr(function() {
|
|
1575
1575
|
Ee = "meanwhile";
|
|
1576
1576
|
});
|
|
1577
|
-
},
|
|
1578
|
-
document.addEventListener("focusin",
|
|
1579
|
-
},
|
|
1580
|
-
document.removeEventListener("focusin",
|
|
1577
|
+
}, Gn = function() {
|
|
1578
|
+
document.addEventListener("focusin", et), document.addEventListener("focusout", or), window.addEventListener("focus", rt), window.addEventListener("blur", tt);
|
|
1579
|
+
}, Hn = function() {
|
|
1580
|
+
document.removeEventListener("focusin", et), document.removeEventListener("focusout", or), window.removeEventListener("focus", rt), window.removeEventListener("blur", tt);
|
|
1581
1581
|
};
|
|
1582
|
-
function
|
|
1582
|
+
function Vn(e) {
|
|
1583
1583
|
return e.filter(function(r) {
|
|
1584
1584
|
var t = r.disabled;
|
|
1585
1585
|
return !t;
|
|
1586
1586
|
});
|
|
1587
1587
|
}
|
|
1588
|
-
var
|
|
1589
|
-
moveFocusInside:
|
|
1588
|
+
var nt = {
|
|
1589
|
+
moveFocusInside: Vr,
|
|
1590
1590
|
focusInside: Gr,
|
|
1591
|
-
focusNextElement:
|
|
1592
|
-
focusPrevElement:
|
|
1593
|
-
focusFirstElement:
|
|
1594
|
-
focusLastElement:
|
|
1595
|
-
captureFocusRestore:
|
|
1591
|
+
focusNextElement: Rn,
|
|
1592
|
+
focusPrevElement: In,
|
|
1593
|
+
focusFirstElement: Cn,
|
|
1594
|
+
focusLastElement: $n,
|
|
1595
|
+
captureFocusRestore: Jr
|
|
1596
1596
|
};
|
|
1597
|
-
function
|
|
1597
|
+
function Jn(e) {
|
|
1598
1598
|
var r = e.slice(-1)[0];
|
|
1599
|
-
r && !de &&
|
|
1599
|
+
r && !de && Gn();
|
|
1600
1600
|
var t = de, n = t && r && r.id === t.id;
|
|
1601
1601
|
de = r, t && !n && (t.onDeactivation(), e.filter(function(o) {
|
|
1602
1602
|
var a = o.id;
|
|
1603
1603
|
return a === t.id;
|
|
1604
|
-
}).length || t.returnFocus(!r)), r ? (W = null, (!n || t.observed !== r.observed) && r.onActivation(
|
|
1604
|
+
}).length || t.returnFocus(!r)), r ? (W = null, (!n || t.observed !== r.observed) && r.onActivation(nt), Se(), tr(Se)) : (Hn(), W = null);
|
|
1605
1605
|
}
|
|
1606
|
-
Mr.assignSyncMedium(
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
return e(
|
|
1606
|
+
Mr.assignSyncMedium(Yn);
|
|
1607
|
+
Nr.assignMedium(or);
|
|
1608
|
+
Bt.assignMedium(function(e) {
|
|
1609
|
+
return e(nt);
|
|
1610
1610
|
});
|
|
1611
|
-
const
|
|
1612
|
-
var
|
|
1613
|
-
return /* @__PURE__ */
|
|
1614
|
-
sideCar:
|
|
1611
|
+
const Kn = Kt(Vn, Jn)(zn);
|
|
1612
|
+
var ot = /* @__PURE__ */ _r(function(r, t) {
|
|
1613
|
+
return /* @__PURE__ */ Q.createElement(He, ye({
|
|
1614
|
+
sideCar: Kn,
|
|
1615
1615
|
ref: t
|
|
1616
1616
|
}, r));
|
|
1617
|
-
}),
|
|
1618
|
-
|
|
1619
|
-
var
|
|
1620
|
-
|
|
1621
|
-
function
|
|
1617
|
+
}), at = He.propTypes || {};
|
|
1618
|
+
at.sideCar;
|
|
1619
|
+
var Qn = St(at, ["sideCar"]);
|
|
1620
|
+
ot.propTypes = process.env.NODE_ENV !== "production" ? Qn : {};
|
|
1621
|
+
function it(e) {
|
|
1622
1622
|
var r, t, n = "";
|
|
1623
1623
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1624
1624
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1625
1625
|
var o = e.length;
|
|
1626
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1626
|
+
for (r = 0; r < o; r++) e[r] && (t = it(e[r])) && (n && (n += " "), n += t);
|
|
1627
1627
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1628
1628
|
return n;
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1631
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1630
|
+
function Xn() {
|
|
1631
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = it(e)) && (n && (n += " "), n += r);
|
|
1632
1632
|
return n;
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function ut(e) {
|
|
1635
1635
|
var r, t, n = "";
|
|
1636
1636
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1637
1637
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1638
1638
|
var o = e.length;
|
|
1639
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1639
|
+
for (r = 0; r < o; r++) e[r] && (t = ut(e[r])) && (n && (n += " "), n += t);
|
|
1640
1640
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1641
1641
|
return n;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1644
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1643
|
+
function Zn() {
|
|
1644
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = ut(e)) && (n && (n += " "), n += r);
|
|
1645
1645
|
return n;
|
|
1646
1646
|
}
|
|
1647
1647
|
const Pe = ({
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
name: G,
|
|
1673
|
-
disabled: z,
|
|
1674
|
-
...J
|
|
1648
|
+
as: e,
|
|
1649
|
+
children: r,
|
|
1650
|
+
display: t,
|
|
1651
|
+
m: n,
|
|
1652
|
+
mt: o,
|
|
1653
|
+
mr: a,
|
|
1654
|
+
mb: i,
|
|
1655
|
+
ml: u,
|
|
1656
|
+
mx: y,
|
|
1657
|
+
my: f,
|
|
1658
|
+
p: v,
|
|
1659
|
+
pt: l,
|
|
1660
|
+
pr: p,
|
|
1661
|
+
pb: g,
|
|
1662
|
+
pl: E,
|
|
1663
|
+
px: b,
|
|
1664
|
+
py: w,
|
|
1665
|
+
width: $,
|
|
1666
|
+
height: x,
|
|
1667
|
+
position: T,
|
|
1668
|
+
style: A,
|
|
1669
|
+
className: s,
|
|
1670
|
+
disabled: k,
|
|
1671
|
+
...U
|
|
1675
1672
|
}) => {
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1678
|
-
const
|
|
1679
|
-
...
|
|
1680
|
-
...
|
|
1673
|
+
const z = e || "div", h = {};
|
|
1674
|
+
t && (h.display = t), $ && (h.width = $), x && (h.height = x), T && (h.position = T), n && (h.margin = `var(--pittorica-space-${n})`), o && (h.marginTop = `var(--pittorica-space-${o})`), a && (h.marginRight = `var(--pittorica-space-${a})`), i && (h.marginBottom = `var(--pittorica-space-${i})`), u && (h.marginLeft = `var(--pittorica-space-${u})`), y && (h.marginLeft = `var(--pittorica-space-${y})`, h.marginRight = `var(--pittorica-space-${y})`), f && (h.marginTop = `var(--pittorica-space-${f})`, h.marginBottom = `var(--pittorica-space-${f})`), v && (h.padding = `var(--pittorica-space-${v})`), l && (h.paddingTop = `var(--pittorica-space-${l})`), p && (h.paddingRight = `var(--pittorica-space-${p})`), g && (h.paddingBottom = `var(--pittorica-space-${g})`), E && (h.paddingLeft = `var(--pittorica-space-${E})`), b && (h.paddingLeft = `var(--pittorica-space-${b})`, h.paddingRight = `var(--pittorica-space-${b})`), w && (h.paddingTop = `var(--pittorica-space-${w})`, h.paddingBottom = `var(--pittorica-space-${w})`);
|
|
1675
|
+
const H = {
|
|
1676
|
+
...A,
|
|
1677
|
+
...h
|
|
1681
1678
|
};
|
|
1682
1679
|
return /* @__PURE__ */ Y(
|
|
1683
|
-
|
|
1680
|
+
z,
|
|
1684
1681
|
{
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
rel: s,
|
|
1691
|
-
htmlFor: k,
|
|
1692
|
-
type: B,
|
|
1693
|
-
name: G,
|
|
1694
|
-
disabled: z,
|
|
1695
|
-
...J,
|
|
1696
|
-
children: t
|
|
1682
|
+
className: Zn("pittorica-box", s),
|
|
1683
|
+
style: H,
|
|
1684
|
+
disabled: k,
|
|
1685
|
+
...U,
|
|
1686
|
+
children: r
|
|
1697
1687
|
}
|
|
1698
1688
|
);
|
|
1699
1689
|
};
|
|
1700
1690
|
Pe.displayName = "Box";
|
|
1701
|
-
function
|
|
1691
|
+
function ct(e) {
|
|
1702
1692
|
var r, t, n = "";
|
|
1703
1693
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1704
1694
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1705
1695
|
var o = e.length;
|
|
1706
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1696
|
+
for (r = 0; r < o; r++) e[r] && (t = ct(e[r])) && (n && (n += " "), n += t);
|
|
1707
1697
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1708
1698
|
return n;
|
|
1709
1699
|
}
|
|
1710
|
-
function
|
|
1711
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1700
|
+
function eo() {
|
|
1701
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = ct(e)) && (n && (n += " "), n += r);
|
|
1712
1702
|
return n;
|
|
1713
1703
|
}
|
|
1714
|
-
function
|
|
1704
|
+
function st(e) {
|
|
1715
1705
|
var r, t, n = "";
|
|
1716
1706
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1717
1707
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1718
1708
|
var o = e.length;
|
|
1719
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1709
|
+
for (r = 0; r < o; r++) e[r] && (t = st(e[r])) && (n && (n += " "), n += t);
|
|
1720
1710
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1721
1711
|
return n;
|
|
1722
1712
|
}
|
|
1723
|
-
function
|
|
1724
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1713
|
+
function Sr() {
|
|
1714
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = st(e)) && (n && (n += " "), n += r);
|
|
1725
1715
|
return n;
|
|
1726
1716
|
}
|
|
1727
|
-
function
|
|
1717
|
+
function ft(e) {
|
|
1728
1718
|
var r, t, n = "";
|
|
1729
1719
|
if (typeof e == "string" || typeof e == "number") n += e;
|
|
1730
1720
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1731
1721
|
var o = e.length;
|
|
1732
|
-
for (r = 0; r < o; r++) e[r] && (t =
|
|
1722
|
+
for (r = 0; r < o; r++) e[r] && (t = ft(e[r])) && (n && (n += " "), n += t);
|
|
1733
1723
|
} else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
1734
1724
|
return n;
|
|
1735
1725
|
}
|
|
1736
|
-
function
|
|
1737
|
-
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r =
|
|
1726
|
+
function ro() {
|
|
1727
|
+
for (var e, r, t = 0, n = "", o = arguments.length; t < o; t++) (e = arguments[t]) && (r = ft(e)) && (n && (n += " "), n += r);
|
|
1738
1728
|
return n;
|
|
1739
1729
|
}
|
|
1740
|
-
const
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
name: G,
|
|
1766
|
-
disabled: z,
|
|
1767
|
-
...J
|
|
1730
|
+
const dt = ({
|
|
1731
|
+
as: e,
|
|
1732
|
+
children: r,
|
|
1733
|
+
display: t,
|
|
1734
|
+
m: n,
|
|
1735
|
+
mt: o,
|
|
1736
|
+
mr: a,
|
|
1737
|
+
mb: i,
|
|
1738
|
+
ml: u,
|
|
1739
|
+
mx: y,
|
|
1740
|
+
my: f,
|
|
1741
|
+
p: v,
|
|
1742
|
+
pt: l,
|
|
1743
|
+
pr: p,
|
|
1744
|
+
pb: g,
|
|
1745
|
+
pl: E,
|
|
1746
|
+
px: b,
|
|
1747
|
+
py: w,
|
|
1748
|
+
width: $,
|
|
1749
|
+
height: x,
|
|
1750
|
+
position: T,
|
|
1751
|
+
style: A,
|
|
1752
|
+
className: s,
|
|
1753
|
+
disabled: k,
|
|
1754
|
+
...U
|
|
1768
1755
|
}) => {
|
|
1769
|
-
const
|
|
1770
|
-
|
|
1771
|
-
const
|
|
1772
|
-
...
|
|
1773
|
-
...
|
|
1756
|
+
const z = e || "div", h = {};
|
|
1757
|
+
t && (h.display = t), $ && (h.width = $), x && (h.height = x), T && (h.position = T), n && (h.margin = `var(--pittorica-space-${n})`), o && (h.marginTop = `var(--pittorica-space-${o})`), a && (h.marginRight = `var(--pittorica-space-${a})`), i && (h.marginBottom = `var(--pittorica-space-${i})`), u && (h.marginLeft = `var(--pittorica-space-${u})`), y && (h.marginLeft = `var(--pittorica-space-${y})`, h.marginRight = `var(--pittorica-space-${y})`), f && (h.marginTop = `var(--pittorica-space-${f})`, h.marginBottom = `var(--pittorica-space-${f})`), v && (h.padding = `var(--pittorica-space-${v})`), l && (h.paddingTop = `var(--pittorica-space-${l})`), p && (h.paddingRight = `var(--pittorica-space-${p})`), g && (h.paddingBottom = `var(--pittorica-space-${g})`), E && (h.paddingLeft = `var(--pittorica-space-${E})`), b && (h.paddingLeft = `var(--pittorica-space-${b})`, h.paddingRight = `var(--pittorica-space-${b})`), w && (h.paddingTop = `var(--pittorica-space-${w})`, h.paddingBottom = `var(--pittorica-space-${w})`);
|
|
1758
|
+
const H = {
|
|
1759
|
+
...A,
|
|
1760
|
+
...h
|
|
1774
1761
|
};
|
|
1775
1762
|
return /* @__PURE__ */ Y(
|
|
1776
|
-
|
|
1763
|
+
z,
|
|
1777
1764
|
{
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
rel: s,
|
|
1784
|
-
htmlFor: k,
|
|
1785
|
-
type: B,
|
|
1786
|
-
name: G,
|
|
1787
|
-
disabled: z,
|
|
1788
|
-
...J,
|
|
1789
|
-
children: t
|
|
1765
|
+
className: ro("pittorica-box", s),
|
|
1766
|
+
style: H,
|
|
1767
|
+
disabled: k,
|
|
1768
|
+
...U,
|
|
1769
|
+
children: r
|
|
1790
1770
|
}
|
|
1791
1771
|
);
|
|
1792
1772
|
};
|
|
1793
|
-
|
|
1794
|
-
const
|
|
1773
|
+
dt.displayName = "Box";
|
|
1774
|
+
const lt = ({
|
|
1795
1775
|
children: e,
|
|
1796
|
-
as: r
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
rel: v,
|
|
1806
|
-
htmlFor: d,
|
|
1807
|
-
name: p,
|
|
1808
|
-
...h
|
|
1776
|
+
as: r,
|
|
1777
|
+
size: t,
|
|
1778
|
+
weight: n = "regular",
|
|
1779
|
+
align: o,
|
|
1780
|
+
truncate: a = !1,
|
|
1781
|
+
color: i,
|
|
1782
|
+
className: u,
|
|
1783
|
+
style: y,
|
|
1784
|
+
...f
|
|
1809
1785
|
}) => {
|
|
1810
|
-
const
|
|
1786
|
+
const v = r || "span", l = (i == null ? void 0 : i.startsWith("#")) || (i == null ? void 0 : i.startsWith("rgb")) || (i == null ? void 0 : i.startsWith("hsl")), p = /* @__PURE__ */ new Set([
|
|
1811
1787
|
"danger",
|
|
1812
1788
|
"success",
|
|
1813
1789
|
"error",
|
|
@@ -1819,115 +1795,128 @@ const eo = ({
|
|
|
1819
1795
|
"slate",
|
|
1820
1796
|
"blue",
|
|
1821
1797
|
"red"
|
|
1822
|
-
]),
|
|
1823
|
-
if (
|
|
1824
|
-
return
|
|
1825
|
-
})(),
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1798
|
+
]), g = (() => {
|
|
1799
|
+
if (i)
|
|
1800
|
+
return i === "inherit" ? "inherit" : l ? i : p.has(i) ? `var(--pittorica-${i}-9)` : i;
|
|
1801
|
+
})(), E = t ? typeof t == "string" ? `pittorica-text--size-${t}` : Sr({
|
|
1802
|
+
[`pittorica-text--size-${t.initial}`]: t.initial,
|
|
1803
|
+
[`pittorica-text--xs-size-${t.xs}`]: t.xs,
|
|
1804
|
+
[`pittorica-text--sm-size-${t.sm}`]: t.sm,
|
|
1805
|
+
[`pittorica-text--md-size-${t.md}`]: t.md,
|
|
1806
|
+
[`pittorica-text--lg-size-${t.lg}`]: t.lg,
|
|
1807
|
+
[`pittorica-text--xl-size-${t.xl}`]: t.xl
|
|
1808
|
+
}) : null, b = {
|
|
1809
|
+
...y,
|
|
1810
|
+
textAlign: o,
|
|
1811
|
+
color: g
|
|
1829
1812
|
};
|
|
1830
1813
|
return /* @__PURE__ */ Y(
|
|
1831
|
-
|
|
1814
|
+
dt,
|
|
1832
1815
|
{
|
|
1833
|
-
as:
|
|
1834
|
-
className:
|
|
1816
|
+
as: v,
|
|
1817
|
+
className: Sr(
|
|
1835
1818
|
"pittorica-text",
|
|
1836
|
-
|
|
1837
|
-
|
|
1819
|
+
E,
|
|
1820
|
+
{ "pittorica-text--truncate": a },
|
|
1821
|
+
u
|
|
1838
1822
|
),
|
|
1839
|
-
"data-weight":
|
|
1840
|
-
style:
|
|
1841
|
-
|
|
1842
|
-
target: f,
|
|
1843
|
-
rel: v,
|
|
1844
|
-
htmlFor: d,
|
|
1845
|
-
name: p,
|
|
1846
|
-
...h,
|
|
1823
|
+
"data-weight": n,
|
|
1824
|
+
style: b,
|
|
1825
|
+
...f,
|
|
1847
1826
|
children: e
|
|
1848
1827
|
}
|
|
1849
1828
|
);
|
|
1850
|
-
}
|
|
1829
|
+
};
|
|
1830
|
+
lt.displayName = "Text";
|
|
1831
|
+
const to = (e, r) => r ? typeof r == "string" ? [`pittorica-heading--${e}-${r}`] : Object.entries(r).filter(([t, n]) => n !== void 0).map(
|
|
1851
1832
|
([t, n]) => t === "initial" ? `pittorica-heading--${e}-${n}` : `pittorica-heading--${t}-${e}-${n}`
|
|
1852
|
-
) : [],
|
|
1833
|
+
) : [], vt = ({
|
|
1853
1834
|
children: e,
|
|
1854
|
-
as: r
|
|
1835
|
+
as: r,
|
|
1855
1836
|
size: t = "6",
|
|
1856
1837
|
weight: n = "bold",
|
|
1857
1838
|
className: o,
|
|
1858
1839
|
...a
|
|
1859
|
-
// Captures 'color' and other TextProps
|
|
1860
1840
|
}) => {
|
|
1861
|
-
const i =
|
|
1841
|
+
const i = to("size", t);
|
|
1862
1842
|
return /* @__PURE__ */ Y(
|
|
1863
|
-
|
|
1843
|
+
lt,
|
|
1864
1844
|
{
|
|
1865
|
-
as: r,
|
|
1845
|
+
as: r || "h1",
|
|
1866
1846
|
weight: n,
|
|
1867
|
-
className:
|
|
1847
|
+
className: eo("pittorica-heading", i, o),
|
|
1868
1848
|
...a,
|
|
1869
1849
|
children: e
|
|
1870
1850
|
}
|
|
1871
1851
|
);
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1852
|
+
};
|
|
1853
|
+
vt.displayName = "Heading";
|
|
1854
|
+
const pt = Pr(null), mt = () => {
|
|
1855
|
+
const e = Ot(pt);
|
|
1874
1856
|
if (!e)
|
|
1875
1857
|
throw new Error("Dialog compound components must be used within a Dialog");
|
|
1876
1858
|
return e;
|
|
1877
|
-
},
|
|
1859
|
+
}, no = ({
|
|
1878
1860
|
open: e,
|
|
1879
1861
|
onClose: r,
|
|
1880
1862
|
children: t,
|
|
1881
1863
|
className: n,
|
|
1882
1864
|
appearance: o,
|
|
1883
1865
|
closeOnOverlayClick: a = !0,
|
|
1884
|
-
closeOnEsc: i = !0
|
|
1866
|
+
closeOnEsc: i = !0,
|
|
1867
|
+
as: u,
|
|
1868
|
+
...y
|
|
1885
1869
|
}) => {
|
|
1886
|
-
const
|
|
1887
|
-
return
|
|
1888
|
-
|
|
1889
|
-
|
|
1870
|
+
const f = ur(), v = ur(), [l, p] = fe(), g = Oe(null), [E, b] = fe(!1);
|
|
1871
|
+
return we(() => {
|
|
1872
|
+
const x = requestAnimationFrame(() => b(!0));
|
|
1873
|
+
return () => cancelAnimationFrame(x);
|
|
1874
|
+
}, []), we(() => {
|
|
1890
1875
|
if (!e) return;
|
|
1891
|
-
const
|
|
1892
|
-
|
|
1876
|
+
const x = (T) => {
|
|
1877
|
+
T.key === "Escape" && i && r();
|
|
1893
1878
|
};
|
|
1894
|
-
return globalThis.addEventListener("keydown",
|
|
1895
|
-
}, [e, r, i]),
|
|
1879
|
+
return globalThis.addEventListener("keydown", x), () => globalThis.removeEventListener("keydown", x);
|
|
1880
|
+
}, [e, r, i]), we(() => {
|
|
1896
1881
|
if (!e) return;
|
|
1897
|
-
const
|
|
1882
|
+
const x = globalThis.getComputedStyle(document.body).overflow;
|
|
1898
1883
|
return document.body.style.overflow = "hidden", () => {
|
|
1899
|
-
document.body.style.overflow =
|
|
1884
|
+
document.body.style.overflow = x;
|
|
1900
1885
|
};
|
|
1901
|
-
}, [e]),
|
|
1902
|
-
if (e &&
|
|
1903
|
-
const
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1886
|
+
}, [e]), xt(() => {
|
|
1887
|
+
if (e && g.current) {
|
|
1888
|
+
const x = g.current.closest(
|
|
1889
|
+
".pittorica-theme"
|
|
1890
|
+
);
|
|
1891
|
+
if (x) {
|
|
1892
|
+
const T = x.dataset.appearance, A = requestAnimationFrame(
|
|
1893
|
+
() => p(T || void 0)
|
|
1907
1894
|
);
|
|
1908
|
-
|
|
1895
|
+
return () => cancelAnimationFrame(A);
|
|
1909
1896
|
}
|
|
1910
1897
|
}
|
|
1911
|
-
}, [e]), !e || !
|
|
1912
|
-
/* @__PURE__ */ Y("div", { ref:
|
|
1913
|
-
|
|
1898
|
+
}, [e]), !e || !E ? null : /* @__PURE__ */ bt(ht, { children: [
|
|
1899
|
+
/* @__PURE__ */ Y("div", { ref: g, style: { display: "none" }, "aria-hidden": "true" }),
|
|
1900
|
+
wt(
|
|
1914
1901
|
/* @__PURE__ */ Y(
|
|
1915
1902
|
"div",
|
|
1916
1903
|
{
|
|
1917
1904
|
className: "pittorica-dialog-overlay pittorica-theme",
|
|
1918
1905
|
onClick: a ? r : void 0,
|
|
1919
|
-
"data-appearance": o ??
|
|
1906
|
+
"data-appearance": o ?? l,
|
|
1920
1907
|
"aria-hidden": "true",
|
|
1921
|
-
children: /* @__PURE__ */ Y(
|
|
1908
|
+
children: /* @__PURE__ */ Y(ot, { returnFocus: !0, children: /* @__PURE__ */ Y(
|
|
1922
1909
|
Pe,
|
|
1923
1910
|
{
|
|
1924
|
-
|
|
1925
|
-
|
|
1911
|
+
as: u || "div",
|
|
1912
|
+
className: Xn("pittorica-dialog-content", n),
|
|
1913
|
+
onClick: (x) => x.stopPropagation(),
|
|
1926
1914
|
role: "dialog",
|
|
1927
1915
|
"aria-modal": "true",
|
|
1928
|
-
"aria-labelledby":
|
|
1929
|
-
"aria-describedby":
|
|
1930
|
-
|
|
1916
|
+
"aria-labelledby": f,
|
|
1917
|
+
"aria-describedby": v,
|
|
1918
|
+
...y,
|
|
1919
|
+
children: /* @__PURE__ */ Y(pt, { value: { titleId: f, descriptionId: v }, children: t })
|
|
1931
1920
|
}
|
|
1932
1921
|
) })
|
|
1933
1922
|
}
|
|
@@ -1935,19 +1924,19 @@ const eo = ({
|
|
|
1935
1924
|
document.body
|
|
1936
1925
|
)
|
|
1937
1926
|
] });
|
|
1938
|
-
},
|
|
1927
|
+
}, oo = ({
|
|
1939
1928
|
children: e,
|
|
1940
1929
|
id: r,
|
|
1941
1930
|
...t
|
|
1942
1931
|
}) => {
|
|
1943
|
-
const { titleId: n } =
|
|
1944
|
-
return /* @__PURE__ */ Y(
|
|
1945
|
-
},
|
|
1932
|
+
const { titleId: n } = mt();
|
|
1933
|
+
return /* @__PURE__ */ Y(vt, { as: "h2", id: n, size: "6", mb: "3", ...t, children: e });
|
|
1934
|
+
}, ao = ({
|
|
1946
1935
|
children: e,
|
|
1947
1936
|
id: r,
|
|
1948
1937
|
...t
|
|
1949
1938
|
}) => {
|
|
1950
|
-
const { descriptionId: n } =
|
|
1939
|
+
const { descriptionId: n } = mt();
|
|
1951
1940
|
return /* @__PURE__ */ Y(
|
|
1952
1941
|
Pe,
|
|
1953
1942
|
{
|
|
@@ -1961,7 +1950,10 @@ const eo = ({
|
|
|
1961
1950
|
children: e
|
|
1962
1951
|
}
|
|
1963
1952
|
);
|
|
1964
|
-
},
|
|
1953
|
+
}, io = ({
|
|
1954
|
+
children: e,
|
|
1955
|
+
...r
|
|
1956
|
+
}) => /* @__PURE__ */ Y(
|
|
1965
1957
|
Pe,
|
|
1966
1958
|
{
|
|
1967
1959
|
style: {
|
|
@@ -1970,12 +1962,17 @@ const eo = ({
|
|
|
1970
1962
|
gap: "var(--pittorica-space-3)",
|
|
1971
1963
|
marginTop: "var(--pittorica-space-6)"
|
|
1972
1964
|
},
|
|
1965
|
+
...r,
|
|
1973
1966
|
children: e
|
|
1974
1967
|
}
|
|
1975
1968
|
);
|
|
1969
|
+
no.displayName = "Dialog";
|
|
1970
|
+
oo.displayName = "Dialog.Title";
|
|
1971
|
+
ao.displayName = "Dialog.Description";
|
|
1972
|
+
io.displayName = "Dialog.Actions";
|
|
1976
1973
|
export {
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1974
|
+
no as Dialog,
|
|
1975
|
+
io as DialogActions,
|
|
1976
|
+
ao as DialogDescription,
|
|
1977
|
+
oo as DialogTitle
|
|
1981
1978
|
};
|