@pivotfinancialtechnologies/admin-frontend-blueprint-template 0.0.2-dev.9 → 0.0.3-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +56 -60
  2. package/dist/PermissionVisibility-CXHamZv5.cjs +1 -0
  3. package/dist/PermissionVisibility-DhDN-Z93.js +24 -0
  4. package/dist/SettingsSectionBase-CfT9p06Q.js +475 -0
  5. package/dist/SettingsSectionBase-PZs1Wgw1.cjs +1 -0
  6. package/dist/TopBarNavLayout-C0qRr2Lo.js +62 -0
  7. package/dist/TopBarNavLayout-CVxxYLc9.cjs +1 -0
  8. package/dist/{index.css → admin-frontend-blueprint-template.css} +1 -1
  9. package/dist/api-CzCTYMlh.js +81 -0
  10. package/dist/api-nTm6UPd6.cjs +1 -0
  11. package/dist/{utils → clipboard}/copy.d.ts +1 -1
  12. package/dist/clipboard/index.d.ts +1 -0
  13. package/dist/components/Data/BooleanTag/BooleanTag.d.ts +1 -1
  14. package/dist/components/Data/Datatable/Datatable.d.ts +1 -1
  15. package/dist/components/index.d.ts +2 -4
  16. package/dist/components.cjs +1 -0
  17. package/dist/components.d.ts +2 -0
  18. package/dist/components.js +14 -0
  19. package/dist/date-1EP6oPlF.cjs +1 -0
  20. package/dist/date-BEtsfEKV.js +389 -0
  21. package/dist/feedback/index.d.ts +1 -0
  22. package/dist/formatters/duration.d.ts +1 -0
  23. package/dist/formatters/index.d.ts +4 -0
  24. package/dist/formatters/money.d.ts +3 -0
  25. package/dist/formatters/phone.d.ts +1 -0
  26. package/dist/formatters.cjs +1 -0
  27. package/dist/formatters.d.ts +2 -0
  28. package/dist/formatters.js +12 -0
  29. package/dist/hooks/index.d.ts +2 -0
  30. package/dist/hooks/useSize.d.ts +5 -0
  31. package/dist/hooks/useUrlForm.d.ts +5 -0
  32. package/dist/hooks.cjs +1 -0
  33. package/dist/hooks.d.ts +2 -0
  34. package/dist/hooks.js +6 -0
  35. package/dist/http/api.d.ts +49 -0
  36. package/dist/http/index.d.ts +2 -0
  37. package/dist/http/query.d.ts +5 -0
  38. package/dist/http.cjs +1 -0
  39. package/dist/http.d.ts +2 -0
  40. package/dist/http.js +11 -0
  41. package/dist/index.cjs +1 -0
  42. package/dist/index.d.ts +8 -2
  43. package/dist/index.js +49 -4535
  44. package/dist/jsx-runtime-DMhOxOJN.cjs +14 -0
  45. package/dist/jsx-runtime-gfdvceKf.js +615 -0
  46. package/dist/layout/index.d.ts +4 -0
  47. package/dist/layout.cjs +1 -0
  48. package/dist/layout.d.ts +2 -0
  49. package/dist/layout.js +7 -0
  50. package/dist/phone-DmQ5SK-X.cjs +1 -0
  51. package/dist/phone-DtDgQ5qk.js +27 -0
  52. package/dist/query-Br3l_kxt.cjs +1 -0
  53. package/dist/query-CherHJOV.js +17 -0
  54. package/dist/{components/Security → security}/PermissionVisibility.d.ts +4 -2
  55. package/dist/security/index.d.ts +3 -0
  56. package/dist/security.cjs +1 -0
  57. package/dist/security.d.ts +2 -0
  58. package/dist/security.js +6 -0
  59. package/dist/toast-B3QUItIK.js +10 -0
  60. package/dist/toast-CCrs9yfw.cjs +1 -0
  61. package/dist/types/index.d.ts +1 -0
  62. package/dist/{components/Data/Pagination.d.ts → types/pagination.d.ts} +2 -2
  63. package/dist/useSize-Ci0PbN9W.js +15 -0
  64. package/dist/useSize-Dk1SOOLH.cjs +1 -0
  65. package/dist/useUrlForm-BYTOPBsx.js +26 -0
  66. package/dist/useUrlForm-KA9CehKJ.cjs +1 -0
  67. package/package.json +60 -8
  68. package/dist/components/Data/utils.d.ts +0 -5
  69. package/dist/index.umd.cjs +0 -14
  70. package/dist/layouts/index.d.ts +0 -3
  71. package/dist/utils/http.d.ts +0 -4
  72. package/dist/utils/index.d.ts +0 -6
  73. package/dist/utils/useUrlForm.d.ts +0 -4
  74. /package/dist/{utils → feedback}/toast.d.ts +0 -0
  75. /package/dist/{utils/formatters.d.ts → formatters/date.d.ts} +0 -0
  76. /package/dist/{layouts → layout}/ThemeSwitch/ThemeSwitch.d.ts +0 -0
  77. /package/dist/{layouts → layout}/TopBarNavLayout/TopBarNavLayout.d.ts +0 -0
  78. /package/dist/{layouts → layout}/Topbar/Topbar.d.ts +0 -0
  79. /package/dist/{utils → layout}/theme.d.ts +0 -0
  80. /package/dist/{components/Security → security}/AuthRoute.d.ts +0 -0
  81. /package/dist/{components/Security → security}/UnAuthRoute.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,4537 +1,51 @@
1
- import * as Pr from "react";
2
- import Ft, { createRef as ja, createElement as Un, useRef as J, useMemo as Ie, useEffect as Ut, useState as le, useCallback as ka } from "react";
3
- import { Tag as Wn, Classes as de, Utils as ee, AbstractComponent as Fa, DISPLAYNAME_PREFIX as dr, Menu as We, AbstractPureComponent as An, refHandler as St, setRef as Rt, PopoverNext as Wt, PopupKind as qn, mergeRefs as Ua, popoverPropsToNextProps as Yn, Button as ae, TagInput as Wa, InputGroup as Aa, Colors as Sr, OverlayToaster as qa, Position as Ya, MenuItem as V, Divider as La, Intent as Mt, Spinner as $a, Alert as Ha, Switch as za, Navbar as Qa, NavbarGroup as Xt, NavbarHeading as Va, MenuDivider as Ka } from "@blueprintjs/core";
4
- import { Table as Ln, TableLoadingOption as $n, FocusMode as Hn, SelectionModes as zn, Column as Qn, ColumnHeaderCell as Xa, Cell as Et } from "@blueprintjs/table";
5
- import { useSearchParams as Ba, Navigate as Vn, Outlet as Kn } from "react-router-dom";
6
- import { Cross as Xn, Search as Ga } from "@blueprintjs/icons";
7
- class Me {
8
- sort;
9
- page = 0;
10
- pageSize = 10;
11
- constructor(e, t, n) {
12
- this.sort = n, this.page = e, this.pageSize = t;
13
- }
14
- }
15
- function Ae(r) {
16
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
17
- }
18
- var He = { exports: {} }, Ee = {};
19
- var Rr;
20
- function Za() {
21
- if (Rr) return Ee;
22
- Rr = 1;
23
- var r = Ft, e = /* @__PURE__ */ Symbol.for("react.element"), t = /* @__PURE__ */ Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
24
- function o(u, s, d) {
25
- var c, b = {}, _ = null, O = null;
26
- d !== void 0 && (_ = "" + d), s.key !== void 0 && (_ = "" + s.key), s.ref !== void 0 && (O = s.ref);
27
- for (c in s) n.call(s, c) && !i.hasOwnProperty(c) && (b[c] = s[c]);
28
- if (u && u.defaultProps) for (c in s = u.defaultProps, s) b[c] === void 0 && (b[c] = s[c]);
29
- return { $$typeof: e, type: u, key: _, ref: O, props: b, _owner: a.current };
30
- }
31
- return Ee.Fragment = t, Ee.jsx = o, Ee.jsxs = o, Ee;
32
- }
33
- var Ne = {};
34
- var Mr;
35
- function Ja() {
36
- return Mr || (Mr = 1, process.env.NODE_ENV !== "production" && (function() {
37
- var r = Ft, e = /* @__PURE__ */ Symbol.for("react.element"), t = /* @__PURE__ */ Symbol.for("react.portal"), n = /* @__PURE__ */ Symbol.for("react.fragment"), a = /* @__PURE__ */ Symbol.for("react.strict_mode"), i = /* @__PURE__ */ Symbol.for("react.profiler"), o = /* @__PURE__ */ Symbol.for("react.provider"), u = /* @__PURE__ */ Symbol.for("react.context"), s = /* @__PURE__ */ Symbol.for("react.forward_ref"), d = /* @__PURE__ */ Symbol.for("react.suspense"), c = /* @__PURE__ */ Symbol.for("react.suspense_list"), b = /* @__PURE__ */ Symbol.for("react.memo"), _ = /* @__PURE__ */ Symbol.for("react.lazy"), O = /* @__PURE__ */ Symbol.for("react.offscreen"), w = Symbol.iterator, R = "@@iterator";
38
- function x(l) {
39
- if (l === null || typeof l != "object")
40
- return null;
41
- var y = w && l[w] || l[R];
42
- return typeof y == "function" ? y : null;
43
- }
44
- var g = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
45
- function h(l) {
46
- {
47
- for (var y = arguments.length, T = new Array(y > 1 ? y - 1 : 0), P = 1; P < y; P++)
48
- T[P - 1] = arguments[P];
49
- p("error", l, T);
50
- }
51
- }
52
- function p(l, y, T) {
53
- {
54
- var P = g.ReactDebugCurrentFrame, j = P.getStackAddendum();
55
- j !== "" && (y += "%s", T = T.concat([j]));
56
- var k = T.map(function(E) {
57
- return String(E);
58
- });
59
- k.unshift("Warning: " + y), Function.prototype.apply.call(console[l], console, k);
60
- }
61
- }
62
- var f = !1, v = !1, C = !1, I = !1, D = !1, S;
63
- S = /* @__PURE__ */ Symbol.for("react.module.reference");
64
- function N(l) {
65
- return !!(typeof l == "string" || typeof l == "function" || l === n || l === i || D || l === a || l === d || l === c || I || l === O || f || v || C || typeof l == "object" && l !== null && (l.$$typeof === _ || l.$$typeof === b || l.$$typeof === o || l.$$typeof === u || l.$$typeof === s || // This needs to include all possible module reference object
66
- // types supported by any Flight configuration anywhere since
67
- // we don't know which Flight build this will end up being used
68
- // with.
69
- l.$$typeof === S || l.getModuleId !== void 0));
70
- }
71
- function Y(l, y, T) {
72
- var P = l.displayName;
73
- if (P)
74
- return P;
75
- var j = y.displayName || y.name || "";
76
- return j !== "" ? T + "(" + j + ")" : T;
77
- }
78
- function H(l) {
79
- return l.displayName || "Context";
80
- }
81
- function W(l) {
82
- if (l == null)
83
- return null;
84
- if (typeof l.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof l == "function")
85
- return l.displayName || l.name || null;
86
- if (typeof l == "string")
87
- return l;
88
- switch (l) {
89
- case n:
90
- return "Fragment";
91
- case t:
92
- return "Portal";
93
- case i:
94
- return "Profiler";
95
- case a:
96
- return "StrictMode";
97
- case d:
98
- return "Suspense";
99
- case c:
100
- return "SuspenseList";
101
- }
102
- if (typeof l == "object")
103
- switch (l.$$typeof) {
104
- case u:
105
- var y = l;
106
- return H(y) + ".Consumer";
107
- case o:
108
- var T = l;
109
- return H(T._context) + ".Provider";
110
- case s:
111
- return Y(l, l.render, "ForwardRef");
112
- case b:
113
- var P = l.displayName || null;
114
- return P !== null ? P : W(l.type) || "Memo";
115
- case _: {
116
- var j = l, k = j._payload, E = j._init;
117
- try {
118
- return W(E(k));
119
- } catch {
120
- return null;
121
- }
122
- }
123
- }
124
- return null;
125
- }
126
- var z = Object.assign, B = 0, F, A, Z, re, ge, be, ye;
127
- function xe() {
128
- }
129
- xe.__reactDisabledLog = !0;
130
- function Pe() {
131
- {
132
- if (B === 0) {
133
- F = console.log, A = console.info, Z = console.warn, re = console.error, ge = console.group, be = console.groupCollapsed, ye = console.groupEnd;
134
- var l = {
135
- configurable: !0,
136
- enumerable: !0,
137
- value: xe,
138
- writable: !0
139
- };
140
- Object.defineProperties(console, {
141
- info: l,
142
- log: l,
143
- warn: l,
144
- error: l,
145
- group: l,
146
- groupCollapsed: l,
147
- groupEnd: l
148
- });
149
- }
150
- B++;
151
- }
152
- }
153
- function Se() {
154
- {
155
- if (B--, B === 0) {
156
- var l = {
157
- configurable: !0,
158
- enumerable: !0,
159
- writable: !0
160
- };
161
- Object.defineProperties(console, {
162
- log: z({}, l, {
163
- value: F
164
- }),
165
- info: z({}, l, {
166
- value: A
167
- }),
168
- warn: z({}, l, {
169
- value: Z
170
- }),
171
- error: z({}, l, {
172
- value: re
173
- }),
174
- group: z({}, l, {
175
- value: ge
176
- }),
177
- groupCollapsed: z({}, l, {
178
- value: be
179
- }),
180
- groupEnd: z({}, l, {
181
- value: ye
182
- })
183
- });
184
- }
185
- B < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
186
- }
187
- }
188
- var Re = g.ReactCurrentDispatcher, se;
189
- function ie(l, y, T) {
190
- {
191
- if (se === void 0)
192
- try {
193
- throw Error();
194
- } catch (j) {
195
- var P = j.stack.trim().match(/\n( *(at )?)/);
196
- se = P && P[1] || "";
197
- }
198
- return `
199
- ` + se + l;
200
- }
201
- }
202
- var fe = !1, ce;
203
- {
204
- var we = typeof WeakMap == "function" ? WeakMap : Map;
205
- ce = new we();
206
- }
207
- function Le(l, y) {
208
- if (!l || fe)
209
- return "";
210
- {
211
- var T = ce.get(l);
212
- if (T !== void 0)
213
- return T;
214
- }
215
- var P;
216
- fe = !0;
217
- var j = Error.prepareStackTrace;
218
- Error.prepareStackTrace = void 0;
219
- var k;
220
- k = Re.current, Re.current = null, Pe();
221
- try {
222
- if (y) {
223
- var E = function() {
224
- throw Error();
225
- };
226
- if (Object.defineProperty(E.prototype, "props", {
227
- set: function() {
228
- throw Error();
229
- }
230
- }), typeof Reflect == "object" && Reflect.construct) {
231
- try {
232
- Reflect.construct(E, []);
233
- } catch (G) {
234
- P = G;
235
- }
236
- Reflect.construct(l, [], E);
237
- } else {
238
- try {
239
- E.call();
240
- } catch (G) {
241
- P = G;
242
- }
243
- l.call(E.prototype);
244
- }
245
- } else {
246
- try {
247
- throw Error();
248
- } catch (G) {
249
- P = G;
250
- }
251
- l();
252
- }
253
- } catch (G) {
254
- if (G && P && typeof G.stack == "string") {
255
- for (var M = G.stack.split(`
256
- `), Q = P.stack.split(`
257
- `), q = M.length - 1, L = Q.length - 1; q >= 1 && L >= 0 && M[q] !== Q[L]; )
258
- L--;
259
- for (; q >= 1 && L >= 0; q--, L--)
260
- if (M[q] !== Q[L]) {
261
- if (q !== 1 || L !== 1)
262
- do
263
- if (q--, L--, L < 0 || M[q] !== Q[L]) {
264
- var te = `
265
- ` + M[q].replace(" at new ", " at ");
266
- return l.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", l.displayName)), typeof l == "function" && ce.set(l, te), te;
267
- }
268
- while (q >= 1 && L >= 0);
269
- break;
270
- }
271
- }
272
- } finally {
273
- fe = !1, Re.current = k, Se(), Error.prepareStackTrace = j;
274
- }
275
- var _e = l ? l.displayName || l.name : "", pe = _e ? ie(_e) : "";
276
- return typeof l == "function" && ce.set(l, pe), pe;
277
- }
278
- function Lt(l, y, T) {
279
- return Le(l, !1);
280
- }
281
- function $t(l) {
282
- var y = l.prototype;
283
- return !!(y && y.isReactComponent);
284
- }
285
- function Te(l, y, T) {
286
- if (l == null)
287
- return "";
288
- if (typeof l == "function")
289
- return Le(l, $t(l));
290
- if (typeof l == "string")
291
- return ie(l);
292
- switch (l) {
293
- case d:
294
- return ie("Suspense");
295
- case c:
296
- return ie("SuspenseList");
297
- }
298
- if (typeof l == "object")
299
- switch (l.$$typeof) {
300
- case s:
301
- return Lt(l.render);
302
- case b:
303
- return Te(l.type, y, T);
304
- case _: {
305
- var P = l, j = P._payload, k = P._init;
306
- try {
307
- return Te(k(j), y, T);
308
- } catch {
309
- }
310
- }
311
- }
312
- return "";
313
- }
314
- var $ = Object.prototype.hasOwnProperty, ne = {}, he = g.ReactDebugCurrentFrame;
315
- function $e(l) {
316
- if (l) {
317
- var y = l._owner, T = Te(l.type, l._source, y ? y.type : null);
318
- he.setExtraStackFrame(T);
319
- } else
320
- he.setExtraStackFrame(null);
321
- }
322
- function fa(l, y, T, P, j) {
323
- {
324
- var k = Function.call.bind($);
325
- for (var E in l)
326
- if (k(l, E)) {
327
- var M = void 0;
328
- try {
329
- if (typeof l[E] != "function") {
330
- var Q = Error((P || "React class") + ": " + T + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
331
- throw Q.name = "Invariant Violation", Q;
332
- }
333
- M = l[E](y, E, P, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
334
- } catch (q) {
335
- M = q;
336
- }
337
- M && !(M instanceof Error) && ($e(j), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", P || "React class", T, E, typeof M), $e(null)), M instanceof Error && !(M.message in ne) && (ne[M.message] = !0, $e(j), h("Failed %s type: %s", T, M.message), $e(null));
338
- }
339
- }
340
- }
341
- var ha = Array.isArray;
342
- function Ht(l) {
343
- return ha(l);
344
- }
345
- function pa(l) {
346
- {
347
- var y = typeof Symbol == "function" && Symbol.toStringTag, T = y && l[Symbol.toStringTag] || l.constructor.name || "Object";
348
- return T;
349
- }
350
- }
351
- function va(l) {
352
- try {
353
- return mr(l), !1;
354
- } catch {
355
- return !0;
356
- }
357
- }
358
- function mr(l) {
359
- return "" + l;
360
- }
361
- function gr(l) {
362
- if (va(l))
363
- return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", pa(l)), mr(l);
364
- }
365
- var br = g.ReactCurrentOwner, ma = {
366
- key: !0,
367
- ref: !0,
368
- __self: !0,
369
- __source: !0
370
- }, yr, xr;
371
- function ga(l) {
372
- if ($.call(l, "ref")) {
373
- var y = Object.getOwnPropertyDescriptor(l, "ref").get;
374
- if (y && y.isReactWarning)
375
- return !1;
376
- }
377
- return l.ref !== void 0;
378
- }
379
- function ba(l) {
380
- if ($.call(l, "key")) {
381
- var y = Object.getOwnPropertyDescriptor(l, "key").get;
382
- if (y && y.isReactWarning)
383
- return !1;
384
- }
385
- return l.key !== void 0;
386
- }
387
- function ya(l, y) {
388
- typeof l.ref == "string" && br.current;
389
- }
390
- function xa(l, y) {
391
- {
392
- var T = function() {
393
- yr || (yr = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
394
- };
395
- T.isReactWarning = !0, Object.defineProperty(l, "key", {
396
- get: T,
397
- configurable: !0
398
- });
399
- }
400
- }
401
- function wa(l, y) {
402
- {
403
- var T = function() {
404
- xr || (xr = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
405
- };
406
- T.isReactWarning = !0, Object.defineProperty(l, "ref", {
407
- get: T,
408
- configurable: !0
409
- });
410
- }
411
- }
412
- var Ta = function(l, y, T, P, j, k, E) {
413
- var M = {
414
- // This tag allows us to uniquely identify this as a React Element
415
- $$typeof: e,
416
- // Built-in properties that belong on the element
417
- type: l,
418
- key: y,
419
- ref: T,
420
- props: E,
421
- // Record the component responsible for creating this element.
422
- _owner: k
423
- };
424
- return M._store = {}, Object.defineProperty(M._store, "validated", {
425
- configurable: !1,
426
- enumerable: !1,
427
- writable: !0,
428
- value: !1
429
- }), Object.defineProperty(M, "_self", {
430
- configurable: !1,
431
- enumerable: !1,
432
- writable: !1,
433
- value: P
434
- }), Object.defineProperty(M, "_source", {
435
- configurable: !1,
436
- enumerable: !1,
437
- writable: !1,
438
- value: j
439
- }), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
440
- };
441
- function Ca(l, y, T, P, j) {
442
- {
443
- var k, E = {}, M = null, Q = null;
444
- T !== void 0 && (gr(T), M = "" + T), ba(y) && (gr(y.key), M = "" + y.key), ga(y) && (Q = y.ref, ya(y, j));
445
- for (k in y)
446
- $.call(y, k) && !ma.hasOwnProperty(k) && (E[k] = y[k]);
447
- if (l && l.defaultProps) {
448
- var q = l.defaultProps;
449
- for (k in q)
450
- E[k] === void 0 && (E[k] = q[k]);
451
- }
452
- if (M || Q) {
453
- var L = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
454
- M && xa(E, L), Q && wa(E, L);
455
- }
456
- return Ta(l, M, Q, j, P, br.current, E);
457
- }
458
- }
459
- var zt = g.ReactCurrentOwner, wr = g.ReactDebugCurrentFrame;
460
- function Ce(l) {
461
- if (l) {
462
- var y = l._owner, T = Te(l.type, l._source, y ? y.type : null);
463
- wr.setExtraStackFrame(T);
464
- } else
465
- wr.setExtraStackFrame(null);
466
- }
467
- var Qt;
468
- Qt = !1;
469
- function Vt(l) {
470
- return typeof l == "object" && l !== null && l.$$typeof === e;
471
- }
472
- function Tr() {
473
- {
474
- if (zt.current) {
475
- var l = W(zt.current.type);
476
- if (l)
477
- return `
478
-
479
- Check the render method of \`` + l + "`.";
480
- }
481
- return "";
482
- }
483
- }
484
- function _a(l) {
485
- return "";
486
- }
487
- var Cr = {};
488
- function Oa(l) {
489
- {
490
- var y = Tr();
491
- if (!y) {
492
- var T = typeof l == "string" ? l : l.displayName || l.name;
493
- T && (y = `
494
-
495
- Check the top-level render call using <` + T + ">.");
496
- }
497
- return y;
498
- }
499
- }
500
- function _r(l, y) {
501
- {
502
- if (!l._store || l._store.validated || l.key != null)
503
- return;
504
- l._store.validated = !0;
505
- var T = Oa(y);
506
- if (Cr[T])
507
- return;
508
- Cr[T] = !0;
509
- var P = "";
510
- l && l._owner && l._owner !== zt.current && (P = " It was passed a child from " + W(l._owner.type) + "."), Ce(l), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, P), Ce(null);
511
- }
512
- }
513
- function Or(l, y) {
514
- {
515
- if (typeof l != "object")
516
- return;
517
- if (Ht(l))
518
- for (var T = 0; T < l.length; T++) {
519
- var P = l[T];
520
- Vt(P) && _r(P, y);
521
- }
522
- else if (Vt(l))
523
- l._store && (l._store.validated = !0);
524
- else if (l) {
525
- var j = x(l);
526
- if (typeof j == "function" && j !== l.entries)
527
- for (var k = j.call(l), E; !(E = k.next()).done; )
528
- Vt(E.value) && _r(E.value, y);
529
- }
530
- }
531
- }
532
- function Da(l) {
533
- {
534
- var y = l.type;
535
- if (y == null || typeof y == "string")
536
- return;
537
- var T;
538
- if (typeof y == "function")
539
- T = y.propTypes;
540
- else if (typeof y == "object" && (y.$$typeof === s || // Note: Memo only checks outer props here.
541
- // Inner props are checked in the reconciler.
542
- y.$$typeof === b))
543
- T = y.propTypes;
544
- else
545
- return;
546
- if (T) {
547
- var P = W(y);
548
- fa(T, l.props, "prop", P, l);
549
- } else if (y.PropTypes !== void 0 && !Qt) {
550
- Qt = !0;
551
- var j = W(y);
552
- h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
553
- }
554
- typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
555
- }
556
- }
557
- function Ia(l) {
558
- {
559
- for (var y = Object.keys(l.props), T = 0; T < y.length; T++) {
560
- var P = y[T];
561
- if (P !== "children" && P !== "key") {
562
- Ce(l), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", P), Ce(null);
563
- break;
564
- }
565
- }
566
- l.ref !== null && (Ce(l), h("Invalid attribute `ref` supplied to `React.Fragment`."), Ce(null));
567
- }
568
- }
569
- var Dr = {};
570
- function Ir(l, y, T, P, j, k) {
571
- {
572
- var E = N(l);
573
- if (!E) {
574
- var M = "";
575
- (l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (M += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
576
- var Q = _a();
577
- Q ? M += Q : M += Tr();
578
- var q;
579
- l === null ? q = "null" : Ht(l) ? q = "array" : l !== void 0 && l.$$typeof === e ? (q = "<" + (W(l.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : q = typeof l, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, M);
580
- }
581
- var L = Ca(l, y, T, j, k);
582
- if (L == null)
583
- return L;
584
- if (E) {
585
- var te = y.children;
586
- if (te !== void 0)
587
- if (P)
588
- if (Ht(te)) {
589
- for (var _e = 0; _e < te.length; _e++)
590
- Or(te[_e], l);
591
- Object.freeze && Object.freeze(te);
592
- } else
593
- h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
594
- else
595
- Or(te, l);
596
- }
597
- if ($.call(y, "key")) {
598
- var pe = W(l), G = Object.keys(y).filter(function(Na) {
599
- return Na !== "key";
600
- }), Kt = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
601
- if (!Dr[pe + Kt]) {
602
- var Ea = G.length > 0 ? "{" + G.join(": ..., ") + ": ...}" : "{}";
603
- h(`A props object containing a "key" prop is being spread into JSX:
604
- let props = %s;
605
- <%s {...props} />
606
- React keys must be passed directly to JSX without using spread:
607
- let props = %s;
608
- <%s key={someKey} {...props} />`, Kt, pe, Ea, pe), Dr[pe + Kt] = !0;
609
- }
610
- }
611
- return l === n ? Ia(L) : Da(L), L;
612
- }
613
- }
614
- function Pa(l, y, T) {
615
- return Ir(l, y, T, !0);
616
- }
617
- function Sa(l, y, T) {
618
- return Ir(l, y, T, !1);
619
- }
620
- var Ra = Sa, Ma = Pa;
621
- Ne.Fragment = n, Ne.jsx = Ra, Ne.jsxs = Ma;
622
- })()), Ne;
623
- }
624
- var Er;
625
- function ei() {
626
- return Er || (Er = 1, process.env.NODE_ENV === "production" ? He.exports = Za() : He.exports = Ja()), He.exports;
627
- }
628
- var m = ei();
629
- const ks = ({
630
- value: r,
631
- trueLabel: e = "Yes",
632
- falseLabel: t = "No"
633
- }) => {
634
- if (r == null) return null;
635
- const n = r === !0;
636
- return /* @__PURE__ */ m.jsx(Wn, { intent: n ? "success" : "danger", children: n ? e : t });
637
- }, Bn = de.getClassNamespace(), qe = `${Bn}-multi-select`, ti = `${qe}-popover`, ri = `${qe}-popover-default-width`, ni = `${qe}-popover-tag-input-margin`, Nr = `${qe}-tag-input-input`, ai = `${Bn}-select-popover`;
638
- function ii(r, e, t) {
639
- if (r.query.length === 0 && t !== void 0)
640
- return t;
641
- const n = r.filteredItems.map(r.renderItem).filter((a) => a != null);
642
- return n.length > 0 ? n : e;
643
- }
644
- function ze(r, e, t) {
645
- return r === void 0 || e == null || t == null ? e === t : ee.isFunction(r) ? r(e, t) : e[r] === t[r];
646
- }
647
- function jr() {
648
- return { __blueprintCreateNewItemBrand: "blueprint-create-new-item" };
649
- }
650
- function ve(r) {
651
- if (r == null)
652
- return !1;
653
- const e = Object.keys(r);
654
- return e.length !== 1 || e[0] !== "__blueprintCreateNewItemBrand" ? !1 : r.__blueprintCreateNewItemBrand === "blueprint-create-new-item";
655
- }
656
- function Qe(r) {
657
- return r == null || ve(r) ? null : r;
658
- }
659
- var Bt = { exports: {} };
660
- var kr;
661
- function oi() {
662
- return kr || (kr = 1, (function(r) {
663
- (function() {
664
- var e = {}.hasOwnProperty;
665
- function t() {
666
- for (var i = "", o = 0; o < arguments.length; o++) {
667
- var u = arguments[o];
668
- u && (i = a(i, n(u)));
669
- }
670
- return i;
671
- }
672
- function n(i) {
673
- if (typeof i == "string" || typeof i == "number")
674
- return i;
675
- if (typeof i != "object")
676
- return "";
677
- if (Array.isArray(i))
678
- return t.apply(null, i);
679
- if (i.toString !== Object.prototype.toString && !i.toString.toString().includes("[native code]"))
680
- return i.toString();
681
- var o = "";
682
- for (var u in i)
683
- e.call(i, u) && i[u] && (o = a(o, u));
684
- return o;
685
- }
686
- function a(i, o) {
687
- return o ? i ? i + " " + o : i + o : i;
688
- }
689
- r.exports ? (t.default = t, r.exports = t) : window.classNames = t;
690
- })();
691
- })(Bt)), Bt.exports;
692
- }
693
- var si = oi();
694
- const ue = /* @__PURE__ */ Ae(si);
695
- class At extends Fa {
696
- static displayName = `${dr}.QueryList`;
697
- static defaultProps = {
698
- disabled: !1,
699
- resetOnQuery: !0
700
- };
701
- /** @deprecated no longer necessary now that the TypeScript parser supports type arguments on JSX element tags */
702
- static ofType() {
703
- return At;
704
- }
705
- itemsParentRef;
706
- itemRefs = /* @__PURE__ */ new Map();
707
- listId;
708
- refHandlers = {
709
- itemsParent: (e) => this.itemsParentRef = e
710
- };
711
- /**
712
- * Flag indicating that we should check whether selected item is in viewport
713
- * after rendering, typically because of keyboard change. Set to `true` when
714
- * manipulating state in a way that may cause active item to scroll away.
715
- */
716
- shouldCheckActiveItemInViewport = !1;
717
- /**
718
- * The item that we expect to be the next selected active item (based on click
719
- * or key interactions). When scrollToActiveItem = false, used to detect if
720
- * an unexpected external change to the active item has been made.
721
- */
722
- expectedNextActiveItem = null;
723
- /**
724
- * Flag which is set to true while in between an ENTER "keydown" event and its
725
- * corresponding "keyup" event.
726
- *
727
- * When entering text via an IME (https://en.wikipedia.org/wiki/Input_method),
728
- * the ENTER key is pressed to confirm the character(s) to be input from a list
729
- * of options. The operating system intercepts the ENTER "keydown" event and
730
- * prevents it from propagating to the application, but "keyup" is still
731
- * fired, triggering a spurious event which this component does not expect.
732
- *
733
- * To work around this quirk, we keep track of "real" key presses by setting
734
- * this flag in handleKeyDown.
735
- */
736
- isEnterKeyPressed = !1;
737
- constructor(e) {
738
- super(e), this.listId = e.listId ?? ee.uniqueId("bp-query-list");
739
- const { query: t = "" } = e, n = e.createNewItemFromQuery?.(t), a = Ur(t, e);
740
- this.state = {
741
- activeItem: e.activeItem !== void 0 ? e.activeItem : e.initialActiveItem ?? Gt(a, e.itemDisabled),
742
- createNewItem: n,
743
- filteredItems: a,
744
- query: t
745
- };
746
- }
747
- render() {
748
- const { className: e, items: t, renderer: n, itemListRenderer: a = this.renderItemList, menuProps: i } = this.props, { createNewItem: o, ...u } = this.state, s = this.getActiveItemId();
749
- return n({
750
- ...u,
751
- activeItemId: s,
752
- className: e,
753
- handleItemSelect: this.handleItemSelect,
754
- handleKeyDown: this.handleKeyDown,
755
- handleKeyUp: this.handleKeyUp,
756
- handlePaste: this.handlePaste,
757
- handleQueryChange: this.handleInputQueryChange,
758
- itemList: a({
759
- ...u,
760
- items: t,
761
- itemsParentRef: this.refHandlers.itemsParent,
762
- menuProps: {
763
- ...i,
764
- id: this.listId
765
- },
766
- renderCreateItem: this.renderCreateItemMenuItem,
767
- renderItem: this.renderItem
768
- }),
769
- listId: this.listId
770
- });
771
- }
772
- componentDidUpdate(e) {
773
- this.props.activeItem !== void 0 && this.props.activeItem !== this.state.activeItem && (this.shouldCheckActiveItemInViewport = !0, this.setState({ activeItem: this.props.activeItem })), this.props.query != null && this.props.query !== e.query ? this.setQuery(this.props.query, this.props.resetOnQuery, this.props) : ee.shallowCompareKeys(this.props, e, {
774
- include: ["items", "itemListPredicate", "itemPredicate"]
775
- }) || this.setQuery(this.state.query), this.shouldCheckActiveItemInViewport && (this.requestAnimationFrame(() => this.scrollActiveItemIntoView()), this.shouldCheckActiveItemInViewport = !1);
776
- }
777
- scrollActiveItemIntoView() {
778
- const e = this.props.scrollToActiveItem !== !1, t = !ze(this.props.itemsEqual, Qe(this.expectedNextActiveItem), Qe(this.props.activeItem));
779
- if (this.expectedNextActiveItem = null, !e && t)
780
- return;
781
- const n = this.getActiveElement();
782
- if (this.itemsParentRef != null && n != null) {
783
- const { offsetTop: a, offsetHeight: i } = n, { offsetTop: o, scrollTop: u, clientHeight: s } = this.itemsParentRef, { paddingTop: d, paddingBottom: c } = this.getItemsParentPadding(), b = a + i + c - o, _ = a - d - o;
784
- b >= u + s ? this.itemsParentRef.scrollTop = b + i - s : _ <= u && (this.itemsParentRef.scrollTop = _ - i);
785
- }
786
- }
787
- setQuery(e, t = this.props.resetOnQuery, n = this.props) {
788
- const { createNewItemFromQuery: a } = n;
789
- this.shouldCheckActiveItemInViewport = !0, e !== this.state.query && n.onQueryChange?.(e);
790
- const o = e.trim(), u = Ur(o, n), s = a != null && o !== "" ? a(o) : void 0;
791
- this.setState({ createNewItem: s, filteredItems: u, query: e });
792
- const d = this.getActiveIndex(u);
793
- (t || d < 0 || ur(Qe(this.state.activeItem), d, n.itemDisabled)) && (this.isCreateItemRendered(s) && this.isCreateItemFirst() ? this.setActiveItem(jr()) : this.setActiveItem(Gt(u, n.itemDisabled)));
794
- }
795
- setActiveItem(e) {
796
- this.expectedNextActiveItem = e, this.props.activeItem === void 0 && (this.shouldCheckActiveItemInViewport = !0, this.setState({ activeItem: e })), ve(e) ? this.props.onActiveItemChange?.(null, !0) : this.props.onActiveItemChange?.(e, !1);
797
- }
798
- /** default `itemListRenderer` implementation */
799
- renderItemList = (e) => {
800
- const { initialContent: t, noResults: n } = this.props, a = e.renderCreateItem(), i = a != null ? null : n, o = ii(e, i, t);
801
- if (o == null && a == null)
802
- return null;
803
- const u = this.isCreateItemFirst();
804
- return m.jsxs(We, { role: "listbox", ...e.menuProps, ulRef: e.itemsParentRef, children: [u && a, o, !u && a] });
805
- };
806
- /** wrapper around `itemRenderer` to inject props */
807
- renderItem = (e, t) => {
808
- if (this.props.disabled !== !0) {
809
- const { activeItem: n, query: a, filteredItems: i } = this.state, o = {
810
- active: ze(this.props.itemsEqual, Qe(n), e),
811
- disabled: ur(e, t, this.props.itemDisabled),
812
- matchesPredicate: i.indexOf(e) >= 0
813
- }, u = `${this.listId}-item-${t}`;
814
- return this.props.itemRenderer(e, {
815
- handleClick: (s) => this.handleItemSelect(e, s),
816
- handleFocus: () => this.setActiveItem(e),
817
- id: u,
818
- index: t,
819
- modifiers: o,
820
- query: a,
821
- ref: (s) => {
822
- s ? this.itemRefs.set(t, s) : this.itemRefs.delete(t);
823
- }
824
- });
825
- }
826
- return null;
827
- };
828
- renderCreateItemMenuItem = () => {
829
- if (this.isCreateItemRendered(this.state.createNewItem)) {
830
- const { activeItem: e, query: t } = this.state, n = t.trim(), a = (o) => {
831
- this.handleItemCreate(n, o);
832
- }, i = ve(e);
833
- return this.props.createNewItemRenderer(n, i, a);
834
- }
835
- return null;
836
- };
837
- getActiveElement() {
838
- const { activeItem: e } = this.state;
839
- if (this.itemsParentRef != null)
840
- if (ve(e)) {
841
- const t = this.isCreateItemFirst() ? 0 : this.state.filteredItems.length;
842
- return this.itemsParentRef.children.item(t);
843
- } else {
844
- const t = this.getActiveIndex();
845
- return this.itemRefs.get(t) ?? this.itemsParentRef.children.item(t);
846
- }
847
- }
848
- getActiveIndex(e = this.state.filteredItems) {
849
- const { activeItem: t } = this.state;
850
- if (t == null || ve(t))
851
- return -1;
852
- for (let n = 0; n < e.length; ++n)
853
- if (ze(this.props.itemsEqual, e[n], t))
854
- return n;
855
- return -1;
856
- }
857
- getItemsParentPadding() {
858
- const { paddingTop: e, paddingBottom: t } = getComputedStyle(this.itemsParentRef);
859
- return {
860
- paddingBottom: Fr(t),
861
- paddingTop: Fr(e)
862
- };
863
- }
864
- handleItemCreate = (e, t) => {
865
- const n = this.props.createNewItemFromQuery?.(e);
866
- if (n != null) {
867
- const a = Array.isArray(n) ? n : [n];
868
- for (const i of a)
869
- this.props.onItemSelect?.(i, t);
870
- this.maybeResetQuery();
871
- }
872
- };
873
- handleItemSelect = (e, t) => {
874
- this.setActiveItem(e), this.props.onItemSelect?.(e, t), this.maybeResetQuery();
875
- };
876
- handlePaste = (e) => {
877
- const { createNewItemFromQuery: t, onItemsPaste: n } = this.props;
878
- let a;
879
- const i = [], o = [];
880
- for (const u of e) {
881
- const s = ui(u, this.props);
882
- if (s !== void 0)
883
- a = s, o.push(s);
884
- else if (this.canCreateItems()) {
885
- const d = t?.(u);
886
- if (d !== void 0) {
887
- const c = Array.isArray(d) ? d : [d];
888
- o.push(...c);
889
- }
890
- } else
891
- i.push(u);
892
- }
893
- this.setQuery(i.join(", "), !1), a !== void 0 && this.setActiveItem(a), n?.(o);
894
- };
895
- handleKeyDown = (e) => {
896
- if (!e.nativeEvent.isComposing) {
897
- const { key: t } = e, n = ee.getArrowKeyDirection(e, ["ArrowUp"], ["ArrowDown"]);
898
- if (n !== void 0) {
899
- e.preventDefault();
900
- const a = this.getNextActiveItem(n);
901
- a != null && this.setActiveItem(a);
902
- } else t === "Enter" && (this.isEnterKeyPressed = !0);
903
- }
904
- this.props.onKeyDown?.(e);
905
- };
906
- handleKeyUp = (e) => {
907
- const { onKeyUp: t } = this.props, { activeItem: n } = this.state;
908
- e.key === "Enter" && this.isEnterKeyPressed && (e.preventDefault(), n == null || ve(n) ? this.handleItemCreate(this.state.query, e) : this.handleItemSelect(n, e), this.isEnterKeyPressed = !1), t?.(e);
909
- };
910
- handleInputQueryChange = (e) => {
911
- const t = e == null ? "" : e.target.value;
912
- this.setQuery(t), this.props.onQueryChange?.(t, e);
913
- };
914
- /**
915
- * Get the next enabled item, moving in the given direction from the start
916
- * index. A `null` return value means no suitable item was found.
917
- *
918
- * @param direction amount to move in each iteration, typically +/-1
919
- * @param startIndex item to start iteration
920
- */
921
- getNextActiveItem(e, t = this.getActiveIndex()) {
922
- return this.isCreateItemRendered(this.state.createNewItem) && (t === 0 && e === -1 || t === this.state.filteredItems.length - 1 && e === 1) ? jr() : Gt(this.state.filteredItems, this.props.itemDisabled, e, t);
923
- }
924
- /**
925
- * @param createNewItem Checks if this item would match the current query. Cannot check this.state.createNewItem
926
- * every time since state may not have been updated yet.
927
- */
928
- isCreateItemRendered(e) {
929
- return this.canCreateItems() && this.state.query !== "" && // this check is unfortunately O(N) on the number of items, but
930
- // alas, hiding the "Create Item" option when it exactly matches an
931
- // existing item is much clearer.
932
- !this.wouldCreatedItemMatchSomeExistingItem(e);
933
- }
934
- isCreateItemFirst() {
935
- return this.props.createNewItemPosition === "first";
936
- }
937
- canCreateItems() {
938
- return this.props.createNewItemFromQuery != null && this.props.createNewItemRenderer != null;
939
- }
940
- wouldCreatedItemMatchSomeExistingItem(e) {
941
- return this.state.filteredItems.some((t) => (Array.isArray(e) ? e : [e]).some((a) => ze(this.props.itemsEqual, t, a)));
942
- }
943
- maybeResetQuery() {
944
- this.props.resetOnSelect && this.setQuery("", !0);
945
- }
946
- /** Generate unique ID for the currently active item */
947
- getActiveItemId() {
948
- const { activeItem: e } = this.state;
949
- if (e == null)
950
- return;
951
- if (ve(e))
952
- return `${this.listId}-create-item`;
953
- const t = this.getActiveIndex();
954
- return t >= 0 ? `${this.listId}-item-${t}` : void 0;
955
- }
956
- }
957
- function Fr(r) {
958
- return r == null ? 0 : parseInt(r.slice(0, -2), 10);
959
- }
960
- function ui(r, { items: e, itemPredicate: t }) {
961
- if (ee.isFunction(t))
962
- for (let n = 0; n < e.length; n++) {
963
- const a = e[n];
964
- if (t(r, a, n, !0))
965
- return a;
966
- }
967
- }
968
- function Ur(r, { items: e, itemPredicate: t, itemListPredicate: n }) {
969
- return ee.isFunction(n) ? n(r, e) : ee.isFunction(t) ? e.filter((a, i) => t(r, a, i)) : e;
970
- }
971
- function li(r, e, t) {
972
- return r < e ? t : r > t ? e : r;
973
- }
974
- function ur(r, e, t) {
975
- return t == null || r == null ? !1 : ee.isFunction(t) ? t(r, e) : !!r[t];
976
- }
977
- function Gt(r, e, t = 1, n = r.length - 1) {
978
- if (r.length === 0)
979
- return null;
980
- let a = n;
981
- const i = r.length - 1;
982
- do
983
- if (a = li(a + t, 0, i), !ur(r[a], a, e))
984
- return r[a];
985
- while (a !== n && n !== -1);
986
- return null;
987
- }
988
- class cr extends An {
989
- static displayName = `${dr}.MultiSelect`;
990
- listboxId = ee.uniqueId("listbox");
991
- static defaultProps = {
992
- disabled: !1,
993
- fill: !1,
994
- placeholder: "Search..."
995
- };
996
- /** @deprecated no longer necessary now that the TypeScript parser supports type arguments on JSX element tags */
997
- static ofType() {
998
- return cr;
999
- }
1000
- state = {
1001
- isOpen: this.props.popoverProps && this.props.popoverProps.isOpen || !1
1002
- };
1003
- input = null;
1004
- queryList = null;
1005
- refHandlers = {
1006
- input: St(this, "input", this.props.tagInputProps?.inputRef),
1007
- popover: ja(),
1008
- queryList: (e) => this.queryList = e
1009
- };
1010
- componentDidUpdate(e) {
1011
- e.tagInputProps?.inputRef !== this.props.tagInputProps?.inputRef && (Rt(e.tagInputProps?.inputRef, null), this.refHandlers.input = St(this, "input", this.props.tagInputProps?.inputRef), Rt(this.props.tagInputProps?.inputRef, this.input)), (e.onClear === void 0 && this.props.onClear !== void 0 || e.onClear !== void 0 && this.props.onClear === void 0) && this.forceUpdate();
1012
- }
1013
- render() {
1014
- const { menuProps: e, openOnKeyDown: t, popoverProps: n, tagInputProps: a, customTarget: i, ...o } = this.props;
1015
- return m.jsx(At, { ...o, menuProps: {
1016
- "aria-label": "selectable options",
1017
- ...e,
1018
- "aria-multiselectable": !0,
1019
- id: this.listboxId
1020
- }, onItemSelect: this.handleItemSelect, onQueryChange: this.handleQueryChange, ref: this.refHandlers.queryList, renderer: this.renderQueryList });
1021
- }
1022
- renderQueryList = (e) => {
1023
- const { disabled: t, popoverContentProps: n = {}, popoverProps: a = {} } = this.props, { handleKeyDown: i, handleKeyUp: o } = e;
1024
- return m.jsx(Wt, { autoFocus: !1, canEscapeKeyClose: !0, disabled: t, enforceFocus: !1, isOpen: this.state.isOpen, placement: a.position || a.placement ? void 0 : "bottom-start", ...Yn(a), className: ue(e.className, a.className), content: m.jsxs("div", {
1025
- // In the case where customTarget is supplied and the TagInput is rendered within the Popover,
1026
- // without matchTargetWidth there is no width defined in any of TagInput's
1027
- // grandparents when it's rendered through usePortal, so it will never flex-wrap
1028
- // and infinitely grow horizontally. To address this, if there is no width guidance
1029
- // from matchTargetWidth, explicitly set a default width to so Tags will flex-wrap.
1030
- className: this.props.customTarget != null && !this.props.popoverProps?.matchTargetWidth ? ri : void 0,
1031
- ...n,
1032
- onKeyDown: i,
1033
- onKeyUp: o,
1034
- children: [this.props.customTarget != null && this.getTagInput(e, ue(de.FILL, ni)), e.itemList]
1035
- }), interactionKind: "click", onInteraction: this.handlePopoverInteraction, onOpened: this.handlePopoverOpened, popoverClassName: ue(ti, a.popoverClassName), popupKind: qn.LISTBOX, ref: Ua(this.refHandlers.popover, this.props.popoverRef), renderTarget: this.getPopoverTargetRenderer(e, this.state.isOpen) });
1036
- };
1037
- // We use the renderTarget API to flatten the rendered DOM and make it easier to implement features like
1038
- // the "fill" prop. Note that we must take `isOpen` as an argument to force this render function to be called
1039
- // again after that state changes.
1040
- getPopoverTargetRenderer = (e, t) => (
1041
- // N.B. pull out `isOpen` so that it's not forwarded to the DOM, but remember not to use it directly
1042
- // since it may be stale (`renderTarget` is not re-invoked on this.state changes).
1043
- // eslint-disable-next-line react/display-name
1044
- ({ isOpen: n, ref: a, ...i }) => {
1045
- const { disabled: o, fill: u, selectedItems: s, popoverProps: d = {}, popoverTargetProps: c = {} } = this.props, { handleKeyDown: b, handleKeyUp: _ } = e, { targetTagName: O = "div" } = d;
1046
- return Un(O, {
1047
- "aria-autocomplete": "list",
1048
- "aria-controls": this.listboxId,
1049
- ...c,
1050
- ...i,
1051
- "aria-disabled": o,
1052
- "aria-expanded": t,
1053
- // Note that we must set FILL here in addition to TagInput to get the wrapper element to full width
1054
- className: ue(i.className, c.className, {
1055
- [de.FILL]: u
1056
- }),
1057
- // Normally, Popover would also need to attach its own `onKeyDown` handler via `targetProps`,
1058
- // but in our case we fully manage that interaction and listen for key events to open/close
1059
- // the popover, so we elide it from the DOM.
1060
- onKeyDown: this.getTagInputKeyDownHandler(b),
1061
- onKeyUp: this.getTagInputKeyUpHandler(_),
1062
- ref: a,
1063
- role: "combobox"
1064
- }, this.props.customTarget != null ? this.props.customTarget(s, t) : this.getTagInput(e));
1065
- }
1066
- );
1067
- getTagInput = (e, t) => {
1068
- const { disabled: n, fill: a, onClear: i, placeholder: o, selectedItems: u, tagInputProps: s = {} } = this.props, d = i !== void 0 && u.length > 0 ? (
1069
- // use both aria-label and title a11y attributes here, for screen readers
1070
- // and mouseover interactions respectively
1071
- m.jsx(ae, { "aria-label": "Clear selected items", disabled: n, icon: m.jsx(Xn, {}), onClick: this.handleClearButtonClick, title: "Clear selected items", variant: "minimal" })
1072
- ) : void 0, c = {
1073
- ...s.inputProps,
1074
- className: ue(s.inputProps?.className, Nr)
1075
- };
1076
- return m.jsx(Wa, { placeholder: o, rightElement: d, ...s, className: ue(t, qe, s.className), disabled: n, fill: a, inputRef: this.refHandlers.input, inputProps: c, inputValue: e.query, onAdd: this.getTagInputAddHandler(e), onInputChange: e.handleQueryChange, onRemove: this.handleTagRemove, values: u.map(this.props.tagRenderer) });
1077
- };
1078
- handleItemSelect = (e, t) => {
1079
- this.input != null && this.input.focus(), this.props.onItemSelect?.(e, t), this.refHandlers.popover.current?.reposition();
1080
- };
1081
- handleQueryChange = (e, t) => {
1082
- this.setState({ isOpen: e.length > 0 || this.props.customTarget == null && !this.props.openOnKeyDown }), this.props.onQueryChange?.(e, t);
1083
- };
1084
- // Popover interaction kind is CLICK, so this only handles click events.
1085
- // Note that we defer to the next animation frame in order to get the latest activeElement
1086
- handlePopoverInteraction = (e, t) => {
1087
- if (this.props.customTarget != null) {
1088
- this.setState({ isOpen: e }), this.props.popoverProps?.onInteraction?.(e, t);
1089
- return;
1090
- }
1091
- this.requestAnimationFrame(() => {
1092
- const n = this.input === ee.getActiveElement(this.input);
1093
- this.input != null && !n ? this.setState({ isOpen: !1 }) : this.props.openOnKeyDown || this.setState({ isOpen: !0 }), this.props.popoverProps?.onInteraction?.(e, t);
1094
- });
1095
- };
1096
- handlePopoverOpened = (e) => {
1097
- this.queryList != null && this.queryList.scrollActiveItemIntoView(), this.props.customTarget != null && this.input != null && this.props.tagInputProps?.inputProps?.autoFocus !== !1 && this.input.focus(), this.props.popoverProps?.onOpened?.(e);
1098
- };
1099
- handleTagRemove = (e, t) => {
1100
- const { selectedItems: n, onRemove: a, tagInputProps: i } = this.props;
1101
- a?.(n[t], t), i?.onRemove?.(e, t), this.refHandlers.popover.current?.reposition();
1102
- };
1103
- getTagInputAddHandler = (e) => (t, n) => {
1104
- n === "paste" && e.handlePaste(t);
1105
- };
1106
- getTagInputKeyDownHandler = (e) => (t) => {
1107
- t.key === "Escape" || t.key === "Tab" ? (t.key === "Escape" && (this.input?.blur(), t.stopPropagation(), t.preventDefault()), this.setState({ isOpen: !1 })) : t.key === "Backspace" || t.key === "ArrowLeft" || t.key === "ArrowRight" || (this.props.customTarget != null ? t.key === " " ? (t.preventDefault(), this.setState({ isOpen: !0 })) : t.key === "Enter" && this.setState({ isOpen: !0 }) : this.setState({ isOpen: !0 }));
1108
- const n = t.target.closest(`.${de.TAG_REMOVE}`) != null;
1109
- this.state.isOpen && !n && e?.(t), this.props.popoverTargetProps?.onKeyDown?.(t);
1110
- };
1111
- getTagInputKeyUpHandler = (e) => (t) => {
1112
- const n = t.target.classList.contains(Nr);
1113
- this.state.isOpen && n && e?.(t), this.props.popoverTargetProps?.onKeyDown?.(t);
1114
- };
1115
- handleClearButtonClick = () => {
1116
- this.props.onClear?.(), this.refHandlers.popover.current?.reposition();
1117
- };
1118
- }
1119
- class Ye extends An {
1120
- static displayName = `${dr}.Select`;
1121
- /** @deprecated no longer necessary now that the TypeScript parser supports type arguments on JSX element tags */
1122
- static ofType() {
1123
- return Ye;
1124
- }
1125
- state = { isOpen: !1 };
1126
- inputElement = null;
1127
- queryList = null;
1128
- previousFocusedElement;
1129
- handleInputRef = St(this, "inputElement", this.props.inputProps?.inputRef);
1130
- handleQueryListRef = (e) => this.queryList = e;
1131
- listboxId = ee.uniqueId("listbox");
1132
- render() {
1133
- const { filterable: e, inputProps: t, menuProps: n, popoverProps: a, ...i } = this.props;
1134
- return m.jsx(At, { ...i, listId: this.listboxId, menuProps: { "aria-label": "selectable options", ...n }, onItemSelect: this.handleItemSelect, ref: this.handleQueryListRef, renderer: this.renderQueryList });
1135
- }
1136
- componentDidUpdate(e, t) {
1137
- e.inputProps?.inputRef !== this.props.inputProps?.inputRef && (Rt(e.inputProps?.inputRef, null), this.handleInputRef = St(this, "inputElement", this.props.inputProps?.inputRef), Rt(this.props.inputProps?.inputRef, this.inputElement)), this.state.isOpen && !t.isOpen && this.queryList != null && this.queryList.scrollActiveItemIntoView();
1138
- }
1139
- renderQueryList = (e) => {
1140
- const { filterable: t = !0, disabled: n = !1, inputProps: a = {}, placeholder: i = "Filter...", popoverContentProps: o = {}, popoverProps: u = {}, popoverRef: s } = this.props, d = m.jsx(Aa, { "aria-activedescendant": e.activeItemId, "aria-autocomplete": "list", "aria-expanded": this.state.isOpen, leftIcon: m.jsx(Ga, {}), placeholder: i, rightElement: this.maybeRenderClearButton(e.query), role: "combobox", ...a, inputRef: this.handleInputRef, onChange: e.handleQueryChange, value: e.query }), { handleKeyDown: c, handleKeyUp: b } = e;
1141
- return m.jsx(Wt, { autoFocus: !1, enforceFocus: !1, isOpen: this.state.isOpen, disabled: n, placement: u.position || u.placement ? void 0 : "bottom-start", ...Yn(u), className: ue(e.className, u.className), content: m.jsxs("div", { ...o, onKeyDown: c, onKeyUp: b, children: [t ? d : void 0, e.itemList] }), onClosing: this.handlePopoverClosing, onInteraction: this.handlePopoverInteraction, onOpened: this.handlePopoverOpened, onOpening: this.handlePopoverOpening, popoverClassName: ue(ai, u.popoverClassName), popupKind: qn.LISTBOX, ref: s, renderTarget: this.getPopoverTargetRenderer(e, this.state.isOpen) });
1142
- };
1143
- // We use the renderTarget API to flatten the rendered DOM and make it easier to implement features like
1144
- // the "fill" prop. Note that we must take `isOpen` as an argument to force this render function to be called
1145
- // again after that state changes.
1146
- getPopoverTargetRenderer = (e, t) => (
1147
- // N.B. pull out `isOpen` so that it's not forwarded to the DOM, but remember not to use it directly
1148
- // since it may be stale (`renderTarget` is not re-invoked on this.state changes).
1149
- // eslint-disable-next-line react/display-name
1150
- ({ isOpen: n, ref: a, ...i }) => {
1151
- const { disabled: o, filterable: u = !0, popoverProps: s = {}, popoverTargetProps: d } = this.props, { handleKeyDown: c, handleKeyUp: b } = e, { targetTagName: _ = "div" } = s;
1152
- return Un(_, {
1153
- "aria-controls": this.listboxId,
1154
- ...d,
1155
- ...i,
1156
- "aria-disabled": o,
1157
- "aria-expanded": t,
1158
- // When filterable, the InputGroup inside is the combobox; this trigger is just a button
1159
- // When not filterable, this trigger is the combobox
1160
- ...u ? { "aria-haspopup": "listbox" } : {},
1161
- // Note that we must set FILL here in addition to children to get the wrapper element to full width
1162
- className: ue(i.className, d?.className, {
1163
- [de.FILL]: this.props.fill
1164
- }),
1165
- // Normally, Popover would also need to attach its own `onKeyDown` handler via `targetProps`,
1166
- // but in our case we fully manage that interaction and listen for key events to open/close
1167
- // the popover, so we elide it from the DOM.
1168
- onKeyDown: this.withPopoverTargetPropsHandler("keydown", t ? c : this.handleTargetKeyDown),
1169
- onKeyUp: this.withPopoverTargetPropsHandler("keyup", t ? b : void 0),
1170
- ref: a,
1171
- role: u ? void 0 : "combobox"
1172
- }, this.props.children);
1173
- }
1174
- );
1175
- maybeRenderClearButton(e) {
1176
- return e.length > 0 ? m.jsx(ae, { "aria-label": "Clear filter query", icon: m.jsx(Xn, {}), onClick: this.resetQuery, title: "Clear filter query", variant: "minimal" }) : void 0;
1177
- }
1178
- withPopoverTargetPropsHandler = (e, t) => {
1179
- switch (e) {
1180
- case "keydown":
1181
- return (n) => {
1182
- t?.(n), this.props.popoverTargetProps?.onKeyDown?.(n);
1183
- };
1184
- case "keyup":
1185
- return (n) => {
1186
- t?.(n), this.props.popoverTargetProps?.onKeyUp?.(n);
1187
- };
1188
- }
1189
- };
1190
- /**
1191
- * Target wrapper element "keydown" handler while the popover is closed.
1192
- */
1193
- handleTargetKeyDown = (e) => {
1194
- e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), this.setState({ isOpen: !0 })) : ee.isKeyboardClick(e) && this.setState({ isOpen: !0 });
1195
- };
1196
- handleItemSelect = (e, t) => {
1197
- const o = t?.target?.closest(`.${de.MENU_ITEM}`)?.matches(`.${de.POPOVER_DISMISS}`) ?? !0;
1198
- this.setState({ isOpen: !o }), this.props.onItemSelect?.(e, t);
1199
- };
1200
- handlePopoverInteraction = (e, t) => {
1201
- this.setState({ isOpen: e }), this.props.popoverProps?.onInteraction?.(e, t);
1202
- };
1203
- handlePopoverOpening = (e) => {
1204
- this.previousFocusedElement = ee.getActiveElement(this.inputElement) ?? void 0, this.props.resetOnClose && this.resetQuery(), this.props.popoverProps?.onOpening?.(e);
1205
- };
1206
- handlePopoverOpened = (e) => {
1207
- this.queryList != null && this.queryList.scrollActiveItemIntoView(), this.requestAnimationFrame(() => {
1208
- const { inputProps: t = {} } = this.props;
1209
- t.autoFocus !== !1 && this.inputElement?.focus();
1210
- }), this.props.popoverProps?.onOpened?.(e);
1211
- };
1212
- handlePopoverClosing = (e) => {
1213
- this.requestAnimationFrame(() => {
1214
- this.previousFocusedElement !== void 0 && (this.previousFocusedElement.focus(), this.previousFocusedElement = void 0);
1215
- }), this.props.popoverProps?.onClosing?.(e);
1216
- };
1217
- resetQuery = () => this.queryList && this.queryList.setQuery("", !0);
1218
- }
1219
- const di = Ft[typeof document < "u" && document.createElement !== void 0 ? "useLayoutEffect" : "useEffect"], ci = (r) => {
1220
- const e = Pr.useRef(r);
1221
- return Pr.useEffect(() => {
1222
- e.current = r;
1223
- }), e;
1224
- };
1225
- function fi() {
1226
- }
1227
- function hi(r, e, t = {}) {
1228
- const n = vi(t.polyfill), a = ci(e);
1229
- return di(() => {
1230
- let i = !1;
1231
- const o = r && "current" in r ? r.current : r;
1232
- if (!o) return fi;
1233
- function u(s, d) {
1234
- i || a.current(s, d);
1235
- }
1236
- return n.subscribe(o, u), () => {
1237
- i = !0, n.unsubscribe(o, u);
1238
- };
1239
- }, [r, n, a]), n.observer;
1240
- }
1241
- function pi(r) {
1242
- let e = !1, t = [];
1243
- const n = /* @__PURE__ */ new Map(), a = new (r || window.ResizeObserver)((i, o) => {
1244
- t = t.concat(i);
1245
- function u() {
1246
- const s = /* @__PURE__ */ new Set();
1247
- for (let d = 0; d < t.length; d++) {
1248
- if (s.has(t[d].target)) continue;
1249
- s.add(t[d].target);
1250
- const c = n.get(t[d].target);
1251
- c?.forEach((b) => b(t[d], o));
1252
- }
1253
- t = [], e = !1;
1254
- }
1255
- e || window.requestAnimationFrame(u), e = !0;
1256
- });
1257
- return {
1258
- observer: a,
1259
- subscribe(i, o) {
1260
- var u;
1261
- a.observe(i);
1262
- const s = (u = n.get(i)) !== null && u !== void 0 ? u : [];
1263
- s.push(o), n.set(i, s);
1264
- },
1265
- unsubscribe(i, o) {
1266
- var u;
1267
- const s = (u = n.get(i)) !== null && u !== void 0 ? u : [];
1268
- if (s.length === 1) {
1269
- a.unobserve(i), n.delete(i);
1270
- return;
1271
- }
1272
- const d = s.indexOf(o);
1273
- d !== -1 && s.splice(d, 1), n.set(i, s);
1274
- }
1275
- };
1276
- }
1277
- let Zt;
1278
- const vi = (r) => Zt || (Zt = pi(r));
1279
- function mi(r, e, t, n) {
1280
- var a = this, i = J(null), o = J(0), u = J(0), s = J(null), d = J([]), c = J(), b = J(), _ = J(r), O = J(!0), w = J(), R = J();
1281
- _.current = r;
1282
- var x = typeof window < "u", g = !e && e !== 0 && x;
1283
- if (typeof r != "function") throw new TypeError("Expected a function");
1284
- e = +e || 0;
1285
- var h = !!(t = t || {}).leading, p = !("trailing" in t) || !!t.trailing, f = !!t.flushOnExit && p, v = "maxWait" in t, C = "debounceOnServer" in t && !!t.debounceOnServer, I = v ? Math.max(+t.maxWait || 0, e) : null, D = Ie(function() {
1286
- var S = function(F) {
1287
- var A = d.current, Z = c.current;
1288
- return d.current = c.current = null, o.current = F, u.current = u.current || F, b.current = _.current.apply(Z, A);
1289
- }, N = function(F, A) {
1290
- g && cancelAnimationFrame(s.current), s.current = g ? requestAnimationFrame(F) : setTimeout(F, A);
1291
- }, Y = function(F) {
1292
- if (!O.current) return !1;
1293
- var A = F - i.current;
1294
- return !i.current || A >= e || A < 0 || v && F - o.current >= I;
1295
- }, H = function(F) {
1296
- return s.current = null, p && d.current ? S(F) : (d.current = c.current = null, b.current);
1297
- }, W = function F() {
1298
- var A = Date.now();
1299
- if (h && u.current === o.current && z(), Y(A)) return H(A);
1300
- if (O.current) {
1301
- var Z = e - (A - i.current), re = v ? Math.min(Z, I - (A - o.current)) : Z;
1302
- N(F, re);
1303
- }
1304
- }, z = function() {
1305
- }, B = function() {
1306
- if (x || C) {
1307
- var F, A = Date.now(), Z = Y(A);
1308
- if (d.current = [].slice.call(arguments), c.current = a, i.current = A, f && !w.current && (w.current = function() {
1309
- var re;
1310
- ((re = globalThis.document) == null ? void 0 : re.visibilityState) === "hidden" && R.current.flush();
1311
- }, (F = globalThis.document) == null || F.addEventListener == null || F.addEventListener("visibilitychange", w.current)), Z) {
1312
- if (!s.current && O.current) return o.current = i.current, N(W, e), h ? S(i.current) : b.current;
1313
- if (v) return N(W, e), S(i.current);
1314
- }
1315
- return s.current || N(W, e), b.current;
1316
- }
1317
- };
1318
- return B.cancel = function() {
1319
- var F = s.current;
1320
- F && (g ? cancelAnimationFrame(s.current) : clearTimeout(s.current)), o.current = 0, d.current = i.current = c.current = s.current = null;
1321
- }, B.isPending = function() {
1322
- return !!s.current;
1323
- }, B.flush = function() {
1324
- return s.current ? H(Date.now()) : b.current;
1325
- }, B;
1326
- }, [h, v, e, I, p, f, g, x, C, n]);
1327
- return R.current = D, Ut(function() {
1328
- return O.current = !0, function() {
1329
- var S;
1330
- f && R.current.flush(), w.current && ((S = globalThis.document) == null || S.removeEventListener == null || S.removeEventListener("visibilitychange", w.current), w.current = null), O.current = !1;
1331
- };
1332
- }, [f]), D;
1333
- }
1334
- function Gn(r, e = 150) {
1335
- const [t, n] = le({ width: 0, height: 0 }), a = mi((i) => {
1336
- n({
1337
- width: i.contentRect.width,
1338
- height: i.contentRect.height
1339
- });
1340
- }, e);
1341
- return hi(r, a), t;
1342
- }
1343
- var Ve = { exports: {} }, Jt = { exports: {} }, Wr;
1344
- function U() {
1345
- return Wr || (Wr = 1, (function(r) {
1346
- function e(t) {
1347
- return t && t.__esModule ? t : {
1348
- default: t
1349
- };
1350
- }
1351
- r.exports = e, r.exports.__esModule = !0, r.exports.default = r.exports;
1352
- })(Jt)), Jt.exports;
1353
- }
1354
- var Ke = { exports: {} }, Xe = { exports: {} }, er = { exports: {} }, Ar;
1355
- function Zn() {
1356
- return Ar || (Ar = 1, (function(r) {
1357
- function e(t) {
1358
- "@babel/helpers - typeof";
1359
- return r.exports = e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
1360
- return typeof n;
1361
- } : function(n) {
1362
- return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
1363
- }, r.exports.__esModule = !0, r.exports.default = r.exports, e(t);
1364
- }
1365
- r.exports = e, r.exports.__esModule = !0, r.exports.default = r.exports;
1366
- })(er)), er.exports;
1367
- }
1368
- var Be = { exports: {} }, qr;
1369
- function X() {
1370
- return qr || (qr = 1, (function(r, e) {
1371
- Object.defineProperty(e, "__esModule", {
1372
- value: !0
1373
- }), e.default = t;
1374
- function t(n, a) {
1375
- if (a.length < n)
1376
- throw new TypeError(n + " argument" + (n > 1 ? "s" : "") + " required, but only " + a.length + " present");
1377
- }
1378
- r.exports = e.default;
1379
- })(Be, Be.exports)), Be.exports;
1380
- }
1381
- var Yr;
1382
- function gi() {
1383
- return Yr || (Yr = 1, (function(r, e) {
1384
- var t = U().default;
1385
- Object.defineProperty(e, "__esModule", {
1386
- value: !0
1387
- }), e.default = i;
1388
- var n = t(Zn()), a = t(/* @__PURE__ */ X());
1389
- function i(o) {
1390
- return (0, a.default)(1, arguments), o instanceof Date || (0, n.default)(o) === "object" && Object.prototype.toString.call(o) === "[object Date]";
1391
- }
1392
- r.exports = e.default;
1393
- })(Xe, Xe.exports)), Xe.exports;
1394
- }
1395
- var Ge = { exports: {} }, Lr;
1396
- function oe() {
1397
- return Lr || (Lr = 1, (function(r, e) {
1398
- var t = U().default;
1399
- Object.defineProperty(e, "__esModule", {
1400
- value: !0
1401
- }), e.default = i;
1402
- var n = t(Zn()), a = t(/* @__PURE__ */ X());
1403
- function i(o) {
1404
- (0, a.default)(1, arguments);
1405
- var u = Object.prototype.toString.call(o);
1406
- return o instanceof Date || (0, n.default)(o) === "object" && u === "[object Date]" ? new Date(o.getTime()) : typeof o == "number" || u === "[object Number]" ? new Date(o) : ((typeof o == "string" || u === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
1407
- }
1408
- r.exports = e.default;
1409
- })(Ge, Ge.exports)), Ge.exports;
1410
- }
1411
- var $r;
1412
- function bi() {
1413
- return $r || ($r = 1, (function(r, e) {
1414
- var t = U().default;
1415
- Object.defineProperty(e, "__esModule", {
1416
- value: !0
1417
- }), e.default = o;
1418
- var n = t(/* @__PURE__ */ gi()), a = t(/* @__PURE__ */ oe()), i = t(/* @__PURE__ */ X());
1419
- function o(u) {
1420
- if ((0, i.default)(1, arguments), !(0, n.default)(u) && typeof u != "number")
1421
- return !1;
1422
- var s = (0, a.default)(u);
1423
- return !isNaN(Number(s));
1424
- }
1425
- r.exports = e.default;
1426
- })(Ke, Ke.exports)), Ke.exports;
1427
- }
1428
- var Ze = { exports: {} }, Je = { exports: {} }, et = { exports: {} }, Hr;
1429
- function me() {
1430
- return Hr || (Hr = 1, (function(r, e) {
1431
- Object.defineProperty(e, "__esModule", {
1432
- value: !0
1433
- }), e.default = t;
1434
- function t(n) {
1435
- if (n === null || n === !0 || n === !1)
1436
- return NaN;
1437
- var a = Number(n);
1438
- return isNaN(a) ? a : a < 0 ? Math.ceil(a) : Math.floor(a);
1439
- }
1440
- r.exports = e.default;
1441
- })(et, et.exports)), et.exports;
1442
- }
1443
- var zr;
1444
- function yi() {
1445
- return zr || (zr = 1, (function(r, e) {
1446
- var t = U().default;
1447
- Object.defineProperty(e, "__esModule", {
1448
- value: !0
1449
- }), e.default = o;
1450
- var n = t(/* @__PURE__ */ me()), a = t(/* @__PURE__ */ oe()), i = t(/* @__PURE__ */ X());
1451
- function o(u, s) {
1452
- (0, i.default)(2, arguments);
1453
- var d = (0, a.default)(u).getTime(), c = (0, n.default)(s);
1454
- return new Date(d + c);
1455
- }
1456
- r.exports = e.default;
1457
- })(Je, Je.exports)), Je.exports;
1458
- }
1459
- var Qr;
1460
- function xi() {
1461
- return Qr || (Qr = 1, (function(r, e) {
1462
- var t = U().default;
1463
- Object.defineProperty(e, "__esModule", {
1464
- value: !0
1465
- }), e.default = o;
1466
- var n = t(/* @__PURE__ */ yi()), a = t(/* @__PURE__ */ X()), i = t(/* @__PURE__ */ me());
1467
- function o(u, s) {
1468
- (0, a.default)(2, arguments);
1469
- var d = (0, i.default)(s);
1470
- return (0, n.default)(u, -d);
1471
- }
1472
- r.exports = e.default;
1473
- })(Ze, Ze.exports)), Ze.exports;
1474
- }
1475
- var tt = { exports: {} }, rt = { exports: {} }, Vr;
1476
- function wi() {
1477
- return Vr || (Vr = 1, (function(r, e) {
1478
- var t = U().default;
1479
- Object.defineProperty(e, "__esModule", {
1480
- value: !0
1481
- }), e.default = o;
1482
- var n = t(/* @__PURE__ */ oe()), a = t(/* @__PURE__ */ X()), i = 864e5;
1483
- function o(u) {
1484
- (0, a.default)(1, arguments);
1485
- var s = (0, n.default)(u), d = s.getTime();
1486
- s.setUTCMonth(0, 1), s.setUTCHours(0, 0, 0, 0);
1487
- var c = s.getTime(), b = d - c;
1488
- return Math.floor(b / i) + 1;
1489
- }
1490
- r.exports = e.default;
1491
- })(rt, rt.exports)), rt.exports;
1492
- }
1493
- var nt = { exports: {} }, at = { exports: {} }, Kr;
1494
- function fr() {
1495
- return Kr || (Kr = 1, (function(r, e) {
1496
- var t = U().default;
1497
- Object.defineProperty(e, "__esModule", {
1498
- value: !0
1499
- }), e.default = i;
1500
- var n = t(/* @__PURE__ */ oe()), a = t(/* @__PURE__ */ X());
1501
- function i(o) {
1502
- (0, a.default)(1, arguments);
1503
- var u = 1, s = (0, n.default)(o), d = s.getUTCDay(), c = (d < u ? 7 : 0) + d - u;
1504
- return s.setUTCDate(s.getUTCDate() - c), s.setUTCHours(0, 0, 0, 0), s;
1505
- }
1506
- r.exports = e.default;
1507
- })(at, at.exports)), at.exports;
1508
- }
1509
- var it = { exports: {} }, ot = { exports: {} }, Xr;
1510
- function Jn() {
1511
- return Xr || (Xr = 1, (function(r, e) {
1512
- var t = U().default;
1513
- Object.defineProperty(e, "__esModule", {
1514
- value: !0
1515
- }), e.default = o;
1516
- var n = t(/* @__PURE__ */ oe()), a = t(/* @__PURE__ */ X()), i = t(/* @__PURE__ */ fr());
1517
- function o(u) {
1518
- (0, a.default)(1, arguments);
1519
- var s = (0, n.default)(u), d = s.getUTCFullYear(), c = /* @__PURE__ */ new Date(0);
1520
- c.setUTCFullYear(d + 1, 0, 4), c.setUTCHours(0, 0, 0, 0);
1521
- var b = (0, i.default)(c), _ = /* @__PURE__ */ new Date(0);
1522
- _.setUTCFullYear(d, 0, 4), _.setUTCHours(0, 0, 0, 0);
1523
- var O = (0, i.default)(_);
1524
- return s.getTime() >= b.getTime() ? d + 1 : s.getTime() >= O.getTime() ? d : d - 1;
1525
- }
1526
- r.exports = e.default;
1527
- })(ot, ot.exports)), ot.exports;
1528
- }
1529
- var Br;
1530
- function Ti() {
1531
- return Br || (Br = 1, (function(r, e) {
1532
- var t = U().default;
1533
- Object.defineProperty(e, "__esModule", {
1534
- value: !0
1535
- }), e.default = o;
1536
- var n = t(/* @__PURE__ */ Jn()), a = t(/* @__PURE__ */ fr()), i = t(/* @__PURE__ */ X());
1537
- function o(u) {
1538
- (0, i.default)(1, arguments);
1539
- var s = (0, n.default)(u), d = /* @__PURE__ */ new Date(0);
1540
- d.setUTCFullYear(s, 0, 4), d.setUTCHours(0, 0, 0, 0);
1541
- var c = (0, a.default)(d);
1542
- return c;
1543
- }
1544
- r.exports = e.default;
1545
- })(it, it.exports)), it.exports;
1546
- }
1547
- var Gr;
1548
- function Ci() {
1549
- return Gr || (Gr = 1, (function(r, e) {
1550
- var t = U().default;
1551
- Object.defineProperty(e, "__esModule", {
1552
- value: !0
1553
- }), e.default = s;
1554
- var n = t(/* @__PURE__ */ oe()), a = t(/* @__PURE__ */ fr()), i = t(/* @__PURE__ */ Ti()), o = t(/* @__PURE__ */ X()), u = 6048e5;
1555
- function s(d) {
1556
- (0, o.default)(1, arguments);
1557
- var c = (0, n.default)(d), b = (0, a.default)(c).getTime() - (0, i.default)(c).getTime();
1558
- return Math.round(b / u) + 1;
1559
- }
1560
- r.exports = e.default;
1561
- })(nt, nt.exports)), nt.exports;
1562
- }
1563
- var st = { exports: {} }, ut = { exports: {} }, je = {}, Zr;
1564
- function qt() {
1565
- if (Zr) return je;
1566
- Zr = 1, Object.defineProperty(je, "__esModule", {
1567
- value: !0
1568
- }), je.getDefaultOptions = e, je.setDefaultOptions = t;
1569
- var r = {};
1570
- function e() {
1571
- return r;
1572
- }
1573
- function t(n) {
1574
- r = n;
1575
- }
1576
- return je;
1577
- }
1578
- var Jr;
1579
- function hr() {
1580
- return Jr || (Jr = 1, (function(r, e) {
1581
- var t = U().default;
1582
- Object.defineProperty(e, "__esModule", {
1583
- value: !0
1584
- }), e.default = u;
1585
- var n = t(/* @__PURE__ */ oe()), a = t(/* @__PURE__ */ X()), i = t(/* @__PURE__ */ me()), o = /* @__PURE__ */ qt();
1586
- function u(s, d) {
1587
- var c, b, _, O, w, R, x, g;
1588
- (0, a.default)(1, arguments);
1589
- var h = (0, o.getDefaultOptions)(), p = (0, i.default)((c = (b = (_ = (O = d?.weekStartsOn) !== null && O !== void 0 ? O : d == null || (w = d.locale) === null || w === void 0 || (R = w.options) === null || R === void 0 ? void 0 : R.weekStartsOn) !== null && _ !== void 0 ? _ : h.weekStartsOn) !== null && b !== void 0 ? b : (x = h.locale) === null || x === void 0 || (g = x.options) === null || g === void 0 ? void 0 : g.weekStartsOn) !== null && c !== void 0 ? c : 0);
1590
- if (!(p >= 0 && p <= 6))
1591
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
1592
- var f = (0, n.default)(s), v = f.getUTCDay(), C = (v < p ? 7 : 0) + v - p;
1593
- return f.setUTCDate(f.getUTCDate() - C), f.setUTCHours(0, 0, 0, 0), f;
1594
- }
1595
- r.exports = e.default;
1596
- })(ut, ut.exports)), ut.exports;
1597
- }
1598
- var lt = { exports: {} }, dt = { exports: {} }, en;
1599
- function ea() {
1600
- return en || (en = 1, (function(r, e) {
1601
- var t = U().default;
1602
- Object.defineProperty(e, "__esModule", {
1603
- value: !0
1604
- }), e.default = s;
1605
- var n = t(/* @__PURE__ */ oe()), a = t(/* @__PURE__ */ X()), i = t(/* @__PURE__ */ hr()), o = t(/* @__PURE__ */ me()), u = /* @__PURE__ */ qt();
1606
- function s(d, c) {
1607
- var b, _, O, w, R, x, g, h;
1608
- (0, a.default)(1, arguments);
1609
- var p = (0, n.default)(d), f = p.getUTCFullYear(), v = (0, u.getDefaultOptions)(), C = (0, o.default)((b = (_ = (O = (w = c?.firstWeekContainsDate) !== null && w !== void 0 ? w : c == null || (R = c.locale) === null || R === void 0 || (x = R.options) === null || x === void 0 ? void 0 : x.firstWeekContainsDate) !== null && O !== void 0 ? O : v.firstWeekContainsDate) !== null && _ !== void 0 ? _ : (g = v.locale) === null || g === void 0 || (h = g.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && b !== void 0 ? b : 1);
1610
- if (!(C >= 1 && C <= 7))
1611
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
1612
- var I = /* @__PURE__ */ new Date(0);
1613
- I.setUTCFullYear(f + 1, 0, C), I.setUTCHours(0, 0, 0, 0);
1614
- var D = (0, i.default)(I, c), S = /* @__PURE__ */ new Date(0);
1615
- S.setUTCFullYear(f, 0, C), S.setUTCHours(0, 0, 0, 0);
1616
- var N = (0, i.default)(S, c);
1617
- return p.getTime() >= D.getTime() ? f + 1 : p.getTime() >= N.getTime() ? f : f - 1;
1618
- }
1619
- r.exports = e.default;
1620
- })(dt, dt.exports)), dt.exports;
1621
- }
1622
- var tn;
1623
- function _i() {
1624
- return tn || (tn = 1, (function(r, e) {
1625
- var t = U().default;
1626
- Object.defineProperty(e, "__esModule", {
1627
- value: !0
1628
- }), e.default = s;
1629
- var n = t(/* @__PURE__ */ ea()), a = t(/* @__PURE__ */ X()), i = t(/* @__PURE__ */ hr()), o = t(/* @__PURE__ */ me()), u = /* @__PURE__ */ qt();
1630
- function s(d, c) {
1631
- var b, _, O, w, R, x, g, h;
1632
- (0, a.default)(1, arguments);
1633
- var p = (0, u.getDefaultOptions)(), f = (0, o.default)((b = (_ = (O = (w = c?.firstWeekContainsDate) !== null && w !== void 0 ? w : c == null || (R = c.locale) === null || R === void 0 || (x = R.options) === null || x === void 0 ? void 0 : x.firstWeekContainsDate) !== null && O !== void 0 ? O : p.firstWeekContainsDate) !== null && _ !== void 0 ? _ : (g = p.locale) === null || g === void 0 || (h = g.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && b !== void 0 ? b : 1), v = (0, n.default)(d, c), C = /* @__PURE__ */ new Date(0);
1634
- C.setUTCFullYear(v, 0, f), C.setUTCHours(0, 0, 0, 0);
1635
- var I = (0, i.default)(C, c);
1636
- return I;
1637
- }
1638
- r.exports = e.default;
1639
- })(lt, lt.exports)), lt.exports;
1640
- }
1641
- var rn;
1642
- function Oi() {
1643
- return rn || (rn = 1, (function(r, e) {
1644
- var t = U().default;
1645
- Object.defineProperty(e, "__esModule", {
1646
- value: !0
1647
- }), e.default = s;
1648
- var n = t(/* @__PURE__ */ oe()), a = t(/* @__PURE__ */ hr()), i = t(/* @__PURE__ */ _i()), o = t(/* @__PURE__ */ X()), u = 6048e5;
1649
- function s(d, c) {
1650
- (0, o.default)(1, arguments);
1651
- var b = (0, n.default)(d), _ = (0, a.default)(b, c).getTime() - (0, i.default)(b, c).getTime();
1652
- return Math.round(_ / u) + 1;
1653
- }
1654
- r.exports = e.default;
1655
- })(st, st.exports)), st.exports;
1656
- }
1657
- var ct = { exports: {} }, nn;
1658
- function ta() {
1659
- return nn || (nn = 1, (function(r, e) {
1660
- Object.defineProperty(e, "__esModule", {
1661
- value: !0
1662
- }), e.default = t;
1663
- function t(n, a) {
1664
- for (var i = n < 0 ? "-" : "", o = Math.abs(n).toString(); o.length < a; )
1665
- o = "0" + o;
1666
- return i + o;
1667
- }
1668
- r.exports = e.default;
1669
- })(ct, ct.exports)), ct.exports;
1670
- }
1671
- var ft = { exports: {} }, an;
1672
- function Di() {
1673
- return an || (an = 1, (function(r, e) {
1674
- var t = U().default;
1675
- Object.defineProperty(e, "__esModule", {
1676
- value: !0
1677
- }), e.default = void 0;
1678
- var n = t(/* @__PURE__ */ ta()), a = {
1679
- // Year
1680
- y: function(u, s) {
1681
- var d = u.getUTCFullYear(), c = d > 0 ? d : 1 - d;
1682
- return (0, n.default)(s === "yy" ? c % 100 : c, s.length);
1683
- },
1684
- // Month
1685
- M: function(u, s) {
1686
- var d = u.getUTCMonth();
1687
- return s === "M" ? String(d + 1) : (0, n.default)(d + 1, 2);
1688
- },
1689
- // Day of the month
1690
- d: function(u, s) {
1691
- return (0, n.default)(u.getUTCDate(), s.length);
1692
- },
1693
- // AM or PM
1694
- a: function(u, s) {
1695
- var d = u.getUTCHours() / 12 >= 1 ? "pm" : "am";
1696
- switch (s) {
1697
- case "a":
1698
- case "aa":
1699
- return d.toUpperCase();
1700
- case "aaa":
1701
- return d;
1702
- case "aaaaa":
1703
- return d[0];
1704
- default:
1705
- return d === "am" ? "a.m." : "p.m.";
1706
- }
1707
- },
1708
- // Hour [1-12]
1709
- h: function(u, s) {
1710
- return (0, n.default)(u.getUTCHours() % 12 || 12, s.length);
1711
- },
1712
- // Hour [0-23]
1713
- H: function(u, s) {
1714
- return (0, n.default)(u.getUTCHours(), s.length);
1715
- },
1716
- // Minute
1717
- m: function(u, s) {
1718
- return (0, n.default)(u.getUTCMinutes(), s.length);
1719
- },
1720
- // Second
1721
- s: function(u, s) {
1722
- return (0, n.default)(u.getUTCSeconds(), s.length);
1723
- },
1724
- // Fraction of second
1725
- S: function(u, s) {
1726
- var d = s.length, c = u.getUTCMilliseconds(), b = Math.floor(c * Math.pow(10, d - 3));
1727
- return (0, n.default)(b, s.length);
1728
- }
1729
- }, i = a;
1730
- e.default = i, r.exports = e.default;
1731
- })(ft, ft.exports)), ft.exports;
1732
- }
1733
- var on;
1734
- function Ii() {
1735
- return on || (on = 1, (function(r, e) {
1736
- var t = U().default;
1737
- Object.defineProperty(e, "__esModule", {
1738
- value: !0
1739
- }), e.default = void 0;
1740
- var n = t(/* @__PURE__ */ wi()), a = t(/* @__PURE__ */ Ci()), i = t(/* @__PURE__ */ Jn()), o = t(/* @__PURE__ */ Oi()), u = t(/* @__PURE__ */ ea()), s = t(/* @__PURE__ */ ta()), d = t(/* @__PURE__ */ Di()), c = {
1741
- midnight: "midnight",
1742
- noon: "noon",
1743
- morning: "morning",
1744
- afternoon: "afternoon",
1745
- evening: "evening",
1746
- night: "night"
1747
- }, b = {
1748
- // Era
1749
- G: function(g, h, p) {
1750
- var f = g.getUTCFullYear() > 0 ? 1 : 0;
1751
- switch (h) {
1752
- // AD, BC
1753
- case "G":
1754
- case "GG":
1755
- case "GGG":
1756
- return p.era(f, {
1757
- width: "abbreviated"
1758
- });
1759
- // A, B
1760
- case "GGGGG":
1761
- return p.era(f, {
1762
- width: "narrow"
1763
- });
1764
- default:
1765
- return p.era(f, {
1766
- width: "wide"
1767
- });
1768
- }
1769
- },
1770
- // Year
1771
- y: function(g, h, p) {
1772
- if (h === "yo") {
1773
- var f = g.getUTCFullYear(), v = f > 0 ? f : 1 - f;
1774
- return p.ordinalNumber(v, {
1775
- unit: "year"
1776
- });
1777
- }
1778
- return d.default.y(g, h);
1779
- },
1780
- // Local week-numbering year
1781
- Y: function(g, h, p, f) {
1782
- var v = (0, u.default)(g, f), C = v > 0 ? v : 1 - v;
1783
- if (h === "YY") {
1784
- var I = C % 100;
1785
- return (0, s.default)(I, 2);
1786
- }
1787
- return h === "Yo" ? p.ordinalNumber(C, {
1788
- unit: "year"
1789
- }) : (0, s.default)(C, h.length);
1790
- },
1791
- // ISO week-numbering year
1792
- R: function(g, h) {
1793
- var p = (0, i.default)(g);
1794
- return (0, s.default)(p, h.length);
1795
- },
1796
- // Extended year. This is a single number designating the year of this calendar system.
1797
- // The main difference between `y` and `u` localizers are B.C. years:
1798
- // | Year | `y` | `u` |
1799
- // |------|-----|-----|
1800
- // | AC 1 | 1 | 1 |
1801
- // | BC 1 | 1 | 0 |
1802
- // | BC 2 | 2 | -1 |
1803
- // Also `yy` always returns the last two digits of a year,
1804
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
1805
- u: function(g, h) {
1806
- var p = g.getUTCFullYear();
1807
- return (0, s.default)(p, h.length);
1808
- },
1809
- // Quarter
1810
- Q: function(g, h, p) {
1811
- var f = Math.ceil((g.getUTCMonth() + 1) / 3);
1812
- switch (h) {
1813
- // 1, 2, 3, 4
1814
- case "Q":
1815
- return String(f);
1816
- // 01, 02, 03, 04
1817
- case "QQ":
1818
- return (0, s.default)(f, 2);
1819
- // 1st, 2nd, 3rd, 4th
1820
- case "Qo":
1821
- return p.ordinalNumber(f, {
1822
- unit: "quarter"
1823
- });
1824
- // Q1, Q2, Q3, Q4
1825
- case "QQQ":
1826
- return p.quarter(f, {
1827
- width: "abbreviated",
1828
- context: "formatting"
1829
- });
1830
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
1831
- case "QQQQQ":
1832
- return p.quarter(f, {
1833
- width: "narrow",
1834
- context: "formatting"
1835
- });
1836
- default:
1837
- return p.quarter(f, {
1838
- width: "wide",
1839
- context: "formatting"
1840
- });
1841
- }
1842
- },
1843
- // Stand-alone quarter
1844
- q: function(g, h, p) {
1845
- var f = Math.ceil((g.getUTCMonth() + 1) / 3);
1846
- switch (h) {
1847
- // 1, 2, 3, 4
1848
- case "q":
1849
- return String(f);
1850
- // 01, 02, 03, 04
1851
- case "qq":
1852
- return (0, s.default)(f, 2);
1853
- // 1st, 2nd, 3rd, 4th
1854
- case "qo":
1855
- return p.ordinalNumber(f, {
1856
- unit: "quarter"
1857
- });
1858
- // Q1, Q2, Q3, Q4
1859
- case "qqq":
1860
- return p.quarter(f, {
1861
- width: "abbreviated",
1862
- context: "standalone"
1863
- });
1864
- // 1, 2, 3, 4 (narrow quarter; could be not numerical)
1865
- case "qqqqq":
1866
- return p.quarter(f, {
1867
- width: "narrow",
1868
- context: "standalone"
1869
- });
1870
- default:
1871
- return p.quarter(f, {
1872
- width: "wide",
1873
- context: "standalone"
1874
- });
1875
- }
1876
- },
1877
- // Month
1878
- M: function(g, h, p) {
1879
- var f = g.getUTCMonth();
1880
- switch (h) {
1881
- case "M":
1882
- case "MM":
1883
- return d.default.M(g, h);
1884
- // 1st, 2nd, ..., 12th
1885
- case "Mo":
1886
- return p.ordinalNumber(f + 1, {
1887
- unit: "month"
1888
- });
1889
- // Jan, Feb, ..., Dec
1890
- case "MMM":
1891
- return p.month(f, {
1892
- width: "abbreviated",
1893
- context: "formatting"
1894
- });
1895
- // J, F, ..., D
1896
- case "MMMMM":
1897
- return p.month(f, {
1898
- width: "narrow",
1899
- context: "formatting"
1900
- });
1901
- default:
1902
- return p.month(f, {
1903
- width: "wide",
1904
- context: "formatting"
1905
- });
1906
- }
1907
- },
1908
- // Stand-alone month
1909
- L: function(g, h, p) {
1910
- var f = g.getUTCMonth();
1911
- switch (h) {
1912
- // 1, 2, ..., 12
1913
- case "L":
1914
- return String(f + 1);
1915
- // 01, 02, ..., 12
1916
- case "LL":
1917
- return (0, s.default)(f + 1, 2);
1918
- // 1st, 2nd, ..., 12th
1919
- case "Lo":
1920
- return p.ordinalNumber(f + 1, {
1921
- unit: "month"
1922
- });
1923
- // Jan, Feb, ..., Dec
1924
- case "LLL":
1925
- return p.month(f, {
1926
- width: "abbreviated",
1927
- context: "standalone"
1928
- });
1929
- // J, F, ..., D
1930
- case "LLLLL":
1931
- return p.month(f, {
1932
- width: "narrow",
1933
- context: "standalone"
1934
- });
1935
- default:
1936
- return p.month(f, {
1937
- width: "wide",
1938
- context: "standalone"
1939
- });
1940
- }
1941
- },
1942
- // Local week of year
1943
- w: function(g, h, p, f) {
1944
- var v = (0, o.default)(g, f);
1945
- return h === "wo" ? p.ordinalNumber(v, {
1946
- unit: "week"
1947
- }) : (0, s.default)(v, h.length);
1948
- },
1949
- // ISO week of year
1950
- I: function(g, h, p) {
1951
- var f = (0, a.default)(g);
1952
- return h === "Io" ? p.ordinalNumber(f, {
1953
- unit: "week"
1954
- }) : (0, s.default)(f, h.length);
1955
- },
1956
- // Day of the month
1957
- d: function(g, h, p) {
1958
- return h === "do" ? p.ordinalNumber(g.getUTCDate(), {
1959
- unit: "date"
1960
- }) : d.default.d(g, h);
1961
- },
1962
- // Day of year
1963
- D: function(g, h, p) {
1964
- var f = (0, n.default)(g);
1965
- return h === "Do" ? p.ordinalNumber(f, {
1966
- unit: "dayOfYear"
1967
- }) : (0, s.default)(f, h.length);
1968
- },
1969
- // Day of week
1970
- E: function(g, h, p) {
1971
- var f = g.getUTCDay();
1972
- switch (h) {
1973
- // Tue
1974
- case "E":
1975
- case "EE":
1976
- case "EEE":
1977
- return p.day(f, {
1978
- width: "abbreviated",
1979
- context: "formatting"
1980
- });
1981
- // T
1982
- case "EEEEE":
1983
- return p.day(f, {
1984
- width: "narrow",
1985
- context: "formatting"
1986
- });
1987
- // Tu
1988
- case "EEEEEE":
1989
- return p.day(f, {
1990
- width: "short",
1991
- context: "formatting"
1992
- });
1993
- default:
1994
- return p.day(f, {
1995
- width: "wide",
1996
- context: "formatting"
1997
- });
1998
- }
1999
- },
2000
- // Local day of week
2001
- e: function(g, h, p, f) {
2002
- var v = g.getUTCDay(), C = (v - f.weekStartsOn + 8) % 7 || 7;
2003
- switch (h) {
2004
- // Numerical value (Nth day of week with current locale or weekStartsOn)
2005
- case "e":
2006
- return String(C);
2007
- // Padded numerical value
2008
- case "ee":
2009
- return (0, s.default)(C, 2);
2010
- // 1st, 2nd, ..., 7th
2011
- case "eo":
2012
- return p.ordinalNumber(C, {
2013
- unit: "day"
2014
- });
2015
- case "eee":
2016
- return p.day(v, {
2017
- width: "abbreviated",
2018
- context: "formatting"
2019
- });
2020
- // T
2021
- case "eeeee":
2022
- return p.day(v, {
2023
- width: "narrow",
2024
- context: "formatting"
2025
- });
2026
- // Tu
2027
- case "eeeeee":
2028
- return p.day(v, {
2029
- width: "short",
2030
- context: "formatting"
2031
- });
2032
- default:
2033
- return p.day(v, {
2034
- width: "wide",
2035
- context: "formatting"
2036
- });
2037
- }
2038
- },
2039
- // Stand-alone local day of week
2040
- c: function(g, h, p, f) {
2041
- var v = g.getUTCDay(), C = (v - f.weekStartsOn + 8) % 7 || 7;
2042
- switch (h) {
2043
- // Numerical value (same as in `e`)
2044
- case "c":
2045
- return String(C);
2046
- // Padded numerical value
2047
- case "cc":
2048
- return (0, s.default)(C, h.length);
2049
- // 1st, 2nd, ..., 7th
2050
- case "co":
2051
- return p.ordinalNumber(C, {
2052
- unit: "day"
2053
- });
2054
- case "ccc":
2055
- return p.day(v, {
2056
- width: "abbreviated",
2057
- context: "standalone"
2058
- });
2059
- // T
2060
- case "ccccc":
2061
- return p.day(v, {
2062
- width: "narrow",
2063
- context: "standalone"
2064
- });
2065
- // Tu
2066
- case "cccccc":
2067
- return p.day(v, {
2068
- width: "short",
2069
- context: "standalone"
2070
- });
2071
- default:
2072
- return p.day(v, {
2073
- width: "wide",
2074
- context: "standalone"
2075
- });
2076
- }
2077
- },
2078
- // ISO day of week
2079
- i: function(g, h, p) {
2080
- var f = g.getUTCDay(), v = f === 0 ? 7 : f;
2081
- switch (h) {
2082
- // 2
2083
- case "i":
2084
- return String(v);
2085
- // 02
2086
- case "ii":
2087
- return (0, s.default)(v, h.length);
2088
- // 2nd
2089
- case "io":
2090
- return p.ordinalNumber(v, {
2091
- unit: "day"
2092
- });
2093
- // Tue
2094
- case "iii":
2095
- return p.day(f, {
2096
- width: "abbreviated",
2097
- context: "formatting"
2098
- });
2099
- // T
2100
- case "iiiii":
2101
- return p.day(f, {
2102
- width: "narrow",
2103
- context: "formatting"
2104
- });
2105
- // Tu
2106
- case "iiiiii":
2107
- return p.day(f, {
2108
- width: "short",
2109
- context: "formatting"
2110
- });
2111
- default:
2112
- return p.day(f, {
2113
- width: "wide",
2114
- context: "formatting"
2115
- });
2116
- }
2117
- },
2118
- // AM or PM
2119
- a: function(g, h, p) {
2120
- var f = g.getUTCHours(), v = f / 12 >= 1 ? "pm" : "am";
2121
- switch (h) {
2122
- case "a":
2123
- case "aa":
2124
- return p.dayPeriod(v, {
2125
- width: "abbreviated",
2126
- context: "formatting"
2127
- });
2128
- case "aaa":
2129
- return p.dayPeriod(v, {
2130
- width: "abbreviated",
2131
- context: "formatting"
2132
- }).toLowerCase();
2133
- case "aaaaa":
2134
- return p.dayPeriod(v, {
2135
- width: "narrow",
2136
- context: "formatting"
2137
- });
2138
- default:
2139
- return p.dayPeriod(v, {
2140
- width: "wide",
2141
- context: "formatting"
2142
- });
2143
- }
2144
- },
2145
- // AM, PM, midnight, noon
2146
- b: function(g, h, p) {
2147
- var f = g.getUTCHours(), v;
2148
- switch (f === 12 ? v = c.noon : f === 0 ? v = c.midnight : v = f / 12 >= 1 ? "pm" : "am", h) {
2149
- case "b":
2150
- case "bb":
2151
- return p.dayPeriod(v, {
2152
- width: "abbreviated",
2153
- context: "formatting"
2154
- });
2155
- case "bbb":
2156
- return p.dayPeriod(v, {
2157
- width: "abbreviated",
2158
- context: "formatting"
2159
- }).toLowerCase();
2160
- case "bbbbb":
2161
- return p.dayPeriod(v, {
2162
- width: "narrow",
2163
- context: "formatting"
2164
- });
2165
- default:
2166
- return p.dayPeriod(v, {
2167
- width: "wide",
2168
- context: "formatting"
2169
- });
2170
- }
2171
- },
2172
- // in the morning, in the afternoon, in the evening, at night
2173
- B: function(g, h, p) {
2174
- var f = g.getUTCHours(), v;
2175
- switch (f >= 17 ? v = c.evening : f >= 12 ? v = c.afternoon : f >= 4 ? v = c.morning : v = c.night, h) {
2176
- case "B":
2177
- case "BB":
2178
- case "BBB":
2179
- return p.dayPeriod(v, {
2180
- width: "abbreviated",
2181
- context: "formatting"
2182
- });
2183
- case "BBBBB":
2184
- return p.dayPeriod(v, {
2185
- width: "narrow",
2186
- context: "formatting"
2187
- });
2188
- default:
2189
- return p.dayPeriod(v, {
2190
- width: "wide",
2191
- context: "formatting"
2192
- });
2193
- }
2194
- },
2195
- // Hour [1-12]
2196
- h: function(g, h, p) {
2197
- if (h === "ho") {
2198
- var f = g.getUTCHours() % 12;
2199
- return f === 0 && (f = 12), p.ordinalNumber(f, {
2200
- unit: "hour"
2201
- });
2202
- }
2203
- return d.default.h(g, h);
2204
- },
2205
- // Hour [0-23]
2206
- H: function(g, h, p) {
2207
- return h === "Ho" ? p.ordinalNumber(g.getUTCHours(), {
2208
- unit: "hour"
2209
- }) : d.default.H(g, h);
2210
- },
2211
- // Hour [0-11]
2212
- K: function(g, h, p) {
2213
- var f = g.getUTCHours() % 12;
2214
- return h === "Ko" ? p.ordinalNumber(f, {
2215
- unit: "hour"
2216
- }) : (0, s.default)(f, h.length);
2217
- },
2218
- // Hour [1-24]
2219
- k: function(g, h, p) {
2220
- var f = g.getUTCHours();
2221
- return f === 0 && (f = 24), h === "ko" ? p.ordinalNumber(f, {
2222
- unit: "hour"
2223
- }) : (0, s.default)(f, h.length);
2224
- },
2225
- // Minute
2226
- m: function(g, h, p) {
2227
- return h === "mo" ? p.ordinalNumber(g.getUTCMinutes(), {
2228
- unit: "minute"
2229
- }) : d.default.m(g, h);
2230
- },
2231
- // Second
2232
- s: function(g, h, p) {
2233
- return h === "so" ? p.ordinalNumber(g.getUTCSeconds(), {
2234
- unit: "second"
2235
- }) : d.default.s(g, h);
2236
- },
2237
- // Fraction of second
2238
- S: function(g, h) {
2239
- return d.default.S(g, h);
2240
- },
2241
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
2242
- X: function(g, h, p, f) {
2243
- var v = f._originalDate || g, C = v.getTimezoneOffset();
2244
- if (C === 0)
2245
- return "Z";
2246
- switch (h) {
2247
- // Hours and optional minutes
2248
- case "X":
2249
- return O(C);
2250
- // Hours, minutes and optional seconds without `:` delimiter
2251
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2252
- // so this token always has the same output as `XX`
2253
- case "XXXX":
2254
- case "XX":
2255
- return w(C);
2256
- // Hours and minutes with `:` delimiter
2257
- default:
2258
- return w(C, ":");
2259
- }
2260
- },
2261
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
2262
- x: function(g, h, p, f) {
2263
- var v = f._originalDate || g, C = v.getTimezoneOffset();
2264
- switch (h) {
2265
- // Hours and optional minutes
2266
- case "x":
2267
- return O(C);
2268
- // Hours, minutes and optional seconds without `:` delimiter
2269
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2270
- // so this token always has the same output as `xx`
2271
- case "xxxx":
2272
- case "xx":
2273
- return w(C);
2274
- // Hours and minutes with `:` delimiter
2275
- default:
2276
- return w(C, ":");
2277
- }
2278
- },
2279
- // Timezone (GMT)
2280
- O: function(g, h, p, f) {
2281
- var v = f._originalDate || g, C = v.getTimezoneOffset();
2282
- switch (h) {
2283
- // Short
2284
- case "O":
2285
- case "OO":
2286
- case "OOO":
2287
- return "GMT" + _(C, ":");
2288
- default:
2289
- return "GMT" + w(C, ":");
2290
- }
2291
- },
2292
- // Timezone (specific non-location)
2293
- z: function(g, h, p, f) {
2294
- var v = f._originalDate || g, C = v.getTimezoneOffset();
2295
- switch (h) {
2296
- // Short
2297
- case "z":
2298
- case "zz":
2299
- case "zzz":
2300
- return "GMT" + _(C, ":");
2301
- default:
2302
- return "GMT" + w(C, ":");
2303
- }
2304
- },
2305
- // Seconds timestamp
2306
- t: function(g, h, p, f) {
2307
- var v = f._originalDate || g, C = Math.floor(v.getTime() / 1e3);
2308
- return (0, s.default)(C, h.length);
2309
- },
2310
- // Milliseconds timestamp
2311
- T: function(g, h, p, f) {
2312
- var v = f._originalDate || g, C = v.getTime();
2313
- return (0, s.default)(C, h.length);
2314
- }
2315
- };
2316
- function _(x, g) {
2317
- var h = x > 0 ? "-" : "+", p = Math.abs(x), f = Math.floor(p / 60), v = p % 60;
2318
- if (v === 0)
2319
- return h + String(f);
2320
- var C = g;
2321
- return h + String(f) + C + (0, s.default)(v, 2);
2322
- }
2323
- function O(x, g) {
2324
- if (x % 60 === 0) {
2325
- var h = x > 0 ? "-" : "+";
2326
- return h + (0, s.default)(Math.abs(x) / 60, 2);
2327
- }
2328
- return w(x, g);
2329
- }
2330
- function w(x, g) {
2331
- var h = g || "", p = x > 0 ? "-" : "+", f = Math.abs(x), v = (0, s.default)(Math.floor(f / 60), 2), C = (0, s.default)(f % 60, 2);
2332
- return p + v + h + C;
2333
- }
2334
- var R = b;
2335
- e.default = R, r.exports = e.default;
2336
- })(tt, tt.exports)), tt.exports;
2337
- }
2338
- var ht = { exports: {} }, sn;
2339
- function Pi() {
2340
- return sn || (sn = 1, (function(r, e) {
2341
- Object.defineProperty(e, "__esModule", {
2342
- value: !0
2343
- }), e.default = void 0;
2344
- var t = function(s, d) {
2345
- switch (s) {
2346
- case "P":
2347
- return d.date({
2348
- width: "short"
2349
- });
2350
- case "PP":
2351
- return d.date({
2352
- width: "medium"
2353
- });
2354
- case "PPP":
2355
- return d.date({
2356
- width: "long"
2357
- });
2358
- default:
2359
- return d.date({
2360
- width: "full"
2361
- });
2362
- }
2363
- }, n = function(s, d) {
2364
- switch (s) {
2365
- case "p":
2366
- return d.time({
2367
- width: "short"
2368
- });
2369
- case "pp":
2370
- return d.time({
2371
- width: "medium"
2372
- });
2373
- case "ppp":
2374
- return d.time({
2375
- width: "long"
2376
- });
2377
- default:
2378
- return d.time({
2379
- width: "full"
2380
- });
2381
- }
2382
- }, a = function(s, d) {
2383
- var c = s.match(/(P+)(p+)?/) || [], b = c[1], _ = c[2];
2384
- if (!_)
2385
- return t(s, d);
2386
- var O;
2387
- switch (b) {
2388
- case "P":
2389
- O = d.dateTime({
2390
- width: "short"
2391
- });
2392
- break;
2393
- case "PP":
2394
- O = d.dateTime({
2395
- width: "medium"
2396
- });
2397
- break;
2398
- case "PPP":
2399
- O = d.dateTime({
2400
- width: "long"
2401
- });
2402
- break;
2403
- default:
2404
- O = d.dateTime({
2405
- width: "full"
2406
- });
2407
- break;
2408
- }
2409
- return O.replace("{{date}}", t(b, d)).replace("{{time}}", n(_, d));
2410
- }, i = {
2411
- p: n,
2412
- P: a
2413
- }, o = i;
2414
- e.default = o, r.exports = e.default;
2415
- })(ht, ht.exports)), ht.exports;
2416
- }
2417
- var pt = { exports: {} }, un;
2418
- function ra() {
2419
- return un || (un = 1, (function(r, e) {
2420
- Object.defineProperty(e, "__esModule", {
2421
- value: !0
2422
- }), e.default = t;
2423
- function t(n) {
2424
- var a = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds()));
2425
- return a.setUTCFullYear(n.getFullYear()), n.getTime() - a.getTime();
2426
- }
2427
- r.exports = e.default;
2428
- })(pt, pt.exports)), pt.exports;
2429
- }
2430
- var Oe = {}, ln;
2431
- function Si() {
2432
- if (ln) return Oe;
2433
- ln = 1, Object.defineProperty(Oe, "__esModule", {
2434
- value: !0
2435
- }), Oe.isProtectedDayOfYearToken = t, Oe.isProtectedWeekYearToken = n, Oe.throwProtectedError = a;
2436
- var r = ["D", "DD"], e = ["YY", "YYYY"];
2437
- function t(i) {
2438
- return r.indexOf(i) !== -1;
2439
- }
2440
- function n(i) {
2441
- return e.indexOf(i) !== -1;
2442
- }
2443
- function a(i, o, u) {
2444
- if (i === "YYYY")
2445
- throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o, "`) for formatting years to the input `").concat(u, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
2446
- if (i === "YY")
2447
- throw new RangeError("Use `yy` instead of `YY` (in `".concat(o, "`) for formatting years to the input `").concat(u, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
2448
- if (i === "D")
2449
- throw new RangeError("Use `d` instead of `D` (in `".concat(o, "`) for formatting days of the month to the input `").concat(u, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
2450
- if (i === "DD")
2451
- throw new RangeError("Use `dd` instead of `DD` (in `".concat(o, "`) for formatting days of the month to the input `").concat(u, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
2452
- }
2453
- return Oe;
2454
- }
2455
- var vt = { exports: {} }, mt = { exports: {} }, gt = { exports: {} }, dn;
2456
- function Ri() {
2457
- return dn || (dn = 1, (function(r, e) {
2458
- Object.defineProperty(e, "__esModule", {
2459
- value: !0
2460
- }), e.default = void 0;
2461
- var t = {
2462
- lessThanXSeconds: {
2463
- one: "less than a second",
2464
- other: "less than {{count}} seconds"
2465
- },
2466
- xSeconds: {
2467
- one: "1 second",
2468
- other: "{{count}} seconds"
2469
- },
2470
- halfAMinute: "half a minute",
2471
- lessThanXMinutes: {
2472
- one: "less than a minute",
2473
- other: "less than {{count}} minutes"
2474
- },
2475
- xMinutes: {
2476
- one: "1 minute",
2477
- other: "{{count}} minutes"
2478
- },
2479
- aboutXHours: {
2480
- one: "about 1 hour",
2481
- other: "about {{count}} hours"
2482
- },
2483
- xHours: {
2484
- one: "1 hour",
2485
- other: "{{count}} hours"
2486
- },
2487
- xDays: {
2488
- one: "1 day",
2489
- other: "{{count}} days"
2490
- },
2491
- aboutXWeeks: {
2492
- one: "about 1 week",
2493
- other: "about {{count}} weeks"
2494
- },
2495
- xWeeks: {
2496
- one: "1 week",
2497
- other: "{{count}} weeks"
2498
- },
2499
- aboutXMonths: {
2500
- one: "about 1 month",
2501
- other: "about {{count}} months"
2502
- },
2503
- xMonths: {
2504
- one: "1 month",
2505
- other: "{{count}} months"
2506
- },
2507
- aboutXYears: {
2508
- one: "about 1 year",
2509
- other: "about {{count}} years"
2510
- },
2511
- xYears: {
2512
- one: "1 year",
2513
- other: "{{count}} years"
2514
- },
2515
- overXYears: {
2516
- one: "over 1 year",
2517
- other: "over {{count}} years"
2518
- },
2519
- almostXYears: {
2520
- one: "almost 1 year",
2521
- other: "almost {{count}} years"
2522
- }
2523
- }, n = function(o, u, s) {
2524
- var d, c = t[o];
2525
- return typeof c == "string" ? d = c : u === 1 ? d = c.one : d = c.other.replace("{{count}}", u.toString()), s != null && s.addSuffix ? s.comparison && s.comparison > 0 ? "in " + d : d + " ago" : d;
2526
- }, a = n;
2527
- e.default = a, r.exports = e.default;
2528
- })(gt, gt.exports)), gt.exports;
2529
- }
2530
- var bt = { exports: {} }, yt = { exports: {} }, cn;
2531
- function Mi() {
2532
- return cn || (cn = 1, (function(r, e) {
2533
- Object.defineProperty(e, "__esModule", {
2534
- value: !0
2535
- }), e.default = t;
2536
- function t(n) {
2537
- return function() {
2538
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = a.width ? String(a.width) : n.defaultWidth, o = n.formats[i] || n.formats[n.defaultWidth];
2539
- return o;
2540
- };
2541
- }
2542
- r.exports = e.default;
2543
- })(yt, yt.exports)), yt.exports;
2544
- }
2545
- var fn;
2546
- function Ei() {
2547
- return fn || (fn = 1, (function(r, e) {
2548
- var t = U().default;
2549
- Object.defineProperty(e, "__esModule", {
2550
- value: !0
2551
- }), e.default = void 0;
2552
- var n = t(/* @__PURE__ */ Mi()), a = {
2553
- full: "EEEE, MMMM do, y",
2554
- long: "MMMM do, y",
2555
- medium: "MMM d, y",
2556
- short: "MM/dd/yyyy"
2557
- }, i = {
2558
- full: "h:mm:ss a zzzz",
2559
- long: "h:mm:ss a z",
2560
- medium: "h:mm:ss a",
2561
- short: "h:mm a"
2562
- }, o = {
2563
- full: "{{date}} 'at' {{time}}",
2564
- long: "{{date}} 'at' {{time}}",
2565
- medium: "{{date}}, {{time}}",
2566
- short: "{{date}}, {{time}}"
2567
- }, u = {
2568
- date: (0, n.default)({
2569
- formats: a,
2570
- defaultWidth: "full"
2571
- }),
2572
- time: (0, n.default)({
2573
- formats: i,
2574
- defaultWidth: "full"
2575
- }),
2576
- dateTime: (0, n.default)({
2577
- formats: o,
2578
- defaultWidth: "full"
2579
- })
2580
- }, s = u;
2581
- e.default = s, r.exports = e.default;
2582
- })(bt, bt.exports)), bt.exports;
2583
- }
2584
- var xt = { exports: {} }, hn;
2585
- function Ni() {
2586
- return hn || (hn = 1, (function(r, e) {
2587
- Object.defineProperty(e, "__esModule", {
2588
- value: !0
2589
- }), e.default = void 0;
2590
- var t = {
2591
- lastWeek: "'last' eeee 'at' p",
2592
- yesterday: "'yesterday at' p",
2593
- today: "'today at' p",
2594
- tomorrow: "'tomorrow at' p",
2595
- nextWeek: "eeee 'at' p",
2596
- other: "P"
2597
- }, n = function(o, u, s, d) {
2598
- return t[o];
2599
- }, a = n;
2600
- e.default = a, r.exports = e.default;
2601
- })(xt, xt.exports)), xt.exports;
2602
- }
2603
- var wt = { exports: {} }, Tt = { exports: {} }, pn;
2604
- function ji() {
2605
- return pn || (pn = 1, (function(r, e) {
2606
- Object.defineProperty(e, "__esModule", {
2607
- value: !0
2608
- }), e.default = t;
2609
- function t(n) {
2610
- return function(a, i) {
2611
- var o = i != null && i.context ? String(i.context) : "standalone", u;
2612
- if (o === "formatting" && n.formattingValues) {
2613
- var s = n.defaultFormattingWidth || n.defaultWidth, d = i != null && i.width ? String(i.width) : s;
2614
- u = n.formattingValues[d] || n.formattingValues[s];
2615
- } else {
2616
- var c = n.defaultWidth, b = i != null && i.width ? String(i.width) : n.defaultWidth;
2617
- u = n.values[b] || n.values[c];
2618
- }
2619
- var _ = n.argumentCallback ? n.argumentCallback(a) : a;
2620
- return u[_];
2621
- };
2622
- }
2623
- r.exports = e.default;
2624
- })(Tt, Tt.exports)), Tt.exports;
2625
- }
2626
- var vn;
2627
- function ki() {
2628
- return vn || (vn = 1, (function(r, e) {
2629
- var t = U().default;
2630
- Object.defineProperty(e, "__esModule", {
2631
- value: !0
2632
- }), e.default = void 0;
2633
- var n = t(/* @__PURE__ */ ji()), a = {
2634
- narrow: ["B", "A"],
2635
- abbreviated: ["BC", "AD"],
2636
- wide: ["Before Christ", "Anno Domini"]
2637
- }, i = {
2638
- narrow: ["1", "2", "3", "4"],
2639
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
2640
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
2641
- }, o = {
2642
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
2643
- abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
2644
- wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
2645
- }, u = {
2646
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
2647
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
2648
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
2649
- wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
2650
- }, s = {
2651
- narrow: {
2652
- am: "a",
2653
- pm: "p",
2654
- midnight: "mi",
2655
- noon: "n",
2656
- morning: "morning",
2657
- afternoon: "afternoon",
2658
- evening: "evening",
2659
- night: "night"
2660
- },
2661
- abbreviated: {
2662
- am: "AM",
2663
- pm: "PM",
2664
- midnight: "midnight",
2665
- noon: "noon",
2666
- morning: "morning",
2667
- afternoon: "afternoon",
2668
- evening: "evening",
2669
- night: "night"
2670
- },
2671
- wide: {
2672
- am: "a.m.",
2673
- pm: "p.m.",
2674
- midnight: "midnight",
2675
- noon: "noon",
2676
- morning: "morning",
2677
- afternoon: "afternoon",
2678
- evening: "evening",
2679
- night: "night"
2680
- }
2681
- }, d = {
2682
- narrow: {
2683
- am: "a",
2684
- pm: "p",
2685
- midnight: "mi",
2686
- noon: "n",
2687
- morning: "in the morning",
2688
- afternoon: "in the afternoon",
2689
- evening: "in the evening",
2690
- night: "at night"
2691
- },
2692
- abbreviated: {
2693
- am: "AM",
2694
- pm: "PM",
2695
- midnight: "midnight",
2696
- noon: "noon",
2697
- morning: "in the morning",
2698
- afternoon: "in the afternoon",
2699
- evening: "in the evening",
2700
- night: "at night"
2701
- },
2702
- wide: {
2703
- am: "a.m.",
2704
- pm: "p.m.",
2705
- midnight: "midnight",
2706
- noon: "noon",
2707
- morning: "in the morning",
2708
- afternoon: "in the afternoon",
2709
- evening: "in the evening",
2710
- night: "at night"
2711
- }
2712
- }, c = function(w, R) {
2713
- var x = Number(w), g = x % 100;
2714
- if (g > 20 || g < 10)
2715
- switch (g % 10) {
2716
- case 1:
2717
- return x + "st";
2718
- case 2:
2719
- return x + "nd";
2720
- case 3:
2721
- return x + "rd";
2722
- }
2723
- return x + "th";
2724
- }, b = {
2725
- ordinalNumber: c,
2726
- era: (0, n.default)({
2727
- values: a,
2728
- defaultWidth: "wide"
2729
- }),
2730
- quarter: (0, n.default)({
2731
- values: i,
2732
- defaultWidth: "wide",
2733
- argumentCallback: function(w) {
2734
- return w - 1;
2735
- }
2736
- }),
2737
- month: (0, n.default)({
2738
- values: o,
2739
- defaultWidth: "wide"
2740
- }),
2741
- day: (0, n.default)({
2742
- values: u,
2743
- defaultWidth: "wide"
2744
- }),
2745
- dayPeriod: (0, n.default)({
2746
- values: s,
2747
- defaultWidth: "wide",
2748
- formattingValues: d,
2749
- defaultFormattingWidth: "wide"
2750
- })
2751
- }, _ = b;
2752
- e.default = _, r.exports = e.default;
2753
- })(wt, wt.exports)), wt.exports;
2754
- }
2755
- var Ct = { exports: {} }, _t = { exports: {} }, mn;
2756
- function Fi() {
2757
- return mn || (mn = 1, (function(r, e) {
2758
- Object.defineProperty(e, "__esModule", {
2759
- value: !0
2760
- }), e.default = t;
2761
- function t(i) {
2762
- return function(o) {
2763
- var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = u.width, d = s && i.matchPatterns[s] || i.matchPatterns[i.defaultMatchWidth], c = o.match(d);
2764
- if (!c)
2765
- return null;
2766
- var b = c[0], _ = s && i.parsePatterns[s] || i.parsePatterns[i.defaultParseWidth], O = Array.isArray(_) ? a(_, function(x) {
2767
- return x.test(b);
2768
- }) : n(_, function(x) {
2769
- return x.test(b);
2770
- }), w;
2771
- w = i.valueCallback ? i.valueCallback(O) : O, w = u.valueCallback ? u.valueCallback(w) : w;
2772
- var R = o.slice(b.length);
2773
- return {
2774
- value: w,
2775
- rest: R
2776
- };
2777
- };
2778
- }
2779
- function n(i, o) {
2780
- for (var u in i)
2781
- if (i.hasOwnProperty(u) && o(i[u]))
2782
- return u;
2783
- }
2784
- function a(i, o) {
2785
- for (var u = 0; u < i.length; u++)
2786
- if (o(i[u]))
2787
- return u;
2788
- }
2789
- r.exports = e.default;
2790
- })(_t, _t.exports)), _t.exports;
2791
- }
2792
- var Ot = { exports: {} }, gn;
2793
- function Ui() {
2794
- return gn || (gn = 1, (function(r, e) {
2795
- Object.defineProperty(e, "__esModule", {
2796
- value: !0
2797
- }), e.default = t;
2798
- function t(n) {
2799
- return function(a) {
2800
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = a.match(n.matchPattern);
2801
- if (!o) return null;
2802
- var u = o[0], s = a.match(n.parsePattern);
2803
- if (!s) return null;
2804
- var d = n.valueCallback ? n.valueCallback(s[0]) : s[0];
2805
- d = i.valueCallback ? i.valueCallback(d) : d;
2806
- var c = a.slice(u.length);
2807
- return {
2808
- value: d,
2809
- rest: c
2810
- };
2811
- };
2812
- }
2813
- r.exports = e.default;
2814
- })(Ot, Ot.exports)), Ot.exports;
2815
- }
2816
- var bn;
2817
- function Wi() {
2818
- return bn || (bn = 1, (function(r, e) {
2819
- var t = U().default;
2820
- Object.defineProperty(e, "__esModule", {
2821
- value: !0
2822
- }), e.default = void 0;
2823
- var n = t(/* @__PURE__ */ Fi()), a = t(/* @__PURE__ */ Ui()), i = /^(\d+)(th|st|nd|rd)?/i, o = /\d+/i, u = {
2824
- narrow: /^(b|a)/i,
2825
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
2826
- wide: /^(before christ|before common era|anno domini|common era)/i
2827
- }, s = {
2828
- any: [/^b/i, /^(a|c)/i]
2829
- }, d = {
2830
- narrow: /^[1234]/i,
2831
- abbreviated: /^q[1234]/i,
2832
- wide: /^[1234](th|st|nd|rd)? quarter/i
2833
- }, c = {
2834
- any: [/1/i, /2/i, /3/i, /4/i]
2835
- }, b = {
2836
- narrow: /^[jfmasond]/i,
2837
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
2838
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
2839
- }, _ = {
2840
- narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
2841
- any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
2842
- }, O = {
2843
- narrow: /^[smtwf]/i,
2844
- short: /^(su|mo|tu|we|th|fr|sa)/i,
2845
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
2846
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
2847
- }, w = {
2848
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
2849
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
2850
- }, R = {
2851
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
2852
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
2853
- }, x = {
2854
- any: {
2855
- am: /^a/i,
2856
- pm: /^p/i,
2857
- midnight: /^mi/i,
2858
- noon: /^no/i,
2859
- morning: /morning/i,
2860
- afternoon: /afternoon/i,
2861
- evening: /evening/i,
2862
- night: /night/i
2863
- }
2864
- }, g = {
2865
- ordinalNumber: (0, a.default)({
2866
- matchPattern: i,
2867
- parsePattern: o,
2868
- valueCallback: function(f) {
2869
- return parseInt(f, 10);
2870
- }
2871
- }),
2872
- era: (0, n.default)({
2873
- matchPatterns: u,
2874
- defaultMatchWidth: "wide",
2875
- parsePatterns: s,
2876
- defaultParseWidth: "any"
2877
- }),
2878
- quarter: (0, n.default)({
2879
- matchPatterns: d,
2880
- defaultMatchWidth: "wide",
2881
- parsePatterns: c,
2882
- defaultParseWidth: "any",
2883
- valueCallback: function(f) {
2884
- return f + 1;
2885
- }
2886
- }),
2887
- month: (0, n.default)({
2888
- matchPatterns: b,
2889
- defaultMatchWidth: "wide",
2890
- parsePatterns: _,
2891
- defaultParseWidth: "any"
2892
- }),
2893
- day: (0, n.default)({
2894
- matchPatterns: O,
2895
- defaultMatchWidth: "wide",
2896
- parsePatterns: w,
2897
- defaultParseWidth: "any"
2898
- }),
2899
- dayPeriod: (0, n.default)({
2900
- matchPatterns: R,
2901
- defaultMatchWidth: "any",
2902
- parsePatterns: x,
2903
- defaultParseWidth: "any"
2904
- })
2905
- }, h = g;
2906
- e.default = h, r.exports = e.default;
2907
- })(Ct, Ct.exports)), Ct.exports;
2908
- }
2909
- var yn;
2910
- function Ai() {
2911
- return yn || (yn = 1, (function(r, e) {
2912
- var t = U().default;
2913
- Object.defineProperty(e, "__esModule", {
2914
- value: !0
2915
- }), e.default = void 0;
2916
- var n = t(/* @__PURE__ */ Ri()), a = t(/* @__PURE__ */ Ei()), i = t(/* @__PURE__ */ Ni()), o = t(/* @__PURE__ */ ki()), u = t(/* @__PURE__ */ Wi()), s = {
2917
- code: "en-US",
2918
- formatDistance: n.default,
2919
- formatLong: a.default,
2920
- formatRelative: i.default,
2921
- localize: o.default,
2922
- match: u.default,
2923
- options: {
2924
- weekStartsOn: 0,
2925
- firstWeekContainsDate: 1
2926
- }
2927
- }, d = s;
2928
- e.default = d, r.exports = e.default;
2929
- })(mt, mt.exports)), mt.exports;
2930
- }
2931
- var xn;
2932
- function qi() {
2933
- return xn || (xn = 1, (function(r, e) {
2934
- var t = U().default;
2935
- Object.defineProperty(e, "__esModule", {
2936
- value: !0
2937
- }), e.default = void 0;
2938
- var n = t(/* @__PURE__ */ Ai()), a = n.default;
2939
- e.default = a, r.exports = e.default;
2940
- })(vt, vt.exports)), vt.exports;
2941
- }
2942
- var wn;
2943
- function Yi() {
2944
- return wn || (wn = 1, (function(r, e) {
2945
- var t = U().default;
2946
- Object.defineProperty(e, "__esModule", {
2947
- value: !0
2948
- }), e.default = p;
2949
- var n = t(/* @__PURE__ */ bi()), a = t(/* @__PURE__ */ xi()), i = t(/* @__PURE__ */ oe()), o = t(/* @__PURE__ */ Ii()), u = t(/* @__PURE__ */ Pi()), s = t(/* @__PURE__ */ ra()), d = /* @__PURE__ */ Si(), c = t(/* @__PURE__ */ me()), b = t(/* @__PURE__ */ X()), _ = /* @__PURE__ */ qt(), O = t(/* @__PURE__ */ qi()), w = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, R = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, x = /^'([^]*?)'?$/, g = /''/g, h = /[a-zA-Z]/;
2950
- function p(v, C, I) {
2951
- var D, S, N, Y, H, W, z, B, F, A, Z, re, ge, be, ye, xe, Pe, Se;
2952
- (0, b.default)(2, arguments);
2953
- var Re = String(C), se = (0, _.getDefaultOptions)(), ie = (D = (S = I?.locale) !== null && S !== void 0 ? S : se.locale) !== null && D !== void 0 ? D : O.default, fe = (0, c.default)((N = (Y = (H = (W = I?.firstWeekContainsDate) !== null && W !== void 0 ? W : I == null || (z = I.locale) === null || z === void 0 || (B = z.options) === null || B === void 0 ? void 0 : B.firstWeekContainsDate) !== null && H !== void 0 ? H : se.firstWeekContainsDate) !== null && Y !== void 0 ? Y : (F = se.locale) === null || F === void 0 || (A = F.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && N !== void 0 ? N : 1);
2954
- if (!(fe >= 1 && fe <= 7))
2955
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
2956
- var ce = (0, c.default)((Z = (re = (ge = (be = I?.weekStartsOn) !== null && be !== void 0 ? be : I == null || (ye = I.locale) === null || ye === void 0 || (xe = ye.options) === null || xe === void 0 ? void 0 : xe.weekStartsOn) !== null && ge !== void 0 ? ge : se.weekStartsOn) !== null && re !== void 0 ? re : (Pe = se.locale) === null || Pe === void 0 || (Se = Pe.options) === null || Se === void 0 ? void 0 : Se.weekStartsOn) !== null && Z !== void 0 ? Z : 0);
2957
- if (!(ce >= 0 && ce <= 6))
2958
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
2959
- if (!ie.localize)
2960
- throw new RangeError("locale must contain localize property");
2961
- if (!ie.formatLong)
2962
- throw new RangeError("locale must contain formatLong property");
2963
- var we = (0, i.default)(v);
2964
- if (!(0, n.default)(we))
2965
- throw new RangeError("Invalid time value");
2966
- var Le = (0, s.default)(we), Lt = (0, a.default)(we, Le), $t = {
2967
- firstWeekContainsDate: fe,
2968
- weekStartsOn: ce,
2969
- locale: ie,
2970
- _originalDate: we
2971
- }, Te = Re.match(R).map(function($) {
2972
- var ne = $[0];
2973
- if (ne === "p" || ne === "P") {
2974
- var he = u.default[ne];
2975
- return he($, ie.formatLong);
2976
- }
2977
- return $;
2978
- }).join("").match(w).map(function($) {
2979
- if ($ === "''")
2980
- return "'";
2981
- var ne = $[0];
2982
- if (ne === "'")
2983
- return f($);
2984
- var he = o.default[ne];
2985
- if (he)
2986
- return !(I != null && I.useAdditionalWeekYearTokens) && (0, d.isProtectedWeekYearToken)($) && (0, d.throwProtectedError)($, C, String(v)), !(I != null && I.useAdditionalDayOfYearTokens) && (0, d.isProtectedDayOfYearToken)($) && (0, d.throwProtectedError)($, C, String(v)), he(Lt, $, ie.localize, $t);
2987
- if (ne.match(h))
2988
- throw new RangeError("Format string contains an unescaped latin alphabet character `" + ne + "`");
2989
- return $;
2990
- }).join("");
2991
- return Te;
2992
- }
2993
- function f(v) {
2994
- var C = v.match(x);
2995
- return C ? C[1].replace(g, "'") : v;
2996
- }
2997
- r.exports = e.default;
2998
- })(Ve, Ve.exports)), Ve.exports;
2999
- }
3000
- var Li = /* @__PURE__ */ Yi();
3001
- const $i = /* @__PURE__ */ Ae(Li);
3002
- function Tn(r, e, t) {
3003
- var n = Qi(r, t.timeZone, t.locale);
3004
- return n.formatToParts ? Hi(n, e) : zi(n, e);
3005
- }
3006
- function Hi(r, e) {
3007
- for (var t = r.formatToParts(e), n = t.length - 1; n >= 0; --n)
3008
- if (t[n].type === "timeZoneName")
3009
- return t[n].value;
3010
- }
3011
- function zi(r, e) {
3012
- var t = r.format(e).replace(/\u200E/g, ""), n = / [\w-+ ]+$/.exec(t);
3013
- return n ? n[0].substr(1) : "";
3014
- }
3015
- function Qi(r, e, t) {
3016
- if (t && !t.code)
3017
- throw new Error(
3018
- "date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`"
3019
- );
3020
- return new Intl.DateTimeFormat(t ? [t.code, "en-US"] : void 0, {
3021
- timeZone: e,
3022
- timeZoneName: r
3023
- });
3024
- }
3025
- function Vi(r, e) {
3026
- var t = Gi(e);
3027
- return t.formatToParts ? Xi(t, r) : Bi(t, r);
3028
- }
3029
- var Ki = {
3030
- year: 0,
3031
- month: 1,
3032
- day: 2,
3033
- hour: 3,
3034
- minute: 4,
3035
- second: 5
3036
- };
3037
- function Xi(r, e) {
3038
- try {
3039
- for (var t = r.formatToParts(e), n = [], a = 0; a < t.length; a++) {
3040
- var i = Ki[t[a].type];
3041
- i >= 0 && (n[i] = parseInt(t[a].value, 10));
3042
- }
3043
- return n;
3044
- } catch (o) {
3045
- if (o instanceof RangeError)
3046
- return [NaN];
3047
- throw o;
3048
- }
3049
- }
3050
- function Bi(r, e) {
3051
- var t = r.format(e), n = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);
3052
- return [n[3], n[1], n[2], n[4], n[5], n[6]];
3053
- }
3054
- var tr = {};
3055
- function Gi(r) {
3056
- if (!tr[r]) {
3057
- var e = new Intl.DateTimeFormat("en-US", {
3058
- hourCycle: "h23",
3059
- timeZone: "America/New_York",
3060
- year: "numeric",
3061
- month: "2-digit",
3062
- day: "2-digit",
3063
- hour: "2-digit",
3064
- minute: "2-digit",
3065
- second: "2-digit"
3066
- }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), t = e === "06/25/2014, 00:00:00" || e === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
3067
- tr[r] = t ? new Intl.DateTimeFormat("en-US", {
3068
- hourCycle: "h23",
3069
- timeZone: r,
3070
- year: "numeric",
3071
- month: "numeric",
3072
- day: "2-digit",
3073
- hour: "2-digit",
3074
- minute: "2-digit",
3075
- second: "2-digit"
3076
- }) : new Intl.DateTimeFormat("en-US", {
3077
- hour12: !1,
3078
- timeZone: r,
3079
- year: "numeric",
3080
- month: "numeric",
3081
- day: "2-digit",
3082
- hour: "2-digit",
3083
- minute: "2-digit",
3084
- second: "2-digit"
3085
- });
3086
- }
3087
- return tr[r];
3088
- }
3089
- function na(r, e, t, n, a, i, o) {
3090
- var u = /* @__PURE__ */ new Date(0);
3091
- return u.setUTCFullYear(r, e, t), u.setUTCHours(n, a, i, o), u;
3092
- }
3093
- var Cn = 36e5, Zi = 6e4, rr = {
3094
- timezoneZ: /^(Z)$/,
3095
- timezoneHH: /^([+-]\d{2})$/,
3096
- timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
3097
- };
3098
- function pr(r, e, t) {
3099
- var n, a;
3100
- if (!r || (n = rr.timezoneZ.exec(r), n))
3101
- return 0;
3102
- var i;
3103
- if (n = rr.timezoneHH.exec(r), n)
3104
- return i = parseInt(n[1], 10), _n(i) ? -(i * Cn) : NaN;
3105
- if (n = rr.timezoneHHMM.exec(r), n) {
3106
- i = parseInt(n[2], 10);
3107
- var o = parseInt(n[3], 10);
3108
- return _n(i, o) ? (a = Math.abs(i) * Cn + o * Zi, n[1] === "+" ? -a : a) : NaN;
3109
- }
3110
- if (to(r)) {
3111
- e = new Date(e || Date.now());
3112
- var u = t ? e : Ji(e), s = lr(u, r), d = t ? s : eo(e, s, r);
3113
- return -d;
3114
- }
3115
- return NaN;
3116
- }
3117
- function Ji(r) {
3118
- return na(
3119
- r.getFullYear(),
3120
- r.getMonth(),
3121
- r.getDate(),
3122
- r.getHours(),
3123
- r.getMinutes(),
3124
- r.getSeconds(),
3125
- r.getMilliseconds()
3126
- );
3127
- }
3128
- function lr(r, e) {
3129
- var t = Vi(r, e), n = na(
3130
- t[0],
3131
- t[1] - 1,
3132
- t[2],
3133
- t[3] % 24,
3134
- t[4],
3135
- t[5],
3136
- 0
3137
- ).getTime(), a = r.getTime(), i = a % 1e3;
3138
- return a -= i >= 0 ? i : 1e3 + i, n - a;
3139
- }
3140
- function eo(r, e, t) {
3141
- var n = r.getTime(), a = n - e, i = lr(new Date(a), t);
3142
- if (e === i)
3143
- return e;
3144
- a -= i - e;
3145
- var o = lr(new Date(a), t);
3146
- return i === o ? i : Math.max(i, o);
3147
- }
3148
- function _n(r, e) {
3149
- return -23 <= r && r <= 23 && (e == null || 0 <= e && e <= 59);
3150
- }
3151
- var On = {};
3152
- function to(r) {
3153
- if (On[r]) return !0;
3154
- try {
3155
- return new Intl.DateTimeFormat(void 0, { timeZone: r }), On[r] = !0, !0;
3156
- } catch {
3157
- return !1;
3158
- }
3159
- }
3160
- var ro = 60 * 1e3, no = {
3161
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
3162
- X: function(r, e, t, n) {
3163
- var a = nr(n.timeZone, r);
3164
- if (a === 0)
3165
- return "Z";
3166
- switch (e) {
3167
- // Hours and optional minutes
3168
- case "X":
3169
- return Dn(a);
3170
- // Hours, minutes and optional seconds without `:` delimeter
3171
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
3172
- // so this token always has the same output as `XX`
3173
- case "XXXX":
3174
- case "XX":
3175
- return De(a);
3176
- // Hours and minutes with `:` delimeter
3177
- default:
3178
- return De(a, ":");
3179
- }
3180
- },
3181
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
3182
- x: function(r, e, t, n) {
3183
- var a = nr(n.timeZone, r);
3184
- switch (e) {
3185
- // Hours and optional minutes
3186
- case "x":
3187
- return Dn(a);
3188
- // Hours, minutes and optional seconds without `:` delimeter
3189
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
3190
- // so this token always has the same output as `xx`
3191
- case "xxxx":
3192
- case "xx":
3193
- return De(a);
3194
- // Hours and minutes with `:` delimeter
3195
- default:
3196
- return De(a, ":");
3197
- }
3198
- },
3199
- // Timezone (GMT)
3200
- O: function(r, e, t, n) {
3201
- var a = nr(n.timeZone, r);
3202
- switch (e) {
3203
- // Short
3204
- case "O":
3205
- case "OO":
3206
- case "OOO":
3207
- return "GMT" + ao(a, ":");
3208
- default:
3209
- return "GMT" + De(a, ":");
3210
- }
3211
- },
3212
- // Timezone (specific non-location)
3213
- z: function(r, e, t, n) {
3214
- switch (e) {
3215
- // Short
3216
- case "z":
3217
- case "zz":
3218
- case "zzz":
3219
- return Tn("short", r, n);
3220
- default:
3221
- return Tn("long", r, n);
3222
- }
3223
- }
3224
- };
3225
- function nr(r, e) {
3226
- var t = r ? pr(r, e, !0) / ro : e.getTimezoneOffset();
3227
- if (Number.isNaN(t))
3228
- throw new RangeError("Invalid time zone specified: " + r);
3229
- return t;
3230
- }
3231
- function Nt(r, e) {
3232
- for (var t = r < 0 ? "-" : "", n = Math.abs(r).toString(); n.length < e; )
3233
- n = "0" + n;
3234
- return t + n;
3235
- }
3236
- function De(r, e) {
3237
- var t = e || "", n = r > 0 ? "-" : "+", a = Math.abs(r), i = Nt(Math.floor(a / 60), 2), o = Nt(Math.floor(a % 60), 2);
3238
- return n + i + t + o;
3239
- }
3240
- function Dn(r, e) {
3241
- if (r % 60 === 0) {
3242
- var t = r > 0 ? "-" : "+";
3243
- return t + Nt(Math.abs(r) / 60, 2);
3244
- }
3245
- return De(r, e);
3246
- }
3247
- function ao(r, e) {
3248
- var t = r > 0 ? "-" : "+", n = Math.abs(r), a = Math.floor(n / 60), i = n % 60;
3249
- if (i === 0)
3250
- return t + String(a);
3251
- var o = e;
3252
- return t + String(a) + o + Nt(i, 2);
3253
- }
3254
- var io = /* @__PURE__ */ me();
3255
- const oo = /* @__PURE__ */ Ae(io);
3256
- var so = /* @__PURE__ */ ra();
3257
- const In = /* @__PURE__ */ Ae(so);
3258
- var uo = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, ar = 36e5, Pn = 6e4, lo = 2, K = {
3259
- dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
3260
- datePattern: /^([0-9W+-]+)(.*)/,
3261
- // year tokens
3262
- YY: /^(\d{2})$/,
3263
- YYY: [
3264
- /^([+-]\d{2})$/,
3265
- // 0 additional digits
3266
- /^([+-]\d{3})$/,
3267
- // 1 additional digit
3268
- /^([+-]\d{4})$/
3269
- // 2 additional digits
3270
- ],
3271
- YYYY: /^(\d{4})/,
3272
- YYYYY: [
3273
- /^([+-]\d{4})/,
3274
- // 0 additional digits
3275
- /^([+-]\d{5})/,
3276
- // 1 additional digit
3277
- /^([+-]\d{6})/
3278
- // 2 additional digits
3279
- ],
3280
- // date tokens
3281
- MM: /^-(\d{2})$/,
3282
- DDD: /^-?(\d{3})$/,
3283
- MMDD: /^-?(\d{2})-?(\d{2})$/,
3284
- Www: /^-?W(\d{2})$/,
3285
- WwwD: /^-?W(\d{2})-?(\d{1})$/,
3286
- HH: /^(\d{2}([.,]\d*)?)$/,
3287
- HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
3288
- HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
3289
- // time zone tokens (to identify the presence of a tz)
3290
- timeZone: uo
3291
- };
3292
- function aa(r, e) {
3293
- if (arguments.length < 1)
3294
- throw new TypeError("1 argument required, but only " + arguments.length + " present");
3295
- if (r === null)
3296
- return /* @__PURE__ */ new Date(NaN);
3297
- var t = e || {}, n = t.additionalDigits == null ? lo : oo(t.additionalDigits);
3298
- if (n !== 2 && n !== 1 && n !== 0)
3299
- throw new RangeError("additionalDigits must be 0, 1 or 2");
3300
- if (r instanceof Date || typeof r == "object" && Object.prototype.toString.call(r) === "[object Date]")
3301
- return new Date(r.getTime());
3302
- if (typeof r == "number" || Object.prototype.toString.call(r) === "[object Number]")
3303
- return new Date(r);
3304
- if (!(typeof r == "string" || Object.prototype.toString.call(r) === "[object String]"))
3305
- return /* @__PURE__ */ new Date(NaN);
3306
- var a = co(r), i = fo(a.date, n), o = i.year, u = i.restDateString, s = ho(u, o);
3307
- if (isNaN(s))
3308
- return /* @__PURE__ */ new Date(NaN);
3309
- if (s) {
3310
- var d = s.getTime(), c = 0, b;
3311
- if (a.time && (c = po(a.time), isNaN(c)))
3312
- return /* @__PURE__ */ new Date(NaN);
3313
- if (a.timeZone || t.timeZone) {
3314
- if (b = pr(a.timeZone || t.timeZone, new Date(d + c)), isNaN(b))
3315
- return /* @__PURE__ */ new Date(NaN);
3316
- } else
3317
- b = In(new Date(d + c)), b = In(new Date(d + c + b));
3318
- return new Date(d + c + b);
3319
- } else
3320
- return /* @__PURE__ */ new Date(NaN);
3321
- }
3322
- function co(r) {
3323
- var e = {}, t = K.dateTimePattern.exec(r), n;
3324
- if (t ? (e.date = t[1], n = t[3]) : (t = K.datePattern.exec(r), t ? (e.date = t[1], n = t[2]) : (e.date = null, n = r)), n) {
3325
- var a = K.timeZone.exec(n);
3326
- a ? (e.time = n.replace(a[1], ""), e.timeZone = a[1].trim()) : e.time = n;
3327
- }
3328
- return e;
3329
- }
3330
- function fo(r, e) {
3331
- var t = K.YYY[e], n = K.YYYYY[e], a;
3332
- if (a = K.YYYY.exec(r) || n.exec(r), a) {
3333
- var i = a[1];
3334
- return {
3335
- year: parseInt(i, 10),
3336
- restDateString: r.slice(i.length)
3337
- };
3338
- }
3339
- if (a = K.YY.exec(r) || t.exec(r), a) {
3340
- var o = a[1];
3341
- return {
3342
- year: parseInt(o, 10) * 100,
3343
- restDateString: r.slice(o.length)
3344
- };
3345
- }
3346
- return {
3347
- year: null
3348
- };
3349
- }
3350
- function ho(r, e) {
3351
- if (e === null)
3352
- return null;
3353
- var t, n, a, i;
3354
- if (r.length === 0)
3355
- return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(e), n;
3356
- if (t = K.MM.exec(r), t)
3357
- return n = /* @__PURE__ */ new Date(0), a = parseInt(t[1], 10) - 1, Rn(e, a) ? (n.setUTCFullYear(e, a), n) : /* @__PURE__ */ new Date(NaN);
3358
- if (t = K.DDD.exec(r), t) {
3359
- n = /* @__PURE__ */ new Date(0);
3360
- var o = parseInt(t[1], 10);
3361
- return go(e, o) ? (n.setUTCFullYear(e, 0, o), n) : /* @__PURE__ */ new Date(NaN);
3362
- }
3363
- if (t = K.MMDD.exec(r), t) {
3364
- n = /* @__PURE__ */ new Date(0), a = parseInt(t[1], 10) - 1;
3365
- var u = parseInt(t[2], 10);
3366
- return Rn(e, a, u) ? (n.setUTCFullYear(e, a, u), n) : /* @__PURE__ */ new Date(NaN);
3367
- }
3368
- if (t = K.Www.exec(r), t)
3369
- return i = parseInt(t[1], 10) - 1, Mn(e, i) ? Sn(e, i) : /* @__PURE__ */ new Date(NaN);
3370
- if (t = K.WwwD.exec(r), t) {
3371
- i = parseInt(t[1], 10) - 1;
3372
- var s = parseInt(t[2], 10) - 1;
3373
- return Mn(e, i, s) ? Sn(e, i, s) : /* @__PURE__ */ new Date(NaN);
3374
- }
3375
- return null;
3376
- }
3377
- function po(r) {
3378
- var e, t, n;
3379
- if (e = K.HH.exec(r), e)
3380
- return t = parseFloat(e[1].replace(",", ".")), ir(t) ? t % 24 * ar : NaN;
3381
- if (e = K.HHMM.exec(r), e)
3382
- return t = parseInt(e[1], 10), n = parseFloat(e[2].replace(",", ".")), ir(t, n) ? t % 24 * ar + n * Pn : NaN;
3383
- if (e = K.HHMMSS.exec(r), e) {
3384
- t = parseInt(e[1], 10), n = parseInt(e[2], 10);
3385
- var a = parseFloat(e[3].replace(",", "."));
3386
- return ir(t, n, a) ? t % 24 * ar + n * Pn + a * 1e3 : NaN;
3387
- }
3388
- return null;
3389
- }
3390
- function Sn(r, e, t) {
3391
- e = e || 0, t = t || 0;
3392
- var n = /* @__PURE__ */ new Date(0);
3393
- n.setUTCFullYear(r, 0, 4);
3394
- var a = n.getUTCDay() || 7, i = e * 7 + t + 1 - a;
3395
- return n.setUTCDate(n.getUTCDate() + i), n;
3396
- }
3397
- var vo = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], mo = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
3398
- function ia(r) {
3399
- return r % 400 === 0 || r % 4 === 0 && r % 100 !== 0;
3400
- }
3401
- function Rn(r, e, t) {
3402
- if (e < 0 || e > 11)
3403
- return !1;
3404
- if (t != null) {
3405
- if (t < 1)
3406
- return !1;
3407
- var n = ia(r);
3408
- if (n && t > mo[e] || !n && t > vo[e])
3409
- return !1;
3410
- }
3411
- return !0;
3412
- }
3413
- function go(r, e) {
3414
- if (e < 1)
3415
- return !1;
3416
- var t = ia(r);
3417
- return !(t && e > 366 || !t && e > 365);
3418
- }
3419
- function Mn(r, e, t) {
3420
- return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
3421
- }
3422
- function ir(r, e, t) {
3423
- return !(r != null && (r < 0 || r >= 25) || e != null && (e < 0 || e >= 60) || t != null && (t < 0 || t >= 60));
3424
- }
3425
- var bo = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
3426
- function yo(r, e, t) {
3427
- var n = String(e), a = t || {}, i = n.match(bo);
3428
- if (i) {
3429
- var o = aa(a.originalDate || r, a);
3430
- n = i.reduce(function(u, s) {
3431
- if (s[0] === "'")
3432
- return u;
3433
- var d = u.indexOf(s), c = u[d - 1] === "'", b = u.replace(
3434
- s,
3435
- "'" + no[s[0]](o, s, null, a) + "'"
3436
- );
3437
- return c ? b.substring(0, d - 1) + b.substring(d + 1) : b;
3438
- }, n);
3439
- }
3440
- return $i(r, n, a);
3441
- }
3442
- var Dt = { exports: {} }, It = { exports: {} }, En;
3443
- function xo() {
3444
- return En || (En = 1, (function(r, e) {
3445
- Object.defineProperty(e, "__esModule", {
3446
- value: !0
3447
- }), e.default = t;
3448
- function t(n, a) {
3449
- if (n == null)
3450
- throw new TypeError("assign requires that input parameter not be null or undefined");
3451
- for (var i in a)
3452
- Object.prototype.hasOwnProperty.call(a, i) && (n[i] = a[i]);
3453
- return n;
3454
- }
3455
- r.exports = e.default;
3456
- })(It, It.exports)), It.exports;
3457
- }
3458
- var Nn;
3459
- function wo() {
3460
- return Nn || (Nn = 1, (function(r, e) {
3461
- var t = U().default;
3462
- Object.defineProperty(e, "__esModule", {
3463
- value: !0
3464
- }), e.default = a;
3465
- var n = t(/* @__PURE__ */ xo());
3466
- function a(i) {
3467
- return (0, n.default)({}, i);
3468
- }
3469
- r.exports = e.default;
3470
- })(Dt, Dt.exports)), Dt.exports;
3471
- }
3472
- var To = /* @__PURE__ */ wo();
3473
- const Co = /* @__PURE__ */ Ae(To);
3474
- function _o(r, e, t) {
3475
- var n = aa(r, t), a = pr(e, n, !0), i = new Date(n.getTime() - a), o = /* @__PURE__ */ new Date(0);
3476
- return o.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), o.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), o;
3477
- }
3478
- function Oo(r, e, t, n) {
3479
- var a = Co(n);
3480
- return a.timeZone = e, a.originalDate = r, yo(_o(r, e), t, a);
3481
- }
3482
- function or(r) {
3483
- return function() {
3484
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.width ? String(e.width) : r.defaultWidth, n = r.formats[t] || r.formats[r.defaultWidth];
3485
- return n;
3486
- };
3487
- }
3488
- function ke(r) {
3489
- return function(e, t) {
3490
- var n = t != null && t.context ? String(t.context) : "standalone", a;
3491
- if (n === "formatting" && r.formattingValues) {
3492
- var i = r.defaultFormattingWidth || r.defaultWidth, o = t != null && t.width ? String(t.width) : i;
3493
- a = r.formattingValues[o] || r.formattingValues[i];
3494
- } else {
3495
- var u = r.defaultWidth, s = t != null && t.width ? String(t.width) : r.defaultWidth;
3496
- a = r.values[s] || r.values[u];
3497
- }
3498
- var d = r.argumentCallback ? r.argumentCallback(e) : e;
3499
- return a[d];
3500
- };
3501
- }
3502
- function Fe(r) {
3503
- return function(e) {
3504
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.width, a = n && r.matchPatterns[n] || r.matchPatterns[r.defaultMatchWidth], i = e.match(a);
3505
- if (!i)
3506
- return null;
3507
- var o = i[0], u = n && r.parsePatterns[n] || r.parsePatterns[r.defaultParseWidth], s = Array.isArray(u) ? Io(u, function(b) {
3508
- return b.test(o);
3509
- }) : Do(u, function(b) {
3510
- return b.test(o);
3511
- }), d;
3512
- d = r.valueCallback ? r.valueCallback(s) : s, d = t.valueCallback ? t.valueCallback(d) : d;
3513
- var c = e.slice(o.length);
3514
- return {
3515
- value: d,
3516
- rest: c
3517
- };
3518
- };
3519
- }
3520
- function Do(r, e) {
3521
- for (var t in r)
3522
- if (r.hasOwnProperty(t) && e(r[t]))
3523
- return t;
3524
- }
3525
- function Io(r, e) {
3526
- for (var t = 0; t < r.length; t++)
3527
- if (e(r[t]))
3528
- return t;
3529
- }
3530
- function Po(r) {
3531
- return function(e) {
3532
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.match(r.matchPattern);
3533
- if (!n) return null;
3534
- var a = n[0], i = e.match(r.parsePattern);
3535
- if (!i) return null;
3536
- var o = r.valueCallback ? r.valueCallback(i[0]) : i[0];
3537
- o = t.valueCallback ? t.valueCallback(o) : o;
3538
- var u = e.slice(a.length);
3539
- return {
3540
- value: o,
3541
- rest: u
3542
- };
3543
- };
3544
- }
3545
- function jt(r) {
3546
- "@babel/helpers - typeof";
3547
- return jt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
3548
- return typeof e;
3549
- } : function(e) {
3550
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
3551
- }, jt(r);
3552
- }
3553
- function So(r) {
3554
- if (r === null || r === !0 || r === !1)
3555
- return NaN;
3556
- var e = Number(r);
3557
- return isNaN(e) ? e : e < 0 ? Math.ceil(e) : Math.floor(e);
3558
- }
3559
- function Yt(r, e) {
3560
- if (e.length < r)
3561
- throw new TypeError(r + " argument required, but only " + e.length + " present");
3562
- }
3563
- function Ro(r) {
3564
- Yt(1, arguments);
3565
- var e = Object.prototype.toString.call(r);
3566
- return r instanceof Date || jt(r) === "object" && e === "[object Date]" ? new Date(r.getTime()) : typeof r == "number" || e === "[object Number]" ? new Date(r) : ((typeof r == "string" || e === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
3567
- }
3568
- var oa = 6e4, sa = 36e5;
3569
- function Mo(r) {
3570
- return Yt(1, arguments), r instanceof Date || jt(r) === "object" && Object.prototype.toString.call(r) === "[object Date]";
3571
- }
3572
- function Eo(r) {
3573
- if (Yt(1, arguments), !Mo(r) && typeof r != "number")
3574
- return !1;
3575
- var e = Ro(r);
3576
- return !isNaN(Number(e));
3577
- }
3578
- var No = {
3579
- lessThanXSeconds: {
3580
- one: "less than a second",
3581
- other: "less than {{count}} seconds"
3582
- },
3583
- xSeconds: {
3584
- one: "1 second",
3585
- other: "{{count}} seconds"
3586
- },
3587
- halfAMinute: "half a minute",
3588
- lessThanXMinutes: {
3589
- one: "less than a minute",
3590
- other: "less than {{count}} minutes"
3591
- },
3592
- xMinutes: {
3593
- one: "1 minute",
3594
- other: "{{count}} minutes"
3595
- },
3596
- aboutXHours: {
3597
- one: "about 1 hour",
3598
- other: "about {{count}} hours"
3599
- },
3600
- xHours: {
3601
- one: "1 hour",
3602
- other: "{{count}} hours"
3603
- },
3604
- xDays: {
3605
- one: "1 day",
3606
- other: "{{count}} days"
3607
- },
3608
- aboutXWeeks: {
3609
- one: "about 1 week",
3610
- other: "about {{count}} weeks"
3611
- },
3612
- xWeeks: {
3613
- one: "1 week",
3614
- other: "{{count}} weeks"
3615
- },
3616
- aboutXMonths: {
3617
- one: "about 1 month",
3618
- other: "about {{count}} months"
3619
- },
3620
- xMonths: {
3621
- one: "1 month",
3622
- other: "{{count}} months"
3623
- },
3624
- aboutXYears: {
3625
- one: "about 1 year",
3626
- other: "about {{count}} years"
3627
- },
3628
- xYears: {
3629
- one: "1 year",
3630
- other: "{{count}} years"
3631
- },
3632
- overXYears: {
3633
- one: "over 1 year",
3634
- other: "over {{count}} years"
3635
- },
3636
- almostXYears: {
3637
- one: "almost 1 year",
3638
- other: "almost {{count}} years"
3639
- }
3640
- }, jo = function(e, t, n) {
3641
- var a, i = No[e];
3642
- return typeof i == "string" ? a = i : t === 1 ? a = i.one : a = i.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + a : a + " ago" : a;
3643
- }, ko = {
3644
- full: "EEEE, MMMM do, y",
3645
- long: "MMMM do, y",
3646
- medium: "MMM d, y",
3647
- short: "MM/dd/yyyy"
3648
- }, Fo = {
3649
- full: "h:mm:ss a zzzz",
3650
- long: "h:mm:ss a z",
3651
- medium: "h:mm:ss a",
3652
- short: "h:mm a"
3653
- }, Uo = {
3654
- full: "{{date}} 'at' {{time}}",
3655
- long: "{{date}} 'at' {{time}}",
3656
- medium: "{{date}}, {{time}}",
3657
- short: "{{date}}, {{time}}"
3658
- }, Wo = {
3659
- date: or({
3660
- formats: ko,
3661
- defaultWidth: "full"
3662
- }),
3663
- time: or({
3664
- formats: Fo,
3665
- defaultWidth: "full"
3666
- }),
3667
- dateTime: or({
3668
- formats: Uo,
3669
- defaultWidth: "full"
3670
- })
3671
- }, Ao = {
3672
- lastWeek: "'last' eeee 'at' p",
3673
- yesterday: "'yesterday at' p",
3674
- today: "'today at' p",
3675
- tomorrow: "'tomorrow at' p",
3676
- nextWeek: "eeee 'at' p",
3677
- other: "P"
3678
- }, qo = function(e, t, n, a) {
3679
- return Ao[e];
3680
- }, Yo = {
3681
- narrow: ["B", "A"],
3682
- abbreviated: ["BC", "AD"],
3683
- wide: ["Before Christ", "Anno Domini"]
3684
- }, Lo = {
3685
- narrow: ["1", "2", "3", "4"],
3686
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
3687
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
3688
- }, $o = {
3689
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
3690
- abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
3691
- wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
3692
- }, Ho = {
3693
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
3694
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
3695
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
3696
- wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
3697
- }, zo = {
3698
- narrow: {
3699
- am: "a",
3700
- pm: "p",
3701
- midnight: "mi",
3702
- noon: "n",
3703
- morning: "morning",
3704
- afternoon: "afternoon",
3705
- evening: "evening",
3706
- night: "night"
3707
- },
3708
- abbreviated: {
3709
- am: "AM",
3710
- pm: "PM",
3711
- midnight: "midnight",
3712
- noon: "noon",
3713
- morning: "morning",
3714
- afternoon: "afternoon",
3715
- evening: "evening",
3716
- night: "night"
3717
- },
3718
- wide: {
3719
- am: "a.m.",
3720
- pm: "p.m.",
3721
- midnight: "midnight",
3722
- noon: "noon",
3723
- morning: "morning",
3724
- afternoon: "afternoon",
3725
- evening: "evening",
3726
- night: "night"
3727
- }
3728
- }, Qo = {
3729
- narrow: {
3730
- am: "a",
3731
- pm: "p",
3732
- midnight: "mi",
3733
- noon: "n",
3734
- morning: "in the morning",
3735
- afternoon: "in the afternoon",
3736
- evening: "in the evening",
3737
- night: "at night"
3738
- },
3739
- abbreviated: {
3740
- am: "AM",
3741
- pm: "PM",
3742
- midnight: "midnight",
3743
- noon: "noon",
3744
- morning: "in the morning",
3745
- afternoon: "in the afternoon",
3746
- evening: "in the evening",
3747
- night: "at night"
3748
- },
3749
- wide: {
3750
- am: "a.m.",
3751
- pm: "p.m.",
3752
- midnight: "midnight",
3753
- noon: "noon",
3754
- morning: "in the morning",
3755
- afternoon: "in the afternoon",
3756
- evening: "in the evening",
3757
- night: "at night"
3758
- }
3759
- }, Vo = function(e, t) {
3760
- var n = Number(e), a = n % 100;
3761
- if (a > 20 || a < 10)
3762
- switch (a % 10) {
3763
- case 1:
3764
- return n + "st";
3765
- case 2:
3766
- return n + "nd";
3767
- case 3:
3768
- return n + "rd";
3769
- }
3770
- return n + "th";
3771
- }, Ko = {
3772
- ordinalNumber: Vo,
3773
- era: ke({
3774
- values: Yo,
3775
- defaultWidth: "wide"
3776
- }),
3777
- quarter: ke({
3778
- values: Lo,
3779
- defaultWidth: "wide",
3780
- argumentCallback: function(e) {
3781
- return e - 1;
3782
- }
3783
- }),
3784
- month: ke({
3785
- values: $o,
3786
- defaultWidth: "wide"
3787
- }),
3788
- day: ke({
3789
- values: Ho,
3790
- defaultWidth: "wide"
3791
- }),
3792
- dayPeriod: ke({
3793
- values: zo,
3794
- defaultWidth: "wide",
3795
- formattingValues: Qo,
3796
- defaultFormattingWidth: "wide"
3797
- })
3798
- }, Xo = /^(\d+)(th|st|nd|rd)?/i, Bo = /\d+/i, Go = {
3799
- narrow: /^(b|a)/i,
3800
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
3801
- wide: /^(before christ|before common era|anno domini|common era)/i
3802
- }, Zo = {
3803
- any: [/^b/i, /^(a|c)/i]
3804
- }, Jo = {
3805
- narrow: /^[1234]/i,
3806
- abbreviated: /^q[1234]/i,
3807
- wide: /^[1234](th|st|nd|rd)? quarter/i
3808
- }, es = {
3809
- any: [/1/i, /2/i, /3/i, /4/i]
3810
- }, ts = {
3811
- narrow: /^[jfmasond]/i,
3812
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
3813
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
3814
- }, rs = {
3815
- narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
3816
- any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
3817
- }, ns = {
3818
- narrow: /^[smtwf]/i,
3819
- short: /^(su|mo|tu|we|th|fr|sa)/i,
3820
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
3821
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
3822
- }, as = {
3823
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
3824
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
3825
- }, is = {
3826
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
3827
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
3828
- }, os = {
3829
- any: {
3830
- am: /^a/i,
3831
- pm: /^p/i,
3832
- midnight: /^mi/i,
3833
- noon: /^no/i,
3834
- morning: /morning/i,
3835
- afternoon: /afternoon/i,
3836
- evening: /evening/i,
3837
- night: /night/i
3838
- }
3839
- }, ss = {
3840
- ordinalNumber: Po({
3841
- matchPattern: Xo,
3842
- parsePattern: Bo,
3843
- valueCallback: function(e) {
3844
- return parseInt(e, 10);
3845
- }
3846
- }),
3847
- era: Fe({
3848
- matchPatterns: Go,
3849
- defaultMatchWidth: "wide",
3850
- parsePatterns: Zo,
3851
- defaultParseWidth: "any"
3852
- }),
3853
- quarter: Fe({
3854
- matchPatterns: Jo,
3855
- defaultMatchWidth: "wide",
3856
- parsePatterns: es,
3857
- defaultParseWidth: "any",
3858
- valueCallback: function(e) {
3859
- return e + 1;
3860
- }
3861
- }),
3862
- month: Fe({
3863
- matchPatterns: ts,
3864
- defaultMatchWidth: "wide",
3865
- parsePatterns: rs,
3866
- defaultParseWidth: "any"
3867
- }),
3868
- day: Fe({
3869
- matchPatterns: ns,
3870
- defaultMatchWidth: "wide",
3871
- parsePatterns: as,
3872
- defaultParseWidth: "any"
3873
- }),
3874
- dayPeriod: Fe({
3875
- matchPatterns: is,
3876
- defaultMatchWidth: "any",
3877
- parsePatterns: os,
3878
- defaultParseWidth: "any"
3879
- })
3880
- }, ua = {
3881
- code: "en-US",
3882
- formatDistance: jo,
3883
- formatLong: Wo,
3884
- formatRelative: qo,
3885
- localize: Ko,
3886
- match: ss,
3887
- options: {
3888
- weekStartsOn: 0,
3889
- firstWeekContainsDate: 1
3890
- }
3891
- };
3892
- function us(r, e) {
3893
- var t;
3894
- Yt(1, arguments);
3895
- var n = So((t = void 0) !== null && t !== void 0 ? t : 2);
3896
- if (n !== 2 && n !== 1 && n !== 0)
3897
- throw new RangeError("additionalDigits must be 0, 1 or 2");
3898
- if (!(typeof r == "string" || Object.prototype.toString.call(r) === "[object String]"))
3899
- return /* @__PURE__ */ new Date(NaN);
3900
- var a = fs(r), i;
3901
- if (a.date) {
3902
- var o = hs(a.date, n);
3903
- i = ps(o.restDateString, o.year);
3904
- }
3905
- if (!i || isNaN(i.getTime()))
3906
- return /* @__PURE__ */ new Date(NaN);
3907
- var u = i.getTime(), s = 0, d;
3908
- if (a.time && (s = vs(a.time), isNaN(s)))
3909
- return /* @__PURE__ */ new Date(NaN);
3910
- if (a.timezone) {
3911
- if (d = ms(a.timezone), isNaN(d))
3912
- return /* @__PURE__ */ new Date(NaN);
3913
- } else {
3914
- var c = new Date(u + s), b = /* @__PURE__ */ new Date(0);
3915
- return b.setFullYear(c.getUTCFullYear(), c.getUTCMonth(), c.getUTCDate()), b.setHours(c.getUTCHours(), c.getUTCMinutes(), c.getUTCSeconds(), c.getUTCMilliseconds()), b;
3916
- }
3917
- return new Date(u + s + d);
3918
- }
3919
- var Pt = {
3920
- dateTimeDelimiter: /[T ]/,
3921
- timeZoneDelimiter: /[Z ]/i,
3922
- timezone: /([Z+-].*)$/
3923
- }, ls = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, ds = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, cs = /^([+-])(\d{2})(?::?(\d{2}))?$/;
3924
- function fs(r) {
3925
- var e = {}, t = r.split(Pt.dateTimeDelimiter), n;
3926
- if (t.length > 2)
3927
- return e;
3928
- if (/:/.test(t[0]) ? n = t[0] : (e.date = t[0], n = t[1], Pt.timeZoneDelimiter.test(e.date) && (e.date = r.split(Pt.timeZoneDelimiter)[0], n = r.substr(e.date.length, r.length))), n) {
3929
- var a = Pt.timezone.exec(n);
3930
- a ? (e.time = n.replace(a[1], ""), e.timezone = a[1]) : e.time = n;
3931
- }
3932
- return e;
3933
- }
3934
- function hs(r, e) {
3935
- var t = new RegExp("^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"), n = r.match(t);
3936
- if (!n) return {
3937
- year: NaN,
3938
- restDateString: ""
3939
- };
3940
- var a = n[1] ? parseInt(n[1]) : null, i = n[2] ? parseInt(n[2]) : null;
3941
- return {
3942
- year: i === null ? a : i * 100,
3943
- restDateString: r.slice((n[1] || n[2]).length)
3944
- };
3945
- }
3946
- function ps(r, e) {
3947
- if (e === null) return /* @__PURE__ */ new Date(NaN);
3948
- var t = r.match(ls);
3949
- if (!t) return /* @__PURE__ */ new Date(NaN);
3950
- var n = !!t[4], a = Ue(t[1]), i = Ue(t[2]) - 1, o = Ue(t[3]), u = Ue(t[4]), s = Ue(t[5]) - 1;
3951
- if (n)
3952
- return ws(e, u, s) ? gs(e, u, s) : /* @__PURE__ */ new Date(NaN);
3953
- var d = /* @__PURE__ */ new Date(0);
3954
- return !ys(e, i, o) || !xs(e, a) ? /* @__PURE__ */ new Date(NaN) : (d.setUTCFullYear(e, i, Math.max(a, o)), d);
3955
- }
3956
- function Ue(r) {
3957
- return r ? parseInt(r) : 1;
3958
- }
3959
- function vs(r) {
3960
- var e = r.match(ds);
3961
- if (!e) return NaN;
3962
- var t = sr(e[1]), n = sr(e[2]), a = sr(e[3]);
3963
- return Ts(t, n, a) ? t * sa + n * oa + a * 1e3 : NaN;
3964
- }
3965
- function sr(r) {
3966
- return r && parseFloat(r.replace(",", ".")) || 0;
3967
- }
3968
- function ms(r) {
3969
- if (r === "Z") return 0;
3970
- var e = r.match(cs);
3971
- if (!e) return 0;
3972
- var t = e[1] === "+" ? -1 : 1, n = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
3973
- return Cs(n, a) ? t * (n * sa + a * oa) : NaN;
3974
- }
3975
- function gs(r, e, t) {
3976
- var n = /* @__PURE__ */ new Date(0);
3977
- n.setUTCFullYear(r, 0, 4);
3978
- var a = n.getUTCDay() || 7, i = (e - 1) * 7 + t + 1 - a;
3979
- return n.setUTCDate(n.getUTCDate() + i), n;
3980
- }
3981
- var bs = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
3982
- function la(r) {
3983
- return r % 400 === 0 || r % 4 === 0 && r % 100 !== 0;
3984
- }
3985
- function ys(r, e, t) {
3986
- return e >= 0 && e <= 11 && t >= 1 && t <= (bs[e] || (la(r) ? 29 : 28));
3987
- }
3988
- function xs(r, e) {
3989
- return e >= 1 && e <= (la(r) ? 366 : 365);
3990
- }
3991
- function ws(r, e, t) {
3992
- return e >= 1 && e <= 53 && t >= 0 && t <= 6;
3993
- }
3994
- function Ts(r, e, t) {
3995
- return r === 24 ? e === 0 && t === 0 : t >= 0 && t < 60 && e >= 0 && e < 60 && r >= 0 && r < 25;
3996
- }
3997
- function Cs(r, e) {
3998
- return e >= 0 && e <= 59;
3999
- }
4000
- const jn = { enUS: ua }, Fs = () => Promise.resolve(ua), kn = (r, e = "yyyy-MM-dd HH:mm:ss z", t = "enUS", n = "America/Los_Angeles") => {
4001
- if (!r)
4002
- return "";
4003
- const a = jn[t] || jn.enUS, i = typeof r == "string" ? r.endsWith("Z") || r.includes("+") ? new Date(r) : /* @__PURE__ */ new Date(r + "Z") : new Date(r);
4004
- return Oo(i, n, e, { locale: a });
4005
- }, Us = (r, e = "en-US") => r ? (typeof r == "string" ? r.endsWith("Z") || r.includes("+") ? new Date(r) : /* @__PURE__ */ new Date(r + "Z") : new Date(r)).toLocaleDateString(e) : "", vr = (r) => {
4006
- if (r == null)
4007
- return "";
4008
- if (r instanceof Date)
4009
- return kn(r);
4010
- {
4011
- const e = String(r), t = us(e);
4012
- return Eo(t) ? kn(t) : e;
4013
- }
4014
- }, _s = (r) => {
4015
- const e = document.createElement("textarea");
4016
- e.value = r, e.style.position = "fixed", e.style.top = "0", e.style.left = "0", e.style.opacity = "0", document.body.appendChild(e), e.select();
4017
- try {
4018
- return document.execCommand("copy");
4019
- } catch (t) {
4020
- return console.error("Fallback copy failed", t), !1;
4021
- } finally {
4022
- document.body.removeChild(e);
4023
- }
4024
- }, kt = async (r) => {
4025
- navigator.clipboard || _s(r), await navigator.clipboard.writeText(r);
4026
- }, da = (r) => {
4027
- const e = new URLSearchParams();
4028
- return Object.entries(r).forEach(([t, n]) => {
4029
- n != null && (Array.isArray(n) && n.length === 0 || n !== "" && (n instanceof Date ? e.append(t, n.toISOString()) : Array.isArray(n) ? n.forEach((a) => e.append(t, String(a))) : e.append(t, String(n))));
4030
- }), e;
4031
- }, Ws = (r, e) => {
4032
- const t = da(e ?? {});
4033
- if (t.append("page", r.page.toString()), t.append("size", r.pageSize.toString()), r.sort)
4034
- for (let n of r.sort)
4035
- t.append("sort", `${n.field},${n.direction}`);
4036
- return t;
4037
- }, As = (r) => {
4038
- const e = new URLSearchParams();
4039
- return r && Object.entries(r).forEach(([t, n]) => {
4040
- n == null ? e.append(t, "") : n instanceof Date ? e.append(t, n.toISOString()) : Array.isArray(n) ? n.forEach((a) => e.append(t, String(a))) : e.append(t, String(n));
4041
- }), e;
4042
- }, Os = () => {
4043
- const [r, e] = le(() => localStorage.getItem("theme") === "dark"), t = (n) => {
4044
- document.body.classList.toggle(de.DARK, n), document.body.style.backgroundColor = n ? Sr.DARK_GRAY3 : Sr.LIGHT_GRAY5, localStorage.setItem("theme", n ? "dark" : "light"), e(n);
4045
- };
4046
- return Ut(() => {
4047
- t(r);
4048
- const n = new MutationObserver(() => {
4049
- const a = document.body.classList.contains(de.DARK);
4050
- e(a);
4051
- });
4052
- return n.observe(document.body, { attributes: !0, attributeFilter: ["class"] }), () => n.disconnect();
4053
- }, [r]), {
4054
- isDarkTheme: r,
4055
- setTheme: t
4056
- };
4057
- }, Fn = (r) => {
4058
- qa.create({ position: Ya.BOTTOM }).then((e) => {
4059
- e.show(r);
4060
- });
4061
- }, qs = (r) => {
4062
- const [e, t] = Ba(), [n, a] = le(r);
4063
- return Ut(() => {
4064
- const o = { ...r };
4065
- Object.keys(r).forEach((u) => {
4066
- const s = e.getAll(u);
4067
- if (!s.length) return;
4068
- const d = r[u];
4069
- Array.isArray(d) ? o[u] = typeof d[0] == "number" ? s.map(Number) : s : d instanceof Date ? o[u] = new Date(s[0]) : o[u] = s[0];
4070
- }), a(o);
4071
- }, [e]), { values: n, setValues: (o) => {
4072
- const u = da(o);
4073
- t(u), a(o);
4074
- } };
4075
- }, ca = (r, e, t, n) => {
4076
- const a = r.getTarget(), i = a.rows?.[0] ?? -1, o = a.cols?.[0] ?? -1, u = e[o]?.name, s = t?.[i], d = s?.[e[o].key], c = i > -1 && o > -1 ? vr(d) : "";
4077
- return /* @__PURE__ */ m.jsxs(We, { children: [
4078
- /* @__PURE__ */ m.jsx(
4079
- V,
4080
- {
4081
- text: u ? `Copy ${u} (Ctrl+C)` : "Copy (Ctrl+C)",
4082
- onClick: async () => {
4083
- i > -1 && o > -1 && (await kt(c), Fn({ message: u ? `${u} Copied` : "Text Copied", intent: "success" }));
4084
- }
4085
- },
4086
- -1
4087
- ),
4088
- n?.map((b, _) => /* @__PURE__ */ m.jsx(
4089
- V,
4090
- {
4091
- text: `Copy ${b.label}`,
4092
- onClick: async () => {
4093
- await kt(b.copyContent(s)), Fn({ message: `${b.label} copied`, intent: "success" });
4094
- }
4095
- },
4096
- _
4097
- ))
4098
- ] });
4099
- }, Ds = [5, 15, 25, 50, 100], Ys = ({
4100
- columns: r,
4101
- request: e,
4102
- data: t,
4103
- isLoading: n,
4104
- onRequestChange: a,
4105
- actionButtons: i,
4106
- getIntent: o,
4107
- onDoubleClick: u,
4108
- resetKey: s
4109
- }) => {
4110
- const [d, c] = le(r), b = J(null), { width: _ } = Gn(b), O = t?.content ?? [], w = (D) => {
4111
- a(new Me(0, e.pageSize, D));
4112
- }, R = () => {
4113
- t && !t.last && a(new Me(e.page + 1, e.pageSize, e.sort));
4114
- }, x = () => {
4115
- t && !t.first && a(new Me(e.page - 1, e.pageSize, e.sort));
4116
- }, g = (D) => {
4117
- a(new Me(0, D, e.sort));
4118
- }, h = (D) => /* @__PURE__ */ m.jsxs(We, { children: [
4119
- /* @__PURE__ */ m.jsx(V, { text: "Sort Ascending", icon: "sort-asc", onClick: () => w([{ field: D, direction: "asc" }]) }),
4120
- /* @__PURE__ */ m.jsx(V, { text: "Sort Descending", icon: "sort-desc", onClick: () => w([{ field: D, direction: "desc" }]) }),
4121
- /* @__PURE__ */ m.jsx(V, { text: "Unsort", onClick: () => w(void 0) })
4122
- ] }), p = (D, S, N) => D.customCellRenderer ? D.customCellRenderer(S) : /* @__PURE__ */ m.jsx(m.Fragment, { children: N }), f = async (D, S) => {
4123
- const Y = O[D]?.[r[S].key], H = vr(Y);
4124
- return navigator.clipboard || await kt(H), H;
4125
- }, v = Ie(() => d.filter((D) => D.visible), [d]), C = (D) => {
4126
- const S = v.reduce((W, z) => W + (z.width ?? 0), 0), N = v.filter((W) => W.width !== void 0).length;
4127
- let H = (D - S - 38) / (v.length - N);
4128
- return H < 100 && (H = 100), v.map((W) => W.width ?? H);
4129
- }, I = Ie(() => C(_), [_, v]);
4130
- return Ut(() => {
4131
- s && e.page !== 0 && a(new Me(0, e.pageSize, e.sort));
4132
- }, [s]), /* @__PURE__ */ m.jsxs("div", { children: [
4133
- /* @__PURE__ */ m.jsxs("div", { className: "table-form-actions", children: [
4134
- /* @__PURE__ */ m.jsx("div", { className: "table-form" }),
4135
- /* @__PURE__ */ m.jsxs("div", { className: "table-actions", children: [
4136
- i && i,
4137
- i && /* @__PURE__ */ m.jsx(La, { style: { height: "20px" } }),
4138
- /* @__PURE__ */ m.jsx(
4139
- Wt,
4140
- {
4141
- placement: "bottom-start",
4142
- content: /* @__PURE__ */ m.jsx(We, { children: d.map((D) => /* @__PURE__ */ m.jsx(
4143
- V,
4144
- {
4145
- shouldDismissPopover: !1,
4146
- onClick: (S) => {
4147
- S.preventDefault(), c(
4148
- (N) => N.map((Y) => Y.key === D.key ? { ...Y, visible: !Y.visible } : Y)
4149
- );
4150
- },
4151
- text: /* @__PURE__ */ m.jsxs("div", { className: "columns-visibility-menu", children: [
4152
- /* @__PURE__ */ m.jsx("input", { type: "checkbox", checked: D.visible, readOnly: !0, style: { pointerEvents: "none" } }),
4153
- D.name
4154
- ] })
4155
- },
4156
- D.name
4157
- )) }),
4158
- renderTarget: ({ isOpen: D, ...S }) => /* @__PURE__ */ m.jsx(ae, { ...S, text: "Columns Visibility", endIcon: "double-caret-vertical" })
4159
- }
4160
- )
4161
- ] })
4162
- ] }),
4163
- /* @__PURE__ */ m.jsx("div", { ref: b, children: /* @__PURE__ */ m.jsx(
4164
- Ln,
4165
- {
4166
- cellRendererDependencies: [e, t, I],
4167
- columnWidths: I,
4168
- numRows: O?.length ?? 0,
4169
- getCellClipboardData: f,
4170
- defaultRowHeight: 25,
4171
- enableColumnResizing: !1,
4172
- enableRowResizing: !1,
4173
- enableMultipleSelection: !1,
4174
- selectionModes: zn.ROWS_AND_CELLS,
4175
- focusMode: Hn.ROW,
4176
- loadingOptions: n ? [$n.COLUMN_HEADERS] : [],
4177
- bodyContextMenuRenderer: (D) => ca(D, r, O ?? []),
4178
- children: v.map((D) => /* @__PURE__ */ m.jsx(
4179
- Qn,
4180
- {
4181
- name: D.name,
4182
- cellRenderer: (S) => {
4183
- if (!O)
4184
- return /* @__PURE__ */ m.jsx(Et, {});
4185
- const N = O[S], Y = o ? o(N) : Mt.NONE;
4186
- return /* @__PURE__ */ m.jsx(Et, { intent: Y, interactive: !0, className: "h-full", children: /* @__PURE__ */ m.jsx(
4187
- "div",
4188
- {
4189
- className: "absolute inset-0 px-2 py-1 flex items-center",
4190
- onDoubleClick: () => {
4191
- u && u(N);
4192
- },
4193
- children: p(D, N, N[D.key])
4194
- }
4195
- ) });
4196
- },
4197
- columnHeaderCellRenderer: () => /* @__PURE__ */ m.jsx(Xa, { name: D.name, menuRenderer: () => h(D.sortKey ?? D.key) })
4198
- },
4199
- D.key
4200
- ))
4201
- }
4202
- ) }),
4203
- /* @__PURE__ */ m.jsxs("div", { className: "table-pagination", children: [
4204
- /* @__PURE__ */ m.jsxs("div", { className: "rows-select-container", children: [
4205
- /* @__PURE__ */ m.jsx("span", { children: "Rows per page: " }),
4206
- /* @__PURE__ */ m.jsx(
4207
- Ye,
4208
- {
4209
- items: Ds,
4210
- itemRenderer: (D, { handleClick: S }) => /* @__PURE__ */ m.jsx(V, { text: D, onClick: S }, D),
4211
- onItemSelect: g,
4212
- filterable: !1,
4213
- disabled: n,
4214
- children: /* @__PURE__ */ m.jsx(ae, { text: e.pageSize, endIcon: "double-caret-vertical" })
4215
- }
4216
- )
4217
- ] }),
4218
- /* @__PURE__ */ m.jsxs("div", { className: "flex flex-row items-center", children: [
4219
- n && /* @__PURE__ */ m.jsx($a, { size: 20 }),
4220
- /* @__PURE__ */ m.jsx(ae, { onClick: x, disabled: n || (t ? t.first : !0), children: "Previous" }),
4221
- /* @__PURE__ */ m.jsxs("span", { className: "pagination-page-info", children: [
4222
- "Page ",
4223
- t ? t.number + 1 : 1,
4224
- " of ",
4225
- t ? t.totalPages : 1
4226
- ] }),
4227
- /* @__PURE__ */ m.jsx(ae, { onClick: R, disabled: n || (t ? t.last : n), children: "Next" })
4228
- ] })
4229
- ] })
4230
- ] });
4231
- }, Ls = ({
4232
- value: r,
4233
- trueText: e = "Yes",
4234
- falseText: t = "No",
4235
- trueIntent: n,
4236
- falseIntent: a,
4237
- round: i = !0,
4238
- minimal: o = !0
4239
- }) => r == null ? null : /* @__PURE__ */ m.jsx(
4240
- Wn,
4241
- {
4242
- intent: r ? n : a,
4243
- round: i,
4244
- minimal: o,
4245
- children: r ? e : t
4246
- }
4247
- ), Is = [5, 15, 25, 50, 100, 200], $s = ({
4248
- columns: r,
4249
- data: e,
4250
- actionButtons: t,
4251
- isLoading: n,
4252
- getIntent: a,
4253
- pageSize: i,
4254
- extraCopyMenus: o
4255
- }) => {
4256
- const [u, s] = le(i), [d, c] = le(0), b = J(null), { width: _ } = Gn(b), O = u != null, w = Ie(() => !O || !e ? 1 : Math.ceil(e.length / u) || 1, [e, u, O]), R = Ie(() => {
4257
- if (!e) return [];
4258
- if (!O) return e;
4259
- const v = d * u;
4260
- return e.slice(v, v + u);
4261
- }, [e, d, u, O]), x = (e?.length ?? 0) > 23 && !O, g = (v) => {
4262
- s(v), c(0);
4263
- }, h = (v) => {
4264
- const C = r.reduce((N, Y) => N + (Y.width ?? 0), 0), I = r.filter((N) => N.width !== void 0).length;
4265
- let S = (v - C - 38) / (r.length - I);
4266
- return S < 150 && (S = 150), r.map((N) => N.width ?? S);
4267
- }, p = Ie(() => h(_), [_, r]), f = async (v, C) => {
4268
- const D = e?.[v]?.[r[C].key], S = vr(D);
4269
- return navigator.clipboard || await kt(S), S;
4270
- };
4271
- return Ft.useEffect(() => {
4272
- c(0);
4273
- }, [e]), /* @__PURE__ */ m.jsxs(
4274
- "div",
4275
- {
4276
- className: "simple-datatable",
4277
- style: x ? { height: "70vh", overflow: "auto" } : void 0,
4278
- ref: b,
4279
- children: [
4280
- t && /* @__PURE__ */ m.jsx("div", { className: "flex justify-end mb-2", children: t }),
4281
- /* @__PURE__ */ m.jsx(
4282
- Ln,
4283
- {
4284
- loadingOptions: n ? [$n.COLUMN_HEADERS] : [],
4285
- getCellClipboardData: f,
4286
- cellRendererDependencies: [R, r, p, d],
4287
- numRows: R.length,
4288
- defaultRowHeight: 25,
4289
- enableColumnResizing: !1,
4290
- enableRowResizing: !1,
4291
- enableMultipleSelection: !1,
4292
- selectionModes: zn.ROWS_AND_CELLS,
4293
- columnWidths: p,
4294
- focusMode: Hn.ROW,
4295
- bodyContextMenuRenderer: (v) => ca(v, r, R, o),
4296
- children: r.map((v) => /* @__PURE__ */ m.jsx(
4297
- Qn,
4298
- {
4299
- name: v.name,
4300
- cellRenderer: (C) => {
4301
- const I = R[C], D = a ? a(I) : Mt.NONE;
4302
- return I ? /* @__PURE__ */ m.jsx(Et, { intent: D, children: v.customCellRenderer ? v.customCellRenderer(I) : /* @__PURE__ */ m.jsx(m.Fragment, { children: I[v.key] }) }) : /* @__PURE__ */ m.jsx(Et, { intent: D });
4303
- }
4304
- },
4305
- v.key
4306
- ))
4307
- },
4308
- `table-page-${d}-${u ?? "all"}`
4309
- ),
4310
- O && /* @__PURE__ */ m.jsxs("div", { className: "table-pagination flex items-center justify-between mt-2", children: [
4311
- /* @__PURE__ */ m.jsxs("div", { className: "rows-select-container flex items-center gap-2", children: [
4312
- /* @__PURE__ */ m.jsx("span", { children: "Rows per page: " }),
4313
- /* @__PURE__ */ m.jsx(
4314
- Ye,
4315
- {
4316
- items: Is,
4317
- itemRenderer: (v, { handleClick: C }) => /* @__PURE__ */ m.jsx(V, { text: v, onClick: C }, v),
4318
- onItemSelect: g,
4319
- filterable: !1,
4320
- children: /* @__PURE__ */ m.jsx(ae, { text: u, endIcon: "double-caret-vertical" })
4321
- }
4322
- )
4323
- ] }),
4324
- /* @__PURE__ */ m.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
4325
- /* @__PURE__ */ m.jsx(ae, { onClick: () => c((v) => Math.max(0, v - 1)), disabled: d === 0, children: "Previous" }),
4326
- /* @__PURE__ */ m.jsxs("span", { className: "pagination-page-info px-2", children: [
4327
- "Page ",
4328
- d + 1,
4329
- " of ",
4330
- w
4331
- ] }),
4332
- /* @__PURE__ */ m.jsx(
4333
- ae,
4334
- {
4335
- onClick: () => c((v) => Math.min(w - 1, v + 1)),
4336
- disabled: d >= w - 1,
4337
- children: "Next"
4338
- }
4339
- )
4340
- ] })
4341
- ] })
4342
- ]
4343
- }
4344
- );
4345
- }, Hs = ({ columns: r, data: e, getIntent: t }) => /* @__PURE__ */ m.jsxs("table", { className: "bp5-html-table simple-html-datatable w-full", children: [
4346
- /* @__PURE__ */ m.jsx("thead", { children: /* @__PURE__ */ m.jsx("tr", { children: r.map((n, a) => /* @__PURE__ */ m.jsx("th", { style: { width: n.width }, children: n.name }, a)) }) }),
4347
- /* @__PURE__ */ m.jsx("tbody", { children: (e ?? []).map((n, a) => {
4348
- const i = t ? t(n) : Mt.NONE;
4349
- return /* @__PURE__ */ m.jsx("tr", { className: i !== Mt.NONE ? `bp5-intent-${i}` : "", children: r.map((o, u) => /* @__PURE__ */ m.jsx("td", { children: o.customCellRenderer ? o.customCellRenderer(n) : n[o.key] }, u)) }, a);
4350
- }) })
4351
- ] }), zs = () => {
4352
- const [r, e] = le(!1), [t, n] = le(null), [a, i] = le(null);
4353
- return [ka((s) => (n(s), e(!0), new Promise((d) => {
4354
- i(() => d);
4355
- })), []), /* @__PURE__ */ m.jsx(
4356
- Ha,
4357
- {
4358
- isOpen: r,
4359
- intent: "primary",
4360
- confirmButtonText: "Yes",
4361
- cancelButtonText: "No",
4362
- onConfirm: () => {
4363
- e(!1), a?.(!0), i(null);
4364
- },
4365
- onClose: () => {
4366
- e(!1), a?.(!1), i(null);
4367
- },
4368
- children: t
4369
- }
4370
- )];
4371
- }, Qs = ({
4372
- selectedValue: r,
4373
- items: e = [],
4374
- required: t = !1,
4375
- disabled: n,
4376
- onSelect: a,
4377
- renderSelected: i,
4378
- renderMenuText: o,
4379
- getValueByItem: u,
4380
- getItemByValue: s,
4381
- renderMenuLabel: d,
4382
- onBlur: c,
4383
- intent: b = "none"
4384
- }) => {
4385
- const _ = t ? e : [null, ...e], O = r === void 0 ? void 0 : s(r);
4386
- return /* @__PURE__ */ m.jsx(
4387
- Ye,
4388
- {
4389
- items: _,
4390
- disabled: n,
4391
- onItemSelect: (w) => {
4392
- a(w ?? void 0);
4393
- },
4394
- filterable: !1,
4395
- popoverProps: {
4396
- onClose: () => {
4397
- c?.();
4398
- }
4399
- },
4400
- itemRenderer: (w, { handleClick: R }) => w ? /* @__PURE__ */ m.jsx(
4401
- V,
4402
- {
4403
- text: o(w),
4404
- onClick: R,
4405
- labelElement: d?.(w)
4406
- },
4407
- String(u(w))
4408
- ) : /* @__PURE__ */ m.jsx(
4409
- V,
4410
- {
4411
- text: "— None —",
4412
- onClick: R
4413
- },
4414
- "__none"
4415
- ),
4416
- noResults: /* @__PURE__ */ m.jsx(V, { disabled: !0, text: "No records." }),
4417
- children: /* @__PURE__ */ m.jsx(
4418
- ae,
4419
- {
4420
- text: i(O) ?? "Select Value",
4421
- intent: b,
4422
- endIcon: "double-caret-vertical"
4423
- }
4424
- )
4425
- }
4426
- );
4427
- }, Vs = ({
4428
- items: r = [],
4429
- selectedValues: e = [],
4430
- required: t = !1,
4431
- disabled: n,
4432
- getValueByItem: a,
4433
- getItemByValue: i,
4434
- renderSelected: o,
4435
- renderMenuText: u,
4436
- renderMenuLabel: s,
4437
- onBlur: d,
4438
- onSelect: c,
4439
- onRemove: b
4440
- }) => {
4441
- const _ = e.map((w) => i(w)), O = (w) => {
4442
- t && _.length <= 1 || b(w);
4443
- };
4444
- return /* @__PURE__ */ m.jsx(
4445
- cr,
4446
- {
4447
- disabled: n,
4448
- items: r,
4449
- selectedItems: _,
4450
- onItemSelect: c,
4451
- onRemove: O,
4452
- popoverProps: {
4453
- onClose: () => {
4454
- d?.();
4455
- }
4456
- },
4457
- itemRenderer: (w, { handleClick: R }) => /* @__PURE__ */ m.jsx(
4458
- V,
4459
- {
4460
- text: u(w),
4461
- labelElement: s?.(w),
4462
- onClick: R
4463
- },
4464
- String(a(w))
4465
- ),
4466
- noResults: /* @__PURE__ */ m.jsx(V, { disabled: !0, text: "No records." }),
4467
- tagRenderer: (w) => o(w)
4468
- }
4469
- );
4470
- }, Ks = ({ isAuthenticated: r, loginUrl: e, onBeforeNavigateLogin: t }) => r ? /* @__PURE__ */ m.jsx(Kn, {}) : (t?.(), /* @__PURE__ */ m.jsx(Vn, { to: e, replace: !0 })), Xs = ({ isAuthenticated: r, homeUrl: e }) => r ? /* @__PURE__ */ m.jsx(Vn, { to: e }) : /* @__PURE__ */ m.jsx(Kn, {}), Bs = ({
4471
- requiredPermissions: r,
4472
- gainPermissions: e,
4473
- children: t,
4474
- fallback: n = null
4475
- }) => e ? r.some((i) => e.includes(i)) ? /* @__PURE__ */ m.jsx(m.Fragment, { children: t }) : /* @__PURE__ */ m.jsx(m.Fragment, { children: n }) : /* @__PURE__ */ m.jsx(m.Fragment, { children: n }), Ps = (r) => {
4476
- const { isDarkTheme: e, setTheme: t } = Os(), n = () => t(!e);
4477
- return /* @__PURE__ */ m.jsx(
4478
- za,
4479
- {
4480
- ...r,
4481
- checked: e,
4482
- label: "Dark Mode",
4483
- onChange: n,
4484
- alignIndicator: "right"
4485
- }
4486
- );
4487
- }, Ss = ({ title: r, navigation: e, onProfileClick: t, onLogoutClick: n }) => /* @__PURE__ */ m.jsxs(Qa, { className: "bp5-fixed-top custom-navbar", children: [
4488
- /* @__PURE__ */ m.jsx(Xt, { align: "left", children: /* @__PURE__ */ m.jsx(Va, { children: r }) }),
4489
- /* @__PURE__ */ m.jsx(Xt, { children: e }),
4490
- /* @__PURE__ */ m.jsxs(Xt, { align: "end", children: [
4491
- /* @__PURE__ */ m.jsx(Ps, { className: "mr-2 mb-0!" }),
4492
- /* @__PURE__ */ m.jsx(
4493
- Wt,
4494
- {
4495
- placement: "bottom-end",
4496
- content: /* @__PURE__ */ m.jsxs(We, { children: [
4497
- /* @__PURE__ */ m.jsx(V, { icon: "id-number", text: "My profile", onClick: t }),
4498
- /* @__PURE__ */ m.jsx(Ka, {}),
4499
- /* @__PURE__ */ m.jsx(V, { intent: "danger", icon: "log-out", text: "Sign out", onClick: n })
4500
- ] }),
4501
- children: /* @__PURE__ */ m.jsx(ae, { icon: "user" })
4502
- }
4503
- )
4504
- ] })
4505
- ] }), Gs = ({ children: r, ...e }) => /* @__PURE__ */ m.jsxs("div", { className: "main-layout", children: [
4506
- /* @__PURE__ */ m.jsx("div", { className: "topbar", children: /* @__PURE__ */ m.jsx(Ss, { ...e }) }),
4507
- /* @__PURE__ */ m.jsx("div", { className: "body", children: r })
4508
- ] });
1
+ import { b as r, c as t, a as s } from "./query-CherHJOV.js";
2
+ import { c as m, g as p, m as l, w as i } from "./api-CzCTYMlh.js";
3
+ import { f as c, a as f, l as T } from "./date-BEtsfEKV.js";
4
+ import { c as n, f as y, a as x, b as D, p as S } from "./phone-DtDgQ5qk.js";
5
+ import { B as h, D as P, S as C, a as A, b as B, c as d, d as w, e as M, T as Q, g as F, h as H, i as L, f as R, u as U } from "./SettingsSectionBase-CfT9p06Q.js";
6
+ import { A as q, P as v, U as z } from "./PermissionVisibility-DhDN-Z93.js";
7
+ import { T as G, a as N, b as O, u as V } from "./TopBarNavLayout-C0qRr2Lo.js";
8
+ import { u as k } from "./useSize-Ci0PbN9W.js";
9
+ import { u as K } from "./useUrlForm-BYTOPBsx.js";
10
+ import { s as X } from "./toast-B3QUItIK.js";
4509
11
  export {
4510
- Ks as AuthRoute,
4511
- ks as BooleanTag,
4512
- Ys as Datatable,
4513
- Me as PageRequest,
4514
- Bs as PermissionVisibility,
4515
- Qs as SelectItem,
4516
- Vs as SelectMultipleItems,
4517
- $s as SimpleDatatable,
4518
- Hs as SimpleHTMLDatatable,
4519
- Ls as TableCellTag,
4520
- Ps as ThemeSwitch,
4521
- Gs as TopBarNavLayout,
4522
- Ss as Topbar,
4523
- Xs as UnAuthRoute,
4524
- da as buildQueryParams,
4525
- kt as copyTextToClipboard,
4526
- vr as createCopyableText,
4527
- Ws as createHttpQueryParams,
4528
- As as createHttpQueryParamsFromData,
4529
- ca as createTableCopyMenu,
4530
- Us as formatDateOnly,
4531
- kn as formatDateTime,
4532
- Fs as localeLoader,
4533
- Fn as showToast,
4534
- zs as useConfirmDialog,
4535
- Os as useTheme,
4536
- qs as useUrlForm
12
+ q as AuthRoute,
13
+ h as BooleanTag,
14
+ P as Datatable,
15
+ v as PermissionVisibility,
16
+ C as SelectItem,
17
+ A as SelectMultipleItems,
18
+ B as SettingGroup,
19
+ d as SettingsSectionBase,
20
+ w as SimpleDatatable,
21
+ M as SimpleHTMLDatatable,
22
+ Q as TableCellTag,
23
+ G as ThemeSwitch,
24
+ N as TopBarNavLayout,
25
+ O as Topbar,
26
+ z as UnAuthRoute,
27
+ r as buildQueryParams,
28
+ F as copyTextToClipboard,
29
+ m as createApiBaseQuery,
30
+ H as createCopyableText,
31
+ t as createHttpQueryParams,
32
+ s as createHttpQueryParamsFromData,
33
+ L as createPageRequest,
34
+ R as createTableCopyMenu,
35
+ n as currencyFormatter,
36
+ y as formatCurrency,
37
+ x as formatDateDuration,
38
+ c as formatDateOnly,
39
+ f as formatDateTime,
40
+ D as formatPhone,
41
+ p as getApiError,
42
+ T as localeLoader,
43
+ l as mapProblemDetails,
44
+ S as parseMoney,
45
+ X as showToast,
46
+ U as useConfirmDialog,
47
+ k as useSize,
48
+ V as useTheme,
49
+ K as useUrlForm,
50
+ i as wrapApiCall
4537
51
  };