@sme.up/ketchup2 2.0.0-SNAPSHOT-20250630152637 → 2.0.0-SNAPSHOT-20250630152733
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/combobox/combobox.d.ts.map +1 -1
- package/dist/basic-components/input-number/input-number.d.ts.map +1 -1
- package/dist/basic-components/textfield/textfield.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.css +1 -1
- package/dist/ketchup2.es.js +848 -840
- package/package.json +1 -1
package/dist/ketchup2.es.js
CHANGED
|
@@ -72,7 +72,7 @@ function Kr() {
|
|
|
72
72
|
switch (typeof h.tag == "number" && console.error(
|
|
73
73
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
74
74
|
), h.$$typeof) {
|
|
75
|
-
case
|
|
75
|
+
case p:
|
|
76
76
|
return "Portal";
|
|
77
77
|
case w:
|
|
78
78
|
return (h.displayName || "Context") + ".Provider";
|
|
@@ -104,11 +104,11 @@ function Kr() {
|
|
|
104
104
|
}
|
|
105
105
|
if (x) {
|
|
106
106
|
x = console;
|
|
107
|
-
var D = x.error,
|
|
107
|
+
var D = x.error, I = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
108
108
|
return D.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
|
+
I
|
|
112
112
|
), e(h);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -155,7 +155,7 @@ function Kr() {
|
|
|
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 c(h, x, D,
|
|
158
|
+
function c(h, x, D, I, j, P, Y, B) {
|
|
159
159
|
return D = P.ref, h = {
|
|
160
160
|
$$typeof: m,
|
|
161
161
|
type: h,
|
|
@@ -179,7 +179,7 @@ function Kr() {
|
|
|
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,
|
|
@@ -187,94 +187,94 @@ function Kr() {
|
|
|
187
187
|
value: B
|
|
188
188
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
189
189
|
}
|
|
190
|
-
function f(h, x, D,
|
|
191
|
-
var
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
for (
|
|
196
|
-
u(
|
|
197
|
-
Object.freeze && Object.freeze(
|
|
190
|
+
function f(h, x, D, I, j, P, Y, B) {
|
|
191
|
+
var W = x.children;
|
|
192
|
+
if (W !== void 0)
|
|
193
|
+
if (I)
|
|
194
|
+
if (L(W)) {
|
|
195
|
+
for (I = 0; I < W.length; I++)
|
|
196
|
+
u(W[I]);
|
|
197
|
+
Object.freeze && Object.freeze(W);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
200
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
201
|
);
|
|
202
|
-
else u(
|
|
202
|
+
else u(W);
|
|
203
203
|
if ($.call(x, "key")) {
|
|
204
|
-
|
|
204
|
+
W = r(h);
|
|
205
205
|
var X = Object.keys(x).filter(function(ae) {
|
|
206
206
|
return ae !== "key";
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
I = 0 < X.length ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}", U[W + I] || (X = 0 < X.length ? "{" + X.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
|
-
|
|
216
|
-
|
|
215
|
+
I,
|
|
216
|
+
W,
|
|
217
217
|
X,
|
|
218
|
-
|
|
219
|
-
),
|
|
218
|
+
W
|
|
219
|
+
), U[W + I] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (
|
|
221
|
+
if (W = null, D !== void 0 && (t(D), W = "" + D), i(x) && (t(x.key), W = "" + x.key), "key" in x) {
|
|
222
222
|
D = {};
|
|
223
|
-
for (var
|
|
224
|
-
|
|
223
|
+
for (var K in x)
|
|
224
|
+
K !== "key" && (D[K] = x[K]);
|
|
225
225
|
} else D = x;
|
|
226
|
-
return
|
|
226
|
+
return W && o(
|
|
227
227
|
D,
|
|
228
228
|
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
|
|
229
229
|
), c(
|
|
230
230
|
h,
|
|
231
|
-
|
|
231
|
+
W,
|
|
232
232
|
P,
|
|
233
233
|
j,
|
|
234
234
|
s(),
|
|
235
235
|
D,
|
|
236
|
-
|
|
236
|
+
Y,
|
|
237
237
|
B
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
function u(h) {
|
|
241
241
|
typeof h == "object" && h !== null && h.$$typeof === m && h._store && (h._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var
|
|
243
|
+
var d = at, m = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), w = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), _ = Symbol.for("react.client.reference"), k = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, L = Array.isArray, M = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
|
-
|
|
246
|
+
d = {
|
|
247
247
|
"react-stack-bottom-frame": function(h) {
|
|
248
248
|
return h();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var A, V = {},
|
|
252
|
-
|
|
251
|
+
var A, V = {}, z = d["react-stack-bottom-frame"].bind(
|
|
252
|
+
d,
|
|
253
253
|
a
|
|
254
|
-
)(), J =
|
|
255
|
-
Ye.Fragment = y, Ye.jsx = function(h, x, D,
|
|
254
|
+
)(), J = M(n(a)), U = {};
|
|
255
|
+
Ye.Fragment = y, Ye.jsx = function(h, x, D, I, j) {
|
|
256
256
|
var P = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return f(
|
|
258
258
|
h,
|
|
259
259
|
x,
|
|
260
260
|
D,
|
|
261
261
|
!1,
|
|
262
|
-
|
|
262
|
+
I,
|
|
263
263
|
j,
|
|
264
|
-
P ? Error("react-stack-top-frame") :
|
|
265
|
-
P ?
|
|
264
|
+
P ? Error("react-stack-top-frame") : z,
|
|
265
|
+
P ? M(n(h)) : J
|
|
266
266
|
);
|
|
267
|
-
}, Ye.jsxs = function(h, x, D,
|
|
267
|
+
}, Ye.jsxs = function(h, x, D, I, j) {
|
|
268
268
|
var P = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
269
269
|
return f(
|
|
270
270
|
h,
|
|
271
271
|
x,
|
|
272
272
|
D,
|
|
273
273
|
!0,
|
|
274
|
-
|
|
274
|
+
I,
|
|
275
275
|
j,
|
|
276
|
-
P ? Error("react-stack-top-frame") :
|
|
277
|
-
P ?
|
|
276
|
+
P ? Error("react-stack-top-frame") : z,
|
|
277
|
+
P ? M(n(h)) : J
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
280
|
}()), Ye;
|
|
@@ -386,53 +386,53 @@ function Zr() {
|
|
|
386
386
|
function i(u) {
|
|
387
387
|
if (!u || typeof u != "object")
|
|
388
388
|
throw new TypeError("argument obj is required");
|
|
389
|
-
var
|
|
389
|
+
var d = u.parameters, m = u.type;
|
|
390
390
|
if (!m || !a.test(m))
|
|
391
391
|
throw new TypeError("invalid type");
|
|
392
|
-
var
|
|
393
|
-
if (
|
|
394
|
-
for (var y, S = Object.keys(
|
|
392
|
+
var p = m;
|
|
393
|
+
if (d && typeof d == "object")
|
|
394
|
+
for (var y, S = Object.keys(d).sort(), E = 0; E < S.length; E++) {
|
|
395
395
|
if (y = S[E], !t.test(y))
|
|
396
396
|
throw new TypeError("invalid parameter name");
|
|
397
|
-
|
|
397
|
+
p += "; " + y + "=" + c(d[y]);
|
|
398
398
|
}
|
|
399
|
-
return
|
|
399
|
+
return p;
|
|
400
400
|
}
|
|
401
401
|
function o(u) {
|
|
402
402
|
if (!u)
|
|
403
403
|
throw new TypeError("argument string is required");
|
|
404
|
-
var
|
|
405
|
-
if (typeof
|
|
404
|
+
var d = typeof u == "object" ? l(u) : u;
|
|
405
|
+
if (typeof d != "string")
|
|
406
406
|
throw new TypeError("argument string is required to be a string");
|
|
407
|
-
var m =
|
|
408
|
-
if (!a.test(
|
|
407
|
+
var m = d.indexOf(";"), p = m !== -1 ? d.slice(0, m).trim() : d.trim();
|
|
408
|
+
if (!a.test(p))
|
|
409
409
|
throw new TypeError("invalid media type");
|
|
410
|
-
var y = new f(
|
|
410
|
+
var y = new f(p.toLowerCase());
|
|
411
411
|
if (m !== -1) {
|
|
412
412
|
var S, E, T;
|
|
413
|
-
for (r.lastIndex = m; E = r.exec(
|
|
413
|
+
for (r.lastIndex = m; E = r.exec(d); ) {
|
|
414
414
|
if (E.index !== m)
|
|
415
415
|
throw new TypeError("invalid parameter format");
|
|
416
416
|
m += E[0].length, S = E[1].toLowerCase(), T = E[2], T.charCodeAt(0) === 34 && (T = T.slice(1, -1), T.indexOf("\\") !== -1 && (T = T.replace(n, "$1"))), y.parameters[S] = T;
|
|
417
417
|
}
|
|
418
|
-
if (m !==
|
|
418
|
+
if (m !== d.length)
|
|
419
419
|
throw new TypeError("invalid parameter format");
|
|
420
420
|
}
|
|
421
421
|
return y;
|
|
422
422
|
}
|
|
423
423
|
function l(u) {
|
|
424
|
-
var
|
|
425
|
-
if (typeof u.getHeader == "function" ?
|
|
424
|
+
var d;
|
|
425
|
+
if (typeof u.getHeader == "function" ? d = u.getHeader("content-type") : typeof u.headers == "object" && (d = u.headers && u.headers["content-type"]), typeof d != "string")
|
|
426
426
|
throw new TypeError("content-type header is missing from object");
|
|
427
|
-
return
|
|
427
|
+
return d;
|
|
428
428
|
}
|
|
429
429
|
function c(u) {
|
|
430
|
-
var
|
|
431
|
-
if (t.test(
|
|
432
|
-
return
|
|
433
|
-
if (
|
|
430
|
+
var d = String(u);
|
|
431
|
+
if (t.test(d))
|
|
432
|
+
return d;
|
|
433
|
+
if (d.length > 0 && !e.test(d))
|
|
434
434
|
throw new TypeError("invalid parameter value");
|
|
435
|
-
return '"' +
|
|
435
|
+
return '"' + d.replace(s, "\\$1") + '"';
|
|
436
436
|
}
|
|
437
437
|
function f(u) {
|
|
438
438
|
this.parameters = /* @__PURE__ */ Object.create(null), this.type = u;
|
|
@@ -522,12 +522,12 @@ var Qr = Zr(), Ne = /* @__PURE__ */ new Map(), Dr = function(e) {
|
|
|
522
522
|
ve.splice(ve.indexOf(e), 1), e = null, o(f);
|
|
523
523
|
return;
|
|
524
524
|
}
|
|
525
|
-
var
|
|
526
|
-
|
|
525
|
+
var d = e.getAttribute("id");
|
|
526
|
+
d && u.setAttribute("id", d);
|
|
527
527
|
var m = e.getAttribute("title");
|
|
528
528
|
m && u.setAttribute("title", m);
|
|
529
|
-
var
|
|
530
|
-
|
|
529
|
+
var p = e.getAttribute("width");
|
|
530
|
+
p && u.setAttribute("width", p);
|
|
531
531
|
var y = e.getAttribute("height");
|
|
532
532
|
y && u.setAttribute("height", y);
|
|
533
533
|
var S = Array.from(new Set(bt(bt(bt([], (u.getAttribute("class") || "").split(" "), !0), ["injected-svg"], !1), (e.getAttribute("class") || "").split(" "), !0))).join(" ").trim();
|
|
@@ -554,8 +554,8 @@ var Qr = Zr(), Ne = /* @__PURE__ */ new Map(), Dr = function(e) {
|
|
|
554
554
|
}, O, b, R, N, C;
|
|
555
555
|
Object.keys(w).forEach(function(J) {
|
|
556
556
|
O = J, R = w[J], b = u.querySelectorAll(O + "[id]");
|
|
557
|
-
for (var
|
|
558
|
-
N = b[
|
|
557
|
+
for (var U = function(I, j) {
|
|
558
|
+
N = b[I].id, C = N + "-" + sn();
|
|
559
559
|
var P;
|
|
560
560
|
Array.prototype.forEach.call(R, function(H) {
|
|
561
561
|
P = u.querySelectorAll("[" + H + '*="' + N + '"]');
|
|
@@ -564,27 +564,27 @@ var Qr = Zr(), Ne = /* @__PURE__ */ new Map(), Dr = function(e) {
|
|
|
564
564
|
se && !se.match(new RegExp('url\\("?#' + N + '"?\\)')) || P[Z].setAttribute(H, "url(#" + C + ")");
|
|
565
565
|
}
|
|
566
566
|
});
|
|
567
|
-
for (var
|
|
568
|
-
var
|
|
569
|
-
|
|
567
|
+
for (var Y = u.querySelectorAll("[*|href]"), B = [], W = 0, X = Y.length; W < X; W++) {
|
|
568
|
+
var K = Y[W].getAttributeNS(vt, "href");
|
|
569
|
+
K && K.toString() === "#" + b[I].id && B.push(Y[W]);
|
|
570
570
|
}
|
|
571
|
-
for (var ae = 0,
|
|
571
|
+
for (var ae = 0, F = B.length; ae < F; ae++)
|
|
572
572
|
B[ae].setAttributeNS(vt, "href", "#" + C);
|
|
573
|
-
b[
|
|
573
|
+
b[I].id = C;
|
|
574
574
|
}, h = 0, x = b.length; h < x; h++)
|
|
575
|
-
|
|
575
|
+
U(h);
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
578
|
u.removeAttribute("xmlns:a");
|
|
579
|
-
for (var v = u.querySelectorAll("script"), _ = [], k, $,
|
|
580
|
-
$ = v[
|
|
579
|
+
for (var v = u.querySelectorAll("script"), _ = [], k, $, L = 0, M = v.length; L < M; L++)
|
|
580
|
+
$ = v[L].getAttribute("type"), (!$ || $ === "application/ecmascript" || $ === "application/javascript" || $ === "text/javascript") && (k = v[L].innerText || v[L].textContent, k && _.push(k), u.removeChild(v[L]));
|
|
581
581
|
if (_.length > 0 && (t === "always" || t === "once" && !Gt[l])) {
|
|
582
582
|
for (var A = 0, V = _.length; A < V; A++)
|
|
583
583
|
new Function(_[A])(window);
|
|
584
584
|
Gt[l] = !0;
|
|
585
585
|
}
|
|
586
|
-
var
|
|
587
|
-
if (Array.prototype.forEach.call(
|
|
586
|
+
var z = u.querySelectorAll("style");
|
|
587
|
+
if (Array.prototype.forEach.call(z, function(J) {
|
|
588
588
|
J.textContent += "";
|
|
589
589
|
}), u.setAttribute("xmlns", an), u.setAttribute("xmlns:xlink", vt), i(u), !e.parentNode) {
|
|
590
590
|
ve.splice(ve.indexOf(e), 1), e = null, o(new Error("Parent node is null"));
|
|
@@ -596,7 +596,7 @@ var Qr = Zr(), Ne = /* @__PURE__ */ new Map(), Dr = function(e) {
|
|
|
596
596
|
var n = t === void 0 ? {} : t, s = n.afterAll, a = s === void 0 ? function() {
|
|
597
597
|
} : s, i = n.afterEach, o = i === void 0 ? function() {
|
|
598
598
|
} : i, l = n.beforeEach, c = l === void 0 ? function() {
|
|
599
|
-
} : l, f = n.cacheRequests, u = f === void 0 ? !0 : f,
|
|
599
|
+
} : l, f = n.cacheRequests, u = f === void 0 ? !0 : f, d = n.evalScripts, m = d === void 0 ? "never" : d, p = n.httpRequestWithCredentials, y = p === void 0 ? !1 : p, S = n.renumerateIRIElements, E = S === void 0 ? !0 : S;
|
|
600
600
|
if (e && "length" in e)
|
|
601
601
|
for (var T = 0, w = 0, O = e.length; w < O; w++)
|
|
602
602
|
Kt(e[w], m, E, u, y, c, function(b, R) {
|
|
@@ -618,7 +618,7 @@ var qt;
|
|
|
618
618
|
function ln() {
|
|
619
619
|
if (qt) return Q;
|
|
620
620
|
qt = 1;
|
|
621
|
-
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, f = r ? Symbol.for("react.forward_ref") : 60112, u = r ? Symbol.for("react.suspense") : 60113,
|
|
621
|
+
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, f = r ? Symbol.for("react.forward_ref") : 60112, u = 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, y = r ? Symbol.for("react.block") : 60121, S = r ? Symbol.for("react.fundamental") : 60117, E = r ? Symbol.for("react.responder") : 60118, T = r ? Symbol.for("react.scope") : 60119;
|
|
622
622
|
function w(b) {
|
|
623
623
|
if (typeof b == "object" && b !== null) {
|
|
624
624
|
var R = b.$$typeof;
|
|
@@ -636,7 +636,7 @@ function ln() {
|
|
|
636
636
|
switch (b = b && b.$$typeof, b) {
|
|
637
637
|
case o:
|
|
638
638
|
case f:
|
|
639
|
-
case
|
|
639
|
+
case p:
|
|
640
640
|
case m:
|
|
641
641
|
case i:
|
|
642
642
|
return b;
|
|
@@ -652,7 +652,7 @@ function ln() {
|
|
|
652
652
|
function O(b) {
|
|
653
653
|
return w(b) === c;
|
|
654
654
|
}
|
|
655
|
-
return Q.AsyncMode = l, Q.ConcurrentMode = c, Q.ContextConsumer = o, Q.ContextProvider = i, Q.Element = e, Q.ForwardRef = f, Q.Fragment = n, Q.Lazy =
|
|
655
|
+
return Q.AsyncMode = l, Q.ConcurrentMode = c, Q.ContextConsumer = o, Q.ContextProvider = i, Q.Element = e, Q.ForwardRef = f, Q.Fragment = n, Q.Lazy = p, Q.Memo = m, Q.Portal = t, Q.Profiler = a, Q.StrictMode = s, Q.Suspense = u, Q.isAsyncMode = function(b) {
|
|
656
656
|
return O(b) || w(b) === l;
|
|
657
657
|
}, Q.isConcurrentMode = O, Q.isContextConsumer = function(b) {
|
|
658
658
|
return w(b) === o;
|
|
@@ -665,7 +665,7 @@ function ln() {
|
|
|
665
665
|
}, Q.isFragment = function(b) {
|
|
666
666
|
return w(b) === n;
|
|
667
667
|
}, Q.isLazy = function(b) {
|
|
668
|
-
return w(b) ===
|
|
668
|
+
return w(b) === p;
|
|
669
669
|
}, Q.isMemo = function(b) {
|
|
670
670
|
return w(b) === m;
|
|
671
671
|
}, Q.isPortal = function(b) {
|
|
@@ -677,7 +677,7 @@ function ln() {
|
|
|
677
677
|
}, Q.isSuspense = function(b) {
|
|
678
678
|
return w(b) === u;
|
|
679
679
|
}, Q.isValidElementType = function(b) {
|
|
680
|
-
return typeof b == "string" || typeof b == "function" || b === n || b === c || b === a || b === s || b === u || b ===
|
|
680
|
+
return typeof b == "string" || typeof b == "function" || b === n || b === c || b === a || b === s || b === u || b === d || typeof b == "object" && b !== null && (b.$$typeof === p || b.$$typeof === m || b.$$typeof === i || b.$$typeof === o || b.$$typeof === f || b.$$typeof === S || b.$$typeof === E || b.$$typeof === T || b.$$typeof === y);
|
|
681
681
|
}, Q.typeOf = w, Q;
|
|
682
682
|
}
|
|
683
683
|
var ee = {};
|
|
@@ -692,17 +692,17 @@ var ee = {};
|
|
|
692
692
|
var zt;
|
|
693
693
|
function cn() {
|
|
694
694
|
return zt || (zt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
695
|
-
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, f = r ? Symbol.for("react.forward_ref") : 60112, u = r ? Symbol.for("react.suspense") : 60113,
|
|
696
|
-
function w(
|
|
697
|
-
return typeof
|
|
698
|
-
|
|
699
|
-
}
|
|
700
|
-
function O(
|
|
701
|
-
if (typeof
|
|
702
|
-
var H =
|
|
695
|
+
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, f = r ? Symbol.for("react.forward_ref") : 60112, u = 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, y = r ? Symbol.for("react.block") : 60121, S = r ? Symbol.for("react.fundamental") : 60117, E = r ? Symbol.for("react.responder") : 60118, T = r ? Symbol.for("react.scope") : 60119;
|
|
696
|
+
function w(F) {
|
|
697
|
+
return typeof F == "string" || typeof F == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
698
|
+
F === n || F === c || F === a || F === s || F === u || F === d || typeof F == "object" && F !== null && (F.$$typeof === p || F.$$typeof === m || F.$$typeof === i || F.$$typeof === o || F.$$typeof === f || F.$$typeof === S || F.$$typeof === E || F.$$typeof === T || F.$$typeof === y);
|
|
699
|
+
}
|
|
700
|
+
function O(F) {
|
|
701
|
+
if (typeof F == "object" && F !== null) {
|
|
702
|
+
var H = F.$$typeof;
|
|
703
703
|
switch (H) {
|
|
704
704
|
case e:
|
|
705
|
-
var Z =
|
|
705
|
+
var Z = F.type;
|
|
706
706
|
switch (Z) {
|
|
707
707
|
case l:
|
|
708
708
|
case c:
|
|
@@ -716,7 +716,7 @@ function cn() {
|
|
|
716
716
|
switch (ne) {
|
|
717
717
|
case o:
|
|
718
718
|
case f:
|
|
719
|
-
case
|
|
719
|
+
case p:
|
|
720
720
|
case m:
|
|
721
721
|
case i:
|
|
722
722
|
return ne;
|
|
@@ -729,47 +729,47 @@ function cn() {
|
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
|
-
var b = l, R = c, N = o, C = i, v = e, _ = f, k = n, $ =
|
|
733
|
-
function
|
|
734
|
-
return J || (J = !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(
|
|
732
|
+
var b = l, R = c, N = o, C = i, v = e, _ = f, k = n, $ = p, L = m, M = t, A = a, V = s, z = u, J = !1;
|
|
733
|
+
function U(F) {
|
|
734
|
+
return J || (J = !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(F) || O(F) === l;
|
|
735
735
|
}
|
|
736
|
-
function h(
|
|
737
|
-
return O(
|
|
736
|
+
function h(F) {
|
|
737
|
+
return O(F) === c;
|
|
738
738
|
}
|
|
739
|
-
function x(
|
|
740
|
-
return O(
|
|
739
|
+
function x(F) {
|
|
740
|
+
return O(F) === o;
|
|
741
741
|
}
|
|
742
|
-
function D(
|
|
743
|
-
return O(
|
|
742
|
+
function D(F) {
|
|
743
|
+
return O(F) === i;
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
return typeof
|
|
745
|
+
function I(F) {
|
|
746
|
+
return typeof F == "object" && F !== null && F.$$typeof === e;
|
|
747
747
|
}
|
|
748
|
-
function j(
|
|
749
|
-
return O(
|
|
748
|
+
function j(F) {
|
|
749
|
+
return O(F) === f;
|
|
750
750
|
}
|
|
751
|
-
function P(
|
|
752
|
-
return O(
|
|
751
|
+
function P(F) {
|
|
752
|
+
return O(F) === n;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
755
|
-
return O(
|
|
754
|
+
function Y(F) {
|
|
755
|
+
return O(F) === p;
|
|
756
756
|
}
|
|
757
|
-
function B(
|
|
758
|
-
return O(
|
|
757
|
+
function B(F) {
|
|
758
|
+
return O(F) === m;
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
return O(
|
|
760
|
+
function W(F) {
|
|
761
|
+
return O(F) === t;
|
|
762
762
|
}
|
|
763
|
-
function X(
|
|
764
|
-
return O(
|
|
763
|
+
function X(F) {
|
|
764
|
+
return O(F) === a;
|
|
765
765
|
}
|
|
766
|
-
function
|
|
767
|
-
return O(
|
|
766
|
+
function K(F) {
|
|
767
|
+
return O(F) === s;
|
|
768
768
|
}
|
|
769
|
-
function ae(
|
|
770
|
-
return O(
|
|
769
|
+
function ae(F) {
|
|
770
|
+
return O(F) === u;
|
|
771
771
|
}
|
|
772
|
-
ee.AsyncMode = b, ee.ConcurrentMode = R, ee.ContextConsumer = N, ee.ContextProvider = C, ee.Element = v, ee.ForwardRef = _, ee.Fragment = k, ee.Lazy = $, ee.Memo =
|
|
772
|
+
ee.AsyncMode = b, ee.ConcurrentMode = R, ee.ContextConsumer = N, ee.ContextProvider = C, ee.Element = v, ee.ForwardRef = _, ee.Fragment = k, ee.Lazy = $, ee.Memo = L, ee.Portal = M, ee.Profiler = A, ee.StrictMode = V, ee.Suspense = z, ee.isAsyncMode = U, ee.isConcurrentMode = h, ee.isContextConsumer = x, ee.isContextProvider = D, ee.isElement = I, ee.isForwardRef = j, ee.isFragment = P, ee.isLazy = Y, ee.isMemo = B, ee.isPortal = W, ee.isProfiler = X, ee.isStrictMode = K, ee.isSuspense = ae, ee.isValidElementType = w, ee.typeOf = O;
|
|
773
773
|
}()), ee;
|
|
774
774
|
}
|
|
775
775
|
var Jt;
|
|
@@ -820,8 +820,8 @@ function un() {
|
|
|
820
820
|
e.call(o, u) && (l[u] = o[u]);
|
|
821
821
|
if (r) {
|
|
822
822
|
c = r(o);
|
|
823
|
-
for (var
|
|
824
|
-
t.call(o, c[
|
|
823
|
+
for (var d = 0; d < c.length; d++)
|
|
824
|
+
t.call(o, c[d]) && (l[c[d]] = o[c[d]]);
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
827
|
return l;
|
|
@@ -862,14 +862,14 @@ function fn() {
|
|
|
862
862
|
var u;
|
|
863
863
|
try {
|
|
864
864
|
if (typeof a[f] != "function") {
|
|
865
|
-
var
|
|
865
|
+
var d = Error(
|
|
866
866
|
(l || "React class") + ": " + o + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
867
867
|
);
|
|
868
|
-
throw
|
|
868
|
+
throw d.name = "Invariant Violation", d;
|
|
869
869
|
}
|
|
870
870
|
u = a[f](i, f, l, o, null, e);
|
|
871
|
-
} catch (
|
|
872
|
-
u =
|
|
871
|
+
} catch (p) {
|
|
872
|
+
u = p;
|
|
873
873
|
}
|
|
874
874
|
if (u && !(u instanceof Error) && r(
|
|
875
875
|
(l || "React class") + ": type specification of " + o + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
@@ -911,7 +911,7 @@ function dn() {
|
|
|
911
911
|
if (typeof x == "function")
|
|
912
912
|
return x;
|
|
913
913
|
}
|
|
914
|
-
var
|
|
914
|
+
var d = "<<anonymous>>", m = {
|
|
915
915
|
array: E("array"),
|
|
916
916
|
bigint: E("bigint"),
|
|
917
917
|
bool: E("boolean"),
|
|
@@ -930,9 +930,9 @@ function dn() {
|
|
|
930
930
|
oneOf: N,
|
|
931
931
|
oneOfType: v,
|
|
932
932
|
shape: $,
|
|
933
|
-
exact:
|
|
933
|
+
exact: L
|
|
934
934
|
};
|
|
935
|
-
function
|
|
935
|
+
function p(h, x) {
|
|
936
936
|
return h === x ? h !== 0 || 1 / h === 1 / x : h !== h && x !== x;
|
|
937
937
|
}
|
|
938
938
|
function y(h, x) {
|
|
@@ -942,33 +942,33 @@ function dn() {
|
|
|
942
942
|
function S(h) {
|
|
943
943
|
if (process.env.NODE_ENV !== "production")
|
|
944
944
|
var x = {}, D = 0;
|
|
945
|
-
function
|
|
946
|
-
if (
|
|
945
|
+
function I(P, Y, B, W, X, K, ae) {
|
|
946
|
+
if (W = W || d, K = K || B, ae !== t) {
|
|
947
947
|
if (l) {
|
|
948
|
-
var
|
|
948
|
+
var F = new Error(
|
|
949
949
|
"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"
|
|
950
950
|
);
|
|
951
|
-
throw
|
|
951
|
+
throw F.name = "Invariant Violation", F;
|
|
952
952
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
953
|
-
var H =
|
|
953
|
+
var H = W + ":" + B;
|
|
954
954
|
!x[H] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
955
955
|
D < 3 && (a(
|
|
956
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
956
|
+
"You are manually calling a React.PropTypes validation function for the `" + K + "` prop on `" + W + "`. 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."
|
|
957
957
|
), x[H] = !0, D++);
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
|
-
return
|
|
960
|
+
return Y[B] == null ? P ? Y[B] === null ? new y("The " + X + " `" + K + "` is marked as required " + ("in `" + W + "`, but its value is `null`.")) : new y("The " + X + " `" + K + "` is marked as required in " + ("`" + W + "`, but its value is `undefined`.")) : null : h(Y, B, W, X, K);
|
|
961
961
|
}
|
|
962
|
-
var j =
|
|
963
|
-
return j.isRequired =
|
|
962
|
+
var j = I.bind(null, !1);
|
|
963
|
+
return j.isRequired = I.bind(null, !0), j;
|
|
964
964
|
}
|
|
965
965
|
function E(h) {
|
|
966
|
-
function x(D,
|
|
967
|
-
var
|
|
966
|
+
function x(D, I, j, P, Y, B) {
|
|
967
|
+
var W = D[I], X = V(W);
|
|
968
968
|
if (X !== h) {
|
|
969
|
-
var
|
|
969
|
+
var K = z(W);
|
|
970
970
|
return new y(
|
|
971
|
-
"Invalid " + P + " `" +
|
|
971
|
+
"Invalid " + P + " `" + Y + "` of type " + ("`" + K + "` supplied to `" + j + "`, expected ") + ("`" + h + "`."),
|
|
972
972
|
{ expectedType: h }
|
|
973
973
|
);
|
|
974
974
|
}
|
|
@@ -980,50 +980,50 @@ function dn() {
|
|
|
980
980
|
return S(i);
|
|
981
981
|
}
|
|
982
982
|
function w(h) {
|
|
983
|
-
function x(D,
|
|
983
|
+
function x(D, I, j, P, Y) {
|
|
984
984
|
if (typeof h != "function")
|
|
985
|
-
return new y("Property `" +
|
|
986
|
-
var B = D[
|
|
985
|
+
return new y("Property `" + Y + "` of component `" + j + "` has invalid PropType notation inside arrayOf.");
|
|
986
|
+
var B = D[I];
|
|
987
987
|
if (!Array.isArray(B)) {
|
|
988
|
-
var
|
|
989
|
-
return new y("Invalid " + P + " `" +
|
|
988
|
+
var W = V(B);
|
|
989
|
+
return new y("Invalid " + P + " `" + Y + "` of type " + ("`" + W + "` supplied to `" + j + "`, expected an array."));
|
|
990
990
|
}
|
|
991
991
|
for (var X = 0; X < B.length; X++) {
|
|
992
|
-
var
|
|
993
|
-
if (
|
|
994
|
-
return
|
|
992
|
+
var K = h(B, X, j, P, Y + "[" + X + "]", t);
|
|
993
|
+
if (K instanceof Error)
|
|
994
|
+
return K;
|
|
995
995
|
}
|
|
996
996
|
return null;
|
|
997
997
|
}
|
|
998
998
|
return S(x);
|
|
999
999
|
}
|
|
1000
1000
|
function O() {
|
|
1001
|
-
function h(x, D,
|
|
1002
|
-
var
|
|
1003
|
-
if (!o(
|
|
1004
|
-
var B = V(
|
|
1005
|
-
return new y("Invalid " + j + " `" + P + "` of type " + ("`" + B + "` supplied to `" +
|
|
1001
|
+
function h(x, D, I, j, P) {
|
|
1002
|
+
var Y = x[D];
|
|
1003
|
+
if (!o(Y)) {
|
|
1004
|
+
var B = V(Y);
|
|
1005
|
+
return new y("Invalid " + j + " `" + P + "` of type " + ("`" + B + "` supplied to `" + I + "`, expected a single ReactElement."));
|
|
1006
1006
|
}
|
|
1007
1007
|
return null;
|
|
1008
1008
|
}
|
|
1009
1009
|
return S(h);
|
|
1010
1010
|
}
|
|
1011
1011
|
function b() {
|
|
1012
|
-
function h(x, D,
|
|
1013
|
-
var
|
|
1014
|
-
if (!r.isValidElementType(
|
|
1015
|
-
var B = V(
|
|
1016
|
-
return new y("Invalid " + j + " `" + P + "` of type " + ("`" + B + "` supplied to `" +
|
|
1012
|
+
function h(x, D, I, j, P) {
|
|
1013
|
+
var Y = x[D];
|
|
1014
|
+
if (!r.isValidElementType(Y)) {
|
|
1015
|
+
var B = V(Y);
|
|
1016
|
+
return new y("Invalid " + j + " `" + P + "` of type " + ("`" + B + "` supplied to `" + I + "`, expected a single ReactElement type."));
|
|
1017
1017
|
}
|
|
1018
1018
|
return null;
|
|
1019
1019
|
}
|
|
1020
1020
|
return S(h);
|
|
1021
1021
|
}
|
|
1022
1022
|
function R(h) {
|
|
1023
|
-
function x(D,
|
|
1024
|
-
if (!(D[
|
|
1025
|
-
var B = h.name ||
|
|
1026
|
-
return new y("Invalid " + P + " `" +
|
|
1023
|
+
function x(D, I, j, P, Y) {
|
|
1024
|
+
if (!(D[I] instanceof h)) {
|
|
1025
|
+
var B = h.name || d, W = U(D[I]);
|
|
1026
|
+
return new y("Invalid " + P + " `" + Y + "` of type " + ("`" + W + "` supplied to `" + j + "`, expected ") + ("instance of `" + B + "`."));
|
|
1027
1027
|
}
|
|
1028
1028
|
return null;
|
|
1029
1029
|
}
|
|
@@ -1034,30 +1034,30 @@ function dn() {
|
|
|
1034
1034
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
1035
1035
|
"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])."
|
|
1036
1036
|
) : a("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
1037
|
-
function x(D,
|
|
1038
|
-
for (var B = D[
|
|
1039
|
-
if (
|
|
1037
|
+
function x(D, I, j, P, Y) {
|
|
1038
|
+
for (var B = D[I], W = 0; W < h.length; W++)
|
|
1039
|
+
if (p(B, h[W]))
|
|
1040
1040
|
return null;
|
|
1041
|
-
var X = JSON.stringify(h, function(ae,
|
|
1042
|
-
var H =
|
|
1043
|
-
return H === "symbol" ? String(
|
|
1041
|
+
var X = JSON.stringify(h, function(ae, F) {
|
|
1042
|
+
var H = z(F);
|
|
1043
|
+
return H === "symbol" ? String(F) : F;
|
|
1044
1044
|
});
|
|
1045
|
-
return new y("Invalid " + P + " `" +
|
|
1045
|
+
return new y("Invalid " + P + " `" + Y + "` of value `" + String(B) + "` " + ("supplied to `" + j + "`, expected one of " + X + "."));
|
|
1046
1046
|
}
|
|
1047
1047
|
return S(x);
|
|
1048
1048
|
}
|
|
1049
1049
|
function C(h) {
|
|
1050
|
-
function x(D,
|
|
1050
|
+
function x(D, I, j, P, Y) {
|
|
1051
1051
|
if (typeof h != "function")
|
|
1052
|
-
return new y("Property `" +
|
|
1053
|
-
var B = D[
|
|
1054
|
-
if (
|
|
1055
|
-
return new y("Invalid " + P + " `" +
|
|
1052
|
+
return new y("Property `" + Y + "` of component `" + j + "` has invalid PropType notation inside objectOf.");
|
|
1053
|
+
var B = D[I], W = V(B);
|
|
1054
|
+
if (W !== "object")
|
|
1055
|
+
return new y("Invalid " + P + " `" + Y + "` of type " + ("`" + W + "` supplied to `" + j + "`, expected an object."));
|
|
1056
1056
|
for (var X in B)
|
|
1057
1057
|
if (n(B, X)) {
|
|
1058
|
-
var
|
|
1059
|
-
if (
|
|
1060
|
-
return
|
|
1058
|
+
var K = h(B, X, j, P, Y + "." + X, t);
|
|
1059
|
+
if (K instanceof Error)
|
|
1060
|
+
return K;
|
|
1061
1061
|
}
|
|
1062
1062
|
return null;
|
|
1063
1063
|
}
|
|
@@ -1073,39 +1073,39 @@ function dn() {
|
|
|
1073
1073
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + J(D) + " at index " + x + "."
|
|
1074
1074
|
), i;
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
for (var X = [],
|
|
1078
|
-
var ae = h[
|
|
1079
|
-
if (
|
|
1076
|
+
function I(j, P, Y, B, W) {
|
|
1077
|
+
for (var X = [], K = 0; K < h.length; K++) {
|
|
1078
|
+
var ae = h[K], F = ae(j, P, Y, B, W, t);
|
|
1079
|
+
if (F == null)
|
|
1080
1080
|
return null;
|
|
1081
|
-
|
|
1081
|
+
F.data && n(F.data, "expectedType") && X.push(F.data.expectedType);
|
|
1082
1082
|
}
|
|
1083
1083
|
var H = X.length > 0 ? ", expected one of type [" + X.join(", ") + "]" : "";
|
|
1084
|
-
return new y("Invalid " + B + " `" +
|
|
1084
|
+
return new y("Invalid " + B + " `" + W + "` supplied to " + ("`" + Y + "`" + H + "."));
|
|
1085
1085
|
}
|
|
1086
|
-
return S(
|
|
1086
|
+
return S(I);
|
|
1087
1087
|
}
|
|
1088
1088
|
function _() {
|
|
1089
|
-
function h(x, D,
|
|
1090
|
-
return
|
|
1089
|
+
function h(x, D, I, j, P) {
|
|
1090
|
+
return M(x[D]) ? null : new y("Invalid " + j + " `" + P + "` supplied to " + ("`" + I + "`, expected a ReactNode."));
|
|
1091
1091
|
}
|
|
1092
1092
|
return S(h);
|
|
1093
1093
|
}
|
|
1094
|
-
function k(h, x, D,
|
|
1094
|
+
function k(h, x, D, I, j) {
|
|
1095
1095
|
return new y(
|
|
1096
|
-
(h || "React class") + ": " + x + " type `" + D + "." +
|
|
1096
|
+
(h || "React class") + ": " + x + " type `" + D + "." + I + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + j + "`."
|
|
1097
1097
|
);
|
|
1098
1098
|
}
|
|
1099
1099
|
function $(h) {
|
|
1100
|
-
function x(D,
|
|
1101
|
-
var B = D[
|
|
1102
|
-
if (
|
|
1103
|
-
return new y("Invalid " + P + " `" +
|
|
1100
|
+
function x(D, I, j, P, Y) {
|
|
1101
|
+
var B = D[I], W = V(B);
|
|
1102
|
+
if (W !== "object")
|
|
1103
|
+
return new y("Invalid " + P + " `" + Y + "` of type `" + W + "` " + ("supplied to `" + j + "`, expected `object`."));
|
|
1104
1104
|
for (var X in h) {
|
|
1105
|
-
var
|
|
1106
|
-
if (typeof
|
|
1107
|
-
return k(j, P,
|
|
1108
|
-
var ae =
|
|
1105
|
+
var K = h[X];
|
|
1106
|
+
if (typeof K != "function")
|
|
1107
|
+
return k(j, P, Y, X, z(K));
|
|
1108
|
+
var ae = K(B, X, j, P, Y + "." + X, t);
|
|
1109
1109
|
if (ae)
|
|
1110
1110
|
return ae;
|
|
1111
1111
|
}
|
|
@@ -1113,30 +1113,30 @@ function dn() {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
return S(x);
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1117
|
-
function x(D,
|
|
1118
|
-
var B = D[
|
|
1119
|
-
if (
|
|
1120
|
-
return new y("Invalid " + P + " `" +
|
|
1121
|
-
var X = e({}, D[
|
|
1122
|
-
for (var
|
|
1123
|
-
var ae = h[
|
|
1124
|
-
if (n(h,
|
|
1125
|
-
return k(j, P,
|
|
1116
|
+
function L(h) {
|
|
1117
|
+
function x(D, I, j, P, Y) {
|
|
1118
|
+
var B = D[I], W = V(B);
|
|
1119
|
+
if (W !== "object")
|
|
1120
|
+
return new y("Invalid " + P + " `" + Y + "` of type `" + W + "` " + ("supplied to `" + j + "`, expected `object`."));
|
|
1121
|
+
var X = e({}, D[I], h);
|
|
1122
|
+
for (var K in X) {
|
|
1123
|
+
var ae = h[K];
|
|
1124
|
+
if (n(h, K) && typeof ae != "function")
|
|
1125
|
+
return k(j, P, Y, K, z(ae));
|
|
1126
1126
|
if (!ae)
|
|
1127
1127
|
return new y(
|
|
1128
|
-
"Invalid " + P + " `" +
|
|
1128
|
+
"Invalid " + P + " `" + Y + "` key `" + K + "` supplied to `" + j + "`.\nBad object: " + JSON.stringify(D[I], null, " ") + `
|
|
1129
1129
|
Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
1130
1130
|
);
|
|
1131
|
-
var
|
|
1132
|
-
if (
|
|
1133
|
-
return
|
|
1131
|
+
var F = ae(B, K, j, P, Y + "." + K, t);
|
|
1132
|
+
if (F)
|
|
1133
|
+
return F;
|
|
1134
1134
|
}
|
|
1135
1135
|
return null;
|
|
1136
1136
|
}
|
|
1137
1137
|
return S(x);
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function M(h) {
|
|
1140
1140
|
switch (typeof h) {
|
|
1141
1141
|
case "number":
|
|
1142
1142
|
case "string":
|
|
@@ -1146,20 +1146,20 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1146
1146
|
return !h;
|
|
1147
1147
|
case "object":
|
|
1148
1148
|
if (Array.isArray(h))
|
|
1149
|
-
return h.every(
|
|
1149
|
+
return h.every(M);
|
|
1150
1150
|
if (h === null || o(h))
|
|
1151
1151
|
return !0;
|
|
1152
1152
|
var x = u(h);
|
|
1153
1153
|
if (x) {
|
|
1154
|
-
var D = x.call(h),
|
|
1154
|
+
var D = x.call(h), I;
|
|
1155
1155
|
if (x !== h.entries) {
|
|
1156
|
-
for (; !(
|
|
1157
|
-
if (!
|
|
1156
|
+
for (; !(I = D.next()).done; )
|
|
1157
|
+
if (!M(I.value))
|
|
1158
1158
|
return !1;
|
|
1159
1159
|
} else
|
|
1160
|
-
for (; !(
|
|
1161
|
-
var j =
|
|
1162
|
-
if (j && !
|
|
1160
|
+
for (; !(I = D.next()).done; ) {
|
|
1161
|
+
var j = I.value;
|
|
1162
|
+
if (j && !M(j[1]))
|
|
1163
1163
|
return !1;
|
|
1164
1164
|
}
|
|
1165
1165
|
} else
|
|
@@ -1176,7 +1176,7 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1176
1176
|
var x = typeof h;
|
|
1177
1177
|
return Array.isArray(h) ? "array" : h instanceof RegExp ? "object" : A(x, h) ? "symbol" : x;
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function z(h) {
|
|
1180
1180
|
if (typeof h > "u" || h === null)
|
|
1181
1181
|
return "" + h;
|
|
1182
1182
|
var x = V(h);
|
|
@@ -1189,7 +1189,7 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1189
1189
|
return x;
|
|
1190
1190
|
}
|
|
1191
1191
|
function J(h) {
|
|
1192
|
-
var x =
|
|
1192
|
+
var x = z(h);
|
|
1193
1193
|
switch (x) {
|
|
1194
1194
|
case "array":
|
|
1195
1195
|
case "object":
|
|
@@ -1202,8 +1202,8 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1202
1202
|
return x;
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return !h.constructor || !h.constructor.name ?
|
|
1205
|
+
function U(h) {
|
|
1206
|
+
return !h.constructor || !h.constructor.name ? d : h.constructor.name;
|
|
1207
1207
|
}
|
|
1208
1208
|
return m.checkPropTypes = s, m.resetWarningCache = s.resetWarningCache, m.PropTypes = m, m;
|
|
1209
1209
|
}, Tt;
|
|
@@ -1220,10 +1220,10 @@ function pn() {
|
|
|
1220
1220
|
return t.resetWarningCache = e, Ot = function() {
|
|
1221
1221
|
function n(i, o, l, c, f, u) {
|
|
1222
1222
|
if (u !== r) {
|
|
1223
|
-
var
|
|
1223
|
+
var d = new Error(
|
|
1224
1224
|
"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"
|
|
1225
1225
|
);
|
|
1226
|
-
throw
|
|
1226
|
+
throw d.name = "Invariant Violation", d;
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
1229
|
n.isRequired = n;
|
|
@@ -1293,7 +1293,7 @@ var oe = /* @__PURE__ */ hn(), mn = function(e) {
|
|
|
1293
1293
|
return t.renderSVG = function() {
|
|
1294
1294
|
var s = this;
|
|
1295
1295
|
if (this.reactWrapper instanceof mn(this.reactWrapper).Node) {
|
|
1296
|
-
var a = this.props, i = a.desc, o = a.evalScripts, l = a.httpRequestWithCredentials, c = a.renumerateIRIElements, f = a.src, u = a.title,
|
|
1296
|
+
var a = this.props, i = a.desc, o = a.evalScripts, l = a.httpRequestWithCredentials, c = a.renumerateIRIElements, f = a.src, u = a.title, d = a.useRequestCache, m = this.props.onError, p = this.props.beforeInjection, y = this.props.afterInjection, S = this.props.wrapper, E, T;
|
|
1297
1297
|
S === "svg" ? (E = document.createElementNS(Ze, S), E.setAttribute("xmlns", Ze), E.setAttribute("xmlns:xlink", sr), T = document.createElementNS(Ze, S)) : (E = document.createElement(S), T = document.createElement(S)), E.appendChild(T), T.dataset.src = f, this.nonReactWrapper = this.reactWrapper.appendChild(E);
|
|
1298
1298
|
var w = function(N) {
|
|
1299
1299
|
if (s.removeSVG(), !s._isMounted) {
|
|
@@ -1338,7 +1338,7 @@ var oe = /* @__PURE__ */ hn(), mn = function(e) {
|
|
|
1338
1338
|
k.innerHTML = u, N.prepend(k);
|
|
1339
1339
|
}
|
|
1340
1340
|
try {
|
|
1341
|
-
|
|
1341
|
+
p(N);
|
|
1342
1342
|
} catch ($) {
|
|
1343
1343
|
w($);
|
|
1344
1344
|
}
|
|
@@ -1346,7 +1346,7 @@ var oe = /* @__PURE__ */ hn(), mn = function(e) {
|
|
|
1346
1346
|
on(T, {
|
|
1347
1347
|
afterEach: O,
|
|
1348
1348
|
beforeEach: b,
|
|
1349
|
-
cacheRequests:
|
|
1349
|
+
cacheRequests: d,
|
|
1350
1350
|
evalScripts: o,
|
|
1351
1351
|
httpRequestWithCredentials: l,
|
|
1352
1352
|
renumerateIRIElements: c
|
|
@@ -1434,9 +1434,9 @@ const ra = (r) => {
|
|
|
1434
1434
|
isInteractable: c = !1,
|
|
1435
1435
|
spin: f = !1,
|
|
1436
1436
|
title: u,
|
|
1437
|
-
tabIndex:
|
|
1437
|
+
tabIndex: d
|
|
1438
1438
|
}) => {
|
|
1439
|
-
const [m,
|
|
1439
|
+
const [m, p] = G(r), y = (r == null ? void 0 : r.startsWith("http")) || (r == null ? void 0 : r.startsWith("/")), S = y && (r == null ? void 0 : r.toLowerCase().endsWith(".svg")), E = ar(`assets/svg/${r}.svg`), T = ar(
|
|
1440
1440
|
`assets/svg/${n}.svg`
|
|
1441
1441
|
), w = {
|
|
1442
1442
|
img: `${c ? "smp-image-interactable" : ""}`,
|
|
@@ -1461,7 +1461,7 @@ const ra = (r) => {
|
|
|
1461
1461
|
className: w.svg,
|
|
1462
1462
|
onClick: O,
|
|
1463
1463
|
onKeyDown: b,
|
|
1464
|
-
tabIndex:
|
|
1464
|
+
tabIndex: d
|
|
1465
1465
|
}
|
|
1466
1466
|
) : y ? (
|
|
1467
1467
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
@@ -1472,7 +1472,7 @@ const ra = (r) => {
|
|
|
1472
1472
|
width: e || "16px",
|
|
1473
1473
|
height: t || "auto",
|
|
1474
1474
|
alt: u,
|
|
1475
|
-
onError: () =>
|
|
1475
|
+
onError: () => p(T),
|
|
1476
1476
|
onClick: O,
|
|
1477
1477
|
className: w.img,
|
|
1478
1478
|
title: u,
|
|
@@ -1496,7 +1496,7 @@ const ra = (r) => {
|
|
|
1496
1496
|
className: w.svg,
|
|
1497
1497
|
onClick: O,
|
|
1498
1498
|
onKeyDown: b,
|
|
1499
|
-
tabIndex:
|
|
1499
|
+
tabIndex: d
|
|
1500
1500
|
}
|
|
1501
1501
|
) });
|
|
1502
1502
|
}
|
|
@@ -1523,14 +1523,14 @@ const ra = (r) => {
|
|
|
1523
1523
|
showText: c = !0,
|
|
1524
1524
|
fullWidth: f = !1,
|
|
1525
1525
|
loading: u = !1,
|
|
1526
|
-
justify:
|
|
1526
|
+
justify: d = "center",
|
|
1527
1527
|
title: m,
|
|
1528
|
-
optionalDisplayValue:
|
|
1528
|
+
optionalDisplayValue: p,
|
|
1529
1529
|
squared: y = !1,
|
|
1530
1530
|
submit: S = !1
|
|
1531
1531
|
}) => {
|
|
1532
1532
|
const E = {
|
|
1533
|
-
container: `smp-button smp-button-container ${a ? `smp-button-${a}` : ""} ${i ? `smp-buttonVariant-${i}` : ""} ${o ? `smp-buttonType-${o}` : ""} ${f ? "smp-button-fullWidth" : ""} smp-justifyContent-${
|
|
1533
|
+
container: `smp-button smp-button-container ${a ? `smp-button-${a}` : ""} ${i ? `smp-buttonVariant-${i}` : ""} ${o ? `smp-buttonType-${o}` : ""} ${f ? "smp-button-fullWidth" : ""} smp-justifyContent-${d} ${y && !c ? "smp-button-squared" : ""}`
|
|
1534
1534
|
};
|
|
1535
1535
|
return /* @__PURE__ */ g.jsx(
|
|
1536
1536
|
"button",
|
|
@@ -1542,7 +1542,7 @@ const ra = (r) => {
|
|
|
1542
1542
|
"aria-label": t,
|
|
1543
1543
|
disabled: s,
|
|
1544
1544
|
"aria-busy": u,
|
|
1545
|
-
title: m ||
|
|
1545
|
+
title: m || p,
|
|
1546
1546
|
children: u ? /* @__PURE__ */ g.jsx(le, { icon: "spinner", state: or(i), spin: !0 }) : /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
1547
1547
|
n && l && /* @__PURE__ */ g.jsx(
|
|
1548
1548
|
le,
|
|
@@ -1554,7 +1554,7 @@ const ra = (r) => {
|
|
|
1554
1554
|
height: ir(a)
|
|
1555
1555
|
}
|
|
1556
1556
|
),
|
|
1557
|
-
c && /* @__PURE__ */ g.jsx("span", { children:
|
|
1557
|
+
c && /* @__PURE__ */ g.jsx("span", { children: p || r })
|
|
1558
1558
|
] })
|
|
1559
1559
|
}
|
|
1560
1560
|
);
|
|
@@ -1604,9 +1604,9 @@ const ra = (r) => {
|
|
|
1604
1604
|
selectedIndex: n,
|
|
1605
1605
|
onTabChange: s
|
|
1606
1606
|
}) => {
|
|
1607
|
-
const [a, i] = G(0), o = n ?? a, [l, c] = G(!1), [f, u] = G(!1),
|
|
1607
|
+
const [a, i] = G(0), o = n ?? a, [l, c] = G(!1), [f, u] = G(!1), d = ce(null);
|
|
1608
1608
|
if (re(() => {
|
|
1609
|
-
const w =
|
|
1609
|
+
const w = d.current;
|
|
1610
1610
|
if (!w) return;
|
|
1611
1611
|
S();
|
|
1612
1612
|
const O = () => S();
|
|
@@ -1623,17 +1623,17 @@ const ra = (r) => {
|
|
|
1623
1623
|
scrollButtonRight: `${xe["smp-tabbar-scroll-button"]} ${xe["smp-tabbar-scroll-buttonRight"]}`,
|
|
1624
1624
|
scrollButtonLeft: `${xe["smp-tabbar-scroll-button"]} ${xe["smp-tabbar-scroll-buttonLeft"]}`,
|
|
1625
1625
|
active: xe["smp-active"]
|
|
1626
|
-
},
|
|
1627
|
-
const w =
|
|
1626
|
+
}, p = 100, y = 2, S = () => {
|
|
1627
|
+
const w = d.current;
|
|
1628
1628
|
w && (c(w.scrollLeft > 0), u(
|
|
1629
1629
|
w.scrollLeft + w.clientWidth < w.scrollWidth - y
|
|
1630
1630
|
));
|
|
1631
1631
|
}, E = () => {
|
|
1632
1632
|
var w;
|
|
1633
|
-
(w =
|
|
1633
|
+
(w = d.current) == null || w.scrollBy({ left: -p, behavior: "smooth" });
|
|
1634
1634
|
}, T = () => {
|
|
1635
1635
|
var w;
|
|
1636
|
-
(w =
|
|
1636
|
+
(w = d.current) == null || w.scrollBy({ left: p, behavior: "smooth" });
|
|
1637
1637
|
};
|
|
1638
1638
|
return /* @__PURE__ */ g.jsxs(
|
|
1639
1639
|
"div",
|
|
@@ -1652,7 +1652,7 @@ const ra = (r) => {
|
|
|
1652
1652
|
sizing: e
|
|
1653
1653
|
}
|
|
1654
1654
|
) }),
|
|
1655
|
-
/* @__PURE__ */ g.jsx("div", { className: m.listWrapper, children: /* @__PURE__ */ g.jsx("div", { className: m.list, ref:
|
|
1655
|
+
/* @__PURE__ */ g.jsx("div", { className: m.listWrapper, children: /* @__PURE__ */ g.jsx("div", { className: m.list, ref: d, role: "tablist", children: r.children.map((w, O) => /* @__PURE__ */ g.jsxs(
|
|
1656
1656
|
"button",
|
|
1657
1657
|
{
|
|
1658
1658
|
className: `${O === a ? m.active : ""} ${m.tab} `,
|
|
@@ -1725,13 +1725,13 @@ const ra = (r) => {
|
|
|
1725
1725
|
}
|
|
1726
1726
|
}) => {
|
|
1727
1727
|
const [t, n] = G(0), s = {};
|
|
1728
|
-
at.Children.forEach(r, (
|
|
1729
|
-
at.isValidElement(
|
|
1728
|
+
at.Children.forEach(r, (p) => {
|
|
1729
|
+
at.isValidElement(p) && (s[p.props.id] = p);
|
|
1730
1730
|
});
|
|
1731
1731
|
const a = "--smp-grid-template-cols", i = "--smp-grid-template-rows", o = Rr(
|
|
1732
1732
|
e.sections ?? [],
|
|
1733
1733
|
Object.keys(s)
|
|
1734
|
-
), l = (
|
|
1734
|
+
), l = (p) => p.reduce((y, S) => {
|
|
1735
1735
|
var b, R;
|
|
1736
1736
|
let E = "", T = {}, w = {}, O = "";
|
|
1737
1737
|
return (b = S.sections) != null && b.length ? (E = ge["smp-layout-section-grid"], T = l(S.sections), S.gridCols === void 0 && (O = ge[S.horizontal ? "smp-grid-template-cols" : "smp-grid-template-rows"], (S.horizontal || Ut(S.sections)) && (w = Yt(
|
|
@@ -1750,21 +1750,21 @@ const ra = (r) => {
|
|
|
1750
1750
|
}, {}), c = l(o), f = `${ge["smp-layout"]} ${e.horizontal ? ge["smp-layout-horizontal"] : ge["smp-layout-vertical"]}`, u = e.horizontal || Ut(e.sections || []) ? Yt(
|
|
1751
1751
|
o,
|
|
1752
1752
|
e.horizontal ? a : i
|
|
1753
|
-
) : {},
|
|
1753
|
+
) : {}, d = (p, y) => {
|
|
1754
1754
|
var E, T;
|
|
1755
1755
|
const S = /* @__PURE__ */ g.jsx(
|
|
1756
1756
|
"div",
|
|
1757
1757
|
{
|
|
1758
|
-
"smp-id": `section-${
|
|
1759
|
-
className: c[
|
|
1760
|
-
style: c[
|
|
1761
|
-
children: (E =
|
|
1762
|
-
(w) => m(w,
|
|
1758
|
+
"smp-id": `section-${p.id}`,
|
|
1759
|
+
className: c[p.id].classes,
|
|
1760
|
+
style: c[p.id].styles,
|
|
1761
|
+
children: (E = p.sections) != null && E.length ? p.sections.map((w) => d(w)) : (T = p.content) == null ? void 0 : T.map(
|
|
1762
|
+
(w) => m(w, p.justify, p.align)
|
|
1763
1763
|
)
|
|
1764
1764
|
},
|
|
1765
|
-
`section-${
|
|
1765
|
+
`section-${p.id}`
|
|
1766
1766
|
);
|
|
1767
|
-
return
|
|
1767
|
+
return p.title && !y ? /* @__PURE__ */ g.jsxs(
|
|
1768
1768
|
"div",
|
|
1769
1769
|
{
|
|
1770
1770
|
className: ge["smp-layout-section-with-title"],
|
|
@@ -1772,31 +1772,31 @@ const ra = (r) => {
|
|
|
1772
1772
|
/* @__PURE__ */ g.jsx(
|
|
1773
1773
|
"span",
|
|
1774
1774
|
{
|
|
1775
|
-
className: `${ge["smp-layout-section-title"]} ${
|
|
1776
|
-
children: /* @__PURE__ */ g.jsx(Ce, { label:
|
|
1775
|
+
className: `${ge["smp-layout-section-title"]} ${p.justify ? `smp-justifyContent-${p.justify}` : ""} ${p.align ? `smp-alignItems-${p.align}` : ""}`,
|
|
1776
|
+
children: /* @__PURE__ */ g.jsx(Ce, { label: p.title })
|
|
1777
1777
|
}
|
|
1778
1778
|
),
|
|
1779
1779
|
S
|
|
1780
1780
|
]
|
|
1781
1781
|
},
|
|
1782
|
-
`title-section-${
|
|
1782
|
+
`title-section-${p.id}`
|
|
1783
1783
|
) : S;
|
|
1784
|
-
}, m = (
|
|
1785
|
-
const E = s[
|
|
1784
|
+
}, m = (p, y, S) => {
|
|
1785
|
+
const E = s[p.id];
|
|
1786
1786
|
if (!E) return null;
|
|
1787
1787
|
const w = {
|
|
1788
|
-
gridColumnStart: (
|
|
1789
|
-
gridColumnEnd:
|
|
1788
|
+
gridColumnStart: (p.colSpan && p.colSpan > 0 ? `span ${p.colSpan}` : p.colStart && p.colStart < 1 ? "1" : void 0) ?? p.colStart,
|
|
1789
|
+
gridColumnEnd: p.colEnd && p.colEnd > 0 ? p.colEnd : void 0
|
|
1790
1790
|
}, O = `${ge["smp-layout-cell-container"]} ${y ? `smp-justifyContent-${y}` : ""} ${S ? `smp-alignItems-${S}` : ""}`;
|
|
1791
1791
|
return /* @__PURE__ */ g.jsx(
|
|
1792
1792
|
"div",
|
|
1793
1793
|
{
|
|
1794
1794
|
className: O,
|
|
1795
1795
|
style: w,
|
|
1796
|
-
"smp-id":
|
|
1796
|
+
"smp-id": p.id,
|
|
1797
1797
|
children: E
|
|
1798
1798
|
},
|
|
1799
|
-
|
|
1799
|
+
p.id
|
|
1800
1800
|
);
|
|
1801
1801
|
};
|
|
1802
1802
|
return /* @__PURE__ */ g.jsxs("div", { className: f, style: u, "smp-id": "layout", children: [
|
|
@@ -1805,8 +1805,8 @@ const ra = (r) => {
|
|
|
1805
1805
|
{
|
|
1806
1806
|
data: {
|
|
1807
1807
|
type: "SmeupDataTree",
|
|
1808
|
-
children: o.map((
|
|
1809
|
-
decode:
|
|
1808
|
+
children: o.map((p) => ({
|
|
1809
|
+
decode: p.title || p.id || "Tab",
|
|
1810
1810
|
obj: { t: "", p: "", k: "" },
|
|
1811
1811
|
placeholderIcon: "tab",
|
|
1812
1812
|
cells: {},
|
|
@@ -1819,7 +1819,7 @@ const ra = (r) => {
|
|
|
1819
1819
|
toolbar: !1
|
|
1820
1820
|
}
|
|
1821
1821
|
),
|
|
1822
|
-
e.sectionsType ?
|
|
1822
|
+
e.sectionsType ? d(o[t], !0) : o.map((p) => d(p))
|
|
1823
1823
|
] });
|
|
1824
1824
|
}, te = {
|
|
1825
1825
|
AUTOCOMPLETE: "ACP",
|
|
@@ -1879,7 +1879,7 @@ class lt {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
1881
|
function En(r, e) {
|
|
1882
|
-
if (
|
|
1882
|
+
if (At(r)) {
|
|
1883
1883
|
const f = new Date(r);
|
|
1884
1884
|
if (!isNaN(f.getTime()))
|
|
1885
1885
|
return f;
|
|
@@ -1911,7 +1911,7 @@ function En(r, e) {
|
|
|
1911
1911
|
}
|
|
1912
1912
|
return r;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function At(r) {
|
|
1915
1915
|
return /^\d{4}-\d{2}-\d{2}$/.test(r) && r.length === 10;
|
|
1916
1916
|
}
|
|
1917
1917
|
function Qe(r) {
|
|
@@ -1990,7 +1990,7 @@ const lr = /* @__PURE__ */ new Map([
|
|
|
1990
1990
|
return Tn(r) && `${r.substring(0, 4)}-${r.substring(4, 6)}-${r.substring(6, 8)}` || r;
|
|
1991
1991
|
},
|
|
1992
1992
|
isoToLegacy(r) {
|
|
1993
|
-
return
|
|
1993
|
+
return At(r) && r.replaceAll("-", "") || r;
|
|
1994
1994
|
}
|
|
1995
1995
|
}
|
|
1996
1996
|
]
|
|
@@ -2002,10 +2002,10 @@ function ht({
|
|
|
2002
2002
|
const t = ce(null), n = ce(null), [s, a] = G(0), i = ue(() => {
|
|
2003
2003
|
const o = t.current, l = n.current;
|
|
2004
2004
|
if (!o || !l) return;
|
|
2005
|
-
const { top: c, left: f, width: u, height:
|
|
2005
|
+
const { top: c, left: f, width: u, height: d } = o.getBoundingClientRect();
|
|
2006
2006
|
a(u);
|
|
2007
|
-
const m = l.offsetHeight,
|
|
2008
|
-
if (
|
|
2007
|
+
const m = l.offsetHeight, p = l.offsetWidth;
|
|
2008
|
+
if (p === 0 || m === 0) {
|
|
2009
2009
|
requestAnimationFrame(i);
|
|
2010
2010
|
return;
|
|
2011
2011
|
}
|
|
@@ -2015,10 +2015,10 @@ function ht({
|
|
|
2015
2015
|
y -= m;
|
|
2016
2016
|
break;
|
|
2017
2017
|
case "bottom":
|
|
2018
|
-
y +=
|
|
2018
|
+
y += d;
|
|
2019
2019
|
break;
|
|
2020
2020
|
case "left":
|
|
2021
|
-
S -=
|
|
2021
|
+
S -= p;
|
|
2022
2022
|
break;
|
|
2023
2023
|
case "right":
|
|
2024
2024
|
S += u;
|
|
@@ -2068,125 +2068,127 @@ const Fe = (r, e, t) => {
|
|
|
2068
2068
|
};
|
|
2069
2069
|
return /* @__PURE__ */ g.jsx("label", { className: s.container, id: n, children: r });
|
|
2070
2070
|
}, ye = {
|
|
2071
|
-
"smp-textfield-wrapper": "_smp-textfield-
|
|
2072
|
-
"smp-textfield": "_smp-
|
|
2073
|
-
"smp-textfield-
|
|
2074
|
-
"smp-textfield-
|
|
2075
|
-
"smp-textfield-
|
|
2076
|
-
"smp-textfield-
|
|
2077
|
-
"smp-textfield-
|
|
2078
|
-
"smp-textfield-
|
|
2079
|
-
"smp-textfield-
|
|
2080
|
-
"smp-textfield-
|
|
2081
|
-
"smp-textfield-
|
|
2082
|
-
"smp-textfield-
|
|
2083
|
-
"smp-textfield-disabled": "_smp-textfield-
|
|
2084
|
-
"smp-textfield-fullWidth": "_smp-textfield-
|
|
2085
|
-
"smp-textfield-top-right-indicator": "_smp-textfield-top-right-
|
|
2071
|
+
"smp-textfield-wrapper": "_smp-textfield-wrapper_ep1c3_4",
|
|
2072
|
+
"smp-textfield": "_smp-textfield_ep1c3_4",
|
|
2073
|
+
"smp-textfield-variant-notSelectable": "_smp-textfield-variant-notSelectable_ep1c3_29",
|
|
2074
|
+
"smp-textfield-extraSmall": "_smp-textfield-extraSmall_ep1c3_35",
|
|
2075
|
+
"smp-textfield-small": "_smp-textfield-small_ep1c3_40",
|
|
2076
|
+
"smp-textfield-medium": "_smp-textfield-medium_ep1c3_45",
|
|
2077
|
+
"smp-textfield-large": "_smp-textfield-large_ep1c3_50",
|
|
2078
|
+
"smp-textfield-extraLarge": "_smp-textfield-extraLarge_ep1c3_55",
|
|
2079
|
+
"smp-textfield-input": "_smp-textfield-input_ep1c3_61",
|
|
2080
|
+
"smp-textfield-outlined": "_smp-textfield-outlined_ep1c3_84",
|
|
2081
|
+
"smp-textfield-danger": "_smp-textfield-danger_ep1c3_95",
|
|
2082
|
+
"smp-textfield-readOnly": "_smp-textfield-readOnly_ep1c3_99",
|
|
2083
|
+
"smp-textfield-disabled": "_smp-textfield-disabled_ep1c3_114",
|
|
2084
|
+
"smp-textfield-fullWidth": "_smp-textfield-fullWidth_ep1c3_123",
|
|
2085
|
+
"smp-textfield-top-right-indicator": "_smp-textfield-top-right-indicator_ep1c3_127"
|
|
2086
2086
|
}, Le = ({
|
|
2087
2087
|
disabled: r,
|
|
2088
2088
|
bindValue: e,
|
|
2089
2089
|
icon: t,
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2090
|
+
placeholder: n,
|
|
2091
|
+
isEditable: s = !0,
|
|
2092
|
+
shapeIcon: a,
|
|
2093
|
+
sizing: i,
|
|
2094
|
+
state: o,
|
|
2095
|
+
variant: l,
|
|
2096
|
+
tooltip: c = !1,
|
|
2097
|
+
rotatedShapeIcon: f = !1,
|
|
2098
|
+
ref: u,
|
|
2099
|
+
inputRef: d,
|
|
2100
|
+
inputType: m = "text",
|
|
2101
|
+
ariaLabel: p = "input field",
|
|
2102
|
+
label: y,
|
|
2103
|
+
helperText: S = !1,
|
|
2104
|
+
error: E,
|
|
2105
|
+
appearance: T = "base",
|
|
2106
|
+
fullWidth: w = !1,
|
|
2107
|
+
_dataComponent: O = "textfield",
|
|
2108
|
+
min: b,
|
|
2109
|
+
max: R,
|
|
2110
|
+
step: N,
|
|
2111
|
+
inputMode: C = "text",
|
|
2112
|
+
width: v,
|
|
2113
|
+
autocomplete: _,
|
|
2114
|
+
size: k,
|
|
2115
|
+
maxLength: $,
|
|
2116
|
+
onBlur: L,
|
|
2117
|
+
onChange: M,
|
|
2118
|
+
onKeyDown: A,
|
|
2119
|
+
onShapeIconClick: V,
|
|
2120
|
+
onClick: z
|
|
2120
2121
|
}) => {
|
|
2121
|
-
const
|
|
2122
|
-
|
|
2123
|
-
},
|
|
2124
|
-
wrapper: `${ye["smp-textfield-wrapper"]} ${
|
|
2125
|
-
container: `${ye["smp-textfield"]} ${r ? ye["smp-textfield-disabled"] : ""} ${
|
|
2122
|
+
const J = Re(), U = `${J}-helper`, h = E ? "danger" : o, x = E || o == "danger" ? "error" : a, D = S || !!E, I = (Y) => {
|
|
2123
|
+
M == null || M(Y.target.value);
|
|
2124
|
+
}, j = {
|
|
2125
|
+
wrapper: `${ye["smp-textfield-wrapper"]} ${w ? ye["smp-textfield-fullWidth"] : ""}`,
|
|
2126
|
+
container: `${ye["smp-textfield"]} ${r ? ye["smp-textfield-disabled"] : ""} ${n ? ye["smp-textfield-placeholder"] : ""} ${i ? ye[`smp-textfield-${i}`] : ""} ${h ? ye[`smp-textfield-${h}`] : ""} ${T ? ye[`smp-textfield-${T}`] : ""} ${s ? "" : ye["smp-textfield-readOnly"]} ${c ? ye["smp-textfield-top-right-indicator"] : ""}`,
|
|
2126
2127
|
input: `${ye["smp-textfield-input"]}`
|
|
2127
2128
|
};
|
|
2128
|
-
if (
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2129
|
+
if (l && (l !== "notSelectable" || s)) {
|
|
2130
|
+
const Y = ye[`smp-textfield-variant-${l}`];
|
|
2131
|
+
Y && (j.container += ` ${Y}`);
|
|
2131
2132
|
}
|
|
2132
|
-
const
|
|
2133
|
-
return /* @__PURE__ */ g.jsxs("div", { className:
|
|
2134
|
-
|
|
2133
|
+
const P = v ? { "--smp-textField-width-base": v } : void 0;
|
|
2134
|
+
return /* @__PURE__ */ g.jsxs("div", { className: j.wrapper, "data-component": O, children: [
|
|
2135
|
+
y && /* @__PURE__ */ g.jsx(Ce, { label: y, disabled: r, htmlFor: J }),
|
|
2135
2136
|
/* @__PURE__ */ g.jsxs(
|
|
2136
2137
|
"div",
|
|
2137
2138
|
{
|
|
2138
|
-
className:
|
|
2139
|
-
ref:
|
|
2140
|
-
style:
|
|
2139
|
+
className: j.container,
|
|
2140
|
+
ref: u,
|
|
2141
|
+
style: P,
|
|
2141
2142
|
children: [
|
|
2142
2143
|
t && /* @__PURE__ */ g.jsx(le, { icon: t, disabled: r }),
|
|
2143
2144
|
/* @__PURE__ */ g.jsx(
|
|
2144
2145
|
"input",
|
|
2145
2146
|
{
|
|
2146
|
-
id:
|
|
2147
|
-
type:
|
|
2147
|
+
id: J,
|
|
2148
|
+
type: m,
|
|
2148
2149
|
value: e,
|
|
2149
|
-
placeholder:
|
|
2150
|
-
onChange:
|
|
2151
|
-
onBlur:
|
|
2152
|
-
className:
|
|
2150
|
+
placeholder: n,
|
|
2151
|
+
onChange: I,
|
|
2152
|
+
onBlur: L,
|
|
2153
|
+
className: j.input,
|
|
2153
2154
|
disabled: r,
|
|
2154
|
-
readOnly: !
|
|
2155
|
-
onKeyDown:
|
|
2156
|
-
"aria-label":
|
|
2157
|
-
ref:
|
|
2158
|
-
"aria-describedby":
|
|
2159
|
-
min:
|
|
2160
|
-
max:
|
|
2161
|
-
step:
|
|
2162
|
-
inputMode:
|
|
2163
|
-
autoComplete:
|
|
2164
|
-
size:
|
|
2165
|
-
maxLength:
|
|
2155
|
+
readOnly: !s,
|
|
2156
|
+
onKeyDown: A,
|
|
2157
|
+
"aria-label": p,
|
|
2158
|
+
ref: d,
|
|
2159
|
+
"aria-describedby": D ? U : void 0,
|
|
2160
|
+
min: b,
|
|
2161
|
+
max: R,
|
|
2162
|
+
step: N,
|
|
2163
|
+
inputMode: C,
|
|
2164
|
+
autoComplete: _,
|
|
2165
|
+
size: k,
|
|
2166
|
+
maxLength: $,
|
|
2167
|
+
onClick: z
|
|
2166
2168
|
}
|
|
2167
2169
|
),
|
|
2168
|
-
|
|
2170
|
+
x && /* @__PURE__ */ g.jsx(
|
|
2169
2171
|
le,
|
|
2170
2172
|
{
|
|
2171
|
-
icon:
|
|
2173
|
+
icon: x,
|
|
2172
2174
|
disabled: r,
|
|
2173
|
-
state:
|
|
2174
|
-
onClick:
|
|
2175
|
-
rotated:
|
|
2176
|
-
isInteractable:
|
|
2175
|
+
state: h,
|
|
2176
|
+
onClick: V,
|
|
2177
|
+
rotated: f,
|
|
2178
|
+
isInteractable: s,
|
|
2177
2179
|
tabIndex: 0
|
|
2178
2180
|
}
|
|
2179
2181
|
)
|
|
2180
2182
|
]
|
|
2181
2183
|
}
|
|
2182
2184
|
),
|
|
2183
|
-
|
|
2185
|
+
D && /* @__PURE__ */ g.jsx(
|
|
2184
2186
|
Lr,
|
|
2185
2187
|
{
|
|
2186
|
-
helperText:
|
|
2188
|
+
helperText: E,
|
|
2187
2189
|
disabled: r,
|
|
2188
|
-
state:
|
|
2189
|
-
id:
|
|
2190
|
+
state: h,
|
|
2191
|
+
id: U
|
|
2190
2192
|
}
|
|
2191
2193
|
)
|
|
2192
2194
|
] });
|
|
@@ -2208,12 +2210,12 @@ function Ir({
|
|
|
2208
2210
|
offsetTop: m * e
|
|
2209
2211
|
});
|
|
2210
2212
|
const u = ue((m) => {
|
|
2211
|
-
const
|
|
2212
|
-
a(
|
|
2213
|
-
}, []),
|
|
2213
|
+
const p = m.target.scrollTop;
|
|
2214
|
+
a(p);
|
|
2215
|
+
}, []), d = (m) => {
|
|
2214
2216
|
if (!i.current) return;
|
|
2215
|
-
const
|
|
2216
|
-
|
|
2217
|
+
const p = m * e, y = p + e, S = i.current, E = S.scrollTop, T = E + t;
|
|
2218
|
+
p < E ? S.scrollTop = p : y > T && (S.scrollTop = y - t);
|
|
2217
2219
|
};
|
|
2218
2220
|
return {
|
|
2219
2221
|
virtualItems: f,
|
|
@@ -2241,7 +2243,7 @@ function Ir({
|
|
|
2241
2243
|
startIndex: l,
|
|
2242
2244
|
endIndex: c
|
|
2243
2245
|
},
|
|
2244
|
-
scrollToIndex:
|
|
2246
|
+
scrollToIndex: d
|
|
2245
2247
|
};
|
|
2246
2248
|
}
|
|
2247
2249
|
const et = {
|
|
@@ -2260,7 +2262,7 @@ function Rn(r, e, t = "14px IBM Plex Sans, sans-serif", n = 32) {
|
|
|
2260
2262
|
}
|
|
2261
2263
|
return Math.ceil(i + n);
|
|
2262
2264
|
}
|
|
2263
|
-
const Dn = 10,
|
|
2265
|
+
const Dn = 10, Ar = ({
|
|
2264
2266
|
id: r,
|
|
2265
2267
|
options: e,
|
|
2266
2268
|
displayMode: t = "Both",
|
|
@@ -2275,13 +2277,13 @@ const Dn = 10, Pr = ({
|
|
|
2275
2277
|
onKeyDown: c,
|
|
2276
2278
|
isOpen: f
|
|
2277
2279
|
}) => {
|
|
2278
|
-
var
|
|
2279
|
-
const [u,
|
|
2280
|
+
var M;
|
|
2281
|
+
const [u, d] = G(""), m = 40, [p, y] = G(
|
|
2280
2282
|
a !== null ? a : -1
|
|
2281
2283
|
), [S, E] = G(o || 200), T = ce(null), w = s !== void 0 ? s : e.length > Dn, O = u ? e.filter(
|
|
2282
2284
|
(A) => A.label.toLowerCase().includes(u.toLowerCase())
|
|
2283
2285
|
) : e, b = (A) => {
|
|
2284
|
-
|
|
2286
|
+
d(A);
|
|
2285
2287
|
}, { virtualItems: R, containerProps: N, innerProps: C, scrollToIndex: v } = Ir({
|
|
2286
2288
|
items: O,
|
|
2287
2289
|
itemHeight: m,
|
|
@@ -2289,10 +2291,10 @@ const Dn = 10, Pr = ({
|
|
|
2289
2291
|
overscan: 5
|
|
2290
2292
|
});
|
|
2291
2293
|
re(() => {
|
|
2292
|
-
a !== null && a !==
|
|
2294
|
+
a !== null && a !== p && y(a);
|
|
2293
2295
|
}, [a]), re(() => {
|
|
2294
|
-
|
|
2295
|
-
}, [
|
|
2296
|
+
p >= 0 && p < O.length && v(p);
|
|
2297
|
+
}, [p, O]), re(() => {
|
|
2296
2298
|
f && (T != null && T.current) && T.current.focus();
|
|
2297
2299
|
}, [f, T]), re(() => {
|
|
2298
2300
|
const A = Rn(e, t);
|
|
@@ -2301,15 +2303,15 @@ const Dn = 10, Pr = ({
|
|
|
2301
2303
|
const _ = (A) => {
|
|
2302
2304
|
if (A.key === "ArrowDown" || A.key === "ArrowUp") {
|
|
2303
2305
|
A.preventDefault();
|
|
2304
|
-
let V =
|
|
2305
|
-
A.key === "ArrowDown" ? V =
|
|
2306
|
-
} else A.key === "Enter" ?
|
|
2306
|
+
let V = p;
|
|
2307
|
+
A.key === "ArrowDown" ? V = p < O.length - 1 ? p + 1 : 0 : A.key === "ArrowUp" && (V = p > 0 ? p - 1 : O.length - 1), y(V);
|
|
2308
|
+
} else A.key === "Enter" ? p >= 0 && p < O.length && (l == null || l(O[p])) : A.key === "Escape" && (A.preventDefault(), A.stopPropagation());
|
|
2307
2309
|
c && c(A);
|
|
2308
2310
|
}, k = (A) => {
|
|
2309
2311
|
_(A);
|
|
2310
2312
|
}, $ = (A) => {
|
|
2311
2313
|
_(A);
|
|
2312
|
-
},
|
|
2314
|
+
}, L = {
|
|
2313
2315
|
wrapper: `${et["smp-list"]}`,
|
|
2314
2316
|
container: `${et["smp-list-container"]}`,
|
|
2315
2317
|
virtualScroll: `${et["smp-list-virtualScroll"]}`,
|
|
@@ -2320,7 +2322,7 @@ const Dn = 10, Pr = ({
|
|
|
2320
2322
|
{
|
|
2321
2323
|
id: r,
|
|
2322
2324
|
ref: n,
|
|
2323
|
-
className:
|
|
2325
|
+
className: L.wrapper,
|
|
2324
2326
|
"data-component": "list",
|
|
2325
2327
|
style: {
|
|
2326
2328
|
width: S,
|
|
@@ -2342,13 +2344,13 @@ const Dn = 10, Pr = ({
|
|
|
2342
2344
|
"div",
|
|
2343
2345
|
{
|
|
2344
2346
|
...N,
|
|
2345
|
-
className:
|
|
2347
|
+
className: L.container,
|
|
2346
2348
|
tabIndex: 0,
|
|
2347
2349
|
role: "listbox",
|
|
2348
2350
|
"aria-label": "List",
|
|
2349
2351
|
onKeyDown: $,
|
|
2350
|
-
"aria-activedescendant":
|
|
2351
|
-
children: /* @__PURE__ */ g.jsx("div", { ...C, className:
|
|
2352
|
+
"aria-activedescendant": p >= 0 && p < O.length ? (M = O[p]) == null ? void 0 : M.id : void 0,
|
|
2353
|
+
children: /* @__PURE__ */ g.jsx("div", { ...C, className: L.virtualScroll, children: R.map(({ item: A, index: V, offsetTop: z }) => {
|
|
2352
2354
|
const J = i.includes(A.id);
|
|
2353
2355
|
return (
|
|
2354
2356
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
@@ -2357,15 +2359,15 @@ const Dn = 10, Pr = ({
|
|
|
2357
2359
|
{
|
|
2358
2360
|
role: "option",
|
|
2359
2361
|
id: A.id,
|
|
2360
|
-
"aria-selected":
|
|
2362
|
+
"aria-selected": p === V ? "true" : "false",
|
|
2361
2363
|
tabIndex: -1,
|
|
2362
|
-
className: `${
|
|
2364
|
+
className: `${L.listItem} ${p === V ? "selected-item" : ""}`,
|
|
2363
2365
|
"aria-label": A.id + "-" + A.label,
|
|
2364
2366
|
style: {
|
|
2365
2367
|
height: `${m}px`,
|
|
2366
2368
|
lineHeight: `calc(${m}px - 2*2px)`,
|
|
2367
2369
|
// lineHeight - 2*padding
|
|
2368
|
-
transform: `translateY(${
|
|
2370
|
+
transform: `translateY(${z}px)`
|
|
2369
2371
|
},
|
|
2370
2372
|
onClick: () => {
|
|
2371
2373
|
l == null || l(A), y(V);
|
|
@@ -2384,7 +2386,7 @@ const Dn = 10, Pr = ({
|
|
|
2384
2386
|
]
|
|
2385
2387
|
}
|
|
2386
2388
|
);
|
|
2387
|
-
},
|
|
2389
|
+
}, Pt = ({
|
|
2388
2390
|
displayMode: r,
|
|
2389
2391
|
bindValue: e,
|
|
2390
2392
|
optionalDisplayValue: t,
|
|
@@ -2422,13 +2424,18 @@ const gt = (r, e, t) => {
|
|
|
2422
2424
|
re(() => {
|
|
2423
2425
|
if (!e) return;
|
|
2424
2426
|
const n = (s) => {
|
|
2425
|
-
|
|
2427
|
+
(r == null ? void 0 : r.some((i) => {
|
|
2428
|
+
if (typeof i == "object" && i !== null && "current" in i) {
|
|
2429
|
+
const o = i == null ? void 0 : i.current;
|
|
2430
|
+
return o && o.contains(s.target);
|
|
2431
|
+
}
|
|
2432
|
+
})) || t();
|
|
2426
2433
|
};
|
|
2427
2434
|
return document.addEventListener("mousedown", n), () => {
|
|
2428
2435
|
document.removeEventListener("mousedown", n);
|
|
2429
2436
|
};
|
|
2430
2437
|
}, [r, t, e]);
|
|
2431
|
-
},
|
|
2438
|
+
}, q = (r) => typeof r == "string", Ue = () => {
|
|
2432
2439
|
let r, e;
|
|
2433
2440
|
const t = new Promise((n, s) => {
|
|
2434
2441
|
r = n, e = s;
|
|
@@ -2438,8 +2445,8 @@ const gt = (r, e, t) => {
|
|
|
2438
2445
|
r.forEach((n) => {
|
|
2439
2446
|
e[n] && (t[n] = e[n]);
|
|
2440
2447
|
});
|
|
2441
|
-
}, Cn = /###/g, ur = (r) => r && r.indexOf("###") > -1 ? r.replace(Cn, ".") : r, fr = (r) => !r ||
|
|
2442
|
-
const n =
|
|
2448
|
+
}, Cn = /###/g, ur = (r) => r && r.indexOf("###") > -1 ? r.replace(Cn, ".") : r, fr = (r) => !r || q(r), We = (r, e, t) => {
|
|
2449
|
+
const n = q(e) ? e.split(".") : e;
|
|
2443
2450
|
let s = 0;
|
|
2444
2451
|
for (; s < n.length - 1; ) {
|
|
2445
2452
|
if (fr(r)) return {};
|
|
@@ -2479,12 +2486,12 @@ const gt = (r, e, t) => {
|
|
|
2479
2486
|
}, In = (r, e, t) => {
|
|
2480
2487
|
const n = ut(r, t);
|
|
2481
2488
|
return n !== void 0 ? n : ut(e, t);
|
|
2482
|
-
},
|
|
2489
|
+
}, Pr = (r, e, t) => {
|
|
2483
2490
|
for (const n in e)
|
|
2484
|
-
n !== "__proto__" && n !== "constructor" && (n in r ?
|
|
2491
|
+
n !== "__proto__" && n !== "constructor" && (n in r ? q(r[n]) || r[n] instanceof String || q(e[n]) || e[n] instanceof String ? t && (r[n] = e[n]) : Pr(r[n], e[n], t) : r[n] = e[n]);
|
|
2485
2492
|
return r;
|
|
2486
|
-
},
|
|
2487
|
-
var
|
|
2493
|
+
}, Pe = (r) => r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
2494
|
+
var An = {
|
|
2488
2495
|
"&": "&",
|
|
2489
2496
|
"<": "<",
|
|
2490
2497
|
">": ">",
|
|
@@ -2492,7 +2499,7 @@ var Pn = {
|
|
|
2492
2499
|
"'": "'",
|
|
2493
2500
|
"/": "/"
|
|
2494
2501
|
};
|
|
2495
|
-
const
|
|
2502
|
+
const Pn = (r) => q(r) ? r.replace(/[&<>"'\/]/g, (e) => An[e]) : r;
|
|
2496
2503
|
class Nn {
|
|
2497
2504
|
constructor(e) {
|
|
2498
2505
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -2572,7 +2579,7 @@ class ft {
|
|
|
2572
2579
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
2573
2580
|
}
|
|
2574
2581
|
forward(e, t, n, s) {
|
|
2575
|
-
return s && !this.debug ? null : (
|
|
2582
|
+
return s && !this.debug ? null : (q(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
2576
2583
|
}
|
|
2577
2584
|
create(e) {
|
|
2578
2585
|
return new ft(this.logger, {
|
|
@@ -2633,9 +2640,9 @@ class pr extends yt {
|
|
|
2633
2640
|
var c, f;
|
|
2634
2641
|
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, i = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
2635
2642
|
let o;
|
|
2636
|
-
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) :
|
|
2643
|
+
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : q(n) && a ? o.push(...n.split(a)) : o.push(n)));
|
|
2637
2644
|
const l = ut(this.data, o);
|
|
2638
|
-
return !l && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), l || !i || !
|
|
2645
|
+
return !l && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), l || !i || !q(n) ? l : $t((f = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : f[t], n, a);
|
|
2639
2646
|
}
|
|
2640
2647
|
addResource(e, t, n, s, a = {
|
|
2641
2648
|
silent: !1
|
|
@@ -2648,7 +2655,7 @@ class pr extends yt {
|
|
|
2648
2655
|
silent: !1
|
|
2649
2656
|
}) {
|
|
2650
2657
|
for (const a in n)
|
|
2651
|
-
(
|
|
2658
|
+
(q(n[a]) || Array.isArray(n[a])) && this.addResource(e, t, a, n[a], {
|
|
2652
2659
|
silent: !0
|
|
2653
2660
|
});
|
|
2654
2661
|
s.silent || this.emit("added", e, t, n);
|
|
@@ -2660,7 +2667,7 @@ class pr extends yt {
|
|
|
2660
2667
|
let o = [e, t];
|
|
2661
2668
|
e.indexOf(".") > -1 && (o = e.split("."), s = n, n = t, t = o[1]), this.addNamespaces(t);
|
|
2662
2669
|
let l = ut(this.data, o) || {};
|
|
2663
|
-
i.skipCopy || (n = JSON.parse(JSON.stringify(n))), s ?
|
|
2670
|
+
i.skipCopy || (n = JSON.parse(JSON.stringify(n))), s ? Pr(l, n, a) : l = {
|
|
2664
2671
|
...l,
|
|
2665
2672
|
...n
|
|
2666
2673
|
}, dr(this.data, o, l), i.silent || this.emit("added", e, t, n);
|
|
@@ -2697,7 +2704,7 @@ var Nr = {
|
|
|
2697
2704
|
}), e;
|
|
2698
2705
|
}
|
|
2699
2706
|
};
|
|
2700
|
-
const hr = {}, mr = (r) => !
|
|
2707
|
+
const hr = {}, mr = (r) => !q(r) && typeof r != "boolean" && typeof r != "number";
|
|
2701
2708
|
class dt extends yt {
|
|
2702
2709
|
constructor(e, t = {}) {
|
|
2703
2710
|
super(), $n(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Se.create("translator");
|
|
@@ -2726,14 +2733,14 @@ class dt extends yt {
|
|
|
2726
2733
|
if (l && l.length > 0)
|
|
2727
2734
|
return {
|
|
2728
2735
|
key: e,
|
|
2729
|
-
namespaces:
|
|
2736
|
+
namespaces: q(a) ? [a] : a
|
|
2730
2737
|
};
|
|
2731
2738
|
const c = e.split(n);
|
|
2732
2739
|
(n !== s || n === s && this.options.ns.indexOf(c[0]) > -1) && (a = c.shift()), e = c.join(s);
|
|
2733
2740
|
}
|
|
2734
2741
|
return {
|
|
2735
2742
|
key: e,
|
|
2736
|
-
namespaces:
|
|
2743
|
+
namespaces: q(a) ? [a] : a
|
|
2737
2744
|
};
|
|
2738
2745
|
}
|
|
2739
2746
|
translate(e, t, n) {
|
|
@@ -2750,9 +2757,9 @@ class dt extends yt {
|
|
|
2750
2757
|
} = this.extractFromKey(e[e.length - 1], s), c = l[l.length - 1];
|
|
2751
2758
|
let f = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator;
|
|
2752
2759
|
f === void 0 && (f = ":");
|
|
2753
|
-
const u = s.lng || this.language,
|
|
2760
|
+
const u = s.lng || this.language, d = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
2754
2761
|
if ((u == null ? void 0 : u.toLowerCase()) === "cimode")
|
|
2755
|
-
return
|
|
2762
|
+
return d ? a ? {
|
|
2756
2763
|
res: `${c}${f}${o}`,
|
|
2757
2764
|
usedKey: o,
|
|
2758
2765
|
exactUsedKey: o,
|
|
@@ -2768,48 +2775,48 @@ class dt extends yt {
|
|
|
2768
2775
|
usedParams: this.getUsedParamsDetails(s)
|
|
2769
2776
|
} : o;
|
|
2770
2777
|
const m = this.resolve(e, s);
|
|
2771
|
-
let
|
|
2772
|
-
const y = (m == null ? void 0 : m.usedKey) || o, S = (m == null ? void 0 : m.exactUsedKey) || o, E = ["[object Number]", "[object Function]", "[object RegExp]"], T = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, w = !this.i18nFormat || this.i18nFormat.handleAsObject, O = s.count !== void 0 && !
|
|
2778
|
+
let p = m == null ? void 0 : m.res;
|
|
2779
|
+
const y = (m == null ? void 0 : m.usedKey) || o, S = (m == null ? void 0 : m.exactUsedKey) || o, E = ["[object Number]", "[object Function]", "[object RegExp]"], T = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, w = !this.i18nFormat || this.i18nFormat.handleAsObject, O = s.count !== void 0 && !q(s.count), b = dt.hasDefaultValue(s), R = O ? this.pluralResolver.getSuffix(u, s.count, s) : "", N = s.ordinal && O ? this.pluralResolver.getSuffix(u, s.count, {
|
|
2773
2780
|
ordinal: !1
|
|
2774
2781
|
}) : "", C = O && !s.ordinal && s.count === 0, v = C && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${R}`] || s[`defaultValue${N}`] || s.defaultValue;
|
|
2775
|
-
let _ =
|
|
2776
|
-
w && !
|
|
2782
|
+
let _ = p;
|
|
2783
|
+
w && !p && b && (_ = v);
|
|
2777
2784
|
const k = mr(_), $ = Object.prototype.toString.apply(_);
|
|
2778
|
-
if (w && _ && k && E.indexOf($) < 0 && !(
|
|
2785
|
+
if (w && _ && k && E.indexOf($) < 0 && !(q(T) && Array.isArray(_))) {
|
|
2779
2786
|
if (!s.returnObjects && !this.options.returnObjects) {
|
|
2780
2787
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
2781
|
-
const
|
|
2788
|
+
const L = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(y, _, {
|
|
2782
2789
|
...s,
|
|
2783
2790
|
ns: l
|
|
2784
2791
|
}) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
2785
|
-
return a ? (m.res =
|
|
2792
|
+
return a ? (m.res = L, m.usedParams = this.getUsedParamsDetails(s), m) : L;
|
|
2786
2793
|
}
|
|
2787
2794
|
if (i) {
|
|
2788
|
-
const
|
|
2795
|
+
const L = Array.isArray(_), M = L ? [] : {}, A = L ? S : y;
|
|
2789
2796
|
for (const V in _)
|
|
2790
2797
|
if (Object.prototype.hasOwnProperty.call(_, V)) {
|
|
2791
|
-
const
|
|
2792
|
-
b && !
|
|
2798
|
+
const z = `${A}${i}${V}`;
|
|
2799
|
+
b && !p ? M[V] = this.translate(z, {
|
|
2793
2800
|
...s,
|
|
2794
2801
|
defaultValue: mr(v) ? v[V] : void 0,
|
|
2795
2802
|
joinArrays: !1,
|
|
2796
2803
|
ns: l
|
|
2797
|
-
}) :
|
|
2804
|
+
}) : M[V] = this.translate(z, {
|
|
2798
2805
|
...s,
|
|
2799
2806
|
joinArrays: !1,
|
|
2800
2807
|
ns: l
|
|
2801
|
-
}),
|
|
2808
|
+
}), M[V] === z && (M[V] = _[V]);
|
|
2802
2809
|
}
|
|
2803
|
-
|
|
2810
|
+
p = M;
|
|
2804
2811
|
}
|
|
2805
|
-
} else if (w &&
|
|
2806
|
-
|
|
2812
|
+
} else if (w && q(T) && Array.isArray(p))
|
|
2813
|
+
p = p.join(T), p && (p = this.extendTranslation(p, e, s, n));
|
|
2807
2814
|
else {
|
|
2808
|
-
let
|
|
2809
|
-
!this.isValidLookup(
|
|
2810
|
-
const V = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) &&
|
|
2811
|
-
if (
|
|
2812
|
-
if (this.logger.log(
|
|
2815
|
+
let L = !1, M = !1;
|
|
2816
|
+
!this.isValidLookup(p) && b && (L = !0, p = v), this.isValidLookup(p) || (M = !0, p = o);
|
|
2817
|
+
const V = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && M ? void 0 : p, z = b && v !== p && this.options.updateMissing;
|
|
2818
|
+
if (M || L || z) {
|
|
2819
|
+
if (this.logger.log(z ? "updateKey" : "missingKey", u, c, o, z ? v : p), i) {
|
|
2813
2820
|
const x = this.resolve(o, {
|
|
2814
2821
|
...s,
|
|
2815
2822
|
keySeparator: !1
|
|
@@ -2817,26 +2824,26 @@ class dt extends yt {
|
|
|
2817
2824
|
x && x.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
2818
2825
|
}
|
|
2819
2826
|
let J = [];
|
|
2820
|
-
const
|
|
2821
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
2822
|
-
for (let x = 0; x <
|
|
2823
|
-
J.push(
|
|
2827
|
+
const U = this.languageUtils.getFallbackCodes(this.options.fallbackLng, s.lng || this.language);
|
|
2828
|
+
if (this.options.saveMissingTo === "fallback" && U && U[0])
|
|
2829
|
+
for (let x = 0; x < U.length; x++)
|
|
2830
|
+
J.push(U[x]);
|
|
2824
2831
|
else this.options.saveMissingTo === "all" ? J = this.languageUtils.toResolveHierarchy(s.lng || this.language) : J.push(s.lng || this.language);
|
|
2825
|
-
const h = (x, D,
|
|
2832
|
+
const h = (x, D, I) => {
|
|
2826
2833
|
var P;
|
|
2827
|
-
const j = b &&
|
|
2828
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(x, c, D, j,
|
|
2834
|
+
const j = b && I !== p ? I : V;
|
|
2835
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(x, c, D, j, z, s) : (P = this.backendConnector) != null && P.saveMissing && this.backendConnector.saveMissing(x, c, D, j, z, s), this.emit("missingKey", x, c, D, p);
|
|
2829
2836
|
};
|
|
2830
2837
|
this.options.saveMissing && (this.options.saveMissingPlurals && O ? J.forEach((x) => {
|
|
2831
2838
|
const D = this.pluralResolver.getSuffixes(x, s);
|
|
2832
|
-
C && s[`defaultValue${this.options.pluralSeparator}zero`] && D.indexOf(`${this.options.pluralSeparator}zero`) < 0 && D.push(`${this.options.pluralSeparator}zero`), D.forEach((
|
|
2833
|
-
h([x], o +
|
|
2839
|
+
C && s[`defaultValue${this.options.pluralSeparator}zero`] && D.indexOf(`${this.options.pluralSeparator}zero`) < 0 && D.push(`${this.options.pluralSeparator}zero`), D.forEach((I) => {
|
|
2840
|
+
h([x], o + I, s[`defaultValue${I}`] || v);
|
|
2834
2841
|
});
|
|
2835
2842
|
}) : h(J, o, v));
|
|
2836
2843
|
}
|
|
2837
|
-
|
|
2844
|
+
p = this.extendTranslation(p, e, s, m, n), M && p === o && this.options.appendNamespaceToMissingKey && (p = `${c}${f}${o}`), (M || L) && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${f}${o}` : o, L ? p : void 0, s));
|
|
2838
2845
|
}
|
|
2839
|
-
return a ? (m.res =
|
|
2846
|
+
return a ? (m.res = p, m.usedParams = this.getUsedParamsDetails(s), m) : p;
|
|
2840
2847
|
}
|
|
2841
2848
|
extendTranslation(e, t, n, s, a) {
|
|
2842
2849
|
var l, c;
|
|
@@ -2855,23 +2862,23 @@ class dt extends yt {
|
|
|
2855
2862
|
...n.interpolation
|
|
2856
2863
|
}
|
|
2857
2864
|
});
|
|
2858
|
-
const f =
|
|
2865
|
+
const f = q(e) && (((c = n == null ? void 0 : n.interpolation) == null ? void 0 : c.skipOnVariables) !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
2859
2866
|
let u;
|
|
2860
2867
|
if (f) {
|
|
2861
2868
|
const m = e.match(this.interpolator.nestingRegexp);
|
|
2862
2869
|
u = m && m.length;
|
|
2863
2870
|
}
|
|
2864
|
-
let
|
|
2865
|
-
if (this.options.interpolation.defaultVariables && (
|
|
2871
|
+
let d = n.replace && !q(n.replace) ? n.replace : n;
|
|
2872
|
+
if (this.options.interpolation.defaultVariables && (d = {
|
|
2866
2873
|
...this.options.interpolation.defaultVariables,
|
|
2867
|
-
...
|
|
2868
|
-
}), e = this.interpolator.interpolate(e,
|
|
2869
|
-
const m = e.match(this.interpolator.nestingRegexp),
|
|
2870
|
-
u <
|
|
2874
|
+
...d
|
|
2875
|
+
}), e = this.interpolator.interpolate(e, d, n.lng || this.language || s.usedLng, n), f) {
|
|
2876
|
+
const m = e.match(this.interpolator.nestingRegexp), p = m && m.length;
|
|
2877
|
+
u < p && (n.nest = !1);
|
|
2871
2878
|
}
|
|
2872
2879
|
!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();
|
|
2873
2880
|
}
|
|
2874
|
-
const i = n.postProcess || this.options.postProcess, o =
|
|
2881
|
+
const i = n.postProcess || this.options.postProcess, o = q(i) ? [i] : i;
|
|
2875
2882
|
return e != null && (o != null && o.length) && n.applyPostProcessor !== !1 && (e = Nr.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
2876
2883
|
i18nResolved: {
|
|
2877
2884
|
...s,
|
|
@@ -2882,13 +2889,13 @@ class dt extends yt {
|
|
|
2882
2889
|
}
|
|
2883
2890
|
resolve(e, t = {}) {
|
|
2884
2891
|
let n, s, a, i, o;
|
|
2885
|
-
return
|
|
2892
|
+
return q(e) && (e = [e]), e.forEach((l) => {
|
|
2886
2893
|
if (this.isValidLookup(n)) return;
|
|
2887
2894
|
const c = this.extractFromKey(l, t), f = c.key;
|
|
2888
2895
|
s = f;
|
|
2889
2896
|
let u = c.namespaces;
|
|
2890
2897
|
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
2891
|
-
const
|
|
2898
|
+
const d = t.count !== void 0 && !q(t.count), m = d && !t.ordinal && t.count === 0, p = t.context !== void 0 && (q(t.context) || typeof t.context == "number") && t.context !== "", y = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
2892
2899
|
u.forEach((S) => {
|
|
2893
2900
|
var E, T;
|
|
2894
2901
|
this.isValidLookup(n) || (o = S, !hr[`${y[0]}-${S}`] && ((E = this.utils) != null && E.hasLoadedNamespace) && !((T = this.utils) != null && T.hasLoadedNamespace(o)) && (hr[`${y[0]}-${S}`] = !0, this.logger.warn(`key "${s}" for languages "${y.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!!!")), y.forEach((w) => {
|
|
@@ -2900,11 +2907,11 @@ class dt extends yt {
|
|
|
2900
2907
|
this.i18nFormat.addLookupKeys(O, f, w, S, t);
|
|
2901
2908
|
else {
|
|
2902
2909
|
let N;
|
|
2903
|
-
|
|
2910
|
+
d && (N = this.pluralResolver.getSuffix(w, t.count, t));
|
|
2904
2911
|
const C = `${this.options.pluralSeparator}zero`, v = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
2905
|
-
if (
|
|
2912
|
+
if (d && (O.push(f + N), t.ordinal && N.indexOf(v) === 0 && O.push(f + N.replace(v, this.options.pluralSeparator)), m && O.push(f + C)), p) {
|
|
2906
2913
|
const _ = `${f}${this.options.contextSeparator}${t.context}`;
|
|
2907
|
-
O.push(_),
|
|
2914
|
+
O.push(_), d && (O.push(_ + N), t.ordinal && N.indexOf(v) === 0 && O.push(_ + N.replace(v, this.options.pluralSeparator)), m && O.push(_ + C));
|
|
2908
2915
|
}
|
|
2909
2916
|
}
|
|
2910
2917
|
let b;
|
|
@@ -2928,7 +2935,7 @@ class dt extends yt {
|
|
|
2928
2935
|
return (a = this.i18nFormat) != null && a.getResource ? this.i18nFormat.getResource(e, t, n, s) : this.resourceStore.getResource(e, t, n, s);
|
|
2929
2936
|
}
|
|
2930
2937
|
getUsedParamsDetails(e = {}) {
|
|
2931
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !
|
|
2938
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !q(e.replace);
|
|
2932
2939
|
let s = n ? e.replace : e;
|
|
2933
2940
|
if (n && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = {
|
|
2934
2941
|
...this.options.interpolation.defaultVariables,
|
|
@@ -2965,7 +2972,7 @@ class gr {
|
|
|
2965
2972
|
return this.formatLanguageCode(t[0]);
|
|
2966
2973
|
}
|
|
2967
2974
|
formatLanguageCode(e) {
|
|
2968
|
-
if (
|
|
2975
|
+
if (q(e) && e.indexOf("-") > -1) {
|
|
2969
2976
|
let t;
|
|
2970
2977
|
try {
|
|
2971
2978
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -3000,7 +3007,7 @@ class gr {
|
|
|
3000
3007
|
}
|
|
3001
3008
|
getFallbackCodes(e, t) {
|
|
3002
3009
|
if (!e) return [];
|
|
3003
|
-
if (typeof e == "function" && (e = e(t)),
|
|
3010
|
+
if (typeof e == "function" && (e = e(t)), q(e) && (e = [e]), Array.isArray(e)) return e;
|
|
3004
3011
|
if (!t) return e.default || [];
|
|
3005
3012
|
let n = e[t];
|
|
3006
3013
|
return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
|
|
@@ -3009,7 +3016,7 @@ class gr {
|
|
|
3009
3016
|
const n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], a = (i) => {
|
|
3010
3017
|
i && (this.isSupportedCode(i) ? s.push(i) : this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`));
|
|
3011
3018
|
};
|
|
3012
|
-
return
|
|
3019
|
+
return q(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))) : q(e) && a(this.formatLanguageCode(e)), n.forEach((i) => {
|
|
3013
3020
|
s.indexOf(i) < 0 && a(this.formatLanguageCode(i));
|
|
3014
3021
|
}), s;
|
|
3015
3022
|
}
|
|
@@ -3076,7 +3083,7 @@ class Yn {
|
|
|
3076
3083
|
}
|
|
3077
3084
|
const vr = (r, e, t, n = ".", s = !0) => {
|
|
3078
3085
|
let a = In(r, e, t);
|
|
3079
|
-
return !a && s &&
|
|
3086
|
+
return !a && s && q(t) && (a = $t(r, t, n), a === void 0 && (a = $t(e, t, n))), a;
|
|
3080
3087
|
}, _t = (r) => r.replace(/\$/g, "$$$$");
|
|
3081
3088
|
class Un {
|
|
3082
3089
|
constructor(e = {}) {
|
|
@@ -3098,15 +3105,15 @@ class Un {
|
|
|
3098
3105
|
formatSeparator: c,
|
|
3099
3106
|
unescapeSuffix: f,
|
|
3100
3107
|
unescapePrefix: u,
|
|
3101
|
-
nestingPrefix:
|
|
3108
|
+
nestingPrefix: d,
|
|
3102
3109
|
nestingPrefixEscaped: m,
|
|
3103
|
-
nestingSuffix:
|
|
3110
|
+
nestingSuffix: p,
|
|
3104
3111
|
nestingSuffixEscaped: y,
|
|
3105
3112
|
nestingOptionsSeparator: S,
|
|
3106
3113
|
maxReplaces: E,
|
|
3107
3114
|
alwaysFormat: T
|
|
3108
3115
|
} = e.interpolation;
|
|
3109
|
-
this.escape = t !== void 0 ? t :
|
|
3116
|
+
this.escape = t !== void 0 ? t : Pn, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? Pe(a) : i || "{{", this.suffix = o ? Pe(o) : l || "}}", this.formatSeparator = c || ",", this.unescapePrefix = f ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : f || "", this.nestingPrefix = d ? Pe(d) : m || Pe("$t("), this.nestingSuffix = p ? Pe(p) : y || Pe(")"), this.nestingOptionsSeparator = S || ",", this.maxReplaces = E || 1e3, this.alwaysFormat = T !== void 0 ? T : !1, this.resetRegExp();
|
|
3110
3117
|
}
|
|
3111
3118
|
reset() {
|
|
3112
3119
|
this.options && this.init(this.options);
|
|
@@ -3118,16 +3125,16 @@ class Un {
|
|
|
3118
3125
|
interpolate(e, t, n, s) {
|
|
3119
3126
|
var m;
|
|
3120
3127
|
let a, i, o;
|
|
3121
|
-
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (
|
|
3122
|
-
if (
|
|
3123
|
-
const T = vr(t, l,
|
|
3128
|
+
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (p) => {
|
|
3129
|
+
if (p.indexOf(this.formatSeparator) < 0) {
|
|
3130
|
+
const T = vr(t, l, p, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
3124
3131
|
return this.alwaysFormat ? this.format(T, void 0, n, {
|
|
3125
3132
|
...s,
|
|
3126
3133
|
...t,
|
|
3127
|
-
interpolationkey:
|
|
3134
|
+
interpolationkey: p
|
|
3128
3135
|
}) : T;
|
|
3129
3136
|
}
|
|
3130
|
-
const y =
|
|
3137
|
+
const y = p.split(this.formatSeparator), S = y.shift().trim(), E = y.join(this.formatSeparator).trim();
|
|
3131
3138
|
return this.format(vr(t, l, S, this.options.keySeparator, this.options.ignoreJSONStructure), E, n, {
|
|
3132
3139
|
...s,
|
|
3133
3140
|
...t,
|
|
@@ -3138,17 +3145,17 @@ class Un {
|
|
|
3138
3145
|
const f = (s == null ? void 0 : s.missingInterpolationHandler) || this.options.missingInterpolationHandler, u = ((m = s == null ? void 0 : s.interpolation) == null ? void 0 : m.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
3139
3146
|
return [{
|
|
3140
3147
|
regex: this.regexpUnescape,
|
|
3141
|
-
safeValue: (
|
|
3148
|
+
safeValue: (p) => _t(p)
|
|
3142
3149
|
}, {
|
|
3143
3150
|
regex: this.regexp,
|
|
3144
|
-
safeValue: (
|
|
3145
|
-
}].forEach((
|
|
3146
|
-
for (o = 0; a =
|
|
3151
|
+
safeValue: (p) => this.escapeValue ? _t(this.escape(p)) : _t(p)
|
|
3152
|
+
}].forEach((p) => {
|
|
3153
|
+
for (o = 0; a = p.regex.exec(e); ) {
|
|
3147
3154
|
const y = a[1].trim();
|
|
3148
3155
|
if (i = c(y), i === void 0)
|
|
3149
3156
|
if (typeof f == "function") {
|
|
3150
3157
|
const E = f(e, a, s);
|
|
3151
|
-
i =
|
|
3158
|
+
i = q(E) ? E : "";
|
|
3152
3159
|
} else if (s && Object.prototype.hasOwnProperty.call(s, y))
|
|
3153
3160
|
i = "";
|
|
3154
3161
|
else if (u) {
|
|
@@ -3156,9 +3163,9 @@ class Un {
|
|
|
3156
3163
|
continue;
|
|
3157
3164
|
} else
|
|
3158
3165
|
this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`), i = "";
|
|
3159
|
-
else !
|
|
3160
|
-
const S =
|
|
3161
|
-
if (e = e.replace(a[0], S), u ? (
|
|
3166
|
+
else !q(i) && !this.useRawValueToEscape && (i = cr(i));
|
|
3167
|
+
const S = p.safeValue(i);
|
|
3168
|
+
if (e = e.replace(a[0], S), u ? (p.regex.lastIndex += i.length, p.regex.lastIndex -= a[0].length) : p.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
3162
3169
|
break;
|
|
3163
3170
|
}
|
|
3164
3171
|
}), e;
|
|
@@ -3169,17 +3176,17 @@ class Un {
|
|
|
3169
3176
|
const f = this.nestingOptionsSeparator;
|
|
3170
3177
|
if (l.indexOf(f) < 0) return l;
|
|
3171
3178
|
const u = l.split(new RegExp(`${f}[ ]*{`));
|
|
3172
|
-
let
|
|
3173
|
-
l = u[0],
|
|
3174
|
-
const m =
|
|
3175
|
-
(((m == null ? void 0 : m.length) ?? 0) % 2 === 0 && !
|
|
3179
|
+
let d = `{${u[1]}`;
|
|
3180
|
+
l = u[0], d = this.interpolate(d, i);
|
|
3181
|
+
const m = d.match(/'/g), p = d.match(/"/g);
|
|
3182
|
+
(((m == null ? void 0 : m.length) ?? 0) % 2 === 0 && !p || p.length % 2 !== 0) && (d = d.replace(/'/g, '"'));
|
|
3176
3183
|
try {
|
|
3177
|
-
i = JSON.parse(
|
|
3184
|
+
i = JSON.parse(d), c && (i = {
|
|
3178
3185
|
...c,
|
|
3179
3186
|
...i
|
|
3180
3187
|
});
|
|
3181
3188
|
} catch (y) {
|
|
3182
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${l}`, y), `${l}${f}${
|
|
3189
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${l}`, y), `${l}${f}${d}`;
|
|
3183
3190
|
}
|
|
3184
3191
|
return i.defaultValue && i.defaultValue.indexOf(this.prefix) > -1 && delete i.defaultValue, l;
|
|
3185
3192
|
};
|
|
@@ -3187,14 +3194,14 @@ class Un {
|
|
|
3187
3194
|
let l = [];
|
|
3188
3195
|
i = {
|
|
3189
3196
|
...n
|
|
3190
|
-
}, i = i.replace && !
|
|
3197
|
+
}, i = i.replace && !q(i.replace) ? i.replace : i, i.applyPostProcessor = !1, delete i.defaultValue;
|
|
3191
3198
|
let c = !1;
|
|
3192
3199
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
3193
3200
|
const f = s[1].split(this.formatSeparator).map((u) => u.trim());
|
|
3194
3201
|
s[1] = f.shift(), l = f, c = !0;
|
|
3195
3202
|
}
|
|
3196
|
-
if (a = t(o.call(this, s[1].trim(), i), i), a && s[0] === e && !
|
|
3197
|
-
|
|
3203
|
+
if (a = t(o.call(this, s[1].trim(), i), i), a && s[0] === e && !q(a)) return a;
|
|
3204
|
+
q(a) || (a = cr(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), c && (a = l.reduce((f, u) => this.format(f, u, n.lng, {
|
|
3198
3205
|
...n,
|
|
3199
3206
|
interpolationkey: s[1].trim()
|
|
3200
3207
|
}), a.trim())), e = e.replace(s[0], a), this.regexp.lastIndex = 0;
|
|
@@ -3295,10 +3302,10 @@ class Hn {
|
|
|
3295
3302
|
formatOptions: f
|
|
3296
3303
|
} = Wn(l);
|
|
3297
3304
|
if (this.formats[c]) {
|
|
3298
|
-
let
|
|
3305
|
+
let d = o;
|
|
3299
3306
|
try {
|
|
3300
|
-
const m = ((u = s == null ? void 0 : s.formatParams) == null ? void 0 : u[s.interpolationkey]) || {},
|
|
3301
|
-
|
|
3307
|
+
const m = ((u = s == null ? void 0 : s.formatParams) == null ? void 0 : u[s.interpolationkey]) || {}, p = m.locale || m.lng || s.locale || s.lng || n;
|
|
3308
|
+
d = this.formats[c](o, p, {
|
|
3302
3309
|
...f,
|
|
3303
3310
|
...s,
|
|
3304
3311
|
...m
|
|
@@ -3306,7 +3313,7 @@ class Hn {
|
|
|
3306
3313
|
} catch (m) {
|
|
3307
3314
|
this.logger.warn(m);
|
|
3308
3315
|
}
|
|
3309
|
-
return
|
|
3316
|
+
return d;
|
|
3310
3317
|
} else
|
|
3311
3318
|
this.logger.warn(`there was no format function for ${c}`);
|
|
3312
3319
|
return o;
|
|
@@ -3326,8 +3333,8 @@ class Kn extends yt {
|
|
|
3326
3333
|
return e.forEach((c) => {
|
|
3327
3334
|
let f = !0;
|
|
3328
3335
|
t.forEach((u) => {
|
|
3329
|
-
const
|
|
3330
|
-
!n.reload && this.store.hasResourceBundle(c, u) ? this.state[
|
|
3336
|
+
const d = `${c}|${u}`;
|
|
3337
|
+
!n.reload && this.store.hasResourceBundle(c, u) ? this.state[d] = 2 : this.state[d] < 0 || (this.state[d] === 1 ? i[d] === void 0 && (i[d] = !0) : (this.state[d] = 1, f = !1, i[d] === void 0 && (i[d] = !0), a[d] === void 0 && (a[d] = !0), l[u] === void 0 && (l[u] = !0)));
|
|
3331
3338
|
}), f || (o[c] = !0);
|
|
3332
3339
|
}), (Object.keys(a).length || Object.keys(i).length) && this.queue.push({
|
|
3333
3340
|
pending: i,
|
|
@@ -3399,7 +3406,7 @@ class Kn extends yt {
|
|
|
3399
3406
|
prepareLoading(e, t, n = {}, s) {
|
|
3400
3407
|
if (!this.backend)
|
|
3401
3408
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
3402
|
-
|
|
3409
|
+
q(e) && (e = this.languageUtils.toResolveHierarchy(e)), q(t) && (t = [t]);
|
|
3403
3410
|
const a = this.queueLoad(e, t, n, s);
|
|
3404
3411
|
if (!a.toLoad.length)
|
|
3405
3412
|
return a.pending.length || s(), null;
|
|
@@ -3423,26 +3430,26 @@ class Kn extends yt {
|
|
|
3423
3430
|
}
|
|
3424
3431
|
saveMissing(e, t, n, s, a, i = {}, o = () => {
|
|
3425
3432
|
}) {
|
|
3426
|
-
var l, c, f, u,
|
|
3433
|
+
var l, c, f, u, d;
|
|
3427
3434
|
if ((c = (l = this.services) == null ? void 0 : l.utils) != null && c.hasLoadedNamespace && !((u = (f = this.services) == null ? void 0 : f.utils) != null && u.hasLoadedNamespace(t))) {
|
|
3428
3435
|
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!!!");
|
|
3429
3436
|
return;
|
|
3430
3437
|
}
|
|
3431
3438
|
if (!(n == null || n === "")) {
|
|
3432
|
-
if ((
|
|
3439
|
+
if ((d = this.backend) != null && d.create) {
|
|
3433
3440
|
const m = {
|
|
3434
3441
|
...i,
|
|
3435
3442
|
isUpdate: a
|
|
3436
|
-
},
|
|
3437
|
-
if (
|
|
3443
|
+
}, p = this.backend.create.bind(this.backend);
|
|
3444
|
+
if (p.length < 6)
|
|
3438
3445
|
try {
|
|
3439
3446
|
let y;
|
|
3440
|
-
|
|
3447
|
+
p.length === 5 ? y = p(e, t, n, s, m) : y = p(e, t, n, s), y && typeof y.then == "function" ? y.then((S) => o(null, S)).catch(o) : o(null, y);
|
|
3441
3448
|
} catch (y) {
|
|
3442
3449
|
o(y);
|
|
3443
3450
|
}
|
|
3444
3451
|
else
|
|
3445
|
-
|
|
3452
|
+
p(e, t, n, s, o, m);
|
|
3446
3453
|
}
|
|
3447
3454
|
!e || !e[0] || this.store.addResource(e[0], t, n, s);
|
|
3448
3455
|
}
|
|
@@ -3483,7 +3490,7 @@ const Sr = () => ({
|
|
|
3483
3490
|
appendNamespaceToCIMode: !1,
|
|
3484
3491
|
overloadTranslationOptionHandler: (r) => {
|
|
3485
3492
|
let e = {};
|
|
3486
|
-
if (typeof r[1] == "object" && (e = r[1]),
|
|
3493
|
+
if (typeof r[1] == "object" && (e = r[1]), q(r[1]) && (e.defaultValue = r[1]), q(r[2]) && (e.tDescription = r[2]), typeof r[2] == "object" || typeof r[3] == "object") {
|
|
3487
3494
|
const t = r[3] || r[2];
|
|
3488
3495
|
Object.keys(t).forEach((n) => {
|
|
3489
3496
|
e[n] = t[n];
|
|
@@ -3507,7 +3514,7 @@ const Sr = () => ({
|
|
|
3507
3514
|
cacheInBuiltFormats: !0
|
|
3508
3515
|
}), wr = (r) => {
|
|
3509
3516
|
var e, t;
|
|
3510
|
-
return
|
|
3517
|
+
return q(r.ns) && (r.ns = [r.ns]), q(r.fallbackLng) && (r.fallbackLng = [r.fallbackLng]), q(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;
|
|
3511
3518
|
}, tt = () => {
|
|
3512
3519
|
}, qn = (r) => {
|
|
3513
3520
|
Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((t) => {
|
|
@@ -3527,7 +3534,7 @@ class He extends yt {
|
|
|
3527
3534
|
}
|
|
3528
3535
|
}
|
|
3529
3536
|
init(e = {}, t) {
|
|
3530
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
3537
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (q(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
3531
3538
|
const n = Sr();
|
|
3532
3539
|
this.options = {
|
|
3533
3540
|
...n,
|
|
@@ -3550,12 +3557,12 @@ class He extends yt {
|
|
|
3550
3557
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
3551
3558
|
}), c && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = s(c), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new Un(this.options), u.utils = {
|
|
3552
3559
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
3553
|
-
}, u.backendConnector = new Kn(s(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", (
|
|
3554
|
-
this.emit(
|
|
3555
|
-
}), this.modules.languageDetector && (u.languageDetector = s(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = s(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new dt(this.services, this.options), this.translator.on("*", (
|
|
3556
|
-
this.emit(
|
|
3557
|
-
}), this.modules.external.forEach((
|
|
3558
|
-
|
|
3560
|
+
}, u.backendConnector = new Kn(s(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", (d, ...m) => {
|
|
3561
|
+
this.emit(d, ...m);
|
|
3562
|
+
}), this.modules.languageDetector && (u.languageDetector = s(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = s(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new dt(this.services, this.options), this.translator.on("*", (d, ...m) => {
|
|
3563
|
+
this.emit(d, ...m);
|
|
3564
|
+
}), this.modules.external.forEach((d) => {
|
|
3565
|
+
d.init && d.init(this);
|
|
3559
3566
|
});
|
|
3560
3567
|
}
|
|
3561
3568
|
if (this.format = this.options.interpolation.format, t || (t = tt), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
@@ -3579,7 +3586,7 @@ class He extends yt {
|
|
|
3579
3586
|
loadResources(e, t = tt) {
|
|
3580
3587
|
var a, i;
|
|
3581
3588
|
let n = t;
|
|
3582
|
-
const s =
|
|
3589
|
+
const s = q(e) ? e : this.language;
|
|
3583
3590
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
3584
3591
|
if ((s == null ? void 0 : s.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
3585
3592
|
const o = [], l = (c) => {
|
|
@@ -3628,9 +3635,9 @@ class He extends yt {
|
|
|
3628
3635
|
}, i = (o) => {
|
|
3629
3636
|
var f, u;
|
|
3630
3637
|
!e && !o && this.services.languageDetector && (o = []);
|
|
3631
|
-
const l =
|
|
3632
|
-
c && (this.language || s(c), this.translator.language || this.translator.changeLanguage(c), (u = (f = this.services.languageDetector) == null ? void 0 : f.cacheUserLanguage) == null || u.call(f, c)), this.loadResources(c, (
|
|
3633
|
-
a(
|
|
3638
|
+
const l = q(o) ? o : o && o[0], c = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(q(o) ? [o] : o);
|
|
3639
|
+
c && (this.language || s(c), this.translator.language || this.translator.changeLanguage(c), (u = (f = this.services.languageDetector) == null ? void 0 : f.cacheUserLanguage) == null || u.call(f, c)), this.loadResources(c, (d) => {
|
|
3640
|
+
a(d, c);
|
|
3634
3641
|
});
|
|
3635
3642
|
};
|
|
3636
3643
|
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;
|
|
@@ -3645,7 +3652,7 @@ class He extends yt {
|
|
|
3645
3652
|
let f;
|
|
3646
3653
|
return l.keyPrefix && Array.isArray(a) ? f = a.map((u) => `${l.keyPrefix}${c}${u}`) : f = l.keyPrefix ? `${l.keyPrefix}${c}${a}` : a, this.t(f, l);
|
|
3647
3654
|
};
|
|
3648
|
-
return
|
|
3655
|
+
return q(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = n, s;
|
|
3649
3656
|
}
|
|
3650
3657
|
t(...e) {
|
|
3651
3658
|
var t;
|
|
@@ -3677,7 +3684,7 @@ class He extends yt {
|
|
|
3677
3684
|
}
|
|
3678
3685
|
loadNamespaces(e, t) {
|
|
3679
3686
|
const n = Ue();
|
|
3680
|
-
return this.options.ns ? (
|
|
3687
|
+
return this.options.ns ? (q(e) && (e = [e]), e.forEach((s) => {
|
|
3681
3688
|
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
3682
3689
|
}), this.loadResources((s) => {
|
|
3683
3690
|
n.resolve(), t && t(s);
|
|
@@ -3685,7 +3692,7 @@ class He extends yt {
|
|
|
3685
3692
|
}
|
|
3686
3693
|
loadLanguages(e, t) {
|
|
3687
3694
|
const n = Ue();
|
|
3688
|
-
|
|
3695
|
+
q(e) && (e = [e]);
|
|
3689
3696
|
const s = this.options.preload || [], a = e.filter((i) => s.indexOf(i) < 0 && this.services.languageUtils.isSupportedCode(i));
|
|
3690
3697
|
return a.length ? (this.options.preload = s.concat(a), this.loadResources((i) => {
|
|
3691
3698
|
n.resolve(), t && t(i);
|
|
@@ -3890,47 +3897,47 @@ const kr = ({
|
|
|
3890
3897
|
onChange: c,
|
|
3891
3898
|
onOptionsRequest: f,
|
|
3892
3899
|
_multiActiveIndex: u,
|
|
3893
|
-
...
|
|
3900
|
+
...d
|
|
3894
3901
|
}) => {
|
|
3895
|
-
const m = ce(null), [
|
|
3902
|
+
const m = ce(null), [p, y] = G(r), [S, E] = G(e), { translate: T } = Ie(), [w, O] = G(!1), [b, R] = G(t || []), [N, C] = G(0), [v, _] = G([r]), { anchorRef: k, targetRef: $, anchorWidth: L } = ht({
|
|
3896
3903
|
position: "bottom",
|
|
3897
3904
|
enabled: w
|
|
3898
|
-
}),
|
|
3905
|
+
}), M = ue(() => {
|
|
3899
3906
|
var h;
|
|
3900
3907
|
O(!1), (h = m == null ? void 0 : m.current) == null || h.focus();
|
|
3901
3908
|
}, []);
|
|
3902
|
-
gt(
|
|
3909
|
+
gt([$], w, () => M());
|
|
3903
3910
|
const A = jn(400), V = (h) => {
|
|
3904
3911
|
h.length >= a ? o && f && A(async () => {
|
|
3905
3912
|
const x = await f(o, h);
|
|
3906
3913
|
R(x), C(x.length > 0 ? 0 : -1), O(!0);
|
|
3907
|
-
}) :
|
|
3908
|
-
},
|
|
3914
|
+
}) : M(), y(h), E(e), l || c == null || c(h, e);
|
|
3915
|
+
}, z = (h) => {
|
|
3909
3916
|
l ? (y(""), E("")) : (y(h.id), E(h.label)), c == null || c(h.id, h.label);
|
|
3910
3917
|
const x = b.findIndex((D) => D.id === h.id);
|
|
3911
|
-
C(x), _([h.id]),
|
|
3918
|
+
C(x), _([h.id]), M();
|
|
3912
3919
|
}, J = (h) => {
|
|
3913
|
-
h.key === "Escape" && (
|
|
3914
|
-
},
|
|
3920
|
+
h.key === "Escape" && (M(), C(-1));
|
|
3921
|
+
}, U = (h) => {
|
|
3915
3922
|
if ((h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), w)) {
|
|
3916
3923
|
const x = h.key === "ArrowDown" ? (N + 1) % b.length : (N - 1 + b.length) % b.length;
|
|
3917
3924
|
C(x);
|
|
3918
3925
|
}
|
|
3919
3926
|
switch (h.key) {
|
|
3920
3927
|
case "Enter":
|
|
3921
|
-
N >= 0 && N < b.length ?
|
|
3928
|
+
N >= 0 && N < b.length ? z(b[N]) : l && (c == null || c(p, ""), M(), y(""), E(""));
|
|
3922
3929
|
break;
|
|
3923
3930
|
case "Escape":
|
|
3924
|
-
|
|
3931
|
+
M(), C(-1);
|
|
3925
3932
|
break;
|
|
3926
3933
|
}
|
|
3927
3934
|
};
|
|
3928
3935
|
return /* @__PURE__ */ g.jsxs("div", { "data-component": "autocomplete", children: [
|
|
3929
3936
|
/* @__PURE__ */ g.jsx(
|
|
3930
|
-
|
|
3937
|
+
Pt,
|
|
3931
3938
|
{
|
|
3932
|
-
...
|
|
3933
|
-
bindValue:
|
|
3939
|
+
...d,
|
|
3940
|
+
bindValue: p,
|
|
3934
3941
|
optionalDisplayValue: S,
|
|
3935
3942
|
displayMode: n,
|
|
3936
3943
|
isEditable: i,
|
|
@@ -3941,20 +3948,20 @@ const kr = ({
|
|
|
3941
3948
|
ref: k,
|
|
3942
3949
|
inputRef: m,
|
|
3943
3950
|
onChange: V,
|
|
3944
|
-
onKeyDown:
|
|
3951
|
+
onKeyDown: U,
|
|
3945
3952
|
"aria-autocomplete": "list"
|
|
3946
3953
|
}
|
|
3947
3954
|
),
|
|
3948
3955
|
w && /* @__PURE__ */ g.jsx(mt, { children: /* @__PURE__ */ g.jsx(
|
|
3949
|
-
|
|
3956
|
+
Ar,
|
|
3950
3957
|
{
|
|
3951
3958
|
options: b,
|
|
3952
3959
|
displayMode: s,
|
|
3953
|
-
onClick:
|
|
3960
|
+
onClick: z,
|
|
3954
3961
|
ref: $,
|
|
3955
3962
|
selectedIndex: N,
|
|
3956
3963
|
activeIndex: u || v,
|
|
3957
|
-
width:
|
|
3964
|
+
width: L,
|
|
3958
3965
|
showFilter: !1,
|
|
3959
3966
|
onKeyDown: J,
|
|
3960
3967
|
isOpen: w
|
|
@@ -3974,19 +3981,19 @@ const kr = ({
|
|
|
3974
3981
|
fullWidth: c,
|
|
3975
3982
|
disabled: f,
|
|
3976
3983
|
justify: u,
|
|
3977
|
-
squared:
|
|
3984
|
+
squared: d,
|
|
3978
3985
|
onClick: m,
|
|
3979
|
-
onOptionsRequest:
|
|
3986
|
+
onOptionsRequest: p
|
|
3980
3987
|
}) => {
|
|
3981
3988
|
const [y, S] = G(r);
|
|
3982
3989
|
re(() => {
|
|
3983
|
-
!y &&
|
|
3990
|
+
!y && p && e && p(e, void 0).then((w) => S(w)).catch((w) => {
|
|
3984
3991
|
console.error(
|
|
3985
3992
|
"Errore nel caricamento delle opzioni per ButtonList",
|
|
3986
3993
|
w
|
|
3987
3994
|
);
|
|
3988
3995
|
});
|
|
3989
|
-
}, [y, e,
|
|
3996
|
+
}, [y, e, p]);
|
|
3990
3997
|
const E = {
|
|
3991
3998
|
container: `smp-button-list smp-button-list-${t} smp-justifyContent-${n}`
|
|
3992
3999
|
}, T = y == null ? void 0 : y.map((w, O) => {
|
|
@@ -4003,7 +4010,7 @@ const kr = ({
|
|
|
4003
4010
|
disabled: f,
|
|
4004
4011
|
sizing: s,
|
|
4005
4012
|
justify: u,
|
|
4006
|
-
squared:
|
|
4013
|
+
squared: d,
|
|
4007
4014
|
onClick: () => {
|
|
4008
4015
|
m == null || m(w.id, w.fun);
|
|
4009
4016
|
}
|
|
@@ -4056,15 +4063,15 @@ const kr = ({
|
|
|
4056
4063
|
container: `${["smp-chips-container"]}`,
|
|
4057
4064
|
element: "smp-chips-element"
|
|
4058
4065
|
}, f = (m) => {
|
|
4059
|
-
n == null || n(r.filter((
|
|
4066
|
+
n == null || n(r.filter((p, y) => y !== m));
|
|
4060
4067
|
}, u = (m) => {
|
|
4061
4068
|
l(m);
|
|
4062
|
-
},
|
|
4069
|
+
}, d = (m) => {
|
|
4063
4070
|
if (o === null || o === m) return;
|
|
4064
|
-
const
|
|
4065
|
-
|
|
4071
|
+
const p = [...r], [y] = p.splice(o, 1);
|
|
4072
|
+
p.splice(m, 0, y), n == null || n(p), l(null);
|
|
4066
4073
|
};
|
|
4067
|
-
return /* @__PURE__ */ g.jsx("div", { className: c.container, role: "list", "data-component": "chip", children: r.flatMap((m,
|
|
4074
|
+
return /* @__PURE__ */ g.jsx("div", { className: c.container, role: "list", "data-component": "chip", children: r.flatMap((m, p) => {
|
|
4068
4075
|
const y = Fe(
|
|
4069
4076
|
m.bindValue,
|
|
4070
4077
|
m.optionalDisplayValue,
|
|
@@ -4075,9 +4082,9 @@ const kr = ({
|
|
|
4075
4082
|
className: c.element,
|
|
4076
4083
|
role: "listitem",
|
|
4077
4084
|
draggable: i,
|
|
4078
|
-
onDragStart: () => u(
|
|
4085
|
+
onDragStart: () => u(p),
|
|
4079
4086
|
onDragOver: (T) => i && T.preventDefault(),
|
|
4080
|
-
onDrop: () => i && p
|
|
4087
|
+
onDrop: () => i && d(p),
|
|
4081
4088
|
style: {
|
|
4082
4089
|
"--smp-chips-backgroundColor-base": a
|
|
4083
4090
|
},
|
|
@@ -4089,20 +4096,20 @@ const kr = ({
|
|
|
4089
4096
|
{
|
|
4090
4097
|
icon: "close",
|
|
4091
4098
|
isInteractable: !0,
|
|
4092
|
-
onClick: () => f(
|
|
4099
|
+
onClick: () => f(p),
|
|
4093
4100
|
color: s
|
|
4094
4101
|
}
|
|
4095
4102
|
)
|
|
4096
4103
|
]
|
|
4097
4104
|
},
|
|
4098
|
-
`chip-${
|
|
4099
|
-
), E = i &&
|
|
4105
|
+
`chip-${p}`
|
|
4106
|
+
), E = i && p < r.length - 1 ? /* @__PURE__ */ g.jsx(
|
|
4100
4107
|
le,
|
|
4101
4108
|
{
|
|
4102
4109
|
icon: "chevron-right",
|
|
4103
4110
|
color: s
|
|
4104
4111
|
},
|
|
4105
|
-
`separator-${
|
|
4112
|
+
`separator-${p}`
|
|
4106
4113
|
) : null;
|
|
4107
4114
|
return [S, E].filter(Boolean);
|
|
4108
4115
|
}) });
|
|
@@ -4127,8 +4134,8 @@ function kt(r, e) {
|
|
|
4127
4134
|
if (c.key === "Escape" || c.key !== "Tab") return;
|
|
4128
4135
|
const f = s();
|
|
4129
4136
|
if (f.length === 0) return;
|
|
4130
|
-
const u = f[0],
|
|
4131
|
-
c.shiftKey && document.activeElement === u ? (c.preventDefault(),
|
|
4137
|
+
const u = f[0], d = f[f.length - 1];
|
|
4138
|
+
c.shiftKey && document.activeElement === u ? (c.preventDefault(), d.focus()) : !c.shiftKey && document.activeElement === d && (c.preventDefault(), u.focus());
|
|
4132
4139
|
}, o = (c) => {
|
|
4133
4140
|
if (n && !n.contains(c.target)) {
|
|
4134
4141
|
c.preventDefault();
|
|
@@ -4159,38 +4166,38 @@ const gs = ({
|
|
|
4159
4166
|
multiActiveIndex: c,
|
|
4160
4167
|
...f
|
|
4161
4168
|
}) => {
|
|
4162
|
-
const u = ce(null), [
|
|
4169
|
+
const u = ce(null), [d, m] = G(!1), [p, y] = G(t), [S, E] = G(-1), [T, w] = G([r]), O = Re(), { anchorRef: b, targetRef: R, anchorWidth: N } = ht({
|
|
4163
4170
|
position: "bottom",
|
|
4164
|
-
enabled:
|
|
4171
|
+
enabled: d
|
|
4165
4172
|
}), C = ue(() => {
|
|
4166
|
-
var
|
|
4167
|
-
m(!1), (
|
|
4173
|
+
var L;
|
|
4174
|
+
m(!1), (L = u == null ? void 0 : u.current) == null || L.focus();
|
|
4168
4175
|
}, []);
|
|
4169
|
-
gt(R,
|
|
4170
|
-
const v = (
|
|
4171
|
-
e == null || e(
|
|
4172
|
-
const
|
|
4173
|
-
E(
|
|
4174
|
-
}, _ = (
|
|
4175
|
-
|
|
4176
|
-
}, k = (
|
|
4177
|
-
(
|
|
4176
|
+
gt([R, b], d, () => C()), kt(d, R);
|
|
4177
|
+
const v = (L) => {
|
|
4178
|
+
e == null || e(L.id, L.label);
|
|
4179
|
+
const M = p.findIndex((A) => A.id === L.id);
|
|
4180
|
+
E(M), w([L.id]), C();
|
|
4181
|
+
}, _ = (L) => {
|
|
4182
|
+
L.key === "Escape" && (C(), E(-1));
|
|
4183
|
+
}, k = (L) => {
|
|
4184
|
+
(L.key === "ArrowDown" || L.key === "ArrowUp") && (L.preventDefault(), $());
|
|
4178
4185
|
}, $ = () => {
|
|
4179
|
-
o && l
|
|
4180
|
-
y(
|
|
4181
|
-
});
|
|
4186
|
+
s && (o && l ? d ? m(!1) : l(o, void 0).then((L) => {
|
|
4187
|
+
y(L), E(L.length > 0 ? 0 : -1), m(!0);
|
|
4188
|
+
}) : m((L) => !L));
|
|
4182
4189
|
};
|
|
4183
4190
|
return /* @__PURE__ */ g.jsxs(
|
|
4184
4191
|
"div",
|
|
4185
4192
|
{
|
|
4186
4193
|
role: "combobox",
|
|
4187
|
-
"aria-expanded":
|
|
4194
|
+
"aria-expanded": d,
|
|
4188
4195
|
"aria-controls": O,
|
|
4189
4196
|
"aria-owns": O,
|
|
4190
4197
|
"data-component": "combobox",
|
|
4191
4198
|
children: [
|
|
4192
4199
|
/* @__PURE__ */ g.jsx(
|
|
4193
|
-
|
|
4200
|
+
Pt,
|
|
4194
4201
|
{
|
|
4195
4202
|
...f,
|
|
4196
4203
|
bindValue: r,
|
|
@@ -4198,8 +4205,9 @@ const gs = ({
|
|
|
4198
4205
|
displayMode: a,
|
|
4199
4206
|
onShapeIconClick: $,
|
|
4200
4207
|
onKeyDown: k,
|
|
4208
|
+
onClick: $,
|
|
4201
4209
|
shapeIcon: "arrow_drop_down",
|
|
4202
|
-
rotatedShapeIcon:
|
|
4210
|
+
rotatedShapeIcon: d,
|
|
4203
4211
|
isEditable: s,
|
|
4204
4212
|
ref: b,
|
|
4205
4213
|
inputRef: u,
|
|
@@ -4207,14 +4215,14 @@ const gs = ({
|
|
|
4207
4215
|
variant: "notSelectable"
|
|
4208
4216
|
}
|
|
4209
4217
|
),
|
|
4210
|
-
|
|
4211
|
-
|
|
4218
|
+
d && /* @__PURE__ */ g.jsx(mt, { children: /* @__PURE__ */ g.jsx(
|
|
4219
|
+
Ar,
|
|
4212
4220
|
{
|
|
4213
4221
|
id: O,
|
|
4214
|
-
options:
|
|
4222
|
+
options: p,
|
|
4215
4223
|
displayMode: i,
|
|
4216
4224
|
ref: R,
|
|
4217
|
-
isOpen:
|
|
4225
|
+
isOpen: d,
|
|
4218
4226
|
selectedIndex: S,
|
|
4219
4227
|
activeIndex: c || T,
|
|
4220
4228
|
width: N,
|
|
@@ -4237,15 +4245,15 @@ function bs({
|
|
|
4237
4245
|
}) {
|
|
4238
4246
|
const { translate: a } = Ie(), i = () => {
|
|
4239
4247
|
if (!n) return;
|
|
4240
|
-
const
|
|
4241
|
-
return isNaN(
|
|
4248
|
+
const U = new Date(n);
|
|
4249
|
+
return isNaN(U.getTime()) ? void 0 : U;
|
|
4242
4250
|
}, [o] = G(/* @__PURE__ */ new Date()), [l, c] = G(
|
|
4243
4251
|
r || i() || /* @__PURE__ */ new Date()
|
|
4244
4252
|
), [f, u] = G(
|
|
4245
4253
|
l ? l.getMonth() : (/* @__PURE__ */ new Date()).getMonth()
|
|
4246
|
-
), [
|
|
4254
|
+
), [d, m] = G(
|
|
4247
4255
|
l ? l.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear()
|
|
4248
|
-
), [
|
|
4256
|
+
), [p, y] = G(
|
|
4249
4257
|
l ? l.getDate() : null
|
|
4250
4258
|
), S = ce(null), E = ce([]), T = [
|
|
4251
4259
|
a(pe.JANUARY),
|
|
@@ -4289,33 +4297,33 @@ function bs({
|
|
|
4289
4297
|
value: a(fe.SATURDAY_SHORT),
|
|
4290
4298
|
full: a(fe.SATURDAY)
|
|
4291
4299
|
}
|
|
4292
|
-
], O = (
|
|
4293
|
-
const x = h.start.getTime(), D = h.end.getTime(),
|
|
4294
|
-
return
|
|
4295
|
-
}), b = (
|
|
4296
|
-
O(
|
|
4300
|
+
], O = (U) => t.some((h) => {
|
|
4301
|
+
const x = h.start.getTime(), D = h.end.getTime(), I = U.getTime();
|
|
4302
|
+
return I >= x && I <= D;
|
|
4303
|
+
}), b = (U) => {
|
|
4304
|
+
O(U) || (c(U), y(U.getDate()), e && e(_n(U)));
|
|
4297
4305
|
}, R = () => {
|
|
4298
|
-
f === 0 ? (u(11), m(
|
|
4306
|
+
f === 0 ? (u(11), m(d - 1)) : u(f - 1), y(1);
|
|
4299
4307
|
}, N = () => {
|
|
4300
|
-
f === 11 ? (u(0), m(
|
|
4301
|
-
}, C = (
|
|
4308
|
+
f === 11 ? (u(0), m(d + 1)) : u(f + 1), y(1);
|
|
4309
|
+
}, C = (U, h) => new Date(U, h + 1, 0).getDate(), v = (U, h) => new Date(U, h, 1).getDay(), _ = (U) => {
|
|
4302
4310
|
var x;
|
|
4303
|
-
const h =
|
|
4304
|
-
(D) => D !== null && D.getDate() ===
|
|
4311
|
+
const h = M.findIndex(
|
|
4312
|
+
(D) => D !== null && D.getDate() === U
|
|
4305
4313
|
);
|
|
4306
|
-
h !== -1 && E.current[h] && ((x = E.current[h]) == null || x.focus(), y(
|
|
4307
|
-
}, k = (
|
|
4308
|
-
const x =
|
|
4314
|
+
h !== -1 && E.current[h] && ((x = E.current[h]) == null || x.focus(), y(U));
|
|
4315
|
+
}, k = (U, h) => {
|
|
4316
|
+
const x = M[h];
|
|
4309
4317
|
if (!x) return;
|
|
4310
|
-
const D = C(
|
|
4311
|
-
switch (
|
|
4318
|
+
const D = C(d, f), I = x.getDate();
|
|
4319
|
+
switch (U.key) {
|
|
4312
4320
|
case "ArrowRight":
|
|
4313
|
-
|
|
4321
|
+
U.preventDefault();
|
|
4314
4322
|
{
|
|
4315
|
-
let j =
|
|
4323
|
+
let j = I + 1, P = new Date(d, f, j);
|
|
4316
4324
|
if (j > D) {
|
|
4317
|
-
const
|
|
4318
|
-
j = 1, P = new Date(
|
|
4325
|
+
const Y = f === 11 ? d + 1 : d, B = f === 11 ? 0 : f + 1;
|
|
4326
|
+
j = 1, P = new Date(Y, B, j), N(), setTimeout(() => {
|
|
4319
4327
|
$(1, "forward");
|
|
4320
4328
|
}, 0);
|
|
4321
4329
|
return;
|
|
@@ -4326,13 +4334,13 @@ function bs({
|
|
|
4326
4334
|
case "Tab":
|
|
4327
4335
|
break;
|
|
4328
4336
|
case "ArrowLeft":
|
|
4329
|
-
|
|
4337
|
+
U.preventDefault();
|
|
4330
4338
|
{
|
|
4331
|
-
let j =
|
|
4339
|
+
let j = I - 1, P = new Date(d, f, j);
|
|
4332
4340
|
if (j < 1) {
|
|
4333
|
-
const
|
|
4334
|
-
j =
|
|
4335
|
-
$(
|
|
4341
|
+
const Y = f === 0 ? d - 1 : d, B = f === 0 ? 11 : f - 1, W = C(Y, B);
|
|
4342
|
+
j = W, P = new Date(Y, B, j), R(), setTimeout(() => {
|
|
4343
|
+
$(W, "backward");
|
|
4336
4344
|
}, 0);
|
|
4337
4345
|
return;
|
|
4338
4346
|
}
|
|
@@ -4340,12 +4348,12 @@ function bs({
|
|
|
4340
4348
|
}
|
|
4341
4349
|
break;
|
|
4342
4350
|
case "ArrowUp":
|
|
4343
|
-
|
|
4351
|
+
U.preventDefault();
|
|
4344
4352
|
{
|
|
4345
|
-
let j =
|
|
4353
|
+
let j = I - 7, P = new Date(d, f, j);
|
|
4346
4354
|
if (j < 1) {
|
|
4347
|
-
const
|
|
4348
|
-
j = C(
|
|
4355
|
+
const Y = f === 0 ? d - 1 : d, B = f === 0 ? 11 : f - 1;
|
|
4356
|
+
j = C(Y, B) + j, P = new Date(Y, B, j), R(), setTimeout(() => {
|
|
4349
4357
|
$(j, "backward");
|
|
4350
4358
|
}, 0);
|
|
4351
4359
|
return;
|
|
@@ -4354,12 +4362,12 @@ function bs({
|
|
|
4354
4362
|
}
|
|
4355
4363
|
break;
|
|
4356
4364
|
case "ArrowDown":
|
|
4357
|
-
|
|
4365
|
+
U.preventDefault();
|
|
4358
4366
|
{
|
|
4359
|
-
let j =
|
|
4367
|
+
let j = I + 7, P = new Date(d, f, j);
|
|
4360
4368
|
if (j > D) {
|
|
4361
|
-
const
|
|
4362
|
-
j = j - D, P = new Date(
|
|
4369
|
+
const Y = f === 11 ? d + 1 : d, B = f === 11 ? 0 : f + 1;
|
|
4370
|
+
j = j - D, P = new Date(Y, B, j), N(), setTimeout(() => {
|
|
4363
4371
|
$(j, "forward");
|
|
4364
4372
|
}, 0);
|
|
4365
4373
|
return;
|
|
@@ -4368,26 +4376,26 @@ function bs({
|
|
|
4368
4376
|
}
|
|
4369
4377
|
break;
|
|
4370
4378
|
case "Home":
|
|
4371
|
-
|
|
4379
|
+
U.preventDefault(), $(1, "forward");
|
|
4372
4380
|
break;
|
|
4373
4381
|
case "End":
|
|
4374
|
-
|
|
4382
|
+
U.preventDefault(), $(D, "backward");
|
|
4375
4383
|
break;
|
|
4376
4384
|
case "PageUp":
|
|
4377
|
-
|
|
4385
|
+
U.preventDefault(), R(), setTimeout(() => {
|
|
4378
4386
|
const j = C(
|
|
4379
|
-
f === 0 ?
|
|
4387
|
+
f === 0 ? d - 1 : d,
|
|
4380
4388
|
f === 0 ? 11 : f - 1
|
|
4381
|
-
), P = Math.min(
|
|
4389
|
+
), P = Math.min(I, j);
|
|
4382
4390
|
$(P, "forward");
|
|
4383
4391
|
}, 0);
|
|
4384
4392
|
break;
|
|
4385
4393
|
case "PageDown":
|
|
4386
|
-
|
|
4394
|
+
U.preventDefault(), N(), setTimeout(() => {
|
|
4387
4395
|
const j = C(
|
|
4388
|
-
f === 11 ?
|
|
4396
|
+
f === 11 ? d + 1 : d,
|
|
4389
4397
|
f === 11 ? 0 : f + 1
|
|
4390
|
-
), P = Math.min(
|
|
4398
|
+
), P = Math.min(I, j);
|
|
4391
4399
|
$(P, "forward");
|
|
4392
4400
|
}, 0);
|
|
4393
4401
|
break;
|
|
@@ -4397,15 +4405,15 @@ function bs({
|
|
|
4397
4405
|
y(x.getDate()), c(x);
|
|
4398
4406
|
break;
|
|
4399
4407
|
case "Enter":
|
|
4400
|
-
|
|
4408
|
+
U.preventDefault(), b(x);
|
|
4401
4409
|
break;
|
|
4402
4410
|
}
|
|
4403
|
-
}, $ = (
|
|
4404
|
-
const x = C(
|
|
4411
|
+
}, $ = (U, h) => {
|
|
4412
|
+
const x = C(d, f);
|
|
4405
4413
|
if (h === "forward") {
|
|
4406
|
-
for (let D =
|
|
4407
|
-
const
|
|
4408
|
-
if (!O(
|
|
4414
|
+
for (let D = U; D <= x; D++) {
|
|
4415
|
+
const I = new Date(d, f, D);
|
|
4416
|
+
if (!O(I)) {
|
|
4409
4417
|
_(D);
|
|
4410
4418
|
return;
|
|
4411
4419
|
}
|
|
@@ -4414,60 +4422,60 @@ function bs({
|
|
|
4414
4422
|
$(1, "forward");
|
|
4415
4423
|
}, 0);
|
|
4416
4424
|
} else {
|
|
4417
|
-
for (let P =
|
|
4418
|
-
const
|
|
4419
|
-
if (!O(
|
|
4425
|
+
for (let P = U; P >= 1; P--) {
|
|
4426
|
+
const Y = new Date(d, f, P);
|
|
4427
|
+
if (!O(Y)) {
|
|
4420
4428
|
_(P);
|
|
4421
4429
|
return;
|
|
4422
4430
|
}
|
|
4423
4431
|
}
|
|
4424
|
-
const D = f === 0 ?
|
|
4432
|
+
const D = f === 0 ? d - 1 : d, I = f === 0 ? 11 : f - 1, j = C(D, I);
|
|
4425
4433
|
R(), setTimeout(() => {
|
|
4426
4434
|
$(j, "backward");
|
|
4427
4435
|
}, 0);
|
|
4428
4436
|
}
|
|
4429
|
-
},
|
|
4430
|
-
const
|
|
4437
|
+
}, M = (() => {
|
|
4438
|
+
const U = C(d, f), h = v(d, f), x = [];
|
|
4431
4439
|
for (let D = 0; D < h; D++)
|
|
4432
4440
|
x.push(null);
|
|
4433
|
-
for (let D = 1; D <=
|
|
4434
|
-
const
|
|
4435
|
-
x.push(
|
|
4441
|
+
for (let D = 1; D <= U; D++) {
|
|
4442
|
+
const I = new Date(d, f, D);
|
|
4443
|
+
x.push(I);
|
|
4436
4444
|
}
|
|
4437
4445
|
return x;
|
|
4438
4446
|
})(), A = [];
|
|
4439
4447
|
let V = [];
|
|
4440
|
-
|
|
4441
|
-
if (V.push(
|
|
4448
|
+
M.forEach((U, h) => {
|
|
4449
|
+
if (V.push(U), V.length === 7 || h === M.length - 1) {
|
|
4442
4450
|
for (; V.length < 7; )
|
|
4443
4451
|
V.push(null);
|
|
4444
4452
|
A.push(V), V = [];
|
|
4445
4453
|
}
|
|
4446
4454
|
}), re(() => {
|
|
4447
|
-
var
|
|
4448
|
-
if (
|
|
4449
|
-
const h =
|
|
4450
|
-
(x) => x !== null && x.getDate() ===
|
|
4455
|
+
var U;
|
|
4456
|
+
if (p !== null) {
|
|
4457
|
+
const h = M.findIndex(
|
|
4458
|
+
(x) => x !== null && x.getDate() === p
|
|
4451
4459
|
);
|
|
4452
|
-
h !== -1 && E.current[h] && ((
|
|
4460
|
+
h !== -1 && E.current[h] && ((U = E.current[h]) == null || U.focus());
|
|
4453
4461
|
}
|
|
4454
|
-
}, [f,
|
|
4455
|
-
const
|
|
4462
|
+
}, [f, d, p, M]);
|
|
4463
|
+
const z = {
|
|
4456
4464
|
label: "smp-datepickercalendar-label",
|
|
4457
4465
|
wrapper: `smp-datepickercalendar ${ys["smp-datepickercalendar-position"]}`,
|
|
4458
4466
|
calendar: "smp-datepickercalendar",
|
|
4459
4467
|
table: "smp-datepickercalendar-table",
|
|
4460
4468
|
th: "smp-datepickercalendar-th",
|
|
4461
|
-
td: (
|
|
4462
|
-
${
|
|
4469
|
+
td: (U, h, x, D) => `smp-datepickercalendar-td
|
|
4470
|
+
${U ? "smp-datepickercalendar-td-today" : ""}
|
|
4463
4471
|
${h ? "smp-datepickercalendar-td-selected" : ""}
|
|
4464
4472
|
${x ? "smp-datepickercalendar-td-focused" : ""}
|
|
4465
4473
|
${D ? "smp-datepickercalendar-td-disabled" : ""}`
|
|
4466
|
-
}, J = () => `${T[f]} ${
|
|
4474
|
+
}, J = () => `${T[f]} ${d.toString()}`;
|
|
4467
4475
|
return /* @__PURE__ */ g.jsxs(
|
|
4468
4476
|
"div",
|
|
4469
4477
|
{
|
|
4470
|
-
className:
|
|
4478
|
+
className: z.wrapper,
|
|
4471
4479
|
ref: s,
|
|
4472
4480
|
role: "dialog",
|
|
4473
4481
|
tabIndex: -1,
|
|
@@ -4499,7 +4507,7 @@ function bs({
|
|
|
4499
4507
|
"div",
|
|
4500
4508
|
{
|
|
4501
4509
|
"aria-label": J(),
|
|
4502
|
-
className:
|
|
4510
|
+
className: z.label,
|
|
4503
4511
|
children: J()
|
|
4504
4512
|
}
|
|
4505
4513
|
),
|
|
@@ -4522,26 +4530,26 @@ function bs({
|
|
|
4522
4530
|
{
|
|
4523
4531
|
ref: S,
|
|
4524
4532
|
role: "grid",
|
|
4525
|
-
"aria-label": `${a(Oe.CALENDAR_FOR)} ${T[f]} ${
|
|
4526
|
-
className:
|
|
4533
|
+
"aria-label": `${a(Oe.CALENDAR_FOR)} ${T[f]} ${d}`,
|
|
4534
|
+
className: z.table,
|
|
4527
4535
|
children: [
|
|
4528
|
-
/* @__PURE__ */ g.jsx("thead", { children: /* @__PURE__ */ g.jsx("tr", { children: w.map((
|
|
4536
|
+
/* @__PURE__ */ g.jsx("thead", { children: /* @__PURE__ */ g.jsx("tr", { children: w.map((U) => /* @__PURE__ */ g.jsx(
|
|
4529
4537
|
"th",
|
|
4530
4538
|
{
|
|
4531
4539
|
scope: "col",
|
|
4532
|
-
abbr:
|
|
4533
|
-
className:
|
|
4534
|
-
children:
|
|
4540
|
+
abbr: U.full,
|
|
4541
|
+
className: z.th,
|
|
4542
|
+
children: U.value
|
|
4535
4543
|
},
|
|
4536
|
-
|
|
4544
|
+
U.value
|
|
4537
4545
|
)) }) }),
|
|
4538
|
-
/* @__PURE__ */ g.jsx("tbody", { children: A.map((
|
|
4539
|
-
const
|
|
4546
|
+
/* @__PURE__ */ g.jsx("tbody", { children: A.map((U, h) => /* @__PURE__ */ g.jsx("tr", { children: U.map((x, D) => {
|
|
4547
|
+
const I = h * 7 + D;
|
|
4540
4548
|
if (x === null)
|
|
4541
4549
|
return /* @__PURE__ */ g.jsx(
|
|
4542
4550
|
"td",
|
|
4543
4551
|
{
|
|
4544
|
-
className:
|
|
4552
|
+
className: z.td(
|
|
4545
4553
|
!1,
|
|
4546
4554
|
!1,
|
|
4547
4555
|
!1,
|
|
@@ -4550,25 +4558,25 @@ function bs({
|
|
|
4550
4558
|
},
|
|
4551
4559
|
`empty-${D}`
|
|
4552
4560
|
);
|
|
4553
|
-
const j = x.getDate() === o.getDate() && x.getMonth() === o.getMonth() && x.getFullYear() === o.getFullYear(), P = l && x.getDate() === l.getDate() && x.getMonth() === l.getMonth() && x.getFullYear() === l.getFullYear(),
|
|
4561
|
+
const j = x.getDate() === o.getDate() && x.getMonth() === o.getMonth() && x.getFullYear() === o.getFullYear(), P = l && x.getDate() === l.getDate() && x.getMonth() === l.getMonth() && x.getFullYear() === l.getFullYear(), Y = p === x.getDate(), B = O(x);
|
|
4554
4562
|
return /* @__PURE__ */ g.jsx(
|
|
4555
4563
|
"td",
|
|
4556
4564
|
{
|
|
4557
4565
|
role: "gridcell",
|
|
4558
4566
|
"aria-selected": P,
|
|
4559
|
-
tabIndex:
|
|
4567
|
+
tabIndex: Y ? 0 : -1,
|
|
4560
4568
|
onClick: () => b(x),
|
|
4561
|
-
onKeyDown: (
|
|
4569
|
+
onKeyDown: (W) => k(W, I),
|
|
4562
4570
|
"aria-label": `${x.getDate()} ${T[x.getMonth()]} ${x.getFullYear()}`,
|
|
4563
4571
|
"data-selected": P,
|
|
4564
4572
|
"aria-disabled": B,
|
|
4565
|
-
ref: (
|
|
4566
|
-
E.current[
|
|
4573
|
+
ref: (W) => {
|
|
4574
|
+
E.current[I] = W;
|
|
4567
4575
|
},
|
|
4568
|
-
className:
|
|
4576
|
+
className: z.td(
|
|
4569
4577
|
j,
|
|
4570
4578
|
P,
|
|
4571
|
-
|
|
4579
|
+
Y,
|
|
4572
4580
|
B
|
|
4573
4581
|
),
|
|
4574
4582
|
children: x.getDate()
|
|
@@ -4591,25 +4599,25 @@ const vs = ({
|
|
|
4591
4599
|
isEditable: s = !0,
|
|
4592
4600
|
...a
|
|
4593
4601
|
}) => {
|
|
4594
|
-
const i = ce(null), [o, l] = G(!1), [c, f] = G(r || ""), [u,
|
|
4602
|
+
const i = ce(null), [o, l] = G(!1), [c, f] = G(r || ""), [u, d] = G(""), { anchorRef: m, targetRef: p } = ht({
|
|
4595
4603
|
position: "bottom",
|
|
4596
4604
|
enabled: o
|
|
4597
4605
|
}), y = ue(() => {
|
|
4598
4606
|
var v;
|
|
4599
4607
|
l(!1), (v = i == null ? void 0 : i.current) == null || v.focus();
|
|
4600
4608
|
}, []);
|
|
4601
|
-
gt(
|
|
4609
|
+
gt([p, m], o, () => {
|
|
4602
4610
|
y();
|
|
4603
|
-
}), kt(o,
|
|
4611
|
+
}), kt(o, p);
|
|
4604
4612
|
const { format: S, getCurrentLanguage: E } = Ie(), T = ue(
|
|
4605
4613
|
(v) => {
|
|
4606
4614
|
const _ = v.length > 5 && En(v, E()) || v, k = S(_, void 0, void 0, {
|
|
4607
4615
|
type: "date"
|
|
4608
|
-
}), $ = typeof _ != "string",
|
|
4616
|
+
}), $ = typeof _ != "string", L = $ && _.toISOString().substring(0, 10) || "";
|
|
4609
4617
|
return {
|
|
4610
4618
|
isValid: $,
|
|
4611
4619
|
formattedDate: k,
|
|
4612
|
-
isoDate:
|
|
4620
|
+
isoDate: L,
|
|
4613
4621
|
normalizedDate: _
|
|
4614
4622
|
};
|
|
4615
4623
|
},
|
|
@@ -4617,7 +4625,7 @@ const vs = ({
|
|
|
4617
4625
|
);
|
|
4618
4626
|
re(() => {
|
|
4619
4627
|
const { formattedDate: v, isoDate: _, isValid: k } = T(r);
|
|
4620
|
-
f(k && _ || r),
|
|
4628
|
+
f(k && _ || r), d(k && v || r);
|
|
4621
4629
|
}, [r, S, T]);
|
|
4622
4630
|
const w = () => l((v) => !v), O = () => {
|
|
4623
4631
|
R(u);
|
|
@@ -4627,7 +4635,7 @@ const vs = ({
|
|
|
4627
4635
|
const { isoDate: _, isValid: k } = T(v);
|
|
4628
4636
|
t && t(k && _ || v);
|
|
4629
4637
|
}, N = (v) => {
|
|
4630
|
-
|
|
4638
|
+
d(v);
|
|
4631
4639
|
}, C = (v) => {
|
|
4632
4640
|
v.key === "Enter" && (v.preventDefault(), R(u));
|
|
4633
4641
|
};
|
|
@@ -4655,8 +4663,8 @@ const vs = ({
|
|
|
4655
4663
|
{
|
|
4656
4664
|
disabledDateRanges: n,
|
|
4657
4665
|
onDateChange: b,
|
|
4658
|
-
initialValue:
|
|
4659
|
-
targetRef:
|
|
4666
|
+
initialValue: At(c) && c || "",
|
|
4667
|
+
targetRef: p
|
|
4660
4668
|
}
|
|
4661
4669
|
) })
|
|
4662
4670
|
] });
|
|
@@ -4673,9 +4681,9 @@ const vs = ({
|
|
|
4673
4681
|
error: c,
|
|
4674
4682
|
onOptionsRequest: f,
|
|
4675
4683
|
onChange: u,
|
|
4676
|
-
onBlur:
|
|
4684
|
+
onBlur: d
|
|
4677
4685
|
}) => {
|
|
4678
|
-
const m = r.map((S) => S.bindValue),
|
|
4686
|
+
const m = r.map((S) => S.bindValue), p = (S, E) => {
|
|
4679
4687
|
const T = [...r];
|
|
4680
4688
|
if (S == "")
|
|
4681
4689
|
T.pop();
|
|
@@ -4716,7 +4724,7 @@ const vs = ({
|
|
|
4716
4724
|
bindValue: "",
|
|
4717
4725
|
fun: l,
|
|
4718
4726
|
isEditable: s,
|
|
4719
|
-
onChange:
|
|
4727
|
+
onChange: p,
|
|
4720
4728
|
_changeOnEnter: !0,
|
|
4721
4729
|
listDisplayMode: n,
|
|
4722
4730
|
minimumChars: t,
|
|
@@ -4724,7 +4732,7 @@ const vs = ({
|
|
|
4724
4732
|
onOptionsRequest: f,
|
|
4725
4733
|
_multiActiveIndex: m,
|
|
4726
4734
|
error: c,
|
|
4727
|
-
onBlur:
|
|
4735
|
+
onBlur: d
|
|
4728
4736
|
}
|
|
4729
4737
|
)
|
|
4730
4738
|
]
|
|
@@ -4847,59 +4855,59 @@ const ke = (r, e, t) => ({
|
|
|
4847
4855
|
onEnter: o,
|
|
4848
4856
|
...l
|
|
4849
4857
|
}) => {
|
|
4850
|
-
const { getCurrentLanguage: c } = Ie(), f = ce(null), u = c(), { groupingChar:
|
|
4858
|
+
const { getCurrentLanguage: c } = Ie(), f = ce(null), u = c(), { groupingChar: d, decimalChar: m } = Wr(
|
|
4851
4859
|
() => as(u, s),
|
|
4852
4860
|
[u, s]
|
|
4853
|
-
),
|
|
4854
|
-
($,
|
|
4855
|
-
minimumFractionDigits:
|
|
4856
|
-
maximumFractionDigits:
|
|
4861
|
+
), p = ue(
|
|
4862
|
+
($, L) => new Intl.NumberFormat(u, {
|
|
4863
|
+
minimumFractionDigits: L,
|
|
4864
|
+
maximumFractionDigits: L,
|
|
4857
4865
|
useGrouping: !0
|
|
4858
4866
|
}).format($),
|
|
4859
4867
|
[u]
|
|
4860
|
-
), y = ue(ls, [
|
|
4861
|
-
a != null ?
|
|
4868
|
+
), y = ue(ls, [d, m]), S = ue(ss, [r, e]), E = a != null && a.toString().includes(".") ? a.toString().split(".")[1].length : 0, [T, w] = G(E), [O, b] = G(
|
|
4869
|
+
a != null ? p(a, T) : ""
|
|
4862
4870
|
), R = ce(a ?? null);
|
|
4863
4871
|
re(() => {
|
|
4864
4872
|
if (a == null) {
|
|
4865
4873
|
b(""), R.current = null;
|
|
4866
4874
|
return;
|
|
4867
4875
|
}
|
|
4868
|
-
const $ = a.toString().includes(".") ? a.toString().split(".")[1].length : 0,
|
|
4869
|
-
|
|
4870
|
-
}, [a,
|
|
4876
|
+
const $ = a.toString().includes(".") ? a.toString().split(".")[1].length : 0, L = $ === 0 ? T : $;
|
|
4877
|
+
L !== T && w(L), b(p(a, L)), R.current = a;
|
|
4878
|
+
}, [a, p]);
|
|
4871
4879
|
const N = ue(
|
|
4872
|
-
($,
|
|
4880
|
+
($, L = !1) => {
|
|
4873
4881
|
if ($.trim() === "") {
|
|
4874
|
-
b(""), R.current = null, i == null || i(void 0, ""),
|
|
4882
|
+
b(""), R.current = null, i == null || i(void 0, ""), L && (o == null || o(void 0));
|
|
4875
4883
|
return;
|
|
4876
4884
|
}
|
|
4877
|
-
const
|
|
4878
|
-
if (isNaN(
|
|
4885
|
+
const M = y($, d, m);
|
|
4886
|
+
if (isNaN(M))
|
|
4879
4887
|
if (R.current != null) {
|
|
4880
|
-
const A =
|
|
4888
|
+
const A = p(R.current, T);
|
|
4881
4889
|
b(A);
|
|
4882
4890
|
} else
|
|
4883
4891
|
b("");
|
|
4884
4892
|
else {
|
|
4885
|
-
const A = S(
|
|
4893
|
+
const A = S(M, r, e), V = os(
|
|
4886
4894
|
$,
|
|
4887
|
-
|
|
4895
|
+
d,
|
|
4888
4896
|
m
|
|
4889
4897
|
);
|
|
4890
4898
|
w(V);
|
|
4891
|
-
const
|
|
4892
|
-
b(
|
|
4899
|
+
const z = p(A, V);
|
|
4900
|
+
b(z), R.current = A, i == null || i(A, z), L && (o == null || o(A));
|
|
4893
4901
|
}
|
|
4894
4902
|
},
|
|
4895
4903
|
[
|
|
4896
4904
|
y,
|
|
4897
|
-
|
|
4905
|
+
d,
|
|
4898
4906
|
m,
|
|
4899
4907
|
S,
|
|
4900
4908
|
r,
|
|
4901
4909
|
e,
|
|
4902
|
-
|
|
4910
|
+
p,
|
|
4903
4911
|
i,
|
|
4904
4912
|
o,
|
|
4905
4913
|
T
|
|
@@ -4911,14 +4919,14 @@ const ke = (r, e, t) => ({
|
|
|
4911
4919
|
}
|
|
4912
4920
|
if ($.key === "ArrowUp" || $.key === "ArrowDown") {
|
|
4913
4921
|
$.preventDefault();
|
|
4914
|
-
const
|
|
4915
|
-
N(
|
|
4922
|
+
const L = $.key === "ArrowUp" ? 1 : -1, M = R.current ?? 0, A = S(M + L * t, r, e);
|
|
4923
|
+
N(p(A, T));
|
|
4916
4924
|
}
|
|
4917
4925
|
}, k = ($) => {
|
|
4918
4926
|
if (!$.currentTarget.contains(document.activeElement)) return;
|
|
4919
4927
|
$.preventDefault();
|
|
4920
|
-
const
|
|
4921
|
-
N(
|
|
4928
|
+
const L = $.deltaY < 0 ? 1 : -1, M = R.current ?? 0, A = S(M + L * t, r, e);
|
|
4929
|
+
N(p(A, T));
|
|
4922
4930
|
};
|
|
4923
4931
|
return /* @__PURE__ */ g.jsx("div", { ref: f, "data-component": "input-number", onWheel: k, children: /* @__PURE__ */ g.jsx(
|
|
4924
4932
|
Le,
|
|
@@ -4995,9 +5003,9 @@ const _s = ({
|
|
|
4995
5003
|
helperText: c,
|
|
4996
5004
|
error: f,
|
|
4997
5005
|
onBlur: u,
|
|
4998
|
-
onKeyDown:
|
|
5006
|
+
onKeyDown: d,
|
|
4999
5007
|
rows: m = 10,
|
|
5000
|
-
cols:
|
|
5008
|
+
cols: p = 150
|
|
5001
5009
|
}) => {
|
|
5002
5010
|
const y = Re(), S = `${y}-helper`, E = f ? "danger" : s, T = c || !!f, w = (b) => {
|
|
5003
5011
|
t == null || t(b.target.value);
|
|
@@ -5018,12 +5026,12 @@ const _s = ({
|
|
|
5018
5026
|
className: O.container,
|
|
5019
5027
|
disabled: r,
|
|
5020
5028
|
readOnly: !i,
|
|
5021
|
-
onKeyDown:
|
|
5029
|
+
onKeyDown: d,
|
|
5022
5030
|
"aria-label": o ? void 0 : l,
|
|
5023
5031
|
"aria-labelledby": o ? y : void 0,
|
|
5024
5032
|
"aria-describedby": T ? S : void 0,
|
|
5025
5033
|
rows: m,
|
|
5026
|
-
cols:
|
|
5034
|
+
cols: p
|
|
5027
5035
|
}
|
|
5028
5036
|
),
|
|
5029
5037
|
T && /* @__PURE__ */ g.jsx(
|
|
@@ -5062,13 +5070,13 @@ const rt = {
|
|
|
5062
5070
|
const u = {
|
|
5063
5071
|
container: `${rt["smp-radio"]} ${t == Lt.LINE_DIRECTION ? rt["smp-radio-horizontal"] : ""}`,
|
|
5064
5072
|
option: `${rt["smp-radio-element"]} ${r ? rt["smp-radio-disabled"] : ""}`
|
|
5065
|
-
},
|
|
5073
|
+
}, d = () => {
|
|
5066
5074
|
var y;
|
|
5067
5075
|
r || (y = o.onBlur) == null || y.call(o);
|
|
5068
5076
|
}, m = (y) => {
|
|
5069
5077
|
var S;
|
|
5070
5078
|
r || (S = o.onChange) == null || S.call(o, y.id, y.label);
|
|
5071
|
-
},
|
|
5079
|
+
}, p = Re();
|
|
5072
5080
|
return /* @__PURE__ */ g.jsxs("div", { "smp-id": "radio-container", className: u.container, id: f, children: [
|
|
5073
5081
|
i && /* @__PURE__ */ g.jsx(Ce, { label: i, disabled: r, htmlFor: f }),
|
|
5074
5082
|
l == null ? void 0 : l.map((y, S) => /* @__PURE__ */ g.jsxs("label", { className: u.option, children: [
|
|
@@ -5076,12 +5084,12 @@ const rt = {
|
|
|
5076
5084
|
"input",
|
|
5077
5085
|
{
|
|
5078
5086
|
type: "radio",
|
|
5079
|
-
name:
|
|
5087
|
+
name: p,
|
|
5080
5088
|
value: y.id,
|
|
5081
5089
|
disabled: r,
|
|
5082
5090
|
checked: y.id === o.bindValue,
|
|
5083
5091
|
onChange: () => m(y),
|
|
5084
|
-
onBlur:
|
|
5092
|
+
onBlur: d
|
|
5085
5093
|
}
|
|
5086
5094
|
),
|
|
5087
5095
|
/* @__PURE__ */ g.jsx(
|
|
@@ -5165,14 +5173,14 @@ const rt = {
|
|
|
5165
5173
|
isEditable: n = !0,
|
|
5166
5174
|
...s
|
|
5167
5175
|
}) => {
|
|
5168
|
-
const a = ce(null), [i, o] = G(!1), [l, c] = G(r || ""), [f, u] = G(""), { anchorRef:
|
|
5176
|
+
const a = ce(null), [i, o] = G(!1), [l, c] = G(r || ""), [f, u] = G(""), { anchorRef: d, targetRef: m } = ht({
|
|
5169
5177
|
position: "bottom",
|
|
5170
5178
|
enabled: i
|
|
5171
|
-
}),
|
|
5179
|
+
}), p = ue(() => {
|
|
5172
5180
|
var b;
|
|
5173
5181
|
o(!1), (b = a == null ? void 0 : a.current) == null || b.focus();
|
|
5174
5182
|
}, []);
|
|
5175
|
-
gt(m, i, () => o(!1)), kt(i, m), re(() => {
|
|
5183
|
+
gt([m, d], i, () => o(!1)), kt(i, m), re(() => {
|
|
5176
5184
|
const b = r || "", R = Or(b) ? b : r || "";
|
|
5177
5185
|
c(b), u(R);
|
|
5178
5186
|
}, [r]), re(() => {
|
|
@@ -5189,7 +5197,7 @@ const rt = {
|
|
|
5189
5197
|
u(b);
|
|
5190
5198
|
}, E = (b, R, N) => {
|
|
5191
5199
|
const C = $s(b, R, N);
|
|
5192
|
-
c(C), u(C), t == null || t(C),
|
|
5200
|
+
c(C), u(C), t == null || t(C), p();
|
|
5193
5201
|
}, T = () => {
|
|
5194
5202
|
O(f);
|
|
5195
5203
|
}, w = (b) => {
|
|
@@ -5203,7 +5211,7 @@ const rt = {
|
|
|
5203
5211
|
};
|
|
5204
5212
|
return /* @__PURE__ */ g.jsxs("div", { "data-component": "time-picker", children: [
|
|
5205
5213
|
/* @__PURE__ */ g.jsx(
|
|
5206
|
-
|
|
5214
|
+
Pt,
|
|
5207
5215
|
{
|
|
5208
5216
|
...s,
|
|
5209
5217
|
bindValue: f,
|
|
@@ -5214,7 +5222,7 @@ const rt = {
|
|
|
5214
5222
|
shapeIcon: "clock",
|
|
5215
5223
|
onShapeIconClick: y,
|
|
5216
5224
|
isEditable: n,
|
|
5217
|
-
ref:
|
|
5225
|
+
ref: d,
|
|
5218
5226
|
inputRef: a
|
|
5219
5227
|
}
|
|
5220
5228
|
),
|
|
@@ -5283,9 +5291,9 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5283
5291
|
options: c,
|
|
5284
5292
|
onChange: f,
|
|
5285
5293
|
onClick: u,
|
|
5286
|
-
onEnter:
|
|
5294
|
+
onEnter: d,
|
|
5287
5295
|
onBlur: m,
|
|
5288
|
-
onOptionsRequest:
|
|
5296
|
+
onOptionsRequest: p,
|
|
5289
5297
|
onContextMenu: y,
|
|
5290
5298
|
isEditable: S
|
|
5291
5299
|
}) => {
|
|
@@ -5297,7 +5305,7 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5297
5305
|
fun: a
|
|
5298
5306
|
}, T = {
|
|
5299
5307
|
onBlur: m,
|
|
5300
|
-
onOptionsRequest:
|
|
5308
|
+
onOptionsRequest: p,
|
|
5301
5309
|
fun: a,
|
|
5302
5310
|
icon: s,
|
|
5303
5311
|
tooltip: l,
|
|
@@ -5453,7 +5461,7 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5453
5461
|
...T,
|
|
5454
5462
|
bindValue: t.k,
|
|
5455
5463
|
onEnter: (_) => {
|
|
5456
|
-
|
|
5464
|
+
d == null || d(w(E, _));
|
|
5457
5465
|
}
|
|
5458
5466
|
};
|
|
5459
5467
|
return /* @__PURE__ */ g.jsx(ws, { ...v });
|
|
@@ -5510,21 +5518,21 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5510
5518
|
var o, l;
|
|
5511
5519
|
const [s, a] = G(), i = ue(
|
|
5512
5520
|
(c) => {
|
|
5513
|
-
var u,
|
|
5514
|
-
if (!((u = c.rows) != null && u.length) || !((
|
|
5521
|
+
var u, d;
|
|
5522
|
+
if (!((u = c.rows) != null && u.length) || !((d = c.columns) != null && d.length))
|
|
5515
5523
|
return {};
|
|
5516
5524
|
const f = c.rows[0];
|
|
5517
|
-
return c.columns.filter((m) => m.visible).reduce((m,
|
|
5518
|
-
const y = f.cells[
|
|
5525
|
+
return c.columns.filter((m) => m.visible).reduce((m, p) => {
|
|
5526
|
+
const y = f.cells[p.name], S = {
|
|
5519
5527
|
...y,
|
|
5520
|
-
id:
|
|
5528
|
+
id: p.name,
|
|
5521
5529
|
onChange: (E) => {
|
|
5522
5530
|
a((T) => T && {
|
|
5523
5531
|
...T,
|
|
5524
|
-
[
|
|
5525
|
-
...T[
|
|
5532
|
+
[p.name]: {
|
|
5533
|
+
...T[p.name],
|
|
5526
5534
|
obj: {
|
|
5527
|
-
...T[
|
|
5535
|
+
...T[p.name].obj,
|
|
5528
5536
|
k: E.obj.k
|
|
5529
5537
|
}
|
|
5530
5538
|
}
|
|
@@ -5544,7 +5552,7 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5544
5552
|
};
|
|
5545
5553
|
return {
|
|
5546
5554
|
...m,
|
|
5547
|
-
[
|
|
5555
|
+
[p.name]: S
|
|
5548
5556
|
};
|
|
5549
5557
|
}, {});
|
|
5550
5558
|
},
|
|
@@ -5553,7 +5561,7 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5553
5561
|
return re(() => {
|
|
5554
5562
|
r && a(i(r));
|
|
5555
5563
|
}, [r, i]), !((o = r == null ? void 0 : r.rows) != null && o.length) || !((l = r.columns) != null && l.length) ? null : s && /* @__PURE__ */ g.jsx("header", { className: "smp-appbar", "aria-label": "App Bar", children: /* @__PURE__ */ g.jsx(ot, { layout: r.rows[0].layout, children: Object.values(s).map((c) => /* @__PURE__ */ g.jsx(_e, { ...c })) }) });
|
|
5556
|
-
},
|
|
5564
|
+
}, As = (r) => {
|
|
5557
5565
|
var e;
|
|
5558
5566
|
return (e = r.children) != null && e.length ? r.children.map((t) => {
|
|
5559
5567
|
var n, s;
|
|
@@ -5577,7 +5585,7 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5577
5585
|
onContextMenu: c
|
|
5578
5586
|
}) => {
|
|
5579
5587
|
var O, b;
|
|
5580
|
-
const [f, u] = G(), [
|
|
5588
|
+
const [f, u] = G(), [d, m] = G(t ?? !0), p = ce(null), y = s.trim() ? s : "100vh", S = ue(
|
|
5581
5589
|
(R) => {
|
|
5582
5590
|
var C, v;
|
|
5583
5591
|
if (!((C = R == null ? void 0 : R.rows) != null && C.length) || !((v = R == null ? void 0 : R.columns) != null && v.length))
|
|
@@ -5585,41 +5593,41 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5585
5593
|
const N = R.rows[0];
|
|
5586
5594
|
return R.columns.filter((_) => _.visible ?? !0).reduce((_, k) => {
|
|
5587
5595
|
const $ = N.cells[k.name];
|
|
5588
|
-
if (!$ || !
|
|
5596
|
+
if (!$ || !d && de(n) && $.shape !== te.BUTTON && $.shape !== te.BUTTON_LIST)
|
|
5589
5597
|
return _;
|
|
5590
|
-
const
|
|
5598
|
+
const L = {
|
|
5591
5599
|
...$,
|
|
5592
5600
|
id: k.name,
|
|
5593
|
-
onChange: (
|
|
5601
|
+
onChange: (M) => {
|
|
5594
5602
|
u((A) => {
|
|
5595
5603
|
const V = { ...A };
|
|
5596
|
-
return V != null && V[k.name] && (V[k.name].obj.k =
|
|
5604
|
+
return V != null && V[k.name] && (V[k.name].obj.k = M.obj.k), V;
|
|
5597
5605
|
});
|
|
5598
5606
|
},
|
|
5599
|
-
onClick: (
|
|
5600
|
-
|
|
5607
|
+
onClick: (M) => {
|
|
5608
|
+
M.fun && a && a(M);
|
|
5601
5609
|
},
|
|
5602
|
-
onEnter: (
|
|
5603
|
-
i && i(
|
|
5610
|
+
onEnter: (M) => {
|
|
5611
|
+
i && i(M);
|
|
5604
5612
|
},
|
|
5605
|
-
onContextMenu: (
|
|
5606
|
-
c && c(
|
|
5613
|
+
onContextMenu: (M, A) => {
|
|
5614
|
+
c && c(M, A);
|
|
5607
5615
|
}
|
|
5608
5616
|
};
|
|
5609
|
-
return l && $.shape == te.BUTTON_LIST && (
|
|
5610
|
-
(V) =>
|
|
5611
|
-
)), !
|
|
5612
|
-
...
|
|
5617
|
+
return l && $.shape == te.BUTTON_LIST && (L.onOptionsRequest = (M, A) => l(M, A).then(
|
|
5618
|
+
(V) => As(V)
|
|
5619
|
+
)), !d && de(n) && (L.data = {
|
|
5620
|
+
...L.data,
|
|
5613
5621
|
showText: !1,
|
|
5614
5622
|
justify: "center",
|
|
5615
5623
|
squared: !0
|
|
5616
5624
|
}), {
|
|
5617
5625
|
..._,
|
|
5618
|
-
[k.name]:
|
|
5626
|
+
[k.name]: L
|
|
5619
5627
|
};
|
|
5620
5628
|
}, {});
|
|
5621
5629
|
},
|
|
5622
|
-
[
|
|
5630
|
+
[d, n, a, i, l, c]
|
|
5623
5631
|
), E = ue(() => {
|
|
5624
5632
|
o == null || o();
|
|
5625
5633
|
}, [o]), T = () => {
|
|
@@ -5628,31 +5636,31 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5628
5636
|
if (re(() => {
|
|
5629
5637
|
u(S(r));
|
|
5630
5638
|
}, [r]), re(() => {
|
|
5631
|
-
if (!
|
|
5639
|
+
if (!p.current)
|
|
5632
5640
|
return;
|
|
5633
5641
|
if (!de(n)) {
|
|
5634
5642
|
u(S(r));
|
|
5635
5643
|
return;
|
|
5636
5644
|
}
|
|
5637
|
-
const R = getComputedStyle(
|
|
5645
|
+
const R = getComputedStyle(p.current).getPropertyValue(
|
|
5638
5646
|
"--smp-drawer-slide-transition"
|
|
5639
5647
|
);
|
|
5640
5648
|
let N = Number(R);
|
|
5641
5649
|
R.endsWith("ms") ? N = parseFloat(R) : R.endsWith("s") && (N = parseFloat(R) * 1e3), setTimeout(() => {
|
|
5642
5650
|
u(S(r));
|
|
5643
5651
|
}, N / 2);
|
|
5644
|
-
}, [
|
|
5652
|
+
}, [d, n]), re(() => {
|
|
5645
5653
|
t !== void 0 && !de(n) && m(t);
|
|
5646
5654
|
}, [n, t]), !((O = r == null ? void 0 : r.rows) != null && O.length) || !((b = r.columns) != null && b.length))
|
|
5647
5655
|
return null;
|
|
5648
5656
|
const w = {
|
|
5649
|
-
drawer: `smp-drawer ${de(n) ? "smp-drawer-minified" : "smp-drawer-fixed"} ${
|
|
5657
|
+
drawer: `smp-drawer ${de(n) ? "smp-drawer-minified" : "smp-drawer-fixed"} ${d ? "smp-drawer-open" : ""} ${!de(n) && !d ? "smp-drawer-no-border" : ""}`,
|
|
5650
5658
|
container: "smp-drawer-container",
|
|
5651
5659
|
containerHeader: "smp-drawer-container-header",
|
|
5652
|
-
containerIcon: `${
|
|
5660
|
+
containerIcon: `${d ? "" : "smp-drawer-container-icon-close"} smp-drawer-container-icon`,
|
|
5653
5661
|
containerLayout: "smp-drawer-container-layout",
|
|
5654
5662
|
containerLogo: "smp-drawer-container-logo",
|
|
5655
|
-
backdrop: `smp-drawer-backdrop ${
|
|
5663
|
+
backdrop: `smp-drawer-backdrop ${d ? "smp-drawer-backdrop-open" : ""}`
|
|
5656
5664
|
};
|
|
5657
5665
|
return f && /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
|
|
5658
5666
|
!de(n) && /* @__PURE__ */ g.jsx(
|
|
@@ -5667,7 +5675,7 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5667
5675
|
/* @__PURE__ */ g.jsx(
|
|
5668
5676
|
"aside",
|
|
5669
5677
|
{
|
|
5670
|
-
ref:
|
|
5678
|
+
ref: p,
|
|
5671
5679
|
className: w.drawer,
|
|
5672
5680
|
style: { height: y },
|
|
5673
5681
|
"aria-label": "Drawer",
|
|
@@ -5688,7 +5696,7 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5688
5696
|
{
|
|
5689
5697
|
icon: de(n) ? "menu_close" : "close",
|
|
5690
5698
|
title: "drawer_icon",
|
|
5691
|
-
rotated: !
|
|
5699
|
+
rotated: !d,
|
|
5692
5700
|
isInteractable: !0,
|
|
5693
5701
|
onClick: T,
|
|
5694
5702
|
width: 20,
|
|
@@ -5714,18 +5722,18 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5714
5722
|
IconColName: c,
|
|
5715
5723
|
IconColor: f = "var(--smp-dashList-color-base)",
|
|
5716
5724
|
NumberFormat: u,
|
|
5717
|
-
ForceUM:
|
|
5725
|
+
ForceUM: d,
|
|
5718
5726
|
UmColName: m,
|
|
5719
|
-
UmColor:
|
|
5727
|
+
UmColor: p = "var(--smp-dashList-color-base)",
|
|
5720
5728
|
ForceValue: y,
|
|
5721
5729
|
ValueColName: S,
|
|
5722
5730
|
ValueColor: E = "var(--smp-dashList-color-base)",
|
|
5723
5731
|
SelectLayout: T = "1",
|
|
5724
5732
|
onClick: w
|
|
5725
5733
|
}) => {
|
|
5726
|
-
const O = "N/A", b = (e == null ? void 0 : e.columns) || [], R = (e == null ? void 0 : e.rows) || [], N = R.length > 0, C = "--smp-dashList-color", v = "smp-layout", _ = "descr", k = "icon", $ = "um",
|
|
5734
|
+
const O = "N/A", b = (e == null ? void 0 : e.columns) || [], R = (e == null ? void 0 : e.rows) || [], N = R.length > 0, C = "--smp-dashList-color", v = "smp-layout", _ = "descr", k = "icon", $ = "um", L = "value", M = i || "1em", A = "18px", V = "--smp-dashList-columns", z = "--smp-dashList-fontSize", J = {
|
|
5727
5735
|
dash: (H = "1") => {
|
|
5728
|
-
const Z = h(H), ne = Z, se = x(Z, _), he = x(Z, k), we = x(Z, $), be = x(Z,
|
|
5736
|
+
const Z = h(H), ne = Z, se = x(Z, _), he = x(Z, k), we = x(Z, $), be = x(Z, L);
|
|
5729
5737
|
return {
|
|
5730
5738
|
container: ne,
|
|
5731
5739
|
descr: se,
|
|
@@ -5736,7 +5744,7 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5736
5744
|
},
|
|
5737
5745
|
dashList: `smp-dash-list ${de(a) ? "smp-dash-list-fill-space" : ""}
|
|
5738
5746
|
${de(o) ? "smp-dash-list-horizontal" : ""}`
|
|
5739
|
-
}, { format:
|
|
5747
|
+
}, { format: U } = Ie(), h = (H) => `${v}-${H}`, x = (H, Z) => `${H}__${Z}`, D = (H) => `${C}-${H}`, I = (H) => {
|
|
5740
5748
|
const Z = /R(\d{1,3})G(\d{1,3})B(\d{1,3})/;
|
|
5741
5749
|
if (Z.test(H)) {
|
|
5742
5750
|
const se = H.match(Z) || [];
|
|
@@ -5747,12 +5755,12 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5747
5755
|
}, j = (H) => {
|
|
5748
5756
|
if (!u) return H;
|
|
5749
5757
|
const [Z, ne] = P(u).map(
|
|
5750
|
-
(
|
|
5751
|
-
), se = "0,0" + (ne ? "." + "0".repeat(ne) : ""), he =
|
|
5758
|
+
(Ae) => parseInt(Ae || "0")
|
|
5759
|
+
), se = "0,0" + (ne ? "." + "0".repeat(ne) : ""), he = U(H, se, "it");
|
|
5752
5760
|
if (!Z) return he;
|
|
5753
5761
|
const [we, be] = he.split(",");
|
|
5754
5762
|
return we + (be ? `,${be}` : "");
|
|
5755
|
-
}, P = (H) => H.includes(";") ? H.split(";") : [H],
|
|
5763
|
+
}, P = (H) => H.includes(";") ? H.split(";") : [H], Y = (H) => {
|
|
5756
5764
|
const Z = (se) => {
|
|
5757
5765
|
var he;
|
|
5758
5766
|
if (se)
|
|
@@ -5765,14 +5773,14 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5765
5773
|
return {
|
|
5766
5774
|
descr: t || Z(n) || ne(2) || "",
|
|
5767
5775
|
icon: l || Z(c) || ne(3) || "",
|
|
5768
|
-
um:
|
|
5776
|
+
um: d || Z(m) || ne(1) || "",
|
|
5769
5777
|
value: y || Z(S) || ne(0) || ""
|
|
5770
5778
|
};
|
|
5771
5779
|
}, B = (H) => {
|
|
5772
5780
|
w == null || w(H);
|
|
5773
|
-
},
|
|
5781
|
+
}, W = (H, Z) => {
|
|
5774
5782
|
(H.key === "Enter" || H.key === " ") && (H.preventDefault(), H.stopPropagation(), B(Z));
|
|
5775
|
-
},
|
|
5783
|
+
}, K = ((H) => {
|
|
5776
5784
|
const Z = J.dash(H);
|
|
5777
5785
|
return {
|
|
5778
5786
|
className: Z,
|
|
@@ -5787,50 +5795,50 @@ const _r = /* @__PURE__ */ new Map([
|
|
|
5787
5795
|
}
|
|
5788
5796
|
) }, `${H}-${k}`),
|
|
5789
5797
|
um: (ne) => /* @__PURE__ */ g.jsx("div", { className: Z.um, children: ne }, `${H}-${$}`),
|
|
5790
|
-
value: (ne) => /* @__PURE__ */ g.jsx("div", { className: Z.value, children: ne }, `${H}-${
|
|
5798
|
+
value: (ne) => /* @__PURE__ */ g.jsx("div", { className: Z.value, children: ne }, `${H}-${L}`)
|
|
5791
5799
|
};
|
|
5792
5800
|
})(T), ae = (H) => {
|
|
5793
|
-
const { descr: Z, icon: ne, um: se, value: he } =
|
|
5794
|
-
[D(_)]:
|
|
5795
|
-
[D($)]:
|
|
5796
|
-
[D(
|
|
5797
|
-
}, be = [],
|
|
5801
|
+
const { descr: Z, icon: ne, um: se, value: he } = Y(H), we = {
|
|
5802
|
+
[D(_)]: I(s),
|
|
5803
|
+
[D($)]: I(p),
|
|
5804
|
+
[D(L)]: I(E)
|
|
5805
|
+
}, be = [], Ae = j(he);
|
|
5798
5806
|
switch (T) {
|
|
5799
5807
|
case "2":
|
|
5800
|
-
ne && be.push(
|
|
5801
|
-
|
|
5808
|
+
ne && be.push(K.icon(ne)), be.push(K.descr(Z)), be.push(
|
|
5809
|
+
K.value(se ? Ae + " " + se : Ae)
|
|
5802
5810
|
);
|
|
5803
5811
|
break;
|
|
5804
5812
|
default:
|
|
5805
5813
|
case "1":
|
|
5806
|
-
be.push(
|
|
5807
|
-
|
|
5814
|
+
be.push(K.descr(Z)), be.push(
|
|
5815
|
+
K.value(se ? Ae + " " + se : Ae)
|
|
5808
5816
|
);
|
|
5809
5817
|
}
|
|
5810
5818
|
return /* @__PURE__ */ g.jsx(
|
|
5811
5819
|
"div",
|
|
5812
5820
|
{
|
|
5813
|
-
className:
|
|
5821
|
+
className: K.className.container,
|
|
5814
5822
|
role: "button",
|
|
5815
5823
|
style: we,
|
|
5816
5824
|
tabIndex: 0,
|
|
5817
5825
|
onClick: () => B(H),
|
|
5818
|
-
onKeyDown: (Fr) =>
|
|
5826
|
+
onKeyDown: (Fr) => W(Fr, H),
|
|
5819
5827
|
children: be
|
|
5820
5828
|
},
|
|
5821
5829
|
H.rowId
|
|
5822
5830
|
);
|
|
5823
|
-
},
|
|
5831
|
+
}, F = {
|
|
5824
5832
|
[V]: String(r),
|
|
5825
|
-
[
|
|
5833
|
+
[z]: M
|
|
5826
5834
|
};
|
|
5827
|
-
return /* @__PURE__ */ g.jsx("div", { className: J.dashList, style:
|
|
5835
|
+
return /* @__PURE__ */ g.jsx("div", { className: J.dashList, style: F, children: N ? R.map((H) => ae(H)) : O });
|
|
5828
5836
|
}, nt = {
|
|
5829
5837
|
"smp-table": "_smp-table_1qmju_1",
|
|
5830
5838
|
"smp-headerCell": "_smp-headerCell_1qmju_35",
|
|
5831
5839
|
"smp-resizer": "_smp-resizer_1qmju_44"
|
|
5832
|
-
},
|
|
5833
|
-
rowContent:
|
|
5840
|
+
}, Ps = "_rowContent_20wit_2", Ns = "_clickable_20wit_21", ks = "_indent_20wit_26", Ms = "_toggle_20wit_32", Fs = "_cell_20wit_38", Vs = "_leftSection_20wit_46", Te = {
|
|
5841
|
+
rowContent: Ps,
|
|
5834
5842
|
clickable: Ns,
|
|
5835
5843
|
indent: ks,
|
|
5836
5844
|
toggle: Ms,
|
|
@@ -5861,12 +5869,12 @@ const Mr = ({
|
|
|
5861
5869
|
var T;
|
|
5862
5870
|
const [a, i] = G(!1), o = st(r) && !!((T = r.children) != null && T.length), l = r.cells && Object.keys(r.cells).length > 0, c = o, f = t * 20, u = () => {
|
|
5863
5871
|
o && i(!a);
|
|
5864
|
-
},
|
|
5872
|
+
}, d = {
|
|
5865
5873
|
content: `${Te.rowContent} ${o ? Te.clickable : ""}`,
|
|
5866
5874
|
toggle: `${Te.toggle}`,
|
|
5867
5875
|
indent: `${Te.indent}`,
|
|
5868
5876
|
cell: `${Te.cell}`
|
|
5869
|
-
}, m = (w) => /* @__PURE__ */ g.jsx(_e, { ...w }),
|
|
5877
|
+
}, m = (w) => /* @__PURE__ */ g.jsx(_e, { ...w }), p = () => /* @__PURE__ */ g.jsx("span", { className: d.toggle, children: c && /* @__PURE__ */ g.jsx(
|
|
5870
5878
|
le,
|
|
5871
5879
|
{
|
|
5872
5880
|
icon: a ? "arrow_drop_right" : "arrow_drop_down",
|
|
@@ -5875,7 +5883,7 @@ const Mr = ({
|
|
|
5875
5883
|
) }), y = () => /* @__PURE__ */ g.jsx(
|
|
5876
5884
|
"span",
|
|
5877
5885
|
{
|
|
5878
|
-
className:
|
|
5886
|
+
className: d.indent,
|
|
5879
5887
|
style: { width: `${f}px` },
|
|
5880
5888
|
"aria-hidden": "true"
|
|
5881
5889
|
}
|
|
@@ -5884,7 +5892,7 @@ const Mr = ({
|
|
|
5884
5892
|
return /* @__PURE__ */ g.jsxs(
|
|
5885
5893
|
"tr",
|
|
5886
5894
|
{
|
|
5887
|
-
className:
|
|
5895
|
+
className: d.content,
|
|
5888
5896
|
onClick: u,
|
|
5889
5897
|
role: o ? "button" : "row",
|
|
5890
5898
|
"aria-expanded": o ? !a : void 0,
|
|
@@ -5903,7 +5911,7 @@ const Mr = ({
|
|
|
5903
5911
|
},
|
|
5904
5912
|
children: [
|
|
5905
5913
|
y(),
|
|
5906
|
-
|
|
5914
|
+
p(),
|
|
5907
5915
|
/* @__PURE__ */ g.jsx("span", { className: Te.rowLabel, children: w })
|
|
5908
5916
|
]
|
|
5909
5917
|
}
|
|
@@ -5911,7 +5919,7 @@ const Mr = ({
|
|
|
5911
5919
|
r.cells && Object.keys(r.cells).length > 0 && Object.entries(r.cells).map(([b, R]) => /* @__PURE__ */ g.jsx(
|
|
5912
5920
|
"td",
|
|
5913
5921
|
{
|
|
5914
|
-
className:
|
|
5922
|
+
className: d.cell,
|
|
5915
5923
|
style: {
|
|
5916
5924
|
width: e[b],
|
|
5917
5925
|
minWidth: e[b],
|
|
@@ -5996,42 +6004,42 @@ function Gs(r, e, t, n) {
|
|
|
5996
6004
|
const s = [];
|
|
5997
6005
|
let a = 0;
|
|
5998
6006
|
return i(r, 0, []), { flatRows: s, offset: a };
|
|
5999
|
-
function i(u,
|
|
6000
|
-
if (
|
|
6007
|
+
function i(u, d, m) {
|
|
6008
|
+
if (d >= e.length) {
|
|
6001
6009
|
f(u);
|
|
6002
6010
|
return;
|
|
6003
6011
|
}
|
|
6004
|
-
const
|
|
6012
|
+
const p = e[d].column, y = o(u, p);
|
|
6005
6013
|
for (const [S, E] of y) {
|
|
6006
|
-
const T = [...m, S], w = l(T,
|
|
6007
|
-
s.push(c(S, w,
|
|
6014
|
+
const T = [...m, S], w = l(T, d), O = n.has(w);
|
|
6015
|
+
s.push(c(S, w, d, O)), a += t, O && i(E, d + 1, T);
|
|
6008
6016
|
}
|
|
6009
6017
|
}
|
|
6010
|
-
function o(u,
|
|
6011
|
-
var
|
|
6018
|
+
function o(u, d) {
|
|
6019
|
+
var p;
|
|
6012
6020
|
const m = /* @__PURE__ */ new Map();
|
|
6013
6021
|
for (const y of u) {
|
|
6014
|
-
const S = ((
|
|
6022
|
+
const S = ((p = y.cells[d]) == null ? void 0 : p.decode) ?? "N/D";
|
|
6015
6023
|
m.has(S) || m.set(S, []), m.get(S).push(y);
|
|
6016
6024
|
}
|
|
6017
6025
|
return m;
|
|
6018
6026
|
}
|
|
6019
|
-
function l(u,
|
|
6020
|
-
return `group-${u.join("-")}-${
|
|
6027
|
+
function l(u, d) {
|
|
6028
|
+
return `group-${u.join("-")}-${d}`;
|
|
6021
6029
|
}
|
|
6022
|
-
function c(u,
|
|
6030
|
+
function c(u, d, m, p) {
|
|
6023
6031
|
return {
|
|
6024
6032
|
isGroup: !0,
|
|
6025
6033
|
value: u,
|
|
6026
6034
|
cells: {},
|
|
6027
|
-
rowId:
|
|
6035
|
+
rowId: d,
|
|
6028
6036
|
level: m,
|
|
6029
|
-
isExpanded:
|
|
6037
|
+
isExpanded: p
|
|
6030
6038
|
};
|
|
6031
6039
|
}
|
|
6032
6040
|
function f(u) {
|
|
6033
|
-
for (const
|
|
6034
|
-
s.push(
|
|
6041
|
+
for (const d of u)
|
|
6042
|
+
s.push(d), a += t;
|
|
6035
6043
|
}
|
|
6036
6044
|
}
|
|
6037
6045
|
const Ks = ({
|
|
@@ -6097,8 +6105,8 @@ const Ks = ({
|
|
|
6097
6105
|
);
|
|
6098
6106
|
a(c);
|
|
6099
6107
|
} else if (n === "fit-grid") {
|
|
6100
|
-
const l = ((i = t.current) == null ? void 0 : i.offsetWidth) || 800, c = r.filter((
|
|
6101
|
-
c.map((
|
|
6108
|
+
const l = ((i = t.current) == null ? void 0 : i.offsetWidth) || 800, c = r.filter((d) => d.visible !== !1), f = l / c.length, u = Object.fromEntries(
|
|
6109
|
+
c.map((d) => [d.name, f])
|
|
6102
6110
|
);
|
|
6103
6111
|
a(u);
|
|
6104
6112
|
} else if (n === "fit-content") {
|
|
@@ -6106,9 +6114,9 @@ const Ks = ({
|
|
|
6106
6114
|
for (const c of r) {
|
|
6107
6115
|
if (!c.visible) continue;
|
|
6108
6116
|
const f = ((o = c.title) == null ? void 0 : o.length) || 0, u = Math.max(
|
|
6109
|
-
...e.map((
|
|
6110
|
-
var m,
|
|
6111
|
-
return `${((
|
|
6117
|
+
...e.map((d) => {
|
|
6118
|
+
var m, p, y, S;
|
|
6119
|
+
return `${((p = (m = d.cells) == null ? void 0 : m[c.name]) == null ? void 0 : p.decode) || ((S = (y = d.cells) == null ? void 0 : y[c.name]) == null ? void 0 : S.value) || ""}`.length;
|
|
6112
6120
|
}),
|
|
6113
6121
|
f
|
|
6114
6122
|
);
|
|
@@ -6130,10 +6138,10 @@ const Ks = ({
|
|
|
6130
6138
|
var N;
|
|
6131
6139
|
const [i, o] = G(
|
|
6132
6140
|
r ?? { columns: [], rows: [] }
|
|
6133
|
-
), [l, c] = G(n || []), [f, u] = G(/* @__PURE__ */ new Set()),
|
|
6141
|
+
), [l, c] = G(n || []), [f, u] = G(/* @__PURE__ */ new Set()), d = ce(null), [m, p] = zs({
|
|
6134
6142
|
columns: (i == null ? void 0 : i.columns) ?? [],
|
|
6135
6143
|
rows: (i == null ? void 0 : i.rows) ?? [],
|
|
6136
|
-
containerRef:
|
|
6144
|
+
containerRef: d,
|
|
6137
6145
|
sizingMode: s
|
|
6138
6146
|
});
|
|
6139
6147
|
re(() => {
|
|
@@ -6165,16 +6173,16 @@ const Ks = ({
|
|
|
6165
6173
|
containerHeight: t,
|
|
6166
6174
|
overscan: 5
|
|
6167
6175
|
}), b = (C, v) => {
|
|
6168
|
-
const _ = C.clientX, k = m[v], $ = (
|
|
6169
|
-
const A =
|
|
6170
|
-
|
|
6171
|
-
...
|
|
6176
|
+
const _ = C.clientX, k = m[v], $ = (M) => {
|
|
6177
|
+
const A = M.clientX - _, V = Math.max(50, k + A);
|
|
6178
|
+
p((z) => ({
|
|
6179
|
+
...z,
|
|
6172
6180
|
[v]: V
|
|
6173
6181
|
}));
|
|
6174
|
-
},
|
|
6175
|
-
window.removeEventListener("mousemove", $), window.removeEventListener("mouseup",
|
|
6182
|
+
}, L = () => {
|
|
6183
|
+
window.removeEventListener("mousemove", $), window.removeEventListener("mouseup", L);
|
|
6176
6184
|
};
|
|
6177
|
-
window.addEventListener("mousemove", $), window.addEventListener("mouseup",
|
|
6185
|
+
window.addEventListener("mousemove", $), window.addEventListener("mouseup", L);
|
|
6178
6186
|
}, R = {
|
|
6179
6187
|
smpTable: `${nt["smp-table"]}`,
|
|
6180
6188
|
headerCell: `${nt["smp-headerCell"]}`,
|
|
@@ -6185,7 +6193,7 @@ const Ks = ({
|
|
|
6185
6193
|
{
|
|
6186
6194
|
className: R.smpTable,
|
|
6187
6195
|
...w,
|
|
6188
|
-
ref:
|
|
6196
|
+
ref: d,
|
|
6189
6197
|
children: /* @__PURE__ */ g.jsxs("table", { children: [
|
|
6190
6198
|
/* @__PURE__ */ g.jsxs("thead", { children: [
|
|
6191
6199
|
(n || a) && /* @__PURE__ */ g.jsx(
|
|
@@ -6244,7 +6252,7 @@ const Ks = ({
|
|
|
6244
6252
|
level: C.level,
|
|
6245
6253
|
onClick: () => {
|
|
6246
6254
|
const $ = C.rowId;
|
|
6247
|
-
$ && u((
|
|
6255
|
+
$ && u((L) => Bs(L, $));
|
|
6248
6256
|
},
|
|
6249
6257
|
isExpanded: C.isExpanded
|
|
6250
6258
|
},
|
|
@@ -6288,7 +6296,7 @@ const Ks = ({
|
|
|
6288
6296
|
}, [r, s, e]);
|
|
6289
6297
|
const m = {
|
|
6290
6298
|
container: `smp-field-container ${de(t) ? `smp-field-position-${n}` : ""}`
|
|
6291
|
-
},
|
|
6299
|
+
}, p = () => {
|
|
6292
6300
|
de(t) || o == null || o(f);
|
|
6293
6301
|
};
|
|
6294
6302
|
if (f)
|
|
@@ -6310,7 +6318,7 @@ const Ks = ({
|
|
|
6310
6318
|
onChange: u,
|
|
6311
6319
|
onOptionsRequest: c,
|
|
6312
6320
|
fun: r == null ? void 0 : r.fun,
|
|
6313
|
-
onBlur:
|
|
6321
|
+
onBlur: p,
|
|
6314
6322
|
label: a,
|
|
6315
6323
|
labelPosition: i
|
|
6316
6324
|
}
|
|
@@ -6353,7 +6361,7 @@ const Ks = ({
|
|
|
6353
6361
|
onButtonClick: u
|
|
6354
6362
|
}) => {
|
|
6355
6363
|
var N, C;
|
|
6356
|
-
const [
|
|
6364
|
+
const [d, m] = G({}), { translate: p } = Ie(), y = Re();
|
|
6357
6365
|
re(() => {
|
|
6358
6366
|
m(O(r));
|
|
6359
6367
|
}, [r]);
|
|
@@ -6389,7 +6397,7 @@ const Ks = ({
|
|
|
6389
6397
|
columns: r.columns,
|
|
6390
6398
|
rows: [
|
|
6391
6399
|
{
|
|
6392
|
-
cells:
|
|
6400
|
+
cells: d
|
|
6393
6401
|
}
|
|
6394
6402
|
]
|
|
6395
6403
|
},
|
|
@@ -6397,20 +6405,20 @@ const Ks = ({
|
|
|
6397
6405
|
});
|
|
6398
6406
|
}, w = async (v) => {
|
|
6399
6407
|
var _, k;
|
|
6400
|
-
if (
|
|
6401
|
-
obj:
|
|
6402
|
-
fun:
|
|
6408
|
+
if (d[v].obj.k != r.rows[0].cells[v].obj.k && ((_ = d[v].inputSettings) != null && _.checkObject && c && ((await c({
|
|
6409
|
+
obj: d[v].obj,
|
|
6410
|
+
fun: d[v].fun,
|
|
6403
6411
|
cellId: v
|
|
6404
|
-
})).valid || m((
|
|
6405
|
-
...
|
|
6412
|
+
})).valid || m((L) => ({
|
|
6413
|
+
...L,
|
|
6406
6414
|
[v]: {
|
|
6407
|
-
...
|
|
6415
|
+
...L[v],
|
|
6408
6416
|
data: {
|
|
6409
|
-
...
|
|
6410
|
-
error:
|
|
6417
|
+
...L[v].data,
|
|
6418
|
+
error: p(Oe.CHECK_OBJECT_WRONG_VALIDATION)
|
|
6411
6419
|
}
|
|
6412
6420
|
}
|
|
6413
|
-
}))), (k =
|
|
6421
|
+
}))), (k = d[v].inputSettings) != null && k.checkValueOnExit)) {
|
|
6414
6422
|
const $ = b();
|
|
6415
6423
|
l == null || l({
|
|
6416
6424
|
value: $,
|
|
@@ -6418,11 +6426,11 @@ const Ks = ({
|
|
|
6418
6426
|
});
|
|
6419
6427
|
}
|
|
6420
6428
|
}, O = (v) => {
|
|
6421
|
-
var k, $,
|
|
6429
|
+
var k, $, L;
|
|
6422
6430
|
if (!((k = v.rows) != null && k.length) || !(($ = v.columns) != null && $.length))
|
|
6423
6431
|
return {};
|
|
6424
|
-
const _ = (
|
|
6425
|
-
return v.columns.filter((
|
|
6432
|
+
const _ = (L = v.rows) == null ? void 0 : L[0];
|
|
6433
|
+
return v.columns.filter((M) => M.visible ?? !0).reduce((M, A) => {
|
|
6426
6434
|
const V = {
|
|
6427
6435
|
..._.cells[A.name],
|
|
6428
6436
|
id: A.name,
|
|
@@ -6432,10 +6440,10 @@ const Ks = ({
|
|
|
6432
6440
|
dSep: a
|
|
6433
6441
|
}
|
|
6434
6442
|
};
|
|
6435
|
-
return V.fun && (V.onOptionsRequest = async (
|
|
6436
|
-
await i(
|
|
6443
|
+
return V.fun && (V.onOptionsRequest = async (z, J) => Zs(
|
|
6444
|
+
await i(z, J, r, A.name)
|
|
6437
6445
|
)), V.isEditable == null && (V.isEditable = !0), t && (V.isEditable = !1), V.isEditable && V.shape == null && (V.shape = te.TEXT_FIELD), {
|
|
6438
|
-
...
|
|
6446
|
+
...M,
|
|
6439
6447
|
[A.name]: V
|
|
6440
6448
|
};
|
|
6441
6449
|
}, {});
|
|
@@ -6446,7 +6454,7 @@ const Ks = ({
|
|
|
6446
6454
|
columns: JSON.parse(JSON.stringify(r.columns)),
|
|
6447
6455
|
rows: [
|
|
6448
6456
|
{
|
|
6449
|
-
cells: JSON.parse(JSON.stringify(
|
|
6457
|
+
cells: JSON.parse(JSON.stringify(d))
|
|
6450
6458
|
}
|
|
6451
6459
|
]
|
|
6452
6460
|
}
|
|
@@ -6468,7 +6476,7 @@ const Ks = ({
|
|
|
6468
6476
|
/* @__PURE__ */ g.jsx(
|
|
6469
6477
|
_e,
|
|
6470
6478
|
{
|
|
6471
|
-
decode:
|
|
6479
|
+
decode: p(Oe.CONFIRM_BUTTON),
|
|
6472
6480
|
shape: te.BUTTON,
|
|
6473
6481
|
id: "",
|
|
6474
6482
|
obj: {
|
|
@@ -6478,12 +6486,12 @@ const Ks = ({
|
|
|
6478
6486
|
},
|
|
6479
6487
|
data: {
|
|
6480
6488
|
submit: !0,
|
|
6481
|
-
label:
|
|
6489
|
+
label: p(Oe.CONFIRM_BUTTON)
|
|
6482
6490
|
}
|
|
6483
6491
|
},
|
|
6484
6492
|
"submit-command"
|
|
6485
6493
|
)
|
|
6486
|
-
),
|
|
6494
|
+
), d && /* @__PURE__ */ g.jsxs(
|
|
6487
6495
|
"form",
|
|
6488
6496
|
{
|
|
6489
6497
|
"data-component": "input-panel",
|
|
@@ -6498,7 +6506,7 @@ const Ks = ({
|
|
|
6498
6506
|
style: {
|
|
6499
6507
|
padding: "1em 0"
|
|
6500
6508
|
},
|
|
6501
|
-
children: /* @__PURE__ */ g.jsx(ot, { layout: r.rows[0].layout, children: Object.values(
|
|
6509
|
+
children: /* @__PURE__ */ g.jsx(ot, { layout: r.rows[0].layout, children: Object.values(d).map((v) => /* @__PURE__ */ g.jsx(
|
|
6502
6510
|
_e,
|
|
6503
6511
|
{
|
|
6504
6512
|
...v,
|