@sme.up/ketchup2 2.0.0-SNAPSHOT-20250625153756 → 2.0.0-SNAPSHOT-20250626094558
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/basic-components/list/list.d.ts.map +1 -1
- package/dist/basic-components/textfield/textfield-types.d.ts +1 -0
- package/dist/basic-components/textfield/textfield-types.d.ts.map +1 -1
- package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel.d.ts.map +1 -1
- package/dist/hooks/useClickOutside.d.ts +1 -1
- package/dist/hooks/useClickOutside.d.ts.map +1 -1
- package/dist/ketchup2.cjs.js +11 -11
- package/dist/ketchup2.es.js +924 -916
- package/package.json +1 -1
package/dist/ketchup2.es.js
CHANGED
|
@@ -2,9 +2,9 @@ var Mr = Object.defineProperty;
|
|
|
2
2
|
var Fr = (r, e, t) => e in r ? Mr(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var me = (r, e, t) => Fr(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import * as He from "react";
|
|
5
|
-
import nt, { useEffect as ne, useRef as ce, useState as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
var Ge = { exports: {} },
|
|
5
|
+
import nt, { useEffect as ne, useRef as ce, useState as q, useCallback as le, useLayoutEffect as Vr, useId as Be, useMemo as Yr, createElement as Wr } from "react";
|
|
6
|
+
import { createPortal as Ur } from "react-dom";
|
|
7
|
+
var Ge = { exports: {} }, Ne = {};
|
|
8
8
|
/**
|
|
9
9
|
* @license React
|
|
10
10
|
* react-jsx-runtime.production.js
|
|
@@ -16,7 +16,7 @@ var Ge = { exports: {} }, Ie = {};
|
|
|
16
16
|
*/
|
|
17
17
|
var Nt;
|
|
18
18
|
function Br() {
|
|
19
|
-
if (Nt) return
|
|
19
|
+
if (Nt) return Ne;
|
|
20
20
|
Nt = 1;
|
|
21
21
|
var r = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
22
22
|
function t(n, s, a) {
|
|
@@ -34,9 +34,9 @@ function Br() {
|
|
|
34
34
|
props: a
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return Ne.Fragment = e, Ne.jsx = t, Ne.jsxs = t, Ne;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
39
|
+
var Ie = {};
|
|
40
40
|
/**
|
|
41
41
|
* @license React
|
|
42
42
|
* react-jsx-runtime.development.js
|
|
@@ -52,7 +52,7 @@ function Hr() {
|
|
|
52
52
|
function r(h) {
|
|
53
53
|
if (h == null) return null;
|
|
54
54
|
if (typeof h == "function")
|
|
55
|
-
return h.$$typeof ===
|
|
55
|
+
return h.$$typeof === C ? null : h.displayName || h.name || null;
|
|
56
56
|
if (typeof h == "string") return h;
|
|
57
57
|
switch (h) {
|
|
58
58
|
case v:
|
|
@@ -104,11 +104,11 @@ function Hr() {
|
|
|
104
104
|
}
|
|
105
105
|
if (x) {
|
|
106
106
|
x = console;
|
|
107
|
-
var R = x.error,
|
|
107
|
+
var R = x.error, $ = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
108
108
|
return R.call(
|
|
109
109
|
x,
|
|
110
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
|
-
|
|
111
|
+
$
|
|
112
112
|
), e(h);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -139,7 +139,7 @@ function Hr() {
|
|
|
139
139
|
}
|
|
140
140
|
function o(h, x) {
|
|
141
141
|
function R() {
|
|
142
|
-
|
|
142
|
+
L || (L = !0, console.error(
|
|
143
143
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
144
144
|
x
|
|
145
145
|
));
|
|
@@ -155,12 +155,12 @@ function Hr() {
|
|
|
155
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
156
|
)), h = this.props.ref, h !== void 0 ? h : null;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
return R =
|
|
158
|
+
function c(h, x, R, $, _, N, Y, U) {
|
|
159
|
+
return R = N.ref, h = {
|
|
160
160
|
$$typeof: m,
|
|
161
161
|
type: h,
|
|
162
162
|
key: x,
|
|
163
|
-
props:
|
|
163
|
+
props: N,
|
|
164
164
|
_owner: _
|
|
165
165
|
}, (R !== void 0 ? R : null) !== null ? Object.defineProperty(h, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
@@ -179,21 +179,21 @@ function Hr() {
|
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
|
-
value:
|
|
182
|
+
value: Y
|
|
183
183
|
}), Object.defineProperty(h, "_debugTask", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
|
-
value:
|
|
187
|
+
value: U
|
|
188
188
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function u(h, x, R, $, _, N, Y, U) {
|
|
191
191
|
var V = x.children;
|
|
192
192
|
if (V !== void 0)
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
for (
|
|
196
|
-
f(V[
|
|
193
|
+
if ($)
|
|
194
|
+
if (A(V)) {
|
|
195
|
+
for ($ = 0; $ < V.length; $++)
|
|
196
|
+
f(V[$]);
|
|
197
197
|
Object.freeze && Object.freeze(V);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
@@ -205,42 +205,42 @@ function Hr() {
|
|
|
205
205
|
var J = Object.keys(x).filter(function(ae) {
|
|
206
206
|
return ae !== "key";
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
$ = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", M[V + $] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s {...props} />
|
|
212
212
|
React keys must be passed directly to JSX without using spread:
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
|
-
|
|
215
|
+
$,
|
|
216
216
|
V,
|
|
217
217
|
J,
|
|
218
218
|
V
|
|
219
|
-
), M[V +
|
|
219
|
+
), M[V + $] = !0);
|
|
220
220
|
}
|
|
221
221
|
if (V = null, R !== void 0 && (t(R), V = "" + R), i(x) && (t(x.key), V = "" + x.key), "key" in x) {
|
|
222
222
|
R = {};
|
|
223
|
-
for (var
|
|
224
|
-
|
|
223
|
+
for (var z in x)
|
|
224
|
+
z !== "key" && (R[z] = x[z]);
|
|
225
225
|
} else R = x;
|
|
226
226
|
return V && o(
|
|
227
227
|
R,
|
|
228
228
|
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
|
|
229
|
-
),
|
|
229
|
+
), c(
|
|
230
230
|
h,
|
|
231
231
|
V,
|
|
232
|
-
|
|
232
|
+
N,
|
|
233
233
|
_,
|
|
234
234
|
s(),
|
|
235
235
|
R,
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
Y,
|
|
237
|
+
U
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
function f(h) {
|
|
241
241
|
typeof h == "object" && h !== null && h.$$typeof === m && h._store && (h._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var d = nt, m = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), j = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), O = Symbol.for("react.activity"),
|
|
243
|
+
var d = nt, m = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), j = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), F = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, A = Array.isArray, W = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
d = {
|
|
@@ -248,36 +248,36 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return h();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
251
|
+
var L, H = {}, G = d["react-stack-bottom-frame"].bind(
|
|
252
252
|
d,
|
|
253
253
|
a
|
|
254
|
-
)(), X =
|
|
255
|
-
|
|
256
|
-
var
|
|
257
|
-
return
|
|
254
|
+
)(), X = W(n(a)), M = {};
|
|
255
|
+
Ie.Fragment = v, Ie.jsx = function(h, x, R, $, _) {
|
|
256
|
+
var N = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return u(
|
|
258
258
|
h,
|
|
259
259
|
x,
|
|
260
260
|
R,
|
|
261
261
|
!1,
|
|
262
|
-
|
|
262
|
+
$,
|
|
263
263
|
_,
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
N ? Error("react-stack-top-frame") : G,
|
|
265
|
+
N ? W(n(h)) : X
|
|
266
266
|
);
|
|
267
|
-
},
|
|
268
|
-
var
|
|
269
|
-
return
|
|
267
|
+
}, Ie.jsxs = function(h, x, R, $, _) {
|
|
268
|
+
var N = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
269
|
+
return u(
|
|
270
270
|
h,
|
|
271
271
|
x,
|
|
272
272
|
R,
|
|
273
273
|
!0,
|
|
274
|
-
|
|
274
|
+
$,
|
|
275
275
|
_,
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
N ? Error("react-stack-top-frame") : G,
|
|
277
|
+
N ? W(n(h)) : X
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
|
-
}()),
|
|
280
|
+
}()), Ie;
|
|
281
281
|
}
|
|
282
282
|
var Mt;
|
|
283
283
|
function Gr() {
|
|
@@ -320,9 +320,9 @@ const je = ({ label: r, disabled: e, htmlFor: t }) => {
|
|
|
320
320
|
t.content.filter((l) => e.includes(l.id)),
|
|
321
321
|
+t.columns
|
|
322
322
|
).map(
|
|
323
|
-
(l,
|
|
323
|
+
(l, c) => ({
|
|
324
324
|
...t,
|
|
325
|
-
id: `${t.id}-${
|
|
325
|
+
id: `${t.id}-${c}`,
|
|
326
326
|
content: l,
|
|
327
327
|
gridCols: t.columns,
|
|
328
328
|
horizontal: !0
|
|
@@ -380,10 +380,10 @@ const je = ({ label: r, disabled: e, htmlFor: t }) => {
|
|
|
380
380
|
styles: T
|
|
381
381
|
}
|
|
382
382
|
};
|
|
383
|
-
}, {}), o = i(a), l = `${ge["smp-layout"]} ${e.horizontal ? ge["smp-layout-horizontal"] : ge["smp-layout-vertical"]}`,
|
|
383
|
+
}, {}), o = i(a), l = `${ge["smp-layout"]} ${e.horizontal ? ge["smp-layout-horizontal"] : ge["smp-layout-vertical"]}`, c = e.horizontal || Vt(e.sections || []) ? Ft(
|
|
384
384
|
a,
|
|
385
385
|
e.horizontal ? n : s
|
|
386
|
-
) : {},
|
|
386
|
+
) : {}, u = (d) => {
|
|
387
387
|
var p, v;
|
|
388
388
|
const m = /* @__PURE__ */ y.jsx(
|
|
389
389
|
"div",
|
|
@@ -391,7 +391,7 @@ const je = ({ label: r, disabled: e, htmlFor: t }) => {
|
|
|
391
391
|
"smp-id": `section-${d.id}`,
|
|
392
392
|
className: o[d.id].classes,
|
|
393
393
|
style: o[d.id].styles,
|
|
394
|
-
children: (p = d.sections) != null && p.length ? d.sections.map((E) =>
|
|
394
|
+
children: (p = d.sections) != null && p.length ? d.sections.map((E) => u(E)) : (v = d.content) == null ? void 0 : v.map(
|
|
395
395
|
(E) => f(E, d.justify, d.align)
|
|
396
396
|
)
|
|
397
397
|
},
|
|
@@ -432,7 +432,7 @@ const je = ({ label: r, disabled: e, htmlFor: t }) => {
|
|
|
432
432
|
d.id
|
|
433
433
|
);
|
|
434
434
|
};
|
|
435
|
-
return /* @__PURE__ */ y.jsx("div", { className: l, style:
|
|
435
|
+
return /* @__PURE__ */ y.jsx("div", { className: l, style: c, "smp-id": "layout", children: a.map((d) => u(d)) });
|
|
436
436
|
}, te = {
|
|
437
437
|
AUTOCOMPLETE: "ACP",
|
|
438
438
|
BUTTON_LIST: "BTL",
|
|
@@ -491,16 +491,16 @@ class at {
|
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
493
|
function Xr(r, e) {
|
|
494
|
-
if (
|
|
495
|
-
const
|
|
496
|
-
if (!isNaN(
|
|
497
|
-
return
|
|
494
|
+
if (Ct(r)) {
|
|
495
|
+
const u = new Date(r);
|
|
496
|
+
if (!isNaN(u.getTime()))
|
|
497
|
+
return u;
|
|
498
498
|
}
|
|
499
499
|
const t = /* @__PURE__ */ new Date(), n = r.replaceAll("/", "").replaceAll("-", "");
|
|
500
500
|
let s = "DDMMYYYY";
|
|
501
501
|
e === "en" && (s = "MMDDYYYY");
|
|
502
502
|
const a = s.indexOf("DD"), i = s.indexOf("MM");
|
|
503
|
-
let o = 0, l = 0,
|
|
503
|
+
let o = 0, l = 0, c = "";
|
|
504
504
|
switch (n.length) {
|
|
505
505
|
case 1:
|
|
506
506
|
case 2:
|
|
@@ -510,20 +510,20 @@ function Xr(r, e) {
|
|
|
510
510
|
return o = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), i === 0 ? (t.setMonth(o - 1), t.setDate(l)) : a === 0 && (t.setMonth(l - 1), t.setDate(o)), ze(t) ? t : r;
|
|
511
511
|
case 5:
|
|
512
512
|
case 6: {
|
|
513
|
-
o = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), Number(n.substring(4)) > 50 ?
|
|
514
|
-
let
|
|
515
|
-
return i === 0 ? (
|
|
513
|
+
o = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), Number(n.substring(4)) > 50 ? c = "19" + n.substring(4) : c = "20" + n.substring(4);
|
|
514
|
+
let u = 0, f = 0;
|
|
515
|
+
return i === 0 ? (u = l, f = o - 1, t.setFullYear(parseInt(c), f, u)) : a === 0 && (u = o, f = l - 1, t.setFullYear(parseInt(c), f, u)), jt(o, f, parseInt(c)) && ze(t) ? t : r;
|
|
516
516
|
}
|
|
517
517
|
case 7:
|
|
518
518
|
case 8: {
|
|
519
|
-
o = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)),
|
|
520
|
-
let
|
|
521
|
-
return i === 0 ? (
|
|
519
|
+
o = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), c = n.substring(4);
|
|
520
|
+
let u = 0, f = 0;
|
|
521
|
+
return i === 0 ? (u = l, f = o - 1, t.setFullYear(parseInt(c), f, u)) : a === 0 && (u = o, f = l - 1, t.setFullYear(parseInt(c), f, u)), jt(u, f, parseInt(c)) && ze(t) ? t : r;
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
return r;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Ct(r) {
|
|
527
527
|
return /^\d{4}-\d{2}-\d{2}$/.test(r) && r.length === 10;
|
|
528
528
|
}
|
|
529
529
|
function ze(r) {
|
|
@@ -602,35 +602,36 @@ const Yt = /* @__PURE__ */ new Map([
|
|
|
602
602
|
return Zr(r) && `${r.substring(0, 4)}-${r.substring(4, 6)}-${r.substring(6, 8)}` || r;
|
|
603
603
|
},
|
|
604
604
|
isoToLegacy(r) {
|
|
605
|
-
return
|
|
605
|
+
return Ct(r) && r.replaceAll("-", "") || r;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
]
|
|
609
|
-
]),
|
|
609
|
+
]), Ve = (r, e, t) => {
|
|
610
610
|
ne(() => {
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
if (!e) return;
|
|
612
|
+
const n = (s) => {
|
|
613
|
+
typeof r == "object" && r !== null && "current" in r && r.current && !r.current.contains(s.target) && t();
|
|
613
614
|
};
|
|
614
|
-
return document.addEventListener("mousedown",
|
|
615
|
-
document.removeEventListener("mousedown",
|
|
615
|
+
return document.addEventListener("mousedown", n), () => {
|
|
616
|
+
document.removeEventListener("mousedown", n);
|
|
616
617
|
};
|
|
617
|
-
}, [r, e]);
|
|
618
|
+
}, [r, t, e]);
|
|
618
619
|
};
|
|
619
620
|
function pt({
|
|
620
621
|
position: r = "bottom",
|
|
621
622
|
enabled: e = !0
|
|
622
623
|
}) {
|
|
623
|
-
const t = ce(null), n = ce(null), [s, a] =
|
|
624
|
+
const t = ce(null), n = ce(null), [s, a] = q(0), i = le(() => {
|
|
624
625
|
const o = t.current, l = n.current;
|
|
625
626
|
if (!o || !l) return;
|
|
626
|
-
const { top:
|
|
627
|
+
const { top: c, left: u, width: f, height: d } = o.getBoundingClientRect();
|
|
627
628
|
a(f);
|
|
628
629
|
const m = l.offsetHeight, p = l.offsetWidth;
|
|
629
630
|
if (p === 0 || m === 0) {
|
|
630
631
|
requestAnimationFrame(i);
|
|
631
632
|
return;
|
|
632
633
|
}
|
|
633
|
-
let v =
|
|
634
|
+
let v = c + window.scrollY, E = u + window.scrollX;
|
|
634
635
|
switch (r) {
|
|
635
636
|
case "top":
|
|
636
637
|
v -= m;
|
|
@@ -661,7 +662,7 @@ function pt({
|
|
|
661
662
|
};
|
|
662
663
|
}, [i, e]), { anchorRef: t, targetRef: n, anchorWidth: s };
|
|
663
664
|
}
|
|
664
|
-
const
|
|
665
|
+
const Ae = (r, e, t) => {
|
|
665
666
|
if (r == "")
|
|
666
667
|
return "";
|
|
667
668
|
if (t)
|
|
@@ -722,10 +723,10 @@ var Ke = {};
|
|
|
722
723
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
723
724
|
* MIT Licensed
|
|
724
725
|
*/
|
|
725
|
-
var
|
|
726
|
+
var Wt;
|
|
726
727
|
function nn() {
|
|
727
|
-
if (
|
|
728
|
-
|
|
728
|
+
if (Wt) return Ke;
|
|
729
|
+
Wt = 1;
|
|
729
730
|
var r = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g, e = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/, t = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/, n = /\\([\u000b\u0020-\u00ff])/g, s = /([\\"])/g, a = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
730
731
|
Ke.format = i, Ke.parse = o;
|
|
731
732
|
function i(f) {
|
|
@@ -739,7 +740,7 @@ function nn() {
|
|
|
739
740
|
for (var v, E = Object.keys(d).sort(), T = 0; T < E.length; T++) {
|
|
740
741
|
if (v = E[T], !t.test(v))
|
|
741
742
|
throw new TypeError("invalid parameter name");
|
|
742
|
-
p += "; " + v + "=" +
|
|
743
|
+
p += "; " + v + "=" + c(d[v]);
|
|
743
744
|
}
|
|
744
745
|
return p;
|
|
745
746
|
}
|
|
@@ -752,7 +753,7 @@ function nn() {
|
|
|
752
753
|
var m = d.indexOf(";"), p = m !== -1 ? d.slice(0, m).trim() : d.trim();
|
|
753
754
|
if (!a.test(p))
|
|
754
755
|
throw new TypeError("invalid media type");
|
|
755
|
-
var v = new
|
|
756
|
+
var v = new u(p.toLowerCase());
|
|
756
757
|
if (m !== -1) {
|
|
757
758
|
var E, T, b;
|
|
758
759
|
for (r.lastIndex = m; T = r.exec(d); ) {
|
|
@@ -771,7 +772,7 @@ function nn() {
|
|
|
771
772
|
throw new TypeError("content-type header is missing from object");
|
|
772
773
|
return d;
|
|
773
774
|
}
|
|
774
|
-
function
|
|
775
|
+
function c(f) {
|
|
775
776
|
var d = String(f);
|
|
776
777
|
if (t.test(d))
|
|
777
778
|
return d;
|
|
@@ -779,14 +780,14 @@ function nn() {
|
|
|
779
780
|
throw new TypeError("invalid parameter value");
|
|
780
781
|
return '"' + d.replace(s, "\\$1") + '"';
|
|
781
782
|
}
|
|
782
|
-
function
|
|
783
|
+
function u(f) {
|
|
783
784
|
this.parameters = /* @__PURE__ */ Object.create(null), this.type = f;
|
|
784
785
|
}
|
|
785
786
|
return Ke;
|
|
786
787
|
}
|
|
787
788
|
var sn = nn(), $e = /* @__PURE__ */ new Map(), Rr = function(e) {
|
|
788
789
|
return e.cloneNode(!0);
|
|
789
|
-
},
|
|
790
|
+
}, Ut = function() {
|
|
790
791
|
return window.location.protocol === "file:";
|
|
791
792
|
}, Dr = function(e, t, n) {
|
|
792
793
|
var s = new XMLHttpRequest();
|
|
@@ -802,8 +803,8 @@ var sn = nn(), $e = /* @__PURE__ */ new Map(), Rr = function(e) {
|
|
|
802
803
|
}
|
|
803
804
|
if (s.readyState === 4) {
|
|
804
805
|
if (s.status === 404 || s.responseXML === null)
|
|
805
|
-
throw new Error(
|
|
806
|
-
if (s.status === 200 ||
|
|
806
|
+
throw new Error(Ut() ? "Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver." : "Unable to load SVG file: " + e);
|
|
807
|
+
if (s.status === 200 || Ut() && s.status === 0)
|
|
807
808
|
n(null, s);
|
|
808
809
|
else
|
|
809
810
|
throw new Error("There was a problem injecting the SVG: " + s.status + " " + s.statusText);
|
|
@@ -821,8 +822,8 @@ var sn = nn(), $e = /* @__PURE__ */ new Map(), Rr = function(e) {
|
|
|
821
822
|
for (var t = function(i, o) {
|
|
822
823
|
setTimeout(function() {
|
|
823
824
|
if (Array.isArray(we[e])) {
|
|
824
|
-
var l = $e.get(e),
|
|
825
|
-
l instanceof SVGSVGElement &&
|
|
825
|
+
var l = $e.get(e), c = we[e][i];
|
|
826
|
+
l instanceof SVGSVGElement && c(null, Rr(l)), l instanceof Error && c(l), i === we[e].length - 1 && delete we[e];
|
|
826
827
|
}
|
|
827
828
|
}, 0);
|
|
828
829
|
}, n = 0, s = we[e].length; n < s; n++)
|
|
@@ -861,10 +862,10 @@ var sn = nn(), $e = /* @__PURE__ */ new Map(), Rr = function(e) {
|
|
|
861
862
|
return;
|
|
862
863
|
}
|
|
863
864
|
xe.push(e), e.setAttribute("src", "");
|
|
864
|
-
var
|
|
865
|
-
|
|
865
|
+
var c = s ? on : ln;
|
|
866
|
+
c(l, a, function(u, f) {
|
|
866
867
|
if (!f) {
|
|
867
|
-
xe.splice(xe.indexOf(e), 1), e = null, o(
|
|
868
|
+
xe.splice(xe.indexOf(e), 1), e = null, o(u);
|
|
868
869
|
return;
|
|
869
870
|
}
|
|
870
871
|
var d = e.getAttribute("id");
|
|
@@ -899,37 +900,37 @@ var sn = nn(), $e = /* @__PURE__ */ new Map(), Rr = function(e) {
|
|
|
899
900
|
}, S, g, D, k, w;
|
|
900
901
|
Object.keys(j).forEach(function(X) {
|
|
901
902
|
S = X, D = j[X], g = f.querySelectorAll(S + "[id]");
|
|
902
|
-
for (var M = function(
|
|
903
|
-
k = g[
|
|
904
|
-
var
|
|
903
|
+
for (var M = function($, _) {
|
|
904
|
+
k = g[$].id, w = k + "-" + un();
|
|
905
|
+
var N;
|
|
905
906
|
Array.prototype.forEach.call(D, function(B) {
|
|
906
|
-
|
|
907
|
-
for (var Z = 0, re =
|
|
908
|
-
var se =
|
|
909
|
-
se && !se.match(new RegExp('url\\("?#' + k + '"?\\)')) ||
|
|
907
|
+
N = f.querySelectorAll("[" + B + '*="' + k + '"]');
|
|
908
|
+
for (var Z = 0, re = N.length; Z < re; Z++) {
|
|
909
|
+
var se = N[Z].getAttribute(B);
|
|
910
|
+
se && !se.match(new RegExp('url\\("?#' + k + '"?\\)')) || N[Z].setAttribute(B, "url(#" + w + ")");
|
|
910
911
|
}
|
|
911
912
|
});
|
|
912
|
-
for (var
|
|
913
|
-
var
|
|
914
|
-
|
|
913
|
+
for (var Y = f.querySelectorAll("[*|href]"), U = [], V = 0, J = Y.length; V < J; V++) {
|
|
914
|
+
var z = Y[V].getAttributeNS(vt, "href");
|
|
915
|
+
z && z.toString() === "#" + g[$].id && U.push(Y[V]);
|
|
915
916
|
}
|
|
916
|
-
for (var ae = 0, I =
|
|
917
|
-
|
|
918
|
-
g[
|
|
917
|
+
for (var ae = 0, I = U.length; ae < I; ae++)
|
|
918
|
+
U[ae].setAttributeNS(vt, "href", "#" + w);
|
|
919
|
+
g[$].id = w;
|
|
919
920
|
}, h = 0, x = g.length; h < x; h++)
|
|
920
921
|
M(h);
|
|
921
922
|
});
|
|
922
923
|
}
|
|
923
924
|
f.removeAttribute("xmlns:a");
|
|
924
|
-
for (var O = f.querySelectorAll("script"),
|
|
925
|
-
P = O[
|
|
926
|
-
if (
|
|
927
|
-
for (var
|
|
928
|
-
new Function(
|
|
925
|
+
for (var O = f.querySelectorAll("script"), C = [], F, P, A = 0, W = O.length; A < W; A++)
|
|
926
|
+
P = O[A].getAttribute("type"), (!P || P === "application/ecmascript" || P === "application/javascript" || P === "text/javascript") && (F = O[A].innerText || O[A].textContent, F && C.push(F), f.removeChild(O[A]));
|
|
927
|
+
if (C.length > 0 && (t === "always" || t === "once" && !Ht[l])) {
|
|
928
|
+
for (var L = 0, H = C.length; L < H; L++)
|
|
929
|
+
new Function(C[L])(window);
|
|
929
930
|
Ht[l] = !0;
|
|
930
931
|
}
|
|
931
|
-
var
|
|
932
|
-
if (Array.prototype.forEach.call(
|
|
932
|
+
var G = f.querySelectorAll("style");
|
|
933
|
+
if (Array.prototype.forEach.call(G, function(X) {
|
|
933
934
|
X.textContent += "";
|
|
934
935
|
}), f.setAttribute("xmlns", fn), f.setAttribute("xmlns:xlink", vt), i(f), !e.parentNode) {
|
|
935
936
|
xe.splice(xe.indexOf(e), 1), e = null, o(new Error("Parent node is null"));
|
|
@@ -940,14 +941,14 @@ var sn = nn(), $e = /* @__PURE__ */ new Map(), Rr = function(e) {
|
|
|
940
941
|
}, dn = function(e, t) {
|
|
941
942
|
var n = t === void 0 ? {} : t, s = n.afterAll, a = s === void 0 ? function() {
|
|
942
943
|
} : s, i = n.afterEach, o = i === void 0 ? function() {
|
|
943
|
-
} : i, l = n.beforeEach,
|
|
944
|
-
} : l,
|
|
944
|
+
} : i, l = n.beforeEach, c = l === void 0 ? function() {
|
|
945
|
+
} : l, u = n.cacheRequests, f = u === void 0 ? !0 : u, d = n.evalScripts, m = d === void 0 ? "never" : d, p = n.httpRequestWithCredentials, v = p === void 0 ? !1 : p, E = n.renumerateIRIElements, T = E === void 0 ? !0 : E;
|
|
945
946
|
if (e && "length" in e)
|
|
946
947
|
for (var b = 0, j = 0, S = e.length; j < S; j++)
|
|
947
|
-
Gt(e[j], m, T, f, v,
|
|
948
|
+
Gt(e[j], m, T, f, v, c, function(g, D) {
|
|
948
949
|
o(g, D), e && "length" in e && e.length === ++b && a(b);
|
|
949
950
|
});
|
|
950
|
-
else e ? Gt(e, m, T, f, v,
|
|
951
|
+
else e ? Gt(e, m, T, f, v, c, function(g, D) {
|
|
951
952
|
o(g, D), a(1), e = null;
|
|
952
953
|
}) : a(0);
|
|
953
954
|
}, qe = { exports: {} }, Je = { exports: {} }, Q = {};
|
|
@@ -963,7 +964,7 @@ var zt;
|
|
|
963
964
|
function pn() {
|
|
964
965
|
if (zt) return Q;
|
|
965
966
|
zt = 1;
|
|
966
|
-
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, o = r ? Symbol.for("react.context") : 60110, l = r ? Symbol.for("react.async_mode") : 60111,
|
|
967
|
+
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, o = r ? Symbol.for("react.context") : 60110, l = r ? Symbol.for("react.async_mode") : 60111, c = r ? Symbol.for("react.concurrent_mode") : 60111, u = r ? Symbol.for("react.forward_ref") : 60112, f = r ? Symbol.for("react.suspense") : 60113, d = r ? Symbol.for("react.suspense_list") : 60120, m = r ? Symbol.for("react.memo") : 60115, p = r ? Symbol.for("react.lazy") : 60116, v = r ? Symbol.for("react.block") : 60121, E = r ? Symbol.for("react.fundamental") : 60117, T = r ? Symbol.for("react.responder") : 60118, b = r ? Symbol.for("react.scope") : 60119;
|
|
967
968
|
function j(g) {
|
|
968
969
|
if (typeof g == "object" && g !== null) {
|
|
969
970
|
var D = g.$$typeof;
|
|
@@ -971,7 +972,7 @@ function pn() {
|
|
|
971
972
|
case e:
|
|
972
973
|
switch (g = g.type, g) {
|
|
973
974
|
case l:
|
|
974
|
-
case
|
|
975
|
+
case c:
|
|
975
976
|
case n:
|
|
976
977
|
case a:
|
|
977
978
|
case s:
|
|
@@ -980,7 +981,7 @@ function pn() {
|
|
|
980
981
|
default:
|
|
981
982
|
switch (g = g && g.$$typeof, g) {
|
|
982
983
|
case o:
|
|
983
|
-
case
|
|
984
|
+
case u:
|
|
984
985
|
case p:
|
|
985
986
|
case m:
|
|
986
987
|
case i:
|
|
@@ -995,9 +996,9 @@ function pn() {
|
|
|
995
996
|
}
|
|
996
997
|
}
|
|
997
998
|
function S(g) {
|
|
998
|
-
return j(g) ===
|
|
999
|
+
return j(g) === c;
|
|
999
1000
|
}
|
|
1000
|
-
return Q.AsyncMode = l, Q.ConcurrentMode =
|
|
1001
|
+
return Q.AsyncMode = l, Q.ConcurrentMode = c, Q.ContextConsumer = o, Q.ContextProvider = i, Q.Element = e, Q.ForwardRef = u, Q.Fragment = n, Q.Lazy = p, Q.Memo = m, Q.Portal = t, Q.Profiler = a, Q.StrictMode = s, Q.Suspense = f, Q.isAsyncMode = function(g) {
|
|
1001
1002
|
return S(g) || j(g) === l;
|
|
1002
1003
|
}, Q.isConcurrentMode = S, Q.isContextConsumer = function(g) {
|
|
1003
1004
|
return j(g) === o;
|
|
@@ -1006,7 +1007,7 @@ function pn() {
|
|
|
1006
1007
|
}, Q.isElement = function(g) {
|
|
1007
1008
|
return typeof g == "object" && g !== null && g.$$typeof === e;
|
|
1008
1009
|
}, Q.isForwardRef = function(g) {
|
|
1009
|
-
return j(g) ===
|
|
1010
|
+
return j(g) === u;
|
|
1010
1011
|
}, Q.isFragment = function(g) {
|
|
1011
1012
|
return j(g) === n;
|
|
1012
1013
|
}, Q.isLazy = function(g) {
|
|
@@ -1022,7 +1023,7 @@ function pn() {
|
|
|
1022
1023
|
}, Q.isSuspense = function(g) {
|
|
1023
1024
|
return j(g) === f;
|
|
1024
1025
|
}, Q.isValidElementType = function(g) {
|
|
1025
|
-
return typeof g == "string" || typeof g == "function" || g === n || g ===
|
|
1026
|
+
return typeof g == "string" || typeof g == "function" || g === n || g === c || g === a || g === s || g === f || g === d || typeof g == "object" && g !== null && (g.$$typeof === p || g.$$typeof === m || g.$$typeof === i || g.$$typeof === o || g.$$typeof === u || g.$$typeof === E || g.$$typeof === T || g.$$typeof === b || g.$$typeof === v);
|
|
1026
1027
|
}, Q.typeOf = j, Q;
|
|
1027
1028
|
}
|
|
1028
1029
|
var ee = {};
|
|
@@ -1037,10 +1038,10 @@ var ee = {};
|
|
|
1037
1038
|
var Kt;
|
|
1038
1039
|
function hn() {
|
|
1039
1040
|
return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1040
|
-
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, o = r ? Symbol.for("react.context") : 60110, l = r ? Symbol.for("react.async_mode") : 60111,
|
|
1041
|
+
var r = typeof Symbol == "function" && Symbol.for, e = r ? Symbol.for("react.element") : 60103, t = r ? Symbol.for("react.portal") : 60106, n = r ? Symbol.for("react.fragment") : 60107, s = r ? Symbol.for("react.strict_mode") : 60108, a = r ? Symbol.for("react.profiler") : 60114, i = r ? Symbol.for("react.provider") : 60109, o = r ? Symbol.for("react.context") : 60110, l = r ? Symbol.for("react.async_mode") : 60111, c = r ? Symbol.for("react.concurrent_mode") : 60111, u = r ? Symbol.for("react.forward_ref") : 60112, f = r ? Symbol.for("react.suspense") : 60113, d = r ? Symbol.for("react.suspense_list") : 60120, m = r ? Symbol.for("react.memo") : 60115, p = r ? Symbol.for("react.lazy") : 60116, v = r ? Symbol.for("react.block") : 60121, E = r ? Symbol.for("react.fundamental") : 60117, T = r ? Symbol.for("react.responder") : 60118, b = r ? Symbol.for("react.scope") : 60119;
|
|
1041
1042
|
function j(I) {
|
|
1042
1043
|
return typeof I == "string" || typeof I == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1043
|
-
I === n || I ===
|
|
1044
|
+
I === n || I === c || I === a || I === s || I === f || I === d || typeof I == "object" && I !== null && (I.$$typeof === p || I.$$typeof === m || I.$$typeof === i || I.$$typeof === o || I.$$typeof === u || I.$$typeof === E || I.$$typeof === T || I.$$typeof === b || I.$$typeof === v);
|
|
1044
1045
|
}
|
|
1045
1046
|
function S(I) {
|
|
1046
1047
|
if (typeof I == "object" && I !== null) {
|
|
@@ -1050,7 +1051,7 @@ function hn() {
|
|
|
1050
1051
|
var Z = I.type;
|
|
1051
1052
|
switch (Z) {
|
|
1052
1053
|
case l:
|
|
1053
|
-
case
|
|
1054
|
+
case c:
|
|
1054
1055
|
case n:
|
|
1055
1056
|
case a:
|
|
1056
1057
|
case s:
|
|
@@ -1060,7 +1061,7 @@ function hn() {
|
|
|
1060
1061
|
var re = Z && Z.$$typeof;
|
|
1061
1062
|
switch (re) {
|
|
1062
1063
|
case o:
|
|
1063
|
-
case
|
|
1064
|
+
case u:
|
|
1064
1065
|
case p:
|
|
1065
1066
|
case m:
|
|
1066
1067
|
case i:
|
|
@@ -1074,12 +1075,12 @@ function hn() {
|
|
|
1074
1075
|
}
|
|
1075
1076
|
}
|
|
1076
1077
|
}
|
|
1077
|
-
var g = l, D =
|
|
1078
|
+
var g = l, D = c, k = o, w = i, O = e, C = u, F = n, P = p, A = m, W = t, L = a, H = s, G = f, X = !1;
|
|
1078
1079
|
function M(I) {
|
|
1079
1080
|
return X || (X = !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.")), h(I) || S(I) === l;
|
|
1080
1081
|
}
|
|
1081
1082
|
function h(I) {
|
|
1082
|
-
return S(I) ===
|
|
1083
|
+
return S(I) === c;
|
|
1083
1084
|
}
|
|
1084
1085
|
function x(I) {
|
|
1085
1086
|
return S(I) === o;
|
|
@@ -1087,19 +1088,19 @@ function hn() {
|
|
|
1087
1088
|
function R(I) {
|
|
1088
1089
|
return S(I) === i;
|
|
1089
1090
|
}
|
|
1090
|
-
function
|
|
1091
|
+
function $(I) {
|
|
1091
1092
|
return typeof I == "object" && I !== null && I.$$typeof === e;
|
|
1092
1093
|
}
|
|
1093
1094
|
function _(I) {
|
|
1094
|
-
return S(I) ===
|
|
1095
|
+
return S(I) === u;
|
|
1095
1096
|
}
|
|
1096
|
-
function
|
|
1097
|
+
function N(I) {
|
|
1097
1098
|
return S(I) === n;
|
|
1098
1099
|
}
|
|
1099
|
-
function
|
|
1100
|
+
function Y(I) {
|
|
1100
1101
|
return S(I) === p;
|
|
1101
1102
|
}
|
|
1102
|
-
function
|
|
1103
|
+
function U(I) {
|
|
1103
1104
|
return S(I) === m;
|
|
1104
1105
|
}
|
|
1105
1106
|
function V(I) {
|
|
@@ -1108,13 +1109,13 @@ function hn() {
|
|
|
1108
1109
|
function J(I) {
|
|
1109
1110
|
return S(I) === a;
|
|
1110
1111
|
}
|
|
1111
|
-
function
|
|
1112
|
+
function z(I) {
|
|
1112
1113
|
return S(I) === s;
|
|
1113
1114
|
}
|
|
1114
1115
|
function ae(I) {
|
|
1115
1116
|
return S(I) === f;
|
|
1116
1117
|
}
|
|
1117
|
-
ee.AsyncMode = g, ee.ConcurrentMode = D, ee.ContextConsumer = k, ee.ContextProvider = w, ee.Element = O, ee.ForwardRef =
|
|
1118
|
+
ee.AsyncMode = g, ee.ConcurrentMode = D, ee.ContextConsumer = k, ee.ContextProvider = w, ee.Element = O, ee.ForwardRef = C, ee.Fragment = F, ee.Lazy = P, ee.Memo = A, ee.Portal = W, ee.Profiler = L, ee.StrictMode = H, ee.Suspense = G, ee.isAsyncMode = M, ee.isConcurrentMode = h, ee.isContextConsumer = x, ee.isContextProvider = R, ee.isElement = $, ee.isForwardRef = _, ee.isFragment = N, ee.isLazy = Y, ee.isMemo = U, ee.isPortal = V, ee.isProfiler = J, ee.isStrictMode = z, ee.isSuspense = ae, ee.isValidElementType = j, ee.typeOf = S;
|
|
1118
1119
|
}()), ee;
|
|
1119
1120
|
}
|
|
1120
1121
|
var qt;
|
|
@@ -1145,35 +1146,35 @@ function mn() {
|
|
|
1145
1146
|
return !1;
|
|
1146
1147
|
for (var i = {}, o = 0; o < 10; o++)
|
|
1147
1148
|
i["_" + String.fromCharCode(o)] = o;
|
|
1148
|
-
var l = Object.getOwnPropertyNames(i).map(function(
|
|
1149
|
-
return i[
|
|
1149
|
+
var l = Object.getOwnPropertyNames(i).map(function(u) {
|
|
1150
|
+
return i[u];
|
|
1150
1151
|
});
|
|
1151
1152
|
if (l.join("") !== "0123456789")
|
|
1152
1153
|
return !1;
|
|
1153
|
-
var
|
|
1154
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
1155
|
-
u
|
|
1156
|
-
}), Object.keys(Object.assign({},
|
|
1154
|
+
var c = {};
|
|
1155
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(u) {
|
|
1156
|
+
c[u] = u;
|
|
1157
|
+
}), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst";
|
|
1157
1158
|
} catch {
|
|
1158
1159
|
return !1;
|
|
1159
1160
|
}
|
|
1160
1161
|
}
|
|
1161
1162
|
return xt = s() ? Object.assign : function(a, i) {
|
|
1162
|
-
for (var o, l = n(a),
|
|
1163
|
-
o = Object(arguments[
|
|
1163
|
+
for (var o, l = n(a), c, u = 1; u < arguments.length; u++) {
|
|
1164
|
+
o = Object(arguments[u]);
|
|
1164
1165
|
for (var f in o)
|
|
1165
1166
|
e.call(o, f) && (l[f] = o[f]);
|
|
1166
1167
|
if (r) {
|
|
1167
|
-
|
|
1168
|
-
for (var d = 0; d <
|
|
1169
|
-
t.call(o,
|
|
1168
|
+
c = r(o);
|
|
1169
|
+
for (var d = 0; d < c.length; d++)
|
|
1170
|
+
t.call(o, c[d]) && (l[c[d]] = o[c[d]]);
|
|
1170
1171
|
}
|
|
1171
1172
|
}
|
|
1172
1173
|
return l;
|
|
1173
1174
|
}, xt;
|
|
1174
1175
|
}
|
|
1175
1176
|
var bt, Xt;
|
|
1176
|
-
function
|
|
1177
|
+
function Pt() {
|
|
1177
1178
|
if (Xt) return bt;
|
|
1178
1179
|
Xt = 1;
|
|
1179
1180
|
var r = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
@@ -1190,7 +1191,7 @@ function gn() {
|
|
|
1190
1191
|
var r = function() {
|
|
1191
1192
|
};
|
|
1192
1193
|
if (process.env.NODE_ENV !== "production") {
|
|
1193
|
-
var e = /* @__PURE__ */
|
|
1194
|
+
var e = /* @__PURE__ */ Pt(), t = {}, n = /* @__PURE__ */ $r();
|
|
1194
1195
|
r = function(a) {
|
|
1195
1196
|
var i = "Warning: " + a;
|
|
1196
1197
|
typeof console < "u" && console.error(i);
|
|
@@ -1200,27 +1201,27 @@ function gn() {
|
|
|
1200
1201
|
}
|
|
1201
1202
|
};
|
|
1202
1203
|
}
|
|
1203
|
-
function s(a, i, o, l,
|
|
1204
|
+
function s(a, i, o, l, c) {
|
|
1204
1205
|
if (process.env.NODE_ENV !== "production") {
|
|
1205
|
-
for (var
|
|
1206
|
-
if (n(a,
|
|
1206
|
+
for (var u in a)
|
|
1207
|
+
if (n(a, u)) {
|
|
1207
1208
|
var f;
|
|
1208
1209
|
try {
|
|
1209
|
-
if (typeof a[
|
|
1210
|
+
if (typeof a[u] != "function") {
|
|
1210
1211
|
var d = Error(
|
|
1211
|
-
(l || "React class") + ": " + o + " type `" +
|
|
1212
|
+
(l || "React class") + ": " + o + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1212
1213
|
);
|
|
1213
1214
|
throw d.name = "Invariant Violation", d;
|
|
1214
1215
|
}
|
|
1215
|
-
f = a[
|
|
1216
|
+
f = a[u](i, u, l, o, null, e);
|
|
1216
1217
|
} catch (p) {
|
|
1217
1218
|
f = p;
|
|
1218
1219
|
}
|
|
1219
1220
|
if (f && !(f instanceof Error) && r(
|
|
1220
|
-
(l || "React class") + ": type specification of " + o + " `" +
|
|
1221
|
+
(l || "React class") + ": type specification of " + o + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1221
1222
|
), f instanceof Error && !(f.message in t)) {
|
|
1222
1223
|
t[f.message] = !0;
|
|
1223
|
-
var m =
|
|
1224
|
+
var m = c ? c() : "";
|
|
1224
1225
|
r(
|
|
1225
1226
|
"Failed " + o + " type: " + f.message + (m ?? "")
|
|
1226
1227
|
);
|
|
@@ -1236,7 +1237,7 @@ var Et, er;
|
|
|
1236
1237
|
function yn() {
|
|
1237
1238
|
if (er) return Et;
|
|
1238
1239
|
er = 1;
|
|
1239
|
-
var r = _r(), e = mn(), t = /* @__PURE__ */
|
|
1240
|
+
var r = _r(), e = mn(), t = /* @__PURE__ */ Pt(), n = /* @__PURE__ */ $r(), s = /* @__PURE__ */ gn(), a = function() {
|
|
1240
1241
|
};
|
|
1241
1242
|
process.env.NODE_ENV !== "production" && (a = function(o) {
|
|
1242
1243
|
var l = "Warning: " + o;
|
|
@@ -1250,9 +1251,9 @@ function yn() {
|
|
|
1250
1251
|
return null;
|
|
1251
1252
|
}
|
|
1252
1253
|
return Et = function(o, l) {
|
|
1253
|
-
var
|
|
1254
|
+
var c = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
|
|
1254
1255
|
function f(h) {
|
|
1255
|
-
var x = h && (
|
|
1256
|
+
var x = h && (c && h[c] || h[u]);
|
|
1256
1257
|
if (typeof x == "function")
|
|
1257
1258
|
return x;
|
|
1258
1259
|
}
|
|
@@ -1270,12 +1271,12 @@ function yn() {
|
|
|
1270
1271
|
element: S(),
|
|
1271
1272
|
elementType: g(),
|
|
1272
1273
|
instanceOf: D,
|
|
1273
|
-
node:
|
|
1274
|
+
node: C(),
|
|
1274
1275
|
objectOf: w,
|
|
1275
1276
|
oneOf: k,
|
|
1276
1277
|
oneOfType: O,
|
|
1277
1278
|
shape: P,
|
|
1278
|
-
exact:
|
|
1279
|
+
exact: A
|
|
1279
1280
|
};
|
|
1280
1281
|
function p(h, x) {
|
|
1281
1282
|
return h === x ? h !== 0 || 1 / h === 1 / x : h !== h && x !== x;
|
|
@@ -1287,33 +1288,33 @@ function yn() {
|
|
|
1287
1288
|
function E(h) {
|
|
1288
1289
|
if (process.env.NODE_ENV !== "production")
|
|
1289
1290
|
var x = {}, R = 0;
|
|
1290
|
-
function
|
|
1291
|
-
if (V = V || d,
|
|
1291
|
+
function $(N, Y, U, V, J, z, ae) {
|
|
1292
|
+
if (V = V || d, z = z || U, ae !== t) {
|
|
1292
1293
|
if (l) {
|
|
1293
1294
|
var I = new Error(
|
|
1294
1295
|
"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"
|
|
1295
1296
|
);
|
|
1296
1297
|
throw I.name = "Invariant Violation", I;
|
|
1297
1298
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1298
|
-
var B = V + ":" +
|
|
1299
|
+
var B = V + ":" + U;
|
|
1299
1300
|
!x[B] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1300
1301
|
R < 3 && (a(
|
|
1301
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
1302
|
+
"You are manually calling a React.PropTypes validation function for the `" + z + "` prop on `" + V + "`. 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."
|
|
1302
1303
|
), x[B] = !0, R++);
|
|
1303
1304
|
}
|
|
1304
1305
|
}
|
|
1305
|
-
return U
|
|
1306
|
+
return Y[U] == null ? N ? Y[U] === null ? new v("The " + J + " `" + z + "` is marked as required " + ("in `" + V + "`, but its value is `null`.")) : new v("The " + J + " `" + z + "` is marked as required in " + ("`" + V + "`, but its value is `undefined`.")) : null : h(Y, U, V, J, z);
|
|
1306
1307
|
}
|
|
1307
|
-
var _ =
|
|
1308
|
-
return _.isRequired =
|
|
1308
|
+
var _ = $.bind(null, !1);
|
|
1309
|
+
return _.isRequired = $.bind(null, !0), _;
|
|
1309
1310
|
}
|
|
1310
1311
|
function T(h) {
|
|
1311
|
-
function x(R,
|
|
1312
|
-
var V = R[
|
|
1312
|
+
function x(R, $, _, N, Y, U) {
|
|
1313
|
+
var V = R[$], J = H(V);
|
|
1313
1314
|
if (J !== h) {
|
|
1314
|
-
var
|
|
1315
|
+
var z = G(V);
|
|
1315
1316
|
return new v(
|
|
1316
|
-
"Invalid " +
|
|
1317
|
+
"Invalid " + N + " `" + Y + "` of type " + ("`" + z + "` supplied to `" + _ + "`, expected ") + ("`" + h + "`."),
|
|
1317
1318
|
{ expectedType: h }
|
|
1318
1319
|
);
|
|
1319
1320
|
}
|
|
@@ -1325,50 +1326,50 @@ function yn() {
|
|
|
1325
1326
|
return E(i);
|
|
1326
1327
|
}
|
|
1327
1328
|
function j(h) {
|
|
1328
|
-
function x(R,
|
|
1329
|
+
function x(R, $, _, N, Y) {
|
|
1329
1330
|
if (typeof h != "function")
|
|
1330
|
-
return new v("Property `" +
|
|
1331
|
-
var
|
|
1332
|
-
if (!Array.isArray(
|
|
1333
|
-
var V = H(
|
|
1334
|
-
return new v("Invalid " +
|
|
1331
|
+
return new v("Property `" + Y + "` of component `" + _ + "` has invalid PropType notation inside arrayOf.");
|
|
1332
|
+
var U = R[$];
|
|
1333
|
+
if (!Array.isArray(U)) {
|
|
1334
|
+
var V = H(U);
|
|
1335
|
+
return new v("Invalid " + N + " `" + Y + "` of type " + ("`" + V + "` supplied to `" + _ + "`, expected an array."));
|
|
1335
1336
|
}
|
|
1336
|
-
for (var J = 0; J <
|
|
1337
|
-
var
|
|
1338
|
-
if (
|
|
1339
|
-
return
|
|
1337
|
+
for (var J = 0; J < U.length; J++) {
|
|
1338
|
+
var z = h(U, J, _, N, Y + "[" + J + "]", t);
|
|
1339
|
+
if (z instanceof Error)
|
|
1340
|
+
return z;
|
|
1340
1341
|
}
|
|
1341
1342
|
return null;
|
|
1342
1343
|
}
|
|
1343
1344
|
return E(x);
|
|
1344
1345
|
}
|
|
1345
1346
|
function S() {
|
|
1346
|
-
function h(x, R,
|
|
1347
|
-
var
|
|
1348
|
-
if (!o(
|
|
1349
|
-
var
|
|
1350
|
-
return new v("Invalid " + _ + " `" +
|
|
1347
|
+
function h(x, R, $, _, N) {
|
|
1348
|
+
var Y = x[R];
|
|
1349
|
+
if (!o(Y)) {
|
|
1350
|
+
var U = H(Y);
|
|
1351
|
+
return new v("Invalid " + _ + " `" + N + "` of type " + ("`" + U + "` supplied to `" + $ + "`, expected a single ReactElement."));
|
|
1351
1352
|
}
|
|
1352
1353
|
return null;
|
|
1353
1354
|
}
|
|
1354
1355
|
return E(h);
|
|
1355
1356
|
}
|
|
1356
1357
|
function g() {
|
|
1357
|
-
function h(x, R,
|
|
1358
|
-
var
|
|
1359
|
-
if (!r.isValidElementType(
|
|
1360
|
-
var
|
|
1361
|
-
return new v("Invalid " + _ + " `" +
|
|
1358
|
+
function h(x, R, $, _, N) {
|
|
1359
|
+
var Y = x[R];
|
|
1360
|
+
if (!r.isValidElementType(Y)) {
|
|
1361
|
+
var U = H(Y);
|
|
1362
|
+
return new v("Invalid " + _ + " `" + N + "` of type " + ("`" + U + "` supplied to `" + $ + "`, expected a single ReactElement type."));
|
|
1362
1363
|
}
|
|
1363
1364
|
return null;
|
|
1364
1365
|
}
|
|
1365
1366
|
return E(h);
|
|
1366
1367
|
}
|
|
1367
1368
|
function D(h) {
|
|
1368
|
-
function x(R,
|
|
1369
|
-
if (!(R[
|
|
1370
|
-
var
|
|
1371
|
-
return new v("Invalid " +
|
|
1369
|
+
function x(R, $, _, N, Y) {
|
|
1370
|
+
if (!(R[$] instanceof h)) {
|
|
1371
|
+
var U = h.name || d, V = M(R[$]);
|
|
1372
|
+
return new v("Invalid " + N + " `" + Y + "` of type " + ("`" + V + "` supplied to `" + _ + "`, expected ") + ("instance of `" + U + "`."));
|
|
1372
1373
|
}
|
|
1373
1374
|
return null;
|
|
1374
1375
|
}
|
|
@@ -1379,30 +1380,30 @@ function yn() {
|
|
|
1379
1380
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
1380
1381
|
"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])."
|
|
1381
1382
|
) : a("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
1382
|
-
function x(R,
|
|
1383
|
-
for (var
|
|
1384
|
-
if (p(
|
|
1383
|
+
function x(R, $, _, N, Y) {
|
|
1384
|
+
for (var U = R[$], V = 0; V < h.length; V++)
|
|
1385
|
+
if (p(U, h[V]))
|
|
1385
1386
|
return null;
|
|
1386
1387
|
var J = JSON.stringify(h, function(ae, I) {
|
|
1387
|
-
var B =
|
|
1388
|
+
var B = G(I);
|
|
1388
1389
|
return B === "symbol" ? String(I) : I;
|
|
1389
1390
|
});
|
|
1390
|
-
return new v("Invalid " +
|
|
1391
|
+
return new v("Invalid " + N + " `" + Y + "` of value `" + String(U) + "` " + ("supplied to `" + _ + "`, expected one of " + J + "."));
|
|
1391
1392
|
}
|
|
1392
1393
|
return E(x);
|
|
1393
1394
|
}
|
|
1394
1395
|
function w(h) {
|
|
1395
|
-
function x(R,
|
|
1396
|
+
function x(R, $, _, N, Y) {
|
|
1396
1397
|
if (typeof h != "function")
|
|
1397
|
-
return new v("Property `" +
|
|
1398
|
-
var
|
|
1398
|
+
return new v("Property `" + Y + "` of component `" + _ + "` has invalid PropType notation inside objectOf.");
|
|
1399
|
+
var U = R[$], V = H(U);
|
|
1399
1400
|
if (V !== "object")
|
|
1400
|
-
return new v("Invalid " +
|
|
1401
|
-
for (var J in
|
|
1402
|
-
if (n(
|
|
1403
|
-
var
|
|
1404
|
-
if (
|
|
1405
|
-
return
|
|
1401
|
+
return new v("Invalid " + N + " `" + Y + "` of type " + ("`" + V + "` supplied to `" + _ + "`, expected an object."));
|
|
1402
|
+
for (var J in U)
|
|
1403
|
+
if (n(U, J)) {
|
|
1404
|
+
var z = h(U, J, _, N, Y + "." + J, t);
|
|
1405
|
+
if (z instanceof Error)
|
|
1406
|
+
return z;
|
|
1406
1407
|
}
|
|
1407
1408
|
return null;
|
|
1408
1409
|
}
|
|
@@ -1418,39 +1419,39 @@ function yn() {
|
|
|
1418
1419
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + X(R) + " at index " + x + "."
|
|
1419
1420
|
), i;
|
|
1420
1421
|
}
|
|
1421
|
-
function
|
|
1422
|
-
for (var J = [],
|
|
1423
|
-
var ae = h[
|
|
1422
|
+
function $(_, N, Y, U, V) {
|
|
1423
|
+
for (var J = [], z = 0; z < h.length; z++) {
|
|
1424
|
+
var ae = h[z], I = ae(_, N, Y, U, V, t);
|
|
1424
1425
|
if (I == null)
|
|
1425
1426
|
return null;
|
|
1426
1427
|
I.data && n(I.data, "expectedType") && J.push(I.data.expectedType);
|
|
1427
1428
|
}
|
|
1428
1429
|
var B = J.length > 0 ? ", expected one of type [" + J.join(", ") + "]" : "";
|
|
1429
|
-
return new v("Invalid " +
|
|
1430
|
+
return new v("Invalid " + U + " `" + V + "` supplied to " + ("`" + Y + "`" + B + "."));
|
|
1430
1431
|
}
|
|
1431
|
-
return E(
|
|
1432
|
+
return E($);
|
|
1432
1433
|
}
|
|
1433
|
-
function
|
|
1434
|
-
function h(x, R,
|
|
1435
|
-
return
|
|
1434
|
+
function C() {
|
|
1435
|
+
function h(x, R, $, _, N) {
|
|
1436
|
+
return W(x[R]) ? null : new v("Invalid " + _ + " `" + N + "` supplied to " + ("`" + $ + "`, expected a ReactNode."));
|
|
1436
1437
|
}
|
|
1437
1438
|
return E(h);
|
|
1438
1439
|
}
|
|
1439
|
-
function F(h, x, R,
|
|
1440
|
+
function F(h, x, R, $, _) {
|
|
1440
1441
|
return new v(
|
|
1441
|
-
(h || "React class") + ": " + x + " type `" + R + "." +
|
|
1442
|
+
(h || "React class") + ": " + x + " type `" + R + "." + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
|
|
1442
1443
|
);
|
|
1443
1444
|
}
|
|
1444
1445
|
function P(h) {
|
|
1445
|
-
function x(R,
|
|
1446
|
-
var
|
|
1446
|
+
function x(R, $, _, N, Y) {
|
|
1447
|
+
var U = R[$], V = H(U);
|
|
1447
1448
|
if (V !== "object")
|
|
1448
|
-
return new v("Invalid " +
|
|
1449
|
+
return new v("Invalid " + N + " `" + Y + "` of type `" + V + "` " + ("supplied to `" + _ + "`, expected `object`."));
|
|
1449
1450
|
for (var J in h) {
|
|
1450
|
-
var
|
|
1451
|
-
if (typeof
|
|
1452
|
-
return F(_,
|
|
1453
|
-
var ae =
|
|
1451
|
+
var z = h[J];
|
|
1452
|
+
if (typeof z != "function")
|
|
1453
|
+
return F(_, N, Y, J, G(z));
|
|
1454
|
+
var ae = z(U, J, _, N, Y + "." + J, t);
|
|
1454
1455
|
if (ae)
|
|
1455
1456
|
return ae;
|
|
1456
1457
|
}
|
|
@@ -1458,22 +1459,22 @@ function yn() {
|
|
|
1458
1459
|
}
|
|
1459
1460
|
return E(x);
|
|
1460
1461
|
}
|
|
1461
|
-
function
|
|
1462
|
-
function x(R,
|
|
1463
|
-
var
|
|
1462
|
+
function A(h) {
|
|
1463
|
+
function x(R, $, _, N, Y) {
|
|
1464
|
+
var U = R[$], V = H(U);
|
|
1464
1465
|
if (V !== "object")
|
|
1465
|
-
return new v("Invalid " +
|
|
1466
|
-
var J = e({}, R[
|
|
1467
|
-
for (var
|
|
1468
|
-
var ae = h[
|
|
1469
|
-
if (n(h,
|
|
1470
|
-
return F(_,
|
|
1466
|
+
return new v("Invalid " + N + " `" + Y + "` of type `" + V + "` " + ("supplied to `" + _ + "`, expected `object`."));
|
|
1467
|
+
var J = e({}, R[$], h);
|
|
1468
|
+
for (var z in J) {
|
|
1469
|
+
var ae = h[z];
|
|
1470
|
+
if (n(h, z) && typeof ae != "function")
|
|
1471
|
+
return F(_, N, Y, z, G(ae));
|
|
1471
1472
|
if (!ae)
|
|
1472
1473
|
return new v(
|
|
1473
|
-
"Invalid " +
|
|
1474
|
+
"Invalid " + N + " `" + Y + "` key `" + z + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify(R[$], null, " ") + `
|
|
1474
1475
|
Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
1475
1476
|
);
|
|
1476
|
-
var I = ae(
|
|
1477
|
+
var I = ae(U, z, _, N, Y + "." + z, t);
|
|
1477
1478
|
if (I)
|
|
1478
1479
|
return I;
|
|
1479
1480
|
}
|
|
@@ -1481,7 +1482,7 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1481
1482
|
}
|
|
1482
1483
|
return E(x);
|
|
1483
1484
|
}
|
|
1484
|
-
function
|
|
1485
|
+
function W(h) {
|
|
1485
1486
|
switch (typeof h) {
|
|
1486
1487
|
case "number":
|
|
1487
1488
|
case "string":
|
|
@@ -1491,20 +1492,20 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1491
1492
|
return !h;
|
|
1492
1493
|
case "object":
|
|
1493
1494
|
if (Array.isArray(h))
|
|
1494
|
-
return h.every(
|
|
1495
|
+
return h.every(W);
|
|
1495
1496
|
if (h === null || o(h))
|
|
1496
1497
|
return !0;
|
|
1497
1498
|
var x = f(h);
|
|
1498
1499
|
if (x) {
|
|
1499
|
-
var R = x.call(h),
|
|
1500
|
+
var R = x.call(h), $;
|
|
1500
1501
|
if (x !== h.entries) {
|
|
1501
|
-
for (; !(
|
|
1502
|
-
if (!
|
|
1502
|
+
for (; !($ = R.next()).done; )
|
|
1503
|
+
if (!W($.value))
|
|
1503
1504
|
return !1;
|
|
1504
1505
|
} else
|
|
1505
|
-
for (; !(
|
|
1506
|
-
var _ =
|
|
1507
|
-
if (_ && !
|
|
1506
|
+
for (; !($ = R.next()).done; ) {
|
|
1507
|
+
var _ = $.value;
|
|
1508
|
+
if (_ && !W(_[1]))
|
|
1508
1509
|
return !1;
|
|
1509
1510
|
}
|
|
1510
1511
|
} else
|
|
@@ -1514,14 +1515,14 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1514
1515
|
return !1;
|
|
1515
1516
|
}
|
|
1516
1517
|
}
|
|
1517
|
-
function
|
|
1518
|
+
function L(h, x) {
|
|
1518
1519
|
return h === "symbol" ? !0 : x ? x["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && x instanceof Symbol : !1;
|
|
1519
1520
|
}
|
|
1520
1521
|
function H(h) {
|
|
1521
1522
|
var x = typeof h;
|
|
1522
|
-
return Array.isArray(h) ? "array" : h instanceof RegExp ? "object" :
|
|
1523
|
+
return Array.isArray(h) ? "array" : h instanceof RegExp ? "object" : L(x, h) ? "symbol" : x;
|
|
1523
1524
|
}
|
|
1524
|
-
function
|
|
1525
|
+
function G(h) {
|
|
1525
1526
|
if (typeof h > "u" || h === null)
|
|
1526
1527
|
return "" + h;
|
|
1527
1528
|
var x = H(h);
|
|
@@ -1534,7 +1535,7 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1534
1535
|
return x;
|
|
1535
1536
|
}
|
|
1536
1537
|
function X(h) {
|
|
1537
|
-
var x =
|
|
1538
|
+
var x = G(h);
|
|
1538
1539
|
switch (x) {
|
|
1539
1540
|
case "array":
|
|
1540
1541
|
case "object":
|
|
@@ -1557,13 +1558,13 @@ var Tt, tr;
|
|
|
1557
1558
|
function vn() {
|
|
1558
1559
|
if (tr) return Tt;
|
|
1559
1560
|
tr = 1;
|
|
1560
|
-
var r = /* @__PURE__ */
|
|
1561
|
+
var r = /* @__PURE__ */ Pt();
|
|
1561
1562
|
function e() {
|
|
1562
1563
|
}
|
|
1563
1564
|
function t() {
|
|
1564
1565
|
}
|
|
1565
1566
|
return t.resetWarningCache = e, Tt = function() {
|
|
1566
|
-
function n(i, o, l,
|
|
1567
|
+
function n(i, o, l, c, u, f) {
|
|
1567
1568
|
if (f !== r) {
|
|
1568
1569
|
var d = new Error(
|
|
1569
1570
|
"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"
|
|
@@ -1622,7 +1623,7 @@ var oe = /* @__PURE__ */ xn(), bn = function(e) {
|
|
|
1622
1623
|
if (e[s] !== t[s])
|
|
1623
1624
|
return !0;
|
|
1624
1625
|
return !1;
|
|
1625
|
-
}, wn = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"], Xe = "http://www.w3.org/2000/svg", nr = "http://www.w3.org/1999/xlink",
|
|
1626
|
+
}, wn = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"], Xe = "http://www.w3.org/2000/svg", nr = "http://www.w3.org/1999/xlink", Pe = /* @__PURE__ */ function(r) {
|
|
1626
1627
|
function e() {
|
|
1627
1628
|
for (var n, s = arguments.length, a = new Array(s), i = 0; i < s; i++)
|
|
1628
1629
|
a[i] = arguments[i];
|
|
@@ -1638,8 +1639,8 @@ var oe = /* @__PURE__ */ xn(), bn = function(e) {
|
|
|
1638
1639
|
return t.renderSVG = function() {
|
|
1639
1640
|
var s = this;
|
|
1640
1641
|
if (this.reactWrapper instanceof bn(this.reactWrapper).Node) {
|
|
1641
|
-
var a = this.props, i = a.desc, o = a.evalScripts, l = a.httpRequestWithCredentials,
|
|
1642
|
-
E === "svg" ? (T = document.createElementNS(Xe, E), T.setAttribute("xmlns", Xe), T.setAttribute("xmlns:xlink", nr), b = document.createElementNS(Xe, E)) : (T = document.createElement(E), b = document.createElement(E)), T.appendChild(b), b.dataset.src =
|
|
1642
|
+
var a = this.props, i = a.desc, o = a.evalScripts, l = a.httpRequestWithCredentials, c = a.renumerateIRIElements, u = a.src, f = a.title, d = a.useRequestCache, m = this.props.onError, p = this.props.beforeInjection, v = this.props.afterInjection, E = this.props.wrapper, T, b;
|
|
1643
|
+
E === "svg" ? (T = document.createElementNS(Xe, E), T.setAttribute("xmlns", Xe), T.setAttribute("xmlns:xlink", nr), b = document.createElementNS(Xe, E)) : (T = document.createElement(E), b = document.createElement(E)), T.appendChild(b), b.dataset.src = u, this.nonReactWrapper = this.reactWrapper.appendChild(T);
|
|
1643
1644
|
var j = function(k) {
|
|
1644
1645
|
if (s.removeSVG(), !s._isMounted) {
|
|
1645
1646
|
m(k);
|
|
@@ -1677,8 +1678,8 @@ var oe = /* @__PURE__ */ xn(), bn = function(e) {
|
|
|
1677
1678
|
O.innerHTML = i, k.prepend(O);
|
|
1678
1679
|
}
|
|
1679
1680
|
if (f) {
|
|
1680
|
-
var
|
|
1681
|
-
|
|
1681
|
+
var C = k.querySelector(":scope > title");
|
|
1682
|
+
C && k.removeChild(C);
|
|
1682
1683
|
var F = document.createElement("title");
|
|
1683
1684
|
F.innerHTML = f, k.prepend(F);
|
|
1684
1685
|
}
|
|
@@ -1694,7 +1695,7 @@ var oe = /* @__PURE__ */ xn(), bn = function(e) {
|
|
|
1694
1695
|
cacheRequests: d,
|
|
1695
1696
|
evalScripts: o,
|
|
1696
1697
|
httpRequestWithCredentials: l,
|
|
1697
|
-
renumerateIRIElements:
|
|
1698
|
+
renumerateIRIElements: c
|
|
1698
1699
|
});
|
|
1699
1700
|
}
|
|
1700
1701
|
}, t.removeSVG = function() {
|
|
@@ -1718,8 +1719,8 @@ var oe = /* @__PURE__ */ xn(), bn = function(e) {
|
|
|
1718
1719
|
s.httpRequestWithCredentials;
|
|
1719
1720
|
var i = s.loading;
|
|
1720
1721
|
s.renumerateIRIElements, s.src, s.title, s.useRequestCache;
|
|
1721
|
-
var o = s.wrapper, l = tn(s, wn),
|
|
1722
|
-
return /* @__PURE__ */ He.createElement(
|
|
1722
|
+
var o = s.wrapper, l = tn(s, wn), c = o;
|
|
1723
|
+
return /* @__PURE__ */ He.createElement(c, ot({}, l, {
|
|
1723
1724
|
ref: this.refCallback
|
|
1724
1725
|
}, o === "svg" ? {
|
|
1725
1726
|
xmlns: Xe,
|
|
@@ -1727,7 +1728,7 @@ var oe = /* @__PURE__ */ xn(), bn = function(e) {
|
|
|
1727
1728
|
} : {}), this.state.isLoading && i && /* @__PURE__ */ He.createElement(i, null), this.state.hasError && a && /* @__PURE__ */ He.createElement(a, null));
|
|
1728
1729
|
}, e;
|
|
1729
1730
|
}(He.Component);
|
|
1730
|
-
|
|
1731
|
+
Pe.defaultProps = {
|
|
1731
1732
|
afterInjection: function() {
|
|
1732
1733
|
},
|
|
1733
1734
|
beforeInjection: function() {
|
|
@@ -1744,7 +1745,7 @@ Ce.defaultProps = {
|
|
|
1744
1745
|
useRequestCache: !0,
|
|
1745
1746
|
wrapper: "div"
|
|
1746
1747
|
};
|
|
1747
|
-
|
|
1748
|
+
Pe.propTypes = {
|
|
1748
1749
|
afterInjection: oe.func,
|
|
1749
1750
|
beforeInjection: oe.func,
|
|
1750
1751
|
desc: oe.string,
|
|
@@ -1776,26 +1777,26 @@ const Zs = (r) => {
|
|
|
1776
1777
|
state: i = "base",
|
|
1777
1778
|
rotated: o = !1,
|
|
1778
1779
|
onClick: l,
|
|
1779
|
-
isInteractable:
|
|
1780
|
-
spin:
|
|
1780
|
+
isInteractable: c = !1,
|
|
1781
|
+
spin: u = !1,
|
|
1781
1782
|
title: f,
|
|
1782
1783
|
tabIndex: d
|
|
1783
1784
|
}) => {
|
|
1784
|
-
const [m, p] =
|
|
1785
|
+
const [m, p] = q(r), v = (r == null ? void 0 : r.startsWith("http")) || (r == null ? void 0 : r.startsWith("/")), E = v && (r == null ? void 0 : r.toLowerCase().endsWith(".svg")), T = sr(`assets/svg/${r}.svg`), b = sr(
|
|
1785
1786
|
`assets/svg/${n}.svg`
|
|
1786
1787
|
), j = {
|
|
1787
|
-
img: `${
|
|
1788
|
-
svg: `smp-icon ${i ? `smp-icon-${i}` : ""} ${o ? "smp-icon-rotated" : ""} ${
|
|
1788
|
+
img: `${c ? "smp-image-interactable" : ""}`,
|
|
1789
|
+
svg: `smp-icon ${i ? `smp-icon-${i}` : ""} ${o ? "smp-icon-rotated" : ""} ${c ? "smp-icon-interactable" : ""} ${u ? "smp-icon-spin" : ""}`
|
|
1789
1790
|
}, S = () => {
|
|
1790
|
-
!a &&
|
|
1791
|
+
!a && c && l && l();
|
|
1791
1792
|
}, g = (D) => {
|
|
1792
|
-
!a &&
|
|
1793
|
+
!a && c && (D.key === "Enter" || D.key === " ") && (D.preventDefault(), S());
|
|
1793
1794
|
};
|
|
1794
1795
|
return /* @__PURE__ */ y.jsx(y.Fragment, { children: E ? /* @__PURE__ */ y.jsx(
|
|
1795
|
-
|
|
1796
|
+
Pe,
|
|
1796
1797
|
{
|
|
1797
1798
|
src: r,
|
|
1798
|
-
fallback: () => /* @__PURE__ */ y.jsx(
|
|
1799
|
+
fallback: () => /* @__PURE__ */ y.jsx(Pe, { src: b, wrapper: "svg" }),
|
|
1799
1800
|
width: e || "1rem",
|
|
1800
1801
|
height: t || "1rem",
|
|
1801
1802
|
wrapper: "svg",
|
|
@@ -1827,10 +1828,10 @@ const Zs = (r) => {
|
|
|
1827
1828
|
}
|
|
1828
1829
|
)
|
|
1829
1830
|
) : /* @__PURE__ */ y.jsx(
|
|
1830
|
-
|
|
1831
|
+
Pe,
|
|
1831
1832
|
{
|
|
1832
1833
|
src: T,
|
|
1833
|
-
fallback: () => /* @__PURE__ */ y.jsx(
|
|
1834
|
+
fallback: () => /* @__PURE__ */ y.jsx(Pe, { src: b, wrapper: "svg" }),
|
|
1834
1835
|
width: e || "1rem",
|
|
1835
1836
|
height: t || "1rem",
|
|
1836
1837
|
wrapper: "svg",
|
|
@@ -1871,8 +1872,8 @@ const Zs = (r) => {
|
|
|
1871
1872
|
isEditable: i = !0,
|
|
1872
1873
|
shapeIcon: o,
|
|
1873
1874
|
sizing: l,
|
|
1874
|
-
state:
|
|
1875
|
-
variant:
|
|
1875
|
+
state: c,
|
|
1876
|
+
variant: u,
|
|
1876
1877
|
tooltip: f = !1,
|
|
1877
1878
|
rotatedShapeIcon: d = !1,
|
|
1878
1879
|
onShapeIconClick: m,
|
|
@@ -1888,61 +1889,63 @@ const Zs = (r) => {
|
|
|
1888
1889
|
fullWidth: k = !1,
|
|
1889
1890
|
_dataComponent: w = "textfield",
|
|
1890
1891
|
min: O,
|
|
1891
|
-
max:
|
|
1892
|
+
max: C,
|
|
1892
1893
|
step: F,
|
|
1893
1894
|
inputMode: P = "text",
|
|
1894
|
-
width:
|
|
1895
|
+
width: A,
|
|
1896
|
+
autocomplete: W
|
|
1895
1897
|
}) => {
|
|
1896
|
-
const
|
|
1897
|
-
s == null || s(
|
|
1898
|
-
},
|
|
1898
|
+
const L = Be(), H = `${L}-helper`, G = g ? "danger" : c, X = g || c == "danger" ? "error" : o, M = S || !!g, h = ($) => {
|
|
1899
|
+
s == null || s($.target.value);
|
|
1900
|
+
}, x = {
|
|
1899
1901
|
wrapper: `${ye["smp-textfield-wrapper"]} ${k ? ye["smp-textfield-fullWidth"] : ""}`,
|
|
1900
|
-
container: `${ye["smp-textfield"]} ${r ? ye["smp-textfield-disabled"] : ""} ${a ? ye["smp-textfield-placeholder"] : ""} ${l ? ye[`smp-textfield-${l}`] : ""} ${
|
|
1902
|
+
container: `${ye["smp-textfield"]} ${r ? ye["smp-textfield-disabled"] : ""} ${a ? ye["smp-textfield-placeholder"] : ""} ${l ? ye[`smp-textfield-${l}`] : ""} ${G ? ye[`smp-textfield-${G}`] : ""} ${D ? ye[`smp-textfield-${D}`] : ""} ${i ? "" : ye["smp-textfield-readOnly"]} ${f ? ye["smp-textfield-top-right-indicator"] : ""}`,
|
|
1901
1903
|
input: `${ye["smp-textfield-input"]}`
|
|
1902
1904
|
};
|
|
1903
|
-
if (
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1905
|
+
if (u && (u !== "notSelectable" || i)) {
|
|
1906
|
+
const $ = ye[`smp-textfield-variant-${u}`];
|
|
1907
|
+
$ && (x.container += ` ${$}`);
|
|
1906
1908
|
}
|
|
1907
|
-
const
|
|
1908
|
-
return /* @__PURE__ */ y.jsxs("div", { className:
|
|
1909
|
-
j && /* @__PURE__ */ y.jsx(je, { label: j, disabled: r, htmlFor:
|
|
1909
|
+
const R = A ? { "--smp-textField-width-base": A } : void 0;
|
|
1910
|
+
return /* @__PURE__ */ y.jsxs("div", { className: x.wrapper, "data-component": w, children: [
|
|
1911
|
+
j && /* @__PURE__ */ y.jsx(je, { label: j, disabled: r, htmlFor: L }),
|
|
1910
1912
|
/* @__PURE__ */ y.jsxs(
|
|
1911
1913
|
"div",
|
|
1912
1914
|
{
|
|
1913
|
-
className:
|
|
1915
|
+
className: x.container,
|
|
1914
1916
|
ref: p,
|
|
1915
|
-
style:
|
|
1917
|
+
style: R,
|
|
1916
1918
|
children: [
|
|
1917
1919
|
t && /* @__PURE__ */ y.jsx(fe, { icon: t, disabled: r }),
|
|
1918
1920
|
/* @__PURE__ */ y.jsx(
|
|
1919
1921
|
"input",
|
|
1920
1922
|
{
|
|
1921
|
-
id:
|
|
1923
|
+
id: L,
|
|
1922
1924
|
type: T,
|
|
1923
1925
|
value: e,
|
|
1924
1926
|
placeholder: a,
|
|
1925
|
-
onChange:
|
|
1927
|
+
onChange: h,
|
|
1926
1928
|
onBlur: n,
|
|
1927
|
-
className:
|
|
1929
|
+
className: x.input,
|
|
1928
1930
|
disabled: r,
|
|
1929
1931
|
readOnly: !i,
|
|
1930
1932
|
onKeyDown: E,
|
|
1931
1933
|
"aria-label": b,
|
|
1932
1934
|
ref: v,
|
|
1933
|
-
"aria-describedby":
|
|
1935
|
+
"aria-describedby": M ? H : void 0,
|
|
1934
1936
|
min: O,
|
|
1935
|
-
max:
|
|
1937
|
+
max: C,
|
|
1936
1938
|
step: F,
|
|
1937
|
-
inputMode: P
|
|
1939
|
+
inputMode: P,
|
|
1940
|
+
autoComplete: W
|
|
1938
1941
|
}
|
|
1939
1942
|
),
|
|
1940
|
-
|
|
1943
|
+
X && /* @__PURE__ */ y.jsx(
|
|
1941
1944
|
fe,
|
|
1942
1945
|
{
|
|
1943
|
-
icon:
|
|
1946
|
+
icon: X,
|
|
1944
1947
|
disabled: r,
|
|
1945
|
-
state:
|
|
1948
|
+
state: G,
|
|
1946
1949
|
onClick: m,
|
|
1947
1950
|
rotated: d,
|
|
1948
1951
|
isInteractable: i,
|
|
@@ -1952,29 +1955,29 @@ const Zs = (r) => {
|
|
|
1952
1955
|
]
|
|
1953
1956
|
}
|
|
1954
1957
|
),
|
|
1955
|
-
|
|
1958
|
+
M && /* @__PURE__ */ y.jsx(
|
|
1956
1959
|
jr,
|
|
1957
1960
|
{
|
|
1958
1961
|
helperText: g,
|
|
1959
1962
|
disabled: r,
|
|
1960
|
-
state:
|
|
1961
|
-
id:
|
|
1963
|
+
state: G,
|
|
1964
|
+
id: H
|
|
1962
1965
|
}
|
|
1963
1966
|
)
|
|
1964
1967
|
] });
|
|
1965
1968
|
};
|
|
1966
|
-
function
|
|
1969
|
+
function Cr({
|
|
1967
1970
|
items: r,
|
|
1968
1971
|
itemHeight: e,
|
|
1969
1972
|
containerHeight: t,
|
|
1970
1973
|
overscan: n = 5
|
|
1971
1974
|
}) {
|
|
1972
|
-
const [s, a] =
|
|
1975
|
+
const [s, a] = q(0), i = ce(null), o = r.length * e, l = Math.max(0, Math.floor(s / e) - n), c = Math.min(
|
|
1973
1976
|
r.length - 1,
|
|
1974
1977
|
Math.floor((s + t) / e) + n
|
|
1975
|
-
),
|
|
1976
|
-
for (let m = l; m <=
|
|
1977
|
-
|
|
1978
|
+
), u = [];
|
|
1979
|
+
for (let m = l; m <= c; m++)
|
|
1980
|
+
u.push({
|
|
1978
1981
|
item: r[m],
|
|
1979
1982
|
index: m,
|
|
1980
1983
|
offsetTop: m * e
|
|
@@ -1988,7 +1991,7 @@ function Pr({
|
|
|
1988
1991
|
p < T ? E.scrollTop = p : v > b && (E.scrollTop = v - t);
|
|
1989
1992
|
};
|
|
1990
1993
|
return {
|
|
1991
|
-
virtualItems:
|
|
1994
|
+
virtualItems: u,
|
|
1992
1995
|
containerProps: {
|
|
1993
1996
|
ref: i,
|
|
1994
1997
|
style: {
|
|
@@ -2011,7 +2014,7 @@ function Pr({
|
|
|
2011
2014
|
viewportHeight: t,
|
|
2012
2015
|
totalHeight: o,
|
|
2013
2016
|
startIndex: l,
|
|
2014
|
-
endIndex:
|
|
2017
|
+
endIndex: c
|
|
2015
2018
|
},
|
|
2016
2019
|
scrollToIndex: d
|
|
2017
2020
|
};
|
|
@@ -2027,12 +2030,12 @@ function En(r, e, t = "14px IBM Plex Sans, sans-serif", n = 32) {
|
|
|
2027
2030
|
a.font = t;
|
|
2028
2031
|
let i = 0;
|
|
2029
2032
|
for (const o of r) {
|
|
2030
|
-
const l =
|
|
2031
|
-
i = Math.max(i,
|
|
2033
|
+
const l = Ae(o.id, o.label, e), c = a.measureText(l);
|
|
2034
|
+
i = Math.max(i, c.width);
|
|
2032
2035
|
}
|
|
2033
2036
|
return Math.ceil(i + n);
|
|
2034
2037
|
}
|
|
2035
|
-
const Tn = 10,
|
|
2038
|
+
const Tn = 10, Pr = ({
|
|
2036
2039
|
id: r,
|
|
2037
2040
|
options: e,
|
|
2038
2041
|
displayMode: t = "Both",
|
|
@@ -2044,17 +2047,17 @@ const Tn = 10, Cr = ({
|
|
|
2044
2047
|
// active element
|
|
2045
2048
|
width: o,
|
|
2046
2049
|
onClick: l,
|
|
2047
|
-
onKeyDown:
|
|
2048
|
-
isOpen:
|
|
2050
|
+
onKeyDown: c,
|
|
2051
|
+
isOpen: u
|
|
2049
2052
|
}) => {
|
|
2050
|
-
var
|
|
2051
|
-
const [f, d] =
|
|
2053
|
+
var W;
|
|
2054
|
+
const [f, d] = q(""), m = 24, [p, v] = q(
|
|
2052
2055
|
a !== null ? a : -1
|
|
2053
|
-
), [E, T] =
|
|
2054
|
-
(
|
|
2055
|
-
) : e, g = (
|
|
2056
|
-
d(
|
|
2057
|
-
}, { virtualItems: D, containerProps: k, innerProps: w, scrollToIndex: O } =
|
|
2056
|
+
), [E, T] = q(o || 200), b = ce(null), j = s !== void 0 ? s : e.length > Tn, S = f ? e.filter(
|
|
2057
|
+
(L) => L.label.toLowerCase().includes(f.toLowerCase())
|
|
2058
|
+
) : e, g = (L) => {
|
|
2059
|
+
d(L);
|
|
2060
|
+
}, { virtualItems: D, containerProps: k, innerProps: w, scrollToIndex: O } = Cr({
|
|
2058
2061
|
items: S,
|
|
2059
2062
|
itemHeight: m,
|
|
2060
2063
|
containerHeight: 200,
|
|
@@ -2065,23 +2068,23 @@ const Tn = 10, Cr = ({
|
|
|
2065
2068
|
}, [a]), ne(() => {
|
|
2066
2069
|
p >= 0 && p < S.length && O(p);
|
|
2067
2070
|
}, [p, S]), ne(() => {
|
|
2068
|
-
|
|
2069
|
-
}, [
|
|
2070
|
-
const
|
|
2071
|
-
T(
|
|
2071
|
+
u && (b != null && b.current) && b.current.focus();
|
|
2072
|
+
}, [u, b]), ne(() => {
|
|
2073
|
+
const L = En(e, t);
|
|
2074
|
+
T(L);
|
|
2072
2075
|
}, [e, t]);
|
|
2073
|
-
const
|
|
2074
|
-
if (
|
|
2075
|
-
|
|
2076
|
+
const C = (L) => {
|
|
2077
|
+
if (L.key === "ArrowDown" || L.key === "ArrowUp") {
|
|
2078
|
+
L.preventDefault();
|
|
2076
2079
|
let H = p;
|
|
2077
|
-
|
|
2078
|
-
} else
|
|
2079
|
-
|
|
2080
|
-
}, F = (
|
|
2081
|
-
|
|
2082
|
-
}, P = (
|
|
2083
|
-
|
|
2084
|
-
},
|
|
2080
|
+
L.key === "ArrowDown" ? H = p < S.length - 1 ? p + 1 : 0 : L.key === "ArrowUp" && (H = p > 0 ? p - 1 : S.length - 1), v(H);
|
|
2081
|
+
} else L.key === "Enter" ? p >= 0 && p < S.length && (l == null || l(S[p])) : L.key === "Escape" && (L.preventDefault(), L.stopPropagation());
|
|
2082
|
+
c && c(L);
|
|
2083
|
+
}, F = (L) => {
|
|
2084
|
+
C(L);
|
|
2085
|
+
}, P = (L) => {
|
|
2086
|
+
C(L);
|
|
2087
|
+
}, A = {
|
|
2085
2088
|
wrapper: `${Ze["smp-list"]}`,
|
|
2086
2089
|
container: `${Ze["smp-list-container"]}`,
|
|
2087
2090
|
virtualScroll: `${Ze["smp-list-virtualScroll"]}`,
|
|
@@ -2092,10 +2095,11 @@ const Tn = 10, Cr = ({
|
|
|
2092
2095
|
{
|
|
2093
2096
|
id: r,
|
|
2094
2097
|
ref: n,
|
|
2095
|
-
className:
|
|
2098
|
+
className: A.wrapper,
|
|
2096
2099
|
"data-component": "list",
|
|
2097
2100
|
style: {
|
|
2098
|
-
width: E
|
|
2101
|
+
width: E,
|
|
2102
|
+
minWidth: o
|
|
2099
2103
|
},
|
|
2100
2104
|
children: [
|
|
2101
2105
|
j && /* @__PURE__ */ y.jsx(
|
|
@@ -2112,40 +2116,40 @@ const Tn = 10, Cr = ({
|
|
|
2112
2116
|
"div",
|
|
2113
2117
|
{
|
|
2114
2118
|
...k,
|
|
2115
|
-
className:
|
|
2119
|
+
className: A.container,
|
|
2116
2120
|
tabIndex: 0,
|
|
2117
2121
|
role: "listbox",
|
|
2118
2122
|
"aria-label": "List",
|
|
2119
2123
|
onKeyDown: P,
|
|
2120
|
-
"aria-activedescendant": p >= 0 && p < S.length ? (
|
|
2121
|
-
children: /* @__PURE__ */ y.jsx("div", { ...w, className:
|
|
2122
|
-
const X = i.includes(
|
|
2124
|
+
"aria-activedescendant": p >= 0 && p < S.length ? (W = S[p]) == null ? void 0 : W.id : void 0,
|
|
2125
|
+
children: /* @__PURE__ */ y.jsx("div", { ...w, className: A.virtualScroll, children: D.map(({ item: L, index: H, offsetTop: G }) => {
|
|
2126
|
+
const X = i.includes(L.id);
|
|
2123
2127
|
return (
|
|
2124
2128
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
2125
2129
|
/* @__PURE__ */ y.jsxs(
|
|
2126
2130
|
"li",
|
|
2127
2131
|
{
|
|
2128
2132
|
role: "option",
|
|
2129
|
-
id:
|
|
2133
|
+
id: L.id,
|
|
2130
2134
|
"aria-selected": p === H ? "true" : "false",
|
|
2131
2135
|
tabIndex: -1,
|
|
2132
|
-
className: `${
|
|
2133
|
-
"aria-label":
|
|
2136
|
+
className: `${A.listItem} ${p === H ? "selected-item" : ""}`,
|
|
2137
|
+
"aria-label": L.id + "-" + L.label,
|
|
2134
2138
|
style: {
|
|
2135
2139
|
height: `${m}px`,
|
|
2136
2140
|
lineHeight: `calc(${m}px - 2*2px)`,
|
|
2137
2141
|
// lineHeight - 2*padding
|
|
2138
|
-
transform: `translateY(${
|
|
2142
|
+
transform: `translateY(${G}px)`
|
|
2139
2143
|
},
|
|
2140
2144
|
onClick: () => {
|
|
2141
|
-
l == null || l(
|
|
2145
|
+
l == null || l(L), v(H);
|
|
2142
2146
|
},
|
|
2143
2147
|
children: [
|
|
2144
|
-
|
|
2148
|
+
Ae(L.id, L.label, t),
|
|
2145
2149
|
X && /* @__PURE__ */ y.jsx(fe, { icon: "check", width: 16 })
|
|
2146
2150
|
]
|
|
2147
2151
|
},
|
|
2148
|
-
|
|
2152
|
+
L.id
|
|
2149
2153
|
)
|
|
2150
2154
|
);
|
|
2151
2155
|
}) })
|
|
@@ -2160,14 +2164,14 @@ const Tn = 10, Cr = ({
|
|
|
2160
2164
|
optionalDisplayValue: t,
|
|
2161
2165
|
...n
|
|
2162
2166
|
}) => {
|
|
2163
|
-
const [s, a] =
|
|
2164
|
-
|
|
2167
|
+
const [s, a] = q(
|
|
2168
|
+
Ae(e, t, r)
|
|
2165
2169
|
);
|
|
2166
2170
|
return ne(() => {
|
|
2167
2171
|
a(e);
|
|
2168
2172
|
}, [e]), ne(() => {
|
|
2169
2173
|
a(
|
|
2170
|
-
|
|
2174
|
+
Ae(e, t, r)
|
|
2171
2175
|
);
|
|
2172
2176
|
}, [t, r]), /* @__PURE__ */ y.jsx(Re, { ...n, bindValue: s });
|
|
2173
2177
|
}, On = (r) => {
|
|
@@ -2183,10 +2187,10 @@ const Tn = 10, Cr = ({
|
|
|
2183
2187
|
function ht({
|
|
2184
2188
|
children: r
|
|
2185
2189
|
}) {
|
|
2186
|
-
const [e, t] =
|
|
2190
|
+
const [e, t] = q(!1);
|
|
2187
2191
|
return ne(() => {
|
|
2188
2192
|
t(!0);
|
|
2189
|
-
}, []), e ?
|
|
2193
|
+
}, []), e ? Ur(r, document.body) : null;
|
|
2190
2194
|
}
|
|
2191
2195
|
const Ar = ({
|
|
2192
2196
|
bindValue: r,
|
|
@@ -2198,31 +2202,31 @@ const Ar = ({
|
|
|
2198
2202
|
isEditable: i = !0,
|
|
2199
2203
|
placeholder: o,
|
|
2200
2204
|
fun: l,
|
|
2201
|
-
_changeOnEnter:
|
|
2202
|
-
onChange:
|
|
2205
|
+
_changeOnEnter: c = !1,
|
|
2206
|
+
onChange: u,
|
|
2203
2207
|
onOptionsRequest: f,
|
|
2204
2208
|
_multiActiveIndex: d,
|
|
2205
2209
|
...m
|
|
2206
2210
|
}) => {
|
|
2207
|
-
const p = ce(null), [v, E] =
|
|
2211
|
+
const p = ce(null), [v, E] = q(r), [T, b] = q(e), [j, S] = q(!1), [g, D] = q(t || []), [k, w] = q(0), [O, C] = q([r]), { anchorRef: F, targetRef: P, anchorWidth: A } = pt({
|
|
2208
2212
|
position: "bottom",
|
|
2209
2213
|
enabled: j
|
|
2210
|
-
}),
|
|
2214
|
+
}), W = le(() => {
|
|
2211
2215
|
var h;
|
|
2212
2216
|
S(!1), (h = p == null ? void 0 : p.current) == null || h.focus();
|
|
2213
2217
|
}, []);
|
|
2214
|
-
|
|
2215
|
-
const
|
|
2216
|
-
h.length >= a ? l && f &&
|
|
2218
|
+
Ve(P, j, () => W());
|
|
2219
|
+
const L = On(400), H = (h) => {
|
|
2220
|
+
h.length >= a ? l && f && L(async () => {
|
|
2217
2221
|
const x = await f(l, h);
|
|
2218
2222
|
D(x), w(x.length > 0 ? 0 : -1), S(!0);
|
|
2219
|
-
}) :
|
|
2220
|
-
},
|
|
2221
|
-
|
|
2223
|
+
}) : W(), E(h), b(e), c || u == null || u(h, e);
|
|
2224
|
+
}, G = (h) => {
|
|
2225
|
+
c ? (E(""), b("")) : (E(h.id), b(h.label)), u == null || u(h.id, h.label);
|
|
2222
2226
|
const x = g.findIndex((R) => R.id === h.id);
|
|
2223
|
-
w(x),
|
|
2227
|
+
w(x), C([h.id]), W();
|
|
2224
2228
|
}, X = (h) => {
|
|
2225
|
-
h.key === "Escape" && (
|
|
2229
|
+
h.key === "Escape" && (W(), w(-1));
|
|
2226
2230
|
}, M = (h) => {
|
|
2227
2231
|
if ((h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), j)) {
|
|
2228
2232
|
const x = h.key === "ArrowDown" ? (k + 1) % g.length : (k - 1 + g.length) % g.length;
|
|
@@ -2230,10 +2234,10 @@ const Ar = ({
|
|
|
2230
2234
|
}
|
|
2231
2235
|
switch (h.key) {
|
|
2232
2236
|
case "Enter":
|
|
2233
|
-
k >= 0 && k < g.length ?
|
|
2237
|
+
k >= 0 && k < g.length ? G(g[k]) : c && (u == null || u(v, ""), W(), E(""), b(""));
|
|
2234
2238
|
break;
|
|
2235
2239
|
case "Escape":
|
|
2236
|
-
|
|
2240
|
+
W(), w(-1);
|
|
2237
2241
|
break;
|
|
2238
2242
|
}
|
|
2239
2243
|
};
|
|
@@ -2256,15 +2260,15 @@ const Ar = ({
|
|
|
2256
2260
|
}
|
|
2257
2261
|
),
|
|
2258
2262
|
j && /* @__PURE__ */ y.jsx(ht, { children: /* @__PURE__ */ y.jsx(
|
|
2259
|
-
|
|
2263
|
+
Pr,
|
|
2260
2264
|
{
|
|
2261
2265
|
options: g,
|
|
2262
2266
|
displayMode: s,
|
|
2263
|
-
onClick:
|
|
2267
|
+
onClick: G,
|
|
2264
2268
|
ref: P,
|
|
2265
2269
|
selectedIndex: k,
|
|
2266
2270
|
activeIndex: d || O,
|
|
2267
|
-
width:
|
|
2271
|
+
width: A,
|
|
2268
2272
|
showFilter: !1,
|
|
2269
2273
|
onKeyDown: X,
|
|
2270
2274
|
isOpen: j
|
|
@@ -2291,8 +2295,8 @@ const Ar = ({
|
|
|
2291
2295
|
sizing: i = "base",
|
|
2292
2296
|
variant: o = "primary",
|
|
2293
2297
|
appearance: l = "raised",
|
|
2294
|
-
showIcon:
|
|
2295
|
-
showText:
|
|
2298
|
+
showIcon: c = !0,
|
|
2299
|
+
showText: u = !0,
|
|
2296
2300
|
fullWidth: f = !1,
|
|
2297
2301
|
loading: d = !1,
|
|
2298
2302
|
justify: m = "center",
|
|
@@ -2313,7 +2317,7 @@ const Ar = ({
|
|
|
2313
2317
|
"aria-busy": d,
|
|
2314
2318
|
title: p || r || v,
|
|
2315
2319
|
children: d ? /* @__PURE__ */ y.jsx(fe, { icon: "spinner", state: ir(o), spin: !0 }) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
|
|
2316
|
-
s &&
|
|
2320
|
+
s && c && /* @__PURE__ */ y.jsx(
|
|
2317
2321
|
fe,
|
|
2318
2322
|
{
|
|
2319
2323
|
icon: s,
|
|
@@ -2323,7 +2327,7 @@ const Ar = ({
|
|
|
2323
2327
|
height: ar(i)
|
|
2324
2328
|
}
|
|
2325
2329
|
),
|
|
2326
|
-
|
|
2330
|
+
u && /* @__PURE__ */ y.jsx("span", { children: v || e })
|
|
2327
2331
|
] })
|
|
2328
2332
|
}
|
|
2329
2333
|
);
|
|
@@ -2337,13 +2341,13 @@ const Ar = ({
|
|
|
2337
2341
|
appearance: i,
|
|
2338
2342
|
showText: o,
|
|
2339
2343
|
showIcon: l,
|
|
2340
|
-
fullWidth:
|
|
2341
|
-
disabled:
|
|
2344
|
+
fullWidth: c,
|
|
2345
|
+
disabled: u,
|
|
2342
2346
|
justify: f,
|
|
2343
2347
|
onClick: d,
|
|
2344
2348
|
onOptionsRequest: m
|
|
2345
2349
|
}) => {
|
|
2346
|
-
const [p, v] =
|
|
2350
|
+
const [p, v] = q(r);
|
|
2347
2351
|
ne(() => {
|
|
2348
2352
|
!p && m && e && m(e, void 0).then((b) => v(b)).catch((b) => {
|
|
2349
2353
|
console.error(
|
|
@@ -2364,8 +2368,8 @@ const Ar = ({
|
|
|
2364
2368
|
appearance: i,
|
|
2365
2369
|
showText: o,
|
|
2366
2370
|
showIcon: l,
|
|
2367
|
-
fullWidth:
|
|
2368
|
-
disabled:
|
|
2371
|
+
fullWidth: c,
|
|
2372
|
+
disabled: u,
|
|
2369
2373
|
sizing: s,
|
|
2370
2374
|
justify: f,
|
|
2371
2375
|
onClick: () => {
|
|
@@ -2387,12 +2391,12 @@ const Ar = ({
|
|
|
2387
2391
|
onBlur: i,
|
|
2388
2392
|
variant: o = "checkbox"
|
|
2389
2393
|
}) => {
|
|
2390
|
-
const l = Be(),
|
|
2394
|
+
const l = Be(), c = (f) => {
|
|
2391
2395
|
s && a && a(f.target.checked);
|
|
2392
|
-
},
|
|
2396
|
+
}, u = {
|
|
2393
2397
|
wrapper: `${Rn["smp-checkbox-wrapper"]}`
|
|
2394
2398
|
};
|
|
2395
|
-
return /* @__PURE__ */ y.jsxs("div", { className:
|
|
2399
|
+
return /* @__PURE__ */ y.jsxs("div", { className: u.wrapper, "data-component": e, children: [
|
|
2396
2400
|
n && /* @__PURE__ */ y.jsx(je, { label: n, disabled: t, htmlFor: l }),
|
|
2397
2401
|
/* @__PURE__ */ y.jsx(
|
|
2398
2402
|
"input",
|
|
@@ -2400,7 +2404,7 @@ const Ar = ({
|
|
|
2400
2404
|
"data-component": "checkbox",
|
|
2401
2405
|
type: "checkbox",
|
|
2402
2406
|
checked: r,
|
|
2403
|
-
onChange:
|
|
2407
|
+
onChange: c,
|
|
2404
2408
|
onBlur: i,
|
|
2405
2409
|
role: o === "switch" ? "switch" : "checkbox",
|
|
2406
2410
|
id: l
|
|
@@ -2412,7 +2416,7 @@ const Ar = ({
|
|
|
2412
2416
|
title: "h3",
|
|
2413
2417
|
body: "h6",
|
|
2414
2418
|
label: "label"
|
|
2415
|
-
},
|
|
2419
|
+
}, ke = ({
|
|
2416
2420
|
variant: r = "body",
|
|
2417
2421
|
bindValue: e,
|
|
2418
2422
|
color: t,
|
|
@@ -2441,10 +2445,10 @@ const Ar = ({
|
|
|
2441
2445
|
backgroundColor: a,
|
|
2442
2446
|
isDraggable: i = !1
|
|
2443
2447
|
}) => {
|
|
2444
|
-
const [o, l] =
|
|
2448
|
+
const [o, l] = q(null), c = {
|
|
2445
2449
|
container: `${["smp-chips-container"]}`,
|
|
2446
2450
|
element: "smp-chips-element"
|
|
2447
|
-
},
|
|
2451
|
+
}, u = (m) => {
|
|
2448
2452
|
n == null || n(r.filter((p, v) => v !== m));
|
|
2449
2453
|
}, f = (m) => {
|
|
2450
2454
|
l(m);
|
|
@@ -2453,15 +2457,15 @@ const Ar = ({
|
|
|
2453
2457
|
const p = [...r], [v] = p.splice(o, 1);
|
|
2454
2458
|
p.splice(m, 0, v), n == null || n(p), l(null);
|
|
2455
2459
|
};
|
|
2456
|
-
return /* @__PURE__ */ y.jsx("div", { className:
|
|
2457
|
-
const v =
|
|
2460
|
+
return /* @__PURE__ */ y.jsx("div", { className: c.container, role: "list", "data-component": "chip", children: r.flatMap((m, p) => {
|
|
2461
|
+
const v = Ae(
|
|
2458
2462
|
m.bindValue,
|
|
2459
2463
|
m.optionalDisplayValue,
|
|
2460
2464
|
t
|
|
2461
2465
|
), E = /* @__PURE__ */ y.jsxs(
|
|
2462
2466
|
"div",
|
|
2463
2467
|
{
|
|
2464
|
-
className:
|
|
2468
|
+
className: c.element,
|
|
2465
2469
|
role: "listitem",
|
|
2466
2470
|
draggable: i,
|
|
2467
2471
|
onDragStart: () => f(p),
|
|
@@ -2472,13 +2476,13 @@ const Ar = ({
|
|
|
2472
2476
|
},
|
|
2473
2477
|
children: [
|
|
2474
2478
|
i && /* @__PURE__ */ y.jsx(fe, { icon: "drag_indicator_horizontal", isInteractable: !0 }),
|
|
2475
|
-
/* @__PURE__ */ y.jsx(
|
|
2479
|
+
/* @__PURE__ */ y.jsx(ke, { variant: "label", bindValue: v, color: s }),
|
|
2476
2480
|
e && /* @__PURE__ */ y.jsx(
|
|
2477
2481
|
fe,
|
|
2478
2482
|
{
|
|
2479
2483
|
icon: "close",
|
|
2480
2484
|
isInteractable: !0,
|
|
2481
|
-
onClick: () =>
|
|
2485
|
+
onClick: () => u(p),
|
|
2482
2486
|
color: s
|
|
2483
2487
|
}
|
|
2484
2488
|
)
|
|
@@ -2507,30 +2511,30 @@ function Lt(r, e) {
|
|
|
2507
2511
|
n.querySelectorAll(
|
|
2508
2512
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2509
2513
|
)
|
|
2510
|
-
).filter((
|
|
2514
|
+
).filter((c) => !c.hasAttribute("disabled") && c.offsetParent !== null) : [];
|
|
2511
2515
|
(() => {
|
|
2512
|
-
const u = s();
|
|
2513
|
-
u.length > 0 && requestAnimationFrame(() => u[0].focus());
|
|
2514
|
-
})();
|
|
2515
|
-
const i = (u) => {
|
|
2516
|
-
if (u.key === "Escape" || u.key !== "Tab") return;
|
|
2517
2516
|
const c = s();
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2517
|
+
c.length > 0 && requestAnimationFrame(() => c[0].focus());
|
|
2518
|
+
})();
|
|
2519
|
+
const i = (c) => {
|
|
2520
|
+
if (c.key === "Escape" || c.key !== "Tab") return;
|
|
2521
|
+
const u = s();
|
|
2522
|
+
if (u.length === 0) return;
|
|
2523
|
+
const f = u[0], d = u[u.length - 1];
|
|
2524
|
+
c.shiftKey && document.activeElement === f ? (c.preventDefault(), d.focus()) : !c.shiftKey && document.activeElement === d && (c.preventDefault(), f.focus());
|
|
2525
|
+
}, o = (c) => {
|
|
2526
|
+
if (n && !n.contains(c.target)) {
|
|
2527
|
+
c.preventDefault();
|
|
2528
|
+
const u = s();
|
|
2529
|
+
u.length > 0 && u[0].focus();
|
|
2526
2530
|
}
|
|
2527
2531
|
};
|
|
2528
2532
|
document.addEventListener("keydown", i), document.addEventListener("mousedown", o);
|
|
2529
2533
|
const l = document.body.style.overflow;
|
|
2530
2534
|
return document.body.style.overflow = "hidden", () => {
|
|
2531
2535
|
document.removeEventListener("keydown", i), document.removeEventListener("mousedown", o), document.body.style.overflow = l, t.current && requestAnimationFrame(() => {
|
|
2532
|
-
var
|
|
2533
|
-
(
|
|
2536
|
+
var c;
|
|
2537
|
+
(c = t.current) == null || c.focus();
|
|
2534
2538
|
});
|
|
2535
2539
|
};
|
|
2536
2540
|
}, [r, e]);
|
|
@@ -2545,28 +2549,28 @@ const $n = ({
|
|
|
2545
2549
|
listDisplayMode: i = "Both",
|
|
2546
2550
|
fun: o,
|
|
2547
2551
|
onOptionsRequest: l,
|
|
2548
|
-
multiActiveIndex:
|
|
2549
|
-
...
|
|
2552
|
+
multiActiveIndex: c,
|
|
2553
|
+
...u
|
|
2550
2554
|
}) => {
|
|
2551
|
-
const f = ce(null), [d, m] =
|
|
2555
|
+
const f = ce(null), [d, m] = q(!1), [p, v] = q(t), [E, T] = q(-1), [b, j] = q([r]), S = Be(), { anchorRef: g, targetRef: D, anchorWidth: k } = pt({
|
|
2552
2556
|
position: "bottom",
|
|
2553
2557
|
enabled: d
|
|
2554
2558
|
}), w = le(() => {
|
|
2555
|
-
var
|
|
2556
|
-
m(!1), (
|
|
2559
|
+
var A;
|
|
2560
|
+
m(!1), (A = f == null ? void 0 : f.current) == null || A.focus();
|
|
2557
2561
|
}, []);
|
|
2558
|
-
|
|
2559
|
-
const O = (
|
|
2560
|
-
e == null || e(
|
|
2561
|
-
const
|
|
2562
|
-
T(
|
|
2563
|
-
},
|
|
2564
|
-
|
|
2565
|
-
}, F = (
|
|
2566
|
-
(
|
|
2562
|
+
Ve(D, d, () => w()), Lt(d, D);
|
|
2563
|
+
const O = (A) => {
|
|
2564
|
+
e == null || e(A.id, A.label);
|
|
2565
|
+
const W = p.findIndex((L) => L.id === A.id);
|
|
2566
|
+
T(W), j([A.id]), w();
|
|
2567
|
+
}, C = (A) => {
|
|
2568
|
+
A.key === "Escape" && (w(), T(-1));
|
|
2569
|
+
}, F = (A) => {
|
|
2570
|
+
(A.key === "ArrowDown" || A.key === "ArrowUp") && (A.preventDefault(), P());
|
|
2567
2571
|
}, P = () => {
|
|
2568
|
-
o && l && l(o, void 0).then((
|
|
2569
|
-
v(
|
|
2572
|
+
o && l && l(o, void 0).then((A) => {
|
|
2573
|
+
v(A), T(A.length > 0 ? 0 : -1), m(!0);
|
|
2570
2574
|
});
|
|
2571
2575
|
};
|
|
2572
2576
|
return /* @__PURE__ */ y.jsxs(
|
|
@@ -2581,7 +2585,7 @@ const $n = ({
|
|
|
2581
2585
|
/* @__PURE__ */ y.jsx(
|
|
2582
2586
|
At,
|
|
2583
2587
|
{
|
|
2584
|
-
...
|
|
2588
|
+
...u,
|
|
2585
2589
|
bindValue: r,
|
|
2586
2590
|
optionalDisplayValue: n,
|
|
2587
2591
|
displayMode: a,
|
|
@@ -2597,7 +2601,7 @@ const $n = ({
|
|
|
2597
2601
|
}
|
|
2598
2602
|
),
|
|
2599
2603
|
d && /* @__PURE__ */ y.jsx(ht, { children: /* @__PURE__ */ y.jsx(
|
|
2600
|
-
|
|
2604
|
+
Pr,
|
|
2601
2605
|
{
|
|
2602
2606
|
id: S,
|
|
2603
2607
|
options: p,
|
|
@@ -2605,27 +2609,27 @@ const $n = ({
|
|
|
2605
2609
|
ref: D,
|
|
2606
2610
|
isOpen: d,
|
|
2607
2611
|
selectedIndex: E,
|
|
2608
|
-
activeIndex:
|
|
2612
|
+
activeIndex: c || b,
|
|
2609
2613
|
width: k,
|
|
2610
2614
|
onClick: O,
|
|
2611
|
-
onKeyDown:
|
|
2615
|
+
onKeyDown: C
|
|
2612
2616
|
}
|
|
2613
2617
|
) })
|
|
2614
2618
|
]
|
|
2615
2619
|
}
|
|
2616
2620
|
);
|
|
2617
|
-
},
|
|
2621
|
+
}, K = (r) => typeof r == "string", Me = () => {
|
|
2618
2622
|
let r, e;
|
|
2619
2623
|
const t = new Promise((n, s) => {
|
|
2620
2624
|
r = n, e = s;
|
|
2621
2625
|
});
|
|
2622
2626
|
return t.resolve = r, t.reject = e, t;
|
|
2623
|
-
}, or = (r) => r == null ? "" : "" + r,
|
|
2627
|
+
}, or = (r) => r == null ? "" : "" + r, Cn = (r, e, t) => {
|
|
2624
2628
|
r.forEach((n) => {
|
|
2625
2629
|
e[n] && (t[n] = e[n]);
|
|
2626
2630
|
});
|
|
2627
|
-
},
|
|
2628
|
-
const n =
|
|
2631
|
+
}, Pn = /###/g, lr = (r) => r && r.indexOf("###") > -1 ? r.replace(Pn, ".") : r, cr = (r) => !r || K(r), Fe = (r, e, t) => {
|
|
2632
|
+
const n = K(e) ? e.split(".") : e;
|
|
2629
2633
|
let s = 0;
|
|
2630
2634
|
for (; s < n.length - 1; ) {
|
|
2631
2635
|
if (cr(r)) return {};
|
|
@@ -2640,26 +2644,26 @@ const $n = ({
|
|
|
2640
2644
|
const {
|
|
2641
2645
|
obj: n,
|
|
2642
2646
|
k: s
|
|
2643
|
-
} =
|
|
2647
|
+
} = Fe(r, e, Object);
|
|
2644
2648
|
if (n !== void 0 || e.length === 1) {
|
|
2645
2649
|
n[s] = t;
|
|
2646
2650
|
return;
|
|
2647
2651
|
}
|
|
2648
|
-
let a = e[e.length - 1], i = e.slice(0, e.length - 1), o =
|
|
2652
|
+
let a = e[e.length - 1], i = e.slice(0, e.length - 1), o = Fe(r, i, Object);
|
|
2649
2653
|
for (; o.obj === void 0 && i.length; )
|
|
2650
|
-
a = `${i[i.length - 1]}.${a}`, i = i.slice(0, i.length - 1), o =
|
|
2654
|
+
a = `${i[i.length - 1]}.${a}`, i = i.slice(0, i.length - 1), o = Fe(r, i, Object), o != null && o.obj && typeof o.obj[`${o.k}.${a}`] < "u" && (o.obj = void 0);
|
|
2651
2655
|
o.obj[`${o.k}.${a}`] = t;
|
|
2652
2656
|
}, An = (r, e, t, n) => {
|
|
2653
2657
|
const {
|
|
2654
2658
|
obj: s,
|
|
2655
2659
|
k: a
|
|
2656
|
-
} =
|
|
2660
|
+
} = Fe(r, e, Object);
|
|
2657
2661
|
s[a] = s[a] || [], s[a].push(t);
|
|
2658
2662
|
}, lt = (r, e) => {
|
|
2659
2663
|
const {
|
|
2660
2664
|
obj: t,
|
|
2661
2665
|
k: n
|
|
2662
|
-
} =
|
|
2666
|
+
} = Fe(r, e);
|
|
2663
2667
|
if (t && Object.prototype.hasOwnProperty.call(t, n))
|
|
2664
2668
|
return t[n];
|
|
2665
2669
|
}, kn = (r, e, t) => {
|
|
@@ -2667,7 +2671,7 @@ const $n = ({
|
|
|
2667
2671
|
return n !== void 0 ? n : lt(e, t);
|
|
2668
2672
|
}, kr = (r, e, t) => {
|
|
2669
2673
|
for (const n in e)
|
|
2670
|
-
n !== "__proto__" && n !== "constructor" && (n in r ?
|
|
2674
|
+
n !== "__proto__" && n !== "constructor" && (n in r ? K(r[n]) || r[n] instanceof String || K(e[n]) || e[n] instanceof String ? t && (r[n] = e[n]) : kr(r[n], e[n], t) : r[n] = e[n]);
|
|
2671
2675
|
return r;
|
|
2672
2676
|
}, _e = (r) => r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
2673
2677
|
var Ln = {
|
|
@@ -2678,7 +2682,7 @@ var Ln = {
|
|
|
2678
2682
|
"'": "'",
|
|
2679
2683
|
"/": "/"
|
|
2680
2684
|
};
|
|
2681
|
-
const Nn = (r) =>
|
|
2685
|
+
const Nn = (r) => K(r) ? r.replace(/[&<>"'\/]/g, (e) => Ln[e]) : r;
|
|
2682
2686
|
class In {
|
|
2683
2687
|
constructor(e) {
|
|
2684
2688
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -2722,7 +2726,7 @@ const Mn = [" ", ",", "?", "!", ";"], Fn = new In(20), Vn = (r, e, t) => {
|
|
|
2722
2726
|
s = i;
|
|
2723
2727
|
}
|
|
2724
2728
|
return s;
|
|
2725
|
-
},
|
|
2729
|
+
}, We = (r) => r == null ? void 0 : r.replace("_", "-"), Yn = {
|
|
2726
2730
|
type: "logger",
|
|
2727
2731
|
log(r) {
|
|
2728
2732
|
this.output("log", r);
|
|
@@ -2758,7 +2762,7 @@ class ct {
|
|
|
2758
2762
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
2759
2763
|
}
|
|
2760
2764
|
forward(e, t, n, s) {
|
|
2761
|
-
return s && !this.debug ? null : (
|
|
2765
|
+
return s && !this.debug ? null : (K(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
2762
2766
|
}
|
|
2763
2767
|
create(e) {
|
|
2764
2768
|
return new ct(this.logger, {
|
|
@@ -2816,12 +2820,12 @@ class fr extends mt {
|
|
|
2816
2820
|
t > -1 && this.options.ns.splice(t, 1);
|
|
2817
2821
|
}
|
|
2818
2822
|
getResource(e, t, n, s = {}) {
|
|
2819
|
-
var
|
|
2823
|
+
var c, u;
|
|
2820
2824
|
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, i = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
2821
2825
|
let o;
|
|
2822
|
-
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) :
|
|
2826
|
+
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : K(n) && a ? o.push(...n.split(a)) : o.push(n)));
|
|
2823
2827
|
const l = lt(this.data, o);
|
|
2824
|
-
return !l && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), l || !i || !
|
|
2828
|
+
return !l && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), l || !i || !K(n) ? l : _t((u = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : u[t], n, a);
|
|
2825
2829
|
}
|
|
2826
2830
|
addResource(e, t, n, s, a = {
|
|
2827
2831
|
silent: !1
|
|
@@ -2834,7 +2838,7 @@ class fr extends mt {
|
|
|
2834
2838
|
silent: !1
|
|
2835
2839
|
}) {
|
|
2836
2840
|
for (const a in n)
|
|
2837
|
-
(
|
|
2841
|
+
(K(n[a]) || Array.isArray(n[a])) && this.addResource(e, t, a, n[a], {
|
|
2838
2842
|
silent: !0
|
|
2839
2843
|
});
|
|
2840
2844
|
s.silent || this.emit("added", e, t, n);
|
|
@@ -2883,10 +2887,10 @@ var Lr = {
|
|
|
2883
2887
|
}), e;
|
|
2884
2888
|
}
|
|
2885
2889
|
};
|
|
2886
|
-
const dr = {}, pr = (r) => !
|
|
2890
|
+
const dr = {}, pr = (r) => !K(r) && typeof r != "boolean" && typeof r != "number";
|
|
2887
2891
|
class ut extends mt {
|
|
2888
2892
|
constructor(e, t = {}) {
|
|
2889
|
-
super(),
|
|
2893
|
+
super(), Cn(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = be.create("translator");
|
|
2890
2894
|
}
|
|
2891
2895
|
changeLanguage(e) {
|
|
2892
2896
|
e && (this.language = e);
|
|
@@ -2912,14 +2916,14 @@ class ut extends mt {
|
|
|
2912
2916
|
if (l && l.length > 0)
|
|
2913
2917
|
return {
|
|
2914
2918
|
key: e,
|
|
2915
|
-
namespaces:
|
|
2919
|
+
namespaces: K(a) ? [a] : a
|
|
2916
2920
|
};
|
|
2917
|
-
const
|
|
2918
|
-
(n !== s || n === s && this.options.ns.indexOf(
|
|
2921
|
+
const c = e.split(n);
|
|
2922
|
+
(n !== s || n === s && this.options.ns.indexOf(c[0]) > -1) && (a = c.shift()), e = c.join(s);
|
|
2919
2923
|
}
|
|
2920
2924
|
return {
|
|
2921
2925
|
key: e,
|
|
2922
|
-
namespaces:
|
|
2926
|
+
namespaces: K(a) ? [a] : a
|
|
2923
2927
|
};
|
|
2924
2928
|
}
|
|
2925
2929
|
translate(e, t, n) {
|
|
@@ -2933,69 +2937,69 @@ class ut extends mt {
|
|
|
2933
2937
|
const a = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, {
|
|
2934
2938
|
key: o,
|
|
2935
2939
|
namespaces: l
|
|
2936
|
-
} = this.extractFromKey(e[e.length - 1], s),
|
|
2937
|
-
let
|
|
2938
|
-
|
|
2940
|
+
} = this.extractFromKey(e[e.length - 1], s), c = l[l.length - 1];
|
|
2941
|
+
let u = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator;
|
|
2942
|
+
u === void 0 && (u = ":");
|
|
2939
2943
|
const f = s.lng || this.language, d = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
2940
2944
|
if ((f == null ? void 0 : f.toLowerCase()) === "cimode")
|
|
2941
2945
|
return d ? a ? {
|
|
2942
|
-
res: `${
|
|
2946
|
+
res: `${c}${u}${o}`,
|
|
2943
2947
|
usedKey: o,
|
|
2944
2948
|
exactUsedKey: o,
|
|
2945
2949
|
usedLng: f,
|
|
2946
|
-
usedNS:
|
|
2950
|
+
usedNS: c,
|
|
2947
2951
|
usedParams: this.getUsedParamsDetails(s)
|
|
2948
|
-
} : `${
|
|
2952
|
+
} : `${c}${u}${o}` : a ? {
|
|
2949
2953
|
res: o,
|
|
2950
2954
|
usedKey: o,
|
|
2951
2955
|
exactUsedKey: o,
|
|
2952
2956
|
usedLng: f,
|
|
2953
|
-
usedNS:
|
|
2957
|
+
usedNS: c,
|
|
2954
2958
|
usedParams: this.getUsedParamsDetails(s)
|
|
2955
2959
|
} : o;
|
|
2956
2960
|
const m = this.resolve(e, s);
|
|
2957
2961
|
let p = m == null ? void 0 : m.res;
|
|
2958
|
-
const v = (m == null ? void 0 : m.usedKey) || o, E = (m == null ? void 0 : m.exactUsedKey) || o, T = ["[object Number]", "[object Function]", "[object RegExp]"], b = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, j = !this.i18nFormat || this.i18nFormat.handleAsObject, S = s.count !== void 0 && !
|
|
2962
|
+
const v = (m == null ? void 0 : m.usedKey) || o, E = (m == null ? void 0 : m.exactUsedKey) || o, T = ["[object Number]", "[object Function]", "[object RegExp]"], b = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, j = !this.i18nFormat || this.i18nFormat.handleAsObject, S = s.count !== void 0 && !K(s.count), g = ut.hasDefaultValue(s), D = S ? this.pluralResolver.getSuffix(f, s.count, s) : "", k = s.ordinal && S ? this.pluralResolver.getSuffix(f, s.count, {
|
|
2959
2963
|
ordinal: !1
|
|
2960
2964
|
}) : "", w = S && !s.ordinal && s.count === 0, O = w && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${D}`] || s[`defaultValue${k}`] || s.defaultValue;
|
|
2961
|
-
let
|
|
2962
|
-
j && !p && g && (
|
|
2963
|
-
const F = pr(
|
|
2964
|
-
if (j &&
|
|
2965
|
+
let C = p;
|
|
2966
|
+
j && !p && g && (C = O);
|
|
2967
|
+
const F = pr(C), P = Object.prototype.toString.apply(C);
|
|
2968
|
+
if (j && C && F && T.indexOf(P) < 0 && !(K(b) && Array.isArray(C))) {
|
|
2965
2969
|
if (!s.returnObjects && !this.options.returnObjects) {
|
|
2966
2970
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
2967
|
-
const
|
|
2971
|
+
const A = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(v, C, {
|
|
2968
2972
|
...s,
|
|
2969
2973
|
ns: l
|
|
2970
2974
|
}) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
2971
|
-
return a ? (m.res =
|
|
2975
|
+
return a ? (m.res = A, m.usedParams = this.getUsedParamsDetails(s), m) : A;
|
|
2972
2976
|
}
|
|
2973
2977
|
if (i) {
|
|
2974
|
-
const
|
|
2975
|
-
for (const H in
|
|
2976
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
2977
|
-
const
|
|
2978
|
-
g && !p ?
|
|
2978
|
+
const A = Array.isArray(C), W = A ? [] : {}, L = A ? E : v;
|
|
2979
|
+
for (const H in C)
|
|
2980
|
+
if (Object.prototype.hasOwnProperty.call(C, H)) {
|
|
2981
|
+
const G = `${L}${i}${H}`;
|
|
2982
|
+
g && !p ? W[H] = this.translate(G, {
|
|
2979
2983
|
...s,
|
|
2980
2984
|
defaultValue: pr(O) ? O[H] : void 0,
|
|
2981
2985
|
joinArrays: !1,
|
|
2982
2986
|
ns: l
|
|
2983
|
-
}) :
|
|
2987
|
+
}) : W[H] = this.translate(G, {
|
|
2984
2988
|
...s,
|
|
2985
2989
|
joinArrays: !1,
|
|
2986
2990
|
ns: l
|
|
2987
|
-
}),
|
|
2991
|
+
}), W[H] === G && (W[H] = C[H]);
|
|
2988
2992
|
}
|
|
2989
|
-
p =
|
|
2993
|
+
p = W;
|
|
2990
2994
|
}
|
|
2991
|
-
} else if (j &&
|
|
2995
|
+
} else if (j && K(b) && Array.isArray(p))
|
|
2992
2996
|
p = p.join(b), p && (p = this.extendTranslation(p, e, s, n));
|
|
2993
2997
|
else {
|
|
2994
|
-
let
|
|
2995
|
-
!this.isValidLookup(p) && g && (
|
|
2996
|
-
const H = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) &&
|
|
2997
|
-
if (
|
|
2998
|
-
if (this.logger.log(
|
|
2998
|
+
let A = !1, W = !1;
|
|
2999
|
+
!this.isValidLookup(p) && g && (A = !0, p = O), this.isValidLookup(p) || (W = !0, p = o);
|
|
3000
|
+
const H = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && W ? void 0 : p, G = g && O !== p && this.options.updateMissing;
|
|
3001
|
+
if (W || A || G) {
|
|
3002
|
+
if (this.logger.log(G ? "updateKey" : "missingKey", f, c, o, G ? O : p), i) {
|
|
2999
3003
|
const x = this.resolve(o, {
|
|
3000
3004
|
...s,
|
|
3001
3005
|
keySeparator: !1
|
|
@@ -3008,24 +3012,24 @@ class ut extends mt {
|
|
|
3008
3012
|
for (let x = 0; x < M.length; x++)
|
|
3009
3013
|
X.push(M[x]);
|
|
3010
3014
|
else this.options.saveMissingTo === "all" ? X = this.languageUtils.toResolveHierarchy(s.lng || this.language) : X.push(s.lng || this.language);
|
|
3011
|
-
const h = (x, R,
|
|
3012
|
-
var
|
|
3013
|
-
const _ = g &&
|
|
3014
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(x,
|
|
3015
|
+
const h = (x, R, $) => {
|
|
3016
|
+
var N;
|
|
3017
|
+
const _ = g && $ !== p ? $ : H;
|
|
3018
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(x, c, R, _, G, s) : (N = this.backendConnector) != null && N.saveMissing && this.backendConnector.saveMissing(x, c, R, _, G, s), this.emit("missingKey", x, c, R, p);
|
|
3015
3019
|
};
|
|
3016
3020
|
this.options.saveMissing && (this.options.saveMissingPlurals && S ? X.forEach((x) => {
|
|
3017
3021
|
const R = this.pluralResolver.getSuffixes(x, s);
|
|
3018
|
-
w && s[`defaultValue${this.options.pluralSeparator}zero`] && R.indexOf(`${this.options.pluralSeparator}zero`) < 0 && R.push(`${this.options.pluralSeparator}zero`), R.forEach((
|
|
3019
|
-
h([x], o +
|
|
3022
|
+
w && s[`defaultValue${this.options.pluralSeparator}zero`] && R.indexOf(`${this.options.pluralSeparator}zero`) < 0 && R.push(`${this.options.pluralSeparator}zero`), R.forEach(($) => {
|
|
3023
|
+
h([x], o + $, s[`defaultValue${$}`] || O);
|
|
3020
3024
|
});
|
|
3021
3025
|
}) : h(X, o, O));
|
|
3022
3026
|
}
|
|
3023
|
-
p = this.extendTranslation(p, e, s, m, n),
|
|
3027
|
+
p = this.extendTranslation(p, e, s, m, n), W && p === o && this.options.appendNamespaceToMissingKey && (p = `${c}${u}${o}`), (W || A) && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${u}${o}` : o, A ? p : void 0, s));
|
|
3024
3028
|
}
|
|
3025
3029
|
return a ? (m.res = p, m.usedParams = this.getUsedParamsDetails(s), m) : p;
|
|
3026
3030
|
}
|
|
3027
3031
|
extendTranslation(e, t, n, s, a) {
|
|
3028
|
-
var l,
|
|
3032
|
+
var l, c;
|
|
3029
3033
|
if ((l = this.i18nFormat) != null && l.parse)
|
|
3030
3034
|
e = this.i18nFormat.parse(e, {
|
|
3031
3035
|
...this.options.interpolation.defaultVariables,
|
|
@@ -3041,23 +3045,23 @@ class ut extends mt {
|
|
|
3041
3045
|
...n.interpolation
|
|
3042
3046
|
}
|
|
3043
3047
|
});
|
|
3044
|
-
const
|
|
3048
|
+
const u = K(e) && (((c = n == null ? void 0 : n.interpolation) == null ? void 0 : c.skipOnVariables) !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
3045
3049
|
let f;
|
|
3046
|
-
if (
|
|
3050
|
+
if (u) {
|
|
3047
3051
|
const m = e.match(this.interpolator.nestingRegexp);
|
|
3048
3052
|
f = m && m.length;
|
|
3049
3053
|
}
|
|
3050
|
-
let d = n.replace && !
|
|
3054
|
+
let d = n.replace && !K(n.replace) ? n.replace : n;
|
|
3051
3055
|
if (this.options.interpolation.defaultVariables && (d = {
|
|
3052
3056
|
...this.options.interpolation.defaultVariables,
|
|
3053
3057
|
...d
|
|
3054
|
-
}), e = this.interpolator.interpolate(e, d, n.lng || this.language || s.usedLng, n),
|
|
3058
|
+
}), e = this.interpolator.interpolate(e, d, n.lng || this.language || s.usedLng, n), u) {
|
|
3055
3059
|
const m = e.match(this.interpolator.nestingRegexp), p = m && m.length;
|
|
3056
3060
|
f < p && (n.nest = !1);
|
|
3057
3061
|
}
|
|
3058
3062
|
!n.lng && s && s.res && (n.lng = this.language || s.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...m) => (a == null ? void 0 : a[0]) === m[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`), null) : this.translate(...m, t), n)), n.interpolation && this.interpolator.reset();
|
|
3059
3063
|
}
|
|
3060
|
-
const i = n.postProcess || this.options.postProcess, o =
|
|
3064
|
+
const i = n.postProcess || this.options.postProcess, o = K(i) ? [i] : i;
|
|
3061
3065
|
return e != null && (o != null && o.length) && n.applyPostProcessor !== !1 && (e = Lr.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
3062
3066
|
i18nResolved: {
|
|
3063
3067
|
...s,
|
|
@@ -3068,29 +3072,29 @@ class ut extends mt {
|
|
|
3068
3072
|
}
|
|
3069
3073
|
resolve(e, t = {}) {
|
|
3070
3074
|
let n, s, a, i, o;
|
|
3071
|
-
return
|
|
3075
|
+
return K(e) && (e = [e]), e.forEach((l) => {
|
|
3072
3076
|
if (this.isValidLookup(n)) return;
|
|
3073
|
-
const
|
|
3074
|
-
s =
|
|
3075
|
-
let f =
|
|
3077
|
+
const c = this.extractFromKey(l, t), u = c.key;
|
|
3078
|
+
s = u;
|
|
3079
|
+
let f = c.namespaces;
|
|
3076
3080
|
this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
|
|
3077
|
-
const d = t.count !== void 0 && !
|
|
3081
|
+
const d = t.count !== void 0 && !K(t.count), m = d && !t.ordinal && t.count === 0, p = t.context !== void 0 && (K(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
3078
3082
|
f.forEach((E) => {
|
|
3079
3083
|
var T, b;
|
|
3080
3084
|
this.isValidLookup(n) || (o = E, !dr[`${v[0]}-${E}`] && ((T = this.utils) != null && T.hasLoadedNamespace) && !((b = this.utils) != null && b.hasLoadedNamespace(o)) && (dr[`${v[0]}-${E}`] = !0, this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), v.forEach((j) => {
|
|
3081
3085
|
var D;
|
|
3082
3086
|
if (this.isValidLookup(n)) return;
|
|
3083
3087
|
i = j;
|
|
3084
|
-
const S = [
|
|
3088
|
+
const S = [u];
|
|
3085
3089
|
if ((D = this.i18nFormat) != null && D.addLookupKeys)
|
|
3086
|
-
this.i18nFormat.addLookupKeys(S,
|
|
3090
|
+
this.i18nFormat.addLookupKeys(S, u, j, E, t);
|
|
3087
3091
|
else {
|
|
3088
3092
|
let k;
|
|
3089
3093
|
d && (k = this.pluralResolver.getSuffix(j, t.count, t));
|
|
3090
3094
|
const w = `${this.options.pluralSeparator}zero`, O = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
3091
|
-
if (d && (S.push(
|
|
3092
|
-
const
|
|
3093
|
-
S.push(
|
|
3095
|
+
if (d && (S.push(u + k), t.ordinal && k.indexOf(O) === 0 && S.push(u + k.replace(O, this.options.pluralSeparator)), m && S.push(u + w)), p) {
|
|
3096
|
+
const C = `${u}${this.options.contextSeparator}${t.context}`;
|
|
3097
|
+
S.push(C), d && (S.push(C + k), t.ordinal && k.indexOf(O) === 0 && S.push(C + k.replace(O, this.options.pluralSeparator)), m && S.push(C + w));
|
|
3094
3098
|
}
|
|
3095
3099
|
}
|
|
3096
3100
|
let g;
|
|
@@ -3114,7 +3118,7 @@ class ut extends mt {
|
|
|
3114
3118
|
return (a = this.i18nFormat) != null && a.getResource ? this.i18nFormat.getResource(e, t, n, s) : this.resourceStore.getResource(e, t, n, s);
|
|
3115
3119
|
}
|
|
3116
3120
|
getUsedParamsDetails(e = {}) {
|
|
3117
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !
|
|
3121
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !K(e.replace);
|
|
3118
3122
|
let s = n ? e.replace : e;
|
|
3119
3123
|
if (n && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = {
|
|
3120
3124
|
...this.options.interpolation.defaultVariables,
|
|
@@ -3141,17 +3145,17 @@ class hr {
|
|
|
3141
3145
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = be.create("languageUtils");
|
|
3142
3146
|
}
|
|
3143
3147
|
getScriptPartFromCode(e) {
|
|
3144
|
-
if (e =
|
|
3148
|
+
if (e = We(e), !e || e.indexOf("-") < 0) return null;
|
|
3145
3149
|
const t = e.split("-");
|
|
3146
3150
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
3147
3151
|
}
|
|
3148
3152
|
getLanguagePartFromCode(e) {
|
|
3149
|
-
if (e =
|
|
3153
|
+
if (e = We(e), !e || e.indexOf("-") < 0) return e;
|
|
3150
3154
|
const t = e.split("-");
|
|
3151
3155
|
return this.formatLanguageCode(t[0]);
|
|
3152
3156
|
}
|
|
3153
3157
|
formatLanguageCode(e) {
|
|
3154
|
-
if (
|
|
3158
|
+
if (K(e) && e.indexOf("-") > -1) {
|
|
3155
3159
|
let t;
|
|
3156
3160
|
try {
|
|
3157
3161
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -3186,7 +3190,7 @@ class hr {
|
|
|
3186
3190
|
}
|
|
3187
3191
|
getFallbackCodes(e, t) {
|
|
3188
3192
|
if (!e) return [];
|
|
3189
|
-
if (typeof e == "function" && (e = e(t)),
|
|
3193
|
+
if (typeof e == "function" && (e = e(t)), K(e) && (e = [e]), Array.isArray(e)) return e;
|
|
3190
3194
|
if (!t) return e.default || [];
|
|
3191
3195
|
let n = e[t];
|
|
3192
3196
|
return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
|
|
@@ -3195,7 +3199,7 @@ class hr {
|
|
|
3195
3199
|
const n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], a = (i) => {
|
|
3196
3200
|
i && (this.isSupportedCode(i) ? s.push(i) : this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`));
|
|
3197
3201
|
};
|
|
3198
|
-
return
|
|
3202
|
+
return K(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : K(e) && a(this.formatLanguageCode(e)), n.forEach((i) => {
|
|
3199
3203
|
s.indexOf(i) < 0 && a(this.formatLanguageCode(i));
|
|
3200
3204
|
}), s;
|
|
3201
3205
|
}
|
|
@@ -3213,7 +3217,7 @@ const mr = {
|
|
|
3213
3217
|
pluralCategories: ["one", "other"]
|
|
3214
3218
|
})
|
|
3215
3219
|
};
|
|
3216
|
-
class
|
|
3220
|
+
class Wn {
|
|
3217
3221
|
constructor(e, t = {}) {
|
|
3218
3222
|
this.languageUtils = e, this.options = t, this.logger = be.create("pluralResolver"), this.pluralRulesCache = {};
|
|
3219
3223
|
}
|
|
@@ -3224,7 +3228,7 @@ class Un {
|
|
|
3224
3228
|
this.pluralRulesCache = {};
|
|
3225
3229
|
}
|
|
3226
3230
|
getRule(e, t = {}) {
|
|
3227
|
-
const n =
|
|
3231
|
+
const n = We(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", a = JSON.stringify({
|
|
3228
3232
|
cleanedCode: n,
|
|
3229
3233
|
type: s
|
|
3230
3234
|
});
|
|
@@ -3262,9 +3266,9 @@ class Un {
|
|
|
3262
3266
|
}
|
|
3263
3267
|
const yr = (r, e, t, n = ".", s = !0) => {
|
|
3264
3268
|
let a = kn(r, e, t);
|
|
3265
|
-
return !a && s &&
|
|
3269
|
+
return !a && s && K(t) && (a = _t(r, t, n), a === void 0 && (a = _t(e, t, n))), a;
|
|
3266
3270
|
}, Ot = (r) => r.replace(/\$/g, "$$$$");
|
|
3267
|
-
class
|
|
3271
|
+
class Un {
|
|
3268
3272
|
constructor(e = {}) {
|
|
3269
3273
|
var t;
|
|
3270
3274
|
this.logger = be.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((n) => n), this.init(e);
|
|
@@ -3281,8 +3285,8 @@ class Wn {
|
|
|
3281
3285
|
prefixEscaped: i,
|
|
3282
3286
|
suffix: o,
|
|
3283
3287
|
suffixEscaped: l,
|
|
3284
|
-
formatSeparator:
|
|
3285
|
-
unescapeSuffix:
|
|
3288
|
+
formatSeparator: c,
|
|
3289
|
+
unescapeSuffix: u,
|
|
3286
3290
|
unescapePrefix: f,
|
|
3287
3291
|
nestingPrefix: d,
|
|
3288
3292
|
nestingPrefixEscaped: m,
|
|
@@ -3292,7 +3296,7 @@ class Wn {
|
|
|
3292
3296
|
maxReplaces: T,
|
|
3293
3297
|
alwaysFormat: b
|
|
3294
3298
|
} = e.interpolation;
|
|
3295
|
-
this.escape = t !== void 0 ? t : Nn, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? _e(a) : i || "{{", this.suffix = o ? _e(o) : l || "}}", this.formatSeparator =
|
|
3299
|
+
this.escape = t !== void 0 ? t : Nn, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? _e(a) : i || "{{", this.suffix = o ? _e(o) : l || "}}", this.formatSeparator = c || ",", this.unescapePrefix = u ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = d ? _e(d) : m || _e("$t("), this.nestingSuffix = p ? _e(p) : v || _e(")"), this.nestingOptionsSeparator = E || ",", this.maxReplaces = T || 1e3, this.alwaysFormat = b !== void 0 ? b : !1, this.resetRegExp();
|
|
3296
3300
|
}
|
|
3297
3301
|
reset() {
|
|
3298
3302
|
this.options && this.init(this.options);
|
|
@@ -3304,7 +3308,7 @@ class Wn {
|
|
|
3304
3308
|
interpolate(e, t, n, s) {
|
|
3305
3309
|
var m;
|
|
3306
3310
|
let a, i, o;
|
|
3307
|
-
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {},
|
|
3311
|
+
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (p) => {
|
|
3308
3312
|
if (p.indexOf(this.formatSeparator) < 0) {
|
|
3309
3313
|
const b = yr(t, l, p, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
3310
3314
|
return this.alwaysFormat ? this.format(b, void 0, n, {
|
|
@@ -3321,7 +3325,7 @@ class Wn {
|
|
|
3321
3325
|
});
|
|
3322
3326
|
};
|
|
3323
3327
|
this.resetRegExp();
|
|
3324
|
-
const
|
|
3328
|
+
const u = (s == null ? void 0 : s.missingInterpolationHandler) || this.options.missingInterpolationHandler, f = ((m = s == null ? void 0 : s.interpolation) == null ? void 0 : m.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
3325
3329
|
return [{
|
|
3326
3330
|
regex: this.regexpUnescape,
|
|
3327
3331
|
safeValue: (p) => Ot(p)
|
|
@@ -3331,10 +3335,10 @@ class Wn {
|
|
|
3331
3335
|
}].forEach((p) => {
|
|
3332
3336
|
for (o = 0; a = p.regex.exec(e); ) {
|
|
3333
3337
|
const v = a[1].trim();
|
|
3334
|
-
if (i =
|
|
3335
|
-
if (typeof
|
|
3336
|
-
const T =
|
|
3337
|
-
i =
|
|
3338
|
+
if (i = c(v), i === void 0)
|
|
3339
|
+
if (typeof u == "function") {
|
|
3340
|
+
const T = u(e, a, s);
|
|
3341
|
+
i = K(T) ? T : "";
|
|
3338
3342
|
} else if (s && Object.prototype.hasOwnProperty.call(s, v))
|
|
3339
3343
|
i = "";
|
|
3340
3344
|
else if (f) {
|
|
@@ -3342,7 +3346,7 @@ class Wn {
|
|
|
3342
3346
|
continue;
|
|
3343
3347
|
} else
|
|
3344
3348
|
this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`), i = "";
|
|
3345
|
-
else !
|
|
3349
|
+
else !K(i) && !this.useRawValueToEscape && (i = or(i));
|
|
3346
3350
|
const E = p.safeValue(i);
|
|
3347
3351
|
if (e = e.replace(a[0], E), f ? (p.regex.lastIndex += i.length, p.regex.lastIndex -= a[0].length) : p.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
3348
3352
|
break;
|
|
@@ -3351,21 +3355,21 @@ class Wn {
|
|
|
3351
3355
|
}
|
|
3352
3356
|
nest(e, t, n = {}) {
|
|
3353
3357
|
let s, a, i;
|
|
3354
|
-
const o = (l,
|
|
3355
|
-
const
|
|
3356
|
-
if (l.indexOf(
|
|
3357
|
-
const f = l.split(new RegExp(`${
|
|
3358
|
+
const o = (l, c) => {
|
|
3359
|
+
const u = this.nestingOptionsSeparator;
|
|
3360
|
+
if (l.indexOf(u) < 0) return l;
|
|
3361
|
+
const f = l.split(new RegExp(`${u}[ ]*{`));
|
|
3358
3362
|
let d = `{${f[1]}`;
|
|
3359
3363
|
l = f[0], d = this.interpolate(d, i);
|
|
3360
3364
|
const m = d.match(/'/g), p = d.match(/"/g);
|
|
3361
3365
|
(((m == null ? void 0 : m.length) ?? 0) % 2 === 0 && !p || p.length % 2 !== 0) && (d = d.replace(/'/g, '"'));
|
|
3362
3366
|
try {
|
|
3363
|
-
i = JSON.parse(d),
|
|
3364
|
-
...
|
|
3367
|
+
i = JSON.parse(d), c && (i = {
|
|
3368
|
+
...c,
|
|
3365
3369
|
...i
|
|
3366
3370
|
});
|
|
3367
3371
|
} catch (v) {
|
|
3368
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${l}`, v), `${l}${
|
|
3372
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${l}`, v), `${l}${u}${d}`;
|
|
3369
3373
|
}
|
|
3370
3374
|
return i.defaultValue && i.defaultValue.indexOf(this.prefix) > -1 && delete i.defaultValue, l;
|
|
3371
3375
|
};
|
|
@@ -3373,14 +3377,14 @@ class Wn {
|
|
|
3373
3377
|
let l = [];
|
|
3374
3378
|
i = {
|
|
3375
3379
|
...n
|
|
3376
|
-
}, i = i.replace && !
|
|
3377
|
-
let
|
|
3380
|
+
}, i = i.replace && !K(i.replace) ? i.replace : i, i.applyPostProcessor = !1, delete i.defaultValue;
|
|
3381
|
+
let c = !1;
|
|
3378
3382
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
3379
|
-
const
|
|
3380
|
-
s[1] =
|
|
3383
|
+
const u = s[1].split(this.formatSeparator).map((f) => f.trim());
|
|
3384
|
+
s[1] = u.shift(), l = u, c = !0;
|
|
3381
3385
|
}
|
|
3382
|
-
if (a = t(o.call(this, s[1].trim(), i), i), a && s[0] === e && !
|
|
3383
|
-
|
|
3386
|
+
if (a = t(o.call(this, s[1].trim(), i), i), a && s[0] === e && !K(a)) return a;
|
|
3387
|
+
K(a) || (a = or(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), c && (a = l.reduce((u, f) => this.format(u, f, n.lng, {
|
|
3384
3388
|
...n,
|
|
3385
3389
|
interpolationkey: s[1].trim()
|
|
3386
3390
|
}), a.trim())), e = e.replace(s[0], a), this.regexp.lastIndex = 0;
|
|
@@ -3397,8 +3401,8 @@ const Bn = (r) => {
|
|
|
3397
3401
|
const s = n[1].substring(0, n[1].length - 1);
|
|
3398
3402
|
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((i) => {
|
|
3399
3403
|
if (i) {
|
|
3400
|
-
const [o, ...l] = i.split(":"),
|
|
3401
|
-
t[
|
|
3404
|
+
const [o, ...l] = i.split(":"), c = l.join(":").trim().replace(/^'+|'+$/g, ""), u = o.trim();
|
|
3405
|
+
t[u] || (t[u] = c), c === "false" && (t[u] = !1), c === "true" && (t[u] = !0), isNaN(c) || (t[u] = parseInt(c, 10));
|
|
3402
3406
|
}
|
|
3403
3407
|
});
|
|
3404
3408
|
}
|
|
@@ -3416,9 +3420,9 @@ const Bn = (r) => {
|
|
|
3416
3420
|
});
|
|
3417
3421
|
const i = n + JSON.stringify(a);
|
|
3418
3422
|
let o = e[i];
|
|
3419
|
-
return o || (o = r(
|
|
3423
|
+
return o || (o = r(We(n), s), e[i] = o), o(t);
|
|
3420
3424
|
};
|
|
3421
|
-
}, Hn = (r) => (e, t, n) => r(
|
|
3425
|
+
}, Hn = (r) => (e, t, n) => r(We(t), n)(e);
|
|
3422
3426
|
class Gn {
|
|
3423
3427
|
constructor(e = {}) {
|
|
3424
3428
|
this.logger = be.create("formatter"), this.options = e, this.init(e);
|
|
@@ -3477,15 +3481,15 @@ class Gn {
|
|
|
3477
3481
|
return a.reduce((o, l) => {
|
|
3478
3482
|
var f;
|
|
3479
3483
|
const {
|
|
3480
|
-
formatName:
|
|
3481
|
-
formatOptions:
|
|
3484
|
+
formatName: c,
|
|
3485
|
+
formatOptions: u
|
|
3482
3486
|
} = Bn(l);
|
|
3483
|
-
if (this.formats[
|
|
3487
|
+
if (this.formats[c]) {
|
|
3484
3488
|
let d = o;
|
|
3485
3489
|
try {
|
|
3486
3490
|
const m = ((f = s == null ? void 0 : s.formatParams) == null ? void 0 : f[s.interpolationkey]) || {}, p = m.locale || m.lng || s.locale || s.lng || n;
|
|
3487
|
-
d = this.formats[
|
|
3488
|
-
...
|
|
3491
|
+
d = this.formats[c](o, p, {
|
|
3492
|
+
...u,
|
|
3489
3493
|
...s,
|
|
3490
3494
|
...m
|
|
3491
3495
|
});
|
|
@@ -3494,7 +3498,7 @@ class Gn {
|
|
|
3494
3498
|
}
|
|
3495
3499
|
return d;
|
|
3496
3500
|
} else
|
|
3497
|
-
this.logger.warn(`there was no format function for ${
|
|
3501
|
+
this.logger.warn(`there was no format function for ${c}`);
|
|
3498
3502
|
return o;
|
|
3499
3503
|
}, e);
|
|
3500
3504
|
}
|
|
@@ -3509,12 +3513,12 @@ class Kn extends mt {
|
|
|
3509
3513
|
}
|
|
3510
3514
|
queueLoad(e, t, n, s) {
|
|
3511
3515
|
const a = {}, i = {}, o = {}, l = {};
|
|
3512
|
-
return e.forEach((
|
|
3513
|
-
let
|
|
3516
|
+
return e.forEach((c) => {
|
|
3517
|
+
let u = !0;
|
|
3514
3518
|
t.forEach((f) => {
|
|
3515
|
-
const d = `${
|
|
3516
|
-
!n.reload && this.store.hasResourceBundle(
|
|
3517
|
-
}),
|
|
3519
|
+
const d = `${c}|${f}`;
|
|
3520
|
+
!n.reload && this.store.hasResourceBundle(c, f) ? this.state[d] = 2 : this.state[d] < 0 || (this.state[d] === 1 ? i[d] === void 0 && (i[d] = !0) : (this.state[d] = 1, u = !1, i[d] === void 0 && (i[d] = !0), a[d] === void 0 && (a[d] = !0), l[f] === void 0 && (l[f] = !0)));
|
|
3521
|
+
}), u || (o[c] = !0);
|
|
3518
3522
|
}), (Object.keys(a).length || Object.keys(i).length) && this.queue.push({
|
|
3519
3523
|
pending: i,
|
|
3520
3524
|
pendingCount: Object.keys(i).length,
|
|
@@ -3535,11 +3539,11 @@ class Kn extends mt {
|
|
|
3535
3539
|
}), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
3536
3540
|
const o = {};
|
|
3537
3541
|
this.queue.forEach((l) => {
|
|
3538
|
-
An(l.loaded, [a], i), zn(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((
|
|
3539
|
-
o[
|
|
3540
|
-
const
|
|
3541
|
-
|
|
3542
|
-
o[
|
|
3542
|
+
An(l.loaded, [a], i), zn(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((c) => {
|
|
3543
|
+
o[c] || (o[c] = {});
|
|
3544
|
+
const u = l.loaded[c];
|
|
3545
|
+
u.length && u.forEach((f) => {
|
|
3546
|
+
o[c][f] === void 0 && (o[c][f] = !0);
|
|
3543
3547
|
});
|
|
3544
3548
|
}), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
|
|
3545
3549
|
}), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done);
|
|
@@ -3558,25 +3562,25 @@ class Kn extends mt {
|
|
|
3558
3562
|
return;
|
|
3559
3563
|
}
|
|
3560
3564
|
this.readingCalls++;
|
|
3561
|
-
const o = (
|
|
3565
|
+
const o = (c, u) => {
|
|
3562
3566
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
3563
3567
|
const f = this.waitingReads.shift();
|
|
3564
3568
|
this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
|
|
3565
3569
|
}
|
|
3566
|
-
if (
|
|
3570
|
+
if (c && u && s < this.maxRetries) {
|
|
3567
3571
|
setTimeout(() => {
|
|
3568
3572
|
this.read.call(this, e, t, n, s + 1, a * 2, i);
|
|
3569
3573
|
}, a);
|
|
3570
3574
|
return;
|
|
3571
3575
|
}
|
|
3572
|
-
i(
|
|
3576
|
+
i(c, u);
|
|
3573
3577
|
}, l = this.backend[n].bind(this.backend);
|
|
3574
3578
|
if (l.length === 2) {
|
|
3575
3579
|
try {
|
|
3576
|
-
const
|
|
3577
|
-
|
|
3578
|
-
} catch (
|
|
3579
|
-
o(
|
|
3580
|
+
const c = l(e, t);
|
|
3581
|
+
c && typeof c.then == "function" ? c.then((u) => o(null, u)).catch(o) : o(null, c);
|
|
3582
|
+
} catch (c) {
|
|
3583
|
+
o(c);
|
|
3580
3584
|
}
|
|
3581
3585
|
return;
|
|
3582
3586
|
}
|
|
@@ -3585,7 +3589,7 @@ class Kn extends mt {
|
|
|
3585
3589
|
prepareLoading(e, t, n = {}, s) {
|
|
3586
3590
|
if (!this.backend)
|
|
3587
3591
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
3588
|
-
|
|
3592
|
+
K(e) && (e = this.languageUtils.toResolveHierarchy(e)), K(t) && (t = [t]);
|
|
3589
3593
|
const a = this.queueLoad(e, t, n, s);
|
|
3590
3594
|
if (!a.toLoad.length)
|
|
3591
3595
|
return a.pending.length || s(), null;
|
|
@@ -3609,8 +3613,8 @@ class Kn extends mt {
|
|
|
3609
3613
|
}
|
|
3610
3614
|
saveMissing(e, t, n, s, a, i = {}, o = () => {
|
|
3611
3615
|
}) {
|
|
3612
|
-
var l,
|
|
3613
|
-
if ((
|
|
3616
|
+
var l, c, u, f, d;
|
|
3617
|
+
if ((c = (l = this.services) == null ? void 0 : l.utils) != null && c.hasLoadedNamespace && !((f = (u = this.services) == null ? void 0 : u.utils) != null && f.hasLoadedNamespace(t))) {
|
|
3614
3618
|
this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
|
|
3615
3619
|
return;
|
|
3616
3620
|
}
|
|
@@ -3669,7 +3673,7 @@ const xr = () => ({
|
|
|
3669
3673
|
appendNamespaceToCIMode: !1,
|
|
3670
3674
|
overloadTranslationOptionHandler: (r) => {
|
|
3671
3675
|
let e = {};
|
|
3672
|
-
if (typeof r[1] == "object" && (e = r[1]),
|
|
3676
|
+
if (typeof r[1] == "object" && (e = r[1]), K(r[1]) && (e.defaultValue = r[1]), K(r[2]) && (e.tDescription = r[2]), typeof r[2] == "object" || typeof r[3] == "object") {
|
|
3673
3677
|
const t = r[3] || r[2];
|
|
3674
3678
|
Object.keys(t).forEach((n) => {
|
|
3675
3679
|
e[n] = t[n];
|
|
@@ -3693,14 +3697,14 @@ const xr = () => ({
|
|
|
3693
3697
|
cacheInBuiltFormats: !0
|
|
3694
3698
|
}), br = (r) => {
|
|
3695
3699
|
var e, t;
|
|
3696
|
-
return
|
|
3700
|
+
return K(r.ns) && (r.ns = [r.ns]), K(r.fallbackLng) && (r.fallbackLng = [r.fallbackLng]), K(r.fallbackNS) && (r.fallbackNS = [r.fallbackNS]), ((t = (e = r.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (r.supportedLngs = r.supportedLngs.concat(["cimode"])), typeof r.initImmediate == "boolean" && (r.initAsync = r.initImmediate), r;
|
|
3697
3701
|
}, Qe = () => {
|
|
3698
3702
|
}, qn = (r) => {
|
|
3699
3703
|
Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((t) => {
|
|
3700
3704
|
typeof r[t] == "function" && (r[t] = r[t].bind(r));
|
|
3701
3705
|
});
|
|
3702
3706
|
};
|
|
3703
|
-
class
|
|
3707
|
+
class Ue extends mt {
|
|
3704
3708
|
constructor(e = {}, t) {
|
|
3705
3709
|
if (super(), this.options = br(e), this.services = {}, this.logger = be, this.modules = {
|
|
3706
3710
|
external: []
|
|
@@ -3713,7 +3717,7 @@ class We extends mt {
|
|
|
3713
3717
|
}
|
|
3714
3718
|
}
|
|
3715
3719
|
init(e = {}, t) {
|
|
3716
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
3720
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (K(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
3717
3721
|
const n = xr();
|
|
3718
3722
|
this.options = {
|
|
3719
3723
|
...n,
|
|
@@ -3723,18 +3727,18 @@ class We extends mt {
|
|
|
3723
3727
|
...n.interpolation,
|
|
3724
3728
|
...this.options.interpolation
|
|
3725
3729
|
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator);
|
|
3726
|
-
const s = (
|
|
3730
|
+
const s = (c) => c ? typeof c == "function" ? new c() : c : null;
|
|
3727
3731
|
if (!this.options.isClone) {
|
|
3728
3732
|
this.modules.logger ? be.init(s(this.modules.logger), this.options) : be.init(null, this.options);
|
|
3729
|
-
let
|
|
3730
|
-
this.modules.formatter ?
|
|
3731
|
-
const
|
|
3733
|
+
let c;
|
|
3734
|
+
this.modules.formatter ? c = this.modules.formatter : c = Gn;
|
|
3735
|
+
const u = new hr(this.options);
|
|
3732
3736
|
this.store = new fr(this.options.resources, this.options);
|
|
3733
3737
|
const f = this.services;
|
|
3734
|
-
f.logger = be, f.resourceStore = this.store, f.languageUtils =
|
|
3738
|
+
f.logger = be, f.resourceStore = this.store, f.languageUtils = u, f.pluralResolver = new Wn(u, {
|
|
3735
3739
|
prepend: this.options.pluralSeparator,
|
|
3736
3740
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
3737
|
-
}),
|
|
3741
|
+
}), c && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (f.formatter = s(c), f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new Un(this.options), f.utils = {
|
|
3738
3742
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
3739
3743
|
}, f.backendConnector = new Kn(s(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", (d, ...m) => {
|
|
3740
3744
|
this.emit(d, ...m);
|
|
@@ -3745,43 +3749,43 @@ class We extends mt {
|
|
|
3745
3749
|
});
|
|
3746
3750
|
}
|
|
3747
3751
|
if (this.format = this.options.interpolation.format, t || (t = Qe), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
3748
|
-
const
|
|
3749
|
-
|
|
3752
|
+
const c = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
3753
|
+
c.length > 0 && c[0] !== "dev" && (this.options.lng = c[0]);
|
|
3750
3754
|
}
|
|
3751
|
-
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((
|
|
3752
|
-
this[
|
|
3753
|
-
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((
|
|
3754
|
-
this[
|
|
3755
|
+
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((c) => {
|
|
3756
|
+
this[c] = (...u) => this.store[c](...u);
|
|
3757
|
+
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => {
|
|
3758
|
+
this[c] = (...u) => (this.store[c](...u), this);
|
|
3755
3759
|
});
|
|
3756
|
-
const o =
|
|
3757
|
-
const
|
|
3758
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), o.resolve(f), t(
|
|
3760
|
+
const o = Me(), l = () => {
|
|
3761
|
+
const c = (u, f) => {
|
|
3762
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), o.resolve(f), t(u, f);
|
|
3759
3763
|
};
|
|
3760
|
-
if (this.languages && !this.isInitialized) return
|
|
3761
|
-
this.changeLanguage(this.options.lng,
|
|
3764
|
+
if (this.languages && !this.isInitialized) return c(null, this.t.bind(this));
|
|
3765
|
+
this.changeLanguage(this.options.lng, c);
|
|
3762
3766
|
};
|
|
3763
3767
|
return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), o;
|
|
3764
3768
|
}
|
|
3765
3769
|
loadResources(e, t = Qe) {
|
|
3766
3770
|
var a, i;
|
|
3767
3771
|
let n = t;
|
|
3768
|
-
const s =
|
|
3772
|
+
const s = K(e) ? e : this.language;
|
|
3769
3773
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
3770
3774
|
if ((s == null ? void 0 : s.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
3771
|
-
const o = [], l = (
|
|
3772
|
-
if (!
|
|
3773
|
-
this.services.languageUtils.toResolveHierarchy(
|
|
3775
|
+
const o = [], l = (c) => {
|
|
3776
|
+
if (!c || c === "cimode") return;
|
|
3777
|
+
this.services.languageUtils.toResolveHierarchy(c).forEach((f) => {
|
|
3774
3778
|
f !== "cimode" && o.indexOf(f) < 0 && o.push(f);
|
|
3775
3779
|
});
|
|
3776
3780
|
};
|
|
3777
|
-
s ? l(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((
|
|
3778
|
-
!
|
|
3781
|
+
s ? l(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((u) => l(u)), (i = (a = this.options.preload) == null ? void 0 : a.forEach) == null || i.call(a, (c) => l(c)), this.services.backendConnector.load(o, this.options.ns, (c) => {
|
|
3782
|
+
!c && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(c);
|
|
3779
3783
|
});
|
|
3780
3784
|
} else
|
|
3781
3785
|
n(null);
|
|
3782
3786
|
}
|
|
3783
3787
|
reloadResources(e, t, n) {
|
|
3784
|
-
const s =
|
|
3788
|
+
const s = Me();
|
|
3785
3789
|
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), n || (n = Qe), this.services.backendConnector.reload(e, t, (a) => {
|
|
3786
3790
|
s.resolve(), n(a);
|
|
3787
3791
|
}), s;
|
|
@@ -3805,18 +3809,18 @@ class We extends mt {
|
|
|
3805
3809
|
}
|
|
3806
3810
|
changeLanguage(e, t) {
|
|
3807
3811
|
this.isLanguageChangingTo = e;
|
|
3808
|
-
const n =
|
|
3812
|
+
const n = Me();
|
|
3809
3813
|
this.emit("languageChanging", e);
|
|
3810
3814
|
const s = (o) => {
|
|
3811
3815
|
this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
|
|
3812
3816
|
}, a = (o, l) => {
|
|
3813
|
-
l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0, n.resolve((...
|
|
3817
|
+
l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0, n.resolve((...c) => this.t(...c)), t && t(o, (...c) => this.t(...c));
|
|
3814
3818
|
}, i = (o) => {
|
|
3815
|
-
var
|
|
3819
|
+
var u, f;
|
|
3816
3820
|
!e && !o && this.services.languageDetector && (o = []);
|
|
3817
|
-
const l =
|
|
3818
|
-
|
|
3819
|
-
a(d,
|
|
3821
|
+
const l = K(o) ? o : o && o[0], c = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(K(o) ? [o] : o);
|
|
3822
|
+
c && (this.language || s(c), this.translator.language || this.translator.changeLanguage(c), (f = (u = this.services.languageDetector) == null ? void 0 : u.cacheUserLanguage) == null || f.call(u, c)), this.loadResources(c, (d) => {
|
|
3823
|
+
a(d, c);
|
|
3820
3824
|
});
|
|
3821
3825
|
};
|
|
3822
3826
|
return !e && this.services.languageDetector && !this.services.languageDetector.async ? i(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(i) : this.services.languageDetector.detect(i) : i(e), n;
|
|
@@ -3827,11 +3831,11 @@ class We extends mt {
|
|
|
3827
3831
|
typeof i != "object" ? l = this.options.overloadTranslationOptionHandler([a, i].concat(o)) : l = {
|
|
3828
3832
|
...i
|
|
3829
3833
|
}, l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || n || s.keyPrefix);
|
|
3830
|
-
const
|
|
3831
|
-
let
|
|
3832
|
-
return l.keyPrefix && Array.isArray(a) ?
|
|
3834
|
+
const c = this.options.keySeparator || ".";
|
|
3835
|
+
let u;
|
|
3836
|
+
return l.keyPrefix && Array.isArray(a) ? u = a.map((f) => `${l.keyPrefix}${c}${f}`) : u = l.keyPrefix ? `${l.keyPrefix}${c}${a}` : a, this.t(u, l);
|
|
3833
3837
|
};
|
|
3834
|
-
return
|
|
3838
|
+
return K(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = n, s;
|
|
3835
3839
|
}
|
|
3836
3840
|
t(...e) {
|
|
3837
3841
|
var t;
|
|
@@ -3852,8 +3856,8 @@ class We extends mt {
|
|
|
3852
3856
|
const n = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
|
|
3853
3857
|
if (n.toLowerCase() === "cimode") return !0;
|
|
3854
3858
|
const i = (o, l) => {
|
|
3855
|
-
const
|
|
3856
|
-
return
|
|
3859
|
+
const c = this.services.backendConnector.state[`${o}|${l}`];
|
|
3860
|
+
return c === -1 || c === 0 || c === 2;
|
|
3857
3861
|
};
|
|
3858
3862
|
if (t.precheck) {
|
|
3859
3863
|
const o = t.precheck(this, i);
|
|
@@ -3862,16 +3866,16 @@ class We extends mt {
|
|
|
3862
3866
|
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || i(n, e) && (!s || i(a, e)));
|
|
3863
3867
|
}
|
|
3864
3868
|
loadNamespaces(e, t) {
|
|
3865
|
-
const n =
|
|
3866
|
-
return this.options.ns ? (
|
|
3869
|
+
const n = Me();
|
|
3870
|
+
return this.options.ns ? (K(e) && (e = [e]), e.forEach((s) => {
|
|
3867
3871
|
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
3868
3872
|
}), this.loadResources((s) => {
|
|
3869
3873
|
n.resolve(), t && t(s);
|
|
3870
3874
|
}), n) : (t && t(), Promise.resolve());
|
|
3871
3875
|
}
|
|
3872
3876
|
loadLanguages(e, t) {
|
|
3873
|
-
const n =
|
|
3874
|
-
|
|
3877
|
+
const n = Me();
|
|
3878
|
+
K(e) && (e = [e]);
|
|
3875
3879
|
const s = this.options.preload || [], a = e.filter((i) => s.indexOf(i) < 0 && this.services.languageUtils.isSupportedCode(i));
|
|
3876
3880
|
return a.length ? (this.options.preload = s.concat(a), this.loadResources((i) => {
|
|
3877
3881
|
n.resolve(), t && t(i);
|
|
@@ -3884,7 +3888,7 @@ class We extends mt {
|
|
|
3884
3888
|
return t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
3885
3889
|
}
|
|
3886
3890
|
static createInstance(e = {}, t) {
|
|
3887
|
-
return new
|
|
3891
|
+
return new Ue(e, t);
|
|
3888
3892
|
}
|
|
3889
3893
|
cloneInstance(e = {}, t = Qe) {
|
|
3890
3894
|
const n = e.forkResourceStore;
|
|
@@ -3893,7 +3897,7 @@ class We extends mt {
|
|
|
3893
3897
|
...this.options,
|
|
3894
3898
|
...e,
|
|
3895
3899
|
isClone: !0
|
|
3896
|
-
}, a = new
|
|
3900
|
+
}, a = new Ue(s);
|
|
3897
3901
|
if ((e.debug !== void 0 || e.prefix !== void 0) && (a.logger = a.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
|
|
3898
3902
|
a[o] = this[o];
|
|
3899
3903
|
}), a.services = {
|
|
@@ -3901,11 +3905,11 @@ class We extends mt {
|
|
|
3901
3905
|
}, a.services.utils = {
|
|
3902
3906
|
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
3903
3907
|
}, n) {
|
|
3904
|
-
const o = Object.keys(this.store.data).reduce((l,
|
|
3905
|
-
...this.store.data[
|
|
3906
|
-
}, l[
|
|
3907
|
-
...l[
|
|
3908
|
-
},
|
|
3908
|
+
const o = Object.keys(this.store.data).reduce((l, c) => (l[c] = {
|
|
3909
|
+
...this.store.data[c]
|
|
3910
|
+
}, l[c] = Object.keys(l[c]).reduce((u, f) => (u[f] = {
|
|
3911
|
+
...l[c][f]
|
|
3912
|
+
}, u), l[c]), l), {});
|
|
3909
3913
|
a.store = new fr(o, s), a.services.resourceStore = a.store;
|
|
3910
3914
|
}
|
|
3911
3915
|
return a.translator = new ut(a.services, s), a.translator.on("*", (o, ...l) => {
|
|
@@ -3924,8 +3928,8 @@ class We extends mt {
|
|
|
3924
3928
|
};
|
|
3925
3929
|
}
|
|
3926
3930
|
}
|
|
3927
|
-
const ie =
|
|
3928
|
-
ie.createInstance =
|
|
3931
|
+
const ie = Ue.createInstance();
|
|
3932
|
+
ie.createInstance = Ue.createInstance;
|
|
3929
3933
|
ie.createInstance;
|
|
3930
3934
|
ie.dir;
|
|
3931
3935
|
ie.init;
|
|
@@ -3987,8 +3991,8 @@ const ls = (r, e, t) => {
|
|
|
3987
3991
|
if (a && i)
|
|
3988
3992
|
s = n.lastIndexOf(".") > n.lastIndexOf(",") ? "." : ",";
|
|
3989
3993
|
else if (!n.includes(t)) {
|
|
3990
|
-
const l = n.includes(".") ? "." : ",",
|
|
3991
|
-
|
|
3994
|
+
const l = n.includes(".") ? "." : ",", c = l === "." ? a : i;
|
|
3995
|
+
c > 1 || c === 1 && l === e && n.length - n.lastIndexOf(l) - 1 === 3 || (s = l);
|
|
3992
3996
|
}
|
|
3993
3997
|
const o = s === "." ? "," : ".";
|
|
3994
3998
|
return n = n.replace(new RegExp(`\\${o}`, "g"), ""), s !== "." && (n = n.replace(new RegExp(`\\${s}`, "g"), ".")), parseFloat(n);
|
|
@@ -4052,7 +4056,7 @@ ie.init({
|
|
|
4052
4056
|
}
|
|
4053
4057
|
});
|
|
4054
4058
|
const ds = (r, e, t, n) => ie.format(r, e, t || ie.language, n), ps = (r, e) => ie.t(r, e);
|
|
4055
|
-
function
|
|
4059
|
+
function Le() {
|
|
4056
4060
|
const r = le(
|
|
4057
4061
|
(n, s, a, i) => ds(n, s, a || void 0, i),
|
|
4058
4062
|
[]
|
|
@@ -4073,17 +4077,17 @@ function ms({
|
|
|
4073
4077
|
initialValue: n,
|
|
4074
4078
|
targetRef: s
|
|
4075
4079
|
}) {
|
|
4076
|
-
const { translate: a } =
|
|
4080
|
+
const { translate: a } = Le(), i = () => {
|
|
4077
4081
|
if (!n) return;
|
|
4078
4082
|
const M = new Date(n);
|
|
4079
4083
|
return isNaN(M.getTime()) ? void 0 : M;
|
|
4080
|
-
}, [o] =
|
|
4084
|
+
}, [o] = q(/* @__PURE__ */ new Date()), [l, c] = q(
|
|
4081
4085
|
r || i() || /* @__PURE__ */ new Date()
|
|
4082
|
-
), [
|
|
4086
|
+
), [u, f] = q(
|
|
4083
4087
|
l ? l.getMonth() : (/* @__PURE__ */ new Date()).getMonth()
|
|
4084
|
-
), [d, m] =
|
|
4088
|
+
), [d, m] = q(
|
|
4085
4089
|
l ? l.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear()
|
|
4086
|
-
), [p, v] =
|
|
4090
|
+
), [p, v] = q(
|
|
4087
4091
|
l ? l.getDate() : null
|
|
4088
4092
|
), E = ce(null), T = ce([]), b = [
|
|
4089
4093
|
a(pe.JANUARY),
|
|
@@ -4128,37 +4132,37 @@ function ms({
|
|
|
4128
4132
|
full: a(ue.SATURDAY)
|
|
4129
4133
|
}
|
|
4130
4134
|
], S = (M) => t.some((h) => {
|
|
4131
|
-
const x = h.start.getTime(), R = h.end.getTime(),
|
|
4132
|
-
return
|
|
4135
|
+
const x = h.start.getTime(), R = h.end.getTime(), $ = M.getTime();
|
|
4136
|
+
return $ >= x && $ <= R;
|
|
4133
4137
|
}), g = (M) => {
|
|
4134
|
-
S(M) || (
|
|
4138
|
+
S(M) || (c(M), v(M.getDate()), e && e(en(M)));
|
|
4135
4139
|
}, D = () => {
|
|
4136
|
-
|
|
4140
|
+
u === 0 ? (f(11), m(d - 1)) : f(u - 1), v(1);
|
|
4137
4141
|
}, k = () => {
|
|
4138
|
-
|
|
4139
|
-
}, w = (M, h) => new Date(M, h + 1, 0).getDate(), O = (M, h) => new Date(M, h, 1).getDay(),
|
|
4142
|
+
u === 11 ? (f(0), m(d + 1)) : f(u + 1), v(1);
|
|
4143
|
+
}, w = (M, h) => new Date(M, h + 1, 0).getDate(), O = (M, h) => new Date(M, h, 1).getDay(), C = (M) => {
|
|
4140
4144
|
var x;
|
|
4141
|
-
const h =
|
|
4145
|
+
const h = W.findIndex(
|
|
4142
4146
|
(R) => R !== null && R.getDate() === M
|
|
4143
4147
|
);
|
|
4144
4148
|
h !== -1 && T.current[h] && ((x = T.current[h]) == null || x.focus(), v(M));
|
|
4145
4149
|
}, F = (M, h) => {
|
|
4146
|
-
const x =
|
|
4150
|
+
const x = W[h];
|
|
4147
4151
|
if (!x) return;
|
|
4148
|
-
const R = w(d,
|
|
4152
|
+
const R = w(d, u), $ = x.getDate();
|
|
4149
4153
|
switch (M.key) {
|
|
4150
4154
|
case "ArrowRight":
|
|
4151
4155
|
M.preventDefault();
|
|
4152
4156
|
{
|
|
4153
|
-
let _ =
|
|
4157
|
+
let _ = $ + 1, N = new Date(d, u, _);
|
|
4154
4158
|
if (_ > R) {
|
|
4155
|
-
const
|
|
4156
|
-
_ = 1,
|
|
4159
|
+
const Y = u === 11 ? d + 1 : d, U = u === 11 ? 0 : u + 1;
|
|
4160
|
+
_ = 1, N = new Date(Y, U, _), k(), setTimeout(() => {
|
|
4157
4161
|
P(1, "forward");
|
|
4158
4162
|
}, 0);
|
|
4159
4163
|
return;
|
|
4160
4164
|
}
|
|
4161
|
-
S(
|
|
4165
|
+
S(N) ? P(_, "forward") : C(_);
|
|
4162
4166
|
}
|
|
4163
4167
|
break;
|
|
4164
4168
|
case "Tab":
|
|
@@ -4166,43 +4170,43 @@ function ms({
|
|
|
4166
4170
|
case "ArrowLeft":
|
|
4167
4171
|
M.preventDefault();
|
|
4168
4172
|
{
|
|
4169
|
-
let _ =
|
|
4173
|
+
let _ = $ - 1, N = new Date(d, u, _);
|
|
4170
4174
|
if (_ < 1) {
|
|
4171
|
-
const
|
|
4172
|
-
_ = V,
|
|
4175
|
+
const Y = u === 0 ? d - 1 : d, U = u === 0 ? 11 : u - 1, V = w(Y, U);
|
|
4176
|
+
_ = V, N = new Date(Y, U, _), D(), setTimeout(() => {
|
|
4173
4177
|
P(V, "backward");
|
|
4174
4178
|
}, 0);
|
|
4175
4179
|
return;
|
|
4176
4180
|
}
|
|
4177
|
-
S(
|
|
4181
|
+
S(N) ? P(_, "backward") : C(_);
|
|
4178
4182
|
}
|
|
4179
4183
|
break;
|
|
4180
4184
|
case "ArrowUp":
|
|
4181
4185
|
M.preventDefault();
|
|
4182
4186
|
{
|
|
4183
|
-
let _ =
|
|
4187
|
+
let _ = $ - 7, N = new Date(d, u, _);
|
|
4184
4188
|
if (_ < 1) {
|
|
4185
|
-
const
|
|
4186
|
-
_ = w(
|
|
4189
|
+
const Y = u === 0 ? d - 1 : d, U = u === 0 ? 11 : u - 1;
|
|
4190
|
+
_ = w(Y, U) + _, N = new Date(Y, U, _), D(), setTimeout(() => {
|
|
4187
4191
|
P(_, "backward");
|
|
4188
4192
|
}, 0);
|
|
4189
4193
|
return;
|
|
4190
4194
|
}
|
|
4191
|
-
S(
|
|
4195
|
+
S(N) ? P(_, "backward") : C(_);
|
|
4192
4196
|
}
|
|
4193
4197
|
break;
|
|
4194
4198
|
case "ArrowDown":
|
|
4195
4199
|
M.preventDefault();
|
|
4196
4200
|
{
|
|
4197
|
-
let _ =
|
|
4201
|
+
let _ = $ + 7, N = new Date(d, u, _);
|
|
4198
4202
|
if (_ > R) {
|
|
4199
|
-
const
|
|
4200
|
-
_ = _ - R,
|
|
4203
|
+
const Y = u === 11 ? d + 1 : d, U = u === 11 ? 0 : u + 1;
|
|
4204
|
+
_ = _ - R, N = new Date(Y, U, _), k(), setTimeout(() => {
|
|
4201
4205
|
P(_, "forward");
|
|
4202
4206
|
}, 0);
|
|
4203
4207
|
return;
|
|
4204
4208
|
}
|
|
4205
|
-
S(
|
|
4209
|
+
S(N) ? P(_, "forward") : C(_);
|
|
4206
4210
|
}
|
|
4207
4211
|
break;
|
|
4208
4212
|
case "Home":
|
|
@@ -4214,37 +4218,37 @@ function ms({
|
|
|
4214
4218
|
case "PageUp":
|
|
4215
4219
|
M.preventDefault(), D(), setTimeout(() => {
|
|
4216
4220
|
const _ = w(
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
),
|
|
4220
|
-
P(
|
|
4221
|
+
u === 0 ? d - 1 : d,
|
|
4222
|
+
u === 0 ? 11 : u - 1
|
|
4223
|
+
), N = Math.min($, _);
|
|
4224
|
+
P(N, "forward");
|
|
4221
4225
|
}, 0);
|
|
4222
4226
|
break;
|
|
4223
4227
|
case "PageDown":
|
|
4224
4228
|
M.preventDefault(), k(), setTimeout(() => {
|
|
4225
4229
|
const _ = w(
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
),
|
|
4229
|
-
P(
|
|
4230
|
+
u === 11 ? d + 1 : d,
|
|
4231
|
+
u === 11 ? 0 : u + 1
|
|
4232
|
+
), N = Math.min($, _);
|
|
4233
|
+
P(N, "forward");
|
|
4230
4234
|
}, 0);
|
|
4231
4235
|
break;
|
|
4232
4236
|
case " ":
|
|
4233
4237
|
case "Space":
|
|
4234
4238
|
if (S(x)) return;
|
|
4235
|
-
v(x.getDate()),
|
|
4239
|
+
v(x.getDate()), c(x);
|
|
4236
4240
|
break;
|
|
4237
4241
|
case "Enter":
|
|
4238
4242
|
M.preventDefault(), g(x);
|
|
4239
4243
|
break;
|
|
4240
4244
|
}
|
|
4241
4245
|
}, P = (M, h) => {
|
|
4242
|
-
const x = w(d,
|
|
4246
|
+
const x = w(d, u);
|
|
4243
4247
|
if (h === "forward") {
|
|
4244
4248
|
for (let R = M; R <= x; R++) {
|
|
4245
|
-
const
|
|
4246
|
-
if (!S(
|
|
4247
|
-
|
|
4249
|
+
const $ = new Date(d, u, R);
|
|
4250
|
+
if (!S($)) {
|
|
4251
|
+
C(R);
|
|
4248
4252
|
return;
|
|
4249
4253
|
}
|
|
4250
4254
|
}
|
|
@@ -4252,45 +4256,45 @@ function ms({
|
|
|
4252
4256
|
P(1, "forward");
|
|
4253
4257
|
}, 0);
|
|
4254
4258
|
} else {
|
|
4255
|
-
for (let
|
|
4256
|
-
const
|
|
4257
|
-
if (!S(
|
|
4258
|
-
|
|
4259
|
+
for (let N = M; N >= 1; N--) {
|
|
4260
|
+
const Y = new Date(d, u, N);
|
|
4261
|
+
if (!S(Y)) {
|
|
4262
|
+
C(N);
|
|
4259
4263
|
return;
|
|
4260
4264
|
}
|
|
4261
4265
|
}
|
|
4262
|
-
const R =
|
|
4266
|
+
const R = u === 0 ? d - 1 : d, $ = u === 0 ? 11 : u - 1, _ = w(R, $);
|
|
4263
4267
|
D(), setTimeout(() => {
|
|
4264
4268
|
P(_, "backward");
|
|
4265
4269
|
}, 0);
|
|
4266
4270
|
}
|
|
4267
|
-
},
|
|
4268
|
-
const M = w(d,
|
|
4271
|
+
}, W = (() => {
|
|
4272
|
+
const M = w(d, u), h = O(d, u), x = [];
|
|
4269
4273
|
for (let R = 0; R < h; R++)
|
|
4270
4274
|
x.push(null);
|
|
4271
4275
|
for (let R = 1; R <= M; R++) {
|
|
4272
|
-
const
|
|
4273
|
-
x.push(
|
|
4276
|
+
const $ = new Date(d, u, R);
|
|
4277
|
+
x.push($);
|
|
4274
4278
|
}
|
|
4275
4279
|
return x;
|
|
4276
|
-
})(),
|
|
4280
|
+
})(), L = [];
|
|
4277
4281
|
let H = [];
|
|
4278
|
-
|
|
4279
|
-
if (H.push(M), H.length === 7 || h ===
|
|
4282
|
+
W.forEach((M, h) => {
|
|
4283
|
+
if (H.push(M), H.length === 7 || h === W.length - 1) {
|
|
4280
4284
|
for (; H.length < 7; )
|
|
4281
4285
|
H.push(null);
|
|
4282
|
-
|
|
4286
|
+
L.push(H), H = [];
|
|
4283
4287
|
}
|
|
4284
4288
|
}), ne(() => {
|
|
4285
4289
|
var M;
|
|
4286
4290
|
if (p !== null) {
|
|
4287
|
-
const h =
|
|
4291
|
+
const h = W.findIndex(
|
|
4288
4292
|
(x) => x !== null && x.getDate() === p
|
|
4289
4293
|
);
|
|
4290
4294
|
h !== -1 && T.current[h] && ((M = T.current[h]) == null || M.focus());
|
|
4291
4295
|
}
|
|
4292
|
-
}, [
|
|
4293
|
-
const
|
|
4296
|
+
}, [u, d, p, W]);
|
|
4297
|
+
const G = {
|
|
4294
4298
|
label: "smp-datepickercalendar-label",
|
|
4295
4299
|
wrapper: `smp-datepickercalendar ${hs["smp-datepickercalendar-position"]}`,
|
|
4296
4300
|
calendar: "smp-datepickercalendar",
|
|
@@ -4301,11 +4305,11 @@ function ms({
|
|
|
4301
4305
|
${h ? "smp-datepickercalendar-td-selected" : ""}
|
|
4302
4306
|
${x ? "smp-datepickercalendar-td-focused" : ""}
|
|
4303
4307
|
${R ? "smp-datepickercalendar-td-disabled" : ""}`
|
|
4304
|
-
}, X = () => `${b[
|
|
4308
|
+
}, X = () => `${b[u]} ${d.toString()}`;
|
|
4305
4309
|
return /* @__PURE__ */ y.jsxs(
|
|
4306
4310
|
"div",
|
|
4307
4311
|
{
|
|
4308
|
-
className:
|
|
4312
|
+
className: G.wrapper,
|
|
4309
4313
|
ref: s,
|
|
4310
4314
|
role: "dialog",
|
|
4311
4315
|
tabIndex: -1,
|
|
@@ -4337,7 +4341,7 @@ function ms({
|
|
|
4337
4341
|
"div",
|
|
4338
4342
|
{
|
|
4339
4343
|
"aria-label": X(),
|
|
4340
|
-
className:
|
|
4344
|
+
className: G.label,
|
|
4341
4345
|
children: X()
|
|
4342
4346
|
}
|
|
4343
4347
|
),
|
|
@@ -4360,26 +4364,26 @@ function ms({
|
|
|
4360
4364
|
{
|
|
4361
4365
|
ref: E,
|
|
4362
4366
|
role: "grid",
|
|
4363
|
-
"aria-label": `${a(gt.CALENDAR_FOR)} ${b[
|
|
4364
|
-
className:
|
|
4367
|
+
"aria-label": `${a(gt.CALENDAR_FOR)} ${b[u]} ${d}`,
|
|
4368
|
+
className: G.table,
|
|
4365
4369
|
children: [
|
|
4366
4370
|
/* @__PURE__ */ y.jsx("thead", { children: /* @__PURE__ */ y.jsx("tr", { children: j.map((M) => /* @__PURE__ */ y.jsx(
|
|
4367
4371
|
"th",
|
|
4368
4372
|
{
|
|
4369
4373
|
scope: "col",
|
|
4370
4374
|
abbr: M.full,
|
|
4371
|
-
className:
|
|
4375
|
+
className: G.th,
|
|
4372
4376
|
children: M.value
|
|
4373
4377
|
},
|
|
4374
4378
|
M.value
|
|
4375
4379
|
)) }) }),
|
|
4376
|
-
/* @__PURE__ */ y.jsx("tbody", { children:
|
|
4377
|
-
const
|
|
4380
|
+
/* @__PURE__ */ y.jsx("tbody", { children: L.map((M, h) => /* @__PURE__ */ y.jsx("tr", { children: M.map((x, R) => {
|
|
4381
|
+
const $ = h * 7 + R;
|
|
4378
4382
|
if (x === null)
|
|
4379
4383
|
return /* @__PURE__ */ y.jsx(
|
|
4380
4384
|
"td",
|
|
4381
4385
|
{
|
|
4382
|
-
className:
|
|
4386
|
+
className: G.td(
|
|
4383
4387
|
!1,
|
|
4384
4388
|
!1,
|
|
4385
4389
|
!1,
|
|
@@ -4388,26 +4392,26 @@ function ms({
|
|
|
4388
4392
|
},
|
|
4389
4393
|
`empty-${R}`
|
|
4390
4394
|
);
|
|
4391
|
-
const _ = x.getDate() === o.getDate() && x.getMonth() === o.getMonth() && x.getFullYear() === o.getFullYear(),
|
|
4395
|
+
const _ = x.getDate() === o.getDate() && x.getMonth() === o.getMonth() && x.getFullYear() === o.getFullYear(), N = l && x.getDate() === l.getDate() && x.getMonth() === l.getMonth() && x.getFullYear() === l.getFullYear(), Y = p === x.getDate(), U = S(x);
|
|
4392
4396
|
return /* @__PURE__ */ y.jsx(
|
|
4393
4397
|
"td",
|
|
4394
4398
|
{
|
|
4395
4399
|
role: "gridcell",
|
|
4396
|
-
"aria-selected":
|
|
4397
|
-
tabIndex:
|
|
4400
|
+
"aria-selected": N,
|
|
4401
|
+
tabIndex: Y ? 0 : -1,
|
|
4398
4402
|
onClick: () => g(x),
|
|
4399
|
-
onKeyDown: (V) => F(V,
|
|
4403
|
+
onKeyDown: (V) => F(V, $),
|
|
4400
4404
|
"aria-label": `${x.getDate()} ${b[x.getMonth()]} ${x.getFullYear()}`,
|
|
4401
|
-
"data-selected":
|
|
4402
|
-
"aria-disabled":
|
|
4405
|
+
"data-selected": N,
|
|
4406
|
+
"aria-disabled": U,
|
|
4403
4407
|
ref: (V) => {
|
|
4404
|
-
T.current[
|
|
4408
|
+
T.current[$] = V;
|
|
4405
4409
|
},
|
|
4406
|
-
className:
|
|
4410
|
+
className: G.td(
|
|
4407
4411
|
_,
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4412
|
+
N,
|
|
4413
|
+
Y,
|
|
4414
|
+
U
|
|
4411
4415
|
),
|
|
4412
4416
|
children: x.getDate()
|
|
4413
4417
|
},
|
|
@@ -4429,16 +4433,16 @@ const gs = ({
|
|
|
4429
4433
|
isEditable: s = !0,
|
|
4430
4434
|
...a
|
|
4431
4435
|
}) => {
|
|
4432
|
-
const i = ce(null), [o, l] =
|
|
4436
|
+
const i = ce(null), [o, l] = q(!1), [c, u] = q(r || ""), [f, d] = q(""), { anchorRef: m, targetRef: p } = pt({
|
|
4433
4437
|
position: "bottom",
|
|
4434
4438
|
enabled: o
|
|
4435
4439
|
}), v = le(() => {
|
|
4436
4440
|
var O;
|
|
4437
4441
|
l(!1), (O = i == null ? void 0 : i.current) == null || O.focus();
|
|
4438
4442
|
}, []);
|
|
4439
|
-
|
|
4443
|
+
Ve(p, o, () => {
|
|
4440
4444
|
v();
|
|
4441
|
-
}),
|
|
4445
|
+
}), Ve(m, o, () => {
|
|
4442
4446
|
if (
|
|
4443
4447
|
// FIXME: Copied from useClickOutside.
|
|
4444
4448
|
typeof m == "object" && m !== null && "current" in m
|
|
@@ -4448,31 +4452,31 @@ const gs = ({
|
|
|
4448
4452
|
}
|
|
4449
4453
|
v();
|
|
4450
4454
|
}), Lt(o, p);
|
|
4451
|
-
const { format: E, getCurrentLanguage: T } =
|
|
4455
|
+
const { format: E, getCurrentLanguage: T } = Le(), b = le(
|
|
4452
4456
|
(O) => {
|
|
4453
|
-
const
|
|
4457
|
+
const C = O.length > 5 && Xr(O, T()) || O, F = E(C, void 0, void 0, {
|
|
4454
4458
|
type: "date"
|
|
4455
|
-
}), P = typeof
|
|
4459
|
+
}), P = typeof C != "string", A = P && C.toISOString().substring(0, 10) || "";
|
|
4456
4460
|
return {
|
|
4457
4461
|
isValid: P,
|
|
4458
4462
|
formattedDate: F,
|
|
4459
|
-
isoDate:
|
|
4460
|
-
normalizedDate:
|
|
4463
|
+
isoDate: A,
|
|
4464
|
+
normalizedDate: C
|
|
4461
4465
|
};
|
|
4462
4466
|
},
|
|
4463
4467
|
[T, E]
|
|
4464
4468
|
);
|
|
4465
4469
|
ne(() => {
|
|
4466
|
-
const { formattedDate: O, isoDate:
|
|
4467
|
-
|
|
4470
|
+
const { formattedDate: O, isoDate: C, isValid: F } = b(r);
|
|
4471
|
+
u(F && C || r), d(F && O || r);
|
|
4468
4472
|
}, [r, E, b]);
|
|
4469
4473
|
const j = () => l((O) => !O), S = () => {
|
|
4470
4474
|
D(f);
|
|
4471
4475
|
}, g = (O) => {
|
|
4472
4476
|
D(O), v();
|
|
4473
4477
|
}, D = (O) => {
|
|
4474
|
-
const { isoDate:
|
|
4475
|
-
t && t(F &&
|
|
4478
|
+
const { isoDate: C, isValid: F } = b(O);
|
|
4479
|
+
t && t(F && C || O);
|
|
4476
4480
|
}, k = (O) => {
|
|
4477
4481
|
d(O);
|
|
4478
4482
|
}, w = (O) => {
|
|
@@ -4500,7 +4504,7 @@ const gs = ({
|
|
|
4500
4504
|
{
|
|
4501
4505
|
disabledDateRanges: n,
|
|
4502
4506
|
onDateChange: g,
|
|
4503
|
-
initialValue:
|
|
4507
|
+
initialValue: Ct(c) && c || "",
|
|
4504
4508
|
targetRef: p
|
|
4505
4509
|
}
|
|
4506
4510
|
) })
|
|
@@ -4515,8 +4519,8 @@ const gs = ({
|
|
|
4515
4519
|
label: i,
|
|
4516
4520
|
disabled: o,
|
|
4517
4521
|
fun: l,
|
|
4518
|
-
error:
|
|
4519
|
-
onOptionsRequest:
|
|
4522
|
+
error: c,
|
|
4523
|
+
onOptionsRequest: u,
|
|
4520
4524
|
onChange: f,
|
|
4521
4525
|
onBlur: d
|
|
4522
4526
|
}) => {
|
|
@@ -4566,9 +4570,9 @@ const gs = ({
|
|
|
4566
4570
|
listDisplayMode: n,
|
|
4567
4571
|
minimumChars: t,
|
|
4568
4572
|
placeholder: a,
|
|
4569
|
-
onOptionsRequest:
|
|
4573
|
+
onOptionsRequest: u,
|
|
4570
4574
|
_multiActiveIndex: m,
|
|
4571
|
-
error:
|
|
4575
|
+
error: c,
|
|
4572
4576
|
onBlur: d
|
|
4573
4577
|
}
|
|
4574
4578
|
)
|
|
@@ -4576,7 +4580,7 @@ const gs = ({
|
|
|
4576
4580
|
}
|
|
4577
4581
|
);
|
|
4578
4582
|
}, vs = ({ ...r }) => {
|
|
4579
|
-
const [e, t] =
|
|
4583
|
+
const [e, t] = q(!1), n = e ? "visibility-off" : "visibility";
|
|
4580
4584
|
return /* @__PURE__ */ y.jsx(
|
|
4581
4585
|
Re,
|
|
4582
4586
|
{
|
|
@@ -4589,7 +4593,7 @@ const gs = ({
|
|
|
4589
4593
|
}
|
|
4590
4594
|
);
|
|
4591
4595
|
}, xs = ({ ...r }) => {
|
|
4592
|
-
const [e, t] =
|
|
4596
|
+
const [e, t] = q(r.bindValue), { translate: n } = Le(), s = (a) => {
|
|
4593
4597
|
var i;
|
|
4594
4598
|
a.key === "Enter" && (a.preventDefault(), (i = r.onEnter) == null || i.call(r, e));
|
|
4595
4599
|
};
|
|
@@ -4618,14 +4622,14 @@ const gs = ({
|
|
|
4618
4622
|
return t ? /* @__PURE__ */ y.jsxs("div", { className: n.wrapper, children: [
|
|
4619
4623
|
/* @__PURE__ */ y.jsx(je, { label: t }),
|
|
4620
4624
|
/* @__PURE__ */ y.jsx(
|
|
4621
|
-
|
|
4625
|
+
ke,
|
|
4622
4626
|
{
|
|
4623
4627
|
variant: "body",
|
|
4624
4628
|
bindValue: e || r
|
|
4625
4629
|
}
|
|
4626
4630
|
)
|
|
4627
4631
|
] }) : /* @__PURE__ */ y.jsx(
|
|
4628
|
-
|
|
4632
|
+
ke,
|
|
4629
4633
|
{
|
|
4630
4634
|
variant: "body",
|
|
4631
4635
|
bindValue: e || r
|
|
@@ -4657,7 +4661,7 @@ class Oe {
|
|
|
4657
4661
|
return this.value.join(";");
|
|
4658
4662
|
}
|
|
4659
4663
|
}
|
|
4660
|
-
const
|
|
4664
|
+
const Ce = (r, e, t) => ({
|
|
4661
4665
|
obj: {
|
|
4662
4666
|
t: r.obj.t,
|
|
4663
4667
|
p: r.obj.p,
|
|
@@ -4680,7 +4684,7 @@ const Pe = (r, e, t) => ({
|
|
|
4680
4684
|
r.obj,
|
|
4681
4685
|
e.map((s) => s.optionalDisplayValue ? s.optionalDisplayValue : "")
|
|
4682
4686
|
).getLegacyValue();
|
|
4683
|
-
return
|
|
4687
|
+
return Ce(r, t, n);
|
|
4684
4688
|
}, ws = ({
|
|
4685
4689
|
min: r,
|
|
4686
4690
|
max: e,
|
|
@@ -4692,17 +4696,17 @@ const Pe = (r, e, t) => ({
|
|
|
4692
4696
|
onEnter: o,
|
|
4693
4697
|
...l
|
|
4694
4698
|
}) => {
|
|
4695
|
-
const { getCurrentLanguage:
|
|
4699
|
+
const { getCurrentLanguage: c } = Le(), u = ce(null), f = c(), { groupingChar: d, decimalChar: m } = Yr(
|
|
4696
4700
|
() => is(f, s),
|
|
4697
4701
|
[f, s]
|
|
4698
4702
|
), p = le(
|
|
4699
|
-
(P,
|
|
4700
|
-
minimumFractionDigits:
|
|
4701
|
-
maximumFractionDigits:
|
|
4703
|
+
(P, A) => new Intl.NumberFormat(f, {
|
|
4704
|
+
minimumFractionDigits: A,
|
|
4705
|
+
maximumFractionDigits: A,
|
|
4702
4706
|
useGrouping: !0
|
|
4703
4707
|
}).format(P),
|
|
4704
4708
|
[f]
|
|
4705
|
-
), v = le(cs, [d, m]), E = le(as, [r, e]), T = a != null && a.toString().includes(".") ? a.toString().split(".")[1].length : 0, [b, j] =
|
|
4709
|
+
), v = le(cs, [d, m]), E = le(as, [r, e]), T = a != null && a.toString().includes(".") ? a.toString().split(".")[1].length : 0, [b, j] = q(T), [S, g] = q(
|
|
4706
4710
|
a != null ? p(a, b) : ""
|
|
4707
4711
|
), D = ce(a ?? null);
|
|
4708
4712
|
ne(() => {
|
|
@@ -4710,31 +4714,31 @@ const Pe = (r, e, t) => ({
|
|
|
4710
4714
|
g(""), D.current = null;
|
|
4711
4715
|
return;
|
|
4712
4716
|
}
|
|
4713
|
-
const P = a.toString().includes(".") ? a.toString().split(".")[1].length : 0,
|
|
4714
|
-
|
|
4717
|
+
const P = a.toString().includes(".") ? a.toString().split(".")[1].length : 0, A = P === 0 ? b : P;
|
|
4718
|
+
A !== b && j(A), g(p(a, A)), D.current = a;
|
|
4715
4719
|
}, [a, p]);
|
|
4716
4720
|
const k = le(
|
|
4717
|
-
(P,
|
|
4721
|
+
(P, A = !1) => {
|
|
4718
4722
|
if (P.trim() === "") {
|
|
4719
|
-
g(""), D.current = null, i == null || i(void 0, ""),
|
|
4723
|
+
g(""), D.current = null, i == null || i(void 0, ""), A && (o == null || o(void 0));
|
|
4720
4724
|
return;
|
|
4721
4725
|
}
|
|
4722
|
-
const
|
|
4723
|
-
if (isNaN(
|
|
4726
|
+
const W = v(P, d, m);
|
|
4727
|
+
if (isNaN(W))
|
|
4724
4728
|
if (D.current != null) {
|
|
4725
|
-
const
|
|
4726
|
-
g(
|
|
4729
|
+
const L = p(D.current, b);
|
|
4730
|
+
g(L);
|
|
4727
4731
|
} else
|
|
4728
4732
|
g("");
|
|
4729
4733
|
else {
|
|
4730
|
-
const
|
|
4734
|
+
const L = E(W, r, e), H = ls(
|
|
4731
4735
|
P,
|
|
4732
4736
|
d,
|
|
4733
4737
|
m
|
|
4734
4738
|
);
|
|
4735
4739
|
j(H);
|
|
4736
|
-
const
|
|
4737
|
-
g(
|
|
4740
|
+
const G = p(L, H);
|
|
4741
|
+
g(G), D.current = L, i == null || i(L, G), A && (o == null || o(L));
|
|
4738
4742
|
}
|
|
4739
4743
|
},
|
|
4740
4744
|
[
|
|
@@ -4749,23 +4753,23 @@ const Pe = (r, e, t) => ({
|
|
|
4749
4753
|
o,
|
|
4750
4754
|
b
|
|
4751
4755
|
]
|
|
4752
|
-
), w = (P) => g(P), O = () => k(S),
|
|
4756
|
+
), w = (P) => g(P), O = () => k(S), C = (P) => {
|
|
4753
4757
|
if (P.key === "Enter") {
|
|
4754
4758
|
P.preventDefault(), k(S, !0);
|
|
4755
4759
|
return;
|
|
4756
4760
|
}
|
|
4757
4761
|
if (P.key === "ArrowUp" || P.key === "ArrowDown") {
|
|
4758
4762
|
P.preventDefault();
|
|
4759
|
-
const
|
|
4760
|
-
k(p(
|
|
4763
|
+
const A = P.key === "ArrowUp" ? 1 : -1, W = D.current ?? 0, L = E(W + A * t, r, e);
|
|
4764
|
+
k(p(L, b));
|
|
4761
4765
|
}
|
|
4762
4766
|
}, F = (P) => {
|
|
4763
4767
|
if (!P.currentTarget.contains(document.activeElement)) return;
|
|
4764
4768
|
P.preventDefault();
|
|
4765
|
-
const
|
|
4766
|
-
k(p(
|
|
4769
|
+
const A = P.deltaY < 0 ? 1 : -1, W = D.current ?? 0, L = E(W + A * t, r, e);
|
|
4770
|
+
k(p(L, b));
|
|
4767
4771
|
};
|
|
4768
|
-
return
|
|
4772
|
+
return /* @__PURE__ */ y.jsx("div", { ref: u, "data-component": "input-number", onWheel: F, children: /* @__PURE__ */ y.jsx(
|
|
4769
4773
|
Re,
|
|
4770
4774
|
{
|
|
4771
4775
|
...l,
|
|
@@ -4780,7 +4784,7 @@ const Pe = (r, e, t) => ({
|
|
|
4780
4784
|
step: t,
|
|
4781
4785
|
onChange: w,
|
|
4782
4786
|
onBlur: O,
|
|
4783
|
-
onKeyDown:
|
|
4787
|
+
onKeyDown: C
|
|
4784
4788
|
}
|
|
4785
4789
|
) });
|
|
4786
4790
|
};
|
|
@@ -4834,12 +4838,12 @@ const Es = ({
|
|
|
4834
4838
|
isEditable: i,
|
|
4835
4839
|
label: o,
|
|
4836
4840
|
ariaLabel: l,
|
|
4837
|
-
helperText:
|
|
4838
|
-
error:
|
|
4841
|
+
helperText: c,
|
|
4842
|
+
error: u,
|
|
4839
4843
|
onBlur: f,
|
|
4840
4844
|
onKeyDown: d
|
|
4841
4845
|
}) => {
|
|
4842
|
-
const m = Be(), p = `${m}-helper`, v =
|
|
4846
|
+
const m = Be(), p = `${m}-helper`, v = u ? "danger" : s, E = c || !!u, T = (j) => {
|
|
4843
4847
|
t == null || t(j.target.value);
|
|
4844
4848
|
}, b = {
|
|
4845
4849
|
wrapper: "smp-textarea-wrapper",
|
|
@@ -4868,7 +4872,7 @@ const Es = ({
|
|
|
4868
4872
|
jr,
|
|
4869
4873
|
{
|
|
4870
4874
|
id: p,
|
|
4871
|
-
helperText:
|
|
4875
|
+
helperText: u,
|
|
4872
4876
|
disabled: r,
|
|
4873
4877
|
state: v
|
|
4874
4878
|
}
|
|
@@ -4889,13 +4893,13 @@ const Es = ({
|
|
|
4889
4893
|
label: i,
|
|
4890
4894
|
...o
|
|
4891
4895
|
}) => {
|
|
4892
|
-
const [l,
|
|
4896
|
+
const [l, c] = q(n);
|
|
4893
4897
|
ne(() => {
|
|
4894
|
-
!l && s && a && s(a, void 0).then((p) =>
|
|
4898
|
+
!l && s && a && s(a, void 0).then((p) => c(p)).catch((p) => {
|
|
4895
4899
|
console.error("Error during loading options (radio)", p);
|
|
4896
4900
|
});
|
|
4897
4901
|
}, [l, s, a]);
|
|
4898
|
-
const
|
|
4902
|
+
const u = {
|
|
4899
4903
|
container: `${et["smp-radio"]} ${t ? et["smp-radio-horizontal"] : ""}`,
|
|
4900
4904
|
option: `${et["smp-radio-element"]} ${r ? et["smp-radio-disabled"] : ""}`
|
|
4901
4905
|
}, f = () => {
|
|
@@ -4905,9 +4909,9 @@ const Es = ({
|
|
|
4905
4909
|
var v;
|
|
4906
4910
|
r || (v = o.onChange) == null || v.call(o, p.id, p.label);
|
|
4907
4911
|
}, m = Be();
|
|
4908
|
-
return /* @__PURE__ */ y.jsxs("div", { "smp-id": "radio-container", className:
|
|
4912
|
+
return /* @__PURE__ */ y.jsxs("div", { "smp-id": "radio-container", className: u.container, children: [
|
|
4909
4913
|
i && /* @__PURE__ */ y.jsx(je, { label: i, disabled: r, htmlFor: "" }),
|
|
4910
|
-
l == null ? void 0 : l.map((p, v) => /* @__PURE__ */ y.jsxs("label", { className:
|
|
4914
|
+
l == null ? void 0 : l.map((p, v) => /* @__PURE__ */ y.jsxs("label", { className: u.option, children: [
|
|
4911
4915
|
/* @__PURE__ */ y.jsx(
|
|
4912
4916
|
"input",
|
|
4913
4917
|
{
|
|
@@ -4921,10 +4925,10 @@ const Es = ({
|
|
|
4921
4925
|
}
|
|
4922
4926
|
),
|
|
4923
4927
|
/* @__PURE__ */ y.jsx(
|
|
4924
|
-
|
|
4928
|
+
ke,
|
|
4925
4929
|
{
|
|
4926
4930
|
variant: "body",
|
|
4927
|
-
bindValue:
|
|
4931
|
+
bindValue: Ae(
|
|
4928
4932
|
p.id,
|
|
4929
4933
|
p.label,
|
|
4930
4934
|
e
|
|
@@ -4943,7 +4947,7 @@ const Es = ({
|
|
|
4943
4947
|
ne(() => {
|
|
4944
4948
|
n && (s != null && s.current) && s.current.focus();
|
|
4945
4949
|
}, [n, s]);
|
|
4946
|
-
const [a, i, o] = r, l = (
|
|
4950
|
+
const [a, i, o] = r, l = (c) => Array.from({ length: c }, (u, f) => /* @__PURE__ */ y.jsx("option", { value: f, children: f.toString().padStart(2, "0") }, f));
|
|
4947
4951
|
return /* @__PURE__ */ y.jsxs(
|
|
4948
4952
|
"div",
|
|
4949
4953
|
{
|
|
@@ -4955,7 +4959,7 @@ const Es = ({
|
|
|
4955
4959
|
{
|
|
4956
4960
|
value: a,
|
|
4957
4961
|
ref: s,
|
|
4958
|
-
onChange: (
|
|
4962
|
+
onChange: (c) => e(+c.target.value, i, o),
|
|
4959
4963
|
id: "time-picker-hours",
|
|
4960
4964
|
children: l(24)
|
|
4961
4965
|
}
|
|
@@ -4965,7 +4969,7 @@ const Es = ({
|
|
|
4965
4969
|
"select",
|
|
4966
4970
|
{
|
|
4967
4971
|
value: i,
|
|
4968
|
-
onChange: (
|
|
4972
|
+
onChange: (c) => e(a, +c.target.value, o),
|
|
4969
4973
|
id: "time-picker-minutes",
|
|
4970
4974
|
children: l(60)
|
|
4971
4975
|
}
|
|
@@ -4975,7 +4979,7 @@ const Es = ({
|
|
|
4975
4979
|
"select",
|
|
4976
4980
|
{
|
|
4977
4981
|
value: o || 0,
|
|
4978
|
-
onChange: (
|
|
4982
|
+
onChange: (c) => e(a, i, +c.target.value),
|
|
4979
4983
|
id: "time-picker-seconds",
|
|
4980
4984
|
children: l(60)
|
|
4981
4985
|
}
|
|
@@ -5001,16 +5005,16 @@ const Es = ({
|
|
|
5001
5005
|
isEditable: n = !0,
|
|
5002
5006
|
...s
|
|
5003
5007
|
}) => {
|
|
5004
|
-
const a = ce(null), [i, o] =
|
|
5008
|
+
const a = ce(null), [i, o] = q(!1), [l, c] = q(r || ""), [u, f] = q(""), { anchorRef: d, targetRef: m } = pt({
|
|
5005
5009
|
position: "bottom",
|
|
5006
5010
|
enabled: i
|
|
5007
5011
|
}), p = le(() => {
|
|
5008
5012
|
var g;
|
|
5009
5013
|
o(!1), (g = a == null ? void 0 : a.current) == null || g.focus();
|
|
5010
5014
|
}, []);
|
|
5011
|
-
|
|
5015
|
+
Ve(m, i, () => o(!1)), Lt(i, m), ne(() => {
|
|
5012
5016
|
const g = r || "", D = Er(g) ? g : r || "";
|
|
5013
|
-
|
|
5017
|
+
c(g), f(D);
|
|
5014
5018
|
}, [r]), ne(() => {
|
|
5015
5019
|
const g = (D) => {
|
|
5016
5020
|
D.key === "Escape" && o(!1);
|
|
@@ -5025,24 +5029,24 @@ const Es = ({
|
|
|
5025
5029
|
f(g);
|
|
5026
5030
|
}, T = (g, D, k) => {
|
|
5027
5031
|
const w = Rs(g, D, k);
|
|
5028
|
-
|
|
5032
|
+
c(w), f(w), t == null || t(w), p();
|
|
5029
5033
|
}, b = () => {
|
|
5030
|
-
S(
|
|
5034
|
+
S(u);
|
|
5031
5035
|
}, j = (g) => {
|
|
5032
|
-
g.key === "Enter" && (g.preventDefault(), S(
|
|
5036
|
+
g.key === "Enter" && (g.preventDefault(), S(u));
|
|
5033
5037
|
}, S = (g) => {
|
|
5034
5038
|
if (g.trim() === "") {
|
|
5035
|
-
|
|
5039
|
+
c(""), f(""), t == null || t("");
|
|
5036
5040
|
return;
|
|
5037
5041
|
}
|
|
5038
|
-
Er(g) ? (
|
|
5042
|
+
Er(g) ? (c(g), f(g), t == null || t(g)) : f(g);
|
|
5039
5043
|
};
|
|
5040
5044
|
return /* @__PURE__ */ y.jsxs("div", { "data-component": "time-picker", children: [
|
|
5041
5045
|
/* @__PURE__ */ y.jsx(
|
|
5042
5046
|
At,
|
|
5043
5047
|
{
|
|
5044
5048
|
...s,
|
|
5045
|
-
bindValue:
|
|
5049
|
+
bindValue: u,
|
|
5046
5050
|
placeholder: e,
|
|
5047
5051
|
onChange: E,
|
|
5048
5052
|
onBlur: b,
|
|
@@ -5114,8 +5118,8 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5114
5118
|
placeholderIcon: i,
|
|
5115
5119
|
label: o,
|
|
5116
5120
|
tooltip: l,
|
|
5117
|
-
options:
|
|
5118
|
-
onChange:
|
|
5121
|
+
options: c,
|
|
5122
|
+
onChange: u,
|
|
5119
5123
|
onClick: f,
|
|
5120
5124
|
onEnter: d,
|
|
5121
5125
|
onBlur: m,
|
|
@@ -5138,18 +5142,18 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5138
5142
|
label: o,
|
|
5139
5143
|
isEditable: E,
|
|
5140
5144
|
...n
|
|
5141
|
-
}, j = (w, O,
|
|
5145
|
+
}, j = (w, O, C) => Kr(t) ? Ce(w, new it(t, O).getLegacyValue()) : qr(t) ? Ce(w, new dt(t, O).getLegacyValue()) : Ce(w, O, C), S = (w, O) => Ce(
|
|
5142
5146
|
w,
|
|
5143
5147
|
new ft(t, O, ".").getLegacyValue()
|
|
5144
|
-
), g = (w) =>
|
|
5148
|
+
), g = (w) => Ce(T, new at(t, w).getLegacyValue()), D = (w) => Ss(T, w), k = () => {
|
|
5145
5149
|
switch (e) {
|
|
5146
5150
|
case te.AUTOCOMPLETE: {
|
|
5147
5151
|
const w = {
|
|
5148
5152
|
...b,
|
|
5149
5153
|
bindValue: t.k,
|
|
5150
5154
|
optionalDisplayValue: r,
|
|
5151
|
-
onChange: (O,
|
|
5152
|
-
|
|
5155
|
+
onChange: (O, C) => {
|
|
5156
|
+
u == null || u(j(T, O, C));
|
|
5153
5157
|
}
|
|
5154
5158
|
};
|
|
5155
5159
|
return /* @__PURE__ */ y.jsx(Ar, { ...w });
|
|
@@ -5168,9 +5172,9 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5168
5172
|
case te.BUTTON_LIST: {
|
|
5169
5173
|
const w = {
|
|
5170
5174
|
...b,
|
|
5171
|
-
options:
|
|
5172
|
-
onClick: (O,
|
|
5173
|
-
const F = { ...T, fun:
|
|
5175
|
+
options: c,
|
|
5176
|
+
onClick: (O, C) => {
|
|
5177
|
+
const F = { ...T, fun: C };
|
|
5174
5178
|
f == null || f(j(F, O));
|
|
5175
5179
|
}
|
|
5176
5180
|
};
|
|
@@ -5189,8 +5193,8 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5189
5193
|
...b,
|
|
5190
5194
|
bindValue: at.fromDataObj(t).getValue(),
|
|
5191
5195
|
optionalDisplayValue: r,
|
|
5192
|
-
onChange: (
|
|
5193
|
-
|
|
5196
|
+
onChange: (C) => {
|
|
5197
|
+
u == null || u(g(C));
|
|
5194
5198
|
},
|
|
5195
5199
|
...w && { variant: "switch" }
|
|
5196
5200
|
};
|
|
@@ -5201,8 +5205,8 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5201
5205
|
...b,
|
|
5202
5206
|
bindValue: t.k,
|
|
5203
5207
|
optionalDisplayValue: r,
|
|
5204
|
-
onChange: (O,
|
|
5205
|
-
|
|
5208
|
+
onChange: (O, C) => {
|
|
5209
|
+
u == null || u(j(T, O, C));
|
|
5206
5210
|
}
|
|
5207
5211
|
};
|
|
5208
5212
|
return /* @__PURE__ */ y.jsx($n, { ...w });
|
|
@@ -5212,7 +5216,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5212
5216
|
...b,
|
|
5213
5217
|
bindValue: it.fromDataObj(t).getValue(),
|
|
5214
5218
|
onChange: (O) => {
|
|
5215
|
-
|
|
5219
|
+
u == null || u(j(T, O));
|
|
5216
5220
|
}
|
|
5217
5221
|
};
|
|
5218
5222
|
return /* @__PURE__ */ y.jsx(gs, { ...w });
|
|
@@ -5235,7 +5239,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5235
5239
|
...b,
|
|
5236
5240
|
bindValue: ft.fromDataObj(t, ".").getValue(),
|
|
5237
5241
|
onChange: (O) => {
|
|
5238
|
-
|
|
5242
|
+
u == null || u(S(T, O));
|
|
5239
5243
|
}
|
|
5240
5244
|
};
|
|
5241
5245
|
return /* @__PURE__ */ y.jsx(ws, { ...w });
|
|
@@ -5246,7 +5250,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5246
5250
|
bindValue: t.k,
|
|
5247
5251
|
optionalDisplayValue: r,
|
|
5248
5252
|
onChange: (O) => {
|
|
5249
|
-
|
|
5253
|
+
u == null || u(j(T, O));
|
|
5250
5254
|
}
|
|
5251
5255
|
};
|
|
5252
5256
|
return /* @__PURE__ */ y.jsx(Es, { ...w });
|
|
@@ -5256,7 +5260,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5256
5260
|
...b,
|
|
5257
5261
|
elements: wr(T),
|
|
5258
5262
|
onChange: (O) => {
|
|
5259
|
-
|
|
5263
|
+
u == null || u(D(O));
|
|
5260
5264
|
}
|
|
5261
5265
|
};
|
|
5262
5266
|
return /* @__PURE__ */ y.jsx(ys, { ...w });
|
|
@@ -5266,7 +5270,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5266
5270
|
...b,
|
|
5267
5271
|
bindValue: t.k,
|
|
5268
5272
|
onChange: (O) => {
|
|
5269
|
-
|
|
5273
|
+
u == null || u(j(T, O));
|
|
5270
5274
|
}
|
|
5271
5275
|
};
|
|
5272
5276
|
return /* @__PURE__ */ y.jsx(vs, { ...w });
|
|
@@ -5275,8 +5279,8 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5275
5279
|
const w = {
|
|
5276
5280
|
...b,
|
|
5277
5281
|
bindValue: t.k,
|
|
5278
|
-
onChange: (O,
|
|
5279
|
-
|
|
5282
|
+
onChange: (O, C) => {
|
|
5283
|
+
u == null || u(j(T, O, C));
|
|
5280
5284
|
}
|
|
5281
5285
|
};
|
|
5282
5286
|
return /* @__PURE__ */ y.jsx(Ts, { ...w });
|
|
@@ -5297,7 +5301,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5297
5301
|
bindValue: t.k,
|
|
5298
5302
|
optionalDisplayValue: r,
|
|
5299
5303
|
onChange: (O) => {
|
|
5300
|
-
|
|
5304
|
+
u == null || u(j(T, O));
|
|
5301
5305
|
}
|
|
5302
5306
|
};
|
|
5303
5307
|
return /* @__PURE__ */ y.jsx(Re, { ...w });
|
|
@@ -5307,7 +5311,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5307
5311
|
...b,
|
|
5308
5312
|
bindValue: dt.fromDataObj(t).getValue(),
|
|
5309
5313
|
onChange: (O) => {
|
|
5310
|
-
|
|
5314
|
+
u == null || u(j(T, O));
|
|
5311
5315
|
}
|
|
5312
5316
|
};
|
|
5313
5317
|
return /* @__PURE__ */ y.jsx(Ds, { ...w });
|
|
@@ -5339,14 +5343,14 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5339
5343
|
onContextMenu: n
|
|
5340
5344
|
}) => {
|
|
5341
5345
|
var o, l;
|
|
5342
|
-
const [s, a] =
|
|
5343
|
-
(
|
|
5346
|
+
const [s, a] = q(), i = le(
|
|
5347
|
+
(c) => {
|
|
5344
5348
|
var f, d;
|
|
5345
|
-
if (!((f =
|
|
5349
|
+
if (!((f = c.rows) != null && f.length) || !((d = c.columns) != null && d.length))
|
|
5346
5350
|
return {};
|
|
5347
|
-
const
|
|
5348
|
-
return
|
|
5349
|
-
const v =
|
|
5351
|
+
const u = c.rows[0];
|
|
5352
|
+
return c.columns.filter((m) => m.visible).reduce((m, p) => {
|
|
5353
|
+
const v = u.cells[p.name], E = {
|
|
5350
5354
|
...v,
|
|
5351
5355
|
id: p.name,
|
|
5352
5356
|
onChange: (T) => {
|
|
@@ -5383,7 +5387,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5383
5387
|
);
|
|
5384
5388
|
return ne(() => {
|
|
5385
5389
|
r && a(i(r));
|
|
5386
|
-
}, [r, i]), !((o = r == null ? void 0 : r.rows) != null && o.length) || !((l = r.columns) != null && l.length) ? null : s && /* @__PURE__ */ y.jsx("header", { className: "smp-appbar", "aria-label": "App Bar", children: /* @__PURE__ */ y.jsx(st, { layout: r.rows[0].layout, children: Object.values(s).map((
|
|
5390
|
+
}, [r, i]), !((o = r == null ? void 0 : r.rows) != null && o.length) || !((l = r.columns) != null && l.length) ? null : s && /* @__PURE__ */ y.jsx("header", { className: "smp-appbar", "aria-label": "App Bar", children: /* @__PURE__ */ y.jsx(st, { layout: r.rows[0].layout, children: Object.values(s).map((c) => /* @__PURE__ */ y.jsx(Te, { ...c })) }) });
|
|
5387
5391
|
}, $s = (r) => {
|
|
5388
5392
|
var e;
|
|
5389
5393
|
return (e = r.children) != null && e.length ? r.children.map((t) => {
|
|
@@ -5407,41 +5411,41 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5407
5411
|
loadOptions: l
|
|
5408
5412
|
}) => {
|
|
5409
5413
|
var j, S;
|
|
5410
|
-
const [
|
|
5414
|
+
const [c, u] = q(), [f, d] = q(t ?? !0), m = ce(null), p = s.trim() ? s : "100vh", v = le(
|
|
5411
5415
|
(g) => {
|
|
5412
5416
|
var k, w;
|
|
5413
5417
|
if (!((k = g == null ? void 0 : g.rows) != null && k.length) || !((w = g == null ? void 0 : g.columns) != null && w.length))
|
|
5414
5418
|
return {};
|
|
5415
5419
|
const D = g.rows[0];
|
|
5416
|
-
return g.columns.filter((O) => O.visible ?? !0).reduce((O,
|
|
5417
|
-
const F = D.cells[
|
|
5420
|
+
return g.columns.filter((O) => O.visible ?? !0).reduce((O, C) => {
|
|
5421
|
+
const F = D.cells[C.name];
|
|
5418
5422
|
if (!F || !f && de(n) && F.shape !== te.BUTTON && F.shape !== te.BUTTON_LIST)
|
|
5419
5423
|
return O;
|
|
5420
5424
|
const P = {
|
|
5421
5425
|
...F,
|
|
5422
|
-
id:
|
|
5423
|
-
onChange: (
|
|
5424
|
-
|
|
5425
|
-
const
|
|
5426
|
-
return
|
|
5426
|
+
id: C.name,
|
|
5427
|
+
onChange: (A) => {
|
|
5428
|
+
u((W) => {
|
|
5429
|
+
const L = { ...W };
|
|
5430
|
+
return L != null && L[C.name] && (L[C.name].obj.k = A.obj.k), L;
|
|
5427
5431
|
});
|
|
5428
5432
|
},
|
|
5429
|
-
onClick: (
|
|
5430
|
-
|
|
5433
|
+
onClick: (A) => {
|
|
5434
|
+
A.fun && a && a(A);
|
|
5431
5435
|
},
|
|
5432
|
-
onEnter: (
|
|
5433
|
-
i && i(
|
|
5436
|
+
onEnter: (A) => {
|
|
5437
|
+
i && i(A);
|
|
5434
5438
|
}
|
|
5435
5439
|
};
|
|
5436
|
-
return l && F.shape == te.BUTTON_LIST && (P.onOptionsRequest = (
|
|
5437
|
-
(
|
|
5440
|
+
return l && F.shape == te.BUTTON_LIST && (P.onOptionsRequest = (A, W) => l(A, W).then(
|
|
5441
|
+
(L) => $s(L)
|
|
5438
5442
|
)), !f && de(n) && (P.data = {
|
|
5439
5443
|
...P.data,
|
|
5440
5444
|
showText: !1,
|
|
5441
5445
|
justify: "center"
|
|
5442
5446
|
}), {
|
|
5443
5447
|
...O,
|
|
5444
|
-
[
|
|
5448
|
+
[C.name]: P
|
|
5445
5449
|
};
|
|
5446
5450
|
}, {});
|
|
5447
5451
|
},
|
|
@@ -5452,12 +5456,12 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5452
5456
|
de(n) ? d((g) => !g) : (d(!1), o == null || o());
|
|
5453
5457
|
};
|
|
5454
5458
|
if (ne(() => {
|
|
5455
|
-
|
|
5459
|
+
u(v(r));
|
|
5456
5460
|
}, [r]), ne(() => {
|
|
5457
5461
|
if (!m.current)
|
|
5458
5462
|
return;
|
|
5459
5463
|
if (!de(n)) {
|
|
5460
|
-
|
|
5464
|
+
u(v(r));
|
|
5461
5465
|
return;
|
|
5462
5466
|
}
|
|
5463
5467
|
const g = getComputedStyle(m.current).getPropertyValue(
|
|
@@ -5465,7 +5469,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5465
5469
|
);
|
|
5466
5470
|
let D = Number(g);
|
|
5467
5471
|
g.endsWith("ms") ? D = parseFloat(g) : g.endsWith("s") && (D = parseFloat(g) * 1e3), setTimeout(() => {
|
|
5468
|
-
|
|
5472
|
+
u(v(r));
|
|
5469
5473
|
}, D / 2);
|
|
5470
5474
|
}, [f, n]), ne(() => {
|
|
5471
5475
|
t !== void 0 && !de(n) && d(t);
|
|
@@ -5480,7 +5484,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5480
5484
|
containerLogo: "smp-drawer-container-logo",
|
|
5481
5485
|
backdrop: `smp-drawer-backdrop ${f ? "smp-drawer-backdrop-open" : ""}`
|
|
5482
5486
|
};
|
|
5483
|
-
return
|
|
5487
|
+
return c && /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
|
|
5484
5488
|
!de(n) && /* @__PURE__ */ y.jsx(
|
|
5485
5489
|
"div",
|
|
5486
5490
|
{
|
|
@@ -5522,7 +5526,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5522
5526
|
}
|
|
5523
5527
|
) })
|
|
5524
5528
|
] }),
|
|
5525
|
-
/* @__PURE__ */ y.jsx("div", { className: b.containerLayout, children: /* @__PURE__ */ y.jsx(st, { layout: r.rows[0].layout, children: Object.values(
|
|
5529
|
+
/* @__PURE__ */ y.jsx("div", { className: b.containerLayout, children: /* @__PURE__ */ y.jsx(st, { layout: r.rows[0].layout, children: Object.values(c).map((g) => /* @__PURE__ */ y.jsx(Te, { ...g })) }) })
|
|
5526
5530
|
] })
|
|
5527
5531
|
}
|
|
5528
5532
|
)
|
|
@@ -5537,8 +5541,8 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5537
5541
|
FontSize: i,
|
|
5538
5542
|
Horizontal: o,
|
|
5539
5543
|
ForceIcon: l,
|
|
5540
|
-
IconColName:
|
|
5541
|
-
IconColor:
|
|
5544
|
+
IconColName: c,
|
|
5545
|
+
IconColor: u = "var(--smp-dashList-color-base)",
|
|
5542
5546
|
NumberFormat: f,
|
|
5543
5547
|
ForceUM: d,
|
|
5544
5548
|
UmColName: m,
|
|
@@ -5549,9 +5553,9 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5549
5553
|
SelectLayout: b = "1",
|
|
5550
5554
|
onClick: j
|
|
5551
5555
|
}) => {
|
|
5552
|
-
const S = "N/A", g = (e == null ? void 0 : e.columns) || [], D = (e == null ? void 0 : e.rows) || [], k = D.length > 0, w = "--smp-dashList-color", O = "smp-layout",
|
|
5556
|
+
const S = "N/A", g = (e == null ? void 0 : e.columns) || [], D = (e == null ? void 0 : e.rows) || [], k = D.length > 0, w = "--smp-dashList-color", O = "smp-layout", C = "descr", F = "icon", P = "um", A = "value", W = i || "1em", L = "18px", H = "--smp-dashList-columns", G = "--smp-dashList-fontSize", X = {
|
|
5553
5557
|
dash: (B = "1") => {
|
|
5554
|
-
const Z = h(B), re = Z, se = x(Z,
|
|
5558
|
+
const Z = h(B), re = Z, se = x(Z, C), he = x(Z, F), Se = x(Z, P), ve = x(Z, A);
|
|
5555
5559
|
return {
|
|
5556
5560
|
container: re,
|
|
5557
5561
|
descr: se,
|
|
@@ -5562,7 +5566,7 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5562
5566
|
},
|
|
5563
5567
|
dashList: `smp-dash-list ${de(a) ? "smp-dash-list-fill-space" : ""}
|
|
5564
5568
|
${de(o) ? "smp-dash-list-horizontal" : ""}`
|
|
5565
|
-
}, { format: M } =
|
|
5569
|
+
}, { format: M } = Le(), h = (B) => `${O}-${B}`, x = (B, Z) => `${B}__${Z}`, R = (B) => `${w}-${B}`, $ = (B) => {
|
|
5566
5570
|
const Z = /R(\d{1,3})G(\d{1,3})B(\d{1,3})/;
|
|
5567
5571
|
if (Z.test(B)) {
|
|
5568
5572
|
const se = B.match(Z) || [];
|
|
@@ -5572,13 +5576,13 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5572
5576
|
return B;
|
|
5573
5577
|
}, _ = (B) => {
|
|
5574
5578
|
if (!f) return B;
|
|
5575
|
-
const [Z, re] =
|
|
5579
|
+
const [Z, re] = N(f).map(
|
|
5576
5580
|
(De) => parseInt(De || "0")
|
|
5577
5581
|
), se = "0,0" + (re ? "." + "0".repeat(re) : ""), he = M(B, se, "it");
|
|
5578
5582
|
if (!Z) return he;
|
|
5579
5583
|
const [Se, ve] = he.split(",");
|
|
5580
5584
|
return Se + (ve ? `,${ve}` : "");
|
|
5581
|
-
},
|
|
5585
|
+
}, N = (B) => B.includes(";") ? B.split(";") : [B], Y = (B) => {
|
|
5582
5586
|
const Z = (se) => {
|
|
5583
5587
|
var he;
|
|
5584
5588
|
if (se)
|
|
@@ -5590,57 +5594,57 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5590
5594
|
};
|
|
5591
5595
|
return {
|
|
5592
5596
|
descr: t || Z(n) || re(2) || "",
|
|
5593
|
-
icon: l || Z(
|
|
5597
|
+
icon: l || Z(c) || re(3) || "",
|
|
5594
5598
|
um: d || Z(m) || re(1) || "",
|
|
5595
5599
|
value: v || Z(E) || re(0) || ""
|
|
5596
5600
|
};
|
|
5597
|
-
},
|
|
5601
|
+
}, U = (B) => {
|
|
5598
5602
|
j == null || j(B);
|
|
5599
5603
|
}, V = (B, Z) => {
|
|
5600
|
-
(B.key === "Enter" || B.key === " ") && (B.preventDefault(), B.stopPropagation(),
|
|
5601
|
-
},
|
|
5604
|
+
(B.key === "Enter" || B.key === " ") && (B.preventDefault(), B.stopPropagation(), U(Z));
|
|
5605
|
+
}, z = ((B) => {
|
|
5602
5606
|
const Z = X.dash(B);
|
|
5603
5607
|
return {
|
|
5604
5608
|
className: Z,
|
|
5605
|
-
descr: (re) => /* @__PURE__ */ y.jsx("div", { className: Z.descr, children: re }, `${B}-${
|
|
5609
|
+
descr: (re) => /* @__PURE__ */ y.jsx("div", { className: Z.descr, children: re }, `${B}-${C}`),
|
|
5606
5610
|
icon: (re) => /* @__PURE__ */ y.jsx("div", { className: Z.icon, children: /* @__PURE__ */ y.jsx(
|
|
5607
5611
|
fe,
|
|
5608
5612
|
{
|
|
5609
|
-
color:
|
|
5610
|
-
height:
|
|
5613
|
+
color: u,
|
|
5614
|
+
height: L,
|
|
5611
5615
|
icon: re,
|
|
5612
|
-
width:
|
|
5616
|
+
width: L
|
|
5613
5617
|
}
|
|
5614
5618
|
) }, `${B}-${F}`),
|
|
5615
5619
|
um: (re) => /* @__PURE__ */ y.jsx("div", { className: Z.um, children: re }, `${B}-${P}`),
|
|
5616
|
-
value: (re) => /* @__PURE__ */ y.jsx("div", { className: Z.value, children: re }, `${B}-${
|
|
5620
|
+
value: (re) => /* @__PURE__ */ y.jsx("div", { className: Z.value, children: re }, `${B}-${A}`)
|
|
5617
5621
|
};
|
|
5618
5622
|
})(b), ae = (B) => {
|
|
5619
|
-
const { descr: Z, icon: re, um: se, value: he } =
|
|
5620
|
-
[R(
|
|
5621
|
-
[R(P)]:
|
|
5622
|
-
[R(
|
|
5623
|
+
const { descr: Z, icon: re, um: se, value: he } = Y(B), Se = {
|
|
5624
|
+
[R(C)]: $(s),
|
|
5625
|
+
[R(P)]: $(p),
|
|
5626
|
+
[R(A)]: $(T)
|
|
5623
5627
|
}, ve = [], De = _(he);
|
|
5624
5628
|
switch (b) {
|
|
5625
5629
|
case "2":
|
|
5626
|
-
re && ve.push(
|
|
5627
|
-
|
|
5630
|
+
re && ve.push(z.icon(re)), ve.push(z.descr(Z)), ve.push(
|
|
5631
|
+
z.value(se ? De + " " + se : De)
|
|
5628
5632
|
);
|
|
5629
5633
|
break;
|
|
5630
5634
|
default:
|
|
5631
5635
|
case "1":
|
|
5632
|
-
ve.push(
|
|
5633
|
-
|
|
5636
|
+
ve.push(z.descr(Z)), ve.push(
|
|
5637
|
+
z.value(se ? De + " " + se : De)
|
|
5634
5638
|
);
|
|
5635
5639
|
}
|
|
5636
5640
|
return /* @__PURE__ */ y.jsx(
|
|
5637
5641
|
"div",
|
|
5638
5642
|
{
|
|
5639
|
-
className:
|
|
5643
|
+
className: z.className.container,
|
|
5640
5644
|
role: "button",
|
|
5641
5645
|
style: Se,
|
|
5642
5646
|
tabIndex: 0,
|
|
5643
|
-
onClick: () =>
|
|
5647
|
+
onClick: () => U(B),
|
|
5644
5648
|
onKeyDown: (Ir) => V(Ir, B),
|
|
5645
5649
|
children: ve
|
|
5646
5650
|
},
|
|
@@ -5648,16 +5652,16 @@ const Tr = /* @__PURE__ */ new Map([
|
|
|
5648
5652
|
);
|
|
5649
5653
|
}, I = {
|
|
5650
5654
|
[H]: String(r),
|
|
5651
|
-
[
|
|
5655
|
+
[G]: W
|
|
5652
5656
|
};
|
|
5653
5657
|
return /* @__PURE__ */ y.jsx("div", { className: X.dashList, style: I, children: k ? D.map((B) => ae(B)) : S });
|
|
5654
5658
|
}, tt = {
|
|
5655
5659
|
"smp-table": "_smp-table_1qmju_1",
|
|
5656
5660
|
"smp-headerCell": "_smp-headerCell_1qmju_35",
|
|
5657
5661
|
"smp-resizer": "_smp-resizer_1qmju_44"
|
|
5658
|
-
},
|
|
5659
|
-
rowContent:
|
|
5660
|
-
clickable:
|
|
5662
|
+
}, Cs = "_rowContent_20wit_2", Ps = "_clickable_20wit_21", As = "_indent_20wit_26", ks = "_toggle_20wit_32", Ls = "_cell_20wit_38", Ns = "_leftSection_20wit_46", Ee = {
|
|
5663
|
+
rowContent: Cs,
|
|
5664
|
+
clickable: Ps,
|
|
5661
5665
|
indent: As,
|
|
5662
5666
|
toggle: ks,
|
|
5663
5667
|
cell: Ls,
|
|
@@ -5685,14 +5689,14 @@ const Nr = ({
|
|
|
5685
5689
|
offsetTop: s
|
|
5686
5690
|
}) => {
|
|
5687
5691
|
var b;
|
|
5688
|
-
const [a, i] =
|
|
5692
|
+
const [a, i] = q(!1), o = rt(r) && !!((b = r.children) != null && b.length), l = r.cells && Object.keys(r.cells).length > 0, c = o, u = t * 20, f = () => {
|
|
5689
5693
|
o && i(!a);
|
|
5690
5694
|
}, d = {
|
|
5691
5695
|
content: `${Ee.rowContent} ${o ? Ee.clickable : ""}`,
|
|
5692
5696
|
toggle: `${Ee.toggle}`,
|
|
5693
5697
|
indent: `${Ee.indent}`,
|
|
5694
5698
|
cell: `${Ee.cell}`
|
|
5695
|
-
}, m = (j) => /* @__PURE__ */ y.jsx(Te, { ...j }), p = () => /* @__PURE__ */ y.jsx("span", { className: d.toggle, children:
|
|
5699
|
+
}, m = (j) => /* @__PURE__ */ y.jsx(Te, { ...j }), p = () => /* @__PURE__ */ y.jsx("span", { className: d.toggle, children: c && /* @__PURE__ */ y.jsx(
|
|
5696
5700
|
fe,
|
|
5697
5701
|
{
|
|
5698
5702
|
icon: a ? "arrow_drop_right" : "arrow_drop_down",
|
|
@@ -5702,7 +5706,7 @@ const Nr = ({
|
|
|
5702
5706
|
"span",
|
|
5703
5707
|
{
|
|
5704
5708
|
className: d.indent,
|
|
5705
|
-
style: { width: `${
|
|
5709
|
+
style: { width: `${u}px` },
|
|
5706
5710
|
"aria-hidden": "true"
|
|
5707
5711
|
}
|
|
5708
5712
|
), E = () => {
|
|
@@ -5798,7 +5802,7 @@ const Nr = ({
|
|
|
5798
5802
|
width: 16
|
|
5799
5803
|
}
|
|
5800
5804
|
),
|
|
5801
|
-
/* @__PURE__ */ y.jsx(
|
|
5805
|
+
/* @__PURE__ */ y.jsx(ke, { variant: "title", bindValue: r })
|
|
5802
5806
|
]
|
|
5803
5807
|
}
|
|
5804
5808
|
)
|
|
@@ -5818,19 +5822,19 @@ function Ys(r, e) {
|
|
|
5818
5822
|
};
|
|
5819
5823
|
});
|
|
5820
5824
|
}
|
|
5821
|
-
function
|
|
5825
|
+
function Ws(r, e, t, n) {
|
|
5822
5826
|
const s = [];
|
|
5823
5827
|
let a = 0;
|
|
5824
5828
|
return i(r, 0, []), { flatRows: s, offset: a };
|
|
5825
5829
|
function i(f, d, m) {
|
|
5826
5830
|
if (d >= e.length) {
|
|
5827
|
-
|
|
5831
|
+
u(f);
|
|
5828
5832
|
return;
|
|
5829
5833
|
}
|
|
5830
5834
|
const p = e[d].column, v = o(f, p);
|
|
5831
5835
|
for (const [E, T] of v) {
|
|
5832
5836
|
const b = [...m, E], j = l(b, d), S = n.has(j);
|
|
5833
|
-
s.push(
|
|
5837
|
+
s.push(c(E, j, d, S)), a += t, S && i(T, d + 1, b);
|
|
5834
5838
|
}
|
|
5835
5839
|
}
|
|
5836
5840
|
function o(f, d) {
|
|
@@ -5845,7 +5849,7 @@ function Us(r, e, t, n) {
|
|
|
5845
5849
|
function l(f, d) {
|
|
5846
5850
|
return `group-${f.join("-")}-${d}`;
|
|
5847
5851
|
}
|
|
5848
|
-
function
|
|
5852
|
+
function c(f, d, m, p) {
|
|
5849
5853
|
return {
|
|
5850
5854
|
isGroup: !0,
|
|
5851
5855
|
value: f,
|
|
@@ -5855,12 +5859,12 @@ function Us(r, e, t, n) {
|
|
|
5855
5859
|
isExpanded: p
|
|
5856
5860
|
};
|
|
5857
5861
|
}
|
|
5858
|
-
function
|
|
5862
|
+
function u(f) {
|
|
5859
5863
|
for (const d of f)
|
|
5860
5864
|
s.push(d), a += t;
|
|
5861
5865
|
}
|
|
5862
5866
|
}
|
|
5863
|
-
const
|
|
5867
|
+
const Us = ({
|
|
5864
5868
|
groups: r = [],
|
|
5865
5869
|
isDraggable: e = !0,
|
|
5866
5870
|
isEditable: t = !0,
|
|
@@ -5913,32 +5917,32 @@ const Ws = ({
|
|
|
5913
5917
|
containerRef: t,
|
|
5914
5918
|
sizingMode: n
|
|
5915
5919
|
}) => {
|
|
5916
|
-
const [s, a] =
|
|
5920
|
+
const [s, a] = q({});
|
|
5917
5921
|
return ne(() => {
|
|
5918
5922
|
var i, o;
|
|
5919
5923
|
if (!(!r || r.length === 0)) {
|
|
5920
5924
|
if (n === "fixed") {
|
|
5921
|
-
const
|
|
5922
|
-
r.map((
|
|
5925
|
+
const c = Object.fromEntries(
|
|
5926
|
+
r.map((u) => [u.name, 120])
|
|
5923
5927
|
);
|
|
5924
|
-
a(
|
|
5928
|
+
a(c);
|
|
5925
5929
|
} else if (n === "fit-grid") {
|
|
5926
|
-
const l = ((i = t.current) == null ? void 0 : i.offsetWidth) || 800,
|
|
5927
|
-
|
|
5930
|
+
const l = ((i = t.current) == null ? void 0 : i.offsetWidth) || 800, c = r.filter((d) => d.visible !== !1), u = l / c.length, f = Object.fromEntries(
|
|
5931
|
+
c.map((d) => [d.name, u])
|
|
5928
5932
|
);
|
|
5929
5933
|
a(f);
|
|
5930
5934
|
} else if (n === "fit-content") {
|
|
5931
5935
|
const l = {};
|
|
5932
|
-
for (const
|
|
5933
|
-
if (!
|
|
5934
|
-
const
|
|
5936
|
+
for (const c of r) {
|
|
5937
|
+
if (!c.visible) continue;
|
|
5938
|
+
const u = ((o = c.title) == null ? void 0 : o.length) || 0, f = Math.max(
|
|
5935
5939
|
...e.map((d) => {
|
|
5936
5940
|
var m, p, v, E;
|
|
5937
|
-
return `${((p = (m = d.cells) == null ? void 0 : m[
|
|
5941
|
+
return `${((p = (m = d.cells) == null ? void 0 : m[c.name]) == null ? void 0 : p.decode) || ((E = (v = d.cells) == null ? void 0 : v[c.name]) == null ? void 0 : E.value) || ""}`.length;
|
|
5938
5942
|
}),
|
|
5939
|
-
|
|
5943
|
+
u
|
|
5940
5944
|
);
|
|
5941
|
-
l[
|
|
5945
|
+
l[c.name] = f * 8 + 24;
|
|
5942
5946
|
}
|
|
5943
5947
|
a(l);
|
|
5944
5948
|
}
|
|
@@ -5954,9 +5958,9 @@ const Ws = ({
|
|
|
5954
5958
|
// isEditable = false,
|
|
5955
5959
|
}) => {
|
|
5956
5960
|
var k;
|
|
5957
|
-
const [i, o] =
|
|
5961
|
+
const [i, o] = q(
|
|
5958
5962
|
r ?? { columns: [], rows: [] }
|
|
5959
|
-
), [l,
|
|
5963
|
+
), [l, c] = q(n || []), [u, f] = q(/* @__PURE__ */ new Set()), d = ce(null), [m, p] = Hs({
|
|
5960
5964
|
columns: (i == null ? void 0 : i.columns) ?? [],
|
|
5961
5965
|
rows: (i == null ? void 0 : i.rows) ?? [],
|
|
5962
5966
|
containerRef: d,
|
|
@@ -5964,43 +5968,43 @@ const Ws = ({
|
|
|
5964
5968
|
});
|
|
5965
5969
|
ne(() => {
|
|
5966
5970
|
if (l != null && l.length && r.rows) {
|
|
5967
|
-
const { flatRows: w } =
|
|
5971
|
+
const { flatRows: w } = Ws(
|
|
5968
5972
|
r.rows,
|
|
5969
5973
|
l,
|
|
5970
5974
|
e,
|
|
5971
|
-
|
|
5975
|
+
u
|
|
5972
5976
|
);
|
|
5973
5977
|
o({ ...r, rows: w });
|
|
5974
5978
|
} else
|
|
5975
5979
|
o(r);
|
|
5976
|
-
}, [r, l,
|
|
5980
|
+
}, [r, l, u, e]);
|
|
5977
5981
|
const v = (w) => {
|
|
5978
|
-
|
|
5982
|
+
c(Ys(w, l));
|
|
5979
5983
|
}, E = (w) => {
|
|
5980
5984
|
w.preventDefault();
|
|
5981
5985
|
const O = w.dataTransfer.getData("text/plain");
|
|
5982
5986
|
if (!O || l.some((P) => P.column === O))
|
|
5983
5987
|
return;
|
|
5984
5988
|
const F = [...l, { column: O, visible: !0 }];
|
|
5985
|
-
|
|
5989
|
+
c(F);
|
|
5986
5990
|
}, T = (w) => {
|
|
5987
5991
|
w.preventDefault();
|
|
5988
|
-
}, { virtualItems: b, containerProps: j, innerProps: S } =
|
|
5992
|
+
}, { virtualItems: b, containerProps: j, innerProps: S } = Cr({
|
|
5989
5993
|
items: (i == null ? void 0 : i.rows) ?? [],
|
|
5990
5994
|
itemHeight: e,
|
|
5991
5995
|
containerHeight: t,
|
|
5992
5996
|
overscan: 5
|
|
5993
5997
|
}), g = (w, O) => {
|
|
5994
|
-
const
|
|
5995
|
-
const
|
|
5996
|
-
p((
|
|
5997
|
-
...
|
|
5998
|
+
const C = w.clientX, F = m[O], P = (W) => {
|
|
5999
|
+
const L = W.clientX - C, H = Math.max(50, F + L);
|
|
6000
|
+
p((G) => ({
|
|
6001
|
+
...G,
|
|
5998
6002
|
[O]: H
|
|
5999
6003
|
}));
|
|
6000
|
-
},
|
|
6001
|
-
window.removeEventListener("mousemove", P), window.removeEventListener("mouseup",
|
|
6004
|
+
}, A = () => {
|
|
6005
|
+
window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", A);
|
|
6002
6006
|
};
|
|
6003
|
-
window.addEventListener("mousemove", P), window.addEventListener("mouseup",
|
|
6007
|
+
window.addEventListener("mousemove", P), window.addEventListener("mouseup", A);
|
|
6004
6008
|
}, D = {
|
|
6005
6009
|
smpTable: `${tt["smp-table"]}`,
|
|
6006
6010
|
headerCell: `${tt["smp-headerCell"]}`,
|
|
@@ -6015,7 +6019,7 @@ const Ws = ({
|
|
|
6015
6019
|
children: /* @__PURE__ */ y.jsxs("table", { children: [
|
|
6016
6020
|
/* @__PURE__ */ y.jsxs("thead", { children: [
|
|
6017
6021
|
(n || a) && /* @__PURE__ */ y.jsx(
|
|
6018
|
-
|
|
6022
|
+
Us,
|
|
6019
6023
|
{
|
|
6020
6024
|
groups: l,
|
|
6021
6025
|
onChange: v,
|
|
@@ -6039,7 +6043,7 @@ const Ws = ({
|
|
|
6039
6043
|
},
|
|
6040
6044
|
children: [
|
|
6041
6045
|
/* @__PURE__ */ y.jsx(
|
|
6042
|
-
|
|
6046
|
+
ke,
|
|
6043
6047
|
{
|
|
6044
6048
|
variant: "title",
|
|
6045
6049
|
bindValue: w.title
|
|
@@ -6059,18 +6063,18 @@ const Ws = ({
|
|
|
6059
6063
|
)
|
|
6060
6064
|
)) })
|
|
6061
6065
|
] }),
|
|
6062
|
-
/* @__PURE__ */ y.jsx("tbody", { ...S, children: b.map(({ item: w, index: O, offsetTop:
|
|
6066
|
+
/* @__PURE__ */ y.jsx("tbody", { ...S, children: b.map(({ item: w, index: O, offsetTop: C }) => {
|
|
6063
6067
|
const F = w.rowId || w.value || `${w.isGroup ? "group" : "row"}-${O}`;
|
|
6064
6068
|
return w.isGroup ? /* @__PURE__ */ y.jsx(
|
|
6065
6069
|
Fs,
|
|
6066
6070
|
{
|
|
6067
6071
|
label: w.value || "",
|
|
6068
6072
|
rowHeight: e,
|
|
6069
|
-
offsetTop:
|
|
6073
|
+
offsetTop: C,
|
|
6070
6074
|
level: w.level,
|
|
6071
6075
|
onClick: () => {
|
|
6072
6076
|
const P = w.rowId;
|
|
6073
|
-
P && f((
|
|
6077
|
+
P && f((A) => Vs(A, P));
|
|
6074
6078
|
},
|
|
6075
6079
|
isExpanded: w.isExpanded
|
|
6076
6080
|
},
|
|
@@ -6081,7 +6085,7 @@ const Ws = ({
|
|
|
6081
6085
|
row: w,
|
|
6082
6086
|
columnWidths: m,
|
|
6083
6087
|
rowHeight: e,
|
|
6084
|
-
offsetTop:
|
|
6088
|
+
offsetTop: C,
|
|
6085
6089
|
isGroup: !1
|
|
6086
6090
|
},
|
|
6087
6091
|
`row-${F}`
|
|
@@ -6101,9 +6105,9 @@ const Ws = ({
|
|
|
6101
6105
|
LabelPosition: i = "Left",
|
|
6102
6106
|
onBlur: o,
|
|
6103
6107
|
onClick: l,
|
|
6104
|
-
onOptionsRequest:
|
|
6108
|
+
onOptionsRequest: c
|
|
6105
6109
|
}) => {
|
|
6106
|
-
const [
|
|
6110
|
+
const [u, f] = q();
|
|
6107
6111
|
ne(() => {
|
|
6108
6112
|
f(() => {
|
|
6109
6113
|
if (!r)
|
|
@@ -6115,9 +6119,9 @@ const Ws = ({
|
|
|
6115
6119
|
const m = {
|
|
6116
6120
|
container: `smp-field-container ${de(t) ? `smp-field-position-${n}` : ""}`
|
|
6117
6121
|
}, p = () => {
|
|
6118
|
-
de(t) || o == null || o(
|
|
6122
|
+
de(t) || o == null || o(u);
|
|
6119
6123
|
};
|
|
6120
|
-
if (
|
|
6124
|
+
if (u)
|
|
6121
6125
|
return /* @__PURE__ */ y.jsxs("div", { className: m.container, children: [
|
|
6122
6126
|
/* @__PURE__ */ y.jsx(
|
|
6123
6127
|
"div",
|
|
@@ -6131,10 +6135,10 @@ const Ws = ({
|
|
|
6131
6135
|
children: /* @__PURE__ */ y.jsx(
|
|
6132
6136
|
Te,
|
|
6133
6137
|
{
|
|
6134
|
-
...
|
|
6138
|
+
...u,
|
|
6135
6139
|
id: "FLD",
|
|
6136
6140
|
onChange: f,
|
|
6137
|
-
onOptionsRequest:
|
|
6141
|
+
onOptionsRequest: c,
|
|
6138
6142
|
fun: r == null ? void 0 : r.fun,
|
|
6139
6143
|
onBlur: p,
|
|
6140
6144
|
label: a,
|
|
@@ -6148,7 +6152,7 @@ const Ws = ({
|
|
|
6148
6152
|
Ye,
|
|
6149
6153
|
{
|
|
6150
6154
|
optionalDisplayValue: "Confirm",
|
|
6151
|
-
onClick: () => l == null ? void 0 : l(
|
|
6155
|
+
onClick: () => l == null ? void 0 : l(u),
|
|
6152
6156
|
bindValue: "Confirm"
|
|
6153
6157
|
}
|
|
6154
6158
|
)
|
|
@@ -6176,12 +6180,12 @@ const Ws = ({
|
|
|
6176
6180
|
onContextMenu: l
|
|
6177
6181
|
}) => {
|
|
6178
6182
|
var b, j;
|
|
6179
|
-
const [
|
|
6183
|
+
const [c, u] = q({}), { translate: f } = Le();
|
|
6180
6184
|
ne(() => {
|
|
6181
|
-
|
|
6185
|
+
u(v(r));
|
|
6182
6186
|
}, [r]);
|
|
6183
6187
|
const d = (S, g) => {
|
|
6184
|
-
|
|
6188
|
+
u((D) => ({
|
|
6185
6189
|
...D,
|
|
6186
6190
|
[S]: {
|
|
6187
6191
|
...D[S],
|
|
@@ -6206,11 +6210,11 @@ const Ws = ({
|
|
|
6206
6210
|
});
|
|
6207
6211
|
}, p = async (S) => {
|
|
6208
6212
|
var g, D;
|
|
6209
|
-
if (
|
|
6210
|
-
obj:
|
|
6211
|
-
fun:
|
|
6213
|
+
if (c[S].obj.k != r.rows[0].cells[S].obj.k && ((g = c[S].inputSettings) != null && g.checkObject && o && ((await o({
|
|
6214
|
+
obj: c[S].obj,
|
|
6215
|
+
fun: c[S].fun,
|
|
6212
6216
|
cellId: S
|
|
6213
|
-
})).valid ||
|
|
6217
|
+
})).valid || u((w) => ({
|
|
6214
6218
|
...w,
|
|
6215
6219
|
[S]: {
|
|
6216
6220
|
...w[S],
|
|
@@ -6219,7 +6223,7 @@ const Ws = ({
|
|
|
6219
6223
|
error: f(gt.CHECK_OBJECT_WRONG_VALIDATION)
|
|
6220
6224
|
}
|
|
6221
6225
|
}
|
|
6222
|
-
}))), (D =
|
|
6226
|
+
}))), (D = c[S].inputSettings) != null && D.checkValueOnExit)) {
|
|
6223
6227
|
const k = E();
|
|
6224
6228
|
i == null || i({
|
|
6225
6229
|
value: k,
|
|
@@ -6231,17 +6235,17 @@ const Ws = ({
|
|
|
6231
6235
|
if (!((D = S.rows) != null && D.length) || !((k = S.columns) != null && k.length))
|
|
6232
6236
|
return {};
|
|
6233
6237
|
const g = (w = S.rows) == null ? void 0 : w[0];
|
|
6234
|
-
return S.columns.filter((O) => O.visible ?? !0).reduce((O,
|
|
6238
|
+
return S.columns.filter((O) => O.visible ?? !0).reduce((O, C) => {
|
|
6235
6239
|
const F = {
|
|
6236
|
-
...g.cells[
|
|
6237
|
-
id:
|
|
6238
|
-
label:
|
|
6240
|
+
...g.cells[C.name],
|
|
6241
|
+
id: C.name,
|
|
6242
|
+
label: C.title
|
|
6239
6243
|
};
|
|
6240
|
-
return F.fun && (F.onOptionsRequest = async (P,
|
|
6241
|
-
await s(P,
|
|
6244
|
+
return F.fun && (F.onOptionsRequest = async (P, A) => Ks(
|
|
6245
|
+
await s(P, A, r, C.name)
|
|
6242
6246
|
)), F.isEditable == null && (F.isEditable = !0), e && (F.isEditable = !1), F.isEditable && F.shape == null && (F.shape = te.TEXT_FIELD), {
|
|
6243
6247
|
...O,
|
|
6244
|
-
[
|
|
6248
|
+
[C.name]: F
|
|
6245
6249
|
};
|
|
6246
6250
|
}, {});
|
|
6247
6251
|
}, E = () => ({
|
|
@@ -6251,11 +6255,11 @@ const Ws = ({
|
|
|
6251
6255
|
columns: JSON.parse(JSON.stringify(r.columns)),
|
|
6252
6256
|
rows: [
|
|
6253
6257
|
{
|
|
6254
|
-
cells: JSON.parse(JSON.stringify(
|
|
6258
|
+
cells: JSON.parse(JSON.stringify(c))
|
|
6255
6259
|
}
|
|
6256
6260
|
]
|
|
6257
6261
|
}
|
|
6258
|
-
}), T = ((j = (b = r.setup) == null ? void 0 : b.commands) == null ? void 0 : j.map((S, g) => /* @__PURE__ */
|
|
6262
|
+
}), T = ((j = (b = r.setup) == null ? void 0 : b.commands) == null ? void 0 : j.map((S, g) => /* @__PURE__ */ Wr(
|
|
6259
6263
|
Te,
|
|
6260
6264
|
{
|
|
6261
6265
|
...S,
|
|
@@ -6282,20 +6286,24 @@ const Ws = ({
|
|
|
6282
6286
|
},
|
|
6283
6287
|
"submit-command"
|
|
6284
6288
|
)
|
|
6285
|
-
),
|
|
6289
|
+
), c && /* @__PURE__ */ y.jsxs("div", { "data-component": "input-panel", children: [
|
|
6286
6290
|
/* @__PURE__ */ y.jsx(
|
|
6287
6291
|
"div",
|
|
6288
6292
|
{
|
|
6289
6293
|
style: {
|
|
6290
6294
|
padding: "1em 0"
|
|
6291
6295
|
},
|
|
6292
|
-
children: /* @__PURE__ */ y.jsx(st, { layout: r.rows[0].layout, children: Object.values(
|
|
6296
|
+
children: /* @__PURE__ */ y.jsx(st, { layout: r.rows[0].layout, children: Object.values(c).map((S) => /* @__PURE__ */ y.jsx(
|
|
6293
6297
|
Te,
|
|
6294
6298
|
{
|
|
6295
6299
|
...S,
|
|
6296
6300
|
onChange: (g) => d(S.id, g),
|
|
6297
6301
|
onBlur: () => p(S.id),
|
|
6298
|
-
onContextMenu: l
|
|
6302
|
+
onContextMenu: l,
|
|
6303
|
+
data: {
|
|
6304
|
+
...S.data,
|
|
6305
|
+
autocomplete: "off"
|
|
6306
|
+
}
|
|
6299
6307
|
}
|
|
6300
6308
|
)) })
|
|
6301
6309
|
}
|