wcz-test 1.10.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3163 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -2
- package/dist/index.d.ts +156 -2
- package/dist/index.js +3156 -4
- package/dist/index.js.map +1 -1
- package/package.json +30 -13
- package/README.md +0 -72
package/dist/index.cjs
CHANGED
|
@@ -1,36 +1,3190 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
6
11
|
var __export = (target, all) => {
|
|
7
12
|
for (var name in all)
|
|
8
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
14
|
};
|
|
10
|
-
var __copyProps = (to,
|
|
11
|
-
if (
|
|
12
|
-
for (let key of __getOwnPropNames(
|
|
15
|
+
var __copyProps = (to, from2, except, desc) => {
|
|
16
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from2))
|
|
13
18
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () =>
|
|
19
|
+
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
|
|
15
20
|
}
|
|
16
21
|
return to;
|
|
17
22
|
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
+
mod
|
|
30
|
+
));
|
|
18
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
32
|
|
|
33
|
+
// node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js
|
|
34
|
+
var require_react_is_production_min = __commonJS({
|
|
35
|
+
"node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
|
|
36
|
+
"use strict";
|
|
37
|
+
var b = "function" === typeof Symbol && Symbol.for;
|
|
38
|
+
var c = b ? Symbol.for("react.element") : 60103;
|
|
39
|
+
var d = b ? Symbol.for("react.portal") : 60106;
|
|
40
|
+
var e = b ? Symbol.for("react.fragment") : 60107;
|
|
41
|
+
var f = b ? Symbol.for("react.strict_mode") : 60108;
|
|
42
|
+
var g = b ? Symbol.for("react.profiler") : 60114;
|
|
43
|
+
var h = b ? Symbol.for("react.provider") : 60109;
|
|
44
|
+
var k = b ? Symbol.for("react.context") : 60110;
|
|
45
|
+
var l = b ? Symbol.for("react.async_mode") : 60111;
|
|
46
|
+
var m = b ? Symbol.for("react.concurrent_mode") : 60111;
|
|
47
|
+
var n = b ? Symbol.for("react.forward_ref") : 60112;
|
|
48
|
+
var p = b ? Symbol.for("react.suspense") : 60113;
|
|
49
|
+
var q = b ? Symbol.for("react.suspense_list") : 60120;
|
|
50
|
+
var r = b ? Symbol.for("react.memo") : 60115;
|
|
51
|
+
var t = b ? Symbol.for("react.lazy") : 60116;
|
|
52
|
+
var v = b ? Symbol.for("react.block") : 60121;
|
|
53
|
+
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
54
|
+
var x = b ? Symbol.for("react.responder") : 60118;
|
|
55
|
+
var y = b ? Symbol.for("react.scope") : 60119;
|
|
56
|
+
function z2(a) {
|
|
57
|
+
if ("object" === typeof a && null !== a) {
|
|
58
|
+
var u = a.$$typeof;
|
|
59
|
+
switch (u) {
|
|
60
|
+
case c:
|
|
61
|
+
switch (a = a.type, a) {
|
|
62
|
+
case l:
|
|
63
|
+
case m:
|
|
64
|
+
case e:
|
|
65
|
+
case g:
|
|
66
|
+
case f:
|
|
67
|
+
case p:
|
|
68
|
+
return a;
|
|
69
|
+
default:
|
|
70
|
+
switch (a = a && a.$$typeof, a) {
|
|
71
|
+
case k:
|
|
72
|
+
case n:
|
|
73
|
+
case t:
|
|
74
|
+
case r:
|
|
75
|
+
case h:
|
|
76
|
+
return a;
|
|
77
|
+
default:
|
|
78
|
+
return u;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
case d:
|
|
82
|
+
return u;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function A(a) {
|
|
87
|
+
return z2(a) === m;
|
|
88
|
+
}
|
|
89
|
+
exports2.AsyncMode = l;
|
|
90
|
+
exports2.ConcurrentMode = m;
|
|
91
|
+
exports2.ContextConsumer = k;
|
|
92
|
+
exports2.ContextProvider = h;
|
|
93
|
+
exports2.Element = c;
|
|
94
|
+
exports2.ForwardRef = n;
|
|
95
|
+
exports2.Fragment = e;
|
|
96
|
+
exports2.Lazy = t;
|
|
97
|
+
exports2.Memo = r;
|
|
98
|
+
exports2.Portal = d;
|
|
99
|
+
exports2.Profiler = g;
|
|
100
|
+
exports2.StrictMode = f;
|
|
101
|
+
exports2.Suspense = p;
|
|
102
|
+
exports2.isAsyncMode = function(a) {
|
|
103
|
+
return A(a) || z2(a) === l;
|
|
104
|
+
};
|
|
105
|
+
exports2.isConcurrentMode = A;
|
|
106
|
+
exports2.isContextConsumer = function(a) {
|
|
107
|
+
return z2(a) === k;
|
|
108
|
+
};
|
|
109
|
+
exports2.isContextProvider = function(a) {
|
|
110
|
+
return z2(a) === h;
|
|
111
|
+
};
|
|
112
|
+
exports2.isElement = function(a) {
|
|
113
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
114
|
+
};
|
|
115
|
+
exports2.isForwardRef = function(a) {
|
|
116
|
+
return z2(a) === n;
|
|
117
|
+
};
|
|
118
|
+
exports2.isFragment = function(a) {
|
|
119
|
+
return z2(a) === e;
|
|
120
|
+
};
|
|
121
|
+
exports2.isLazy = function(a) {
|
|
122
|
+
return z2(a) === t;
|
|
123
|
+
};
|
|
124
|
+
exports2.isMemo = function(a) {
|
|
125
|
+
return z2(a) === r;
|
|
126
|
+
};
|
|
127
|
+
exports2.isPortal = function(a) {
|
|
128
|
+
return z2(a) === d;
|
|
129
|
+
};
|
|
130
|
+
exports2.isProfiler = function(a) {
|
|
131
|
+
return z2(a) === g;
|
|
132
|
+
};
|
|
133
|
+
exports2.isStrictMode = function(a) {
|
|
134
|
+
return z2(a) === f;
|
|
135
|
+
};
|
|
136
|
+
exports2.isSuspense = function(a) {
|
|
137
|
+
return z2(a) === p;
|
|
138
|
+
};
|
|
139
|
+
exports2.isValidElementType = function(a) {
|
|
140
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
141
|
+
};
|
|
142
|
+
exports2.typeOf = z2;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
|
|
147
|
+
var require_react_is_development = __commonJS({
|
|
148
|
+
"node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"(exports2) {
|
|
149
|
+
"use strict";
|
|
150
|
+
if (process.env.NODE_ENV !== "production") {
|
|
151
|
+
(function() {
|
|
152
|
+
"use strict";
|
|
153
|
+
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
154
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
155
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
156
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
157
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
158
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
159
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
160
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
161
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
162
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
163
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
164
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
165
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
166
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
167
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
168
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
169
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
170
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
171
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
172
|
+
function isValidElementType(type) {
|
|
173
|
+
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
174
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
175
|
+
}
|
|
176
|
+
function typeOf(object) {
|
|
177
|
+
if (typeof object === "object" && object !== null) {
|
|
178
|
+
var $$typeof = object.$$typeof;
|
|
179
|
+
switch ($$typeof) {
|
|
180
|
+
case REACT_ELEMENT_TYPE:
|
|
181
|
+
var type = object.type;
|
|
182
|
+
switch (type) {
|
|
183
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
184
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
185
|
+
case REACT_FRAGMENT_TYPE:
|
|
186
|
+
case REACT_PROFILER_TYPE:
|
|
187
|
+
case REACT_STRICT_MODE_TYPE:
|
|
188
|
+
case REACT_SUSPENSE_TYPE:
|
|
189
|
+
return type;
|
|
190
|
+
default:
|
|
191
|
+
var $$typeofType = type && type.$$typeof;
|
|
192
|
+
switch ($$typeofType) {
|
|
193
|
+
case REACT_CONTEXT_TYPE:
|
|
194
|
+
case REACT_FORWARD_REF_TYPE:
|
|
195
|
+
case REACT_LAZY_TYPE:
|
|
196
|
+
case REACT_MEMO_TYPE:
|
|
197
|
+
case REACT_PROVIDER_TYPE:
|
|
198
|
+
return $$typeofType;
|
|
199
|
+
default:
|
|
200
|
+
return $$typeof;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
case REACT_PORTAL_TYPE:
|
|
204
|
+
return $$typeof;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return void 0;
|
|
208
|
+
}
|
|
209
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
210
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
211
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
212
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
213
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
214
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
215
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
216
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
217
|
+
var Memo = REACT_MEMO_TYPE;
|
|
218
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
219
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
220
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
221
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
222
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
223
|
+
function isAsyncMode(object) {
|
|
224
|
+
{
|
|
225
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
226
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
227
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
231
|
+
}
|
|
232
|
+
function isConcurrentMode(object) {
|
|
233
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
234
|
+
}
|
|
235
|
+
function isContextConsumer(object) {
|
|
236
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
237
|
+
}
|
|
238
|
+
function isContextProvider(object) {
|
|
239
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
240
|
+
}
|
|
241
|
+
function isElement(object) {
|
|
242
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
243
|
+
}
|
|
244
|
+
function isForwardRef(object) {
|
|
245
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
246
|
+
}
|
|
247
|
+
function isFragment(object) {
|
|
248
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
249
|
+
}
|
|
250
|
+
function isLazy(object) {
|
|
251
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
252
|
+
}
|
|
253
|
+
function isMemo(object) {
|
|
254
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
255
|
+
}
|
|
256
|
+
function isPortal(object) {
|
|
257
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
258
|
+
}
|
|
259
|
+
function isProfiler(object) {
|
|
260
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
261
|
+
}
|
|
262
|
+
function isStrictMode(object) {
|
|
263
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
264
|
+
}
|
|
265
|
+
function isSuspense(object) {
|
|
266
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
267
|
+
}
|
|
268
|
+
exports2.AsyncMode = AsyncMode;
|
|
269
|
+
exports2.ConcurrentMode = ConcurrentMode;
|
|
270
|
+
exports2.ContextConsumer = ContextConsumer;
|
|
271
|
+
exports2.ContextProvider = ContextProvider;
|
|
272
|
+
exports2.Element = Element;
|
|
273
|
+
exports2.ForwardRef = ForwardRef;
|
|
274
|
+
exports2.Fragment = Fragment;
|
|
275
|
+
exports2.Lazy = Lazy;
|
|
276
|
+
exports2.Memo = Memo;
|
|
277
|
+
exports2.Portal = Portal;
|
|
278
|
+
exports2.Profiler = Profiler;
|
|
279
|
+
exports2.StrictMode = StrictMode;
|
|
280
|
+
exports2.Suspense = Suspense;
|
|
281
|
+
exports2.isAsyncMode = isAsyncMode;
|
|
282
|
+
exports2.isConcurrentMode = isConcurrentMode;
|
|
283
|
+
exports2.isContextConsumer = isContextConsumer;
|
|
284
|
+
exports2.isContextProvider = isContextProvider;
|
|
285
|
+
exports2.isElement = isElement;
|
|
286
|
+
exports2.isForwardRef = isForwardRef;
|
|
287
|
+
exports2.isFragment = isFragment;
|
|
288
|
+
exports2.isLazy = isLazy;
|
|
289
|
+
exports2.isMemo = isMemo;
|
|
290
|
+
exports2.isPortal = isPortal;
|
|
291
|
+
exports2.isProfiler = isProfiler;
|
|
292
|
+
exports2.isStrictMode = isStrictMode;
|
|
293
|
+
exports2.isSuspense = isSuspense;
|
|
294
|
+
exports2.isValidElementType = isValidElementType;
|
|
295
|
+
exports2.typeOf = typeOf;
|
|
296
|
+
})();
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
// node_modules/prop-types/node_modules/react-is/index.js
|
|
302
|
+
var require_react_is = __commonJS({
|
|
303
|
+
"node_modules/prop-types/node_modules/react-is/index.js"(exports2, module2) {
|
|
304
|
+
"use strict";
|
|
305
|
+
if (process.env.NODE_ENV === "production") {
|
|
306
|
+
module2.exports = require_react_is_production_min();
|
|
307
|
+
} else {
|
|
308
|
+
module2.exports = require_react_is_development();
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// node_modules/object-assign/index.js
|
|
314
|
+
var require_object_assign = __commonJS({
|
|
315
|
+
"node_modules/object-assign/index.js"(exports2, module2) {
|
|
316
|
+
"use strict";
|
|
317
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
318
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
319
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
320
|
+
function toObject(val) {
|
|
321
|
+
if (val === null || val === void 0) {
|
|
322
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
323
|
+
}
|
|
324
|
+
return Object(val);
|
|
325
|
+
}
|
|
326
|
+
function shouldUseNative() {
|
|
327
|
+
try {
|
|
328
|
+
if (!Object.assign) {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
var test1 = new String("abc");
|
|
332
|
+
test1[5] = "de";
|
|
333
|
+
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
var test2 = {};
|
|
337
|
+
for (var i = 0; i < 10; i++) {
|
|
338
|
+
test2["_" + String.fromCharCode(i)] = i;
|
|
339
|
+
}
|
|
340
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
341
|
+
return test2[n];
|
|
342
|
+
});
|
|
343
|
+
if (order2.join("") !== "0123456789") {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
var test3 = {};
|
|
347
|
+
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
348
|
+
test3[letter] = letter;
|
|
349
|
+
});
|
|
350
|
+
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
return true;
|
|
354
|
+
} catch (err) {
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
module2.exports = shouldUseNative() ? Object.assign : function(target, source) {
|
|
359
|
+
var from2;
|
|
360
|
+
var to = toObject(target);
|
|
361
|
+
var symbols;
|
|
362
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
363
|
+
from2 = Object(arguments[s]);
|
|
364
|
+
for (var key in from2) {
|
|
365
|
+
if (hasOwnProperty.call(from2, key)) {
|
|
366
|
+
to[key] = from2[key];
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
if (getOwnPropertySymbols) {
|
|
370
|
+
symbols = getOwnPropertySymbols(from2);
|
|
371
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
372
|
+
if (propIsEnumerable.call(from2, symbols[i])) {
|
|
373
|
+
to[symbols[i]] = from2[symbols[i]];
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return to;
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
// node_modules/prop-types/lib/ReactPropTypesSecret.js
|
|
384
|
+
var require_ReactPropTypesSecret = __commonJS({
|
|
385
|
+
"node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports2, module2) {
|
|
386
|
+
"use strict";
|
|
387
|
+
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
388
|
+
module2.exports = ReactPropTypesSecret;
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
// node_modules/prop-types/lib/has.js
|
|
393
|
+
var require_has = __commonJS({
|
|
394
|
+
"node_modules/prop-types/lib/has.js"(exports2, module2) {
|
|
395
|
+
"use strict";
|
|
396
|
+
module2.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
// node_modules/prop-types/checkPropTypes.js
|
|
401
|
+
var require_checkPropTypes = __commonJS({
|
|
402
|
+
"node_modules/prop-types/checkPropTypes.js"(exports2, module2) {
|
|
403
|
+
"use strict";
|
|
404
|
+
var printWarning = function() {
|
|
405
|
+
};
|
|
406
|
+
if (process.env.NODE_ENV !== "production") {
|
|
407
|
+
ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
408
|
+
loggedTypeFailures = {};
|
|
409
|
+
has = require_has();
|
|
410
|
+
printWarning = function(text) {
|
|
411
|
+
var message = "Warning: " + text;
|
|
412
|
+
if (typeof console !== "undefined") {
|
|
413
|
+
console.error(message);
|
|
414
|
+
}
|
|
415
|
+
try {
|
|
416
|
+
throw new Error(message);
|
|
417
|
+
} catch (x) {
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
var ReactPropTypesSecret;
|
|
422
|
+
var loggedTypeFailures;
|
|
423
|
+
var has;
|
|
424
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
425
|
+
if (process.env.NODE_ENV !== "production") {
|
|
426
|
+
for (var typeSpecName in typeSpecs) {
|
|
427
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
428
|
+
var error;
|
|
429
|
+
try {
|
|
430
|
+
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
431
|
+
var err = Error(
|
|
432
|
+
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
433
|
+
);
|
|
434
|
+
err.name = "Invariant Violation";
|
|
435
|
+
throw err;
|
|
436
|
+
}
|
|
437
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
438
|
+
} catch (ex) {
|
|
439
|
+
error = ex;
|
|
440
|
+
}
|
|
441
|
+
if (error && !(error instanceof Error)) {
|
|
442
|
+
printWarning(
|
|
443
|
+
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
447
|
+
loggedTypeFailures[error.message] = true;
|
|
448
|
+
var stack = getStack ? getStack() : "";
|
|
449
|
+
printWarning(
|
|
450
|
+
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
checkPropTypes.resetWarningCache = function() {
|
|
458
|
+
if (process.env.NODE_ENV !== "production") {
|
|
459
|
+
loggedTypeFailures = {};
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
module2.exports = checkPropTypes;
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
// node_modules/prop-types/factoryWithTypeCheckers.js
|
|
467
|
+
var require_factoryWithTypeCheckers = __commonJS({
|
|
468
|
+
"node_modules/prop-types/factoryWithTypeCheckers.js"(exports2, module2) {
|
|
469
|
+
"use strict";
|
|
470
|
+
var ReactIs = require_react_is();
|
|
471
|
+
var assign2 = require_object_assign();
|
|
472
|
+
var ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
473
|
+
var has = require_has();
|
|
474
|
+
var checkPropTypes = require_checkPropTypes();
|
|
475
|
+
var printWarning = function() {
|
|
476
|
+
};
|
|
477
|
+
if (process.env.NODE_ENV !== "production") {
|
|
478
|
+
printWarning = function(text) {
|
|
479
|
+
var message = "Warning: " + text;
|
|
480
|
+
if (typeof console !== "undefined") {
|
|
481
|
+
console.error(message);
|
|
482
|
+
}
|
|
483
|
+
try {
|
|
484
|
+
throw new Error(message);
|
|
485
|
+
} catch (x) {
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
function emptyFunctionThatReturnsNull() {
|
|
490
|
+
return null;
|
|
491
|
+
}
|
|
492
|
+
module2.exports = function(isValidElement, throwOnDirectAccess) {
|
|
493
|
+
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
494
|
+
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
495
|
+
function getIteratorFn(maybeIterable) {
|
|
496
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
497
|
+
if (typeof iteratorFn === "function") {
|
|
498
|
+
return iteratorFn;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
var ANONYMOUS = "<<anonymous>>";
|
|
502
|
+
var ReactPropTypes = {
|
|
503
|
+
array: createPrimitiveTypeChecker("array"),
|
|
504
|
+
bigint: createPrimitiveTypeChecker("bigint"),
|
|
505
|
+
bool: createPrimitiveTypeChecker("boolean"),
|
|
506
|
+
func: createPrimitiveTypeChecker("function"),
|
|
507
|
+
number: createPrimitiveTypeChecker("number"),
|
|
508
|
+
object: createPrimitiveTypeChecker("object"),
|
|
509
|
+
string: createPrimitiveTypeChecker("string"),
|
|
510
|
+
symbol: createPrimitiveTypeChecker("symbol"),
|
|
511
|
+
any: createAnyTypeChecker(),
|
|
512
|
+
arrayOf: createArrayOfTypeChecker,
|
|
513
|
+
element: createElementTypeChecker(),
|
|
514
|
+
elementType: createElementTypeTypeChecker(),
|
|
515
|
+
instanceOf: createInstanceTypeChecker,
|
|
516
|
+
node: createNodeChecker(),
|
|
517
|
+
objectOf: createObjectOfTypeChecker,
|
|
518
|
+
oneOf: createEnumTypeChecker,
|
|
519
|
+
oneOfType: createUnionTypeChecker,
|
|
520
|
+
shape: createShapeTypeChecker,
|
|
521
|
+
exact: createStrictShapeTypeChecker
|
|
522
|
+
};
|
|
523
|
+
function is(x, y) {
|
|
524
|
+
if (x === y) {
|
|
525
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
526
|
+
} else {
|
|
527
|
+
return x !== x && y !== y;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
function PropTypeError(message, data) {
|
|
531
|
+
this.message = message;
|
|
532
|
+
this.data = data && typeof data === "object" ? data : {};
|
|
533
|
+
this.stack = "";
|
|
534
|
+
}
|
|
535
|
+
PropTypeError.prototype = Error.prototype;
|
|
536
|
+
function createChainableTypeChecker(validate) {
|
|
537
|
+
if (process.env.NODE_ENV !== "production") {
|
|
538
|
+
var manualPropTypeCallCache = {};
|
|
539
|
+
var manualPropTypeWarningCount = 0;
|
|
540
|
+
}
|
|
541
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
542
|
+
componentName = componentName || ANONYMOUS;
|
|
543
|
+
propFullName = propFullName || propName;
|
|
544
|
+
if (secret !== ReactPropTypesSecret) {
|
|
545
|
+
if (throwOnDirectAccess) {
|
|
546
|
+
var err = new Error(
|
|
547
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
548
|
+
);
|
|
549
|
+
err.name = "Invariant Violation";
|
|
550
|
+
throw err;
|
|
551
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
|
|
552
|
+
var cacheKey = componentName + ":" + propName;
|
|
553
|
+
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
554
|
+
manualPropTypeWarningCount < 3) {
|
|
555
|
+
printWarning(
|
|
556
|
+
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
557
|
+
);
|
|
558
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
559
|
+
manualPropTypeWarningCount++;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
if (props[propName] == null) {
|
|
564
|
+
if (isRequired) {
|
|
565
|
+
if (props[propName] === null) {
|
|
566
|
+
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
|
|
567
|
+
}
|
|
568
|
+
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
|
|
569
|
+
}
|
|
570
|
+
return null;
|
|
571
|
+
} else {
|
|
572
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
576
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
577
|
+
return chainedCheckType;
|
|
578
|
+
}
|
|
579
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
580
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
581
|
+
var propValue = props[propName];
|
|
582
|
+
var propType = getPropType(propValue);
|
|
583
|
+
if (propType !== expectedType) {
|
|
584
|
+
var preciseType = getPreciseType(propValue);
|
|
585
|
+
return new PropTypeError(
|
|
586
|
+
"Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
|
|
587
|
+
{ expectedType }
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
return null;
|
|
591
|
+
}
|
|
592
|
+
return createChainableTypeChecker(validate);
|
|
593
|
+
}
|
|
594
|
+
function createAnyTypeChecker() {
|
|
595
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
596
|
+
}
|
|
597
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
598
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
599
|
+
if (typeof typeChecker !== "function") {
|
|
600
|
+
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
|
|
601
|
+
}
|
|
602
|
+
var propValue = props[propName];
|
|
603
|
+
if (!Array.isArray(propValue)) {
|
|
604
|
+
var propType = getPropType(propValue);
|
|
605
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
|
|
606
|
+
}
|
|
607
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
608
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
|
609
|
+
if (error instanceof Error) {
|
|
610
|
+
return error;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return null;
|
|
614
|
+
}
|
|
615
|
+
return createChainableTypeChecker(validate);
|
|
616
|
+
}
|
|
617
|
+
function createElementTypeChecker() {
|
|
618
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
619
|
+
var propValue = props[propName];
|
|
620
|
+
if (!isValidElement(propValue)) {
|
|
621
|
+
var propType = getPropType(propValue);
|
|
622
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
623
|
+
}
|
|
624
|
+
return null;
|
|
625
|
+
}
|
|
626
|
+
return createChainableTypeChecker(validate);
|
|
627
|
+
}
|
|
628
|
+
function createElementTypeTypeChecker() {
|
|
629
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
630
|
+
var propValue = props[propName];
|
|
631
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
632
|
+
var propType = getPropType(propValue);
|
|
633
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
|
|
634
|
+
}
|
|
635
|
+
return null;
|
|
636
|
+
}
|
|
637
|
+
return createChainableTypeChecker(validate);
|
|
638
|
+
}
|
|
639
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
640
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
641
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
642
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
643
|
+
var actualClassName = getClassName(props[propName]);
|
|
644
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
|
645
|
+
}
|
|
646
|
+
return null;
|
|
647
|
+
}
|
|
648
|
+
return createChainableTypeChecker(validate);
|
|
649
|
+
}
|
|
650
|
+
function createEnumTypeChecker(expectedValues) {
|
|
651
|
+
if (!Array.isArray(expectedValues)) {
|
|
652
|
+
if (process.env.NODE_ENV !== "production") {
|
|
653
|
+
if (arguments.length > 1) {
|
|
654
|
+
printWarning(
|
|
655
|
+
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
656
|
+
);
|
|
657
|
+
} else {
|
|
658
|
+
printWarning("Invalid argument supplied to oneOf, expected an array.");
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
return emptyFunctionThatReturnsNull;
|
|
662
|
+
}
|
|
663
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
664
|
+
var propValue = props[propName];
|
|
665
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
666
|
+
if (is(propValue, expectedValues[i])) {
|
|
667
|
+
return null;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
671
|
+
var type = getPreciseType(value);
|
|
672
|
+
if (type === "symbol") {
|
|
673
|
+
return String(value);
|
|
674
|
+
}
|
|
675
|
+
return value;
|
|
676
|
+
});
|
|
677
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
|
|
678
|
+
}
|
|
679
|
+
return createChainableTypeChecker(validate);
|
|
680
|
+
}
|
|
681
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
682
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
683
|
+
if (typeof typeChecker !== "function") {
|
|
684
|
+
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
|
|
685
|
+
}
|
|
686
|
+
var propValue = props[propName];
|
|
687
|
+
var propType = getPropType(propValue);
|
|
688
|
+
if (propType !== "object") {
|
|
689
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
|
|
690
|
+
}
|
|
691
|
+
for (var key in propValue) {
|
|
692
|
+
if (has(propValue, key)) {
|
|
693
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
694
|
+
if (error instanceof Error) {
|
|
695
|
+
return error;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return null;
|
|
700
|
+
}
|
|
701
|
+
return createChainableTypeChecker(validate);
|
|
702
|
+
}
|
|
703
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
704
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
705
|
+
process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
|
|
706
|
+
return emptyFunctionThatReturnsNull;
|
|
707
|
+
}
|
|
708
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
709
|
+
var checker = arrayOfTypeCheckers[i];
|
|
710
|
+
if (typeof checker !== "function") {
|
|
711
|
+
printWarning(
|
|
712
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
713
|
+
);
|
|
714
|
+
return emptyFunctionThatReturnsNull;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
718
|
+
var expectedTypes = [];
|
|
719
|
+
for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
|
|
720
|
+
var checker2 = arrayOfTypeCheckers[i2];
|
|
721
|
+
var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
722
|
+
if (checkerResult == null) {
|
|
723
|
+
return null;
|
|
724
|
+
}
|
|
725
|
+
if (checkerResult.data && has(checkerResult.data, "expectedType")) {
|
|
726
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
|
|
730
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
|
|
731
|
+
}
|
|
732
|
+
return createChainableTypeChecker(validate);
|
|
733
|
+
}
|
|
734
|
+
function createNodeChecker() {
|
|
735
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
736
|
+
if (!isNode(props[propName])) {
|
|
737
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
|
|
738
|
+
}
|
|
739
|
+
return null;
|
|
740
|
+
}
|
|
741
|
+
return createChainableTypeChecker(validate);
|
|
742
|
+
}
|
|
743
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
744
|
+
return new PropTypeError(
|
|
745
|
+
(componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
749
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
750
|
+
var propValue = props[propName];
|
|
751
|
+
var propType = getPropType(propValue);
|
|
752
|
+
if (propType !== "object") {
|
|
753
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
754
|
+
}
|
|
755
|
+
for (var key in shapeTypes) {
|
|
756
|
+
var checker = shapeTypes[key];
|
|
757
|
+
if (typeof checker !== "function") {
|
|
758
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
759
|
+
}
|
|
760
|
+
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
761
|
+
if (error) {
|
|
762
|
+
return error;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return null;
|
|
766
|
+
}
|
|
767
|
+
return createChainableTypeChecker(validate);
|
|
768
|
+
}
|
|
769
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
770
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
771
|
+
var propValue = props[propName];
|
|
772
|
+
var propType = getPropType(propValue);
|
|
773
|
+
if (propType !== "object") {
|
|
774
|
+
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
775
|
+
}
|
|
776
|
+
var allKeys = assign2({}, props[propName], shapeTypes);
|
|
777
|
+
for (var key in allKeys) {
|
|
778
|
+
var checker = shapeTypes[key];
|
|
779
|
+
if (has(shapeTypes, key) && typeof checker !== "function") {
|
|
780
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
781
|
+
}
|
|
782
|
+
if (!checker) {
|
|
783
|
+
return new PropTypeError(
|
|
784
|
+
"Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
|
|
785
|
+
);
|
|
786
|
+
}
|
|
787
|
+
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
788
|
+
if (error) {
|
|
789
|
+
return error;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
return null;
|
|
793
|
+
}
|
|
794
|
+
return createChainableTypeChecker(validate);
|
|
795
|
+
}
|
|
796
|
+
function isNode(propValue) {
|
|
797
|
+
switch (typeof propValue) {
|
|
798
|
+
case "number":
|
|
799
|
+
case "string":
|
|
800
|
+
case "undefined":
|
|
801
|
+
return true;
|
|
802
|
+
case "boolean":
|
|
803
|
+
return !propValue;
|
|
804
|
+
case "object":
|
|
805
|
+
if (Array.isArray(propValue)) {
|
|
806
|
+
return propValue.every(isNode);
|
|
807
|
+
}
|
|
808
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
809
|
+
return true;
|
|
810
|
+
}
|
|
811
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
812
|
+
if (iteratorFn) {
|
|
813
|
+
var iterator = iteratorFn.call(propValue);
|
|
814
|
+
var step;
|
|
815
|
+
if (iteratorFn !== propValue.entries) {
|
|
816
|
+
while (!(step = iterator.next()).done) {
|
|
817
|
+
if (!isNode(step.value)) {
|
|
818
|
+
return false;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
} else {
|
|
822
|
+
while (!(step = iterator.next()).done) {
|
|
823
|
+
var entry = step.value;
|
|
824
|
+
if (entry) {
|
|
825
|
+
if (!isNode(entry[1])) {
|
|
826
|
+
return false;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
} else {
|
|
832
|
+
return false;
|
|
833
|
+
}
|
|
834
|
+
return true;
|
|
835
|
+
default:
|
|
836
|
+
return false;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
function isSymbol(propType, propValue) {
|
|
840
|
+
if (propType === "symbol") {
|
|
841
|
+
return true;
|
|
842
|
+
}
|
|
843
|
+
if (!propValue) {
|
|
844
|
+
return false;
|
|
845
|
+
}
|
|
846
|
+
if (propValue["@@toStringTag"] === "Symbol") {
|
|
847
|
+
return true;
|
|
848
|
+
}
|
|
849
|
+
if (typeof Symbol === "function" && propValue instanceof Symbol) {
|
|
850
|
+
return true;
|
|
851
|
+
}
|
|
852
|
+
return false;
|
|
853
|
+
}
|
|
854
|
+
function getPropType(propValue) {
|
|
855
|
+
var propType = typeof propValue;
|
|
856
|
+
if (Array.isArray(propValue)) {
|
|
857
|
+
return "array";
|
|
858
|
+
}
|
|
859
|
+
if (propValue instanceof RegExp) {
|
|
860
|
+
return "object";
|
|
861
|
+
}
|
|
862
|
+
if (isSymbol(propType, propValue)) {
|
|
863
|
+
return "symbol";
|
|
864
|
+
}
|
|
865
|
+
return propType;
|
|
866
|
+
}
|
|
867
|
+
function getPreciseType(propValue) {
|
|
868
|
+
if (typeof propValue === "undefined" || propValue === null) {
|
|
869
|
+
return "" + propValue;
|
|
870
|
+
}
|
|
871
|
+
var propType = getPropType(propValue);
|
|
872
|
+
if (propType === "object") {
|
|
873
|
+
if (propValue instanceof Date) {
|
|
874
|
+
return "date";
|
|
875
|
+
} else if (propValue instanceof RegExp) {
|
|
876
|
+
return "regexp";
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
return propType;
|
|
880
|
+
}
|
|
881
|
+
function getPostfixForTypeWarning(value) {
|
|
882
|
+
var type = getPreciseType(value);
|
|
883
|
+
switch (type) {
|
|
884
|
+
case "array":
|
|
885
|
+
case "object":
|
|
886
|
+
return "an " + type;
|
|
887
|
+
case "boolean":
|
|
888
|
+
case "date":
|
|
889
|
+
case "regexp":
|
|
890
|
+
return "a " + type;
|
|
891
|
+
default:
|
|
892
|
+
return type;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
function getClassName(propValue) {
|
|
896
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
897
|
+
return ANONYMOUS;
|
|
898
|
+
}
|
|
899
|
+
return propValue.constructor.name;
|
|
900
|
+
}
|
|
901
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
902
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
903
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
904
|
+
return ReactPropTypes;
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
// node_modules/prop-types/factoryWithThrowingShims.js
|
|
910
|
+
var require_factoryWithThrowingShims = __commonJS({
|
|
911
|
+
"node_modules/prop-types/factoryWithThrowingShims.js"(exports2, module2) {
|
|
912
|
+
"use strict";
|
|
913
|
+
var ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
914
|
+
function emptyFunction() {
|
|
915
|
+
}
|
|
916
|
+
function emptyFunctionWithReset() {
|
|
917
|
+
}
|
|
918
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
919
|
+
module2.exports = function() {
|
|
920
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
921
|
+
if (secret === ReactPropTypesSecret) {
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
var err = new Error(
|
|
925
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
926
|
+
);
|
|
927
|
+
err.name = "Invariant Violation";
|
|
928
|
+
throw err;
|
|
929
|
+
}
|
|
930
|
+
;
|
|
931
|
+
shim.isRequired = shim;
|
|
932
|
+
function getShim() {
|
|
933
|
+
return shim;
|
|
934
|
+
}
|
|
935
|
+
;
|
|
936
|
+
var ReactPropTypes = {
|
|
937
|
+
array: shim,
|
|
938
|
+
bigint: shim,
|
|
939
|
+
bool: shim,
|
|
940
|
+
func: shim,
|
|
941
|
+
number: shim,
|
|
942
|
+
object: shim,
|
|
943
|
+
string: shim,
|
|
944
|
+
symbol: shim,
|
|
945
|
+
any: shim,
|
|
946
|
+
arrayOf: getShim,
|
|
947
|
+
element: shim,
|
|
948
|
+
elementType: shim,
|
|
949
|
+
instanceOf: getShim,
|
|
950
|
+
node: shim,
|
|
951
|
+
objectOf: getShim,
|
|
952
|
+
oneOf: getShim,
|
|
953
|
+
oneOfType: getShim,
|
|
954
|
+
shape: getShim,
|
|
955
|
+
exact: getShim,
|
|
956
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
957
|
+
resetWarningCache: emptyFunction
|
|
958
|
+
};
|
|
959
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
960
|
+
return ReactPropTypes;
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
});
|
|
964
|
+
|
|
965
|
+
// node_modules/prop-types/index.js
|
|
966
|
+
var require_prop_types = __commonJS({
|
|
967
|
+
"node_modules/prop-types/index.js"(exports2, module2) {
|
|
968
|
+
"use strict";
|
|
969
|
+
if (process.env.NODE_ENV !== "production") {
|
|
970
|
+
ReactIs = require_react_is();
|
|
971
|
+
throwOnDirectAccess = true;
|
|
972
|
+
module2.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
973
|
+
} else {
|
|
974
|
+
module2.exports = require_factoryWithThrowingShims()();
|
|
975
|
+
}
|
|
976
|
+
var ReactIs;
|
|
977
|
+
var throwOnDirectAccess;
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
|
|
20
981
|
// src/index.ts
|
|
21
982
|
var index_exports = {};
|
|
22
983
|
__export(index_exports, {
|
|
23
|
-
|
|
984
|
+
LayoutProvider: () => LayoutProvider,
|
|
985
|
+
Platform: () => Platform,
|
|
986
|
+
RouterButton: () => RouterButton,
|
|
987
|
+
RouterError: () => RouterError,
|
|
988
|
+
RouterLink: () => RouterLink,
|
|
989
|
+
RouterNotFound: () => RouterNotFound,
|
|
990
|
+
RouterTab: () => RouterTab,
|
|
991
|
+
getContrastTextColor: () => getContrastTextColor,
|
|
992
|
+
useDialogs: () => import_useDialogs.useDialogs,
|
|
993
|
+
useFieldContext: () => useFieldContext,
|
|
994
|
+
useFormContext: () => useFormContext,
|
|
995
|
+
useLayoutForm: () => useLayoutForm,
|
|
996
|
+
useLocalStorageState: () => import_useLocalStorageState.useLocalStorageState,
|
|
997
|
+
uuidv7: () => import_uuidv7.uuidv7,
|
|
998
|
+
wczApiClient: () => wczApiClient,
|
|
999
|
+
withLayoutForm: () => withLayoutForm
|
|
24
1000
|
});
|
|
25
1001
|
module.exports = __toCommonJS(index_exports);
|
|
26
1002
|
|
|
27
|
-
// src/components/
|
|
1003
|
+
// src/components/router/RouterButton.tsx
|
|
1004
|
+
var import_material = require("@mui/material");
|
|
1005
|
+
var import_react_router = require("@tanstack/react-router");
|
|
1006
|
+
var import_react = __toESM(require("react"), 1);
|
|
28
1007
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
var
|
|
30
|
-
|
|
1008
|
+
var MUIButtonLinkComponent = import_react.default.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { ref, component: "a", ...props }));
|
|
1009
|
+
var CreatedButtonLinkComponent = (0, import_react_router.createLink)(MUIButtonLinkComponent);
|
|
1010
|
+
var RouterButton = (props) => {
|
|
1011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CreatedButtonLinkComponent, { preload: "intent", ...props });
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
// src/components/router/RouterLink.tsx
|
|
1015
|
+
var import_material2 = require("@mui/material");
|
|
1016
|
+
var import_react_router2 = require("@tanstack/react-router");
|
|
1017
|
+
var import_react2 = __toESM(require("react"), 1);
|
|
1018
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1019
|
+
var MUILinkComponent = import_react2.default.forwardRef(
|
|
1020
|
+
(props, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.Link, { ref, ...props })
|
|
1021
|
+
);
|
|
1022
|
+
var CreatedLinkComponent = (0, import_react_router2.createLink)(MUILinkComponent);
|
|
1023
|
+
var RouterLink = (props) => {
|
|
1024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CreatedLinkComponent, { preload: "intent", ...props });
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
// src/components/router/RouterTab.tsx
|
|
1028
|
+
var import_material3 = require("@mui/material");
|
|
1029
|
+
var import_react_router3 = require("@tanstack/react-router");
|
|
1030
|
+
var import_react3 = __toESM(require("react"), 1);
|
|
1031
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1032
|
+
var MUITabLinkComponent = import_react3.default.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material3.Tab, { ref, component: "a", ...props }));
|
|
1033
|
+
var CreatedTabLinkComponent = (0, import_react_router3.createLink)(MUITabLinkComponent);
|
|
1034
|
+
var RouterTab = (props) => {
|
|
1035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CreatedTabLinkComponent, { preload: "intent", ...props });
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
// src/components/router/RouterNotFound.tsx
|
|
1039
|
+
var import_react_router4 = require("@tanstack/react-router");
|
|
1040
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1041
|
+
function RouterNotFound() {
|
|
1042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "space-y-2 p-2", children: [
|
|
1043
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { children: "The page you are looking for does not exist." }) }),
|
|
1044
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
1045
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1046
|
+
"button",
|
|
1047
|
+
{
|
|
1048
|
+
onClick: () => window.history.back(),
|
|
1049
|
+
className: "bg-emerald-500 text-white px-2 py-1 rounded uppercase font-black text-sm",
|
|
1050
|
+
children: "Go back"
|
|
1051
|
+
}
|
|
1052
|
+
),
|
|
1053
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1054
|
+
import_react_router4.Link,
|
|
1055
|
+
{
|
|
1056
|
+
to: "/",
|
|
1057
|
+
className: "bg-cyan-600 text-white px-2 py-1 rounded uppercase font-black text-sm",
|
|
1058
|
+
children: "Start Over"
|
|
1059
|
+
}
|
|
1060
|
+
)
|
|
1061
|
+
] })
|
|
1062
|
+
] });
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
// src/components/router/RouterError.tsx
|
|
1066
|
+
var import_react_router5 = require("@tanstack/react-router");
|
|
1067
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1068
|
+
var RouterError = ({ error }) => {
|
|
1069
|
+
const router = (0, import_react_router5.useRouter)();
|
|
1070
|
+
const isRoot = (0, import_react_router5.useMatch)({
|
|
1071
|
+
strict: false,
|
|
1072
|
+
select: (state) => state.id === import_react_router5.rootRouteId
|
|
1073
|
+
});
|
|
1074
|
+
console.error("DefaultErrorComponent Error:", error);
|
|
1075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "min-w-0 flex-1 p-4 flex flex-col items-center justify-center gap-6", children: [
|
|
1076
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_router5.ErrorComponent, { error }),
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex gap-2 items-center flex-wrap", children: [
|
|
1078
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1079
|
+
"button",
|
|
1080
|
+
{
|
|
1081
|
+
onClick: () => {
|
|
1082
|
+
router.invalidate();
|
|
1083
|
+
},
|
|
1084
|
+
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1085
|
+
children: "Try Again"
|
|
1086
|
+
}
|
|
1087
|
+
),
|
|
1088
|
+
isRoot ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1089
|
+
import_react_router5.Link,
|
|
1090
|
+
{
|
|
1091
|
+
to: "/",
|
|
1092
|
+
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1093
|
+
children: "Home"
|
|
1094
|
+
}
|
|
1095
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1096
|
+
import_react_router5.Link,
|
|
1097
|
+
{
|
|
1098
|
+
to: "/",
|
|
1099
|
+
className: `px-2 py-1 bg-gray-600 dark:bg-gray-700 rounded text-white uppercase font-extrabold`,
|
|
1100
|
+
onClick: (e) => {
|
|
1101
|
+
e.preventDefault();
|
|
1102
|
+
window.history.back();
|
|
1103
|
+
},
|
|
1104
|
+
children: "Go Back"
|
|
1105
|
+
}
|
|
1106
|
+
)
|
|
1107
|
+
] })
|
|
1108
|
+
] });
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1111
|
+
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
1112
|
+
var isDevelopment = false;
|
|
1113
|
+
function sheetForTag(tag) {
|
|
1114
|
+
if (tag.sheet) {
|
|
1115
|
+
return tag.sheet;
|
|
1116
|
+
}
|
|
1117
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
1118
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
1119
|
+
return document.styleSheets[i];
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
return void 0;
|
|
1123
|
+
}
|
|
1124
|
+
function createStyleElement(options) {
|
|
1125
|
+
var tag = document.createElement("style");
|
|
1126
|
+
tag.setAttribute("data-emotion", options.key);
|
|
1127
|
+
if (options.nonce !== void 0) {
|
|
1128
|
+
tag.setAttribute("nonce", options.nonce);
|
|
1129
|
+
}
|
|
1130
|
+
tag.appendChild(document.createTextNode(""));
|
|
1131
|
+
tag.setAttribute("data-s", "");
|
|
1132
|
+
return tag;
|
|
1133
|
+
}
|
|
1134
|
+
var StyleSheet = /* @__PURE__ */ function() {
|
|
1135
|
+
function StyleSheet2(options) {
|
|
1136
|
+
var _this = this;
|
|
1137
|
+
this._insertTag = function(tag) {
|
|
1138
|
+
var before;
|
|
1139
|
+
if (_this.tags.length === 0) {
|
|
1140
|
+
if (_this.insertionPoint) {
|
|
1141
|
+
before = _this.insertionPoint.nextSibling;
|
|
1142
|
+
} else if (_this.prepend) {
|
|
1143
|
+
before = _this.container.firstChild;
|
|
1144
|
+
} else {
|
|
1145
|
+
before = _this.before;
|
|
1146
|
+
}
|
|
1147
|
+
} else {
|
|
1148
|
+
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
1149
|
+
}
|
|
1150
|
+
_this.container.insertBefore(tag, before);
|
|
1151
|
+
_this.tags.push(tag);
|
|
1152
|
+
};
|
|
1153
|
+
this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy;
|
|
1154
|
+
this.tags = [];
|
|
1155
|
+
this.ctr = 0;
|
|
1156
|
+
this.nonce = options.nonce;
|
|
1157
|
+
this.key = options.key;
|
|
1158
|
+
this.container = options.container;
|
|
1159
|
+
this.prepend = options.prepend;
|
|
1160
|
+
this.insertionPoint = options.insertionPoint;
|
|
1161
|
+
this.before = null;
|
|
1162
|
+
}
|
|
1163
|
+
var _proto = StyleSheet2.prototype;
|
|
1164
|
+
_proto.hydrate = function hydrate(nodes) {
|
|
1165
|
+
nodes.forEach(this._insertTag);
|
|
1166
|
+
};
|
|
1167
|
+
_proto.insert = function insert(rule) {
|
|
1168
|
+
if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
|
|
1169
|
+
this._insertTag(createStyleElement(this));
|
|
1170
|
+
}
|
|
1171
|
+
var tag = this.tags[this.tags.length - 1];
|
|
1172
|
+
if (this.isSpeedy) {
|
|
1173
|
+
var sheet = sheetForTag(tag);
|
|
1174
|
+
try {
|
|
1175
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
1176
|
+
} catch (e) {
|
|
1177
|
+
}
|
|
1178
|
+
} else {
|
|
1179
|
+
tag.appendChild(document.createTextNode(rule));
|
|
1180
|
+
}
|
|
1181
|
+
this.ctr++;
|
|
1182
|
+
};
|
|
1183
|
+
_proto.flush = function flush() {
|
|
1184
|
+
this.tags.forEach(function(tag) {
|
|
1185
|
+
var _tag$parentNode;
|
|
1186
|
+
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
1187
|
+
});
|
|
1188
|
+
this.tags = [];
|
|
1189
|
+
this.ctr = 0;
|
|
1190
|
+
};
|
|
1191
|
+
return StyleSheet2;
|
|
1192
|
+
}();
|
|
1193
|
+
|
|
1194
|
+
// node_modules/stylis/src/Enum.js
|
|
1195
|
+
var MS = "-ms-";
|
|
1196
|
+
var MOZ = "-moz-";
|
|
1197
|
+
var WEBKIT = "-webkit-";
|
|
1198
|
+
var COMMENT = "comm";
|
|
1199
|
+
var RULESET = "rule";
|
|
1200
|
+
var DECLARATION = "decl";
|
|
1201
|
+
var IMPORT = "@import";
|
|
1202
|
+
var KEYFRAMES = "@keyframes";
|
|
1203
|
+
var LAYER = "@layer";
|
|
1204
|
+
|
|
1205
|
+
// node_modules/stylis/src/Utility.js
|
|
1206
|
+
var abs = Math.abs;
|
|
1207
|
+
var from = String.fromCharCode;
|
|
1208
|
+
var assign = Object.assign;
|
|
1209
|
+
function hash(value, length2) {
|
|
1210
|
+
return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
1211
|
+
}
|
|
1212
|
+
function trim(value) {
|
|
1213
|
+
return value.trim();
|
|
1214
|
+
}
|
|
1215
|
+
function match(value, pattern) {
|
|
1216
|
+
return (value = pattern.exec(value)) ? value[0] : value;
|
|
1217
|
+
}
|
|
1218
|
+
function replace(value, pattern, replacement) {
|
|
1219
|
+
return value.replace(pattern, replacement);
|
|
1220
|
+
}
|
|
1221
|
+
function indexof(value, search) {
|
|
1222
|
+
return value.indexOf(search);
|
|
1223
|
+
}
|
|
1224
|
+
function charat(value, index) {
|
|
1225
|
+
return value.charCodeAt(index) | 0;
|
|
1226
|
+
}
|
|
1227
|
+
function substr(value, begin, end) {
|
|
1228
|
+
return value.slice(begin, end);
|
|
1229
|
+
}
|
|
1230
|
+
function strlen(value) {
|
|
1231
|
+
return value.length;
|
|
1232
|
+
}
|
|
1233
|
+
function sizeof(value) {
|
|
1234
|
+
return value.length;
|
|
1235
|
+
}
|
|
1236
|
+
function append(value, array) {
|
|
1237
|
+
return array.push(value), value;
|
|
1238
|
+
}
|
|
1239
|
+
function combine(array, callback) {
|
|
1240
|
+
return array.map(callback).join("");
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
// node_modules/stylis/src/Tokenizer.js
|
|
1244
|
+
var line = 1;
|
|
1245
|
+
var column = 1;
|
|
1246
|
+
var length = 0;
|
|
1247
|
+
var position = 0;
|
|
1248
|
+
var character = 0;
|
|
1249
|
+
var characters = "";
|
|
1250
|
+
function node(value, root, parent, type, props, children, length2) {
|
|
1251
|
+
return { value, root, parent, type, props, children, line, column, length: length2, return: "" };
|
|
1252
|
+
}
|
|
1253
|
+
function copy(root, props) {
|
|
1254
|
+
return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
|
|
1255
|
+
}
|
|
1256
|
+
function char() {
|
|
1257
|
+
return character;
|
|
1258
|
+
}
|
|
1259
|
+
function prev() {
|
|
1260
|
+
character = position > 0 ? charat(characters, --position) : 0;
|
|
1261
|
+
if (column--, character === 10)
|
|
1262
|
+
column = 1, line--;
|
|
1263
|
+
return character;
|
|
1264
|
+
}
|
|
1265
|
+
function next() {
|
|
1266
|
+
character = position < length ? charat(characters, position++) : 0;
|
|
1267
|
+
if (column++, character === 10)
|
|
1268
|
+
column = 1, line++;
|
|
1269
|
+
return character;
|
|
1270
|
+
}
|
|
1271
|
+
function peek() {
|
|
1272
|
+
return charat(characters, position);
|
|
1273
|
+
}
|
|
1274
|
+
function caret() {
|
|
1275
|
+
return position;
|
|
1276
|
+
}
|
|
1277
|
+
function slice(begin, end) {
|
|
1278
|
+
return substr(characters, begin, end);
|
|
1279
|
+
}
|
|
1280
|
+
function token(type) {
|
|
1281
|
+
switch (type) {
|
|
1282
|
+
// \0 \t \n \r \s whitespace token
|
|
1283
|
+
case 0:
|
|
1284
|
+
case 9:
|
|
1285
|
+
case 10:
|
|
1286
|
+
case 13:
|
|
1287
|
+
case 32:
|
|
1288
|
+
return 5;
|
|
1289
|
+
// ! + , / > @ ~ isolate token
|
|
1290
|
+
case 33:
|
|
1291
|
+
case 43:
|
|
1292
|
+
case 44:
|
|
1293
|
+
case 47:
|
|
1294
|
+
case 62:
|
|
1295
|
+
case 64:
|
|
1296
|
+
case 126:
|
|
1297
|
+
// ; { } breakpoint token
|
|
1298
|
+
case 59:
|
|
1299
|
+
case 123:
|
|
1300
|
+
case 125:
|
|
1301
|
+
return 4;
|
|
1302
|
+
// : accompanied token
|
|
1303
|
+
case 58:
|
|
1304
|
+
return 3;
|
|
1305
|
+
// " ' ( [ opening delimit token
|
|
1306
|
+
case 34:
|
|
1307
|
+
case 39:
|
|
1308
|
+
case 40:
|
|
1309
|
+
case 91:
|
|
1310
|
+
return 2;
|
|
1311
|
+
// ) ] closing delimit token
|
|
1312
|
+
case 41:
|
|
1313
|
+
case 93:
|
|
1314
|
+
return 1;
|
|
1315
|
+
}
|
|
1316
|
+
return 0;
|
|
1317
|
+
}
|
|
1318
|
+
function alloc(value) {
|
|
1319
|
+
return line = column = 1, length = strlen(characters = value), position = 0, [];
|
|
1320
|
+
}
|
|
1321
|
+
function dealloc(value) {
|
|
1322
|
+
return characters = "", value;
|
|
1323
|
+
}
|
|
1324
|
+
function delimit(type) {
|
|
1325
|
+
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
1326
|
+
}
|
|
1327
|
+
function whitespace(type) {
|
|
1328
|
+
while (character = peek())
|
|
1329
|
+
if (character < 33)
|
|
1330
|
+
next();
|
|
1331
|
+
else
|
|
1332
|
+
break;
|
|
1333
|
+
return token(type) > 2 || token(character) > 3 ? "" : " ";
|
|
1334
|
+
}
|
|
1335
|
+
function escaping(index, count) {
|
|
1336
|
+
while (--count && next())
|
|
1337
|
+
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
|
|
1338
|
+
break;
|
|
1339
|
+
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
1340
|
+
}
|
|
1341
|
+
function delimiter(type) {
|
|
1342
|
+
while (next())
|
|
1343
|
+
switch (character) {
|
|
1344
|
+
// ] ) " '
|
|
1345
|
+
case type:
|
|
1346
|
+
return position;
|
|
1347
|
+
// " '
|
|
1348
|
+
case 34:
|
|
1349
|
+
case 39:
|
|
1350
|
+
if (type !== 34 && type !== 39)
|
|
1351
|
+
delimiter(character);
|
|
1352
|
+
break;
|
|
1353
|
+
// (
|
|
1354
|
+
case 40:
|
|
1355
|
+
if (type === 41)
|
|
1356
|
+
delimiter(type);
|
|
1357
|
+
break;
|
|
1358
|
+
// \
|
|
1359
|
+
case 92:
|
|
1360
|
+
next();
|
|
1361
|
+
break;
|
|
1362
|
+
}
|
|
1363
|
+
return position;
|
|
1364
|
+
}
|
|
1365
|
+
function commenter(type, index) {
|
|
1366
|
+
while (next())
|
|
1367
|
+
if (type + character === 47 + 10)
|
|
1368
|
+
break;
|
|
1369
|
+
else if (type + character === 42 + 42 && peek() === 47)
|
|
1370
|
+
break;
|
|
1371
|
+
return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
|
|
1372
|
+
}
|
|
1373
|
+
function identifier(index) {
|
|
1374
|
+
while (!token(peek()))
|
|
1375
|
+
next();
|
|
1376
|
+
return slice(index, position);
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
// node_modules/stylis/src/Parser.js
|
|
1380
|
+
function compile(value) {
|
|
1381
|
+
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
|
|
1382
|
+
}
|
|
1383
|
+
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
1384
|
+
var index = 0;
|
|
1385
|
+
var offset = 0;
|
|
1386
|
+
var length2 = pseudo;
|
|
1387
|
+
var atrule = 0;
|
|
1388
|
+
var property = 0;
|
|
1389
|
+
var previous = 0;
|
|
1390
|
+
var variable = 1;
|
|
1391
|
+
var scanning = 1;
|
|
1392
|
+
var ampersand = 1;
|
|
1393
|
+
var character2 = 0;
|
|
1394
|
+
var type = "";
|
|
1395
|
+
var props = rules;
|
|
1396
|
+
var children = rulesets;
|
|
1397
|
+
var reference = rule;
|
|
1398
|
+
var characters2 = type;
|
|
1399
|
+
while (scanning)
|
|
1400
|
+
switch (previous = character2, character2 = next()) {
|
|
1401
|
+
// (
|
|
1402
|
+
case 40:
|
|
1403
|
+
if (previous != 108 && charat(characters2, length2 - 1) == 58) {
|
|
1404
|
+
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
|
|
1405
|
+
ampersand = -1;
|
|
1406
|
+
break;
|
|
1407
|
+
}
|
|
1408
|
+
// " ' [
|
|
1409
|
+
case 34:
|
|
1410
|
+
case 39:
|
|
1411
|
+
case 91:
|
|
1412
|
+
characters2 += delimit(character2);
|
|
1413
|
+
break;
|
|
1414
|
+
// \t \n \r \s
|
|
1415
|
+
case 9:
|
|
1416
|
+
case 10:
|
|
1417
|
+
case 13:
|
|
1418
|
+
case 32:
|
|
1419
|
+
characters2 += whitespace(previous);
|
|
1420
|
+
break;
|
|
1421
|
+
// \
|
|
1422
|
+
case 92:
|
|
1423
|
+
characters2 += escaping(caret() - 1, 7);
|
|
1424
|
+
continue;
|
|
1425
|
+
// /
|
|
1426
|
+
case 47:
|
|
1427
|
+
switch (peek()) {
|
|
1428
|
+
case 42:
|
|
1429
|
+
case 47:
|
|
1430
|
+
append(comment(commenter(next(), caret()), root, parent), declarations);
|
|
1431
|
+
break;
|
|
1432
|
+
default:
|
|
1433
|
+
characters2 += "/";
|
|
1434
|
+
}
|
|
1435
|
+
break;
|
|
1436
|
+
// {
|
|
1437
|
+
case 123 * variable:
|
|
1438
|
+
points[index++] = strlen(characters2) * ampersand;
|
|
1439
|
+
// } ; \0
|
|
1440
|
+
case 125 * variable:
|
|
1441
|
+
case 59:
|
|
1442
|
+
case 0:
|
|
1443
|
+
switch (character2) {
|
|
1444
|
+
// \0 }
|
|
1445
|
+
case 0:
|
|
1446
|
+
case 125:
|
|
1447
|
+
scanning = 0;
|
|
1448
|
+
// ;
|
|
1449
|
+
case 59 + offset:
|
|
1450
|
+
if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
|
|
1451
|
+
if (property > 0 && strlen(characters2) - length2)
|
|
1452
|
+
append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
|
|
1453
|
+
break;
|
|
1454
|
+
// @ ;
|
|
1455
|
+
case 59:
|
|
1456
|
+
characters2 += ";";
|
|
1457
|
+
// { rule/at-rule
|
|
1458
|
+
default:
|
|
1459
|
+
append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2), rulesets);
|
|
1460
|
+
if (character2 === 123)
|
|
1461
|
+
if (offset === 0)
|
|
1462
|
+
parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
|
|
1463
|
+
else
|
|
1464
|
+
switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
|
|
1465
|
+
// d l m s
|
|
1466
|
+
case 100:
|
|
1467
|
+
case 108:
|
|
1468
|
+
case 109:
|
|
1469
|
+
case 115:
|
|
1470
|
+
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
|
|
1471
|
+
break;
|
|
1472
|
+
default:
|
|
1473
|
+
parse(characters2, reference, reference, reference, [""], children, 0, points, children);
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
|
|
1477
|
+
break;
|
|
1478
|
+
// :
|
|
1479
|
+
case 58:
|
|
1480
|
+
length2 = 1 + strlen(characters2), property = previous;
|
|
1481
|
+
default:
|
|
1482
|
+
if (variable < 1) {
|
|
1483
|
+
if (character2 == 123)
|
|
1484
|
+
--variable;
|
|
1485
|
+
else if (character2 == 125 && variable++ == 0 && prev() == 125)
|
|
1486
|
+
continue;
|
|
1487
|
+
}
|
|
1488
|
+
switch (characters2 += from(character2), character2 * variable) {
|
|
1489
|
+
// &
|
|
1490
|
+
case 38:
|
|
1491
|
+
ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
|
|
1492
|
+
break;
|
|
1493
|
+
// ,
|
|
1494
|
+
case 44:
|
|
1495
|
+
points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
|
|
1496
|
+
break;
|
|
1497
|
+
// @
|
|
1498
|
+
case 64:
|
|
1499
|
+
if (peek() === 45)
|
|
1500
|
+
characters2 += delimit(next());
|
|
1501
|
+
atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
|
|
1502
|
+
break;
|
|
1503
|
+
// -
|
|
1504
|
+
case 45:
|
|
1505
|
+
if (previous === 45 && strlen(characters2) == 2)
|
|
1506
|
+
variable = 0;
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
return rulesets;
|
|
1510
|
+
}
|
|
1511
|
+
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2) {
|
|
1512
|
+
var post = offset - 1;
|
|
1513
|
+
var rule = offset === 0 ? rules : [""];
|
|
1514
|
+
var size = sizeof(rule);
|
|
1515
|
+
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
1516
|
+
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z2 = value; x < size; ++x)
|
|
1517
|
+
if (z2 = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
|
|
1518
|
+
props[k++] = z2;
|
|
1519
|
+
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
|
|
1520
|
+
}
|
|
1521
|
+
function comment(value, root, parent) {
|
|
1522
|
+
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
|
|
1523
|
+
}
|
|
1524
|
+
function declaration(value, root, parent, length2) {
|
|
1525
|
+
return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
// node_modules/stylis/src/Serializer.js
|
|
1529
|
+
function serialize(children, callback) {
|
|
1530
|
+
var output = "";
|
|
1531
|
+
var length2 = sizeof(children);
|
|
1532
|
+
for (var i = 0; i < length2; i++)
|
|
1533
|
+
output += callback(children[i], i, children, callback) || "";
|
|
1534
|
+
return output;
|
|
1535
|
+
}
|
|
1536
|
+
function stringify(element, index, children, callback) {
|
|
1537
|
+
switch (element.type) {
|
|
1538
|
+
case LAYER:
|
|
1539
|
+
if (element.children.length) break;
|
|
1540
|
+
case IMPORT:
|
|
1541
|
+
case DECLARATION:
|
|
1542
|
+
return element.return = element.return || element.value;
|
|
1543
|
+
case COMMENT:
|
|
1544
|
+
return "";
|
|
1545
|
+
case KEYFRAMES:
|
|
1546
|
+
return element.return = element.value + "{" + serialize(element.children, callback) + "}";
|
|
1547
|
+
case RULESET:
|
|
1548
|
+
element.value = element.props.join(",");
|
|
1549
|
+
}
|
|
1550
|
+
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
// node_modules/stylis/src/Middleware.js
|
|
1554
|
+
function middleware(collection) {
|
|
1555
|
+
var length2 = sizeof(collection);
|
|
1556
|
+
return function(element, index, children, callback) {
|
|
1557
|
+
var output = "";
|
|
1558
|
+
for (var i = 0; i < length2; i++)
|
|
1559
|
+
output += collection[i](element, index, children, callback) || "";
|
|
1560
|
+
return output;
|
|
1561
|
+
};
|
|
1562
|
+
}
|
|
1563
|
+
function rulesheet(callback) {
|
|
1564
|
+
return function(element) {
|
|
1565
|
+
if (!element.root) {
|
|
1566
|
+
if (element = element.return)
|
|
1567
|
+
callback(element);
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
// node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
|
|
1573
|
+
var weakMemoize = function weakMemoize2(func) {
|
|
1574
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
1575
|
+
return function(arg) {
|
|
1576
|
+
if (cache.has(arg)) {
|
|
1577
|
+
return cache.get(arg);
|
|
1578
|
+
}
|
|
1579
|
+
var ret = func(arg);
|
|
1580
|
+
cache.set(arg, ret);
|
|
1581
|
+
return ret;
|
|
1582
|
+
};
|
|
1583
|
+
};
|
|
1584
|
+
|
|
1585
|
+
// node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
1586
|
+
function memoize(fn) {
|
|
1587
|
+
var cache = /* @__PURE__ */ Object.create(null);
|
|
1588
|
+
return function(arg) {
|
|
1589
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
1590
|
+
return cache[arg];
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
// node_modules/@emotion/cache/dist/emotion-cache.esm.js
|
|
1595
|
+
var isBrowser = typeof document !== "undefined";
|
|
1596
|
+
var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
|
|
1597
|
+
var previous = 0;
|
|
1598
|
+
var character2 = 0;
|
|
1599
|
+
while (true) {
|
|
1600
|
+
previous = character2;
|
|
1601
|
+
character2 = peek();
|
|
1602
|
+
if (previous === 38 && character2 === 12) {
|
|
1603
|
+
points[index] = 1;
|
|
1604
|
+
}
|
|
1605
|
+
if (token(character2)) {
|
|
1606
|
+
break;
|
|
1607
|
+
}
|
|
1608
|
+
next();
|
|
1609
|
+
}
|
|
1610
|
+
return slice(begin, position);
|
|
1611
|
+
};
|
|
1612
|
+
var toRules = function toRules2(parsed, points) {
|
|
1613
|
+
var index = -1;
|
|
1614
|
+
var character2 = 44;
|
|
1615
|
+
do {
|
|
1616
|
+
switch (token(character2)) {
|
|
1617
|
+
case 0:
|
|
1618
|
+
if (character2 === 38 && peek() === 12) {
|
|
1619
|
+
points[index] = 1;
|
|
1620
|
+
}
|
|
1621
|
+
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
|
1622
|
+
break;
|
|
1623
|
+
case 2:
|
|
1624
|
+
parsed[index] += delimit(character2);
|
|
1625
|
+
break;
|
|
1626
|
+
case 4:
|
|
1627
|
+
if (character2 === 44) {
|
|
1628
|
+
parsed[++index] = peek() === 58 ? "&\f" : "";
|
|
1629
|
+
points[index] = parsed[index].length;
|
|
1630
|
+
break;
|
|
1631
|
+
}
|
|
1632
|
+
// fallthrough
|
|
1633
|
+
default:
|
|
1634
|
+
parsed[index] += from(character2);
|
|
1635
|
+
}
|
|
1636
|
+
} while (character2 = next());
|
|
1637
|
+
return parsed;
|
|
1638
|
+
};
|
|
1639
|
+
var getRules = function getRules2(value, points) {
|
|
1640
|
+
return dealloc(toRules(alloc(value), points));
|
|
1641
|
+
};
|
|
1642
|
+
var fixedElements = /* @__PURE__ */ new WeakMap();
|
|
1643
|
+
var compat = function compat2(element) {
|
|
1644
|
+
if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
|
|
1645
|
+
// negative .length indicates that this rule has been already prefixed
|
|
1646
|
+
element.length < 1) {
|
|
1647
|
+
return;
|
|
1648
|
+
}
|
|
1649
|
+
var value = element.value;
|
|
1650
|
+
var parent = element.parent;
|
|
1651
|
+
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
1652
|
+
while (parent.type !== "rule") {
|
|
1653
|
+
parent = parent.parent;
|
|
1654
|
+
if (!parent) return;
|
|
1655
|
+
}
|
|
1656
|
+
if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
if (isImplicitRule) {
|
|
1660
|
+
return;
|
|
1661
|
+
}
|
|
1662
|
+
fixedElements.set(element, true);
|
|
1663
|
+
var points = [];
|
|
1664
|
+
var rules = getRules(value, points);
|
|
1665
|
+
var parentRules = parent.props;
|
|
1666
|
+
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
1667
|
+
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
1668
|
+
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
};
|
|
1672
|
+
var removeLabel = function removeLabel2(element) {
|
|
1673
|
+
if (element.type === "decl") {
|
|
1674
|
+
var value = element.value;
|
|
1675
|
+
if (
|
|
1676
|
+
// charcode for l
|
|
1677
|
+
value.charCodeAt(0) === 108 && // charcode for b
|
|
1678
|
+
value.charCodeAt(2) === 98
|
|
1679
|
+
) {
|
|
1680
|
+
element["return"] = "";
|
|
1681
|
+
element.value = "";
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
};
|
|
1685
|
+
function prefix(value, length2) {
|
|
1686
|
+
switch (hash(value, length2)) {
|
|
1687
|
+
// color-adjust
|
|
1688
|
+
case 5103:
|
|
1689
|
+
return WEBKIT + "print-" + value + value;
|
|
1690
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
1691
|
+
case 5737:
|
|
1692
|
+
case 4201:
|
|
1693
|
+
case 3177:
|
|
1694
|
+
case 3433:
|
|
1695
|
+
case 1641:
|
|
1696
|
+
case 4457:
|
|
1697
|
+
case 2921:
|
|
1698
|
+
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
1699
|
+
case 5572:
|
|
1700
|
+
case 6356:
|
|
1701
|
+
case 5844:
|
|
1702
|
+
case 3191:
|
|
1703
|
+
case 6645:
|
|
1704
|
+
case 3005:
|
|
1705
|
+
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
1706
|
+
case 6391:
|
|
1707
|
+
case 5879:
|
|
1708
|
+
case 5623:
|
|
1709
|
+
case 6135:
|
|
1710
|
+
case 4599:
|
|
1711
|
+
case 4855:
|
|
1712
|
+
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
1713
|
+
case 4215:
|
|
1714
|
+
case 6389:
|
|
1715
|
+
case 5109:
|
|
1716
|
+
case 5365:
|
|
1717
|
+
case 5621:
|
|
1718
|
+
case 3829:
|
|
1719
|
+
return WEBKIT + value + value;
|
|
1720
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
1721
|
+
case 5349:
|
|
1722
|
+
case 4246:
|
|
1723
|
+
case 4810:
|
|
1724
|
+
case 6968:
|
|
1725
|
+
case 2756:
|
|
1726
|
+
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
1727
|
+
// flex, flex-direction
|
|
1728
|
+
case 6828:
|
|
1729
|
+
case 4268:
|
|
1730
|
+
return WEBKIT + value + MS + value + value;
|
|
1731
|
+
// order
|
|
1732
|
+
case 6165:
|
|
1733
|
+
return WEBKIT + value + MS + "flex-" + value + value;
|
|
1734
|
+
// align-items
|
|
1735
|
+
case 5187:
|
|
1736
|
+
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
|
|
1737
|
+
// align-self
|
|
1738
|
+
case 5443:
|
|
1739
|
+
return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
|
|
1740
|
+
// align-content
|
|
1741
|
+
case 4675:
|
|
1742
|
+
return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
|
|
1743
|
+
// flex-shrink
|
|
1744
|
+
case 5548:
|
|
1745
|
+
return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
|
|
1746
|
+
// flex-basis
|
|
1747
|
+
case 5292:
|
|
1748
|
+
return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
|
|
1749
|
+
// flex-grow
|
|
1750
|
+
case 6060:
|
|
1751
|
+
return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
|
|
1752
|
+
// transition
|
|
1753
|
+
case 4554:
|
|
1754
|
+
return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
|
|
1755
|
+
// cursor
|
|
1756
|
+
case 6187:
|
|
1757
|
+
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
|
|
1758
|
+
// background, background-image
|
|
1759
|
+
case 5495:
|
|
1760
|
+
case 3959:
|
|
1761
|
+
return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
|
|
1762
|
+
// justify-content
|
|
1763
|
+
case 4968:
|
|
1764
|
+
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
|
|
1765
|
+
// (margin|padding)-inline-(start|end)
|
|
1766
|
+
case 4095:
|
|
1767
|
+
case 3583:
|
|
1768
|
+
case 4068:
|
|
1769
|
+
case 2532:
|
|
1770
|
+
return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
|
|
1771
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
1772
|
+
case 8116:
|
|
1773
|
+
case 7059:
|
|
1774
|
+
case 5753:
|
|
1775
|
+
case 5535:
|
|
1776
|
+
case 5445:
|
|
1777
|
+
case 5701:
|
|
1778
|
+
case 4933:
|
|
1779
|
+
case 4677:
|
|
1780
|
+
case 5533:
|
|
1781
|
+
case 5789:
|
|
1782
|
+
case 5021:
|
|
1783
|
+
case 4765:
|
|
1784
|
+
if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
|
|
1785
|
+
// (m)ax-content, (m)in-content
|
|
1786
|
+
case 109:
|
|
1787
|
+
if (charat(value, length2 + 4) !== 45) break;
|
|
1788
|
+
// (f)ill-available, (f)it-content
|
|
1789
|
+
case 102:
|
|
1790
|
+
return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
|
|
1791
|
+
// (s)tretch
|
|
1792
|
+
case 115:
|
|
1793
|
+
return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
|
|
1794
|
+
}
|
|
1795
|
+
break;
|
|
1796
|
+
// position: sticky
|
|
1797
|
+
case 4949:
|
|
1798
|
+
if (charat(value, length2 + 1) !== 115) break;
|
|
1799
|
+
// display: (flex|inline-flex)
|
|
1800
|
+
case 6444:
|
|
1801
|
+
switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
|
|
1802
|
+
// stic(k)y
|
|
1803
|
+
case 107:
|
|
1804
|
+
return replace(value, ":", ":" + WEBKIT) + value;
|
|
1805
|
+
// (inline-)?fl(e)x
|
|
1806
|
+
case 101:
|
|
1807
|
+
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
|
|
1808
|
+
}
|
|
1809
|
+
break;
|
|
1810
|
+
// writing-mode
|
|
1811
|
+
case 5936:
|
|
1812
|
+
switch (charat(value, length2 + 11)) {
|
|
1813
|
+
// vertical-l(r)
|
|
1814
|
+
case 114:
|
|
1815
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
|
|
1816
|
+
// vertical-r(l)
|
|
1817
|
+
case 108:
|
|
1818
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
|
|
1819
|
+
// horizontal(-)tb
|
|
1820
|
+
case 45:
|
|
1821
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
|
|
1822
|
+
}
|
|
1823
|
+
return WEBKIT + value + MS + value + value;
|
|
1824
|
+
}
|
|
1825
|
+
return value;
|
|
1826
|
+
}
|
|
1827
|
+
var prefixer = function prefixer2(element, index, children, callback) {
|
|
1828
|
+
if (element.length > -1) {
|
|
1829
|
+
if (!element["return"]) switch (element.type) {
|
|
1830
|
+
case DECLARATION:
|
|
1831
|
+
element["return"] = prefix(element.value, element.length);
|
|
1832
|
+
break;
|
|
1833
|
+
case KEYFRAMES:
|
|
1834
|
+
return serialize([copy(element, {
|
|
1835
|
+
value: replace(element.value, "@", "@" + WEBKIT)
|
|
1836
|
+
})], callback);
|
|
1837
|
+
case RULESET:
|
|
1838
|
+
if (element.length) return combine(element.props, function(value) {
|
|
1839
|
+
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
|
1840
|
+
// :read-(only|write)
|
|
1841
|
+
case ":read-only":
|
|
1842
|
+
case ":read-write":
|
|
1843
|
+
return serialize([copy(element, {
|
|
1844
|
+
props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
|
|
1845
|
+
})], callback);
|
|
1846
|
+
// :placeholder
|
|
1847
|
+
case "::placeholder":
|
|
1848
|
+
return serialize([copy(element, {
|
|
1849
|
+
props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
|
|
1850
|
+
}), copy(element, {
|
|
1851
|
+
props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
|
|
1852
|
+
}), copy(element, {
|
|
1853
|
+
props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
|
|
1854
|
+
})], callback);
|
|
1855
|
+
}
|
|
1856
|
+
return "";
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
};
|
|
1861
|
+
var getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {
|
|
1862
|
+
return memoize(function() {
|
|
1863
|
+
return {};
|
|
1864
|
+
});
|
|
1865
|
+
});
|
|
1866
|
+
var defaultStylisPlugins = [prefixer];
|
|
1867
|
+
var createCache = function createCache2(options) {
|
|
1868
|
+
var key = options.key;
|
|
1869
|
+
if (isBrowser && key === "css") {
|
|
1870
|
+
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1871
|
+
Array.prototype.forEach.call(ssrStyles, function(node2) {
|
|
1872
|
+
var dataEmotionAttribute = node2.getAttribute("data-emotion");
|
|
1873
|
+
if (dataEmotionAttribute.indexOf(" ") === -1) {
|
|
1874
|
+
return;
|
|
1875
|
+
}
|
|
1876
|
+
document.head.appendChild(node2);
|
|
1877
|
+
node2.setAttribute("data-s", "");
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
1881
|
+
var inserted = {};
|
|
1882
|
+
var container;
|
|
1883
|
+
var nodesToHydrate = [];
|
|
1884
|
+
if (isBrowser) {
|
|
1885
|
+
container = options.container || document.head;
|
|
1886
|
+
Array.prototype.forEach.call(
|
|
1887
|
+
// this means we will ignore elements which don't have a space in them which
|
|
1888
|
+
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1889
|
+
document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
|
|
1890
|
+
function(node2) {
|
|
1891
|
+
var attrib = node2.getAttribute("data-emotion").split(" ");
|
|
1892
|
+
for (var i = 1; i < attrib.length; i++) {
|
|
1893
|
+
inserted[attrib[i]] = true;
|
|
1894
|
+
}
|
|
1895
|
+
nodesToHydrate.push(node2);
|
|
1896
|
+
}
|
|
1897
|
+
);
|
|
1898
|
+
}
|
|
1899
|
+
var _insert;
|
|
1900
|
+
var omnipresentPlugins = [compat, removeLabel];
|
|
1901
|
+
if (!getServerStylisCache) {
|
|
1902
|
+
var currentSheet;
|
|
1903
|
+
var finalizingPlugins = [stringify, rulesheet(function(rule) {
|
|
1904
|
+
currentSheet.insert(rule);
|
|
1905
|
+
})];
|
|
1906
|
+
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
1907
|
+
var stylis = function stylis2(styles) {
|
|
1908
|
+
return serialize(compile(styles), serializer);
|
|
1909
|
+
};
|
|
1910
|
+
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
1911
|
+
currentSheet = sheet;
|
|
1912
|
+
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1913
|
+
if (shouldCache) {
|
|
1914
|
+
cache.inserted[serialized.name] = true;
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
1917
|
+
} else {
|
|
1918
|
+
var _finalizingPlugins = [stringify];
|
|
1919
|
+
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
1920
|
+
var _stylis = function _stylis2(styles) {
|
|
1921
|
+
return serialize(compile(styles), _serializer);
|
|
1922
|
+
};
|
|
1923
|
+
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1924
|
+
var getRules3 = function getRules4(selector, serialized) {
|
|
1925
|
+
var name = serialized.name;
|
|
1926
|
+
if (serverStylisCache[name] === void 0) {
|
|
1927
|
+
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1928
|
+
}
|
|
1929
|
+
return serverStylisCache[name];
|
|
1930
|
+
};
|
|
1931
|
+
_insert = function _insert2(selector, serialized, sheet, shouldCache) {
|
|
1932
|
+
var name = serialized.name;
|
|
1933
|
+
var rules = getRules3(selector, serialized);
|
|
1934
|
+
if (cache.compat === void 0) {
|
|
1935
|
+
if (shouldCache) {
|
|
1936
|
+
cache.inserted[name] = true;
|
|
1937
|
+
}
|
|
1938
|
+
return rules;
|
|
1939
|
+
} else {
|
|
1940
|
+
if (shouldCache) {
|
|
1941
|
+
cache.inserted[name] = rules;
|
|
1942
|
+
} else {
|
|
1943
|
+
return rules;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
};
|
|
1947
|
+
}
|
|
1948
|
+
var cache = {
|
|
1949
|
+
key,
|
|
1950
|
+
sheet: new StyleSheet({
|
|
1951
|
+
key,
|
|
1952
|
+
container,
|
|
1953
|
+
nonce: options.nonce,
|
|
1954
|
+
speedy: options.speedy,
|
|
1955
|
+
prepend: options.prepend,
|
|
1956
|
+
insertionPoint: options.insertionPoint
|
|
1957
|
+
}),
|
|
1958
|
+
nonce: options.nonce,
|
|
1959
|
+
inserted,
|
|
1960
|
+
registered: {},
|
|
1961
|
+
insert: _insert
|
|
1962
|
+
};
|
|
1963
|
+
cache.sheet.hydrate(nodesToHydrate);
|
|
1964
|
+
return cache;
|
|
1965
|
+
};
|
|
1966
|
+
|
|
1967
|
+
// src/providers/LayoutProvider.tsx
|
|
1968
|
+
var import_react5 = require("@emotion/react");
|
|
1969
|
+
var import_material4 = require("@mui/material");
|
|
1970
|
+
var import_colors = require("@mui/material/colors");
|
|
1971
|
+
|
|
1972
|
+
// node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1973
|
+
function _extends() {
|
|
1974
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
1975
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
1976
|
+
var t = arguments[e];
|
|
1977
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1978
|
+
}
|
|
1979
|
+
return n;
|
|
1980
|
+
}, _extends.apply(null, arguments);
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
// node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
1984
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
1985
|
+
if (null == r) return {};
|
|
1986
|
+
var t = {};
|
|
1987
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
1988
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
1989
|
+
t[n] = r[n];
|
|
1990
|
+
}
|
|
1991
|
+
return t;
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
// node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider.js
|
|
1995
|
+
var React4 = __toESM(require("react"));
|
|
1996
|
+
var import_prop_types = __toESM(require_prop_types());
|
|
1997
|
+
var import_styles = require("@mui/material/styles");
|
|
1998
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1999
|
+
var _excluded = ["localeText"];
|
|
2000
|
+
var MuiPickersAdapterContext = /* @__PURE__ */ React4.createContext(null);
|
|
2001
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2002
|
+
MuiPickersAdapterContext.displayName = "MuiPickersAdapterContext";
|
|
2003
|
+
}
|
|
2004
|
+
var LocalizationProvider = function LocalizationProvider2(inProps) {
|
|
2005
|
+
const {
|
|
2006
|
+
localeText: inLocaleText
|
|
2007
|
+
} = inProps, otherInProps = _objectWithoutPropertiesLoose(inProps, _excluded);
|
|
2008
|
+
const {
|
|
2009
|
+
utils: parentUtils,
|
|
2010
|
+
localeText: parentLocaleText
|
|
2011
|
+
} = React4.useContext(MuiPickersAdapterContext) ?? {
|
|
2012
|
+
utils: void 0,
|
|
2013
|
+
localeText: void 0
|
|
2014
|
+
};
|
|
2015
|
+
const props = (0, import_styles.useThemeProps)({
|
|
2016
|
+
// We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,
|
|
2017
|
+
// We will then merge this theme value with our value manually
|
|
2018
|
+
props: otherInProps,
|
|
2019
|
+
name: "MuiLocalizationProvider"
|
|
2020
|
+
});
|
|
2021
|
+
const {
|
|
2022
|
+
children,
|
|
2023
|
+
dateAdapter: DateAdapter,
|
|
2024
|
+
dateFormats,
|
|
2025
|
+
dateLibInstance,
|
|
2026
|
+
adapterLocale,
|
|
2027
|
+
localeText: themeLocaleText
|
|
2028
|
+
} = props;
|
|
2029
|
+
const localeText = React4.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);
|
|
2030
|
+
const utils = React4.useMemo(() => {
|
|
2031
|
+
if (!DateAdapter) {
|
|
2032
|
+
if (parentUtils) {
|
|
2033
|
+
return parentUtils;
|
|
2034
|
+
}
|
|
2035
|
+
return null;
|
|
2036
|
+
}
|
|
2037
|
+
const adapter = new DateAdapter({
|
|
2038
|
+
locale: adapterLocale,
|
|
2039
|
+
formats: dateFormats,
|
|
2040
|
+
instance: dateLibInstance
|
|
2041
|
+
});
|
|
2042
|
+
if (!adapter.isMUIAdapter) {
|
|
2043
|
+
throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`", "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", "More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
|
|
2044
|
+
`));
|
|
2045
|
+
}
|
|
2046
|
+
return adapter;
|
|
2047
|
+
}, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentUtils]);
|
|
2048
|
+
const defaultDates = React4.useMemo(() => {
|
|
2049
|
+
if (!utils) {
|
|
2050
|
+
return null;
|
|
2051
|
+
}
|
|
2052
|
+
return {
|
|
2053
|
+
minDate: utils.date("1900-01-01T00:00:00.000"),
|
|
2054
|
+
maxDate: utils.date("2099-12-31T00:00:00.000")
|
|
2055
|
+
};
|
|
2056
|
+
}, [utils]);
|
|
2057
|
+
const contextValue = React4.useMemo(() => {
|
|
2058
|
+
return {
|
|
2059
|
+
utils,
|
|
2060
|
+
defaultDates,
|
|
2061
|
+
localeText
|
|
2062
|
+
};
|
|
2063
|
+
}, [defaultDates, utils, localeText]);
|
|
2064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MuiPickersAdapterContext.Provider, {
|
|
2065
|
+
value: contextValue,
|
|
2066
|
+
children
|
|
2067
|
+
});
|
|
2068
|
+
};
|
|
2069
|
+
process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
2070
|
+
// ----------------------------- Warning --------------------------------
|
|
2071
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2072
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
2073
|
+
// ----------------------------------------------------------------------
|
|
2074
|
+
/**
|
|
2075
|
+
* Locale for the date library you are using
|
|
2076
|
+
*/
|
|
2077
|
+
adapterLocale: import_prop_types.default.any,
|
|
2078
|
+
children: import_prop_types.default.node,
|
|
2079
|
+
/**
|
|
2080
|
+
* Date library adapter class function.
|
|
2081
|
+
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#date-library-adapter-setup date adapter setup section} for more details.
|
|
2082
|
+
*/
|
|
2083
|
+
dateAdapter: import_prop_types.default.func,
|
|
2084
|
+
/**
|
|
2085
|
+
* Formats that are used for any child pickers
|
|
2086
|
+
*/
|
|
2087
|
+
dateFormats: import_prop_types.default.shape({
|
|
2088
|
+
dayOfMonth: import_prop_types.default.string,
|
|
2089
|
+
dayOfMonthFull: import_prop_types.default.string,
|
|
2090
|
+
fullDate: import_prop_types.default.string,
|
|
2091
|
+
fullTime: import_prop_types.default.string,
|
|
2092
|
+
fullTime12h: import_prop_types.default.string,
|
|
2093
|
+
fullTime24h: import_prop_types.default.string,
|
|
2094
|
+
hours12h: import_prop_types.default.string,
|
|
2095
|
+
hours24h: import_prop_types.default.string,
|
|
2096
|
+
keyboardDate: import_prop_types.default.string,
|
|
2097
|
+
keyboardDateTime: import_prop_types.default.string,
|
|
2098
|
+
keyboardDateTime12h: import_prop_types.default.string,
|
|
2099
|
+
keyboardDateTime24h: import_prop_types.default.string,
|
|
2100
|
+
meridiem: import_prop_types.default.string,
|
|
2101
|
+
minutes: import_prop_types.default.string,
|
|
2102
|
+
month: import_prop_types.default.string,
|
|
2103
|
+
monthShort: import_prop_types.default.string,
|
|
2104
|
+
normalDate: import_prop_types.default.string,
|
|
2105
|
+
normalDateWithWeekday: import_prop_types.default.string,
|
|
2106
|
+
seconds: import_prop_types.default.string,
|
|
2107
|
+
shortDate: import_prop_types.default.string,
|
|
2108
|
+
weekday: import_prop_types.default.string,
|
|
2109
|
+
weekdayShort: import_prop_types.default.string,
|
|
2110
|
+
year: import_prop_types.default.string
|
|
2111
|
+
}),
|
|
2112
|
+
/**
|
|
2113
|
+
* Date library instance you are using, if it has some global overrides
|
|
2114
|
+
* ```jsx
|
|
2115
|
+
* dateLibInstance={momentTimeZone}
|
|
2116
|
+
* ```
|
|
2117
|
+
*/
|
|
2118
|
+
dateLibInstance: import_prop_types.default.any,
|
|
2119
|
+
/**
|
|
2120
|
+
* Locale for components texts
|
|
2121
|
+
*/
|
|
2122
|
+
localeText: import_prop_types.default.object
|
|
2123
|
+
} : void 0;
|
|
2124
|
+
|
|
2125
|
+
// node_modules/@mui/x-internals/esm/warning/warning.js
|
|
2126
|
+
var warnedOnceCache = /* @__PURE__ */ new Set();
|
|
2127
|
+
function warnOnce(message, gravity = "warning") {
|
|
2128
|
+
if (process.env.NODE_ENV === "production") {
|
|
2129
|
+
return;
|
|
2130
|
+
}
|
|
2131
|
+
const cleanMessage = Array.isArray(message) ? message.join("\n") : message;
|
|
2132
|
+
if (!warnedOnceCache.has(cleanMessage)) {
|
|
2133
|
+
warnedOnceCache.add(cleanMessage);
|
|
2134
|
+
if (gravity === "error") {
|
|
2135
|
+
console.error(cleanMessage);
|
|
2136
|
+
} else {
|
|
2137
|
+
console.warn(cleanMessage);
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
// node_modules/@mui/x-date-pickers/AdapterDayjs/AdapterDayjs.js
|
|
2143
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
2144
|
+
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear"));
|
|
2145
|
+
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat"));
|
|
2146
|
+
var import_localizedFormat = __toESM(require("dayjs/plugin/localizedFormat"));
|
|
2147
|
+
var import_isBetween = __toESM(require("dayjs/plugin/isBetween"));
|
|
2148
|
+
var import_advancedFormat = __toESM(require("dayjs/plugin/advancedFormat"));
|
|
2149
|
+
import_dayjs.default.extend(import_localizedFormat.default);
|
|
2150
|
+
import_dayjs.default.extend(import_weekOfYear.default);
|
|
2151
|
+
import_dayjs.default.extend(import_isBetween.default);
|
|
2152
|
+
import_dayjs.default.extend(import_advancedFormat.default);
|
|
2153
|
+
var formatTokenMap = {
|
|
2154
|
+
// Year
|
|
2155
|
+
YY: "year",
|
|
2156
|
+
YYYY: {
|
|
2157
|
+
sectionType: "year",
|
|
2158
|
+
contentType: "digit",
|
|
2159
|
+
maxLength: 4
|
|
2160
|
+
},
|
|
2161
|
+
// Month
|
|
2162
|
+
M: {
|
|
2163
|
+
sectionType: "month",
|
|
2164
|
+
contentType: "digit",
|
|
2165
|
+
maxLength: 2
|
|
2166
|
+
},
|
|
2167
|
+
MM: "month",
|
|
2168
|
+
MMM: {
|
|
2169
|
+
sectionType: "month",
|
|
2170
|
+
contentType: "letter"
|
|
2171
|
+
},
|
|
2172
|
+
MMMM: {
|
|
2173
|
+
sectionType: "month",
|
|
2174
|
+
contentType: "letter"
|
|
2175
|
+
},
|
|
2176
|
+
// Day of the month
|
|
2177
|
+
D: {
|
|
2178
|
+
sectionType: "day",
|
|
2179
|
+
contentType: "digit",
|
|
2180
|
+
maxLength: 2
|
|
2181
|
+
},
|
|
2182
|
+
DD: "day",
|
|
2183
|
+
Do: {
|
|
2184
|
+
sectionType: "day",
|
|
2185
|
+
contentType: "digit-with-letter"
|
|
2186
|
+
},
|
|
2187
|
+
// Day of the week
|
|
2188
|
+
d: {
|
|
2189
|
+
sectionType: "weekDay",
|
|
2190
|
+
contentType: "digit",
|
|
2191
|
+
maxLength: 2
|
|
2192
|
+
},
|
|
2193
|
+
dd: {
|
|
2194
|
+
sectionType: "weekDay",
|
|
2195
|
+
contentType: "letter"
|
|
2196
|
+
},
|
|
2197
|
+
ddd: {
|
|
2198
|
+
sectionType: "weekDay",
|
|
2199
|
+
contentType: "letter"
|
|
2200
|
+
},
|
|
2201
|
+
dddd: {
|
|
2202
|
+
sectionType: "weekDay",
|
|
2203
|
+
contentType: "letter"
|
|
2204
|
+
},
|
|
2205
|
+
// Meridiem
|
|
2206
|
+
A: "meridiem",
|
|
2207
|
+
a: "meridiem",
|
|
2208
|
+
// Hours
|
|
2209
|
+
H: {
|
|
2210
|
+
sectionType: "hours",
|
|
2211
|
+
contentType: "digit",
|
|
2212
|
+
maxLength: 2
|
|
2213
|
+
},
|
|
2214
|
+
HH: "hours",
|
|
2215
|
+
h: {
|
|
2216
|
+
sectionType: "hours",
|
|
2217
|
+
contentType: "digit",
|
|
2218
|
+
maxLength: 2
|
|
2219
|
+
},
|
|
2220
|
+
hh: "hours",
|
|
2221
|
+
// Minutes
|
|
2222
|
+
m: {
|
|
2223
|
+
sectionType: "minutes",
|
|
2224
|
+
contentType: "digit",
|
|
2225
|
+
maxLength: 2
|
|
2226
|
+
},
|
|
2227
|
+
mm: "minutes",
|
|
2228
|
+
// Seconds
|
|
2229
|
+
s: {
|
|
2230
|
+
sectionType: "seconds",
|
|
2231
|
+
contentType: "digit",
|
|
2232
|
+
maxLength: 2
|
|
2233
|
+
},
|
|
2234
|
+
ss: "seconds"
|
|
2235
|
+
};
|
|
2236
|
+
var defaultFormats = {
|
|
2237
|
+
year: "YYYY",
|
|
2238
|
+
month: "MMMM",
|
|
2239
|
+
monthShort: "MMM",
|
|
2240
|
+
dayOfMonth: "D",
|
|
2241
|
+
dayOfMonthFull: "Do",
|
|
2242
|
+
weekday: "dddd",
|
|
2243
|
+
weekdayShort: "dd",
|
|
2244
|
+
hours24h: "HH",
|
|
2245
|
+
hours12h: "hh",
|
|
2246
|
+
meridiem: "A",
|
|
2247
|
+
minutes: "mm",
|
|
2248
|
+
seconds: "ss",
|
|
2249
|
+
fullDate: "ll",
|
|
2250
|
+
keyboardDate: "L",
|
|
2251
|
+
shortDate: "MMM D",
|
|
2252
|
+
normalDate: "D MMMM",
|
|
2253
|
+
normalDateWithWeekday: "ddd, MMM D",
|
|
2254
|
+
fullTime: "LT",
|
|
2255
|
+
fullTime12h: "hh:mm A",
|
|
2256
|
+
fullTime24h: "HH:mm",
|
|
2257
|
+
keyboardDateTime: "L LT",
|
|
2258
|
+
keyboardDateTime12h: "L hh:mm A",
|
|
2259
|
+
keyboardDateTime24h: "L HH:mm"
|
|
2260
|
+
};
|
|
2261
|
+
var MISSING_UTC_PLUGIN = ["Missing UTC plugin", "To be able to use UTC or timezones, you have to enable the `utc` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n");
|
|
2262
|
+
var MISSING_TIMEZONE_PLUGIN = ["Missing timezone plugin", "To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");
|
|
2263
|
+
var withLocale = (dayjs3, locale) => !locale ? dayjs3 : (...args) => dayjs3(...args).locale(locale);
|
|
2264
|
+
var AdapterDayjs = class {
|
|
2265
|
+
constructor({
|
|
2266
|
+
locale: _locale,
|
|
2267
|
+
formats
|
|
2268
|
+
} = {}) {
|
|
2269
|
+
this.isMUIAdapter = true;
|
|
2270
|
+
this.isTimezoneCompatible = true;
|
|
2271
|
+
this.lib = "dayjs";
|
|
2272
|
+
this.dayjs = void 0;
|
|
2273
|
+
this.locale = void 0;
|
|
2274
|
+
this.formats = void 0;
|
|
2275
|
+
this.escapedCharacters = {
|
|
2276
|
+
start: "[",
|
|
2277
|
+
end: "]"
|
|
2278
|
+
};
|
|
2279
|
+
this.formatTokenMap = formatTokenMap;
|
|
2280
|
+
this.setLocaleToValue = (value) => {
|
|
2281
|
+
const expectedLocale = this.getCurrentLocaleCode();
|
|
2282
|
+
if (expectedLocale === value.locale()) {
|
|
2283
|
+
return value;
|
|
2284
|
+
}
|
|
2285
|
+
return value.locale(expectedLocale);
|
|
2286
|
+
};
|
|
2287
|
+
this.hasUTCPlugin = () => typeof import_dayjs.default.utc !== "undefined";
|
|
2288
|
+
this.hasTimezonePlugin = () => typeof import_dayjs.default.tz !== "undefined";
|
|
2289
|
+
this.isSame = (value, comparing, comparisonTemplate) => {
|
|
2290
|
+
const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));
|
|
2291
|
+
return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);
|
|
2292
|
+
};
|
|
2293
|
+
this.cleanTimezone = (timezone) => {
|
|
2294
|
+
switch (timezone) {
|
|
2295
|
+
case "default": {
|
|
2296
|
+
return void 0;
|
|
2297
|
+
}
|
|
2298
|
+
case "system": {
|
|
2299
|
+
return import_dayjs.default.tz.guess();
|
|
2300
|
+
}
|
|
2301
|
+
default: {
|
|
2302
|
+
return timezone;
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
};
|
|
2306
|
+
this.createSystemDate = (value) => {
|
|
2307
|
+
if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
|
|
2308
|
+
const timezone = import_dayjs.default.tz.guess();
|
|
2309
|
+
if (timezone !== "UTC") {
|
|
2310
|
+
return import_dayjs.default.tz(value, timezone);
|
|
2311
|
+
}
|
|
2312
|
+
return (0, import_dayjs.default)(value);
|
|
2313
|
+
}
|
|
2314
|
+
return (0, import_dayjs.default)(value);
|
|
2315
|
+
};
|
|
2316
|
+
this.createUTCDate = (value) => {
|
|
2317
|
+
if (!this.hasUTCPlugin()) {
|
|
2318
|
+
throw new Error(MISSING_UTC_PLUGIN);
|
|
2319
|
+
}
|
|
2320
|
+
return import_dayjs.default.utc(value);
|
|
2321
|
+
};
|
|
2322
|
+
this.createTZDate = (value, timezone) => {
|
|
2323
|
+
if (!this.hasUTCPlugin()) {
|
|
2324
|
+
throw new Error(MISSING_UTC_PLUGIN);
|
|
2325
|
+
}
|
|
2326
|
+
if (!this.hasTimezonePlugin()) {
|
|
2327
|
+
throw new Error(MISSING_TIMEZONE_PLUGIN);
|
|
2328
|
+
}
|
|
2329
|
+
const keepLocalTime = value !== void 0 && !value.endsWith("Z");
|
|
2330
|
+
return (0, import_dayjs.default)(value).tz(this.cleanTimezone(timezone), keepLocalTime);
|
|
2331
|
+
};
|
|
2332
|
+
this.getLocaleFormats = () => {
|
|
2333
|
+
const locales = import_dayjs.default.Ls;
|
|
2334
|
+
const locale = this.locale || "en";
|
|
2335
|
+
let localeObject = locales[locale];
|
|
2336
|
+
if (localeObject === void 0) {
|
|
2337
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2338
|
+
warnOnce(["MUI X: Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.", "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", "fallback on English locale."]);
|
|
2339
|
+
}
|
|
2340
|
+
localeObject = locales.en;
|
|
2341
|
+
}
|
|
2342
|
+
return localeObject.formats;
|
|
2343
|
+
};
|
|
2344
|
+
this.adjustOffset = (value) => {
|
|
2345
|
+
if (!this.hasTimezonePlugin()) {
|
|
2346
|
+
return value;
|
|
2347
|
+
}
|
|
2348
|
+
const timezone = this.getTimezone(value);
|
|
2349
|
+
if (timezone !== "UTC") {
|
|
2350
|
+
const fixedValue = value.tz(this.cleanTimezone(timezone), true);
|
|
2351
|
+
if (fixedValue.$offset === (value.$offset ?? 0)) {
|
|
2352
|
+
return value;
|
|
2353
|
+
}
|
|
2354
|
+
value.$offset = fixedValue.$offset;
|
|
2355
|
+
}
|
|
2356
|
+
return value;
|
|
2357
|
+
};
|
|
2358
|
+
this.date = (value, timezone = "default") => {
|
|
2359
|
+
if (value === null) {
|
|
2360
|
+
return null;
|
|
2361
|
+
}
|
|
2362
|
+
let parsedValue;
|
|
2363
|
+
if (timezone === "UTC") {
|
|
2364
|
+
parsedValue = this.createUTCDate(value);
|
|
2365
|
+
} else if (timezone === "system" || timezone === "default" && !this.hasTimezonePlugin()) {
|
|
2366
|
+
parsedValue = this.createSystemDate(value);
|
|
2367
|
+
} else {
|
|
2368
|
+
parsedValue = this.createTZDate(value, timezone);
|
|
2369
|
+
}
|
|
2370
|
+
if (this.locale === void 0) {
|
|
2371
|
+
return parsedValue;
|
|
2372
|
+
}
|
|
2373
|
+
return parsedValue.locale(this.locale);
|
|
2374
|
+
};
|
|
2375
|
+
this.getInvalidDate = () => (0, import_dayjs.default)(/* @__PURE__ */ new Date("Invalid date"));
|
|
2376
|
+
this.getTimezone = (value) => {
|
|
2377
|
+
if (this.hasTimezonePlugin()) {
|
|
2378
|
+
const zone = value.$x?.$timezone;
|
|
2379
|
+
if (zone) {
|
|
2380
|
+
return zone;
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
if (this.hasUTCPlugin() && value.isUTC()) {
|
|
2384
|
+
return "UTC";
|
|
2385
|
+
}
|
|
2386
|
+
return "system";
|
|
2387
|
+
};
|
|
2388
|
+
this.setTimezone = (value, timezone) => {
|
|
2389
|
+
if (this.getTimezone(value) === timezone) {
|
|
2390
|
+
return value;
|
|
2391
|
+
}
|
|
2392
|
+
if (timezone === "UTC") {
|
|
2393
|
+
if (!this.hasUTCPlugin()) {
|
|
2394
|
+
throw new Error(MISSING_UTC_PLUGIN);
|
|
2395
|
+
}
|
|
2396
|
+
return value.utc();
|
|
2397
|
+
}
|
|
2398
|
+
if (timezone === "system") {
|
|
2399
|
+
return value.local();
|
|
2400
|
+
}
|
|
2401
|
+
if (!this.hasTimezonePlugin()) {
|
|
2402
|
+
if (timezone === "default") {
|
|
2403
|
+
return value;
|
|
2404
|
+
}
|
|
2405
|
+
throw new Error(MISSING_TIMEZONE_PLUGIN);
|
|
2406
|
+
}
|
|
2407
|
+
return import_dayjs.default.tz(value, this.cleanTimezone(timezone));
|
|
2408
|
+
};
|
|
2409
|
+
this.toJsDate = (value) => {
|
|
2410
|
+
return value.toDate();
|
|
2411
|
+
};
|
|
2412
|
+
this.parse = (value, format) => {
|
|
2413
|
+
if (value === "") {
|
|
2414
|
+
return null;
|
|
2415
|
+
}
|
|
2416
|
+
return this.dayjs(value, format, this.locale, true);
|
|
2417
|
+
};
|
|
2418
|
+
this.getCurrentLocaleCode = () => {
|
|
2419
|
+
return this.locale || "en";
|
|
2420
|
+
};
|
|
2421
|
+
this.is12HourCycleInCurrentLocale = () => {
|
|
2422
|
+
return /A|a/.test(this.getLocaleFormats().LT || "");
|
|
2423
|
+
};
|
|
2424
|
+
this.expandFormat = (format) => {
|
|
2425
|
+
const localeFormats = this.getLocaleFormats();
|
|
2426
|
+
const t = (formatBis) => formatBis.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));
|
|
2427
|
+
return format.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {
|
|
2428
|
+
const B = b && b.toUpperCase();
|
|
2429
|
+
return a || localeFormats[b] || t(localeFormats[B]);
|
|
2430
|
+
});
|
|
2431
|
+
};
|
|
2432
|
+
this.isValid = (value) => {
|
|
2433
|
+
if (value == null) {
|
|
2434
|
+
return false;
|
|
2435
|
+
}
|
|
2436
|
+
return value.isValid();
|
|
2437
|
+
};
|
|
2438
|
+
this.format = (value, formatKey) => {
|
|
2439
|
+
return this.formatByString(value, this.formats[formatKey]);
|
|
2440
|
+
};
|
|
2441
|
+
this.formatByString = (value, formatString) => {
|
|
2442
|
+
return this.dayjs(value).format(formatString);
|
|
2443
|
+
};
|
|
2444
|
+
this.formatNumber = (numberToFormat) => {
|
|
2445
|
+
return numberToFormat;
|
|
2446
|
+
};
|
|
2447
|
+
this.isEqual = (value, comparing) => {
|
|
2448
|
+
if (value === null && comparing === null) {
|
|
2449
|
+
return true;
|
|
2450
|
+
}
|
|
2451
|
+
if (value === null || comparing === null) {
|
|
2452
|
+
return false;
|
|
2453
|
+
}
|
|
2454
|
+
return value.toDate().getTime() === comparing.toDate().getTime();
|
|
2455
|
+
};
|
|
2456
|
+
this.isSameYear = (value, comparing) => {
|
|
2457
|
+
return this.isSame(value, comparing, "YYYY");
|
|
2458
|
+
};
|
|
2459
|
+
this.isSameMonth = (value, comparing) => {
|
|
2460
|
+
return this.isSame(value, comparing, "YYYY-MM");
|
|
2461
|
+
};
|
|
2462
|
+
this.isSameDay = (value, comparing) => {
|
|
2463
|
+
return this.isSame(value, comparing, "YYYY-MM-DD");
|
|
2464
|
+
};
|
|
2465
|
+
this.isSameHour = (value, comparing) => {
|
|
2466
|
+
return value.isSame(comparing, "hour");
|
|
2467
|
+
};
|
|
2468
|
+
this.isAfter = (value, comparing) => {
|
|
2469
|
+
return value > comparing;
|
|
2470
|
+
};
|
|
2471
|
+
this.isAfterYear = (value, comparing) => {
|
|
2472
|
+
if (!this.hasUTCPlugin()) {
|
|
2473
|
+
return value.isAfter(comparing, "year");
|
|
2474
|
+
}
|
|
2475
|
+
return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();
|
|
2476
|
+
};
|
|
2477
|
+
this.isAfterDay = (value, comparing) => {
|
|
2478
|
+
if (!this.hasUTCPlugin()) {
|
|
2479
|
+
return value.isAfter(comparing, "day");
|
|
2480
|
+
}
|
|
2481
|
+
return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();
|
|
2482
|
+
};
|
|
2483
|
+
this.isBefore = (value, comparing) => {
|
|
2484
|
+
return value < comparing;
|
|
2485
|
+
};
|
|
2486
|
+
this.isBeforeYear = (value, comparing) => {
|
|
2487
|
+
if (!this.hasUTCPlugin()) {
|
|
2488
|
+
return value.isBefore(comparing, "year");
|
|
2489
|
+
}
|
|
2490
|
+
return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();
|
|
2491
|
+
};
|
|
2492
|
+
this.isBeforeDay = (value, comparing) => {
|
|
2493
|
+
if (!this.hasUTCPlugin()) {
|
|
2494
|
+
return value.isBefore(comparing, "day");
|
|
2495
|
+
}
|
|
2496
|
+
return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();
|
|
2497
|
+
};
|
|
2498
|
+
this.isWithinRange = (value, [start, end]) => {
|
|
2499
|
+
return value >= start && value <= end;
|
|
2500
|
+
};
|
|
2501
|
+
this.startOfYear = (value) => {
|
|
2502
|
+
return this.adjustOffset(value.startOf("year"));
|
|
2503
|
+
};
|
|
2504
|
+
this.startOfMonth = (value) => {
|
|
2505
|
+
return this.adjustOffset(value.startOf("month"));
|
|
2506
|
+
};
|
|
2507
|
+
this.startOfWeek = (value) => {
|
|
2508
|
+
return this.adjustOffset(this.setLocaleToValue(value).startOf("week"));
|
|
2509
|
+
};
|
|
2510
|
+
this.startOfDay = (value) => {
|
|
2511
|
+
return this.adjustOffset(value.startOf("day"));
|
|
2512
|
+
};
|
|
2513
|
+
this.endOfYear = (value) => {
|
|
2514
|
+
return this.adjustOffset(value.endOf("year"));
|
|
2515
|
+
};
|
|
2516
|
+
this.endOfMonth = (value) => {
|
|
2517
|
+
return this.adjustOffset(value.endOf("month"));
|
|
2518
|
+
};
|
|
2519
|
+
this.endOfWeek = (value) => {
|
|
2520
|
+
return this.adjustOffset(this.setLocaleToValue(value).endOf("week"));
|
|
2521
|
+
};
|
|
2522
|
+
this.endOfDay = (value) => {
|
|
2523
|
+
return this.adjustOffset(value.endOf("day"));
|
|
2524
|
+
};
|
|
2525
|
+
this.addYears = (value, amount) => {
|
|
2526
|
+
return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "year") : value.add(amount, "year"));
|
|
2527
|
+
};
|
|
2528
|
+
this.addMonths = (value, amount) => {
|
|
2529
|
+
return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "month") : value.add(amount, "month"));
|
|
2530
|
+
};
|
|
2531
|
+
this.addWeeks = (value, amount) => {
|
|
2532
|
+
return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "week") : value.add(amount, "week"));
|
|
2533
|
+
};
|
|
2534
|
+
this.addDays = (value, amount) => {
|
|
2535
|
+
return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "day") : value.add(amount, "day"));
|
|
2536
|
+
};
|
|
2537
|
+
this.addHours = (value, amount) => {
|
|
2538
|
+
return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "hour") : value.add(amount, "hour"));
|
|
2539
|
+
};
|
|
2540
|
+
this.addMinutes = (value, amount) => {
|
|
2541
|
+
return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "minute") : value.add(amount, "minute"));
|
|
2542
|
+
};
|
|
2543
|
+
this.addSeconds = (value, amount) => {
|
|
2544
|
+
return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "second") : value.add(amount, "second"));
|
|
2545
|
+
};
|
|
2546
|
+
this.getYear = (value) => {
|
|
2547
|
+
return value.year();
|
|
2548
|
+
};
|
|
2549
|
+
this.getMonth = (value) => {
|
|
2550
|
+
return value.month();
|
|
2551
|
+
};
|
|
2552
|
+
this.getDate = (value) => {
|
|
2553
|
+
return value.date();
|
|
2554
|
+
};
|
|
2555
|
+
this.getHours = (value) => {
|
|
2556
|
+
return value.hour();
|
|
2557
|
+
};
|
|
2558
|
+
this.getMinutes = (value) => {
|
|
2559
|
+
return value.minute();
|
|
2560
|
+
};
|
|
2561
|
+
this.getSeconds = (value) => {
|
|
2562
|
+
return value.second();
|
|
2563
|
+
};
|
|
2564
|
+
this.getMilliseconds = (value) => {
|
|
2565
|
+
return value.millisecond();
|
|
2566
|
+
};
|
|
2567
|
+
this.setYear = (value, year) => {
|
|
2568
|
+
return this.adjustOffset(value.set("year", year));
|
|
2569
|
+
};
|
|
2570
|
+
this.setMonth = (value, month) => {
|
|
2571
|
+
return this.adjustOffset(value.set("month", month));
|
|
2572
|
+
};
|
|
2573
|
+
this.setDate = (value, date) => {
|
|
2574
|
+
return this.adjustOffset(value.set("date", date));
|
|
2575
|
+
};
|
|
2576
|
+
this.setHours = (value, hours) => {
|
|
2577
|
+
return this.adjustOffset(value.set("hour", hours));
|
|
2578
|
+
};
|
|
2579
|
+
this.setMinutes = (value, minutes) => {
|
|
2580
|
+
return this.adjustOffset(value.set("minute", minutes));
|
|
2581
|
+
};
|
|
2582
|
+
this.setSeconds = (value, seconds) => {
|
|
2583
|
+
return this.adjustOffset(value.set("second", seconds));
|
|
2584
|
+
};
|
|
2585
|
+
this.setMilliseconds = (value, milliseconds) => {
|
|
2586
|
+
return this.adjustOffset(value.set("millisecond", milliseconds));
|
|
2587
|
+
};
|
|
2588
|
+
this.getDaysInMonth = (value) => {
|
|
2589
|
+
return value.daysInMonth();
|
|
2590
|
+
};
|
|
2591
|
+
this.getWeekArray = (value) => {
|
|
2592
|
+
const start = this.startOfWeek(this.startOfMonth(value));
|
|
2593
|
+
const end = this.endOfWeek(this.endOfMonth(value));
|
|
2594
|
+
let count = 0;
|
|
2595
|
+
let current = start;
|
|
2596
|
+
const nestedWeeks = [];
|
|
2597
|
+
while (current < end) {
|
|
2598
|
+
const weekNumber = Math.floor(count / 7);
|
|
2599
|
+
nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
|
|
2600
|
+
nestedWeeks[weekNumber].push(current);
|
|
2601
|
+
current = this.addDays(current, 1);
|
|
2602
|
+
count += 1;
|
|
2603
|
+
}
|
|
2604
|
+
return nestedWeeks;
|
|
2605
|
+
};
|
|
2606
|
+
this.getWeekNumber = (value) => {
|
|
2607
|
+
return value.week();
|
|
2608
|
+
};
|
|
2609
|
+
this.getYearRange = ([start, end]) => {
|
|
2610
|
+
const startDate = this.startOfYear(start);
|
|
2611
|
+
const endDate = this.endOfYear(end);
|
|
2612
|
+
const years = [];
|
|
2613
|
+
let current = startDate;
|
|
2614
|
+
while (this.isBefore(current, endDate)) {
|
|
2615
|
+
years.push(current);
|
|
2616
|
+
current = this.addYears(current, 1);
|
|
2617
|
+
}
|
|
2618
|
+
return years;
|
|
2619
|
+
};
|
|
2620
|
+
this.dayjs = withLocale(import_dayjs.default, _locale);
|
|
2621
|
+
this.locale = _locale;
|
|
2622
|
+
this.formats = _extends({}, defaultFormats, formats);
|
|
2623
|
+
import_dayjs.default.extend(import_customParseFormat.default);
|
|
2624
|
+
}
|
|
2625
|
+
getDayOfWeek(value) {
|
|
2626
|
+
return value.day() + 1;
|
|
2627
|
+
}
|
|
2628
|
+
};
|
|
2629
|
+
|
|
2630
|
+
// src/providers/LayoutProvider.tsx
|
|
2631
|
+
var import_react_query = require("@tanstack/react-query");
|
|
2632
|
+
var import_DashboardLayout = require("@toolpad/core/DashboardLayout");
|
|
2633
|
+
var import_i18next = __toESM(require("i18next"), 1);
|
|
2634
|
+
var import_i18next_browser_languagedetector = __toESM(require("i18next-browser-languagedetector"), 1);
|
|
2635
|
+
var import_i18next_http_backend = __toESM(require("i18next-http-backend"), 1);
|
|
2636
|
+
var import_react_i18next = require("react-i18next");
|
|
2637
|
+
var import_zod = require("zod");
|
|
2638
|
+
var import_zod_i18n_map = require("zod-i18n-map");
|
|
2639
|
+
var import_zod2 = __toESM(require("zod-i18n-map/locales/cs/zod.json"), 1);
|
|
2640
|
+
var import_zod3 = __toESM(require("zod-i18n-map/locales/en/zod.json"), 1);
|
|
2641
|
+
|
|
2642
|
+
// src/providers/TanstackRouterAppProvider.tsx
|
|
2643
|
+
var import_react_router6 = require("@tanstack/react-router");
|
|
2644
|
+
var import_AppProvider = require("@toolpad/core/AppProvider");
|
|
2645
|
+
var import_react4 = require("react");
|
|
2646
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2647
|
+
var Link4 = (0, import_react4.forwardRef)((props, ref) => {
|
|
2648
|
+
const { href, history, ...rest } = props;
|
|
2649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_router6.Link, { ref, to: href, replace: history === "replace", ...rest });
|
|
2650
|
+
});
|
|
2651
|
+
var TanstackRouterAppProvider = (props) => {
|
|
2652
|
+
const { pathname } = (0, import_react_router6.useLocation)();
|
|
2653
|
+
const searchParams = (0, import_react_router6.useSearch)({ strict: false });
|
|
2654
|
+
const _navigate = (0, import_react_router6.useNavigate)();
|
|
2655
|
+
const navigate = (0, import_react4.useCallback)(
|
|
2656
|
+
(url, { history = "auto" } = {}) => {
|
|
2657
|
+
_navigate({ to: url.toString(), replace: history === "replace" }).catch(console.error);
|
|
2658
|
+
},
|
|
2659
|
+
[_navigate]
|
|
2660
|
+
);
|
|
2661
|
+
const router = (0, import_react4.useMemo)(() => ({ pathname, searchParams: new URLSearchParams(searchParams), navigate, Link: Link4 }), [pathname, searchParams, navigate]);
|
|
2662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_AppProvider.AppProvider, { router, ...props });
|
|
2663
|
+
};
|
|
2664
|
+
|
|
2665
|
+
// src/providers/LayoutProvider.tsx
|
|
2666
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2667
|
+
var queryClient = new import_react_query.QueryClient();
|
|
2668
|
+
import_i18next.default.use(import_react_i18next.initReactI18next).use(import_i18next_browser_languagedetector.default).use(import_i18next_http_backend.default).init({ fallbackLng: "en" });
|
|
2669
|
+
import_i18next.default.addResourceBundle("en", "zod", import_zod3.default);
|
|
2670
|
+
import_i18next.default.addResourceBundle("cs", "zod", import_zod2.default);
|
|
2671
|
+
import_zod.z.setErrorMap(import_zod_i18n_map.zodI18nMap);
|
|
2672
|
+
var LayoutProvider = ({ getNavigation, title, children }) => {
|
|
2673
|
+
const emotionCache = createCache({ key: "css" });
|
|
2674
|
+
const { t, i18n } = (0, import_react_i18next.useTranslation)();
|
|
2675
|
+
const createdTheme = (0, import_material4.createTheme)({
|
|
2676
|
+
cssVariables: {
|
|
2677
|
+
colorSchemeSelector: "data-toolpad-color-scheme"
|
|
2678
|
+
},
|
|
2679
|
+
colorSchemes: {
|
|
2680
|
+
light: {
|
|
2681
|
+
palette: {
|
|
2682
|
+
primary: { main: import_colors.indigo[600] },
|
|
2683
|
+
secondary: { main: import_colors.indigo[600] },
|
|
2684
|
+
background: {
|
|
2685
|
+
paper: import_colors.grey[200]
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
},
|
|
2689
|
+
dark: {
|
|
2690
|
+
palette: {
|
|
2691
|
+
primary: { main: import_colors.indigo[600] },
|
|
2692
|
+
secondary: { main: import_colors.indigo[600] },
|
|
2693
|
+
background: {
|
|
2694
|
+
paper: import_colors.grey[900]
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
},
|
|
2699
|
+
components: {
|
|
2700
|
+
MuiCssBaseline: {
|
|
2701
|
+
styleOverrides: (theme) => {
|
|
2702
|
+
return {
|
|
2703
|
+
body: {
|
|
2704
|
+
"&::-webkit-scrollbar, & *::-webkit-scrollbar": {
|
|
2705
|
+
width: "0.7em",
|
|
2706
|
+
height: "0.7em"
|
|
2707
|
+
},
|
|
2708
|
+
"&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {
|
|
2709
|
+
backgroundColor: theme.palette.mode === "dark" ? import_colors.grey[900] : import_colors.grey[200],
|
|
2710
|
+
borderRadius: "5px"
|
|
2711
|
+
},
|
|
2712
|
+
"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": {
|
|
2713
|
+
backgroundColor: theme.palette.mode === "dark" ? import_colors.grey[800] : import_colors.grey[400],
|
|
2714
|
+
borderRadius: "10px"
|
|
2715
|
+
},
|
|
2716
|
+
"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": {
|
|
2717
|
+
backgroundColor: theme.palette.mode === "dark" ? import_colors.grey[700] : import_colors.grey[500]
|
|
2718
|
+
},
|
|
2719
|
+
"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": {
|
|
2720
|
+
backgroundColor: "transparent"
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
};
|
|
2724
|
+
}
|
|
2725
|
+
},
|
|
2726
|
+
MuiDrawer: {
|
|
2727
|
+
styleOverrides: {
|
|
2728
|
+
paper: ({ theme }) => ({
|
|
2729
|
+
backgroundColor: "inherit",
|
|
2730
|
+
[theme.breakpoints.down("sm")]: {
|
|
2731
|
+
backgroundColor: theme.palette.background.paper
|
|
2732
|
+
}
|
|
2733
|
+
})
|
|
2734
|
+
}
|
|
2735
|
+
},
|
|
2736
|
+
MuiTextField: {
|
|
2737
|
+
defaultProps: {
|
|
2738
|
+
variant: "outlined",
|
|
2739
|
+
size: "medium",
|
|
2740
|
+
fullWidth: true
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
});
|
|
2745
|
+
const navigation = getNavigation({ user: { name: "Dalibor" }, i18n, t });
|
|
2746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react5.CacheProvider, { value: emotionCache, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material4.ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.resolvedLanguage, children: [
|
|
2747
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TanstackRouterAppProvider, { theme: createdTheme, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2748
|
+
import_DashboardLayout.DashboardLayout,
|
|
2749
|
+
{
|
|
2750
|
+
defaultSidebarCollapsed: true,
|
|
2751
|
+
navigation,
|
|
2752
|
+
branding: {
|
|
2753
|
+
logo: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: "/android-chrome-192x192.png", alt: "Logo" }),
|
|
2754
|
+
title
|
|
2755
|
+
},
|
|
2756
|
+
children
|
|
2757
|
+
}
|
|
2758
|
+
) }) }),
|
|
2759
|
+
","
|
|
2760
|
+
] }) }) });
|
|
2761
|
+
};
|
|
2762
|
+
|
|
2763
|
+
// src/index.ts
|
|
2764
|
+
var import_uuidv7 = require("uuidv7");
|
|
2765
|
+
|
|
2766
|
+
// src/utils/ClientUtils.ts
|
|
2767
|
+
var import_axios = __toESM(require("axios"), 1);
|
|
2768
|
+
|
|
2769
|
+
// src/services/UserService.ts
|
|
2770
|
+
var import_keycloak_js = __toESM(require("keycloak-js"), 1);
|
|
2771
|
+
var import_node_process = require("process");
|
|
2772
|
+
var keycloakConfig = {
|
|
2773
|
+
url: import_node_process.env.KEYCLOAK_URL,
|
|
2774
|
+
realm: import_node_process.env.KEYCLOAK_REALM,
|
|
2775
|
+
clientId: import_node_process.env.KEYCLOAK_CLIENT_ID,
|
|
2776
|
+
idpHint: import_node_process.env.KEYCLOAK_IDP_HINT,
|
|
2777
|
+
confidentialClientId: import_node_process.env.KEYCLOAK_CONFIDENTIAL_CLIENT_ID,
|
|
2778
|
+
confidentialClientSecret: import_node_process.env.KEYCLOAK_CONFIDENTIAL_CLIENT_SECRET
|
|
2779
|
+
};
|
|
2780
|
+
var _kc = new import_keycloak_js.default({
|
|
2781
|
+
url: keycloakConfig.url,
|
|
2782
|
+
realm: keycloakConfig.realm,
|
|
2783
|
+
clientId: keycloakConfig.clientId
|
|
2784
|
+
});
|
|
2785
|
+
var initKeycloak = async () => {
|
|
2786
|
+
const authenticated = await _kc.init({ onLoad: "login-required" });
|
|
2787
|
+
if (authenticated) {
|
|
2788
|
+
return await loadUserInfo();
|
|
2789
|
+
} else {
|
|
2790
|
+
await _kc.login({ idpHint: keycloakConfig.idpHint });
|
|
2791
|
+
return await loadUserInfo();
|
|
2792
|
+
}
|
|
2793
|
+
};
|
|
2794
|
+
var login = _kc.login;
|
|
2795
|
+
var logout = _kc.logout;
|
|
2796
|
+
var getToken = () => {
|
|
2797
|
+
if (_kc.token) {
|
|
2798
|
+
return _kc.token;
|
|
2799
|
+
} else {
|
|
2800
|
+
return getConfidentialToken();
|
|
2801
|
+
}
|
|
2802
|
+
};
|
|
2803
|
+
var getConfidentialToken = async () => {
|
|
2804
|
+
const { confidentialClientId, confidentialClientSecret, url, realm } = keycloakConfig;
|
|
2805
|
+
if (!confidentialClientId || !confidentialClientSecret)
|
|
2806
|
+
throw new Error("Confidential client id or secret is missing");
|
|
2807
|
+
const credentials = btoa(`${confidentialClientId}:${confidentialClientSecret}`);
|
|
2808
|
+
const urlencoded = new URLSearchParams({ grant_type: "client_credentials" });
|
|
2809
|
+
const response = await fetch(`${url}/realms/${realm}/protocol/openid-connect/token`, {
|
|
2810
|
+
method: "POST",
|
|
2811
|
+
headers: {
|
|
2812
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
2813
|
+
"Authorization": `Basic ${credentials}`
|
|
2814
|
+
},
|
|
2815
|
+
body: urlencoded
|
|
2816
|
+
});
|
|
2817
|
+
if (!response.ok)
|
|
2818
|
+
throw new Error("Failed to obtain confidential token");
|
|
2819
|
+
const data = await response.json();
|
|
2820
|
+
return data.access_token;
|
|
31
2821
|
};
|
|
2822
|
+
var updateToken = () => _kc.updateToken(30).catch(login);
|
|
2823
|
+
var hasRole = (roles) => roles.some((role) => _kc.hasRealmRole(role) || _kc.hasResourceRole(role));
|
|
2824
|
+
var loadUserInfo = async () => {
|
|
2825
|
+
const user = await _kc.loadUserInfo();
|
|
2826
|
+
return {
|
|
2827
|
+
name: user.name,
|
|
2828
|
+
employeeId: user.employeeId?.toUpperCase() ?? "",
|
|
2829
|
+
department: user.department ?? "",
|
|
2830
|
+
email: user.email,
|
|
2831
|
+
company: user.company,
|
|
2832
|
+
category: user.category
|
|
2833
|
+
};
|
|
2834
|
+
};
|
|
2835
|
+
var UserService = {
|
|
2836
|
+
initKeycloak,
|
|
2837
|
+
login,
|
|
2838
|
+
logout,
|
|
2839
|
+
getToken,
|
|
2840
|
+
updateToken,
|
|
2841
|
+
hasRole
|
|
2842
|
+
};
|
|
2843
|
+
|
|
2844
|
+
// src/utils/ClientUtils.ts
|
|
2845
|
+
var Platform = class {
|
|
2846
|
+
static isAndroid = /android/i.test(navigator.userAgent);
|
|
2847
|
+
static isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
|
2848
|
+
static isWindows = /windows/i.test(navigator.userAgent);
|
|
2849
|
+
static isMacOS = /Macintosh|MacIntel|MacPPC|Mac68K/.test(navigator.userAgent);
|
|
2850
|
+
};
|
|
2851
|
+
var getContrastTextColor = (color) => {
|
|
2852
|
+
const r = parseInt(color.substring(1, 3), 16);
|
|
2853
|
+
const g = parseInt(color.substring(3, 5), 16);
|
|
2854
|
+
const b = parseInt(color.substring(5, 7), 16);
|
|
2855
|
+
const yiq = (r * 299 + g * 587 + b * 114) / 1e3;
|
|
2856
|
+
return yiq >= 128 ? "black" : "white";
|
|
2857
|
+
};
|
|
2858
|
+
var wczApiClient = import_axios.default.create();
|
|
2859
|
+
wczApiClient.interceptors.request.use(async (config) => {
|
|
2860
|
+
await UserService.updateToken();
|
|
2861
|
+
const token2 = await UserService.getToken();
|
|
2862
|
+
config.headers.Authorization = `Bearer ${token2}`;
|
|
2863
|
+
return config;
|
|
2864
|
+
});
|
|
2865
|
+
|
|
2866
|
+
// src/hooks/FormHooks.ts
|
|
2867
|
+
var import_react_form = require("@tanstack/react-form");
|
|
2868
|
+
|
|
2869
|
+
// src/components/form/FormAutocomplete.tsx
|
|
2870
|
+
var import_material5 = require("@mui/material");
|
|
2871
|
+
|
|
2872
|
+
// src/utils/FormUtils.ts
|
|
2873
|
+
var getFieldStatus = (field) => {
|
|
2874
|
+
const { meta } = field.state;
|
|
2875
|
+
const isTouched = meta.isTouched;
|
|
2876
|
+
const hasError = !!meta.errors?.length;
|
|
2877
|
+
const helperText = meta.errors?.[0]?.message;
|
|
2878
|
+
return { isTouched, hasError, helperText };
|
|
2879
|
+
};
|
|
2880
|
+
|
|
2881
|
+
// src/components/form/FormAutocomplete.tsx
|
|
2882
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2883
|
+
var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
2884
|
+
const field = useFieldContext();
|
|
2885
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2887
|
+
import_material5.Autocomplete,
|
|
2888
|
+
{
|
|
2889
|
+
value: field.state.value,
|
|
2890
|
+
onChange: (_, value) => !autocompleteProps.freeSolo && field.handleChange(value),
|
|
2891
|
+
onInputChange: (_, value, reason) => reason !== "reset" && autocompleteProps.freeSolo && field.handleChange(value),
|
|
2892
|
+
onBlur: field.handleBlur,
|
|
2893
|
+
"aria-label": field.name,
|
|
2894
|
+
...autocompleteProps,
|
|
2895
|
+
renderInput: (params) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2896
|
+
import_material5.TextField,
|
|
2897
|
+
{
|
|
2898
|
+
...params,
|
|
2899
|
+
name: field.name,
|
|
2900
|
+
error: isTouched && hasError,
|
|
2901
|
+
helperText: isTouched && helperText,
|
|
2902
|
+
...textFieldProps
|
|
2903
|
+
}
|
|
2904
|
+
)
|
|
2905
|
+
}
|
|
2906
|
+
);
|
|
2907
|
+
};
|
|
2908
|
+
|
|
2909
|
+
// src/components/form/FormCheckbox.tsx
|
|
2910
|
+
var import_material6 = require("@mui/material");
|
|
2911
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2912
|
+
var FormCheckbox = (props) => {
|
|
2913
|
+
const field = useFieldContext();
|
|
2914
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_material6.FormControl, { component: "fieldset", children: [
|
|
2916
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2917
|
+
import_material6.FormControlLabel,
|
|
2918
|
+
{
|
|
2919
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2920
|
+
import_material6.Checkbox,
|
|
2921
|
+
{
|
|
2922
|
+
name: field.name,
|
|
2923
|
+
checked: Boolean(field.state.value),
|
|
2924
|
+
onChange: (e) => field.handleChange(e.target.checked),
|
|
2925
|
+
onBlur: field.handleBlur,
|
|
2926
|
+
"aria-label": field.name,
|
|
2927
|
+
...props
|
|
2928
|
+
}
|
|
2929
|
+
),
|
|
2930
|
+
label: props.label ?? ""
|
|
2931
|
+
}
|
|
2932
|
+
),
|
|
2933
|
+
isTouched && hasError && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material6.FormHelperText, { error: hasError, children: helperText })
|
|
2934
|
+
] });
|
|
2935
|
+
};
|
|
2936
|
+
|
|
2937
|
+
// src/components/form/FormDatePicker.tsx
|
|
2938
|
+
var import_x_date_pickers_pro = require("@mui/x-date-pickers-pro");
|
|
2939
|
+
var import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
2940
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2941
|
+
var FormDatePicker = (props) => {
|
|
2942
|
+
const field = useFieldContext();
|
|
2943
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2945
|
+
import_x_date_pickers_pro.DatePicker,
|
|
2946
|
+
{
|
|
2947
|
+
name: field.name,
|
|
2948
|
+
value: field.state.value ? (0, import_dayjs2.default)(field.state.value) : null,
|
|
2949
|
+
onChange: (value) => field.handleChange(value ? value.format() : null),
|
|
2950
|
+
slotProps: {
|
|
2951
|
+
textField: {
|
|
2952
|
+
onBlur: field.handleBlur,
|
|
2953
|
+
error: isTouched && hasError,
|
|
2954
|
+
helperText: isTouched && helperText,
|
|
2955
|
+
...props.textFieldProps
|
|
2956
|
+
},
|
|
2957
|
+
...props.slotProps
|
|
2958
|
+
},
|
|
2959
|
+
"aria-label": field.name,
|
|
2960
|
+
...props
|
|
2961
|
+
}
|
|
2962
|
+
);
|
|
2963
|
+
};
|
|
2964
|
+
|
|
2965
|
+
// src/components/form/FormDateTimePicker.tsx
|
|
2966
|
+
var import_x_date_pickers_pro2 = require("@mui/x-date-pickers-pro");
|
|
2967
|
+
var import_dayjs3 = __toESM(require("dayjs"), 1);
|
|
2968
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2969
|
+
var FormDateTimePicker = (props) => {
|
|
2970
|
+
const field = useFieldContext();
|
|
2971
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2973
|
+
import_x_date_pickers_pro2.DateTimePicker,
|
|
2974
|
+
{
|
|
2975
|
+
name: field.name,
|
|
2976
|
+
value: field.state.value ? (0, import_dayjs3.default)(field.state.value) : null,
|
|
2977
|
+
onChange: (value) => field.handleChange(value ? value.format() : null),
|
|
2978
|
+
slotProps: {
|
|
2979
|
+
textField: {
|
|
2980
|
+
onBlur: field.handleBlur,
|
|
2981
|
+
error: isTouched && hasError,
|
|
2982
|
+
helperText: isTouched && helperText,
|
|
2983
|
+
...props.textFieldProps
|
|
2984
|
+
},
|
|
2985
|
+
...props.slotProps
|
|
2986
|
+
},
|
|
2987
|
+
"aria-label": field.name,
|
|
2988
|
+
...props
|
|
2989
|
+
}
|
|
2990
|
+
);
|
|
2991
|
+
};
|
|
2992
|
+
|
|
2993
|
+
// src/components/form/FormRadioGroup.tsx
|
|
2994
|
+
var import_material7 = require("@mui/material");
|
|
2995
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2996
|
+
var FormRadioGroup = ({ label, options, ...props }) => {
|
|
2997
|
+
const field = useFieldContext();
|
|
2998
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_material7.FormControl, { component: "fieldset", children: [
|
|
3000
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_material7.FormLabel, { component: "legend", children: label }),
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3002
|
+
import_material7.RadioGroup,
|
|
3003
|
+
{
|
|
3004
|
+
name: field.name,
|
|
3005
|
+
value: field.state.value ?? "",
|
|
3006
|
+
onChange: (e) => field.handleChange(e.target.value),
|
|
3007
|
+
onBlur: field.handleBlur,
|
|
3008
|
+
"aria-label": field.name,
|
|
3009
|
+
...props,
|
|
3010
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3011
|
+
import_material7.FormControlLabel,
|
|
3012
|
+
{
|
|
3013
|
+
value: option.value,
|
|
3014
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_material7.Radio, {}),
|
|
3015
|
+
label: option.label
|
|
3016
|
+
},
|
|
3017
|
+
option.value
|
|
3018
|
+
))
|
|
3019
|
+
}
|
|
3020
|
+
),
|
|
3021
|
+
isTouched && hasError && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_material7.FormHelperText, { error: hasError, children: helperText })
|
|
3022
|
+
] });
|
|
3023
|
+
};
|
|
3024
|
+
|
|
3025
|
+
// src/components/form/FormSlider.tsx
|
|
3026
|
+
var import_material8 = require("@mui/material");
|
|
3027
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3028
|
+
var FormSlider = ({ label, ...props }) => {
|
|
3029
|
+
const field = useFieldContext();
|
|
3030
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_material8.FormControl, { component: "fieldset", children: [
|
|
3032
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material8.FormLabel, { children: label }),
|
|
3033
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3034
|
+
import_material8.Slider,
|
|
3035
|
+
{
|
|
3036
|
+
name: field.name,
|
|
3037
|
+
value: field.state.value ?? 0,
|
|
3038
|
+
onChange: (_, value) => field.handleChange(Array.isArray(value) ? value[0] : value),
|
|
3039
|
+
onBlur: field.handleBlur,
|
|
3040
|
+
"aria-label": field.name,
|
|
3041
|
+
...props
|
|
3042
|
+
}
|
|
3043
|
+
),
|
|
3044
|
+
isTouched && hasError && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material8.FormHelperText, { error: hasError, children: helperText })
|
|
3045
|
+
] });
|
|
3046
|
+
};
|
|
3047
|
+
|
|
3048
|
+
// src/components/form/FormSubmitButton.tsx
|
|
3049
|
+
var import_material9 = require("@mui/material");
|
|
3050
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
3051
|
+
var FormSubmitButton = (props) => {
|
|
3052
|
+
const form = useFormContext();
|
|
3053
|
+
const handleClick = (e) => {
|
|
3054
|
+
e.preventDefault();
|
|
3055
|
+
e.stopPropagation();
|
|
3056
|
+
form.handleSubmit();
|
|
3057
|
+
};
|
|
3058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(form.Subscribe, { selector: (state) => [state.isSubmitting], children: ([isSubmitting]) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3059
|
+
import_material9.Button,
|
|
3060
|
+
{
|
|
3061
|
+
loading: isSubmitting,
|
|
3062
|
+
disabled: isSubmitting,
|
|
3063
|
+
onClick: handleClick,
|
|
3064
|
+
"aria-label": "submit",
|
|
3065
|
+
...props
|
|
3066
|
+
}
|
|
3067
|
+
) });
|
|
3068
|
+
};
|
|
3069
|
+
|
|
3070
|
+
// src/components/form/FormSwitch.tsx
|
|
3071
|
+
var import_material10 = require("@mui/material");
|
|
3072
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
3073
|
+
var FormSwitch = (props) => {
|
|
3074
|
+
const field = useFieldContext();
|
|
3075
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_material10.FormControl, { component: "fieldset", children: [
|
|
3077
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3078
|
+
import_material10.FormControlLabel,
|
|
3079
|
+
{
|
|
3080
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3081
|
+
import_material10.Switch,
|
|
3082
|
+
{
|
|
3083
|
+
name: field.name,
|
|
3084
|
+
checked: Boolean(field.state.value),
|
|
3085
|
+
onChange: (e) => field.handleChange(e.target.checked),
|
|
3086
|
+
onBlur: field.handleBlur,
|
|
3087
|
+
"aria-label": field.name,
|
|
3088
|
+
...props
|
|
3089
|
+
}
|
|
3090
|
+
),
|
|
3091
|
+
label: props.label ?? ""
|
|
3092
|
+
}
|
|
3093
|
+
),
|
|
3094
|
+
isTouched && hasError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.FormHelperText, { error: hasError, children: helperText })
|
|
3095
|
+
] });
|
|
3096
|
+
};
|
|
3097
|
+
|
|
3098
|
+
// src/components/form/FormTextField.tsx
|
|
3099
|
+
var import_material11 = require("@mui/material");
|
|
3100
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3101
|
+
var FormTextField = (props) => {
|
|
3102
|
+
const field = useFieldContext();
|
|
3103
|
+
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
3104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3105
|
+
import_material11.TextField,
|
|
3106
|
+
{
|
|
3107
|
+
name: field.name,
|
|
3108
|
+
value: field.state.value ?? "",
|
|
3109
|
+
onChange: (e) => field.handleChange(e.target.value),
|
|
3110
|
+
onBlur: field.handleBlur,
|
|
3111
|
+
error: isTouched && hasError,
|
|
3112
|
+
helperText: isTouched && helperText,
|
|
3113
|
+
"aria-label": field.name,
|
|
3114
|
+
...props
|
|
3115
|
+
}
|
|
3116
|
+
);
|
|
3117
|
+
};
|
|
3118
|
+
|
|
3119
|
+
// src/hooks/FormHooks.ts
|
|
3120
|
+
var { fieldContext, useFieldContext, formContext, useFormContext } = (0, import_react_form.createFormHookContexts)();
|
|
3121
|
+
var { useAppForm: useLayoutForm, withForm: withLayoutForm } = (0, import_react_form.createFormHook)({
|
|
3122
|
+
fieldComponents: {
|
|
3123
|
+
TextField: FormTextField,
|
|
3124
|
+
Autocomplete: FormAutocomplete,
|
|
3125
|
+
Checkbox: FormCheckbox,
|
|
3126
|
+
Switch: FormSwitch,
|
|
3127
|
+
RadioGroup: FormRadioGroup,
|
|
3128
|
+
Slider: FormSlider,
|
|
3129
|
+
DatePicker: FormDatePicker,
|
|
3130
|
+
DateTimePicker: FormDateTimePicker
|
|
3131
|
+
},
|
|
3132
|
+
formComponents: {
|
|
3133
|
+
SubmitButton: FormSubmitButton
|
|
3134
|
+
},
|
|
3135
|
+
fieldContext,
|
|
3136
|
+
formContext
|
|
3137
|
+
});
|
|
3138
|
+
|
|
3139
|
+
// src/index.ts
|
|
3140
|
+
var import_useDialogs = require("@toolpad/core/useDialogs");
|
|
3141
|
+
var import_useLocalStorageState = require("@toolpad/core/useLocalStorageState");
|
|
32
3142
|
// Annotate the CommonJS export names for ESM import in node:
|
|
33
3143
|
0 && (module.exports = {
|
|
34
|
-
|
|
3144
|
+
LayoutProvider,
|
|
3145
|
+
Platform,
|
|
3146
|
+
RouterButton,
|
|
3147
|
+
RouterError,
|
|
3148
|
+
RouterLink,
|
|
3149
|
+
RouterNotFound,
|
|
3150
|
+
RouterTab,
|
|
3151
|
+
getContrastTextColor,
|
|
3152
|
+
useDialogs,
|
|
3153
|
+
useFieldContext,
|
|
3154
|
+
useFormContext,
|
|
3155
|
+
useLayoutForm,
|
|
3156
|
+
useLocalStorageState,
|
|
3157
|
+
uuidv7,
|
|
3158
|
+
wczApiClient,
|
|
3159
|
+
withLayoutForm
|
|
35
3160
|
});
|
|
3161
|
+
/*! Bundled license information:
|
|
3162
|
+
|
|
3163
|
+
react-is/cjs/react-is.production.min.js:
|
|
3164
|
+
(** @license React v16.13.1
|
|
3165
|
+
* react-is.production.min.js
|
|
3166
|
+
*
|
|
3167
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3168
|
+
*
|
|
3169
|
+
* This source code is licensed under the MIT license found in the
|
|
3170
|
+
* LICENSE file in the root directory of this source tree.
|
|
3171
|
+
*)
|
|
3172
|
+
|
|
3173
|
+
react-is/cjs/react-is.development.js:
|
|
3174
|
+
(** @license React v16.13.1
|
|
3175
|
+
* react-is.development.js
|
|
3176
|
+
*
|
|
3177
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3178
|
+
*
|
|
3179
|
+
* This source code is licensed under the MIT license found in the
|
|
3180
|
+
* LICENSE file in the root directory of this source tree.
|
|
3181
|
+
*)
|
|
3182
|
+
|
|
3183
|
+
object-assign/index.js:
|
|
3184
|
+
(*
|
|
3185
|
+
object-assign
|
|
3186
|
+
(c) Sindre Sorhus
|
|
3187
|
+
@license MIT
|
|
3188
|
+
*)
|
|
3189
|
+
*/
|
|
36
3190
|
//# sourceMappingURL=index.cjs.map
|