@sigtes/ui 0.0.9 → 0.0.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.
- package/dist/Button-BztPLDJi.js +69 -0
- package/dist/Button-C3Twt_rk.cjs +1 -0
- package/dist/UserProvider-BfG9Ccu3.js +395 -0
- package/dist/UserProvider-CQZEZTc7.cjs +22 -0
- package/dist/components.cjs.js +367 -193
- package/dist/components.es.js +13103 -8911
- package/dist/globals.css +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useAuthorization/index.d.ts +1 -0
- package/dist/hooks/useAuthorization/useAuthorization.d.ts +5 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +40 -28
- package/dist/locale-provider-BMa5HMi7-CUCoSBuJ.js +308 -0
- package/dist/locale-provider-BMa5HMi7-jcDwp-6T.cjs +22 -0
- package/dist/locale-provider-BMa5HMi7.js +831 -0
- package/dist/locale-provider-DfKreh8K.cjs +1 -0
- package/dist/navigation-CbiZy04t.js +1857 -0
- package/dist/navigation-Czjt6ygu.cjs +6 -0
- package/dist/pages/error/error.d.ts +6 -0
- package/dist/pages/error/index.d.ts +1 -0
- package/dist/pages/forbidden/forbidden.d.ts +1 -0
- package/dist/pages/forbidden/index.d.ts +1 -0
- package/dist/pages/index.d.ts +3 -0
- package/dist/pages/not-found/index.d.ts +1 -0
- package/dist/pages/not-found/not-found.d.ts +1 -0
- package/dist/pages.cjs.js +1 -0
- package/dist/pages.es.js +64 -0
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/user-provider/UserProvider.d.ts +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.es.js +9 -8
- package/package.json +12 -6
- package/dist/UserProvider-BzXtdnK7.cjs +0 -22
- package/dist/UserProvider-Cx4hp8vD.js +0 -1221
@@ -1,1221 +0,0 @@
|
|
1
|
-
"use client";
|
2
|
-
import be, { createContext as G, useState as F, useEffect as q, useContext as Z, useCallback as $ } from "react";
|
3
|
-
var x = { exports: {} }, R = {};
|
4
|
-
/**
|
5
|
-
* @license React
|
6
|
-
* react-jsx-runtime.production.js
|
7
|
-
*
|
8
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
9
|
-
*
|
10
|
-
* This source code is licensed under the MIT license found in the
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
12
|
-
*/
|
13
|
-
var J;
|
14
|
-
function ge() {
|
15
|
-
if (J) return R;
|
16
|
-
J = 1;
|
17
|
-
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
18
|
-
function a(r, o, s) {
|
19
|
-
var u = null;
|
20
|
-
if (s !== void 0 && (u = "" + s), o.key !== void 0 && (u = "" + o.key), "key" in o) {
|
21
|
-
s = {};
|
22
|
-
for (var l in o)
|
23
|
-
l !== "key" && (s[l] = o[l]);
|
24
|
-
} else s = o;
|
25
|
-
return o = s.ref, {
|
26
|
-
$$typeof: t,
|
27
|
-
type: r,
|
28
|
-
key: u,
|
29
|
-
ref: o !== void 0 ? o : null,
|
30
|
-
props: s
|
31
|
-
};
|
32
|
-
}
|
33
|
-
return R.Fragment = n, R.jsx = a, R.jsxs = a, R;
|
34
|
-
}
|
35
|
-
var j = {};
|
36
|
-
/**
|
37
|
-
* @license React
|
38
|
-
* react-jsx-runtime.development.js
|
39
|
-
*
|
40
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
41
|
-
*
|
42
|
-
* This source code is licensed under the MIT license found in the
|
43
|
-
* LICENSE file in the root directory of this source tree.
|
44
|
-
*/
|
45
|
-
var H;
|
46
|
-
function ye() {
|
47
|
-
return H || (H = 1, process.env.NODE_ENV !== "production" && (function() {
|
48
|
-
function t(e) {
|
49
|
-
if (e == null) return null;
|
50
|
-
if (typeof e == "function")
|
51
|
-
return e.$$typeof === me ? null : e.displayName || e.name || null;
|
52
|
-
if (typeof e == "string") return e;
|
53
|
-
switch (e) {
|
54
|
-
case w:
|
55
|
-
return "Fragment";
|
56
|
-
case re:
|
57
|
-
return "Profiler";
|
58
|
-
case ne:
|
59
|
-
return "StrictMode";
|
60
|
-
case ue:
|
61
|
-
return "Suspense";
|
62
|
-
case de:
|
63
|
-
return "SuspenseList";
|
64
|
-
case le:
|
65
|
-
return "Activity";
|
66
|
-
}
|
67
|
-
if (typeof e == "object")
|
68
|
-
switch (typeof e.tag == "number" && console.error(
|
69
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
70
|
-
), e.$$typeof) {
|
71
|
-
case p:
|
72
|
-
return "Portal";
|
73
|
-
case ie:
|
74
|
-
return (e.displayName || "Context") + ".Provider";
|
75
|
-
case oe:
|
76
|
-
return (e._context.displayName || "Context") + ".Consumer";
|
77
|
-
case se:
|
78
|
-
var i = e.render;
|
79
|
-
return e = e.displayName, e || (e = i.displayName || i.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
80
|
-
case ce:
|
81
|
-
return i = e.displayName || null, i !== null ? i : t(e.type) || "Memo";
|
82
|
-
case L:
|
83
|
-
i = e._payload, e = e._init;
|
84
|
-
try {
|
85
|
-
return t(e(i));
|
86
|
-
} catch {
|
87
|
-
}
|
88
|
-
}
|
89
|
-
return null;
|
90
|
-
}
|
91
|
-
function n(e) {
|
92
|
-
return "" + e;
|
93
|
-
}
|
94
|
-
function a(e) {
|
95
|
-
try {
|
96
|
-
n(e);
|
97
|
-
var i = !1;
|
98
|
-
} catch {
|
99
|
-
i = !0;
|
100
|
-
}
|
101
|
-
if (i) {
|
102
|
-
i = console;
|
103
|
-
var d = i.error, m = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
104
|
-
return d.call(
|
105
|
-
i,
|
106
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
107
|
-
m
|
108
|
-
), n(e);
|
109
|
-
}
|
110
|
-
}
|
111
|
-
function r(e) {
|
112
|
-
if (e === w) return "<>";
|
113
|
-
if (typeof e == "object" && e !== null && e.$$typeof === L)
|
114
|
-
return "<...>";
|
115
|
-
try {
|
116
|
-
var i = t(e);
|
117
|
-
return i ? "<" + i + ">" : "<...>";
|
118
|
-
} catch {
|
119
|
-
return "<...>";
|
120
|
-
}
|
121
|
-
}
|
122
|
-
function o() {
|
123
|
-
var e = A.A;
|
124
|
-
return e === null ? null : e.getOwner();
|
125
|
-
}
|
126
|
-
function s() {
|
127
|
-
return Error("react-stack-top-frame");
|
128
|
-
}
|
129
|
-
function u(e) {
|
130
|
-
if (V.call(e, "key")) {
|
131
|
-
var i = Object.getOwnPropertyDescriptor(e, "key").get;
|
132
|
-
if (i && i.isReactWarning) return !1;
|
133
|
-
}
|
134
|
-
return e.key !== void 0;
|
135
|
-
}
|
136
|
-
function l(e, i) {
|
137
|
-
function d() {
|
138
|
-
Y || (Y = !0, console.error(
|
139
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
140
|
-
i
|
141
|
-
));
|
142
|
-
}
|
143
|
-
d.isReactWarning = !0, Object.defineProperty(e, "key", {
|
144
|
-
get: d,
|
145
|
-
configurable: !0
|
146
|
-
});
|
147
|
-
}
|
148
|
-
function h() {
|
149
|
-
var e = t(this.type);
|
150
|
-
return z[e] || (z[e] = !0, console.error(
|
151
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
152
|
-
)), e = this.props.ref, e !== void 0 ? e : null;
|
153
|
-
}
|
154
|
-
function v(e, i, d, m, k, b, O, D) {
|
155
|
-
return d = b.ref, e = {
|
156
|
-
$$typeof: c,
|
157
|
-
type: e,
|
158
|
-
key: i,
|
159
|
-
props: b,
|
160
|
-
_owner: k
|
161
|
-
}, (d !== void 0 ? d : null) !== null ? Object.defineProperty(e, "ref", {
|
162
|
-
enumerable: !1,
|
163
|
-
get: h
|
164
|
-
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
165
|
-
configurable: !1,
|
166
|
-
enumerable: !1,
|
167
|
-
writable: !0,
|
168
|
-
value: 0
|
169
|
-
}), Object.defineProperty(e, "_debugInfo", {
|
170
|
-
configurable: !1,
|
171
|
-
enumerable: !1,
|
172
|
-
writable: !0,
|
173
|
-
value: null
|
174
|
-
}), Object.defineProperty(e, "_debugStack", {
|
175
|
-
configurable: !1,
|
176
|
-
enumerable: !1,
|
177
|
-
writable: !0,
|
178
|
-
value: O
|
179
|
-
}), Object.defineProperty(e, "_debugTask", {
|
180
|
-
configurable: !1,
|
181
|
-
enumerable: !1,
|
182
|
-
writable: !0,
|
183
|
-
value: D
|
184
|
-
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
185
|
-
}
|
186
|
-
function E(e, i, d, m, k, b, O, D) {
|
187
|
-
var f = i.children;
|
188
|
-
if (f !== void 0)
|
189
|
-
if (m)
|
190
|
-
if (fe(f)) {
|
191
|
-
for (m = 0; m < f.length; m++)
|
192
|
-
P(f[m]);
|
193
|
-
Object.freeze && Object.freeze(f);
|
194
|
-
} else
|
195
|
-
console.error(
|
196
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
197
|
-
);
|
198
|
-
else P(f);
|
199
|
-
if (V.call(i, "key")) {
|
200
|
-
f = t(e);
|
201
|
-
var T = Object.keys(i).filter(function(he) {
|
202
|
-
return he !== "key";
|
203
|
-
});
|
204
|
-
m = 0 < T.length ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}", X[f + m] || (T = 0 < T.length ? "{" + T.join(": ..., ") + ": ...}" : "{}", console.error(
|
205
|
-
`A props object containing a "key" prop is being spread into JSX:
|
206
|
-
let props = %s;
|
207
|
-
<%s {...props} />
|
208
|
-
React keys must be passed directly to JSX without using spread:
|
209
|
-
let props = %s;
|
210
|
-
<%s key={someKey} {...props} />`,
|
211
|
-
m,
|
212
|
-
f,
|
213
|
-
T,
|
214
|
-
f
|
215
|
-
), X[f + m] = !0);
|
216
|
-
}
|
217
|
-
if (f = null, d !== void 0 && (a(d), f = "" + d), u(i) && (a(i.key), f = "" + i.key), "key" in i) {
|
218
|
-
d = {};
|
219
|
-
for (var N in i)
|
220
|
-
N !== "key" && (d[N] = i[N]);
|
221
|
-
} else d = i;
|
222
|
-
return f && l(
|
223
|
-
d,
|
224
|
-
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
225
|
-
), v(
|
226
|
-
e,
|
227
|
-
f,
|
228
|
-
b,
|
229
|
-
k,
|
230
|
-
o(),
|
231
|
-
d,
|
232
|
-
O,
|
233
|
-
D
|
234
|
-
);
|
235
|
-
}
|
236
|
-
function P(e) {
|
237
|
-
typeof e == "object" && e !== null && e.$$typeof === c && e._store && (e._store.validated = 1);
|
238
|
-
}
|
239
|
-
var M = be, c = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), ne = Symbol.for("react.strict_mode"), re = Symbol.for("react.profiler"), oe = Symbol.for("react.consumer"), ie = Symbol.for("react.context"), se = Symbol.for("react.forward_ref"), ue = Symbol.for("react.suspense"), de = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), le = Symbol.for("react.activity"), me = Symbol.for("react.client.reference"), A = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, fe = Array.isArray, C = console.createTask ? console.createTask : function() {
|
240
|
-
return null;
|
241
|
-
};
|
242
|
-
M = {
|
243
|
-
react_stack_bottom_frame: function(e) {
|
244
|
-
return e();
|
245
|
-
}
|
246
|
-
};
|
247
|
-
var Y, z = {}, I = M.react_stack_bottom_frame.bind(
|
248
|
-
M,
|
249
|
-
s
|
250
|
-
)(), U = C(r(s)), X = {};
|
251
|
-
j.Fragment = w, j.jsx = function(e, i, d, m, k) {
|
252
|
-
var b = 1e4 > A.recentlyCreatedOwnerStacks++;
|
253
|
-
return E(
|
254
|
-
e,
|
255
|
-
i,
|
256
|
-
d,
|
257
|
-
!1,
|
258
|
-
m,
|
259
|
-
k,
|
260
|
-
b ? Error("react-stack-top-frame") : I,
|
261
|
-
b ? C(r(e)) : U
|
262
|
-
);
|
263
|
-
}, j.jsxs = function(e, i, d, m, k) {
|
264
|
-
var b = 1e4 > A.recentlyCreatedOwnerStacks++;
|
265
|
-
return E(
|
266
|
-
e,
|
267
|
-
i,
|
268
|
-
d,
|
269
|
-
!0,
|
270
|
-
m,
|
271
|
-
k,
|
272
|
-
b ? Error("react-stack-top-frame") : I,
|
273
|
-
b ? C(r(e)) : U
|
274
|
-
);
|
275
|
-
};
|
276
|
-
})()), j;
|
277
|
-
}
|
278
|
-
var Q;
|
279
|
-
function ve() {
|
280
|
-
return Q || (Q = 1, process.env.NODE_ENV === "production" ? x.exports = ge() : x.exports = ye()), x.exports;
|
281
|
-
}
|
282
|
-
var K = ve();
|
283
|
-
const pe = {
|
284
|
-
lessThanXSeconds: {
|
285
|
-
one: "less than a second",
|
286
|
-
other: "less than {{count}} seconds"
|
287
|
-
},
|
288
|
-
xSeconds: {
|
289
|
-
one: "1 second",
|
290
|
-
other: "{{count}} seconds"
|
291
|
-
},
|
292
|
-
halfAMinute: "half a minute",
|
293
|
-
lessThanXMinutes: {
|
294
|
-
one: "less than a minute",
|
295
|
-
other: "less than {{count}} minutes"
|
296
|
-
},
|
297
|
-
xMinutes: {
|
298
|
-
one: "1 minute",
|
299
|
-
other: "{{count}} minutes"
|
300
|
-
},
|
301
|
-
aboutXHours: {
|
302
|
-
one: "about 1 hour",
|
303
|
-
other: "about {{count}} hours"
|
304
|
-
},
|
305
|
-
xHours: {
|
306
|
-
one: "1 hour",
|
307
|
-
other: "{{count}} hours"
|
308
|
-
},
|
309
|
-
xDays: {
|
310
|
-
one: "1 day",
|
311
|
-
other: "{{count}} days"
|
312
|
-
},
|
313
|
-
aboutXWeeks: {
|
314
|
-
one: "about 1 week",
|
315
|
-
other: "about {{count}} weeks"
|
316
|
-
},
|
317
|
-
xWeeks: {
|
318
|
-
one: "1 week",
|
319
|
-
other: "{{count}} weeks"
|
320
|
-
},
|
321
|
-
aboutXMonths: {
|
322
|
-
one: "about 1 month",
|
323
|
-
other: "about {{count}} months"
|
324
|
-
},
|
325
|
-
xMonths: {
|
326
|
-
one: "1 month",
|
327
|
-
other: "{{count}} months"
|
328
|
-
},
|
329
|
-
aboutXYears: {
|
330
|
-
one: "about 1 year",
|
331
|
-
other: "about {{count}} years"
|
332
|
-
},
|
333
|
-
xYears: {
|
334
|
-
one: "1 year",
|
335
|
-
other: "{{count}} years"
|
336
|
-
},
|
337
|
-
overXYears: {
|
338
|
-
one: "over 1 year",
|
339
|
-
other: "over {{count}} years"
|
340
|
-
},
|
341
|
-
almostXYears: {
|
342
|
-
one: "almost 1 year",
|
343
|
-
other: "almost {{count}} years"
|
344
|
-
}
|
345
|
-
}, we = (t, n, a) => {
|
346
|
-
let r;
|
347
|
-
const o = pe[t];
|
348
|
-
return typeof o == "string" ? r = o : n === 1 ? r = o.one : r = o.other.replace("{{count}}", n.toString()), a?.addSuffix ? a.comparison && a.comparison > 0 ? "in " + r : r + " ago" : r;
|
349
|
-
};
|
350
|
-
function _(t) {
|
351
|
-
return (n = {}) => {
|
352
|
-
const a = n.width ? String(n.width) : t.defaultWidth;
|
353
|
-
return t.formats[a] || t.formats[t.defaultWidth];
|
354
|
-
};
|
355
|
-
}
|
356
|
-
const Pe = {
|
357
|
-
full: "EEEE, MMMM do, y",
|
358
|
-
long: "MMMM do, y",
|
359
|
-
medium: "MMM d, y",
|
360
|
-
short: "MM/dd/yyyy"
|
361
|
-
}, ke = {
|
362
|
-
full: "h:mm:ss a zzzz",
|
363
|
-
long: "h:mm:ss a z",
|
364
|
-
medium: "h:mm:ss a",
|
365
|
-
short: "h:mm a"
|
366
|
-
}, Ee = {
|
367
|
-
full: "{{date}} 'at' {{time}}",
|
368
|
-
long: "{{date}} 'at' {{time}}",
|
369
|
-
medium: "{{date}}, {{time}}",
|
370
|
-
short: "{{date}}, {{time}}"
|
371
|
-
}, Me = {
|
372
|
-
date: _({
|
373
|
-
formats: Pe,
|
374
|
-
defaultWidth: "full"
|
375
|
-
}),
|
376
|
-
time: _({
|
377
|
-
formats: ke,
|
378
|
-
defaultWidth: "full"
|
379
|
-
}),
|
380
|
-
dateTime: _({
|
381
|
-
formats: Ee,
|
382
|
-
defaultWidth: "full"
|
383
|
-
})
|
384
|
-
}, Te = {
|
385
|
-
lastWeek: "'last' eeee 'at' p",
|
386
|
-
yesterday: "'yesterday at' p",
|
387
|
-
today: "'today at' p",
|
388
|
-
tomorrow: "'tomorrow at' p",
|
389
|
-
nextWeek: "eeee 'at' p",
|
390
|
-
other: "P"
|
391
|
-
}, Se = (t, n, a, r) => Te[t];
|
392
|
-
function g(t) {
|
393
|
-
return (n, a) => {
|
394
|
-
const r = a?.context ? String(a.context) : "standalone";
|
395
|
-
let o;
|
396
|
-
if (r === "formatting" && t.formattingValues) {
|
397
|
-
const u = t.defaultFormattingWidth || t.defaultWidth, l = a?.width ? String(a.width) : u;
|
398
|
-
o = t.formattingValues[l] || t.formattingValues[u];
|
399
|
-
} else {
|
400
|
-
const u = t.defaultWidth, l = a?.width ? String(a.width) : t.defaultWidth;
|
401
|
-
o = t.values[l] || t.values[u];
|
402
|
-
}
|
403
|
-
const s = t.argumentCallback ? t.argumentCallback(n) : n;
|
404
|
-
return o[s];
|
405
|
-
};
|
406
|
-
}
|
407
|
-
const _e = {
|
408
|
-
narrow: ["B", "A"],
|
409
|
-
abbreviated: ["BC", "AD"],
|
410
|
-
wide: ["Before Christ", "Anno Domini"]
|
411
|
-
}, Re = {
|
412
|
-
narrow: ["1", "2", "3", "4"],
|
413
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
414
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
415
|
-
}, je = {
|
416
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
417
|
-
abbreviated: [
|
418
|
-
"Jan",
|
419
|
-
"Feb",
|
420
|
-
"Mar",
|
421
|
-
"Apr",
|
422
|
-
"May",
|
423
|
-
"Jun",
|
424
|
-
"Jul",
|
425
|
-
"Aug",
|
426
|
-
"Sep",
|
427
|
-
"Oct",
|
428
|
-
"Nov",
|
429
|
-
"Dec"
|
430
|
-
],
|
431
|
-
wide: [
|
432
|
-
"January",
|
433
|
-
"February",
|
434
|
-
"March",
|
435
|
-
"April",
|
436
|
-
"May",
|
437
|
-
"June",
|
438
|
-
"July",
|
439
|
-
"August",
|
440
|
-
"September",
|
441
|
-
"October",
|
442
|
-
"November",
|
443
|
-
"December"
|
444
|
-
]
|
445
|
-
}, xe = {
|
446
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
447
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
448
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
449
|
-
wide: [
|
450
|
-
"Sunday",
|
451
|
-
"Monday",
|
452
|
-
"Tuesday",
|
453
|
-
"Wednesday",
|
454
|
-
"Thursday",
|
455
|
-
"Friday",
|
456
|
-
"Saturday"
|
457
|
-
]
|
458
|
-
}, We = {
|
459
|
-
narrow: {
|
460
|
-
am: "a",
|
461
|
-
pm: "p",
|
462
|
-
midnight: "mi",
|
463
|
-
noon: "n",
|
464
|
-
morning: "morning",
|
465
|
-
afternoon: "afternoon",
|
466
|
-
evening: "evening",
|
467
|
-
night: "night"
|
468
|
-
},
|
469
|
-
abbreviated: {
|
470
|
-
am: "AM",
|
471
|
-
pm: "PM",
|
472
|
-
midnight: "midnight",
|
473
|
-
noon: "noon",
|
474
|
-
morning: "morning",
|
475
|
-
afternoon: "afternoon",
|
476
|
-
evening: "evening",
|
477
|
-
night: "night"
|
478
|
-
},
|
479
|
-
wide: {
|
480
|
-
am: "a.m.",
|
481
|
-
pm: "p.m.",
|
482
|
-
midnight: "midnight",
|
483
|
-
noon: "noon",
|
484
|
-
morning: "morning",
|
485
|
-
afternoon: "afternoon",
|
486
|
-
evening: "evening",
|
487
|
-
night: "night"
|
488
|
-
}
|
489
|
-
}, Ae = {
|
490
|
-
narrow: {
|
491
|
-
am: "a",
|
492
|
-
pm: "p",
|
493
|
-
midnight: "mi",
|
494
|
-
noon: "n",
|
495
|
-
morning: "in the morning",
|
496
|
-
afternoon: "in the afternoon",
|
497
|
-
evening: "in the evening",
|
498
|
-
night: "at night"
|
499
|
-
},
|
500
|
-
abbreviated: {
|
501
|
-
am: "AM",
|
502
|
-
pm: "PM",
|
503
|
-
midnight: "midnight",
|
504
|
-
noon: "noon",
|
505
|
-
morning: "in the morning",
|
506
|
-
afternoon: "in the afternoon",
|
507
|
-
evening: "in the evening",
|
508
|
-
night: "at night"
|
509
|
-
},
|
510
|
-
wide: {
|
511
|
-
am: "a.m.",
|
512
|
-
pm: "p.m.",
|
513
|
-
midnight: "midnight",
|
514
|
-
noon: "noon",
|
515
|
-
morning: "in the morning",
|
516
|
-
afternoon: "in the afternoon",
|
517
|
-
evening: "in the evening",
|
518
|
-
night: "at night"
|
519
|
-
}
|
520
|
-
}, Ce = (t, n) => {
|
521
|
-
const a = Number(t), r = a % 100;
|
522
|
-
if (r > 20 || r < 10)
|
523
|
-
switch (r % 10) {
|
524
|
-
case 1:
|
525
|
-
return a + "st";
|
526
|
-
case 2:
|
527
|
-
return a + "nd";
|
528
|
-
case 3:
|
529
|
-
return a + "rd";
|
530
|
-
}
|
531
|
-
return a + "th";
|
532
|
-
}, Oe = {
|
533
|
-
ordinalNumber: Ce,
|
534
|
-
era: g({
|
535
|
-
values: _e,
|
536
|
-
defaultWidth: "wide"
|
537
|
-
}),
|
538
|
-
quarter: g({
|
539
|
-
values: Re,
|
540
|
-
defaultWidth: "wide",
|
541
|
-
argumentCallback: (t) => t - 1
|
542
|
-
}),
|
543
|
-
month: g({
|
544
|
-
values: je,
|
545
|
-
defaultWidth: "wide"
|
546
|
-
}),
|
547
|
-
day: g({
|
548
|
-
values: xe,
|
549
|
-
defaultWidth: "wide"
|
550
|
-
}),
|
551
|
-
dayPeriod: g({
|
552
|
-
values: We,
|
553
|
-
defaultWidth: "wide",
|
554
|
-
formattingValues: Ae,
|
555
|
-
defaultFormattingWidth: "wide"
|
556
|
-
})
|
557
|
-
};
|
558
|
-
function y(t) {
|
559
|
-
return (n, a = {}) => {
|
560
|
-
const r = a.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], s = n.match(o);
|
561
|
-
if (!s)
|
562
|
-
return null;
|
563
|
-
const u = s[0], l = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], h = Array.isArray(l) ? Ne(l, (P) => P.test(u)) : (
|
564
|
-
// [TODO] -- I challenge you to fix the type
|
565
|
-
De(l, (P) => P.test(u))
|
566
|
-
);
|
567
|
-
let v;
|
568
|
-
v = t.valueCallback ? t.valueCallback(h) : h, v = a.valueCallback ? (
|
569
|
-
// [TODO] -- I challenge you to fix the type
|
570
|
-
a.valueCallback(v)
|
571
|
-
) : v;
|
572
|
-
const E = n.slice(u.length);
|
573
|
-
return { value: v, rest: E };
|
574
|
-
};
|
575
|
-
}
|
576
|
-
function De(t, n) {
|
577
|
-
for (const a in t)
|
578
|
-
if (Object.prototype.hasOwnProperty.call(t, a) && n(t[a]))
|
579
|
-
return a;
|
580
|
-
}
|
581
|
-
function Ne(t, n) {
|
582
|
-
for (let a = 0; a < t.length; a++)
|
583
|
-
if (n(t[a]))
|
584
|
-
return a;
|
585
|
-
}
|
586
|
-
function ee(t) {
|
587
|
-
return (n, a = {}) => {
|
588
|
-
const r = n.match(t.matchPattern);
|
589
|
-
if (!r) return null;
|
590
|
-
const o = r[0], s = n.match(t.parsePattern);
|
591
|
-
if (!s) return null;
|
592
|
-
let u = t.valueCallback ? t.valueCallback(s[0]) : s[0];
|
593
|
-
u = a.valueCallback ? a.valueCallback(u) : u;
|
594
|
-
const l = n.slice(o.length);
|
595
|
-
return { value: u, rest: l };
|
596
|
-
};
|
597
|
-
}
|
598
|
-
const $e = /^(\d+)(th|st|nd|rd)?/i, Fe = /\d+/i, qe = {
|
599
|
-
narrow: /^(b|a)/i,
|
600
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
601
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
602
|
-
}, Le = {
|
603
|
-
any: [/^b/i, /^(a|c)/i]
|
604
|
-
}, Ve = {
|
605
|
-
narrow: /^[1234]/i,
|
606
|
-
abbreviated: /^q[1234]/i,
|
607
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
608
|
-
}, Ye = {
|
609
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
610
|
-
}, ze = {
|
611
|
-
narrow: /^[jfmasond]/i,
|
612
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
613
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
614
|
-
}, Ie = {
|
615
|
-
narrow: [
|
616
|
-
/^j/i,
|
617
|
-
/^f/i,
|
618
|
-
/^m/i,
|
619
|
-
/^a/i,
|
620
|
-
/^m/i,
|
621
|
-
/^j/i,
|
622
|
-
/^j/i,
|
623
|
-
/^a/i,
|
624
|
-
/^s/i,
|
625
|
-
/^o/i,
|
626
|
-
/^n/i,
|
627
|
-
/^d/i
|
628
|
-
],
|
629
|
-
any: [
|
630
|
-
/^ja/i,
|
631
|
-
/^f/i,
|
632
|
-
/^mar/i,
|
633
|
-
/^ap/i,
|
634
|
-
/^may/i,
|
635
|
-
/^jun/i,
|
636
|
-
/^jul/i,
|
637
|
-
/^au/i,
|
638
|
-
/^s/i,
|
639
|
-
/^o/i,
|
640
|
-
/^n/i,
|
641
|
-
/^d/i
|
642
|
-
]
|
643
|
-
}, Ue = {
|
644
|
-
narrow: /^[smtwf]/i,
|
645
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
646
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
647
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
648
|
-
}, Xe = {
|
649
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
650
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
651
|
-
}, Je = {
|
652
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
653
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
654
|
-
}, He = {
|
655
|
-
any: {
|
656
|
-
am: /^a/i,
|
657
|
-
pm: /^p/i,
|
658
|
-
midnight: /^mi/i,
|
659
|
-
noon: /^no/i,
|
660
|
-
morning: /morning/i,
|
661
|
-
afternoon: /afternoon/i,
|
662
|
-
evening: /evening/i,
|
663
|
-
night: /night/i
|
664
|
-
}
|
665
|
-
}, Qe = {
|
666
|
-
ordinalNumber: ee({
|
667
|
-
matchPattern: $e,
|
668
|
-
parsePattern: Fe,
|
669
|
-
valueCallback: (t) => parseInt(t, 10)
|
670
|
-
}),
|
671
|
-
era: y({
|
672
|
-
matchPatterns: qe,
|
673
|
-
defaultMatchWidth: "wide",
|
674
|
-
parsePatterns: Le,
|
675
|
-
defaultParseWidth: "any"
|
676
|
-
}),
|
677
|
-
quarter: y({
|
678
|
-
matchPatterns: Ve,
|
679
|
-
defaultMatchWidth: "wide",
|
680
|
-
parsePatterns: Ye,
|
681
|
-
defaultParseWidth: "any",
|
682
|
-
valueCallback: (t) => t + 1
|
683
|
-
}),
|
684
|
-
month: y({
|
685
|
-
matchPatterns: ze,
|
686
|
-
defaultMatchWidth: "wide",
|
687
|
-
parsePatterns: Ie,
|
688
|
-
defaultParseWidth: "any"
|
689
|
-
}),
|
690
|
-
day: y({
|
691
|
-
matchPatterns: Ue,
|
692
|
-
defaultMatchWidth: "wide",
|
693
|
-
parsePatterns: Xe,
|
694
|
-
defaultParseWidth: "any"
|
695
|
-
}),
|
696
|
-
dayPeriod: y({
|
697
|
-
matchPatterns: Je,
|
698
|
-
defaultMatchWidth: "any",
|
699
|
-
parsePatterns: He,
|
700
|
-
defaultParseWidth: "any"
|
701
|
-
})
|
702
|
-
}, Be = {
|
703
|
-
code: "en-US",
|
704
|
-
formatDistance: we,
|
705
|
-
formatLong: Me,
|
706
|
-
formatRelative: Se,
|
707
|
-
localize: Oe,
|
708
|
-
match: Qe,
|
709
|
-
options: {
|
710
|
-
weekStartsOn: 0,
|
711
|
-
firstWeekContainsDate: 1
|
712
|
-
}
|
713
|
-
}, Ge = {
|
714
|
-
lessThanXSeconds: {
|
715
|
-
one: "menos de um segundo",
|
716
|
-
other: "menos de {{count}} segundos"
|
717
|
-
},
|
718
|
-
xSeconds: {
|
719
|
-
one: "1 segundo",
|
720
|
-
other: "{{count}} segundos"
|
721
|
-
},
|
722
|
-
halfAMinute: "meio minuto",
|
723
|
-
lessThanXMinutes: {
|
724
|
-
one: "menos de um minuto",
|
725
|
-
other: "menos de {{count}} minutos"
|
726
|
-
},
|
727
|
-
xMinutes: {
|
728
|
-
one: "1 minuto",
|
729
|
-
other: "{{count}} minutos"
|
730
|
-
},
|
731
|
-
aboutXHours: {
|
732
|
-
one: "cerca de 1 hora",
|
733
|
-
other: "cerca de {{count}} horas"
|
734
|
-
},
|
735
|
-
xHours: {
|
736
|
-
one: "1 hora",
|
737
|
-
other: "{{count}} horas"
|
738
|
-
},
|
739
|
-
xDays: {
|
740
|
-
one: "1 dia",
|
741
|
-
other: "{{count}} dias"
|
742
|
-
},
|
743
|
-
aboutXWeeks: {
|
744
|
-
one: "cerca de 1 semana",
|
745
|
-
other: "cerca de {{count}} semanas"
|
746
|
-
},
|
747
|
-
xWeeks: {
|
748
|
-
one: "1 semana",
|
749
|
-
other: "{{count}} semanas"
|
750
|
-
},
|
751
|
-
aboutXMonths: {
|
752
|
-
one: "cerca de 1 mês",
|
753
|
-
other: "cerca de {{count}} meses"
|
754
|
-
},
|
755
|
-
xMonths: {
|
756
|
-
one: "1 mês",
|
757
|
-
other: "{{count}} meses"
|
758
|
-
},
|
759
|
-
aboutXYears: {
|
760
|
-
one: "cerca de 1 ano",
|
761
|
-
other: "cerca de {{count}} anos"
|
762
|
-
},
|
763
|
-
xYears: {
|
764
|
-
one: "1 ano",
|
765
|
-
other: "{{count}} anos"
|
766
|
-
},
|
767
|
-
overXYears: {
|
768
|
-
one: "mais de 1 ano",
|
769
|
-
other: "mais de {{count}} anos"
|
770
|
-
},
|
771
|
-
almostXYears: {
|
772
|
-
one: "quase 1 ano",
|
773
|
-
other: "quase {{count}} anos"
|
774
|
-
}
|
775
|
-
}, Ze = (t, n, a) => {
|
776
|
-
let r;
|
777
|
-
const o = Ge[t];
|
778
|
-
return typeof o == "string" ? r = o : n === 1 ? r = o.one : r = o.other.replace("{{count}}", String(n)), a?.addSuffix ? a.comparison && a.comparison > 0 ? "em " + r : "há " + r : r;
|
779
|
-
}, Ke = {
|
780
|
-
full: "EEEE, d 'de' MMMM 'de' y",
|
781
|
-
long: "d 'de' MMMM 'de' y",
|
782
|
-
medium: "d MMM y",
|
783
|
-
short: "dd/MM/yyyy"
|
784
|
-
}, et = {
|
785
|
-
full: "HH:mm:ss zzzz",
|
786
|
-
long: "HH:mm:ss z",
|
787
|
-
medium: "HH:mm:ss",
|
788
|
-
short: "HH:mm"
|
789
|
-
}, tt = {
|
790
|
-
full: "{{date}} 'às' {{time}}",
|
791
|
-
long: "{{date}} 'às' {{time}}",
|
792
|
-
medium: "{{date}}, {{time}}",
|
793
|
-
short: "{{date}}, {{time}}"
|
794
|
-
}, at = {
|
795
|
-
date: _({
|
796
|
-
formats: Ke,
|
797
|
-
defaultWidth: "full"
|
798
|
-
}),
|
799
|
-
time: _({
|
800
|
-
formats: et,
|
801
|
-
defaultWidth: "full"
|
802
|
-
}),
|
803
|
-
dateTime: _({
|
804
|
-
formats: tt,
|
805
|
-
defaultWidth: "full"
|
806
|
-
})
|
807
|
-
}, nt = {
|
808
|
-
lastWeek: (t) => {
|
809
|
-
const n = t.getDay();
|
810
|
-
return "'" + (n === 0 || n === 6 ? "último" : "última") + "' eeee 'às' p";
|
811
|
-
},
|
812
|
-
yesterday: "'ontem às' p",
|
813
|
-
today: "'hoje às' p",
|
814
|
-
tomorrow: "'amanhã às' p",
|
815
|
-
nextWeek: "eeee 'às' p",
|
816
|
-
other: "P"
|
817
|
-
}, rt = (t, n, a, r) => {
|
818
|
-
const o = nt[t];
|
819
|
-
return typeof o == "function" ? o(n) : o;
|
820
|
-
}, ot = {
|
821
|
-
narrow: ["AC", "DC"],
|
822
|
-
abbreviated: ["AC", "DC"],
|
823
|
-
wide: ["antes de cristo", "depois de cristo"]
|
824
|
-
}, it = {
|
825
|
-
narrow: ["1", "2", "3", "4"],
|
826
|
-
abbreviated: ["T1", "T2", "T3", "T4"],
|
827
|
-
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"]
|
828
|
-
}, st = {
|
829
|
-
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
830
|
-
abbreviated: [
|
831
|
-
"jan",
|
832
|
-
"fev",
|
833
|
-
"mar",
|
834
|
-
"abr",
|
835
|
-
"mai",
|
836
|
-
"jun",
|
837
|
-
"jul",
|
838
|
-
"ago",
|
839
|
-
"set",
|
840
|
-
"out",
|
841
|
-
"nov",
|
842
|
-
"dez"
|
843
|
-
],
|
844
|
-
wide: [
|
845
|
-
"janeiro",
|
846
|
-
"fevereiro",
|
847
|
-
"março",
|
848
|
-
"abril",
|
849
|
-
"maio",
|
850
|
-
"junho",
|
851
|
-
"julho",
|
852
|
-
"agosto",
|
853
|
-
"setembro",
|
854
|
-
"outubro",
|
855
|
-
"novembro",
|
856
|
-
"dezembro"
|
857
|
-
]
|
858
|
-
}, ut = {
|
859
|
-
narrow: ["D", "S", "T", "Q", "Q", "S", "S"],
|
860
|
-
short: ["dom", "seg", "ter", "qua", "qui", "sex", "sab"],
|
861
|
-
abbreviated: [
|
862
|
-
"domingo",
|
863
|
-
"segunda",
|
864
|
-
"terça",
|
865
|
-
"quarta",
|
866
|
-
"quinta",
|
867
|
-
"sexta",
|
868
|
-
"sábado"
|
869
|
-
],
|
870
|
-
wide: [
|
871
|
-
"domingo",
|
872
|
-
"segunda-feira",
|
873
|
-
"terça-feira",
|
874
|
-
"quarta-feira",
|
875
|
-
"quinta-feira",
|
876
|
-
"sexta-feira",
|
877
|
-
"sábado"
|
878
|
-
]
|
879
|
-
}, dt = {
|
880
|
-
narrow: {
|
881
|
-
am: "a",
|
882
|
-
pm: "p",
|
883
|
-
midnight: "mn",
|
884
|
-
noon: "md",
|
885
|
-
morning: "manhã",
|
886
|
-
afternoon: "tarde",
|
887
|
-
evening: "tarde",
|
888
|
-
night: "noite"
|
889
|
-
},
|
890
|
-
abbreviated: {
|
891
|
-
am: "AM",
|
892
|
-
pm: "PM",
|
893
|
-
midnight: "meia-noite",
|
894
|
-
noon: "meio-dia",
|
895
|
-
morning: "manhã",
|
896
|
-
afternoon: "tarde",
|
897
|
-
evening: "tarde",
|
898
|
-
night: "noite"
|
899
|
-
},
|
900
|
-
wide: {
|
901
|
-
am: "a.m.",
|
902
|
-
pm: "p.m.",
|
903
|
-
midnight: "meia-noite",
|
904
|
-
noon: "meio-dia",
|
905
|
-
morning: "manhã",
|
906
|
-
afternoon: "tarde",
|
907
|
-
evening: "tarde",
|
908
|
-
night: "noite"
|
909
|
-
}
|
910
|
-
}, ct = {
|
911
|
-
narrow: {
|
912
|
-
am: "a",
|
913
|
-
pm: "p",
|
914
|
-
midnight: "mn",
|
915
|
-
noon: "md",
|
916
|
-
morning: "da manhã",
|
917
|
-
afternoon: "da tarde",
|
918
|
-
evening: "da tarde",
|
919
|
-
night: "da noite"
|
920
|
-
},
|
921
|
-
abbreviated: {
|
922
|
-
am: "AM",
|
923
|
-
pm: "PM",
|
924
|
-
midnight: "meia-noite",
|
925
|
-
noon: "meio-dia",
|
926
|
-
morning: "da manhã",
|
927
|
-
afternoon: "da tarde",
|
928
|
-
evening: "da tarde",
|
929
|
-
night: "da noite"
|
930
|
-
},
|
931
|
-
wide: {
|
932
|
-
am: "a.m.",
|
933
|
-
pm: "p.m.",
|
934
|
-
midnight: "meia-noite",
|
935
|
-
noon: "meio-dia",
|
936
|
-
morning: "da manhã",
|
937
|
-
afternoon: "da tarde",
|
938
|
-
evening: "da tarde",
|
939
|
-
night: "da noite"
|
940
|
-
}
|
941
|
-
}, lt = (t, n) => {
|
942
|
-
const a = Number(t);
|
943
|
-
return n?.unit === "week" ? a + "ª" : a + "º";
|
944
|
-
}, mt = {
|
945
|
-
ordinalNumber: lt,
|
946
|
-
era: g({
|
947
|
-
values: ot,
|
948
|
-
defaultWidth: "wide"
|
949
|
-
}),
|
950
|
-
quarter: g({
|
951
|
-
values: it,
|
952
|
-
defaultWidth: "wide",
|
953
|
-
argumentCallback: (t) => t - 1
|
954
|
-
}),
|
955
|
-
month: g({
|
956
|
-
values: st,
|
957
|
-
defaultWidth: "wide"
|
958
|
-
}),
|
959
|
-
day: g({
|
960
|
-
values: ut,
|
961
|
-
defaultWidth: "wide"
|
962
|
-
}),
|
963
|
-
dayPeriod: g({
|
964
|
-
values: dt,
|
965
|
-
defaultWidth: "wide",
|
966
|
-
formattingValues: ct,
|
967
|
-
defaultFormattingWidth: "wide"
|
968
|
-
})
|
969
|
-
}, ft = /^(\d+)[ºªo]?/i, ht = /\d+/i, bt = {
|
970
|
-
narrow: /^(ac|dc|a|d)/i,
|
971
|
-
abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
|
972
|
-
wide: /^(antes de cristo|depois de cristo)/i
|
973
|
-
}, gt = {
|
974
|
-
any: [/^ac/i, /^dc/i],
|
975
|
-
wide: [/^antes de cristo/i, /^depois de cristo/i]
|
976
|
-
}, yt = {
|
977
|
-
narrow: /^[1234]/i,
|
978
|
-
abbreviated: /^T[1234]/i,
|
979
|
-
wide: /^[1234](º)? trimestre/i
|
980
|
-
}, vt = {
|
981
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
982
|
-
}, pt = {
|
983
|
-
narrow: /^[jfmajsond]/i,
|
984
|
-
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
|
985
|
-
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
|
986
|
-
}, wt = {
|
987
|
-
narrow: [
|
988
|
-
/^j/i,
|
989
|
-
/^f/i,
|
990
|
-
/^m/i,
|
991
|
-
/^a/i,
|
992
|
-
/^m/i,
|
993
|
-
/^j/i,
|
994
|
-
/^j/i,
|
995
|
-
/^a/i,
|
996
|
-
/^s/i,
|
997
|
-
/^o/i,
|
998
|
-
/^n/i,
|
999
|
-
/^d/i
|
1000
|
-
],
|
1001
|
-
any: [
|
1002
|
-
/^ja/i,
|
1003
|
-
/^fev/i,
|
1004
|
-
/^mar/i,
|
1005
|
-
/^abr/i,
|
1006
|
-
/^mai/i,
|
1007
|
-
/^jun/i,
|
1008
|
-
/^jul/i,
|
1009
|
-
/^ago/i,
|
1010
|
-
/^set/i,
|
1011
|
-
/^out/i,
|
1012
|
-
/^nov/i,
|
1013
|
-
/^dez/i
|
1014
|
-
]
|
1015
|
-
}, Pt = {
|
1016
|
-
narrow: /^(dom|[23456]ª?|s[aá]b)/i,
|
1017
|
-
short: /^(dom|[23456]ª?|s[aá]b)/i,
|
1018
|
-
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,
|
1019
|
-
wide: /^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i
|
1020
|
-
}, kt = {
|
1021
|
-
short: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
1022
|
-
narrow: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
1023
|
-
any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[aá]b/i]
|
1024
|
-
}, Et = {
|
1025
|
-
narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,
|
1026
|
-
any: /^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i
|
1027
|
-
}, Mt = {
|
1028
|
-
any: {
|
1029
|
-
am: /^a/i,
|
1030
|
-
pm: /^p/i,
|
1031
|
-
midnight: /^mn|^meia[-\s]noite/i,
|
1032
|
-
noon: /^md|^meio[-\s]dia/i,
|
1033
|
-
morning: /manhã/i,
|
1034
|
-
afternoon: /tarde/i,
|
1035
|
-
evening: /tarde/i,
|
1036
|
-
night: /noite/i
|
1037
|
-
}
|
1038
|
-
}, Tt = {
|
1039
|
-
ordinalNumber: ee({
|
1040
|
-
matchPattern: ft,
|
1041
|
-
parsePattern: ht,
|
1042
|
-
valueCallback: (t) => parseInt(t, 10)
|
1043
|
-
}),
|
1044
|
-
era: y({
|
1045
|
-
matchPatterns: bt,
|
1046
|
-
defaultMatchWidth: "wide",
|
1047
|
-
parsePatterns: gt,
|
1048
|
-
defaultParseWidth: "any"
|
1049
|
-
}),
|
1050
|
-
quarter: y({
|
1051
|
-
matchPatterns: yt,
|
1052
|
-
defaultMatchWidth: "wide",
|
1053
|
-
parsePatterns: vt,
|
1054
|
-
defaultParseWidth: "any",
|
1055
|
-
valueCallback: (t) => t + 1
|
1056
|
-
}),
|
1057
|
-
month: y({
|
1058
|
-
matchPatterns: pt,
|
1059
|
-
defaultMatchWidth: "wide",
|
1060
|
-
parsePatterns: wt,
|
1061
|
-
defaultParseWidth: "any"
|
1062
|
-
}),
|
1063
|
-
day: y({
|
1064
|
-
matchPatterns: Pt,
|
1065
|
-
defaultMatchWidth: "wide",
|
1066
|
-
parsePatterns: kt,
|
1067
|
-
defaultParseWidth: "any"
|
1068
|
-
}),
|
1069
|
-
dayPeriod: y({
|
1070
|
-
matchPatterns: Et,
|
1071
|
-
defaultMatchWidth: "any",
|
1072
|
-
parsePatterns: Mt,
|
1073
|
-
defaultParseWidth: "any"
|
1074
|
-
})
|
1075
|
-
}, St = {
|
1076
|
-
code: "pt-BR",
|
1077
|
-
formatDistance: Ze,
|
1078
|
-
formatLong: at,
|
1079
|
-
formatRelative: rt,
|
1080
|
-
localize: mt,
|
1081
|
-
match: Tt,
|
1082
|
-
options: {
|
1083
|
-
weekStartsOn: 0,
|
1084
|
-
firstWeekContainsDate: 1
|
1085
|
-
}
|
1086
|
-
}, B = {
|
1087
|
-
ptBR: St,
|
1088
|
-
enUS: Be
|
1089
|
-
}, te = G({
|
1090
|
-
locale: void 0
|
1091
|
-
});
|
1092
|
-
function Rt() {
|
1093
|
-
return Z(te);
|
1094
|
-
}
|
1095
|
-
function jt({
|
1096
|
-
locale: t,
|
1097
|
-
children: n
|
1098
|
-
}) {
|
1099
|
-
const [a, r] = F(B[t]);
|
1100
|
-
q(() => {
|
1101
|
-
r(B[t]);
|
1102
|
-
}, [t]);
|
1103
|
-
const o = { locale: a };
|
1104
|
-
return /* @__PURE__ */ K.jsx(te.Provider, { value: o, children: n });
|
1105
|
-
}
|
1106
|
-
const S = {
|
1107
|
-
id: "",
|
1108
|
-
username: "",
|
1109
|
-
email: "",
|
1110
|
-
created_at: null,
|
1111
|
-
updated_at: null,
|
1112
|
-
features: []
|
1113
|
-
}, W = {
|
1114
|
-
id: "123456",
|
1115
|
-
username: "admin",
|
1116
|
-
email: "admin@admin.com",
|
1117
|
-
created_at: /* @__PURE__ */ new Date(),
|
1118
|
-
updated_at: /* @__PURE__ */ new Date(),
|
1119
|
-
features: ["features"]
|
1120
|
-
}, ae = G({
|
1121
|
-
user: S,
|
1122
|
-
isLoading: !0,
|
1123
|
-
fetchUser: async () => {
|
1124
|
-
},
|
1125
|
-
logout: async () => {
|
1126
|
-
},
|
1127
|
-
login: async () => !1
|
1128
|
-
});
|
1129
|
-
function xt({
|
1130
|
-
children: t,
|
1131
|
-
sessionEndPoint: n,
|
1132
|
-
userEndPoint: a,
|
1133
|
-
useMock: r = !1
|
1134
|
-
}) {
|
1135
|
-
const [o, s] = F(S), [u, l] = F(!0), h = $(async () => {
|
1136
|
-
try {
|
1137
|
-
const c = await fetch(a), p = await c.json();
|
1138
|
-
if (c.status == 200) {
|
1139
|
-
const w = p;
|
1140
|
-
s(w), localStorage.setItem("user", JSON.stringify(w));
|
1141
|
-
} else
|
1142
|
-
s(S), localStorage.removeItem("user");
|
1143
|
-
} catch (c) {
|
1144
|
-
console.log(c);
|
1145
|
-
}
|
1146
|
-
}, [a]);
|
1147
|
-
q(() => {
|
1148
|
-
const c = localStorage.getItem("user");
|
1149
|
-
(async () => (c && u && await h(), l(!1)))();
|
1150
|
-
}, [h, u]);
|
1151
|
-
const v = $(async () => {
|
1152
|
-
try {
|
1153
|
-
if ((await fetch(n, {
|
1154
|
-
method: "DELETE",
|
1155
|
-
credentials: "include"
|
1156
|
-
})).status == 200) {
|
1157
|
-
const p = localStorage.getItem("theme") || "system";
|
1158
|
-
localStorage.clear(), localStorage.setItem("theme", p), s(S), l(!1);
|
1159
|
-
}
|
1160
|
-
} catch (c) {
|
1161
|
-
console.log(c);
|
1162
|
-
}
|
1163
|
-
}, [n]), E = $(
|
1164
|
-
async (c, p) => {
|
1165
|
-
try {
|
1166
|
-
return (await fetch(n, {
|
1167
|
-
method: "POST",
|
1168
|
-
headers: {
|
1169
|
-
"Content-Type": "application/json"
|
1170
|
-
},
|
1171
|
-
body: JSON.stringify({
|
1172
|
-
email: c,
|
1173
|
-
password: p
|
1174
|
-
})
|
1175
|
-
})).status === 201 ? (h(), !0) : !1;
|
1176
|
-
} catch (w) {
|
1177
|
-
return console.log(w), !1;
|
1178
|
-
}
|
1179
|
-
},
|
1180
|
-
[h, n]
|
1181
|
-
);
|
1182
|
-
q(() => {
|
1183
|
-
const c = localStorage.getItem("user");
|
1184
|
-
c && s(JSON.parse(c));
|
1185
|
-
}, [h]);
|
1186
|
-
const P = {
|
1187
|
-
user: o,
|
1188
|
-
isLoading: u,
|
1189
|
-
fetchUser: h,
|
1190
|
-
logout: v,
|
1191
|
-
login: E
|
1192
|
-
}, M = {
|
1193
|
-
user: o,
|
1194
|
-
isLoading: u,
|
1195
|
-
fetchUser: async () => {
|
1196
|
-
s(W), console.log(W);
|
1197
|
-
},
|
1198
|
-
logout: async () => {
|
1199
|
-
s(S), console.log(S);
|
1200
|
-
},
|
1201
|
-
login: async (c, p) => (console.log(c, p), s(W), console.log(W), !0)
|
1202
|
-
};
|
1203
|
-
return /* @__PURE__ */ K.jsx(
|
1204
|
-
ae.Provider,
|
1205
|
-
{
|
1206
|
-
value: r ? M : P,
|
1207
|
-
children: t
|
1208
|
-
}
|
1209
|
-
);
|
1210
|
-
}
|
1211
|
-
function Wt() {
|
1212
|
-
return Z(ae);
|
1213
|
-
}
|
1214
|
-
export {
|
1215
|
-
jt as L,
|
1216
|
-
xt as U,
|
1217
|
-
Wt as a,
|
1218
|
-
Be as e,
|
1219
|
-
K as j,
|
1220
|
-
Rt as u
|
1221
|
-
};
|