font-controls 1.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/README.md +262 -0
- package/dist/font-controls.js +2840 -0
- package/dist/font-controls.umd.cjs +74 -0
- package/dist/index.d.ts +97 -0
- package/dist/style.css +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,2840 @@
|
|
|
1
|
+
import Ie, { useState as Ae, useEffect as wt } from "react";
|
|
2
|
+
import Xt from "react-dom";
|
|
3
|
+
function Cr(e) {
|
|
4
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5
|
+
}
|
|
6
|
+
var at = { exports: {} }, De = {};
|
|
7
|
+
/**
|
|
8
|
+
* @license React
|
|
9
|
+
* react-jsx-runtime.production.min.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
var Pt;
|
|
17
|
+
function wr() {
|
|
18
|
+
if (Pt) return De;
|
|
19
|
+
Pt = 1;
|
|
20
|
+
var e = Ie, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
|
+
function p(c, d, m) {
|
|
22
|
+
var g, T = {}, A = null, Y = null;
|
|
23
|
+
m !== void 0 && (A = "" + m), d.key !== void 0 && (A = "" + d.key), d.ref !== void 0 && (Y = d.ref);
|
|
24
|
+
for (g in d) o.call(d, g) && !u.hasOwnProperty(g) && (T[g] = d[g]);
|
|
25
|
+
if (c && c.defaultProps) for (g in d = c.defaultProps, d) T[g] === void 0 && (T[g] = d[g]);
|
|
26
|
+
return { $$typeof: t, type: c, key: A, ref: Y, props: T, _owner: a.current };
|
|
27
|
+
}
|
|
28
|
+
return De.Fragment = r, De.jsx = p, De.jsxs = p, De;
|
|
29
|
+
}
|
|
30
|
+
var Ne = {};
|
|
31
|
+
/**
|
|
32
|
+
* @license React
|
|
33
|
+
* react-jsx-runtime.development.js
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/
|
|
40
|
+
var Rt;
|
|
41
|
+
function Pr() {
|
|
42
|
+
return Rt || (Rt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var e = Ie, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), q = Symbol.iterator, X = "@@iterator";
|
|
44
|
+
function _(n) {
|
|
45
|
+
if (n === null || typeof n != "object")
|
|
46
|
+
return null;
|
|
47
|
+
var s = q && n[q] || n[X];
|
|
48
|
+
return typeof s == "function" ? s : null;
|
|
49
|
+
}
|
|
50
|
+
var x = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function b(n) {
|
|
52
|
+
{
|
|
53
|
+
for (var s = arguments.length, v = new Array(s > 1 ? s - 1 : 0), E = 1; E < s; E++)
|
|
54
|
+
v[E - 1] = arguments[E];
|
|
55
|
+
C("error", n, v);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function C(n, s, v) {
|
|
59
|
+
{
|
|
60
|
+
var E = x.ReactDebugCurrentFrame, W = E.getStackAddendum();
|
|
61
|
+
W !== "" && (s += "%s", v = v.concat([W]));
|
|
62
|
+
var B = v.map(function(F) {
|
|
63
|
+
return String(F);
|
|
64
|
+
});
|
|
65
|
+
B.unshift("Warning: " + s), Function.prototype.apply.call(console[n], console, B);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
var S = !1, i = !1, k = !1, Z = !1, Q = !1, G;
|
|
69
|
+
G = Symbol.for("react.module.reference");
|
|
70
|
+
function J(n) {
|
|
71
|
+
return !!(typeof n == "string" || typeof n == "function" || n === o || n === u || Q || n === a || n === m || n === g || Z || n === Y || S || i || k || typeof n == "object" && n !== null && (n.$$typeof === A || n.$$typeof === T || n.$$typeof === p || n.$$typeof === c || n.$$typeof === d || // This needs to include all possible module reference object
|
|
72
|
+
// types supported by any Flight configuration anywhere since
|
|
73
|
+
// we don't know which Flight build this will end up being used
|
|
74
|
+
// with.
|
|
75
|
+
n.$$typeof === G || n.getModuleId !== void 0));
|
|
76
|
+
}
|
|
77
|
+
function me(n, s, v) {
|
|
78
|
+
var E = n.displayName;
|
|
79
|
+
if (E)
|
|
80
|
+
return E;
|
|
81
|
+
var W = s.displayName || s.name || "";
|
|
82
|
+
return W !== "" ? v + "(" + W + ")" : v;
|
|
83
|
+
}
|
|
84
|
+
function be(n) {
|
|
85
|
+
return n.displayName || "Context";
|
|
86
|
+
}
|
|
87
|
+
function ne(n) {
|
|
88
|
+
if (n == null)
|
|
89
|
+
return null;
|
|
90
|
+
if (typeof n.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
91
|
+
return n.displayName || n.name || null;
|
|
92
|
+
if (typeof n == "string")
|
|
93
|
+
return n;
|
|
94
|
+
switch (n) {
|
|
95
|
+
case o:
|
|
96
|
+
return "Fragment";
|
|
97
|
+
case r:
|
|
98
|
+
return "Portal";
|
|
99
|
+
case u:
|
|
100
|
+
return "Profiler";
|
|
101
|
+
case a:
|
|
102
|
+
return "StrictMode";
|
|
103
|
+
case m:
|
|
104
|
+
return "Suspense";
|
|
105
|
+
case g:
|
|
106
|
+
return "SuspenseList";
|
|
107
|
+
}
|
|
108
|
+
if (typeof n == "object")
|
|
109
|
+
switch (n.$$typeof) {
|
|
110
|
+
case c:
|
|
111
|
+
var s = n;
|
|
112
|
+
return be(s) + ".Consumer";
|
|
113
|
+
case p:
|
|
114
|
+
var v = n;
|
|
115
|
+
return be(v._context) + ".Provider";
|
|
116
|
+
case d:
|
|
117
|
+
return me(n, n.render, "ForwardRef");
|
|
118
|
+
case T:
|
|
119
|
+
var E = n.displayName || null;
|
|
120
|
+
return E !== null ? E : ne(n.type) || "Memo";
|
|
121
|
+
case A: {
|
|
122
|
+
var W = n, B = W._payload, F = W._init;
|
|
123
|
+
try {
|
|
124
|
+
return ne(F(B));
|
|
125
|
+
} catch {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
var K = Object.assign, he = 0, ee, le, ve, Se, l, y, O;
|
|
133
|
+
function j() {
|
|
134
|
+
}
|
|
135
|
+
j.__reactDisabledLog = !0;
|
|
136
|
+
function w() {
|
|
137
|
+
{
|
|
138
|
+
if (he === 0) {
|
|
139
|
+
ee = console.log, le = console.info, ve = console.warn, Se = console.error, l = console.group, y = console.groupCollapsed, O = console.groupEnd;
|
|
140
|
+
var n = {
|
|
141
|
+
configurable: !0,
|
|
142
|
+
enumerable: !0,
|
|
143
|
+
value: j,
|
|
144
|
+
writable: !0
|
|
145
|
+
};
|
|
146
|
+
Object.defineProperties(console, {
|
|
147
|
+
info: n,
|
|
148
|
+
log: n,
|
|
149
|
+
warn: n,
|
|
150
|
+
error: n,
|
|
151
|
+
group: n,
|
|
152
|
+
groupCollapsed: n,
|
|
153
|
+
groupEnd: n
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
he++;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function $() {
|
|
160
|
+
{
|
|
161
|
+
if (he--, he === 0) {
|
|
162
|
+
var n = {
|
|
163
|
+
configurable: !0,
|
|
164
|
+
enumerable: !0,
|
|
165
|
+
writable: !0
|
|
166
|
+
};
|
|
167
|
+
Object.defineProperties(console, {
|
|
168
|
+
log: K({}, n, {
|
|
169
|
+
value: ee
|
|
170
|
+
}),
|
|
171
|
+
info: K({}, n, {
|
|
172
|
+
value: le
|
|
173
|
+
}),
|
|
174
|
+
warn: K({}, n, {
|
|
175
|
+
value: ve
|
|
176
|
+
}),
|
|
177
|
+
error: K({}, n, {
|
|
178
|
+
value: Se
|
|
179
|
+
}),
|
|
180
|
+
group: K({}, n, {
|
|
181
|
+
value: l
|
|
182
|
+
}),
|
|
183
|
+
groupCollapsed: K({}, n, {
|
|
184
|
+
value: y
|
|
185
|
+
}),
|
|
186
|
+
groupEnd: K({}, n, {
|
|
187
|
+
value: O
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
he < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
var P = x.ReactCurrentDispatcher, R;
|
|
195
|
+
function D(n, s, v) {
|
|
196
|
+
{
|
|
197
|
+
if (R === void 0)
|
|
198
|
+
try {
|
|
199
|
+
throw Error();
|
|
200
|
+
} catch (W) {
|
|
201
|
+
var E = W.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
R = E && E[1] || "";
|
|
203
|
+
}
|
|
204
|
+
return `
|
|
205
|
+
` + R + n;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
var I = !1, N;
|
|
209
|
+
{
|
|
210
|
+
var te = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
N = new te();
|
|
212
|
+
}
|
|
213
|
+
function h(n, s) {
|
|
214
|
+
if (!n || I)
|
|
215
|
+
return "";
|
|
216
|
+
{
|
|
217
|
+
var v = N.get(n);
|
|
218
|
+
if (v !== void 0)
|
|
219
|
+
return v;
|
|
220
|
+
}
|
|
221
|
+
var E;
|
|
222
|
+
I = !0;
|
|
223
|
+
var W = Error.prepareStackTrace;
|
|
224
|
+
Error.prepareStackTrace = void 0;
|
|
225
|
+
var B;
|
|
226
|
+
B = P.current, P.current = null, w();
|
|
227
|
+
try {
|
|
228
|
+
if (s) {
|
|
229
|
+
var F = function() {
|
|
230
|
+
throw Error();
|
|
231
|
+
};
|
|
232
|
+
if (Object.defineProperty(F.prototype, "props", {
|
|
233
|
+
set: function() {
|
|
234
|
+
throw Error();
|
|
235
|
+
}
|
|
236
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
|
+
try {
|
|
238
|
+
Reflect.construct(F, []);
|
|
239
|
+
} catch (se) {
|
|
240
|
+
E = se;
|
|
241
|
+
}
|
|
242
|
+
Reflect.construct(n, [], F);
|
|
243
|
+
} else {
|
|
244
|
+
try {
|
|
245
|
+
F.call();
|
|
246
|
+
} catch (se) {
|
|
247
|
+
E = se;
|
|
248
|
+
}
|
|
249
|
+
n.call(F.prototype);
|
|
250
|
+
}
|
|
251
|
+
} else {
|
|
252
|
+
try {
|
|
253
|
+
throw Error();
|
|
254
|
+
} catch (se) {
|
|
255
|
+
E = se;
|
|
256
|
+
}
|
|
257
|
+
n();
|
|
258
|
+
}
|
|
259
|
+
} catch (se) {
|
|
260
|
+
if (se && E && typeof se.stack == "string") {
|
|
261
|
+
for (var M = se.stack.split(`
|
|
262
|
+
`), oe = E.stack.split(`
|
|
263
|
+
`), H = M.length - 1, z = oe.length - 1; H >= 1 && z >= 0 && M[H] !== oe[z]; )
|
|
264
|
+
z--;
|
|
265
|
+
for (; H >= 1 && z >= 0; H--, z--)
|
|
266
|
+
if (M[H] !== oe[z]) {
|
|
267
|
+
if (H !== 1 || z !== 1)
|
|
268
|
+
do
|
|
269
|
+
if (H--, z--, z < 0 || M[H] !== oe[z]) {
|
|
270
|
+
var de = `
|
|
271
|
+
` + M[H].replace(" at new ", " at ");
|
|
272
|
+
return n.displayName && de.includes("<anonymous>") && (de = de.replace("<anonymous>", n.displayName)), typeof n == "function" && N.set(n, de), de;
|
|
273
|
+
}
|
|
274
|
+
while (H >= 1 && z >= 0);
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
} finally {
|
|
279
|
+
I = !1, P.current = B, $(), Error.prepareStackTrace = W;
|
|
280
|
+
}
|
|
281
|
+
var Re = n ? n.displayName || n.name : "", _e = Re ? D(Re) : "";
|
|
282
|
+
return typeof n == "function" && N.set(n, _e), _e;
|
|
283
|
+
}
|
|
284
|
+
function fe(n, s, v) {
|
|
285
|
+
return h(n, !1);
|
|
286
|
+
}
|
|
287
|
+
function we(n) {
|
|
288
|
+
var s = n.prototype;
|
|
289
|
+
return !!(s && s.isReactComponent);
|
|
290
|
+
}
|
|
291
|
+
function Te(n, s, v) {
|
|
292
|
+
if (n == null)
|
|
293
|
+
return "";
|
|
294
|
+
if (typeof n == "function")
|
|
295
|
+
return h(n, we(n));
|
|
296
|
+
if (typeof n == "string")
|
|
297
|
+
return D(n);
|
|
298
|
+
switch (n) {
|
|
299
|
+
case m:
|
|
300
|
+
return D("Suspense");
|
|
301
|
+
case g:
|
|
302
|
+
return D("SuspenseList");
|
|
303
|
+
}
|
|
304
|
+
if (typeof n == "object")
|
|
305
|
+
switch (n.$$typeof) {
|
|
306
|
+
case d:
|
|
307
|
+
return fe(n.render);
|
|
308
|
+
case T:
|
|
309
|
+
return Te(n.type, s, v);
|
|
310
|
+
case A: {
|
|
311
|
+
var E = n, W = E._payload, B = E._init;
|
|
312
|
+
try {
|
|
313
|
+
return Te(B(W), s, v);
|
|
314
|
+
} catch {
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return "";
|
|
319
|
+
}
|
|
320
|
+
var Oe = Object.prototype.hasOwnProperty, dt = {}, pt = x.ReactDebugCurrentFrame;
|
|
321
|
+
function ke(n) {
|
|
322
|
+
if (n) {
|
|
323
|
+
var s = n._owner, v = Te(n.type, n._source, s ? s.type : null);
|
|
324
|
+
pt.setExtraStackFrame(v);
|
|
325
|
+
} else
|
|
326
|
+
pt.setExtraStackFrame(null);
|
|
327
|
+
}
|
|
328
|
+
function nr(n, s, v, E, W) {
|
|
329
|
+
{
|
|
330
|
+
var B = Function.call.bind(Oe);
|
|
331
|
+
for (var F in n)
|
|
332
|
+
if (B(n, F)) {
|
|
333
|
+
var M = void 0;
|
|
334
|
+
try {
|
|
335
|
+
if (typeof n[F] != "function") {
|
|
336
|
+
var oe = Error((E || "React class") + ": " + v + " type `" + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[F] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw oe.name = "Invariant Violation", oe;
|
|
338
|
+
}
|
|
339
|
+
M = n[F](s, F, E, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (H) {
|
|
341
|
+
M = H;
|
|
342
|
+
}
|
|
343
|
+
M && !(M instanceof Error) && (ke(W), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", v, F, typeof M), ke(null)), M instanceof Error && !(M.message in dt) && (dt[M.message] = !0, ke(W), b("Failed %s type: %s", v, M.message), ke(null));
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
var or = Array.isArray;
|
|
348
|
+
function Xe(n) {
|
|
349
|
+
return or(n);
|
|
350
|
+
}
|
|
351
|
+
function ar(n) {
|
|
352
|
+
{
|
|
353
|
+
var s = typeof Symbol == "function" && Symbol.toStringTag, v = s && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
354
|
+
return v;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
function ir(n) {
|
|
358
|
+
try {
|
|
359
|
+
return ht(n), !1;
|
|
360
|
+
} catch {
|
|
361
|
+
return !0;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
function ht(n) {
|
|
365
|
+
return "" + n;
|
|
366
|
+
}
|
|
367
|
+
function vt(n) {
|
|
368
|
+
if (ir(n))
|
|
369
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ar(n)), ht(n);
|
|
370
|
+
}
|
|
371
|
+
var gt = x.ReactCurrentOwner, sr = {
|
|
372
|
+
key: !0,
|
|
373
|
+
ref: !0,
|
|
374
|
+
__self: !0,
|
|
375
|
+
__source: !0
|
|
376
|
+
}, yt, mt;
|
|
377
|
+
function lr(n) {
|
|
378
|
+
if (Oe.call(n, "ref")) {
|
|
379
|
+
var s = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
380
|
+
if (s && s.isReactWarning)
|
|
381
|
+
return !1;
|
|
382
|
+
}
|
|
383
|
+
return n.ref !== void 0;
|
|
384
|
+
}
|
|
385
|
+
function ur(n) {
|
|
386
|
+
if (Oe.call(n, "key")) {
|
|
387
|
+
var s = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
388
|
+
if (s && s.isReactWarning)
|
|
389
|
+
return !1;
|
|
390
|
+
}
|
|
391
|
+
return n.key !== void 0;
|
|
392
|
+
}
|
|
393
|
+
function cr(n, s) {
|
|
394
|
+
typeof n.ref == "string" && gt.current;
|
|
395
|
+
}
|
|
396
|
+
function fr(n, s) {
|
|
397
|
+
{
|
|
398
|
+
var v = function() {
|
|
399
|
+
yt || (yt = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
|
|
400
|
+
};
|
|
401
|
+
v.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
402
|
+
get: v,
|
|
403
|
+
configurable: !0
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
function dr(n, s) {
|
|
408
|
+
{
|
|
409
|
+
var v = function() {
|
|
410
|
+
mt || (mt = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
|
|
411
|
+
};
|
|
412
|
+
v.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
413
|
+
get: v,
|
|
414
|
+
configurable: !0
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
var pr = function(n, s, v, E, W, B, F) {
|
|
419
|
+
var M = {
|
|
420
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
421
|
+
$$typeof: t,
|
|
422
|
+
// Built-in properties that belong on the element
|
|
423
|
+
type: n,
|
|
424
|
+
key: s,
|
|
425
|
+
ref: v,
|
|
426
|
+
props: F,
|
|
427
|
+
// Record the component responsible for creating this element.
|
|
428
|
+
_owner: B
|
|
429
|
+
};
|
|
430
|
+
return M._store = {}, Object.defineProperty(M._store, "validated", {
|
|
431
|
+
configurable: !1,
|
|
432
|
+
enumerable: !1,
|
|
433
|
+
writable: !0,
|
|
434
|
+
value: !1
|
|
435
|
+
}), Object.defineProperty(M, "_self", {
|
|
436
|
+
configurable: !1,
|
|
437
|
+
enumerable: !1,
|
|
438
|
+
writable: !1,
|
|
439
|
+
value: E
|
|
440
|
+
}), Object.defineProperty(M, "_source", {
|
|
441
|
+
configurable: !1,
|
|
442
|
+
enumerable: !1,
|
|
443
|
+
writable: !1,
|
|
444
|
+
value: W
|
|
445
|
+
}), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
|
|
446
|
+
};
|
|
447
|
+
function hr(n, s, v, E, W) {
|
|
448
|
+
{
|
|
449
|
+
var B, F = {}, M = null, oe = null;
|
|
450
|
+
v !== void 0 && (vt(v), M = "" + v), ur(s) && (vt(s.key), M = "" + s.key), lr(s) && (oe = s.ref, cr(s, W));
|
|
451
|
+
for (B in s)
|
|
452
|
+
Oe.call(s, B) && !sr.hasOwnProperty(B) && (F[B] = s[B]);
|
|
453
|
+
if (n && n.defaultProps) {
|
|
454
|
+
var H = n.defaultProps;
|
|
455
|
+
for (B in H)
|
|
456
|
+
F[B] === void 0 && (F[B] = H[B]);
|
|
457
|
+
}
|
|
458
|
+
if (M || oe) {
|
|
459
|
+
var z = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
460
|
+
M && fr(F, z), oe && dr(F, z);
|
|
461
|
+
}
|
|
462
|
+
return pr(n, M, oe, W, E, gt.current, F);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
var qe = x.ReactCurrentOwner, bt = x.ReactDebugCurrentFrame;
|
|
466
|
+
function Pe(n) {
|
|
467
|
+
if (n) {
|
|
468
|
+
var s = n._owner, v = Te(n.type, n._source, s ? s.type : null);
|
|
469
|
+
bt.setExtraStackFrame(v);
|
|
470
|
+
} else
|
|
471
|
+
bt.setExtraStackFrame(null);
|
|
472
|
+
}
|
|
473
|
+
var Be;
|
|
474
|
+
Be = !1;
|
|
475
|
+
function Ve(n) {
|
|
476
|
+
return typeof n == "object" && n !== null && n.$$typeof === t;
|
|
477
|
+
}
|
|
478
|
+
function St() {
|
|
479
|
+
{
|
|
480
|
+
if (qe.current) {
|
|
481
|
+
var n = ne(qe.current.type);
|
|
482
|
+
if (n)
|
|
483
|
+
return `
|
|
484
|
+
|
|
485
|
+
Check the render method of \`` + n + "`.";
|
|
486
|
+
}
|
|
487
|
+
return "";
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
function vr(n) {
|
|
491
|
+
return "";
|
|
492
|
+
}
|
|
493
|
+
var xt = {};
|
|
494
|
+
function gr(n) {
|
|
495
|
+
{
|
|
496
|
+
var s = St();
|
|
497
|
+
if (!s) {
|
|
498
|
+
var v = typeof n == "string" ? n : n.displayName || n.name;
|
|
499
|
+
v && (s = `
|
|
500
|
+
|
|
501
|
+
Check the top-level render call using <` + v + ">.");
|
|
502
|
+
}
|
|
503
|
+
return s;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
function Et(n, s) {
|
|
507
|
+
{
|
|
508
|
+
if (!n._store || n._store.validated || n.key != null)
|
|
509
|
+
return;
|
|
510
|
+
n._store.validated = !0;
|
|
511
|
+
var v = gr(s);
|
|
512
|
+
if (xt[v])
|
|
513
|
+
return;
|
|
514
|
+
xt[v] = !0;
|
|
515
|
+
var E = "";
|
|
516
|
+
n && n._owner && n._owner !== qe.current && (E = " It was passed a child from " + ne(n._owner.type) + "."), Pe(n), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, E), Pe(null);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
function Tt(n, s) {
|
|
520
|
+
{
|
|
521
|
+
if (typeof n != "object")
|
|
522
|
+
return;
|
|
523
|
+
if (Xe(n))
|
|
524
|
+
for (var v = 0; v < n.length; v++) {
|
|
525
|
+
var E = n[v];
|
|
526
|
+
Ve(E) && Et(E, s);
|
|
527
|
+
}
|
|
528
|
+
else if (Ve(n))
|
|
529
|
+
n._store && (n._store.validated = !0);
|
|
530
|
+
else if (n) {
|
|
531
|
+
var W = _(n);
|
|
532
|
+
if (typeof W == "function" && W !== n.entries)
|
|
533
|
+
for (var B = W.call(n), F; !(F = B.next()).done; )
|
|
534
|
+
Ve(F.value) && Et(F.value, s);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
function yr(n) {
|
|
539
|
+
{
|
|
540
|
+
var s = n.type;
|
|
541
|
+
if (s == null || typeof s == "string")
|
|
542
|
+
return;
|
|
543
|
+
var v;
|
|
544
|
+
if (typeof s == "function")
|
|
545
|
+
v = s.propTypes;
|
|
546
|
+
else if (typeof s == "object" && (s.$$typeof === d || // Note: Memo only checks outer props here.
|
|
547
|
+
// Inner props are checked in the reconciler.
|
|
548
|
+
s.$$typeof === T))
|
|
549
|
+
v = s.propTypes;
|
|
550
|
+
else
|
|
551
|
+
return;
|
|
552
|
+
if (v) {
|
|
553
|
+
var E = ne(s);
|
|
554
|
+
nr(v, n.props, "prop", E, n);
|
|
555
|
+
} else if (s.PropTypes !== void 0 && !Be) {
|
|
556
|
+
Be = !0;
|
|
557
|
+
var W = ne(s);
|
|
558
|
+
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", W || "Unknown");
|
|
559
|
+
}
|
|
560
|
+
typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
function mr(n) {
|
|
564
|
+
{
|
|
565
|
+
for (var s = Object.keys(n.props), v = 0; v < s.length; v++) {
|
|
566
|
+
var E = s[v];
|
|
567
|
+
if (E !== "children" && E !== "key") {
|
|
568
|
+
Pe(n), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), Pe(null);
|
|
569
|
+
break;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
n.ref !== null && (Pe(n), b("Invalid attribute `ref` supplied to `React.Fragment`."), Pe(null));
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
var _t = {};
|
|
576
|
+
function Ct(n, s, v, E, W, B) {
|
|
577
|
+
{
|
|
578
|
+
var F = J(n);
|
|
579
|
+
if (!F) {
|
|
580
|
+
var M = "";
|
|
581
|
+
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (M += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
582
|
+
var oe = vr();
|
|
583
|
+
oe ? M += oe : M += St();
|
|
584
|
+
var H;
|
|
585
|
+
n === null ? H = "null" : Xe(n) ? H = "array" : n !== void 0 && n.$$typeof === t ? (H = "<" + (ne(n.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : H = typeof n, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, M);
|
|
586
|
+
}
|
|
587
|
+
var z = hr(n, s, v, W, B);
|
|
588
|
+
if (z == null)
|
|
589
|
+
return z;
|
|
590
|
+
if (F) {
|
|
591
|
+
var de = s.children;
|
|
592
|
+
if (de !== void 0)
|
|
593
|
+
if (E)
|
|
594
|
+
if (Xe(de)) {
|
|
595
|
+
for (var Re = 0; Re < de.length; Re++)
|
|
596
|
+
Tt(de[Re], n);
|
|
597
|
+
Object.freeze && Object.freeze(de);
|
|
598
|
+
} else
|
|
599
|
+
b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
600
|
+
else
|
|
601
|
+
Tt(de, n);
|
|
602
|
+
}
|
|
603
|
+
if (Oe.call(s, "key")) {
|
|
604
|
+
var _e = ne(n), se = Object.keys(s).filter(function(_r) {
|
|
605
|
+
return _r !== "key";
|
|
606
|
+
}), He = se.length > 0 ? "{key: someKey, " + se.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
|
+
if (!_t[_e + He]) {
|
|
608
|
+
var Tr = se.length > 0 ? "{" + se.join(": ..., ") + ": ...}" : "{}";
|
|
609
|
+
b(`A props object containing a "key" prop is being spread into JSX:
|
|
610
|
+
let props = %s;
|
|
611
|
+
<%s {...props} />
|
|
612
|
+
React keys must be passed directly to JSX without using spread:
|
|
613
|
+
let props = %s;
|
|
614
|
+
<%s key={someKey} {...props} />`, He, _e, Tr, _e), _t[_e + He] = !0;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
return n === o ? mr(z) : yr(z), z;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
function br(n, s, v) {
|
|
621
|
+
return Ct(n, s, v, !0);
|
|
622
|
+
}
|
|
623
|
+
function Sr(n, s, v) {
|
|
624
|
+
return Ct(n, s, v, !1);
|
|
625
|
+
}
|
|
626
|
+
var xr = Sr, Er = br;
|
|
627
|
+
Ne.Fragment = o, Ne.jsx = xr, Ne.jsxs = Er;
|
|
628
|
+
}()), Ne;
|
|
629
|
+
}
|
|
630
|
+
process.env.NODE_ENV === "production" ? at.exports = wr() : at.exports = Pr();
|
|
631
|
+
var f = at.exports, Ye = { exports: {} }, qt = {}, it = { exports: {} }, $e = { exports: {} }, L = {};
|
|
632
|
+
/** @license React v16.13.1
|
|
633
|
+
* react-is.production.min.js
|
|
634
|
+
*
|
|
635
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
636
|
+
*
|
|
637
|
+
* This source code is licensed under the MIT license found in the
|
|
638
|
+
* LICENSE file in the root directory of this source tree.
|
|
639
|
+
*/
|
|
640
|
+
var jt;
|
|
641
|
+
function Rr() {
|
|
642
|
+
if (jt) return L;
|
|
643
|
+
jt = 1;
|
|
644
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, u = e ? Symbol.for("react.profiler") : 60114, p = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, g = e ? Symbol.for("react.forward_ref") : 60112, T = e ? Symbol.for("react.suspense") : 60113, A = e ? Symbol.for("react.suspense_list") : 60120, Y = e ? Symbol.for("react.memo") : 60115, q = e ? Symbol.for("react.lazy") : 60116, X = e ? Symbol.for("react.block") : 60121, _ = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119;
|
|
645
|
+
function C(i) {
|
|
646
|
+
if (typeof i == "object" && i !== null) {
|
|
647
|
+
var k = i.$$typeof;
|
|
648
|
+
switch (k) {
|
|
649
|
+
case t:
|
|
650
|
+
switch (i = i.type, i) {
|
|
651
|
+
case d:
|
|
652
|
+
case m:
|
|
653
|
+
case o:
|
|
654
|
+
case u:
|
|
655
|
+
case a:
|
|
656
|
+
case T:
|
|
657
|
+
return i;
|
|
658
|
+
default:
|
|
659
|
+
switch (i = i && i.$$typeof, i) {
|
|
660
|
+
case c:
|
|
661
|
+
case g:
|
|
662
|
+
case q:
|
|
663
|
+
case Y:
|
|
664
|
+
case p:
|
|
665
|
+
return i;
|
|
666
|
+
default:
|
|
667
|
+
return k;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
case r:
|
|
671
|
+
return k;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
function S(i) {
|
|
676
|
+
return C(i) === m;
|
|
677
|
+
}
|
|
678
|
+
return L.AsyncMode = d, L.ConcurrentMode = m, L.ContextConsumer = c, L.ContextProvider = p, L.Element = t, L.ForwardRef = g, L.Fragment = o, L.Lazy = q, L.Memo = Y, L.Portal = r, L.Profiler = u, L.StrictMode = a, L.Suspense = T, L.isAsyncMode = function(i) {
|
|
679
|
+
return S(i) || C(i) === d;
|
|
680
|
+
}, L.isConcurrentMode = S, L.isContextConsumer = function(i) {
|
|
681
|
+
return C(i) === c;
|
|
682
|
+
}, L.isContextProvider = function(i) {
|
|
683
|
+
return C(i) === p;
|
|
684
|
+
}, L.isElement = function(i) {
|
|
685
|
+
return typeof i == "object" && i !== null && i.$$typeof === t;
|
|
686
|
+
}, L.isForwardRef = function(i) {
|
|
687
|
+
return C(i) === g;
|
|
688
|
+
}, L.isFragment = function(i) {
|
|
689
|
+
return C(i) === o;
|
|
690
|
+
}, L.isLazy = function(i) {
|
|
691
|
+
return C(i) === q;
|
|
692
|
+
}, L.isMemo = function(i) {
|
|
693
|
+
return C(i) === Y;
|
|
694
|
+
}, L.isPortal = function(i) {
|
|
695
|
+
return C(i) === r;
|
|
696
|
+
}, L.isProfiler = function(i) {
|
|
697
|
+
return C(i) === u;
|
|
698
|
+
}, L.isStrictMode = function(i) {
|
|
699
|
+
return C(i) === a;
|
|
700
|
+
}, L.isSuspense = function(i) {
|
|
701
|
+
return C(i) === T;
|
|
702
|
+
}, L.isValidElementType = function(i) {
|
|
703
|
+
return typeof i == "string" || typeof i == "function" || i === o || i === m || i === u || i === a || i === T || i === A || typeof i == "object" && i !== null && (i.$$typeof === q || i.$$typeof === Y || i.$$typeof === p || i.$$typeof === c || i.$$typeof === g || i.$$typeof === _ || i.$$typeof === x || i.$$typeof === b || i.$$typeof === X);
|
|
704
|
+
}, L.typeOf = C, L;
|
|
705
|
+
}
|
|
706
|
+
var U = {};
|
|
707
|
+
/** @license React v16.13.1
|
|
708
|
+
* react-is.development.js
|
|
709
|
+
*
|
|
710
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
711
|
+
*
|
|
712
|
+
* This source code is licensed under the MIT license found in the
|
|
713
|
+
* LICENSE file in the root directory of this source tree.
|
|
714
|
+
*/
|
|
715
|
+
var Ot;
|
|
716
|
+
function jr() {
|
|
717
|
+
return Ot || (Ot = 1, process.env.NODE_ENV !== "production" && function() {
|
|
718
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, u = e ? Symbol.for("react.profiler") : 60114, p = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, g = e ? Symbol.for("react.forward_ref") : 60112, T = e ? Symbol.for("react.suspense") : 60113, A = e ? Symbol.for("react.suspense_list") : 60120, Y = e ? Symbol.for("react.memo") : 60115, q = e ? Symbol.for("react.lazy") : 60116, X = e ? Symbol.for("react.block") : 60121, _ = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119;
|
|
719
|
+
function C(h) {
|
|
720
|
+
return typeof h == "string" || typeof h == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
721
|
+
h === o || h === m || h === u || h === a || h === T || h === A || typeof h == "object" && h !== null && (h.$$typeof === q || h.$$typeof === Y || h.$$typeof === p || h.$$typeof === c || h.$$typeof === g || h.$$typeof === _ || h.$$typeof === x || h.$$typeof === b || h.$$typeof === X);
|
|
722
|
+
}
|
|
723
|
+
function S(h) {
|
|
724
|
+
if (typeof h == "object" && h !== null) {
|
|
725
|
+
var fe = h.$$typeof;
|
|
726
|
+
switch (fe) {
|
|
727
|
+
case t:
|
|
728
|
+
var we = h.type;
|
|
729
|
+
switch (we) {
|
|
730
|
+
case d:
|
|
731
|
+
case m:
|
|
732
|
+
case o:
|
|
733
|
+
case u:
|
|
734
|
+
case a:
|
|
735
|
+
case T:
|
|
736
|
+
return we;
|
|
737
|
+
default:
|
|
738
|
+
var Te = we && we.$$typeof;
|
|
739
|
+
switch (Te) {
|
|
740
|
+
case c:
|
|
741
|
+
case g:
|
|
742
|
+
case q:
|
|
743
|
+
case Y:
|
|
744
|
+
case p:
|
|
745
|
+
return Te;
|
|
746
|
+
default:
|
|
747
|
+
return fe;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
case r:
|
|
751
|
+
return fe;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
var i = d, k = m, Z = c, Q = p, G = t, J = g, me = o, be = q, ne = Y, K = r, he = u, ee = a, le = T, ve = !1;
|
|
756
|
+
function Se(h) {
|
|
757
|
+
return ve || (ve = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), l(h) || S(h) === d;
|
|
758
|
+
}
|
|
759
|
+
function l(h) {
|
|
760
|
+
return S(h) === m;
|
|
761
|
+
}
|
|
762
|
+
function y(h) {
|
|
763
|
+
return S(h) === c;
|
|
764
|
+
}
|
|
765
|
+
function O(h) {
|
|
766
|
+
return S(h) === p;
|
|
767
|
+
}
|
|
768
|
+
function j(h) {
|
|
769
|
+
return typeof h == "object" && h !== null && h.$$typeof === t;
|
|
770
|
+
}
|
|
771
|
+
function w(h) {
|
|
772
|
+
return S(h) === g;
|
|
773
|
+
}
|
|
774
|
+
function $(h) {
|
|
775
|
+
return S(h) === o;
|
|
776
|
+
}
|
|
777
|
+
function P(h) {
|
|
778
|
+
return S(h) === q;
|
|
779
|
+
}
|
|
780
|
+
function R(h) {
|
|
781
|
+
return S(h) === Y;
|
|
782
|
+
}
|
|
783
|
+
function D(h) {
|
|
784
|
+
return S(h) === r;
|
|
785
|
+
}
|
|
786
|
+
function I(h) {
|
|
787
|
+
return S(h) === u;
|
|
788
|
+
}
|
|
789
|
+
function N(h) {
|
|
790
|
+
return S(h) === a;
|
|
791
|
+
}
|
|
792
|
+
function te(h) {
|
|
793
|
+
return S(h) === T;
|
|
794
|
+
}
|
|
795
|
+
U.AsyncMode = i, U.ConcurrentMode = k, U.ContextConsumer = Z, U.ContextProvider = Q, U.Element = G, U.ForwardRef = J, U.Fragment = me, U.Lazy = be, U.Memo = ne, U.Portal = K, U.Profiler = he, U.StrictMode = ee, U.Suspense = le, U.isAsyncMode = Se, U.isConcurrentMode = l, U.isContextConsumer = y, U.isContextProvider = O, U.isElement = j, U.isForwardRef = w, U.isFragment = $, U.isLazy = P, U.isMemo = R, U.isPortal = D, U.isProfiler = I, U.isStrictMode = N, U.isSuspense = te, U.isValidElementType = C, U.typeOf = S;
|
|
796
|
+
}()), U;
|
|
797
|
+
}
|
|
798
|
+
var Dt;
|
|
799
|
+
function Bt() {
|
|
800
|
+
return Dt || (Dt = 1, process.env.NODE_ENV === "production" ? $e.exports = Rr() : $e.exports = jr()), $e.exports;
|
|
801
|
+
}
|
|
802
|
+
/*
|
|
803
|
+
object-assign
|
|
804
|
+
(c) Sindre Sorhus
|
|
805
|
+
@license MIT
|
|
806
|
+
*/
|
|
807
|
+
var ze, Nt;
|
|
808
|
+
function Or() {
|
|
809
|
+
if (Nt) return ze;
|
|
810
|
+
Nt = 1;
|
|
811
|
+
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
812
|
+
function o(u) {
|
|
813
|
+
if (u == null)
|
|
814
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
815
|
+
return Object(u);
|
|
816
|
+
}
|
|
817
|
+
function a() {
|
|
818
|
+
try {
|
|
819
|
+
if (!Object.assign)
|
|
820
|
+
return !1;
|
|
821
|
+
var u = new String("abc");
|
|
822
|
+
if (u[5] = "de", Object.getOwnPropertyNames(u)[0] === "5")
|
|
823
|
+
return !1;
|
|
824
|
+
for (var p = {}, c = 0; c < 10; c++)
|
|
825
|
+
p["_" + String.fromCharCode(c)] = c;
|
|
826
|
+
var d = Object.getOwnPropertyNames(p).map(function(g) {
|
|
827
|
+
return p[g];
|
|
828
|
+
});
|
|
829
|
+
if (d.join("") !== "0123456789")
|
|
830
|
+
return !1;
|
|
831
|
+
var m = {};
|
|
832
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(g) {
|
|
833
|
+
m[g] = g;
|
|
834
|
+
}), Object.keys(Object.assign({}, m)).join("") === "abcdefghijklmnopqrst";
|
|
835
|
+
} catch {
|
|
836
|
+
return !1;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
return ze = a() ? Object.assign : function(u, p) {
|
|
840
|
+
for (var c, d = o(u), m, g = 1; g < arguments.length; g++) {
|
|
841
|
+
c = Object(arguments[g]);
|
|
842
|
+
for (var T in c)
|
|
843
|
+
t.call(c, T) && (d[T] = c[T]);
|
|
844
|
+
if (e) {
|
|
845
|
+
m = e(c);
|
|
846
|
+
for (var A = 0; A < m.length; A++)
|
|
847
|
+
r.call(c, m[A]) && (d[m[A]] = c[m[A]]);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
return d;
|
|
851
|
+
}, ze;
|
|
852
|
+
}
|
|
853
|
+
var Ge, Mt;
|
|
854
|
+
function lt() {
|
|
855
|
+
if (Mt) return Ge;
|
|
856
|
+
Mt = 1;
|
|
857
|
+
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
858
|
+
return Ge = e, Ge;
|
|
859
|
+
}
|
|
860
|
+
var Je, At;
|
|
861
|
+
function Vt() {
|
|
862
|
+
return At || (At = 1, Je = Function.call.bind(Object.prototype.hasOwnProperty)), Je;
|
|
863
|
+
}
|
|
864
|
+
var Ke, kt;
|
|
865
|
+
function Dr() {
|
|
866
|
+
if (kt) return Ke;
|
|
867
|
+
kt = 1;
|
|
868
|
+
var e = function() {
|
|
869
|
+
};
|
|
870
|
+
if (process.env.NODE_ENV !== "production") {
|
|
871
|
+
var t = lt(), r = {}, o = Vt();
|
|
872
|
+
e = function(u) {
|
|
873
|
+
var p = "Warning: " + u;
|
|
874
|
+
typeof console < "u" && console.error(p);
|
|
875
|
+
try {
|
|
876
|
+
throw new Error(p);
|
|
877
|
+
} catch {
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
function a(u, p, c, d, m) {
|
|
882
|
+
if (process.env.NODE_ENV !== "production") {
|
|
883
|
+
for (var g in u)
|
|
884
|
+
if (o(u, g)) {
|
|
885
|
+
var T;
|
|
886
|
+
try {
|
|
887
|
+
if (typeof u[g] != "function") {
|
|
888
|
+
var A = Error(
|
|
889
|
+
(d || "React class") + ": " + c + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof u[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
890
|
+
);
|
|
891
|
+
throw A.name = "Invariant Violation", A;
|
|
892
|
+
}
|
|
893
|
+
T = u[g](p, g, d, c, null, t);
|
|
894
|
+
} catch (q) {
|
|
895
|
+
T = q;
|
|
896
|
+
}
|
|
897
|
+
if (T && !(T instanceof Error) && e(
|
|
898
|
+
(d || "React class") + ": type specification of " + c + " `" + g + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof T + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
899
|
+
), T instanceof Error && !(T.message in r)) {
|
|
900
|
+
r[T.message] = !0;
|
|
901
|
+
var Y = m ? m() : "";
|
|
902
|
+
e(
|
|
903
|
+
"Failed " + c + " type: " + T.message + (Y ?? "")
|
|
904
|
+
);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
return a.resetWarningCache = function() {
|
|
910
|
+
process.env.NODE_ENV !== "production" && (r = {});
|
|
911
|
+
}, Ke = a, Ke;
|
|
912
|
+
}
|
|
913
|
+
var Ze, $t;
|
|
914
|
+
function Nr() {
|
|
915
|
+
if ($t) return Ze;
|
|
916
|
+
$t = 1;
|
|
917
|
+
var e = Bt(), t = Or(), r = lt(), o = Vt(), a = Dr(), u = function() {
|
|
918
|
+
};
|
|
919
|
+
process.env.NODE_ENV !== "production" && (u = function(c) {
|
|
920
|
+
var d = "Warning: " + c;
|
|
921
|
+
typeof console < "u" && console.error(d);
|
|
922
|
+
try {
|
|
923
|
+
throw new Error(d);
|
|
924
|
+
} catch {
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
function p() {
|
|
928
|
+
return null;
|
|
929
|
+
}
|
|
930
|
+
return Ze = function(c, d) {
|
|
931
|
+
var m = typeof Symbol == "function" && Symbol.iterator, g = "@@iterator";
|
|
932
|
+
function T(l) {
|
|
933
|
+
var y = l && (m && l[m] || l[g]);
|
|
934
|
+
if (typeof y == "function")
|
|
935
|
+
return y;
|
|
936
|
+
}
|
|
937
|
+
var A = "<<anonymous>>", Y = {
|
|
938
|
+
array: x("array"),
|
|
939
|
+
bigint: x("bigint"),
|
|
940
|
+
bool: x("boolean"),
|
|
941
|
+
func: x("function"),
|
|
942
|
+
number: x("number"),
|
|
943
|
+
object: x("object"),
|
|
944
|
+
string: x("string"),
|
|
945
|
+
symbol: x("symbol"),
|
|
946
|
+
any: b(),
|
|
947
|
+
arrayOf: C,
|
|
948
|
+
element: S(),
|
|
949
|
+
elementType: i(),
|
|
950
|
+
instanceOf: k,
|
|
951
|
+
node: J(),
|
|
952
|
+
objectOf: Q,
|
|
953
|
+
oneOf: Z,
|
|
954
|
+
oneOfType: G,
|
|
955
|
+
shape: be,
|
|
956
|
+
exact: ne
|
|
957
|
+
};
|
|
958
|
+
function q(l, y) {
|
|
959
|
+
return l === y ? l !== 0 || 1 / l === 1 / y : l !== l && y !== y;
|
|
960
|
+
}
|
|
961
|
+
function X(l, y) {
|
|
962
|
+
this.message = l, this.data = y && typeof y == "object" ? y : {}, this.stack = "";
|
|
963
|
+
}
|
|
964
|
+
X.prototype = Error.prototype;
|
|
965
|
+
function _(l) {
|
|
966
|
+
if (process.env.NODE_ENV !== "production")
|
|
967
|
+
var y = {}, O = 0;
|
|
968
|
+
function j($, P, R, D, I, N, te) {
|
|
969
|
+
if (D = D || A, N = N || R, te !== r) {
|
|
970
|
+
if (d) {
|
|
971
|
+
var h = new Error(
|
|
972
|
+
"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"
|
|
973
|
+
);
|
|
974
|
+
throw h.name = "Invariant Violation", h;
|
|
975
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
976
|
+
var fe = D + ":" + R;
|
|
977
|
+
!y[fe] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
978
|
+
O < 3 && (u(
|
|
979
|
+
"You are manually calling a React.PropTypes validation function for the `" + N + "` prop on `" + D + "`. 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."
|
|
980
|
+
), y[fe] = !0, O++);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
return P[R] == null ? $ ? P[R] === null ? new X("The " + I + " `" + N + "` is marked as required " + ("in `" + D + "`, but its value is `null`.")) : new X("The " + I + " `" + N + "` is marked as required in " + ("`" + D + "`, but its value is `undefined`.")) : null : l(P, R, D, I, N);
|
|
984
|
+
}
|
|
985
|
+
var w = j.bind(null, !1);
|
|
986
|
+
return w.isRequired = j.bind(null, !0), w;
|
|
987
|
+
}
|
|
988
|
+
function x(l) {
|
|
989
|
+
function y(O, j, w, $, P, R) {
|
|
990
|
+
var D = O[j], I = ee(D);
|
|
991
|
+
if (I !== l) {
|
|
992
|
+
var N = le(D);
|
|
993
|
+
return new X(
|
|
994
|
+
"Invalid " + $ + " `" + P + "` of type " + ("`" + N + "` supplied to `" + w + "`, expected ") + ("`" + l + "`."),
|
|
995
|
+
{ expectedType: l }
|
|
996
|
+
);
|
|
997
|
+
}
|
|
998
|
+
return null;
|
|
999
|
+
}
|
|
1000
|
+
return _(y);
|
|
1001
|
+
}
|
|
1002
|
+
function b() {
|
|
1003
|
+
return _(p);
|
|
1004
|
+
}
|
|
1005
|
+
function C(l) {
|
|
1006
|
+
function y(O, j, w, $, P) {
|
|
1007
|
+
if (typeof l != "function")
|
|
1008
|
+
return new X("Property `" + P + "` of component `" + w + "` has invalid PropType notation inside arrayOf.");
|
|
1009
|
+
var R = O[j];
|
|
1010
|
+
if (!Array.isArray(R)) {
|
|
1011
|
+
var D = ee(R);
|
|
1012
|
+
return new X("Invalid " + $ + " `" + P + "` of type " + ("`" + D + "` supplied to `" + w + "`, expected an array."));
|
|
1013
|
+
}
|
|
1014
|
+
for (var I = 0; I < R.length; I++) {
|
|
1015
|
+
var N = l(R, I, w, $, P + "[" + I + "]", r);
|
|
1016
|
+
if (N instanceof Error)
|
|
1017
|
+
return N;
|
|
1018
|
+
}
|
|
1019
|
+
return null;
|
|
1020
|
+
}
|
|
1021
|
+
return _(y);
|
|
1022
|
+
}
|
|
1023
|
+
function S() {
|
|
1024
|
+
function l(y, O, j, w, $) {
|
|
1025
|
+
var P = y[O];
|
|
1026
|
+
if (!c(P)) {
|
|
1027
|
+
var R = ee(P);
|
|
1028
|
+
return new X("Invalid " + w + " `" + $ + "` of type " + ("`" + R + "` supplied to `" + j + "`, expected a single ReactElement."));
|
|
1029
|
+
}
|
|
1030
|
+
return null;
|
|
1031
|
+
}
|
|
1032
|
+
return _(l);
|
|
1033
|
+
}
|
|
1034
|
+
function i() {
|
|
1035
|
+
function l(y, O, j, w, $) {
|
|
1036
|
+
var P = y[O];
|
|
1037
|
+
if (!e.isValidElementType(P)) {
|
|
1038
|
+
var R = ee(P);
|
|
1039
|
+
return new X("Invalid " + w + " `" + $ + "` of type " + ("`" + R + "` supplied to `" + j + "`, expected a single ReactElement type."));
|
|
1040
|
+
}
|
|
1041
|
+
return null;
|
|
1042
|
+
}
|
|
1043
|
+
return _(l);
|
|
1044
|
+
}
|
|
1045
|
+
function k(l) {
|
|
1046
|
+
function y(O, j, w, $, P) {
|
|
1047
|
+
if (!(O[j] instanceof l)) {
|
|
1048
|
+
var R = l.name || A, D = Se(O[j]);
|
|
1049
|
+
return new X("Invalid " + $ + " `" + P + "` of type " + ("`" + D + "` supplied to `" + w + "`, expected ") + ("instance of `" + R + "`."));
|
|
1050
|
+
}
|
|
1051
|
+
return null;
|
|
1052
|
+
}
|
|
1053
|
+
return _(y);
|
|
1054
|
+
}
|
|
1055
|
+
function Z(l) {
|
|
1056
|
+
if (!Array.isArray(l))
|
|
1057
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? u(
|
|
1058
|
+
"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])."
|
|
1059
|
+
) : u("Invalid argument supplied to oneOf, expected an array.")), p;
|
|
1060
|
+
function y(O, j, w, $, P) {
|
|
1061
|
+
for (var R = O[j], D = 0; D < l.length; D++)
|
|
1062
|
+
if (q(R, l[D]))
|
|
1063
|
+
return null;
|
|
1064
|
+
var I = JSON.stringify(l, function(te, h) {
|
|
1065
|
+
var fe = le(h);
|
|
1066
|
+
return fe === "symbol" ? String(h) : h;
|
|
1067
|
+
});
|
|
1068
|
+
return new X("Invalid " + $ + " `" + P + "` of value `" + String(R) + "` " + ("supplied to `" + w + "`, expected one of " + I + "."));
|
|
1069
|
+
}
|
|
1070
|
+
return _(y);
|
|
1071
|
+
}
|
|
1072
|
+
function Q(l) {
|
|
1073
|
+
function y(O, j, w, $, P) {
|
|
1074
|
+
if (typeof l != "function")
|
|
1075
|
+
return new X("Property `" + P + "` of component `" + w + "` has invalid PropType notation inside objectOf.");
|
|
1076
|
+
var R = O[j], D = ee(R);
|
|
1077
|
+
if (D !== "object")
|
|
1078
|
+
return new X("Invalid " + $ + " `" + P + "` of type " + ("`" + D + "` supplied to `" + w + "`, expected an object."));
|
|
1079
|
+
for (var I in R)
|
|
1080
|
+
if (o(R, I)) {
|
|
1081
|
+
var N = l(R, I, w, $, P + "." + I, r);
|
|
1082
|
+
if (N instanceof Error)
|
|
1083
|
+
return N;
|
|
1084
|
+
}
|
|
1085
|
+
return null;
|
|
1086
|
+
}
|
|
1087
|
+
return _(y);
|
|
1088
|
+
}
|
|
1089
|
+
function G(l) {
|
|
1090
|
+
if (!Array.isArray(l))
|
|
1091
|
+
return process.env.NODE_ENV !== "production" && u("Invalid argument supplied to oneOfType, expected an instance of array."), p;
|
|
1092
|
+
for (var y = 0; y < l.length; y++) {
|
|
1093
|
+
var O = l[y];
|
|
1094
|
+
if (typeof O != "function")
|
|
1095
|
+
return u(
|
|
1096
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ve(O) + " at index " + y + "."
|
|
1097
|
+
), p;
|
|
1098
|
+
}
|
|
1099
|
+
function j(w, $, P, R, D) {
|
|
1100
|
+
for (var I = [], N = 0; N < l.length; N++) {
|
|
1101
|
+
var te = l[N], h = te(w, $, P, R, D, r);
|
|
1102
|
+
if (h == null)
|
|
1103
|
+
return null;
|
|
1104
|
+
h.data && o(h.data, "expectedType") && I.push(h.data.expectedType);
|
|
1105
|
+
}
|
|
1106
|
+
var fe = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
|
|
1107
|
+
return new X("Invalid " + R + " `" + D + "` supplied to " + ("`" + P + "`" + fe + "."));
|
|
1108
|
+
}
|
|
1109
|
+
return _(j);
|
|
1110
|
+
}
|
|
1111
|
+
function J() {
|
|
1112
|
+
function l(y, O, j, w, $) {
|
|
1113
|
+
return K(y[O]) ? null : new X("Invalid " + w + " `" + $ + "` supplied to " + ("`" + j + "`, expected a ReactNode."));
|
|
1114
|
+
}
|
|
1115
|
+
return _(l);
|
|
1116
|
+
}
|
|
1117
|
+
function me(l, y, O, j, w) {
|
|
1118
|
+
return new X(
|
|
1119
|
+
(l || "React class") + ": " + y + " type `" + O + "." + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + w + "`."
|
|
1120
|
+
);
|
|
1121
|
+
}
|
|
1122
|
+
function be(l) {
|
|
1123
|
+
function y(O, j, w, $, P) {
|
|
1124
|
+
var R = O[j], D = ee(R);
|
|
1125
|
+
if (D !== "object")
|
|
1126
|
+
return new X("Invalid " + $ + " `" + P + "` of type `" + D + "` " + ("supplied to `" + w + "`, expected `object`."));
|
|
1127
|
+
for (var I in l) {
|
|
1128
|
+
var N = l[I];
|
|
1129
|
+
if (typeof N != "function")
|
|
1130
|
+
return me(w, $, P, I, le(N));
|
|
1131
|
+
var te = N(R, I, w, $, P + "." + I, r);
|
|
1132
|
+
if (te)
|
|
1133
|
+
return te;
|
|
1134
|
+
}
|
|
1135
|
+
return null;
|
|
1136
|
+
}
|
|
1137
|
+
return _(y);
|
|
1138
|
+
}
|
|
1139
|
+
function ne(l) {
|
|
1140
|
+
function y(O, j, w, $, P) {
|
|
1141
|
+
var R = O[j], D = ee(R);
|
|
1142
|
+
if (D !== "object")
|
|
1143
|
+
return new X("Invalid " + $ + " `" + P + "` of type `" + D + "` " + ("supplied to `" + w + "`, expected `object`."));
|
|
1144
|
+
var I = t({}, O[j], l);
|
|
1145
|
+
for (var N in I) {
|
|
1146
|
+
var te = l[N];
|
|
1147
|
+
if (o(l, N) && typeof te != "function")
|
|
1148
|
+
return me(w, $, P, N, le(te));
|
|
1149
|
+
if (!te)
|
|
1150
|
+
return new X(
|
|
1151
|
+
"Invalid " + $ + " `" + P + "` key `" + N + "` supplied to `" + w + "`.\nBad object: " + JSON.stringify(O[j], null, " ") + `
|
|
1152
|
+
Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
1153
|
+
);
|
|
1154
|
+
var h = te(R, N, w, $, P + "." + N, r);
|
|
1155
|
+
if (h)
|
|
1156
|
+
return h;
|
|
1157
|
+
}
|
|
1158
|
+
return null;
|
|
1159
|
+
}
|
|
1160
|
+
return _(y);
|
|
1161
|
+
}
|
|
1162
|
+
function K(l) {
|
|
1163
|
+
switch (typeof l) {
|
|
1164
|
+
case "number":
|
|
1165
|
+
case "string":
|
|
1166
|
+
case "undefined":
|
|
1167
|
+
return !0;
|
|
1168
|
+
case "boolean":
|
|
1169
|
+
return !l;
|
|
1170
|
+
case "object":
|
|
1171
|
+
if (Array.isArray(l))
|
|
1172
|
+
return l.every(K);
|
|
1173
|
+
if (l === null || c(l))
|
|
1174
|
+
return !0;
|
|
1175
|
+
var y = T(l);
|
|
1176
|
+
if (y) {
|
|
1177
|
+
var O = y.call(l), j;
|
|
1178
|
+
if (y !== l.entries) {
|
|
1179
|
+
for (; !(j = O.next()).done; )
|
|
1180
|
+
if (!K(j.value))
|
|
1181
|
+
return !1;
|
|
1182
|
+
} else
|
|
1183
|
+
for (; !(j = O.next()).done; ) {
|
|
1184
|
+
var w = j.value;
|
|
1185
|
+
if (w && !K(w[1]))
|
|
1186
|
+
return !1;
|
|
1187
|
+
}
|
|
1188
|
+
} else
|
|
1189
|
+
return !1;
|
|
1190
|
+
return !0;
|
|
1191
|
+
default:
|
|
1192
|
+
return !1;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
function he(l, y) {
|
|
1196
|
+
return l === "symbol" ? !0 : y ? y["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && y instanceof Symbol : !1;
|
|
1197
|
+
}
|
|
1198
|
+
function ee(l) {
|
|
1199
|
+
var y = typeof l;
|
|
1200
|
+
return Array.isArray(l) ? "array" : l instanceof RegExp ? "object" : he(y, l) ? "symbol" : y;
|
|
1201
|
+
}
|
|
1202
|
+
function le(l) {
|
|
1203
|
+
if (typeof l > "u" || l === null)
|
|
1204
|
+
return "" + l;
|
|
1205
|
+
var y = ee(l);
|
|
1206
|
+
if (y === "object") {
|
|
1207
|
+
if (l instanceof Date)
|
|
1208
|
+
return "date";
|
|
1209
|
+
if (l instanceof RegExp)
|
|
1210
|
+
return "regexp";
|
|
1211
|
+
}
|
|
1212
|
+
return y;
|
|
1213
|
+
}
|
|
1214
|
+
function ve(l) {
|
|
1215
|
+
var y = le(l);
|
|
1216
|
+
switch (y) {
|
|
1217
|
+
case "array":
|
|
1218
|
+
case "object":
|
|
1219
|
+
return "an " + y;
|
|
1220
|
+
case "boolean":
|
|
1221
|
+
case "date":
|
|
1222
|
+
case "regexp":
|
|
1223
|
+
return "a " + y;
|
|
1224
|
+
default:
|
|
1225
|
+
return y;
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
function Se(l) {
|
|
1229
|
+
return !l.constructor || !l.constructor.name ? A : l.constructor.name;
|
|
1230
|
+
}
|
|
1231
|
+
return Y.checkPropTypes = a, Y.resetWarningCache = a.resetWarningCache, Y.PropTypes = Y, Y;
|
|
1232
|
+
}, Ze;
|
|
1233
|
+
}
|
|
1234
|
+
var Qe, Ft;
|
|
1235
|
+
function Mr() {
|
|
1236
|
+
if (Ft) return Qe;
|
|
1237
|
+
Ft = 1;
|
|
1238
|
+
var e = lt();
|
|
1239
|
+
function t() {
|
|
1240
|
+
}
|
|
1241
|
+
function r() {
|
|
1242
|
+
}
|
|
1243
|
+
return r.resetWarningCache = t, Qe = function() {
|
|
1244
|
+
function o(p, c, d, m, g, T) {
|
|
1245
|
+
if (T !== e) {
|
|
1246
|
+
var A = new Error(
|
|
1247
|
+
"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"
|
|
1248
|
+
);
|
|
1249
|
+
throw A.name = "Invariant Violation", A;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
o.isRequired = o;
|
|
1253
|
+
function a() {
|
|
1254
|
+
return o;
|
|
1255
|
+
}
|
|
1256
|
+
var u = {
|
|
1257
|
+
array: o,
|
|
1258
|
+
bigint: o,
|
|
1259
|
+
bool: o,
|
|
1260
|
+
func: o,
|
|
1261
|
+
number: o,
|
|
1262
|
+
object: o,
|
|
1263
|
+
string: o,
|
|
1264
|
+
symbol: o,
|
|
1265
|
+
any: o,
|
|
1266
|
+
arrayOf: a,
|
|
1267
|
+
element: o,
|
|
1268
|
+
elementType: o,
|
|
1269
|
+
instanceOf: a,
|
|
1270
|
+
node: o,
|
|
1271
|
+
objectOf: a,
|
|
1272
|
+
oneOf: a,
|
|
1273
|
+
oneOfType: a,
|
|
1274
|
+
shape: a,
|
|
1275
|
+
exact: a,
|
|
1276
|
+
checkPropTypes: r,
|
|
1277
|
+
resetWarningCache: t
|
|
1278
|
+
};
|
|
1279
|
+
return u.PropTypes = u, u;
|
|
1280
|
+
}, Qe;
|
|
1281
|
+
}
|
|
1282
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1283
|
+
var Ar = Bt(), kr = !0;
|
|
1284
|
+
it.exports = Nr()(Ar.isElement, kr);
|
|
1285
|
+
} else
|
|
1286
|
+
it.exports = Mr()();
|
|
1287
|
+
var Ht = it.exports, st = { exports: {} };
|
|
1288
|
+
function zt(e) {
|
|
1289
|
+
var t, r, o = "";
|
|
1290
|
+
if (typeof e == "string" || typeof e == "number") o += e;
|
|
1291
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1292
|
+
var a = e.length;
|
|
1293
|
+
for (t = 0; t < a; t++) e[t] && (r = zt(e[t])) && (o && (o += " "), o += r);
|
|
1294
|
+
} else for (r in e) e[r] && (o && (o += " "), o += r);
|
|
1295
|
+
return o;
|
|
1296
|
+
}
|
|
1297
|
+
function It() {
|
|
1298
|
+
for (var e, t, r = 0, o = "", a = arguments.length; r < a; r++) (e = arguments[r]) && (t = zt(e)) && (o && (o += " "), o += t);
|
|
1299
|
+
return o;
|
|
1300
|
+
}
|
|
1301
|
+
st.exports = It, st.exports.clsx = It;
|
|
1302
|
+
var $r = st.exports, V = {}, ge = {};
|
|
1303
|
+
Object.defineProperty(ge, "__esModule", {
|
|
1304
|
+
value: !0
|
|
1305
|
+
});
|
|
1306
|
+
ge.dontSetMe = Lr;
|
|
1307
|
+
ge.findInArray = Fr;
|
|
1308
|
+
ge.int = Wr;
|
|
1309
|
+
ge.isFunction = Ir;
|
|
1310
|
+
ge.isNum = Yr;
|
|
1311
|
+
function Fr(e, t) {
|
|
1312
|
+
for (let r = 0, o = e.length; r < o; r++)
|
|
1313
|
+
if (t.apply(t, [e[r], r, e])) return e[r];
|
|
1314
|
+
}
|
|
1315
|
+
function Ir(e) {
|
|
1316
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
1317
|
+
}
|
|
1318
|
+
function Yr(e) {
|
|
1319
|
+
return typeof e == "number" && !isNaN(e);
|
|
1320
|
+
}
|
|
1321
|
+
function Wr(e) {
|
|
1322
|
+
return parseInt(e, 10);
|
|
1323
|
+
}
|
|
1324
|
+
function Lr(e, t, r) {
|
|
1325
|
+
if (e[t])
|
|
1326
|
+
return new Error(`Invalid prop ${t} passed to ${r} - do not set this, set it on the child.`);
|
|
1327
|
+
}
|
|
1328
|
+
var Ce = {};
|
|
1329
|
+
Object.defineProperty(Ce, "__esModule", {
|
|
1330
|
+
value: !0
|
|
1331
|
+
});
|
|
1332
|
+
Ce.browserPrefixToKey = Jt;
|
|
1333
|
+
Ce.browserPrefixToStyle = Ur;
|
|
1334
|
+
Ce.default = void 0;
|
|
1335
|
+
Ce.getPrefix = Gt;
|
|
1336
|
+
const et = ["Moz", "Webkit", "O", "ms"];
|
|
1337
|
+
function Gt() {
|
|
1338
|
+
var r, o;
|
|
1339
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1340
|
+
if (typeof window > "u") return "";
|
|
1341
|
+
const t = (o = (r = window.document) == null ? void 0 : r.documentElement) == null ? void 0 : o.style;
|
|
1342
|
+
if (!t || e in t) return "";
|
|
1343
|
+
for (let a = 0; a < et.length; a++)
|
|
1344
|
+
if (Jt(e, et[a]) in t) return et[a];
|
|
1345
|
+
return "";
|
|
1346
|
+
}
|
|
1347
|
+
function Jt(e, t) {
|
|
1348
|
+
return t ? `${t}${Xr(e)}` : e;
|
|
1349
|
+
}
|
|
1350
|
+
function Ur(e, t) {
|
|
1351
|
+
return t ? `-${t.toLowerCase()}-${e}` : e;
|
|
1352
|
+
}
|
|
1353
|
+
function Xr(e) {
|
|
1354
|
+
let t = "", r = !0;
|
|
1355
|
+
for (let o = 0; o < e.length; o++)
|
|
1356
|
+
r ? (t += e[o].toUpperCase(), r = !1) : e[o] === "-" ? r = !0 : t += e[o];
|
|
1357
|
+
return t;
|
|
1358
|
+
}
|
|
1359
|
+
Ce.default = Gt();
|
|
1360
|
+
Object.defineProperty(V, "__esModule", {
|
|
1361
|
+
value: !0
|
|
1362
|
+
});
|
|
1363
|
+
V.addClassName = Qt;
|
|
1364
|
+
V.addEvent = Br;
|
|
1365
|
+
V.addUserSelectStyles = rn;
|
|
1366
|
+
V.createCSSTransform = Zr;
|
|
1367
|
+
V.createSVGTransform = Qr;
|
|
1368
|
+
V.getTouch = en;
|
|
1369
|
+
V.getTouchIdentifier = tn;
|
|
1370
|
+
V.getTranslation = ut;
|
|
1371
|
+
V.innerHeight = Gr;
|
|
1372
|
+
V.innerWidth = Jr;
|
|
1373
|
+
V.matchesSelector = Zt;
|
|
1374
|
+
V.matchesSelectorAndParentsTo = qr;
|
|
1375
|
+
V.offsetXYFromParent = Kr;
|
|
1376
|
+
V.outerHeight = Hr;
|
|
1377
|
+
V.outerWidth = zr;
|
|
1378
|
+
V.removeClassName = er;
|
|
1379
|
+
V.removeEvent = Vr;
|
|
1380
|
+
V.scheduleRemoveUserSelectStyles = nn;
|
|
1381
|
+
var ce = ge, Yt = Kt(Ce);
|
|
1382
|
+
function Kt(e, t) {
|
|
1383
|
+
if (typeof WeakMap == "function") var r = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap();
|
|
1384
|
+
return (Kt = function(a, u) {
|
|
1385
|
+
if (!u && a && a.__esModule) return a;
|
|
1386
|
+
var p, c, d = { __proto__: null, default: a };
|
|
1387
|
+
if (a === null || typeof a != "object" && typeof a != "function") return d;
|
|
1388
|
+
if (p = u ? o : r) {
|
|
1389
|
+
if (p.has(a)) return p.get(a);
|
|
1390
|
+
p.set(a, d);
|
|
1391
|
+
}
|
|
1392
|
+
for (const m in a) m !== "default" && {}.hasOwnProperty.call(a, m) && ((c = (p = Object.defineProperty) && Object.getOwnPropertyDescriptor(a, m)) && (c.get || c.set) ? p(d, m, c) : d[m] = a[m]);
|
|
1393
|
+
return d;
|
|
1394
|
+
})(e, t);
|
|
1395
|
+
}
|
|
1396
|
+
let Fe = "";
|
|
1397
|
+
function Zt(e, t) {
|
|
1398
|
+
return Fe || (Fe = (0, ce.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(r) {
|
|
1399
|
+
return (0, ce.isFunction)(e[r]);
|
|
1400
|
+
})), (0, ce.isFunction)(e[Fe]) ? e[Fe](t) : !1;
|
|
1401
|
+
}
|
|
1402
|
+
function qr(e, t, r) {
|
|
1403
|
+
let o = e;
|
|
1404
|
+
do {
|
|
1405
|
+
if (Zt(o, t)) return !0;
|
|
1406
|
+
if (o === r) return !1;
|
|
1407
|
+
o = o.parentNode;
|
|
1408
|
+
} while (o);
|
|
1409
|
+
return !1;
|
|
1410
|
+
}
|
|
1411
|
+
function Br(e, t, r, o) {
|
|
1412
|
+
if (!e) return;
|
|
1413
|
+
const a = {
|
|
1414
|
+
capture: !0,
|
|
1415
|
+
...o
|
|
1416
|
+
};
|
|
1417
|
+
e.addEventListener ? e.addEventListener(t, r, a) : e.attachEvent ? e.attachEvent("on" + t, r) : e["on" + t] = r;
|
|
1418
|
+
}
|
|
1419
|
+
function Vr(e, t, r, o) {
|
|
1420
|
+
if (!e) return;
|
|
1421
|
+
const a = {
|
|
1422
|
+
capture: !0,
|
|
1423
|
+
...o
|
|
1424
|
+
};
|
|
1425
|
+
e.removeEventListener ? e.removeEventListener(t, r, a) : e.detachEvent ? e.detachEvent("on" + t, r) : e["on" + t] = null;
|
|
1426
|
+
}
|
|
1427
|
+
function Hr(e) {
|
|
1428
|
+
let t = e.clientHeight;
|
|
1429
|
+
const r = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
1430
|
+
return t += (0, ce.int)(r.borderTopWidth), t += (0, ce.int)(r.borderBottomWidth), t;
|
|
1431
|
+
}
|
|
1432
|
+
function zr(e) {
|
|
1433
|
+
let t = e.clientWidth;
|
|
1434
|
+
const r = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
1435
|
+
return t += (0, ce.int)(r.borderLeftWidth), t += (0, ce.int)(r.borderRightWidth), t;
|
|
1436
|
+
}
|
|
1437
|
+
function Gr(e) {
|
|
1438
|
+
let t = e.clientHeight;
|
|
1439
|
+
const r = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
1440
|
+
return t -= (0, ce.int)(r.paddingTop), t -= (0, ce.int)(r.paddingBottom), t;
|
|
1441
|
+
}
|
|
1442
|
+
function Jr(e) {
|
|
1443
|
+
let t = e.clientWidth;
|
|
1444
|
+
const r = e.ownerDocument.defaultView.getComputedStyle(e);
|
|
1445
|
+
return t -= (0, ce.int)(r.paddingLeft), t -= (0, ce.int)(r.paddingRight), t;
|
|
1446
|
+
}
|
|
1447
|
+
function Kr(e, t, r) {
|
|
1448
|
+
const a = t === t.ownerDocument.body ? {
|
|
1449
|
+
left: 0,
|
|
1450
|
+
top: 0
|
|
1451
|
+
} : t.getBoundingClientRect(), u = (e.clientX + t.scrollLeft - a.left) / r, p = (e.clientY + t.scrollTop - a.top) / r;
|
|
1452
|
+
return {
|
|
1453
|
+
x: u,
|
|
1454
|
+
y: p
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
function Zr(e, t) {
|
|
1458
|
+
const r = ut(e, t, "px");
|
|
1459
|
+
return {
|
|
1460
|
+
[(0, Yt.browserPrefixToKey)("transform", Yt.default)]: r
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
function Qr(e, t) {
|
|
1464
|
+
return ut(e, t, "");
|
|
1465
|
+
}
|
|
1466
|
+
function ut(e, t, r) {
|
|
1467
|
+
let {
|
|
1468
|
+
x: o,
|
|
1469
|
+
y: a
|
|
1470
|
+
} = e, u = `translate(${o}${r},${a}${r})`;
|
|
1471
|
+
if (t) {
|
|
1472
|
+
const p = `${typeof t.x == "string" ? t.x : t.x + r}`, c = `${typeof t.y == "string" ? t.y : t.y + r}`;
|
|
1473
|
+
u = `translate(${p}, ${c})` + u;
|
|
1474
|
+
}
|
|
1475
|
+
return u;
|
|
1476
|
+
}
|
|
1477
|
+
function en(e, t) {
|
|
1478
|
+
return e.targetTouches && (0, ce.findInArray)(e.targetTouches, (r) => t === r.identifier) || e.changedTouches && (0, ce.findInArray)(e.changedTouches, (r) => t === r.identifier);
|
|
1479
|
+
}
|
|
1480
|
+
function tn(e) {
|
|
1481
|
+
if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;
|
|
1482
|
+
if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;
|
|
1483
|
+
}
|
|
1484
|
+
function rn(e) {
|
|
1485
|
+
if (!e) return;
|
|
1486
|
+
let t = e.getElementById("react-draggable-style-el");
|
|
1487
|
+
t || (t = e.createElement("style"), t.type = "text/css", t.id = "react-draggable-style-el", t.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1488
|
+
`, t.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1489
|
+
`, e.getElementsByTagName("head")[0].appendChild(t)), e.body && Qt(e.body, "react-draggable-transparent-selection");
|
|
1490
|
+
}
|
|
1491
|
+
function nn(e) {
|
|
1492
|
+
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1493
|
+
Wt(e);
|
|
1494
|
+
}) : Wt(e);
|
|
1495
|
+
}
|
|
1496
|
+
function Wt(e) {
|
|
1497
|
+
if (e)
|
|
1498
|
+
try {
|
|
1499
|
+
if (e.body && er(e.body, "react-draggable-transparent-selection"), e.selection)
|
|
1500
|
+
e.selection.empty();
|
|
1501
|
+
else {
|
|
1502
|
+
const t = (e.defaultView || window).getSelection();
|
|
1503
|
+
t && t.type !== "Caret" && t.removeAllRanges();
|
|
1504
|
+
}
|
|
1505
|
+
} catch {
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
function Qt(e, t) {
|
|
1509
|
+
e.classList ? e.classList.add(t) : e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`)) || (e.className += ` ${t}`);
|
|
1510
|
+
}
|
|
1511
|
+
function er(e, t) {
|
|
1512
|
+
e.classList ? e.classList.remove(t) : e.className = e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`, "g"), "");
|
|
1513
|
+
}
|
|
1514
|
+
var ye = {};
|
|
1515
|
+
Object.defineProperty(ye, "__esModule", {
|
|
1516
|
+
value: !0
|
|
1517
|
+
});
|
|
1518
|
+
ye.canDragX = sn;
|
|
1519
|
+
ye.canDragY = ln;
|
|
1520
|
+
ye.createCoreData = cn;
|
|
1521
|
+
ye.createDraggableData = fn;
|
|
1522
|
+
ye.getBoundPosition = on;
|
|
1523
|
+
ye.getControlPosition = un;
|
|
1524
|
+
ye.snapToGrid = an;
|
|
1525
|
+
var ue = ge, je = V;
|
|
1526
|
+
function on(e, t, r) {
|
|
1527
|
+
if (!e.props.bounds) return [t, r];
|
|
1528
|
+
let {
|
|
1529
|
+
bounds: o
|
|
1530
|
+
} = e.props;
|
|
1531
|
+
o = typeof o == "string" ? o : dn(o);
|
|
1532
|
+
const a = ct(e);
|
|
1533
|
+
if (typeof o == "string") {
|
|
1534
|
+
const {
|
|
1535
|
+
ownerDocument: u
|
|
1536
|
+
} = a, p = u.defaultView;
|
|
1537
|
+
let c;
|
|
1538
|
+
if (o === "parent" ? c = a.parentNode : c = a.getRootNode().querySelector(o), !(c instanceof p.HTMLElement))
|
|
1539
|
+
throw new Error('Bounds selector "' + o + '" could not find an element.');
|
|
1540
|
+
const d = c, m = p.getComputedStyle(a), g = p.getComputedStyle(d);
|
|
1541
|
+
o = {
|
|
1542
|
+
left: -a.offsetLeft + (0, ue.int)(g.paddingLeft) + (0, ue.int)(m.marginLeft),
|
|
1543
|
+
top: -a.offsetTop + (0, ue.int)(g.paddingTop) + (0, ue.int)(m.marginTop),
|
|
1544
|
+
right: (0, je.innerWidth)(d) - (0, je.outerWidth)(a) - a.offsetLeft + (0, ue.int)(g.paddingRight) - (0, ue.int)(m.marginRight),
|
|
1545
|
+
bottom: (0, je.innerHeight)(d) - (0, je.outerHeight)(a) - a.offsetTop + (0, ue.int)(g.paddingBottom) - (0, ue.int)(m.marginBottom)
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
return (0, ue.isNum)(o.right) && (t = Math.min(t, o.right)), (0, ue.isNum)(o.bottom) && (r = Math.min(r, o.bottom)), (0, ue.isNum)(o.left) && (t = Math.max(t, o.left)), (0, ue.isNum)(o.top) && (r = Math.max(r, o.top)), [t, r];
|
|
1549
|
+
}
|
|
1550
|
+
function an(e, t, r) {
|
|
1551
|
+
const o = Math.round(t / e[0]) * e[0], a = Math.round(r / e[1]) * e[1];
|
|
1552
|
+
return [o, a];
|
|
1553
|
+
}
|
|
1554
|
+
function sn(e) {
|
|
1555
|
+
return e.props.axis === "both" || e.props.axis === "x";
|
|
1556
|
+
}
|
|
1557
|
+
function ln(e) {
|
|
1558
|
+
return e.props.axis === "both" || e.props.axis === "y";
|
|
1559
|
+
}
|
|
1560
|
+
function un(e, t, r) {
|
|
1561
|
+
const o = typeof t == "number" ? (0, je.getTouch)(e, t) : null;
|
|
1562
|
+
if (typeof t == "number" && !o) return null;
|
|
1563
|
+
const a = ct(r), u = r.props.offsetParent || a.offsetParent || a.ownerDocument.body;
|
|
1564
|
+
return (0, je.offsetXYFromParent)(o || e, u, r.props.scale);
|
|
1565
|
+
}
|
|
1566
|
+
function cn(e, t, r) {
|
|
1567
|
+
const o = !(0, ue.isNum)(e.lastX), a = ct(e);
|
|
1568
|
+
return o ? {
|
|
1569
|
+
node: a,
|
|
1570
|
+
deltaX: 0,
|
|
1571
|
+
deltaY: 0,
|
|
1572
|
+
lastX: t,
|
|
1573
|
+
lastY: r,
|
|
1574
|
+
x: t,
|
|
1575
|
+
y: r
|
|
1576
|
+
} : {
|
|
1577
|
+
node: a,
|
|
1578
|
+
deltaX: t - e.lastX,
|
|
1579
|
+
deltaY: r - e.lastY,
|
|
1580
|
+
lastX: e.lastX,
|
|
1581
|
+
lastY: e.lastY,
|
|
1582
|
+
x: t,
|
|
1583
|
+
y: r
|
|
1584
|
+
};
|
|
1585
|
+
}
|
|
1586
|
+
function fn(e, t) {
|
|
1587
|
+
const r = e.props.scale;
|
|
1588
|
+
return {
|
|
1589
|
+
node: t.node,
|
|
1590
|
+
x: e.state.x + t.deltaX / r,
|
|
1591
|
+
y: e.state.y + t.deltaY / r,
|
|
1592
|
+
deltaX: t.deltaX / r,
|
|
1593
|
+
deltaY: t.deltaY / r,
|
|
1594
|
+
lastX: e.state.x,
|
|
1595
|
+
lastY: e.state.y
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1598
|
+
function dn(e) {
|
|
1599
|
+
return {
|
|
1600
|
+
left: e.left,
|
|
1601
|
+
top: e.top,
|
|
1602
|
+
right: e.right,
|
|
1603
|
+
bottom: e.bottom
|
|
1604
|
+
};
|
|
1605
|
+
}
|
|
1606
|
+
function ct(e) {
|
|
1607
|
+
const t = e.findDOMNode();
|
|
1608
|
+
if (!t)
|
|
1609
|
+
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1610
|
+
return t;
|
|
1611
|
+
}
|
|
1612
|
+
var We = {}, Le = {};
|
|
1613
|
+
Object.defineProperty(Le, "__esModule", {
|
|
1614
|
+
value: !0
|
|
1615
|
+
});
|
|
1616
|
+
Le.default = pn;
|
|
1617
|
+
function pn() {
|
|
1618
|
+
}
|
|
1619
|
+
Object.defineProperty(We, "__esModule", {
|
|
1620
|
+
value: !0
|
|
1621
|
+
});
|
|
1622
|
+
We.default = void 0;
|
|
1623
|
+
var tt = tr(Ie), ae = ft(Ht), hn = ft(Xt), re = V, xe = ye, rt = ge, Me = ft(Le);
|
|
1624
|
+
function ft(e) {
|
|
1625
|
+
return e && e.__esModule ? e : { default: e };
|
|
1626
|
+
}
|
|
1627
|
+
function tr(e, t) {
|
|
1628
|
+
if (typeof WeakMap == "function") var r = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap();
|
|
1629
|
+
return (tr = function(a, u) {
|
|
1630
|
+
if (!u && a && a.__esModule) return a;
|
|
1631
|
+
var p, c, d = { __proto__: null, default: a };
|
|
1632
|
+
if (a === null || typeof a != "object" && typeof a != "function") return d;
|
|
1633
|
+
if (p = u ? o : r) {
|
|
1634
|
+
if (p.has(a)) return p.get(a);
|
|
1635
|
+
p.set(a, d);
|
|
1636
|
+
}
|
|
1637
|
+
for (const m in a) m !== "default" && {}.hasOwnProperty.call(a, m) && ((c = (p = Object.defineProperty) && Object.getOwnPropertyDescriptor(a, m)) && (c.get || c.set) ? p(d, m, c) : d[m] = a[m]);
|
|
1638
|
+
return d;
|
|
1639
|
+
})(e, t);
|
|
1640
|
+
}
|
|
1641
|
+
function ie(e, t, r) {
|
|
1642
|
+
return (t = vn(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1643
|
+
}
|
|
1644
|
+
function vn(e) {
|
|
1645
|
+
var t = gn(e, "string");
|
|
1646
|
+
return typeof t == "symbol" ? t : t + "";
|
|
1647
|
+
}
|
|
1648
|
+
function gn(e, t) {
|
|
1649
|
+
if (typeof e != "object" || !e) return e;
|
|
1650
|
+
var r = e[Symbol.toPrimitive];
|
|
1651
|
+
if (r !== void 0) {
|
|
1652
|
+
var o = r.call(e, t);
|
|
1653
|
+
if (typeof o != "object") return o;
|
|
1654
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1655
|
+
}
|
|
1656
|
+
return (t === "string" ? String : Number)(e);
|
|
1657
|
+
}
|
|
1658
|
+
const pe = {
|
|
1659
|
+
touch: {
|
|
1660
|
+
start: "touchstart",
|
|
1661
|
+
move: "touchmove",
|
|
1662
|
+
stop: "touchend"
|
|
1663
|
+
},
|
|
1664
|
+
mouse: {
|
|
1665
|
+
start: "mousedown",
|
|
1666
|
+
move: "mousemove",
|
|
1667
|
+
stop: "mouseup"
|
|
1668
|
+
}
|
|
1669
|
+
};
|
|
1670
|
+
let Ee = pe.mouse, Ue = class extends tt.Component {
|
|
1671
|
+
constructor() {
|
|
1672
|
+
super(...arguments), ie(this, "dragging", !1), ie(this, "lastX", NaN), ie(this, "lastY", NaN), ie(this, "touchIdentifier", null), ie(this, "mounted", !1), ie(this, "handleDragStart", (t) => {
|
|
1673
|
+
if (this.props.onMouseDown(t), !this.props.allowAnyClick && typeof t.button == "number" && t.button !== 0) return !1;
|
|
1674
|
+
const r = this.findDOMNode();
|
|
1675
|
+
if (!r || !r.ownerDocument || !r.ownerDocument.body)
|
|
1676
|
+
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
1677
|
+
const {
|
|
1678
|
+
ownerDocument: o
|
|
1679
|
+
} = r;
|
|
1680
|
+
if (this.props.disabled || !(t.target instanceof o.defaultView.Node) || this.props.handle && !(0, re.matchesSelectorAndParentsTo)(t.target, this.props.handle, r) || this.props.cancel && (0, re.matchesSelectorAndParentsTo)(t.target, this.props.cancel, r))
|
|
1681
|
+
return;
|
|
1682
|
+
t.type === "touchstart" && !this.props.allowMobileScroll && t.preventDefault();
|
|
1683
|
+
const a = (0, re.getTouchIdentifier)(t);
|
|
1684
|
+
this.touchIdentifier = a;
|
|
1685
|
+
const u = (0, xe.getControlPosition)(t, a, this);
|
|
1686
|
+
if (u == null) return;
|
|
1687
|
+
const {
|
|
1688
|
+
x: p,
|
|
1689
|
+
y: c
|
|
1690
|
+
} = u, d = (0, xe.createCoreData)(this, p, c);
|
|
1691
|
+
(0, Me.default)("DraggableCore: handleDragStart: %j", d), (0, Me.default)("calling", this.props.onStart), !(this.props.onStart(t, d) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, re.addUserSelectStyles)(o), this.dragging = !0, this.lastX = p, this.lastY = c, (0, re.addEvent)(o, Ee.move, this.handleDrag), (0, re.addEvent)(o, Ee.stop, this.handleDragStop));
|
|
1692
|
+
}), ie(this, "handleDrag", (t) => {
|
|
1693
|
+
const r = (0, xe.getControlPosition)(t, this.touchIdentifier, this);
|
|
1694
|
+
if (r == null) return;
|
|
1695
|
+
let {
|
|
1696
|
+
x: o,
|
|
1697
|
+
y: a
|
|
1698
|
+
} = r;
|
|
1699
|
+
if (Array.isArray(this.props.grid)) {
|
|
1700
|
+
let c = o - this.lastX, d = a - this.lastY;
|
|
1701
|
+
if ([c, d] = (0, xe.snapToGrid)(this.props.grid, c, d), !c && !d) return;
|
|
1702
|
+
o = this.lastX + c, a = this.lastY + d;
|
|
1703
|
+
}
|
|
1704
|
+
const u = (0, xe.createCoreData)(this, o, a);
|
|
1705
|
+
if ((0, Me.default)("DraggableCore: handleDrag: %j", u), this.props.onDrag(t, u) === !1 || this.mounted === !1) {
|
|
1706
|
+
try {
|
|
1707
|
+
this.handleDragStop(new MouseEvent("mouseup"));
|
|
1708
|
+
} catch {
|
|
1709
|
+
const d = document.createEvent("MouseEvents");
|
|
1710
|
+
d.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(d);
|
|
1711
|
+
}
|
|
1712
|
+
return;
|
|
1713
|
+
}
|
|
1714
|
+
this.lastX = o, this.lastY = a;
|
|
1715
|
+
}), ie(this, "handleDragStop", (t) => {
|
|
1716
|
+
if (!this.dragging) return;
|
|
1717
|
+
const r = (0, xe.getControlPosition)(t, this.touchIdentifier, this);
|
|
1718
|
+
if (r == null) return;
|
|
1719
|
+
let {
|
|
1720
|
+
x: o,
|
|
1721
|
+
y: a
|
|
1722
|
+
} = r;
|
|
1723
|
+
if (Array.isArray(this.props.grid)) {
|
|
1724
|
+
let d = o - this.lastX || 0, m = a - this.lastY || 0;
|
|
1725
|
+
[d, m] = (0, xe.snapToGrid)(this.props.grid, d, m), o = this.lastX + d, a = this.lastY + m;
|
|
1726
|
+
}
|
|
1727
|
+
const u = (0, xe.createCoreData)(this, o, a);
|
|
1728
|
+
if (this.props.onStop(t, u) === !1 || this.mounted === !1) return !1;
|
|
1729
|
+
const c = this.findDOMNode();
|
|
1730
|
+
c && this.props.enableUserSelectHack && (0, re.scheduleRemoveUserSelectStyles)(c.ownerDocument), (0, Me.default)("DraggableCore: handleDragStop: %j", u), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, c && ((0, Me.default)("DraggableCore: Removing handlers"), (0, re.removeEvent)(c.ownerDocument, Ee.move, this.handleDrag), (0, re.removeEvent)(c.ownerDocument, Ee.stop, this.handleDragStop));
|
|
1731
|
+
}), ie(this, "onMouseDown", (t) => (Ee = pe.mouse, this.handleDragStart(t))), ie(this, "onMouseUp", (t) => (Ee = pe.mouse, this.handleDragStop(t))), ie(this, "onTouchStart", (t) => (Ee = pe.touch, this.handleDragStart(t))), ie(this, "onTouchEnd", (t) => (Ee = pe.touch, this.handleDragStop(t)));
|
|
1732
|
+
}
|
|
1733
|
+
componentDidMount() {
|
|
1734
|
+
this.mounted = !0;
|
|
1735
|
+
const t = this.findDOMNode();
|
|
1736
|
+
t && (0, re.addEvent)(t, pe.touch.start, this.onTouchStart, {
|
|
1737
|
+
passive: !1
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
componentWillUnmount() {
|
|
1741
|
+
this.mounted = !1;
|
|
1742
|
+
const t = this.findDOMNode();
|
|
1743
|
+
if (t) {
|
|
1744
|
+
const {
|
|
1745
|
+
ownerDocument: r
|
|
1746
|
+
} = t;
|
|
1747
|
+
(0, re.removeEvent)(r, pe.mouse.move, this.handleDrag), (0, re.removeEvent)(r, pe.touch.move, this.handleDrag), (0, re.removeEvent)(r, pe.mouse.stop, this.handleDragStop), (0, re.removeEvent)(r, pe.touch.stop, this.handleDragStop), (0, re.removeEvent)(t, pe.touch.start, this.onTouchStart, {
|
|
1748
|
+
passive: !1
|
|
1749
|
+
}), this.props.enableUserSelectHack && (0, re.scheduleRemoveUserSelectStyles)(r);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
1753
|
+
// the underlying DOM node ourselves. See the README for more information.
|
|
1754
|
+
findDOMNode() {
|
|
1755
|
+
var t, r, o;
|
|
1756
|
+
return (t = this.props) != null && t.nodeRef ? (o = (r = this.props) == null ? void 0 : r.nodeRef) == null ? void 0 : o.current : hn.default.findDOMNode(this);
|
|
1757
|
+
}
|
|
1758
|
+
render() {
|
|
1759
|
+
return /* @__PURE__ */ tt.cloneElement(tt.Children.only(this.props.children), {
|
|
1760
|
+
// Note: mouseMove handler is attached to document so it will still function
|
|
1761
|
+
// when the user drags quickly and leaves the bounds of the element.
|
|
1762
|
+
onMouseDown: this.onMouseDown,
|
|
1763
|
+
onMouseUp: this.onMouseUp,
|
|
1764
|
+
// onTouchStart is added on `componentDidMount` so they can be added with
|
|
1765
|
+
// {passive: false}, which allows it to cancel. See
|
|
1766
|
+
// https://developers.google.com/web/updates/2017/01/scrolling-intervention
|
|
1767
|
+
onTouchEnd: this.onTouchEnd
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
};
|
|
1771
|
+
We.default = Ue;
|
|
1772
|
+
ie(Ue, "displayName", "DraggableCore");
|
|
1773
|
+
ie(Ue, "propTypes", {
|
|
1774
|
+
/**
|
|
1775
|
+
* `allowAnyClick` allows dragging using any mouse button.
|
|
1776
|
+
* By default, we only accept the left button.
|
|
1777
|
+
*
|
|
1778
|
+
* Defaults to `false`.
|
|
1779
|
+
*/
|
|
1780
|
+
allowAnyClick: ae.default.bool,
|
|
1781
|
+
/**
|
|
1782
|
+
* `allowMobileScroll` turns off cancellation of the 'touchstart' event
|
|
1783
|
+
* on mobile devices. Only enable this if you are having trouble with click
|
|
1784
|
+
* events. Prefer using 'handle' / 'cancel' instead.
|
|
1785
|
+
*
|
|
1786
|
+
* Defaults to `false`.
|
|
1787
|
+
*/
|
|
1788
|
+
allowMobileScroll: ae.default.bool,
|
|
1789
|
+
children: ae.default.node.isRequired,
|
|
1790
|
+
/**
|
|
1791
|
+
* `disabled`, if true, stops the <Draggable> from dragging. All handlers,
|
|
1792
|
+
* with the exception of `onMouseDown`, will not fire.
|
|
1793
|
+
*/
|
|
1794
|
+
disabled: ae.default.bool,
|
|
1795
|
+
/**
|
|
1796
|
+
* By default, we add 'user-select:none' attributes to the document body
|
|
1797
|
+
* to prevent ugly text selection during drag. If this is causing problems
|
|
1798
|
+
* for your app, set this to `false`.
|
|
1799
|
+
*/
|
|
1800
|
+
enableUserSelectHack: ae.default.bool,
|
|
1801
|
+
/**
|
|
1802
|
+
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
1803
|
+
* instead of using the parent node.
|
|
1804
|
+
*/
|
|
1805
|
+
offsetParent: function(e, t) {
|
|
1806
|
+
if (e[t] && e[t].nodeType !== 1)
|
|
1807
|
+
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
1808
|
+
},
|
|
1809
|
+
/**
|
|
1810
|
+
* `grid` specifies the x and y that dragging should snap to.
|
|
1811
|
+
*/
|
|
1812
|
+
grid: ae.default.arrayOf(ae.default.number),
|
|
1813
|
+
/**
|
|
1814
|
+
* `handle` specifies a selector to be used as the handle that initiates drag.
|
|
1815
|
+
*
|
|
1816
|
+
* Example:
|
|
1817
|
+
*
|
|
1818
|
+
* ```jsx
|
|
1819
|
+
* let App = React.createClass({
|
|
1820
|
+
* render: function () {
|
|
1821
|
+
* return (
|
|
1822
|
+
* <Draggable handle=".handle">
|
|
1823
|
+
* <div>
|
|
1824
|
+
* <div className="handle">Click me to drag</div>
|
|
1825
|
+
* <div>This is some other content</div>
|
|
1826
|
+
* </div>
|
|
1827
|
+
* </Draggable>
|
|
1828
|
+
* );
|
|
1829
|
+
* }
|
|
1830
|
+
* });
|
|
1831
|
+
* ```
|
|
1832
|
+
*/
|
|
1833
|
+
handle: ae.default.string,
|
|
1834
|
+
/**
|
|
1835
|
+
* `cancel` specifies a selector to be used to prevent drag initialization.
|
|
1836
|
+
*
|
|
1837
|
+
* Example:
|
|
1838
|
+
*
|
|
1839
|
+
* ```jsx
|
|
1840
|
+
* let App = React.createClass({
|
|
1841
|
+
* render: function () {
|
|
1842
|
+
* return(
|
|
1843
|
+
* <Draggable cancel=".cancel">
|
|
1844
|
+
* <div>
|
|
1845
|
+
* <div className="cancel">You can't drag from here</div>
|
|
1846
|
+
* <div>Dragging here works fine</div>
|
|
1847
|
+
* </div>
|
|
1848
|
+
* </Draggable>
|
|
1849
|
+
* );
|
|
1850
|
+
* }
|
|
1851
|
+
* });
|
|
1852
|
+
* ```
|
|
1853
|
+
*/
|
|
1854
|
+
cancel: ae.default.string,
|
|
1855
|
+
/* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
|
|
1856
|
+
* Unfortunately, in order for <Draggable> to work properly, we need raw access
|
|
1857
|
+
* to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
|
|
1858
|
+
* as in this example:
|
|
1859
|
+
*
|
|
1860
|
+
* function MyComponent() {
|
|
1861
|
+
* const nodeRef = React.useRef(null);
|
|
1862
|
+
* return (
|
|
1863
|
+
* <Draggable nodeRef={nodeRef}>
|
|
1864
|
+
* <div ref={nodeRef}>Example Target</div>
|
|
1865
|
+
* </Draggable>
|
|
1866
|
+
* );
|
|
1867
|
+
* }
|
|
1868
|
+
*
|
|
1869
|
+
* This can be used for arbitrarily nested components, so long as the ref ends up
|
|
1870
|
+
* pointing to the actual child DOM node and not a custom component.
|
|
1871
|
+
*/
|
|
1872
|
+
nodeRef: ae.default.object,
|
|
1873
|
+
/**
|
|
1874
|
+
* Called when dragging starts.
|
|
1875
|
+
* If this function returns the boolean false, dragging will be canceled.
|
|
1876
|
+
*/
|
|
1877
|
+
onStart: ae.default.func,
|
|
1878
|
+
/**
|
|
1879
|
+
* Called while dragging.
|
|
1880
|
+
* If this function returns the boolean false, dragging will be canceled.
|
|
1881
|
+
*/
|
|
1882
|
+
onDrag: ae.default.func,
|
|
1883
|
+
/**
|
|
1884
|
+
* Called when dragging stops.
|
|
1885
|
+
* If this function returns the boolean false, the drag will remain active.
|
|
1886
|
+
*/
|
|
1887
|
+
onStop: ae.default.func,
|
|
1888
|
+
/**
|
|
1889
|
+
* A workaround option which can be passed if onMouseDown needs to be accessed,
|
|
1890
|
+
* since it'll always be blocked (as there is internal use of onMouseDown)
|
|
1891
|
+
*/
|
|
1892
|
+
onMouseDown: ae.default.func,
|
|
1893
|
+
/**
|
|
1894
|
+
* `scale`, if set, applies scaling while dragging an element
|
|
1895
|
+
*/
|
|
1896
|
+
scale: ae.default.number,
|
|
1897
|
+
/**
|
|
1898
|
+
* These properties should be defined on the child, not here.
|
|
1899
|
+
*/
|
|
1900
|
+
className: rt.dontSetMe,
|
|
1901
|
+
style: rt.dontSetMe,
|
|
1902
|
+
transform: rt.dontSetMe
|
|
1903
|
+
});
|
|
1904
|
+
ie(Ue, "defaultProps", {
|
|
1905
|
+
allowAnyClick: !1,
|
|
1906
|
+
// by default only accept left click
|
|
1907
|
+
allowMobileScroll: !1,
|
|
1908
|
+
disabled: !1,
|
|
1909
|
+
enableUserSelectHack: !0,
|
|
1910
|
+
onStart: function() {
|
|
1911
|
+
},
|
|
1912
|
+
onDrag: function() {
|
|
1913
|
+
},
|
|
1914
|
+
onStop: function() {
|
|
1915
|
+
},
|
|
1916
|
+
onMouseDown: function() {
|
|
1917
|
+
},
|
|
1918
|
+
scale: 1
|
|
1919
|
+
});
|
|
1920
|
+
(function(e) {
|
|
1921
|
+
Object.defineProperty(e, "__esModule", {
|
|
1922
|
+
value: !0
|
|
1923
|
+
}), Object.defineProperty(e, "DraggableCore", {
|
|
1924
|
+
enumerable: !0,
|
|
1925
|
+
get: function() {
|
|
1926
|
+
return d.default;
|
|
1927
|
+
}
|
|
1928
|
+
}), e.default = void 0;
|
|
1929
|
+
var t = T(Ie), r = g(Ht), o = g(Xt), a = $r, u = V, p = ye, c = ge, d = g(We), m = g(Le);
|
|
1930
|
+
function g(x) {
|
|
1931
|
+
return x && x.__esModule ? x : { default: x };
|
|
1932
|
+
}
|
|
1933
|
+
function T(x, b) {
|
|
1934
|
+
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap();
|
|
1935
|
+
return (T = function(i, k) {
|
|
1936
|
+
if (!k && i && i.__esModule) return i;
|
|
1937
|
+
var Z, Q, G = { __proto__: null, default: i };
|
|
1938
|
+
if (i === null || typeof i != "object" && typeof i != "function") return G;
|
|
1939
|
+
if (Z = k ? S : C) {
|
|
1940
|
+
if (Z.has(i)) return Z.get(i);
|
|
1941
|
+
Z.set(i, G);
|
|
1942
|
+
}
|
|
1943
|
+
for (const J in i) J !== "default" && {}.hasOwnProperty.call(i, J) && ((Q = (Z = Object.defineProperty) && Object.getOwnPropertyDescriptor(i, J)) && (Q.get || Q.set) ? Z(G, J, Q) : G[J] = i[J]);
|
|
1944
|
+
return G;
|
|
1945
|
+
})(x, b);
|
|
1946
|
+
}
|
|
1947
|
+
function A() {
|
|
1948
|
+
return A = Object.assign ? Object.assign.bind() : function(x) {
|
|
1949
|
+
for (var b = 1; b < arguments.length; b++) {
|
|
1950
|
+
var C = arguments[b];
|
|
1951
|
+
for (var S in C) ({}).hasOwnProperty.call(C, S) && (x[S] = C[S]);
|
|
1952
|
+
}
|
|
1953
|
+
return x;
|
|
1954
|
+
}, A.apply(null, arguments);
|
|
1955
|
+
}
|
|
1956
|
+
function Y(x, b, C) {
|
|
1957
|
+
return (b = q(b)) in x ? Object.defineProperty(x, b, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : x[b] = C, x;
|
|
1958
|
+
}
|
|
1959
|
+
function q(x) {
|
|
1960
|
+
var b = X(x, "string");
|
|
1961
|
+
return typeof b == "symbol" ? b : b + "";
|
|
1962
|
+
}
|
|
1963
|
+
function X(x, b) {
|
|
1964
|
+
if (typeof x != "object" || !x) return x;
|
|
1965
|
+
var C = x[Symbol.toPrimitive];
|
|
1966
|
+
if (C !== void 0) {
|
|
1967
|
+
var S = C.call(x, b);
|
|
1968
|
+
if (typeof S != "object") return S;
|
|
1969
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1970
|
+
}
|
|
1971
|
+
return (b === "string" ? String : Number)(x);
|
|
1972
|
+
}
|
|
1973
|
+
class _ extends t.Component {
|
|
1974
|
+
// React 16.3+
|
|
1975
|
+
// Arity (props, state)
|
|
1976
|
+
static getDerivedStateFromProps(b, C) {
|
|
1977
|
+
let {
|
|
1978
|
+
position: S
|
|
1979
|
+
} = b, {
|
|
1980
|
+
prevPropsPosition: i
|
|
1981
|
+
} = C;
|
|
1982
|
+
return S && (!i || S.x !== i.x || S.y !== i.y) ? ((0, m.default)("Draggable: getDerivedStateFromProps %j", {
|
|
1983
|
+
position: S,
|
|
1984
|
+
prevPropsPosition: i
|
|
1985
|
+
}), {
|
|
1986
|
+
x: S.x,
|
|
1987
|
+
y: S.y,
|
|
1988
|
+
prevPropsPosition: {
|
|
1989
|
+
...S
|
|
1990
|
+
}
|
|
1991
|
+
}) : null;
|
|
1992
|
+
}
|
|
1993
|
+
constructor(b) {
|
|
1994
|
+
super(b), Y(this, "onDragStart", (C, S) => {
|
|
1995
|
+
if ((0, m.default)("Draggable: onDragStart: %j", S), this.props.onStart(C, (0, p.createDraggableData)(this, S)) === !1) return !1;
|
|
1996
|
+
this.setState({
|
|
1997
|
+
dragging: !0,
|
|
1998
|
+
dragged: !0
|
|
1999
|
+
});
|
|
2000
|
+
}), Y(this, "onDrag", (C, S) => {
|
|
2001
|
+
if (!this.state.dragging) return !1;
|
|
2002
|
+
(0, m.default)("Draggable: onDrag: %j", S);
|
|
2003
|
+
const i = (0, p.createDraggableData)(this, S), k = {
|
|
2004
|
+
x: i.x,
|
|
2005
|
+
y: i.y,
|
|
2006
|
+
slackX: 0,
|
|
2007
|
+
slackY: 0
|
|
2008
|
+
};
|
|
2009
|
+
if (this.props.bounds) {
|
|
2010
|
+
const {
|
|
2011
|
+
x: Q,
|
|
2012
|
+
y: G
|
|
2013
|
+
} = k;
|
|
2014
|
+
k.x += this.state.slackX, k.y += this.state.slackY;
|
|
2015
|
+
const [J, me] = (0, p.getBoundPosition)(this, k.x, k.y);
|
|
2016
|
+
k.x = J, k.y = me, k.slackX = this.state.slackX + (Q - k.x), k.slackY = this.state.slackY + (G - k.y), i.x = k.x, i.y = k.y, i.deltaX = k.x - this.state.x, i.deltaY = k.y - this.state.y;
|
|
2017
|
+
}
|
|
2018
|
+
if (this.props.onDrag(C, i) === !1) return !1;
|
|
2019
|
+
this.setState(k);
|
|
2020
|
+
}), Y(this, "onDragStop", (C, S) => {
|
|
2021
|
+
if (!this.state.dragging || this.props.onStop(C, (0, p.createDraggableData)(this, S)) === !1) return !1;
|
|
2022
|
+
(0, m.default)("Draggable: onDragStop: %j", S);
|
|
2023
|
+
const k = {
|
|
2024
|
+
dragging: !1,
|
|
2025
|
+
slackX: 0,
|
|
2026
|
+
slackY: 0
|
|
2027
|
+
};
|
|
2028
|
+
if (!!this.props.position) {
|
|
2029
|
+
const {
|
|
2030
|
+
x: Q,
|
|
2031
|
+
y: G
|
|
2032
|
+
} = this.props.position;
|
|
2033
|
+
k.x = Q, k.y = G;
|
|
2034
|
+
}
|
|
2035
|
+
this.setState(k);
|
|
2036
|
+
}), this.state = {
|
|
2037
|
+
// Whether or not we are currently dragging.
|
|
2038
|
+
dragging: !1,
|
|
2039
|
+
// Whether or not we have been dragged before.
|
|
2040
|
+
dragged: !1,
|
|
2041
|
+
// Current transform x and y.
|
|
2042
|
+
x: b.position ? b.position.x : b.defaultPosition.x,
|
|
2043
|
+
y: b.position ? b.position.y : b.defaultPosition.y,
|
|
2044
|
+
prevPropsPosition: {
|
|
2045
|
+
...b.position
|
|
2046
|
+
},
|
|
2047
|
+
// Used for compensating for out-of-bounds drags
|
|
2048
|
+
slackX: 0,
|
|
2049
|
+
slackY: 0,
|
|
2050
|
+
// Can only determine if SVG after mounting
|
|
2051
|
+
isElementSVG: !1
|
|
2052
|
+
}, b.position && !(b.onDrag || b.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
|
|
2053
|
+
}
|
|
2054
|
+
componentDidMount() {
|
|
2055
|
+
typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
|
|
2056
|
+
isElementSVG: !0
|
|
2057
|
+
});
|
|
2058
|
+
}
|
|
2059
|
+
componentWillUnmount() {
|
|
2060
|
+
this.state.dragging && this.setState({
|
|
2061
|
+
dragging: !1
|
|
2062
|
+
});
|
|
2063
|
+
}
|
|
2064
|
+
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
2065
|
+
// the underlying DOM node ourselves. See the README for more information.
|
|
2066
|
+
findDOMNode() {
|
|
2067
|
+
var b, C;
|
|
2068
|
+
return ((C = (b = this.props) == null ? void 0 : b.nodeRef) == null ? void 0 : C.current) ?? o.default.findDOMNode(this);
|
|
2069
|
+
}
|
|
2070
|
+
render() {
|
|
2071
|
+
const {
|
|
2072
|
+
axis: b,
|
|
2073
|
+
bounds: C,
|
|
2074
|
+
children: S,
|
|
2075
|
+
defaultPosition: i,
|
|
2076
|
+
defaultClassName: k,
|
|
2077
|
+
defaultClassNameDragging: Z,
|
|
2078
|
+
defaultClassNameDragged: Q,
|
|
2079
|
+
position: G,
|
|
2080
|
+
positionOffset: J,
|
|
2081
|
+
scale: me,
|
|
2082
|
+
...be
|
|
2083
|
+
} = this.props;
|
|
2084
|
+
let ne = {}, K = null;
|
|
2085
|
+
const ee = !!!G || this.state.dragging, le = G || i, ve = {
|
|
2086
|
+
// Set left if horizontal drag is enabled
|
|
2087
|
+
x: (0, p.canDragX)(this) && ee ? this.state.x : le.x,
|
|
2088
|
+
// Set top if vertical drag is enabled
|
|
2089
|
+
y: (0, p.canDragY)(this) && ee ? this.state.y : le.y
|
|
2090
|
+
};
|
|
2091
|
+
this.state.isElementSVG ? K = (0, u.createSVGTransform)(ve, J) : ne = (0, u.createCSSTransform)(ve, J);
|
|
2092
|
+
const Se = (0, a.clsx)(S.props.className || "", k, {
|
|
2093
|
+
[Z]: this.state.dragging,
|
|
2094
|
+
[Q]: this.state.dragged
|
|
2095
|
+
});
|
|
2096
|
+
return /* @__PURE__ */ t.createElement(d.default, A({}, be, {
|
|
2097
|
+
onStart: this.onDragStart,
|
|
2098
|
+
onDrag: this.onDrag,
|
|
2099
|
+
onStop: this.onDragStop
|
|
2100
|
+
}), /* @__PURE__ */ t.cloneElement(t.Children.only(S), {
|
|
2101
|
+
className: Se,
|
|
2102
|
+
style: {
|
|
2103
|
+
...S.props.style,
|
|
2104
|
+
...ne
|
|
2105
|
+
},
|
|
2106
|
+
transform: K
|
|
2107
|
+
}));
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
e.default = _, Y(_, "displayName", "Draggable"), Y(_, "propTypes", {
|
|
2111
|
+
// Accepts all props <DraggableCore> accepts.
|
|
2112
|
+
...d.default.propTypes,
|
|
2113
|
+
/**
|
|
2114
|
+
* `axis` determines which axis the draggable can move.
|
|
2115
|
+
*
|
|
2116
|
+
* Note that all callbacks will still return data as normal. This only
|
|
2117
|
+
* controls flushing to the DOM.
|
|
2118
|
+
*
|
|
2119
|
+
* 'both' allows movement horizontally and vertically.
|
|
2120
|
+
* 'x' limits movement to horizontal axis.
|
|
2121
|
+
* 'y' limits movement to vertical axis.
|
|
2122
|
+
* 'none' limits all movement.
|
|
2123
|
+
*
|
|
2124
|
+
* Defaults to 'both'.
|
|
2125
|
+
*/
|
|
2126
|
+
axis: r.default.oneOf(["both", "x", "y", "none"]),
|
|
2127
|
+
/**
|
|
2128
|
+
* `bounds` determines the range of movement available to the element.
|
|
2129
|
+
* Available values are:
|
|
2130
|
+
*
|
|
2131
|
+
* 'parent' restricts movement within the Draggable's parent node.
|
|
2132
|
+
*
|
|
2133
|
+
* Alternatively, pass an object with the following properties, all of which are optional:
|
|
2134
|
+
*
|
|
2135
|
+
* {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
|
|
2136
|
+
*
|
|
2137
|
+
* All values are in px.
|
|
2138
|
+
*
|
|
2139
|
+
* Example:
|
|
2140
|
+
*
|
|
2141
|
+
* ```jsx
|
|
2142
|
+
* let App = React.createClass({
|
|
2143
|
+
* render: function () {
|
|
2144
|
+
* return (
|
|
2145
|
+
* <Draggable bounds={{right: 300, bottom: 300}}>
|
|
2146
|
+
* <div>Content</div>
|
|
2147
|
+
* </Draggable>
|
|
2148
|
+
* );
|
|
2149
|
+
* }
|
|
2150
|
+
* });
|
|
2151
|
+
* ```
|
|
2152
|
+
*/
|
|
2153
|
+
bounds: r.default.oneOfType([r.default.shape({
|
|
2154
|
+
left: r.default.number,
|
|
2155
|
+
right: r.default.number,
|
|
2156
|
+
top: r.default.number,
|
|
2157
|
+
bottom: r.default.number
|
|
2158
|
+
}), r.default.string, r.default.oneOf([!1])]),
|
|
2159
|
+
defaultClassName: r.default.string,
|
|
2160
|
+
defaultClassNameDragging: r.default.string,
|
|
2161
|
+
defaultClassNameDragged: r.default.string,
|
|
2162
|
+
/**
|
|
2163
|
+
* `defaultPosition` specifies the x and y that the dragged item should start at
|
|
2164
|
+
*
|
|
2165
|
+
* Example:
|
|
2166
|
+
*
|
|
2167
|
+
* ```jsx
|
|
2168
|
+
* let App = React.createClass({
|
|
2169
|
+
* render: function () {
|
|
2170
|
+
* return (
|
|
2171
|
+
* <Draggable defaultPosition={{x: 25, y: 25}}>
|
|
2172
|
+
* <div>I start with transformX: 25px and transformY: 25px;</div>
|
|
2173
|
+
* </Draggable>
|
|
2174
|
+
* );
|
|
2175
|
+
* }
|
|
2176
|
+
* });
|
|
2177
|
+
* ```
|
|
2178
|
+
*/
|
|
2179
|
+
defaultPosition: r.default.shape({
|
|
2180
|
+
x: r.default.number,
|
|
2181
|
+
y: r.default.number
|
|
2182
|
+
}),
|
|
2183
|
+
positionOffset: r.default.shape({
|
|
2184
|
+
x: r.default.oneOfType([r.default.number, r.default.string]),
|
|
2185
|
+
y: r.default.oneOfType([r.default.number, r.default.string])
|
|
2186
|
+
}),
|
|
2187
|
+
/**
|
|
2188
|
+
* `position`, if present, defines the current position of the element.
|
|
2189
|
+
*
|
|
2190
|
+
* This is similar to how form elements in React work - if no `position` is supplied, the component
|
|
2191
|
+
* is uncontrolled.
|
|
2192
|
+
*
|
|
2193
|
+
* Example:
|
|
2194
|
+
*
|
|
2195
|
+
* ```jsx
|
|
2196
|
+
* let App = React.createClass({
|
|
2197
|
+
* render: function () {
|
|
2198
|
+
* return (
|
|
2199
|
+
* <Draggable position={{x: 25, y: 25}}>
|
|
2200
|
+
* <div>I start with transformX: 25px and transformY: 25px;</div>
|
|
2201
|
+
* </Draggable>
|
|
2202
|
+
* );
|
|
2203
|
+
* }
|
|
2204
|
+
* });
|
|
2205
|
+
* ```
|
|
2206
|
+
*/
|
|
2207
|
+
position: r.default.shape({
|
|
2208
|
+
x: r.default.number,
|
|
2209
|
+
y: r.default.number
|
|
2210
|
+
}),
|
|
2211
|
+
/**
|
|
2212
|
+
* These properties should be defined on the child, not here.
|
|
2213
|
+
*/
|
|
2214
|
+
className: c.dontSetMe,
|
|
2215
|
+
style: c.dontSetMe,
|
|
2216
|
+
transform: c.dontSetMe
|
|
2217
|
+
}), Y(_, "defaultProps", {
|
|
2218
|
+
...d.default.defaultProps,
|
|
2219
|
+
axis: "both",
|
|
2220
|
+
bounds: !1,
|
|
2221
|
+
defaultClassName: "react-draggable",
|
|
2222
|
+
defaultClassNameDragging: "react-draggable-dragging",
|
|
2223
|
+
defaultClassNameDragged: "react-draggable-dragged",
|
|
2224
|
+
defaultPosition: {
|
|
2225
|
+
x: 0,
|
|
2226
|
+
y: 0
|
|
2227
|
+
},
|
|
2228
|
+
scale: 1
|
|
2229
|
+
});
|
|
2230
|
+
})(qt);
|
|
2231
|
+
const {
|
|
2232
|
+
default: rr,
|
|
2233
|
+
DraggableCore: yn
|
|
2234
|
+
} = qt;
|
|
2235
|
+
Ye.exports = rr;
|
|
2236
|
+
Ye.exports.default = rr;
|
|
2237
|
+
Ye.exports.DraggableCore = yn;
|
|
2238
|
+
var mn = Ye.exports;
|
|
2239
|
+
const bn = /* @__PURE__ */ Cr(mn), Sn = ({
|
|
2240
|
+
title: e,
|
|
2241
|
+
collapsed: t = !1,
|
|
2242
|
+
draggable: r = !0,
|
|
2243
|
+
position: o = { x: 20, y: 20 },
|
|
2244
|
+
children: a
|
|
2245
|
+
}) => {
|
|
2246
|
+
const [u, p] = Ae(t);
|
|
2247
|
+
return /* @__PURE__ */ f.jsx(
|
|
2248
|
+
bn,
|
|
2249
|
+
{
|
|
2250
|
+
handle: ".font-controls-header",
|
|
2251
|
+
disabled: !r,
|
|
2252
|
+
defaultPosition: o,
|
|
2253
|
+
bounds: "parent",
|
|
2254
|
+
children: /* @__PURE__ */ f.jsxs("div", { className: "font-controls-panel", children: [
|
|
2255
|
+
/* @__PURE__ */ f.jsxs("div", { className: "font-controls-header", children: [
|
|
2256
|
+
/* @__PURE__ */ f.jsx("h3", { className: "font-controls-title", children: e }),
|
|
2257
|
+
/* @__PURE__ */ f.jsx(
|
|
2258
|
+
"button",
|
|
2259
|
+
{
|
|
2260
|
+
className: `font-controls-toggle ${u ? "collapsed" : ""}`,
|
|
2261
|
+
onClick: () => p(!u),
|
|
2262
|
+
type: "button",
|
|
2263
|
+
"aria-label": u ? "Expand" : "Collapse",
|
|
2264
|
+
children: /* @__PURE__ */ f.jsx(
|
|
2265
|
+
"svg",
|
|
2266
|
+
{
|
|
2267
|
+
viewBox: "0 0 24 24",
|
|
2268
|
+
fill: "none",
|
|
2269
|
+
stroke: "currentColor",
|
|
2270
|
+
strokeWidth: "2",
|
|
2271
|
+
strokeLinecap: "round",
|
|
2272
|
+
strokeLinejoin: "round",
|
|
2273
|
+
children: /* @__PURE__ */ f.jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
2274
|
+
}
|
|
2275
|
+
)
|
|
2276
|
+
}
|
|
2277
|
+
)
|
|
2278
|
+
] }),
|
|
2279
|
+
!u && /* @__PURE__ */ f.jsx("div", { className: "font-controls-content", children: a })
|
|
2280
|
+
] })
|
|
2281
|
+
}
|
|
2282
|
+
);
|
|
2283
|
+
}, xn = ({
|
|
2284
|
+
value: e,
|
|
2285
|
+
onChange: t,
|
|
2286
|
+
fontFamilies: r
|
|
2287
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: "font-control-group", children: [
|
|
2288
|
+
/* @__PURE__ */ f.jsx("label", { className: "font-control-label", children: "Font Family" }),
|
|
2289
|
+
/* @__PURE__ */ f.jsx(
|
|
2290
|
+
"select",
|
|
2291
|
+
{
|
|
2292
|
+
className: "font-control-input font-control-select",
|
|
2293
|
+
value: e,
|
|
2294
|
+
onChange: (o) => t(o.target.value),
|
|
2295
|
+
style: { fontFamily: e },
|
|
2296
|
+
children: r.map((o) => /* @__PURE__ */ f.jsx("option", { value: o, style: { fontFamily: o }, children: o }, o))
|
|
2297
|
+
}
|
|
2298
|
+
)
|
|
2299
|
+
] }), En = ({
|
|
2300
|
+
value: e,
|
|
2301
|
+
onChange: t,
|
|
2302
|
+
min: r,
|
|
2303
|
+
max: o,
|
|
2304
|
+
step: a
|
|
2305
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: "font-control-group", children: [
|
|
2306
|
+
/* @__PURE__ */ f.jsx("label", { className: "font-control-label", children: "Font Size" }),
|
|
2307
|
+
/* @__PURE__ */ f.jsxs("div", { className: "font-control-slider-container", children: [
|
|
2308
|
+
/* @__PURE__ */ f.jsx(
|
|
2309
|
+
"input",
|
|
2310
|
+
{
|
|
2311
|
+
type: "range",
|
|
2312
|
+
className: "font-control-slider",
|
|
2313
|
+
min: r,
|
|
2314
|
+
max: o,
|
|
2315
|
+
step: a,
|
|
2316
|
+
value: e,
|
|
2317
|
+
onChange: (u) => t(Number(u.target.value))
|
|
2318
|
+
}
|
|
2319
|
+
),
|
|
2320
|
+
/* @__PURE__ */ f.jsx(
|
|
2321
|
+
"input",
|
|
2322
|
+
{
|
|
2323
|
+
type: "number",
|
|
2324
|
+
className: "font-control-input font-control-number",
|
|
2325
|
+
min: r,
|
|
2326
|
+
max: o,
|
|
2327
|
+
step: a,
|
|
2328
|
+
value: e,
|
|
2329
|
+
onChange: (u) => t(Number(u.target.value))
|
|
2330
|
+
}
|
|
2331
|
+
)
|
|
2332
|
+
] })
|
|
2333
|
+
] }), Tn = [
|
|
2334
|
+
{ value: 100, label: "Thin" },
|
|
2335
|
+
{ value: 200, label: "Extra Light" },
|
|
2336
|
+
{ value: 300, label: "Light" },
|
|
2337
|
+
{ value: 400, label: "Regular" },
|
|
2338
|
+
{ value: 500, label: "Medium" },
|
|
2339
|
+
{ value: 600, label: "Semi Bold" },
|
|
2340
|
+
{ value: 700, label: "Bold" },
|
|
2341
|
+
{ value: 800, label: "Extra Bold" },
|
|
2342
|
+
{ value: 900, label: "Black" }
|
|
2343
|
+
], _n = ({
|
|
2344
|
+
value: e,
|
|
2345
|
+
onChange: t
|
|
2346
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: "font-control-group", children: [
|
|
2347
|
+
/* @__PURE__ */ f.jsx("label", { className: "font-control-label", children: "Font Weight" }),
|
|
2348
|
+
/* @__PURE__ */ f.jsx(
|
|
2349
|
+
"select",
|
|
2350
|
+
{
|
|
2351
|
+
className: "font-control-input font-control-select",
|
|
2352
|
+
value: e,
|
|
2353
|
+
onChange: (r) => t(Number(r.target.value)),
|
|
2354
|
+
children: Tn.map((r) => /* @__PURE__ */ f.jsxs("option", { value: r.value, children: [
|
|
2355
|
+
r.label,
|
|
2356
|
+
" (",
|
|
2357
|
+
r.value,
|
|
2358
|
+
")"
|
|
2359
|
+
] }, r.value))
|
|
2360
|
+
}
|
|
2361
|
+
)
|
|
2362
|
+
] }), Cn = ({
|
|
2363
|
+
value: e,
|
|
2364
|
+
onChange: t
|
|
2365
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: "font-control-group", children: [
|
|
2366
|
+
/* @__PURE__ */ f.jsx("label", { className: "font-control-label", children: "Line Height" }),
|
|
2367
|
+
/* @__PURE__ */ f.jsxs("div", { className: "font-control-slider-container", children: [
|
|
2368
|
+
/* @__PURE__ */ f.jsx(
|
|
2369
|
+
"input",
|
|
2370
|
+
{
|
|
2371
|
+
type: "range",
|
|
2372
|
+
className: "font-control-slider",
|
|
2373
|
+
min: 0.5,
|
|
2374
|
+
max: 3,
|
|
2375
|
+
step: 0.1,
|
|
2376
|
+
value: e,
|
|
2377
|
+
onChange: (r) => t(Number(r.target.value))
|
|
2378
|
+
}
|
|
2379
|
+
),
|
|
2380
|
+
/* @__PURE__ */ f.jsx(
|
|
2381
|
+
"input",
|
|
2382
|
+
{
|
|
2383
|
+
type: "number",
|
|
2384
|
+
className: "font-control-input font-control-number",
|
|
2385
|
+
min: 0.5,
|
|
2386
|
+
max: 3,
|
|
2387
|
+
step: 0.1,
|
|
2388
|
+
value: e,
|
|
2389
|
+
onChange: (r) => t(Number(r.target.value))
|
|
2390
|
+
}
|
|
2391
|
+
)
|
|
2392
|
+
] })
|
|
2393
|
+
] }), wn = ({
|
|
2394
|
+
value: e,
|
|
2395
|
+
onChange: t
|
|
2396
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: "font-control-group", children: [
|
|
2397
|
+
/* @__PURE__ */ f.jsx("label", { className: "font-control-label", children: "Letter Spacing" }),
|
|
2398
|
+
/* @__PURE__ */ f.jsxs("div", { className: "font-control-slider-container", children: [
|
|
2399
|
+
/* @__PURE__ */ f.jsx(
|
|
2400
|
+
"input",
|
|
2401
|
+
{
|
|
2402
|
+
type: "range",
|
|
2403
|
+
className: "font-control-slider",
|
|
2404
|
+
min: -5,
|
|
2405
|
+
max: 10,
|
|
2406
|
+
step: 0.1,
|
|
2407
|
+
value: e,
|
|
2408
|
+
onChange: (r) => t(Number(r.target.value))
|
|
2409
|
+
}
|
|
2410
|
+
),
|
|
2411
|
+
/* @__PURE__ */ f.jsx(
|
|
2412
|
+
"input",
|
|
2413
|
+
{
|
|
2414
|
+
type: "number",
|
|
2415
|
+
className: "font-control-input font-control-number",
|
|
2416
|
+
min: -5,
|
|
2417
|
+
max: 10,
|
|
2418
|
+
step: 0.1,
|
|
2419
|
+
value: e,
|
|
2420
|
+
onChange: (r) => t(Number(r.target.value))
|
|
2421
|
+
}
|
|
2422
|
+
)
|
|
2423
|
+
] })
|
|
2424
|
+
] }), Pn = [
|
|
2425
|
+
{ value: "none", label: "None" },
|
|
2426
|
+
{ value: "uppercase", label: "UPPERCASE" },
|
|
2427
|
+
{ value: "lowercase", label: "lowercase" },
|
|
2428
|
+
{ value: "capitalize", label: "Capitalize" }
|
|
2429
|
+
], Rn = ({
|
|
2430
|
+
value: e,
|
|
2431
|
+
onChange: t
|
|
2432
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: "font-control-group", children: [
|
|
2433
|
+
/* @__PURE__ */ f.jsx("label", { className: "font-control-label", children: "Text Transform" }),
|
|
2434
|
+
/* @__PURE__ */ f.jsx(
|
|
2435
|
+
"select",
|
|
2436
|
+
{
|
|
2437
|
+
className: "font-control-input font-control-select",
|
|
2438
|
+
value: e,
|
|
2439
|
+
onChange: (r) => t(r.target.value),
|
|
2440
|
+
children: Pn.map((r) => /* @__PURE__ */ f.jsx("option", { value: r.value, children: r.label }, r.value))
|
|
2441
|
+
}
|
|
2442
|
+
)
|
|
2443
|
+
] }), jn = ({
|
|
2444
|
+
value: e,
|
|
2445
|
+
onChange: t
|
|
2446
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: "font-control-group", children: [
|
|
2447
|
+
/* @__PURE__ */ f.jsx("label", { className: "font-control-label", children: "Text Color" }),
|
|
2448
|
+
/* @__PURE__ */ f.jsxs("div", { className: "font-control-color-input", children: [
|
|
2449
|
+
/* @__PURE__ */ f.jsx("div", { className: "font-control-color-preview", children: /* @__PURE__ */ f.jsx(
|
|
2450
|
+
"input",
|
|
2451
|
+
{
|
|
2452
|
+
type: "color",
|
|
2453
|
+
value: e,
|
|
2454
|
+
onChange: (r) => t(r.target.value)
|
|
2455
|
+
}
|
|
2456
|
+
) }),
|
|
2457
|
+
/* @__PURE__ */ f.jsx(
|
|
2458
|
+
"input",
|
|
2459
|
+
{
|
|
2460
|
+
type: "text",
|
|
2461
|
+
className: "font-control-input font-control-text-input",
|
|
2462
|
+
value: e,
|
|
2463
|
+
onChange: (r) => t(r.target.value),
|
|
2464
|
+
placeholder: "#000000"
|
|
2465
|
+
}
|
|
2466
|
+
)
|
|
2467
|
+
] })
|
|
2468
|
+
] }), On = [
|
|
2469
|
+
{ value: "left", icon: "⬅" },
|
|
2470
|
+
{ value: "center", icon: "↔" },
|
|
2471
|
+
{ value: "right", icon: "➡" },
|
|
2472
|
+
{ value: "justify", icon: "⬌" }
|
|
2473
|
+
], Dn = ({
|
|
2474
|
+
value: e,
|
|
2475
|
+
onChange: t
|
|
2476
|
+
}) => /* @__PURE__ */ f.jsxs("div", { className: "font-control-group", children: [
|
|
2477
|
+
/* @__PURE__ */ f.jsx("label", { className: "font-control-label", children: "Text Align" }),
|
|
2478
|
+
/* @__PURE__ */ f.jsx("div", { className: "font-control-button-group", children: On.map((r) => /* @__PURE__ */ f.jsx(
|
|
2479
|
+
"button",
|
|
2480
|
+
{
|
|
2481
|
+
className: `font-control-button ${e === r.value ? "active" : ""}`,
|
|
2482
|
+
onClick: () => t(r.value),
|
|
2483
|
+
type: "button",
|
|
2484
|
+
children: r.icon
|
|
2485
|
+
},
|
|
2486
|
+
r.value
|
|
2487
|
+
)) })
|
|
2488
|
+
] }), nt = ({
|
|
2489
|
+
title: e,
|
|
2490
|
+
code: t,
|
|
2491
|
+
language: r = "css"
|
|
2492
|
+
}) => {
|
|
2493
|
+
const [o, a] = Ae(!1), u = async () => {
|
|
2494
|
+
try {
|
|
2495
|
+
await navigator.clipboard.writeText(t), a(!0), setTimeout(() => a(!1), 2e3);
|
|
2496
|
+
} catch (p) {
|
|
2497
|
+
console.error("Failed to copy:", p);
|
|
2498
|
+
}
|
|
2499
|
+
};
|
|
2500
|
+
return /* @__PURE__ */ f.jsxs("div", { className: "font-control-code-block", children: [
|
|
2501
|
+
/* @__PURE__ */ f.jsxs("div", { className: "font-control-code-header", children: [
|
|
2502
|
+
/* @__PURE__ */ f.jsx("span", { className: "font-control-code-title", children: e }),
|
|
2503
|
+
/* @__PURE__ */ f.jsx(
|
|
2504
|
+
"button",
|
|
2505
|
+
{
|
|
2506
|
+
className: "font-control-copy-button",
|
|
2507
|
+
onClick: u,
|
|
2508
|
+
type: "button",
|
|
2509
|
+
children: o ? /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
2510
|
+
/* @__PURE__ */ f.jsx(
|
|
2511
|
+
"svg",
|
|
2512
|
+
{
|
|
2513
|
+
viewBox: "0 0 24 24",
|
|
2514
|
+
fill: "none",
|
|
2515
|
+
stroke: "currentColor",
|
|
2516
|
+
strokeWidth: "2",
|
|
2517
|
+
children: /* @__PURE__ */ f.jsx("polyline", { points: "20 6 9 17 4 12" })
|
|
2518
|
+
}
|
|
2519
|
+
),
|
|
2520
|
+
"Copied!"
|
|
2521
|
+
] }) : /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
2522
|
+
/* @__PURE__ */ f.jsxs(
|
|
2523
|
+
"svg",
|
|
2524
|
+
{
|
|
2525
|
+
viewBox: "0 0 24 24",
|
|
2526
|
+
fill: "none",
|
|
2527
|
+
stroke: "currentColor",
|
|
2528
|
+
strokeWidth: "2",
|
|
2529
|
+
children: [
|
|
2530
|
+
/* @__PURE__ */ f.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
2531
|
+
/* @__PURE__ */ f.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
2532
|
+
]
|
|
2533
|
+
}
|
|
2534
|
+
),
|
|
2535
|
+
"Copy"
|
|
2536
|
+
] })
|
|
2537
|
+
}
|
|
2538
|
+
)
|
|
2539
|
+
] }),
|
|
2540
|
+
/* @__PURE__ */ f.jsx("pre", { className: "font-control-code-content", children: /* @__PURE__ */ f.jsx("code", { className: `language-${r}`, children: t }) })
|
|
2541
|
+
] });
|
|
2542
|
+
}, Lt = /* @__PURE__ */ new Set();
|
|
2543
|
+
function Nn(e) {
|
|
2544
|
+
if (Lt.has(e))
|
|
2545
|
+
return;
|
|
2546
|
+
const t = document.createElement("link");
|
|
2547
|
+
t.rel = "stylesheet", t.href = `https://fonts.googleapis.com/css2?family=${e.replace(/ /g, "+")}:wght@100;200;300;400;500;600;700;800;900&display=swap`, document.head.appendChild(t), Lt.add(e);
|
|
2548
|
+
}
|
|
2549
|
+
function Mn(e) {
|
|
2550
|
+
if (!document.querySelector('link[href*="fonts.googleapis.com"]')) {
|
|
2551
|
+
const t = document.createElement("link");
|
|
2552
|
+
t.rel = "preconnect", t.href = "https://fonts.googleapis.com";
|
|
2553
|
+
const r = document.createElement("link");
|
|
2554
|
+
r.rel = "preconnect", r.href = "https://fonts.gstatic.com", r.crossOrigin = "anonymous", document.head.appendChild(t), document.head.appendChild(r);
|
|
2555
|
+
}
|
|
2556
|
+
e.forEach(Nn);
|
|
2557
|
+
}
|
|
2558
|
+
function An(e) {
|
|
2559
|
+
return [
|
|
2560
|
+
"Arial",
|
|
2561
|
+
"Helvetica",
|
|
2562
|
+
"Times New Roman",
|
|
2563
|
+
"Georgia",
|
|
2564
|
+
"Verdana"
|
|
2565
|
+
].includes(e) ? `<!-- ${e} is a system font, no import needed -->` : `<!-- Add this to your HTML <head> -->
|
|
2566
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
2567
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
2568
|
+
<link href="${`https://fonts.googleapis.com/css2?family=${e.replace(/ /g, "+")}:wght@100;200;300;400;500;600;700;800;900&display=swap`}" rel="stylesheet">`;
|
|
2569
|
+
}
|
|
2570
|
+
function kn(e) {
|
|
2571
|
+
return `<h1 style={{
|
|
2572
|
+
fontFamily: '${e.fontFamily}',
|
|
2573
|
+
fontSize: '${e.fontSize}px',
|
|
2574
|
+
fontWeight: ${e.fontWeight},
|
|
2575
|
+
lineHeight: ${e.lineHeight},
|
|
2576
|
+
letterSpacing: '${e.letterSpacing}px',
|
|
2577
|
+
textTransform: '${e.textTransform}',
|
|
2578
|
+
color: '${e.color}',
|
|
2579
|
+
textAlign: '${e.textAlign}'
|
|
2580
|
+
}}>
|
|
2581
|
+
Your Text Here
|
|
2582
|
+
</h1>`;
|
|
2583
|
+
}
|
|
2584
|
+
function $n(e) {
|
|
2585
|
+
return `.my-text {
|
|
2586
|
+
font-family: '${e.fontFamily}', sans-serif;
|
|
2587
|
+
font-size: ${e.fontSize}px;
|
|
2588
|
+
font-weight: ${e.fontWeight};
|
|
2589
|
+
line-height: ${e.lineHeight};
|
|
2590
|
+
letter-spacing: ${e.letterSpacing}px;
|
|
2591
|
+
text-transform: ${e.textTransform};
|
|
2592
|
+
color: ${e.color};
|
|
2593
|
+
text-align: ${e.textAlign};
|
|
2594
|
+
}`;
|
|
2595
|
+
}
|
|
2596
|
+
const Fn = [
|
|
2597
|
+
// Sans-serif - Modern & Clean
|
|
2598
|
+
"Inter",
|
|
2599
|
+
"Roboto",
|
|
2600
|
+
"Open Sans",
|
|
2601
|
+
"Lato",
|
|
2602
|
+
"Montserrat",
|
|
2603
|
+
"Poppins",
|
|
2604
|
+
"Raleway",
|
|
2605
|
+
"Work Sans",
|
|
2606
|
+
"Nunito",
|
|
2607
|
+
"Source Sans Pro",
|
|
2608
|
+
"DM Sans",
|
|
2609
|
+
// Serif - Classic & Elegant
|
|
2610
|
+
"Playfair Display",
|
|
2611
|
+
"Merriweather",
|
|
2612
|
+
"Lora",
|
|
2613
|
+
"Crimson Text",
|
|
2614
|
+
"EB Garamond",
|
|
2615
|
+
// Monospace - Code & Tech
|
|
2616
|
+
"Fira Code",
|
|
2617
|
+
"JetBrains Mono",
|
|
2618
|
+
"Inconsolata",
|
|
2619
|
+
"Source Code Pro",
|
|
2620
|
+
// Display - Bold & Creative
|
|
2621
|
+
"Bebas Neue",
|
|
2622
|
+
"Oswald",
|
|
2623
|
+
"Righteous",
|
|
2624
|
+
"Permanent Marker",
|
|
2625
|
+
"Pacifico"
|
|
2626
|
+
], ot = {
|
|
2627
|
+
fontFamily: "Arial",
|
|
2628
|
+
fontSize: 16,
|
|
2629
|
+
fontWeight: 400,
|
|
2630
|
+
lineHeight: 1.5,
|
|
2631
|
+
letterSpacing: 0,
|
|
2632
|
+
textTransform: "none",
|
|
2633
|
+
color: "#000000",
|
|
2634
|
+
textAlign: "left"
|
|
2635
|
+
}, Ln = ({
|
|
2636
|
+
value: e,
|
|
2637
|
+
onChange: t,
|
|
2638
|
+
fontFamilies: r = Fn,
|
|
2639
|
+
minFontSize: o = 8,
|
|
2640
|
+
maxFontSize: a = 120,
|
|
2641
|
+
fontSizeStep: u = 1,
|
|
2642
|
+
title: p = "Font Controls",
|
|
2643
|
+
collapsed: c = !1,
|
|
2644
|
+
draggable: d = !0,
|
|
2645
|
+
position: m
|
|
2646
|
+
}) => {
|
|
2647
|
+
const [g, T] = Ae({
|
|
2648
|
+
...ot,
|
|
2649
|
+
...e
|
|
2650
|
+
}), [A, Y] = Ae(!1);
|
|
2651
|
+
wt(() => {
|
|
2652
|
+
e && T((_) => ({ ..._, ...e }));
|
|
2653
|
+
}, [e]), wt(() => {
|
|
2654
|
+
Mn(r);
|
|
2655
|
+
}, [r]);
|
|
2656
|
+
const q = (_, x) => {
|
|
2657
|
+
const b = { ...g, [_]: x };
|
|
2658
|
+
T(b), t == null || t(b);
|
|
2659
|
+
}, X = () => {
|
|
2660
|
+
T(ot), t == null || t(ot);
|
|
2661
|
+
};
|
|
2662
|
+
return /* @__PURE__ */ f.jsxs(
|
|
2663
|
+
Sn,
|
|
2664
|
+
{
|
|
2665
|
+
title: p,
|
|
2666
|
+
collapsed: c,
|
|
2667
|
+
draggable: d,
|
|
2668
|
+
position: m,
|
|
2669
|
+
children: [
|
|
2670
|
+
/* @__PURE__ */ f.jsx(
|
|
2671
|
+
xn,
|
|
2672
|
+
{
|
|
2673
|
+
value: g.fontFamily,
|
|
2674
|
+
onChange: (_) => q("fontFamily", _),
|
|
2675
|
+
fontFamilies: r
|
|
2676
|
+
}
|
|
2677
|
+
),
|
|
2678
|
+
/* @__PURE__ */ f.jsx(
|
|
2679
|
+
En,
|
|
2680
|
+
{
|
|
2681
|
+
value: g.fontSize,
|
|
2682
|
+
onChange: (_) => q("fontSize", _),
|
|
2683
|
+
min: o,
|
|
2684
|
+
max: a,
|
|
2685
|
+
step: u
|
|
2686
|
+
}
|
|
2687
|
+
),
|
|
2688
|
+
/* @__PURE__ */ f.jsx(
|
|
2689
|
+
_n,
|
|
2690
|
+
{
|
|
2691
|
+
value: g.fontWeight,
|
|
2692
|
+
onChange: (_) => q("fontWeight", _)
|
|
2693
|
+
}
|
|
2694
|
+
),
|
|
2695
|
+
/* @__PURE__ */ f.jsx(
|
|
2696
|
+
Cn,
|
|
2697
|
+
{
|
|
2698
|
+
value: g.lineHeight,
|
|
2699
|
+
onChange: (_) => q("lineHeight", _)
|
|
2700
|
+
}
|
|
2701
|
+
),
|
|
2702
|
+
/* @__PURE__ */ f.jsx(
|
|
2703
|
+
wn,
|
|
2704
|
+
{
|
|
2705
|
+
value: g.letterSpacing,
|
|
2706
|
+
onChange: (_) => q("letterSpacing", _)
|
|
2707
|
+
}
|
|
2708
|
+
),
|
|
2709
|
+
/* @__PURE__ */ f.jsx(
|
|
2710
|
+
Rn,
|
|
2711
|
+
{
|
|
2712
|
+
value: g.textTransform,
|
|
2713
|
+
onChange: (_) => q("textTransform", _)
|
|
2714
|
+
}
|
|
2715
|
+
),
|
|
2716
|
+
/* @__PURE__ */ f.jsx(
|
|
2717
|
+
jn,
|
|
2718
|
+
{
|
|
2719
|
+
value: g.color,
|
|
2720
|
+
onChange: (_) => q("color", _)
|
|
2721
|
+
}
|
|
2722
|
+
),
|
|
2723
|
+
/* @__PURE__ */ f.jsx(
|
|
2724
|
+
Dn,
|
|
2725
|
+
{
|
|
2726
|
+
value: g.textAlign,
|
|
2727
|
+
onChange: (_) => q("textAlign", _)
|
|
2728
|
+
}
|
|
2729
|
+
),
|
|
2730
|
+
/* @__PURE__ */ f.jsxs(
|
|
2731
|
+
"button",
|
|
2732
|
+
{
|
|
2733
|
+
className: "font-control-reset-button",
|
|
2734
|
+
onClick: X,
|
|
2735
|
+
type: "button",
|
|
2736
|
+
children: [
|
|
2737
|
+
/* @__PURE__ */ f.jsxs(
|
|
2738
|
+
"svg",
|
|
2739
|
+
{
|
|
2740
|
+
viewBox: "0 0 24 24",
|
|
2741
|
+
fill: "none",
|
|
2742
|
+
stroke: "currentColor",
|
|
2743
|
+
strokeWidth: "2",
|
|
2744
|
+
strokeLinecap: "round",
|
|
2745
|
+
strokeLinejoin: "round",
|
|
2746
|
+
children: [
|
|
2747
|
+
/* @__PURE__ */ f.jsx("polyline", { points: "1 4 1 10 7 10" }),
|
|
2748
|
+
/* @__PURE__ */ f.jsx("polyline", { points: "23 20 23 14 17 14" }),
|
|
2749
|
+
/* @__PURE__ */ f.jsx("path", { d: "M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15" })
|
|
2750
|
+
]
|
|
2751
|
+
}
|
|
2752
|
+
),
|
|
2753
|
+
"Reset to Default"
|
|
2754
|
+
]
|
|
2755
|
+
}
|
|
2756
|
+
),
|
|
2757
|
+
/* @__PURE__ */ f.jsxs("div", { className: "font-control-export-section", children: [
|
|
2758
|
+
/* @__PURE__ */ f.jsxs(
|
|
2759
|
+
"button",
|
|
2760
|
+
{
|
|
2761
|
+
className: "font-control-export-toggle",
|
|
2762
|
+
onClick: () => Y(!A),
|
|
2763
|
+
type: "button",
|
|
2764
|
+
children: [
|
|
2765
|
+
/* @__PURE__ */ f.jsx(
|
|
2766
|
+
"svg",
|
|
2767
|
+
{
|
|
2768
|
+
viewBox: "0 0 24 24",
|
|
2769
|
+
fill: "none",
|
|
2770
|
+
stroke: "currentColor",
|
|
2771
|
+
strokeWidth: "2",
|
|
2772
|
+
className: A ? "rotated" : "",
|
|
2773
|
+
children: /* @__PURE__ */ f.jsx("polyline", { points: "9 18 15 12 9 6" })
|
|
2774
|
+
}
|
|
2775
|
+
),
|
|
2776
|
+
"Export Configuration"
|
|
2777
|
+
]
|
|
2778
|
+
}
|
|
2779
|
+
),
|
|
2780
|
+
A && /* @__PURE__ */ f.jsxs("div", { className: "font-control-export-content", children: [
|
|
2781
|
+
/* @__PURE__ */ f.jsx(
|
|
2782
|
+
nt,
|
|
2783
|
+
{
|
|
2784
|
+
title: "1. Google Fonts Import (HTML)",
|
|
2785
|
+
code: An(g.fontFamily),
|
|
2786
|
+
language: "html"
|
|
2787
|
+
}
|
|
2788
|
+
),
|
|
2789
|
+
/* @__PURE__ */ f.jsx(
|
|
2790
|
+
nt,
|
|
2791
|
+
{
|
|
2792
|
+
title: "2. React/JSX Inline Styles",
|
|
2793
|
+
code: kn(g),
|
|
2794
|
+
language: "tsx"
|
|
2795
|
+
}
|
|
2796
|
+
),
|
|
2797
|
+
/* @__PURE__ */ f.jsx(
|
|
2798
|
+
nt,
|
|
2799
|
+
{
|
|
2800
|
+
title: "3. CSS Class",
|
|
2801
|
+
code: $n(g),
|
|
2802
|
+
language: "css"
|
|
2803
|
+
}
|
|
2804
|
+
)
|
|
2805
|
+
] })
|
|
2806
|
+
] })
|
|
2807
|
+
]
|
|
2808
|
+
}
|
|
2809
|
+
);
|
|
2810
|
+
}, Ut = {
|
|
2811
|
+
fontFamily: "Arial",
|
|
2812
|
+
fontSize: 16,
|
|
2813
|
+
fontWeight: 400,
|
|
2814
|
+
lineHeight: 1.5,
|
|
2815
|
+
letterSpacing: 0,
|
|
2816
|
+
textTransform: "none",
|
|
2817
|
+
color: "#000000",
|
|
2818
|
+
textAlign: "left"
|
|
2819
|
+
}, Un = (e) => {
|
|
2820
|
+
const [t, r] = Ae({
|
|
2821
|
+
...Ut,
|
|
2822
|
+
...e
|
|
2823
|
+
});
|
|
2824
|
+
return {
|
|
2825
|
+
config: t,
|
|
2826
|
+
setConfig: r,
|
|
2827
|
+
updateConfig: (u, p) => {
|
|
2828
|
+
r((c) => ({ ...c, [u]: p }));
|
|
2829
|
+
},
|
|
2830
|
+
resetConfig: () => {
|
|
2831
|
+
r({ ...Ut, ...e });
|
|
2832
|
+
}
|
|
2833
|
+
};
|
|
2834
|
+
};
|
|
2835
|
+
export {
|
|
2836
|
+
Ln as FontControls,
|
|
2837
|
+
Mn as loadAllDefaultFonts,
|
|
2838
|
+
Nn as loadGoogleFont,
|
|
2839
|
+
Un as useFontControls
|
|
2840
|
+
};
|