react-table-edit 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +25 -3053
  2. package/dist/index.mjs +6 -3069
  3. package/package.json +5 -4
package/dist/index.mjs CHANGED
@@ -1,3037 +1,3 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined")
11
- return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
- var __esm = (fn, res) => function __init() {
15
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
- };
17
- var __commonJS = (cb, mod) => function __require2() {
18
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
- };
20
- var __export = (target, all) => {
21
- for (var name in all)
22
- __defProp(target, name, { get: all[name], enumerable: true });
23
- };
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") {
26
- for (let key of __getOwnPropNames(from))
27
- if (!__hasOwnProp.call(to, key) && key !== except)
28
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
- }
30
- return to;
31
- };
32
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
- // If the importer is in node compatibility mode or this is not an ESM
34
- // file that has been converted to a CommonJS file using a Babel-
35
- // compatible transform (i.e. "__esModule" has not been set), then set
36
- // "default" to the CommonJS "module.exports" for node compatibility.
37
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
- mod
39
- ));
40
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
41
-
42
- // node_modules/react-is/cjs/react-is.production.min.js
43
- var require_react_is_production_min = __commonJS({
44
- "node_modules/react-is/cjs/react-is.production.min.js"(exports) {
45
- "use strict";
46
- var b = "function" === typeof Symbol && Symbol.for;
47
- var c = b ? Symbol.for("react.element") : 60103;
48
- var d = b ? Symbol.for("react.portal") : 60106;
49
- var e = b ? Symbol.for("react.fragment") : 60107;
50
- var f = b ? Symbol.for("react.strict_mode") : 60108;
51
- var g = b ? Symbol.for("react.profiler") : 60114;
52
- var h = b ? Symbol.for("react.provider") : 60109;
53
- var k = b ? Symbol.for("react.context") : 60110;
54
- var l = b ? Symbol.for("react.async_mode") : 60111;
55
- var m = b ? Symbol.for("react.concurrent_mode") : 60111;
56
- var n = b ? Symbol.for("react.forward_ref") : 60112;
57
- var p = b ? Symbol.for("react.suspense") : 60113;
58
- var q = b ? Symbol.for("react.suspense_list") : 60120;
59
- var r2 = b ? Symbol.for("react.memo") : 60115;
60
- var t = b ? Symbol.for("react.lazy") : 60116;
61
- var v = b ? Symbol.for("react.block") : 60121;
62
- var w = b ? Symbol.for("react.fundamental") : 60117;
63
- var x = b ? Symbol.for("react.responder") : 60118;
64
- var y = b ? Symbol.for("react.scope") : 60119;
65
- function z(a) {
66
- if ("object" === typeof a && null !== a) {
67
- var u = a.$$typeof;
68
- switch (u) {
69
- case c:
70
- switch (a = a.type, a) {
71
- case l:
72
- case m:
73
- case e:
74
- case g:
75
- case f:
76
- case p:
77
- return a;
78
- default:
79
- switch (a = a && a.$$typeof, a) {
80
- case k:
81
- case n:
82
- case t:
83
- case r2:
84
- case h:
85
- return a;
86
- default:
87
- return u;
88
- }
89
- }
90
- case d:
91
- return u;
92
- }
93
- }
94
- }
95
- function A(a) {
96
- return z(a) === m;
97
- }
98
- exports.AsyncMode = l;
99
- exports.ConcurrentMode = m;
100
- exports.ContextConsumer = k;
101
- exports.ContextProvider = h;
102
- exports.Element = c;
103
- exports.ForwardRef = n;
104
- exports.Fragment = e;
105
- exports.Lazy = t;
106
- exports.Memo = r2;
107
- exports.Portal = d;
108
- exports.Profiler = g;
109
- exports.StrictMode = f;
110
- exports.Suspense = p;
111
- exports.isAsyncMode = function(a) {
112
- return A(a) || z(a) === l;
113
- };
114
- exports.isConcurrentMode = A;
115
- exports.isContextConsumer = function(a) {
116
- return z(a) === k;
117
- };
118
- exports.isContextProvider = function(a) {
119
- return z(a) === h;
120
- };
121
- exports.isElement = function(a) {
122
- return "object" === typeof a && null !== a && a.$$typeof === c;
123
- };
124
- exports.isForwardRef = function(a) {
125
- return z(a) === n;
126
- };
127
- exports.isFragment = function(a) {
128
- return z(a) === e;
129
- };
130
- exports.isLazy = function(a) {
131
- return z(a) === t;
132
- };
133
- exports.isMemo = function(a) {
134
- return z(a) === r2;
135
- };
136
- exports.isPortal = function(a) {
137
- return z(a) === d;
138
- };
139
- exports.isProfiler = function(a) {
140
- return z(a) === g;
141
- };
142
- exports.isStrictMode = function(a) {
143
- return z(a) === f;
144
- };
145
- exports.isSuspense = function(a) {
146
- return z(a) === p;
147
- };
148
- exports.isValidElementType = function(a) {
149
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r2 || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
150
- };
151
- exports.typeOf = z;
152
- }
153
- });
154
-
155
- // node_modules/react-is/cjs/react-is.development.js
156
- var require_react_is_development = __commonJS({
157
- "node_modules/react-is/cjs/react-is.development.js"(exports) {
158
- "use strict";
159
- if (process.env.NODE_ENV !== "production") {
160
- (function() {
161
- "use strict";
162
- var hasSymbol = typeof Symbol === "function" && Symbol.for;
163
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
164
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
165
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
166
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
167
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
168
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
169
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
170
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
171
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
172
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
173
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
174
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
175
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
176
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
177
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
178
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
179
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
180
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
181
- function isValidElementType(type) {
182
- return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
183
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
184
- }
185
- function typeOf(object) {
186
- if (typeof object === "object" && object !== null) {
187
- var $$typeof = object.$$typeof;
188
- switch ($$typeof) {
189
- case REACT_ELEMENT_TYPE:
190
- var type = object.type;
191
- switch (type) {
192
- case REACT_ASYNC_MODE_TYPE:
193
- case REACT_CONCURRENT_MODE_TYPE:
194
- case REACT_FRAGMENT_TYPE:
195
- case REACT_PROFILER_TYPE:
196
- case REACT_STRICT_MODE_TYPE:
197
- case REACT_SUSPENSE_TYPE:
198
- return type;
199
- default:
200
- var $$typeofType = type && type.$$typeof;
201
- switch ($$typeofType) {
202
- case REACT_CONTEXT_TYPE:
203
- case REACT_FORWARD_REF_TYPE:
204
- case REACT_LAZY_TYPE:
205
- case REACT_MEMO_TYPE:
206
- case REACT_PROVIDER_TYPE:
207
- return $$typeofType;
208
- default:
209
- return $$typeof;
210
- }
211
- }
212
- case REACT_PORTAL_TYPE:
213
- return $$typeof;
214
- }
215
- }
216
- return void 0;
217
- }
218
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
219
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
220
- var ContextConsumer = REACT_CONTEXT_TYPE;
221
- var ContextProvider = REACT_PROVIDER_TYPE;
222
- var Element = REACT_ELEMENT_TYPE;
223
- var ForwardRef = REACT_FORWARD_REF_TYPE;
224
- var Fragment21 = REACT_FRAGMENT_TYPE;
225
- var Lazy = REACT_LAZY_TYPE;
226
- var Memo = REACT_MEMO_TYPE;
227
- var Portal = REACT_PORTAL_TYPE;
228
- var Profiler = REACT_PROFILER_TYPE;
229
- var StrictMode = REACT_STRICT_MODE_TYPE;
230
- var Suspense = REACT_SUSPENSE_TYPE;
231
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
232
- function isAsyncMode(object) {
233
- {
234
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
235
- hasWarnedAboutDeprecatedIsAsyncMode = true;
236
- 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.");
237
- }
238
- }
239
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
240
- }
241
- function isConcurrentMode(object) {
242
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
243
- }
244
- function isContextConsumer(object) {
245
- return typeOf(object) === REACT_CONTEXT_TYPE;
246
- }
247
- function isContextProvider(object) {
248
- return typeOf(object) === REACT_PROVIDER_TYPE;
249
- }
250
- function isElement(object) {
251
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
252
- }
253
- function isForwardRef(object) {
254
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
255
- }
256
- function isFragment(object) {
257
- return typeOf(object) === REACT_FRAGMENT_TYPE;
258
- }
259
- function isLazy(object) {
260
- return typeOf(object) === REACT_LAZY_TYPE;
261
- }
262
- function isMemo(object) {
263
- return typeOf(object) === REACT_MEMO_TYPE;
264
- }
265
- function isPortal(object) {
266
- return typeOf(object) === REACT_PORTAL_TYPE;
267
- }
268
- function isProfiler(object) {
269
- return typeOf(object) === REACT_PROFILER_TYPE;
270
- }
271
- function isStrictMode(object) {
272
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
273
- }
274
- function isSuspense(object) {
275
- return typeOf(object) === REACT_SUSPENSE_TYPE;
276
- }
277
- exports.AsyncMode = AsyncMode;
278
- exports.ConcurrentMode = ConcurrentMode;
279
- exports.ContextConsumer = ContextConsumer;
280
- exports.ContextProvider = ContextProvider;
281
- exports.Element = Element;
282
- exports.ForwardRef = ForwardRef;
283
- exports.Fragment = Fragment21;
284
- exports.Lazy = Lazy;
285
- exports.Memo = Memo;
286
- exports.Portal = Portal;
287
- exports.Profiler = Profiler;
288
- exports.StrictMode = StrictMode;
289
- exports.Suspense = Suspense;
290
- exports.isAsyncMode = isAsyncMode;
291
- exports.isConcurrentMode = isConcurrentMode;
292
- exports.isContextConsumer = isContextConsumer;
293
- exports.isContextProvider = isContextProvider;
294
- exports.isElement = isElement;
295
- exports.isForwardRef = isForwardRef;
296
- exports.isFragment = isFragment;
297
- exports.isLazy = isLazy;
298
- exports.isMemo = isMemo;
299
- exports.isPortal = isPortal;
300
- exports.isProfiler = isProfiler;
301
- exports.isStrictMode = isStrictMode;
302
- exports.isSuspense = isSuspense;
303
- exports.isValidElementType = isValidElementType;
304
- exports.typeOf = typeOf;
305
- })();
306
- }
307
- }
308
- });
309
-
310
- // node_modules/react-is/index.js
311
- var require_react_is = __commonJS({
312
- "node_modules/react-is/index.js"(exports, module) {
313
- "use strict";
314
- if (process.env.NODE_ENV === "production") {
315
- module.exports = require_react_is_production_min();
316
- } else {
317
- module.exports = require_react_is_development();
318
- }
319
- }
320
- });
321
-
322
- // node_modules/object-assign/index.js
323
- var require_object_assign = __commonJS({
324
- "node_modules/object-assign/index.js"(exports, module) {
325
- "use strict";
326
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
327
- var hasOwnProperty = Object.prototype.hasOwnProperty;
328
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
329
- function toObject(val) {
330
- if (val === null || val === void 0) {
331
- throw new TypeError("Object.assign cannot be called with null or undefined");
332
- }
333
- return Object(val);
334
- }
335
- function shouldUseNative() {
336
- try {
337
- if (!Object.assign) {
338
- return false;
339
- }
340
- var test1 = new String("abc");
341
- test1[5] = "de";
342
- if (Object.getOwnPropertyNames(test1)[0] === "5") {
343
- return false;
344
- }
345
- var test2 = {};
346
- for (var i = 0; i < 10; i++) {
347
- test2["_" + String.fromCharCode(i)] = i;
348
- }
349
- var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
350
- return test2[n];
351
- });
352
- if (order2.join("") !== "0123456789") {
353
- return false;
354
- }
355
- var test3 = {};
356
- "abcdefghijklmnopqrst".split("").forEach(function(letter) {
357
- test3[letter] = letter;
358
- });
359
- if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
360
- return false;
361
- }
362
- return true;
363
- } catch (err) {
364
- return false;
365
- }
366
- }
367
- module.exports = shouldUseNative() ? Object.assign : function(target, source) {
368
- var from;
369
- var to = toObject(target);
370
- var symbols;
371
- for (var s = 1; s < arguments.length; s++) {
372
- from = Object(arguments[s]);
373
- for (var key in from) {
374
- if (hasOwnProperty.call(from, key)) {
375
- to[key] = from[key];
376
- }
377
- }
378
- if (getOwnPropertySymbols) {
379
- symbols = getOwnPropertySymbols(from);
380
- for (var i = 0; i < symbols.length; i++) {
381
- if (propIsEnumerable.call(from, symbols[i])) {
382
- to[symbols[i]] = from[symbols[i]];
383
- }
384
- }
385
- }
386
- }
387
- return to;
388
- };
389
- }
390
- });
391
-
392
- // node_modules/prop-types/lib/ReactPropTypesSecret.js
393
- var require_ReactPropTypesSecret = __commonJS({
394
- "node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
395
- "use strict";
396
- var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
397
- module.exports = ReactPropTypesSecret;
398
- }
399
- });
400
-
401
- // node_modules/prop-types/lib/has.js
402
- var require_has = __commonJS({
403
- "node_modules/prop-types/lib/has.js"(exports, module) {
404
- "use strict";
405
- module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
406
- }
407
- });
408
-
409
- // node_modules/prop-types/checkPropTypes.js
410
- var require_checkPropTypes = __commonJS({
411
- "node_modules/prop-types/checkPropTypes.js"(exports, module) {
412
- "use strict";
413
- var printWarning = function() {
414
- };
415
- if (process.env.NODE_ENV !== "production") {
416
- ReactPropTypesSecret = require_ReactPropTypesSecret();
417
- loggedTypeFailures = {};
418
- has = require_has();
419
- printWarning = function(text) {
420
- var message = "Warning: " + text;
421
- if (typeof console !== "undefined") {
422
- console.error(message);
423
- }
424
- try {
425
- throw new Error(message);
426
- } catch (x) {
427
- }
428
- };
429
- }
430
- var ReactPropTypesSecret;
431
- var loggedTypeFailures;
432
- var has;
433
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
434
- if (process.env.NODE_ENV !== "production") {
435
- for (var typeSpecName in typeSpecs) {
436
- if (has(typeSpecs, typeSpecName)) {
437
- var error;
438
- try {
439
- if (typeof typeSpecs[typeSpecName] !== "function") {
440
- var err = Error(
441
- (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
442
- );
443
- err.name = "Invariant Violation";
444
- throw err;
445
- }
446
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
447
- } catch (ex) {
448
- error = ex;
449
- }
450
- if (error && !(error instanceof Error)) {
451
- printWarning(
452
- (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
453
- );
454
- }
455
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
456
- loggedTypeFailures[error.message] = true;
457
- var stack = getStack ? getStack() : "";
458
- printWarning(
459
- "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
460
- );
461
- }
462
- }
463
- }
464
- }
465
- }
466
- checkPropTypes.resetWarningCache = function() {
467
- if (process.env.NODE_ENV !== "production") {
468
- loggedTypeFailures = {};
469
- }
470
- };
471
- module.exports = checkPropTypes;
472
- }
473
- });
474
-
475
- // node_modules/prop-types/factoryWithTypeCheckers.js
476
- var require_factoryWithTypeCheckers = __commonJS({
477
- "node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module) {
478
- "use strict";
479
- var ReactIs = require_react_is();
480
- var assign = require_object_assign();
481
- var ReactPropTypesSecret = require_ReactPropTypesSecret();
482
- var has = require_has();
483
- var checkPropTypes = require_checkPropTypes();
484
- var printWarning = function() {
485
- };
486
- if (process.env.NODE_ENV !== "production") {
487
- printWarning = function(text) {
488
- var message = "Warning: " + text;
489
- if (typeof console !== "undefined") {
490
- console.error(message);
491
- }
492
- try {
493
- throw new Error(message);
494
- } catch (x) {
495
- }
496
- };
497
- }
498
- function emptyFunctionThatReturnsNull() {
499
- return null;
500
- }
501
- module.exports = function(isValidElement, throwOnDirectAccess) {
502
- var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
503
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
504
- function getIteratorFn(maybeIterable) {
505
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
506
- if (typeof iteratorFn === "function") {
507
- return iteratorFn;
508
- }
509
- }
510
- var ANONYMOUS = "<<anonymous>>";
511
- var ReactPropTypes = {
512
- array: createPrimitiveTypeChecker("array"),
513
- bigint: createPrimitiveTypeChecker("bigint"),
514
- bool: createPrimitiveTypeChecker("boolean"),
515
- func: createPrimitiveTypeChecker("function"),
516
- number: createPrimitiveTypeChecker("number"),
517
- object: createPrimitiveTypeChecker("object"),
518
- string: createPrimitiveTypeChecker("string"),
519
- symbol: createPrimitiveTypeChecker("symbol"),
520
- any: createAnyTypeChecker(),
521
- arrayOf: createArrayOfTypeChecker,
522
- element: createElementTypeChecker(),
523
- elementType: createElementTypeTypeChecker(),
524
- instanceOf: createInstanceTypeChecker,
525
- node: createNodeChecker(),
526
- objectOf: createObjectOfTypeChecker,
527
- oneOf: createEnumTypeChecker,
528
- oneOfType: createUnionTypeChecker,
529
- shape: createShapeTypeChecker,
530
- exact: createStrictShapeTypeChecker
531
- };
532
- function is(x, y) {
533
- if (x === y) {
534
- return x !== 0 || 1 / x === 1 / y;
535
- } else {
536
- return x !== x && y !== y;
537
- }
538
- }
539
- function PropTypeError(message, data) {
540
- this.message = message;
541
- this.data = data && typeof data === "object" ? data : {};
542
- this.stack = "";
543
- }
544
- PropTypeError.prototype = Error.prototype;
545
- function createChainableTypeChecker(validate) {
546
- if (process.env.NODE_ENV !== "production") {
547
- var manualPropTypeCallCache = {};
548
- var manualPropTypeWarningCount = 0;
549
- }
550
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
551
- componentName = componentName || ANONYMOUS;
552
- propFullName = propFullName || propName;
553
- if (secret !== ReactPropTypesSecret) {
554
- if (throwOnDirectAccess) {
555
- var err = new Error(
556
- "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"
557
- );
558
- err.name = "Invariant Violation";
559
- throw err;
560
- } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
561
- var cacheKey = componentName + ":" + propName;
562
- if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
563
- manualPropTypeWarningCount < 3) {
564
- printWarning(
565
- "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
566
- );
567
- manualPropTypeCallCache[cacheKey] = true;
568
- manualPropTypeWarningCount++;
569
- }
570
- }
571
- }
572
- if (props[propName] == null) {
573
- if (isRequired) {
574
- if (props[propName] === null) {
575
- return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
576
- }
577
- return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
578
- }
579
- return null;
580
- } else {
581
- return validate(props, propName, componentName, location, propFullName);
582
- }
583
- }
584
- var chainedCheckType = checkType.bind(null, false);
585
- chainedCheckType.isRequired = checkType.bind(null, true);
586
- return chainedCheckType;
587
- }
588
- function createPrimitiveTypeChecker(expectedType) {
589
- function validate(props, propName, componentName, location, propFullName, secret) {
590
- var propValue = props[propName];
591
- var propType = getPropType(propValue);
592
- if (propType !== expectedType) {
593
- var preciseType = getPreciseType(propValue);
594
- return new PropTypeError(
595
- "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
596
- { expectedType }
597
- );
598
- }
599
- return null;
600
- }
601
- return createChainableTypeChecker(validate);
602
- }
603
- function createAnyTypeChecker() {
604
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
605
- }
606
- function createArrayOfTypeChecker(typeChecker) {
607
- function validate(props, propName, componentName, location, propFullName) {
608
- if (typeof typeChecker !== "function") {
609
- return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
610
- }
611
- var propValue = props[propName];
612
- if (!Array.isArray(propValue)) {
613
- var propType = getPropType(propValue);
614
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
615
- }
616
- for (var i = 0; i < propValue.length; i++) {
617
- var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
618
- if (error instanceof Error) {
619
- return error;
620
- }
621
- }
622
- return null;
623
- }
624
- return createChainableTypeChecker(validate);
625
- }
626
- function createElementTypeChecker() {
627
- function validate(props, propName, componentName, location, propFullName) {
628
- var propValue = props[propName];
629
- if (!isValidElement(propValue)) {
630
- var propType = getPropType(propValue);
631
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
632
- }
633
- return null;
634
- }
635
- return createChainableTypeChecker(validate);
636
- }
637
- function createElementTypeTypeChecker() {
638
- function validate(props, propName, componentName, location, propFullName) {
639
- var propValue = props[propName];
640
- if (!ReactIs.isValidElementType(propValue)) {
641
- var propType = getPropType(propValue);
642
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
643
- }
644
- return null;
645
- }
646
- return createChainableTypeChecker(validate);
647
- }
648
- function createInstanceTypeChecker(expectedClass) {
649
- function validate(props, propName, componentName, location, propFullName) {
650
- if (!(props[propName] instanceof expectedClass)) {
651
- var expectedClassName = expectedClass.name || ANONYMOUS;
652
- var actualClassName = getClassName(props[propName]);
653
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
654
- }
655
- return null;
656
- }
657
- return createChainableTypeChecker(validate);
658
- }
659
- function createEnumTypeChecker(expectedValues) {
660
- if (!Array.isArray(expectedValues)) {
661
- if (process.env.NODE_ENV !== "production") {
662
- if (arguments.length > 1) {
663
- printWarning(
664
- "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])."
665
- );
666
- } else {
667
- printWarning("Invalid argument supplied to oneOf, expected an array.");
668
- }
669
- }
670
- return emptyFunctionThatReturnsNull;
671
- }
672
- function validate(props, propName, componentName, location, propFullName) {
673
- var propValue = props[propName];
674
- for (var i = 0; i < expectedValues.length; i++) {
675
- if (is(propValue, expectedValues[i])) {
676
- return null;
677
- }
678
- }
679
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
680
- var type = getPreciseType(value);
681
- if (type === "symbol") {
682
- return String(value);
683
- }
684
- return value;
685
- });
686
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
687
- }
688
- return createChainableTypeChecker(validate);
689
- }
690
- function createObjectOfTypeChecker(typeChecker) {
691
- function validate(props, propName, componentName, location, propFullName) {
692
- if (typeof typeChecker !== "function") {
693
- return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
694
- }
695
- var propValue = props[propName];
696
- var propType = getPropType(propValue);
697
- if (propType !== "object") {
698
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
699
- }
700
- for (var key in propValue) {
701
- if (has(propValue, key)) {
702
- var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
703
- if (error instanceof Error) {
704
- return error;
705
- }
706
- }
707
- }
708
- return null;
709
- }
710
- return createChainableTypeChecker(validate);
711
- }
712
- function createUnionTypeChecker(arrayOfTypeCheckers) {
713
- if (!Array.isArray(arrayOfTypeCheckers)) {
714
- process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
715
- return emptyFunctionThatReturnsNull;
716
- }
717
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
718
- var checker = arrayOfTypeCheckers[i];
719
- if (typeof checker !== "function") {
720
- printWarning(
721
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
722
- );
723
- return emptyFunctionThatReturnsNull;
724
- }
725
- }
726
- function validate(props, propName, componentName, location, propFullName) {
727
- var expectedTypes = [];
728
- for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
729
- var checker2 = arrayOfTypeCheckers[i2];
730
- var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
731
- if (checkerResult == null) {
732
- return null;
733
- }
734
- if (checkerResult.data && has(checkerResult.data, "expectedType")) {
735
- expectedTypes.push(checkerResult.data.expectedType);
736
- }
737
- }
738
- var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
739
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
740
- }
741
- return createChainableTypeChecker(validate);
742
- }
743
- function createNodeChecker() {
744
- function validate(props, propName, componentName, location, propFullName) {
745
- if (!isNode(props[propName])) {
746
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
747
- }
748
- return null;
749
- }
750
- return createChainableTypeChecker(validate);
751
- }
752
- function invalidValidatorError(componentName, location, propFullName, key, type) {
753
- return new PropTypeError(
754
- (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
755
- );
756
- }
757
- function createShapeTypeChecker(shapeTypes) {
758
- function validate(props, propName, componentName, location, propFullName) {
759
- var propValue = props[propName];
760
- var propType = getPropType(propValue);
761
- if (propType !== "object") {
762
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
763
- }
764
- for (var key in shapeTypes) {
765
- var checker = shapeTypes[key];
766
- if (typeof checker !== "function") {
767
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
768
- }
769
- var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
770
- if (error) {
771
- return error;
772
- }
773
- }
774
- return null;
775
- }
776
- return createChainableTypeChecker(validate);
777
- }
778
- function createStrictShapeTypeChecker(shapeTypes) {
779
- function validate(props, propName, componentName, location, propFullName) {
780
- var propValue = props[propName];
781
- var propType = getPropType(propValue);
782
- if (propType !== "object") {
783
- return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
784
- }
785
- var allKeys = assign({}, props[propName], shapeTypes);
786
- for (var key in allKeys) {
787
- var checker = shapeTypes[key];
788
- if (has(shapeTypes, key) && typeof checker !== "function") {
789
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
790
- }
791
- if (!checker) {
792
- return new PropTypeError(
793
- "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
794
- );
795
- }
796
- var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
797
- if (error) {
798
- return error;
799
- }
800
- }
801
- return null;
802
- }
803
- return createChainableTypeChecker(validate);
804
- }
805
- function isNode(propValue) {
806
- switch (typeof propValue) {
807
- case "number":
808
- case "string":
809
- case "undefined":
810
- return true;
811
- case "boolean":
812
- return !propValue;
813
- case "object":
814
- if (Array.isArray(propValue)) {
815
- return propValue.every(isNode);
816
- }
817
- if (propValue === null || isValidElement(propValue)) {
818
- return true;
819
- }
820
- var iteratorFn = getIteratorFn(propValue);
821
- if (iteratorFn) {
822
- var iterator = iteratorFn.call(propValue);
823
- var step;
824
- if (iteratorFn !== propValue.entries) {
825
- while (!(step = iterator.next()).done) {
826
- if (!isNode(step.value)) {
827
- return false;
828
- }
829
- }
830
- } else {
831
- while (!(step = iterator.next()).done) {
832
- var entry = step.value;
833
- if (entry) {
834
- if (!isNode(entry[1])) {
835
- return false;
836
- }
837
- }
838
- }
839
- }
840
- } else {
841
- return false;
842
- }
843
- return true;
844
- default:
845
- return false;
846
- }
847
- }
848
- function isSymbol(propType, propValue) {
849
- if (propType === "symbol") {
850
- return true;
851
- }
852
- if (!propValue) {
853
- return false;
854
- }
855
- if (propValue["@@toStringTag"] === "Symbol") {
856
- return true;
857
- }
858
- if (typeof Symbol === "function" && propValue instanceof Symbol) {
859
- return true;
860
- }
861
- return false;
862
- }
863
- function getPropType(propValue) {
864
- var propType = typeof propValue;
865
- if (Array.isArray(propValue)) {
866
- return "array";
867
- }
868
- if (propValue instanceof RegExp) {
869
- return "object";
870
- }
871
- if (isSymbol(propType, propValue)) {
872
- return "symbol";
873
- }
874
- return propType;
875
- }
876
- function getPreciseType(propValue) {
877
- if (typeof propValue === "undefined" || propValue === null) {
878
- return "" + propValue;
879
- }
880
- var propType = getPropType(propValue);
881
- if (propType === "object") {
882
- if (propValue instanceof Date) {
883
- return "date";
884
- } else if (propValue instanceof RegExp) {
885
- return "regexp";
886
- }
887
- }
888
- return propType;
889
- }
890
- function getPostfixForTypeWarning(value) {
891
- var type = getPreciseType(value);
892
- switch (type) {
893
- case "array":
894
- case "object":
895
- return "an " + type;
896
- case "boolean":
897
- case "date":
898
- case "regexp":
899
- return "a " + type;
900
- default:
901
- return type;
902
- }
903
- }
904
- function getClassName(propValue) {
905
- if (!propValue.constructor || !propValue.constructor.name) {
906
- return ANONYMOUS;
907
- }
908
- return propValue.constructor.name;
909
- }
910
- ReactPropTypes.checkPropTypes = checkPropTypes;
911
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
912
- ReactPropTypes.PropTypes = ReactPropTypes;
913
- return ReactPropTypes;
914
- };
915
- }
916
- });
917
-
918
- // node_modules/prop-types/factoryWithThrowingShims.js
919
- var require_factoryWithThrowingShims = __commonJS({
920
- "node_modules/prop-types/factoryWithThrowingShims.js"(exports, module) {
921
- "use strict";
922
- var ReactPropTypesSecret = require_ReactPropTypesSecret();
923
- function emptyFunction() {
924
- }
925
- function emptyFunctionWithReset() {
926
- }
927
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
928
- module.exports = function() {
929
- function shim(props, propName, componentName, location, propFullName, secret) {
930
- if (secret === ReactPropTypesSecret) {
931
- return;
932
- }
933
- var err = new Error(
934
- "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"
935
- );
936
- err.name = "Invariant Violation";
937
- throw err;
938
- }
939
- ;
940
- shim.isRequired = shim;
941
- function getShim() {
942
- return shim;
943
- }
944
- ;
945
- var ReactPropTypes = {
946
- array: shim,
947
- bigint: shim,
948
- bool: shim,
949
- func: shim,
950
- number: shim,
951
- object: shim,
952
- string: shim,
953
- symbol: shim,
954
- any: shim,
955
- arrayOf: getShim,
956
- element: shim,
957
- elementType: shim,
958
- instanceOf: getShim,
959
- node: shim,
960
- objectOf: getShim,
961
- oneOf: getShim,
962
- oneOfType: getShim,
963
- shape: getShim,
964
- exact: getShim,
965
- checkPropTypes: emptyFunctionWithReset,
966
- resetWarningCache: emptyFunction
967
- };
968
- ReactPropTypes.PropTypes = ReactPropTypes;
969
- return ReactPropTypes;
970
- };
971
- }
972
- });
973
-
974
- // node_modules/prop-types/index.js
975
- var require_prop_types = __commonJS({
976
- "node_modules/prop-types/index.js"(exports, module) {
977
- "use strict";
978
- if (process.env.NODE_ENV !== "production") {
979
- ReactIs = require_react_is();
980
- throwOnDirectAccess = true;
981
- module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
982
- } else {
983
- module.exports = require_factoryWithThrowingShims()();
984
- }
985
- var ReactIs;
986
- var throwOnDirectAccess;
987
- }
988
- });
989
-
990
- // node_modules/clsx/dist/clsx.m.js
991
- var clsx_m_exports = {};
992
- __export(clsx_m_exports, {
993
- clsx: () => clsx,
994
- default: () => clsx_m_default
995
- });
996
- function r(e) {
997
- var t, f, n = "";
998
- if ("string" == typeof e || "number" == typeof e)
999
- n += e;
1000
- else if ("object" == typeof e)
1001
- if (Array.isArray(e))
1002
- for (t = 0; t < e.length; t++)
1003
- e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
1004
- else
1005
- for (t in e)
1006
- e[t] && (n && (n += " "), n += t);
1007
- return n;
1008
- }
1009
- function clsx() {
1010
- for (var e, t, f = 0, n = ""; f < arguments.length; )
1011
- (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
1012
- return n;
1013
- }
1014
- var clsx_m_default;
1015
- var init_clsx_m = __esm({
1016
- "node_modules/clsx/dist/clsx.m.js"() {
1017
- "use strict";
1018
- clsx_m_default = clsx;
1019
- }
1020
- });
1021
-
1022
- // node_modules/react-draggable/build/cjs/utils/shims.js
1023
- var require_shims = __commonJS({
1024
- "node_modules/react-draggable/build/cjs/utils/shims.js"(exports) {
1025
- "use strict";
1026
- Object.defineProperty(exports, "__esModule", {
1027
- value: true
1028
- });
1029
- exports.dontSetMe = dontSetMe;
1030
- exports.findInArray = findInArray;
1031
- exports.int = int;
1032
- exports.isFunction = isFunction;
1033
- exports.isNum = isNum;
1034
- function findInArray(array, callback) {
1035
- for (let i = 0, length = array.length; i < length; i++) {
1036
- if (callback.apply(callback, [array[i], i, array]))
1037
- return array[i];
1038
- }
1039
- }
1040
- function isFunction(func) {
1041
- return typeof func === "function" || Object.prototype.toString.call(func) === "[object Function]";
1042
- }
1043
- function isNum(num) {
1044
- return typeof num === "number" && !isNaN(num);
1045
- }
1046
- function int(a) {
1047
- return parseInt(a, 10);
1048
- }
1049
- function dontSetMe(props, propName, componentName) {
1050
- if (props[propName]) {
1051
- return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child."));
1052
- }
1053
- }
1054
- }
1055
- });
1056
-
1057
- // node_modules/react-draggable/build/cjs/utils/getPrefix.js
1058
- var require_getPrefix = __commonJS({
1059
- "node_modules/react-draggable/build/cjs/utils/getPrefix.js"(exports) {
1060
- "use strict";
1061
- Object.defineProperty(exports, "__esModule", {
1062
- value: true
1063
- });
1064
- exports.browserPrefixToKey = browserPrefixToKey;
1065
- exports.browserPrefixToStyle = browserPrefixToStyle;
1066
- exports.default = void 0;
1067
- exports.getPrefix = getPrefix;
1068
- var prefixes = ["Moz", "Webkit", "O", "ms"];
1069
- function getPrefix() {
1070
- var _window$document;
1071
- let prop = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
1072
- if (typeof window === "undefined")
1073
- return "";
1074
- const style = (_window$document = window.document) === null || _window$document === void 0 || (_window$document = _window$document.documentElement) === null || _window$document === void 0 ? void 0 : _window$document.style;
1075
- if (!style)
1076
- return "";
1077
- if (prop in style)
1078
- return "";
1079
- for (let i = 0; i < prefixes.length; i++) {
1080
- if (browserPrefixToKey(prop, prefixes[i]) in style)
1081
- return prefixes[i];
1082
- }
1083
- return "";
1084
- }
1085
- function browserPrefixToKey(prop, prefix) {
1086
- return prefix ? "".concat(prefix).concat(kebabToTitleCase(prop)) : prop;
1087
- }
1088
- function browserPrefixToStyle(prop, prefix) {
1089
- return prefix ? "-".concat(prefix.toLowerCase(), "-").concat(prop) : prop;
1090
- }
1091
- function kebabToTitleCase(str) {
1092
- let out = "";
1093
- let shouldCapitalize = true;
1094
- for (let i = 0; i < str.length; i++) {
1095
- if (shouldCapitalize) {
1096
- out += str[i].toUpperCase();
1097
- shouldCapitalize = false;
1098
- } else if (str[i] === "-") {
1099
- shouldCapitalize = true;
1100
- } else {
1101
- out += str[i];
1102
- }
1103
- }
1104
- return out;
1105
- }
1106
- var _default = exports.default = getPrefix();
1107
- }
1108
- });
1109
-
1110
- // node_modules/react-draggable/build/cjs/utils/domFns.js
1111
- var require_domFns = __commonJS({
1112
- "node_modules/react-draggable/build/cjs/utils/domFns.js"(exports) {
1113
- "use strict";
1114
- Object.defineProperty(exports, "__esModule", {
1115
- value: true
1116
- });
1117
- exports.addClassName = addClassName;
1118
- exports.addEvent = addEvent;
1119
- exports.addUserSelectStyles = addUserSelectStyles;
1120
- exports.createCSSTransform = createCSSTransform;
1121
- exports.createSVGTransform = createSVGTransform;
1122
- exports.getTouch = getTouch;
1123
- exports.getTouchIdentifier = getTouchIdentifier;
1124
- exports.getTranslation = getTranslation;
1125
- exports.innerHeight = innerHeight;
1126
- exports.innerWidth = innerWidth;
1127
- exports.matchesSelector = matchesSelector;
1128
- exports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
1129
- exports.offsetXYFromParent = offsetXYFromParent;
1130
- exports.outerHeight = outerHeight;
1131
- exports.outerWidth = outerWidth;
1132
- exports.removeClassName = removeClassName;
1133
- exports.removeEvent = removeEvent;
1134
- exports.removeUserSelectStyles = removeUserSelectStyles;
1135
- var _shims = require_shims();
1136
- var _getPrefix = _interopRequireWildcard(require_getPrefix());
1137
- function _getRequireWildcardCache(nodeInterop) {
1138
- if (typeof WeakMap !== "function")
1139
- return null;
1140
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
1141
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
1142
- return (_getRequireWildcardCache = function(nodeInterop2) {
1143
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
1144
- })(nodeInterop);
1145
- }
1146
- function _interopRequireWildcard(obj, nodeInterop) {
1147
- if (!nodeInterop && obj && obj.__esModule) {
1148
- return obj;
1149
- }
1150
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
1151
- return { default: obj };
1152
- }
1153
- var cache = _getRequireWildcardCache(nodeInterop);
1154
- if (cache && cache.has(obj)) {
1155
- return cache.get(obj);
1156
- }
1157
- var newObj = {};
1158
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
1159
- for (var key in obj) {
1160
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
1161
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
1162
- if (desc && (desc.get || desc.set)) {
1163
- Object.defineProperty(newObj, key, desc);
1164
- } else {
1165
- newObj[key] = obj[key];
1166
- }
1167
- }
1168
- }
1169
- newObj.default = obj;
1170
- if (cache) {
1171
- cache.set(obj, newObj);
1172
- }
1173
- return newObj;
1174
- }
1175
- var matchesSelectorFunc = "";
1176
- function matchesSelector(el, selector) {
1177
- if (!matchesSelectorFunc) {
1178
- matchesSelectorFunc = (0, _shims.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(method) {
1179
- return (0, _shims.isFunction)(el[method]);
1180
- });
1181
- }
1182
- if (!(0, _shims.isFunction)(el[matchesSelectorFunc]))
1183
- return false;
1184
- return el[matchesSelectorFunc](selector);
1185
- }
1186
- function matchesSelectorAndParentsTo(el, selector, baseNode) {
1187
- let node = el;
1188
- do {
1189
- if (matchesSelector(node, selector))
1190
- return true;
1191
- if (node === baseNode)
1192
- return false;
1193
- node = node.parentNode;
1194
- } while (node);
1195
- return false;
1196
- }
1197
- function addEvent(el, event, handler, inputOptions) {
1198
- if (!el)
1199
- return;
1200
- const options = {
1201
- capture: true,
1202
- ...inputOptions
1203
- };
1204
- if (el.addEventListener) {
1205
- el.addEventListener(event, handler, options);
1206
- } else if (el.attachEvent) {
1207
- el.attachEvent("on" + event, handler);
1208
- } else {
1209
- el["on" + event] = handler;
1210
- }
1211
- }
1212
- function removeEvent(el, event, handler, inputOptions) {
1213
- if (!el)
1214
- return;
1215
- const options = {
1216
- capture: true,
1217
- ...inputOptions
1218
- };
1219
- if (el.removeEventListener) {
1220
- el.removeEventListener(event, handler, options);
1221
- } else if (el.detachEvent) {
1222
- el.detachEvent("on" + event, handler);
1223
- } else {
1224
- el["on" + event] = null;
1225
- }
1226
- }
1227
- function outerHeight(node) {
1228
- let height = node.clientHeight;
1229
- const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1230
- height += (0, _shims.int)(computedStyle.borderTopWidth);
1231
- height += (0, _shims.int)(computedStyle.borderBottomWidth);
1232
- return height;
1233
- }
1234
- function outerWidth(node) {
1235
- let width = node.clientWidth;
1236
- const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1237
- width += (0, _shims.int)(computedStyle.borderLeftWidth);
1238
- width += (0, _shims.int)(computedStyle.borderRightWidth);
1239
- return width;
1240
- }
1241
- function innerHeight(node) {
1242
- let height = node.clientHeight;
1243
- const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1244
- height -= (0, _shims.int)(computedStyle.paddingTop);
1245
- height -= (0, _shims.int)(computedStyle.paddingBottom);
1246
- return height;
1247
- }
1248
- function innerWidth(node) {
1249
- let width = node.clientWidth;
1250
- const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
1251
- width -= (0, _shims.int)(computedStyle.paddingLeft);
1252
- width -= (0, _shims.int)(computedStyle.paddingRight);
1253
- return width;
1254
- }
1255
- function offsetXYFromParent(evt, offsetParent, scale) {
1256
- const isBody = offsetParent === offsetParent.ownerDocument.body;
1257
- const offsetParentRect = isBody ? {
1258
- left: 0,
1259
- top: 0
1260
- } : offsetParent.getBoundingClientRect();
1261
- const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;
1262
- const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;
1263
- return {
1264
- x,
1265
- y
1266
- };
1267
- }
1268
- function createCSSTransform(controlPos, positionOffset) {
1269
- const translation = getTranslation(controlPos, positionOffset, "px");
1270
- return {
1271
- [(0, _getPrefix.browserPrefixToKey)("transform", _getPrefix.default)]: translation
1272
- };
1273
- }
1274
- function createSVGTransform(controlPos, positionOffset) {
1275
- const translation = getTranslation(controlPos, positionOffset, "");
1276
- return translation;
1277
- }
1278
- function getTranslation(_ref, positionOffset, unitSuffix) {
1279
- let {
1280
- x,
1281
- y
1282
- } = _ref;
1283
- let translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y).concat(unitSuffix, ")");
1284
- if (positionOffset) {
1285
- const defaultX = "".concat(typeof positionOffset.x === "string" ? positionOffset.x : positionOffset.x + unitSuffix);
1286
- const defaultY = "".concat(typeof positionOffset.y === "string" ? positionOffset.y : positionOffset.y + unitSuffix);
1287
- translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation;
1288
- }
1289
- return translation;
1290
- }
1291
- function getTouch(e, identifier) {
1292
- return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, (t) => identifier === t.identifier) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, (t) => identifier === t.identifier);
1293
- }
1294
- function getTouchIdentifier(e) {
1295
- if (e.targetTouches && e.targetTouches[0])
1296
- return e.targetTouches[0].identifier;
1297
- if (e.changedTouches && e.changedTouches[0])
1298
- return e.changedTouches[0].identifier;
1299
- }
1300
- function addUserSelectStyles(doc) {
1301
- if (!doc)
1302
- return;
1303
- let styleEl = doc.getElementById("react-draggable-style-el");
1304
- if (!styleEl) {
1305
- styleEl = doc.createElement("style");
1306
- styleEl.type = "text/css";
1307
- styleEl.id = "react-draggable-style-el";
1308
- styleEl.innerHTML = ".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n";
1309
- styleEl.innerHTML += ".react-draggable-transparent-selection *::selection {all: inherit;}\n";
1310
- doc.getElementsByTagName("head")[0].appendChild(styleEl);
1311
- }
1312
- if (doc.body)
1313
- addClassName(doc.body, "react-draggable-transparent-selection");
1314
- }
1315
- function removeUserSelectStyles(doc) {
1316
- if (!doc)
1317
- return;
1318
- try {
1319
- if (doc.body)
1320
- removeClassName(doc.body, "react-draggable-transparent-selection");
1321
- if (doc.selection) {
1322
- doc.selection.empty();
1323
- } else {
1324
- const selection = (doc.defaultView || window).getSelection();
1325
- if (selection && selection.type !== "Caret") {
1326
- selection.removeAllRanges();
1327
- }
1328
- }
1329
- } catch (e) {
1330
- }
1331
- }
1332
- function addClassName(el, className) {
1333
- if (el.classList) {
1334
- el.classList.add(className);
1335
- } else {
1336
- if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) {
1337
- el.className += " ".concat(className);
1338
- }
1339
- }
1340
- }
1341
- function removeClassName(el, className) {
1342
- if (el.classList) {
1343
- el.classList.remove(className);
1344
- } else {
1345
- el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), "g"), "");
1346
- }
1347
- }
1348
- }
1349
- });
1350
-
1351
- // node_modules/react-draggable/build/cjs/utils/positionFns.js
1352
- var require_positionFns = __commonJS({
1353
- "node_modules/react-draggable/build/cjs/utils/positionFns.js"(exports) {
1354
- "use strict";
1355
- Object.defineProperty(exports, "__esModule", {
1356
- value: true
1357
- });
1358
- exports.canDragX = canDragX;
1359
- exports.canDragY = canDragY;
1360
- exports.createCoreData = createCoreData;
1361
- exports.createDraggableData = createDraggableData;
1362
- exports.getBoundPosition = getBoundPosition;
1363
- exports.getControlPosition = getControlPosition;
1364
- exports.snapToGrid = snapToGrid;
1365
- var _shims = require_shims();
1366
- var _domFns = require_domFns();
1367
- function getBoundPosition(draggable, x, y) {
1368
- if (!draggable.props.bounds)
1369
- return [x, y];
1370
- let {
1371
- bounds
1372
- } = draggable.props;
1373
- bounds = typeof bounds === "string" ? bounds : cloneBounds(bounds);
1374
- const node = findDOMNode(draggable);
1375
- if (typeof bounds === "string") {
1376
- const {
1377
- ownerDocument
1378
- } = node;
1379
- const ownerWindow = ownerDocument.defaultView;
1380
- let boundNode;
1381
- if (bounds === "parent") {
1382
- boundNode = node.parentNode;
1383
- } else {
1384
- boundNode = ownerDocument.querySelector(bounds);
1385
- }
1386
- if (!(boundNode instanceof ownerWindow.HTMLElement)) {
1387
- throw new Error('Bounds selector "' + bounds + '" could not find an element.');
1388
- }
1389
- const boundNodeEl = boundNode;
1390
- const nodeStyle = ownerWindow.getComputedStyle(node);
1391
- const boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl);
1392
- bounds = {
1393
- left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),
1394
- top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),
1395
- right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),
1396
- bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)
1397
- };
1398
- }
1399
- if ((0, _shims.isNum)(bounds.right))
1400
- x = Math.min(x, bounds.right);
1401
- if ((0, _shims.isNum)(bounds.bottom))
1402
- y = Math.min(y, bounds.bottom);
1403
- if ((0, _shims.isNum)(bounds.left))
1404
- x = Math.max(x, bounds.left);
1405
- if ((0, _shims.isNum)(bounds.top))
1406
- y = Math.max(y, bounds.top);
1407
- return [x, y];
1408
- }
1409
- function snapToGrid(grid, pendingX, pendingY) {
1410
- const x = Math.round(pendingX / grid[0]) * grid[0];
1411
- const y = Math.round(pendingY / grid[1]) * grid[1];
1412
- return [x, y];
1413
- }
1414
- function canDragX(draggable) {
1415
- return draggable.props.axis === "both" || draggable.props.axis === "x";
1416
- }
1417
- function canDragY(draggable) {
1418
- return draggable.props.axis === "both" || draggable.props.axis === "y";
1419
- }
1420
- function getControlPosition(e, touchIdentifier, draggableCore) {
1421
- const touchObj = typeof touchIdentifier === "number" ? (0, _domFns.getTouch)(e, touchIdentifier) : null;
1422
- if (typeof touchIdentifier === "number" && !touchObj)
1423
- return null;
1424
- const node = findDOMNode(draggableCore);
1425
- const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;
1426
- return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);
1427
- }
1428
- function createCoreData(draggable, x, y) {
1429
- const isStart = !(0, _shims.isNum)(draggable.lastX);
1430
- const node = findDOMNode(draggable);
1431
- if (isStart) {
1432
- return {
1433
- node,
1434
- deltaX: 0,
1435
- deltaY: 0,
1436
- lastX: x,
1437
- lastY: y,
1438
- x,
1439
- y
1440
- };
1441
- } else {
1442
- return {
1443
- node,
1444
- deltaX: x - draggable.lastX,
1445
- deltaY: y - draggable.lastY,
1446
- lastX: draggable.lastX,
1447
- lastY: draggable.lastY,
1448
- x,
1449
- y
1450
- };
1451
- }
1452
- }
1453
- function createDraggableData(draggable, coreData) {
1454
- const scale = draggable.props.scale;
1455
- return {
1456
- node: coreData.node,
1457
- x: draggable.state.x + coreData.deltaX / scale,
1458
- y: draggable.state.y + coreData.deltaY / scale,
1459
- deltaX: coreData.deltaX / scale,
1460
- deltaY: coreData.deltaY / scale,
1461
- lastX: draggable.state.x,
1462
- lastY: draggable.state.y
1463
- };
1464
- }
1465
- function cloneBounds(bounds) {
1466
- return {
1467
- left: bounds.left,
1468
- top: bounds.top,
1469
- right: bounds.right,
1470
- bottom: bounds.bottom
1471
- };
1472
- }
1473
- function findDOMNode(draggable) {
1474
- const node = draggable.findDOMNode();
1475
- if (!node) {
1476
- throw new Error("<DraggableCore>: Unmounted during event!");
1477
- }
1478
- return node;
1479
- }
1480
- }
1481
- });
1482
-
1483
- // node_modules/react-draggable/build/cjs/utils/log.js
1484
- var require_log = __commonJS({
1485
- "node_modules/react-draggable/build/cjs/utils/log.js"(exports) {
1486
- "use strict";
1487
- Object.defineProperty(exports, "__esModule", {
1488
- value: true
1489
- });
1490
- exports.default = log;
1491
- function log() {
1492
- if (void 0)
1493
- console.log(...arguments);
1494
- }
1495
- }
1496
- });
1497
-
1498
- // node_modules/react-draggable/build/cjs/DraggableCore.js
1499
- var require_DraggableCore = __commonJS({
1500
- "node_modules/react-draggable/build/cjs/DraggableCore.js"(exports) {
1501
- "use strict";
1502
- Object.defineProperty(exports, "__esModule", {
1503
- value: true
1504
- });
1505
- exports.default = void 0;
1506
- var React = _interopRequireWildcard(__require("react"));
1507
- var _propTypes = _interopRequireDefault(require_prop_types());
1508
- var _reactDom = _interopRequireDefault(__require("react-dom"));
1509
- var _domFns = require_domFns();
1510
- var _positionFns = require_positionFns();
1511
- var _shims = require_shims();
1512
- var _log = _interopRequireDefault(require_log());
1513
- function _interopRequireDefault(obj) {
1514
- return obj && obj.__esModule ? obj : { default: obj };
1515
- }
1516
- function _getRequireWildcardCache(nodeInterop) {
1517
- if (typeof WeakMap !== "function")
1518
- return null;
1519
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
1520
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
1521
- return (_getRequireWildcardCache = function(nodeInterop2) {
1522
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
1523
- })(nodeInterop);
1524
- }
1525
- function _interopRequireWildcard(obj, nodeInterop) {
1526
- if (!nodeInterop && obj && obj.__esModule) {
1527
- return obj;
1528
- }
1529
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
1530
- return { default: obj };
1531
- }
1532
- var cache = _getRequireWildcardCache(nodeInterop);
1533
- if (cache && cache.has(obj)) {
1534
- return cache.get(obj);
1535
- }
1536
- var newObj = {};
1537
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
1538
- for (var key in obj) {
1539
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
1540
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
1541
- if (desc && (desc.get || desc.set)) {
1542
- Object.defineProperty(newObj, key, desc);
1543
- } else {
1544
- newObj[key] = obj[key];
1545
- }
1546
- }
1547
- }
1548
- newObj.default = obj;
1549
- if (cache) {
1550
- cache.set(obj, newObj);
1551
- }
1552
- return newObj;
1553
- }
1554
- function _defineProperty(obj, key, value) {
1555
- key = _toPropertyKey(key);
1556
- if (key in obj) {
1557
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
1558
- } else {
1559
- obj[key] = value;
1560
- }
1561
- return obj;
1562
- }
1563
- function _toPropertyKey(arg) {
1564
- var key = _toPrimitive(arg, "string");
1565
- return typeof key === "symbol" ? key : String(key);
1566
- }
1567
- function _toPrimitive(input, hint) {
1568
- if (typeof input !== "object" || input === null)
1569
- return input;
1570
- var prim = input[Symbol.toPrimitive];
1571
- if (prim !== void 0) {
1572
- var res = prim.call(input, hint || "default");
1573
- if (typeof res !== "object")
1574
- return res;
1575
- throw new TypeError("@@toPrimitive must return a primitive value.");
1576
- }
1577
- return (hint === "string" ? String : Number)(input);
1578
- }
1579
- var eventsFor = {
1580
- touch: {
1581
- start: "touchstart",
1582
- move: "touchmove",
1583
- stop: "touchend"
1584
- },
1585
- mouse: {
1586
- start: "mousedown",
1587
- move: "mousemove",
1588
- stop: "mouseup"
1589
- }
1590
- };
1591
- var dragEventFor = eventsFor.mouse;
1592
- var DraggableCore = class extends React.Component {
1593
- constructor() {
1594
- super(...arguments);
1595
- _defineProperty(this, "dragging", false);
1596
- _defineProperty(this, "lastX", NaN);
1597
- _defineProperty(this, "lastY", NaN);
1598
- _defineProperty(this, "touchIdentifier", null);
1599
- _defineProperty(this, "mounted", false);
1600
- _defineProperty(this, "handleDragStart", (e) => {
1601
- this.props.onMouseDown(e);
1602
- if (!this.props.allowAnyClick && typeof e.button === "number" && e.button !== 0)
1603
- return false;
1604
- const thisNode = this.findDOMNode();
1605
- if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {
1606
- throw new Error("<DraggableCore> not mounted on DragStart!");
1607
- }
1608
- const {
1609
- ownerDocument
1610
- } = thisNode;
1611
- if (this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.handle, thisNode) || this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, this.props.cancel, thisNode)) {
1612
- return;
1613
- }
1614
- if (e.type === "touchstart")
1615
- e.preventDefault();
1616
- const touchIdentifier = (0, _domFns.getTouchIdentifier)(e);
1617
- this.touchIdentifier = touchIdentifier;
1618
- const position = (0, _positionFns.getControlPosition)(e, touchIdentifier, this);
1619
- if (position == null)
1620
- return;
1621
- const {
1622
- x,
1623
- y
1624
- } = position;
1625
- const coreEvent = (0, _positionFns.createCoreData)(this, x, y);
1626
- (0, _log.default)("DraggableCore: handleDragStart: %j", coreEvent);
1627
- (0, _log.default)("calling", this.props.onStart);
1628
- const shouldUpdate = this.props.onStart(e, coreEvent);
1629
- if (shouldUpdate === false || this.mounted === false)
1630
- return;
1631
- if (this.props.enableUserSelectHack)
1632
- (0, _domFns.addUserSelectStyles)(ownerDocument);
1633
- this.dragging = true;
1634
- this.lastX = x;
1635
- this.lastY = y;
1636
- (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, this.handleDrag);
1637
- (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, this.handleDragStop);
1638
- });
1639
- _defineProperty(this, "handleDrag", (e) => {
1640
- const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this);
1641
- if (position == null)
1642
- return;
1643
- let {
1644
- x,
1645
- y
1646
- } = position;
1647
- if (Array.isArray(this.props.grid)) {
1648
- let deltaX = x - this.lastX, deltaY = y - this.lastY;
1649
- [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);
1650
- if (!deltaX && !deltaY)
1651
- return;
1652
- x = this.lastX + deltaX, y = this.lastY + deltaY;
1653
- }
1654
- const coreEvent = (0, _positionFns.createCoreData)(this, x, y);
1655
- (0, _log.default)("DraggableCore: handleDrag: %j", coreEvent);
1656
- const shouldUpdate = this.props.onDrag(e, coreEvent);
1657
- if (shouldUpdate === false || this.mounted === false) {
1658
- try {
1659
- this.handleDragStop(new MouseEvent("mouseup"));
1660
- } catch (err) {
1661
- const event = document.createEvent("MouseEvents");
1662
- event.initMouseEvent("mouseup", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
1663
- this.handleDragStop(event);
1664
- }
1665
- return;
1666
- }
1667
- this.lastX = x;
1668
- this.lastY = y;
1669
- });
1670
- _defineProperty(this, "handleDragStop", (e) => {
1671
- if (!this.dragging)
1672
- return;
1673
- const position = (0, _positionFns.getControlPosition)(e, this.touchIdentifier, this);
1674
- if (position == null)
1675
- return;
1676
- let {
1677
- x,
1678
- y
1679
- } = position;
1680
- if (Array.isArray(this.props.grid)) {
1681
- let deltaX = x - this.lastX || 0;
1682
- let deltaY = y - this.lastY || 0;
1683
- [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);
1684
- x = this.lastX + deltaX, y = this.lastY + deltaY;
1685
- }
1686
- const coreEvent = (0, _positionFns.createCoreData)(this, x, y);
1687
- const shouldContinue = this.props.onStop(e, coreEvent);
1688
- if (shouldContinue === false || this.mounted === false)
1689
- return false;
1690
- const thisNode = this.findDOMNode();
1691
- if (thisNode) {
1692
- if (this.props.enableUserSelectHack)
1693
- (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);
1694
- }
1695
- (0, _log.default)("DraggableCore: handleDragStop: %j", coreEvent);
1696
- this.dragging = false;
1697
- this.lastX = NaN;
1698
- this.lastY = NaN;
1699
- if (thisNode) {
1700
- (0, _log.default)("DraggableCore: Removing handlers");
1701
- (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);
1702
- (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);
1703
- }
1704
- });
1705
- _defineProperty(this, "onMouseDown", (e) => {
1706
- dragEventFor = eventsFor.mouse;
1707
- return this.handleDragStart(e);
1708
- });
1709
- _defineProperty(this, "onMouseUp", (e) => {
1710
- dragEventFor = eventsFor.mouse;
1711
- return this.handleDragStop(e);
1712
- });
1713
- _defineProperty(this, "onTouchStart", (e) => {
1714
- dragEventFor = eventsFor.touch;
1715
- return this.handleDragStart(e);
1716
- });
1717
- _defineProperty(this, "onTouchEnd", (e) => {
1718
- dragEventFor = eventsFor.touch;
1719
- return this.handleDragStop(e);
1720
- });
1721
- }
1722
- componentDidMount() {
1723
- this.mounted = true;
1724
- const thisNode = this.findDOMNode();
1725
- if (thisNode) {
1726
- (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
1727
- passive: false
1728
- });
1729
- }
1730
- }
1731
- componentWillUnmount() {
1732
- this.mounted = false;
1733
- const thisNode = this.findDOMNode();
1734
- if (thisNode) {
1735
- const {
1736
- ownerDocument
1737
- } = thisNode;
1738
- (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);
1739
- (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);
1740
- (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);
1741
- (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);
1742
- (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
1743
- passive: false
1744
- });
1745
- if (this.props.enableUserSelectHack)
1746
- (0, _domFns.removeUserSelectStyles)(ownerDocument);
1747
- }
1748
- }
1749
- // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
1750
- // the underlying DOM node ourselves. See the README for more information.
1751
- findDOMNode() {
1752
- var _this$props, _this$props2;
1753
- return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.nodeRef) === null || _this$props2 === void 0 ? void 0 : _this$props2.current : _reactDom.default.findDOMNode(this);
1754
- }
1755
- render() {
1756
- return /* @__PURE__ */ React.cloneElement(React.Children.only(this.props.children), {
1757
- // Note: mouseMove handler is attached to document so it will still function
1758
- // when the user drags quickly and leaves the bounds of the element.
1759
- onMouseDown: this.onMouseDown,
1760
- onMouseUp: this.onMouseUp,
1761
- // onTouchStart is added on `componentDidMount` so they can be added with
1762
- // {passive: false}, which allows it to cancel. See
1763
- // https://developers.google.com/web/updates/2017/01/scrolling-intervention
1764
- onTouchEnd: this.onTouchEnd
1765
- });
1766
- }
1767
- };
1768
- exports.default = DraggableCore;
1769
- _defineProperty(DraggableCore, "displayName", "DraggableCore");
1770
- _defineProperty(DraggableCore, "propTypes", {
1771
- /**
1772
- * `allowAnyClick` allows dragging using any mouse button.
1773
- * By default, we only accept the left button.
1774
- *
1775
- * Defaults to `false`.
1776
- */
1777
- allowAnyClick: _propTypes.default.bool,
1778
- children: _propTypes.default.node.isRequired,
1779
- /**
1780
- * `disabled`, if true, stops the <Draggable> from dragging. All handlers,
1781
- * with the exception of `onMouseDown`, will not fire.
1782
- */
1783
- disabled: _propTypes.default.bool,
1784
- /**
1785
- * By default, we add 'user-select:none' attributes to the document body
1786
- * to prevent ugly text selection during drag. If this is causing problems
1787
- * for your app, set this to `false`.
1788
- */
1789
- enableUserSelectHack: _propTypes.default.bool,
1790
- /**
1791
- * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
1792
- * instead of using the parent node.
1793
- */
1794
- offsetParent: function(props, propName) {
1795
- if (props[propName] && props[propName].nodeType !== 1) {
1796
- throw new Error("Draggable's offsetParent must be a DOM Node.");
1797
- }
1798
- },
1799
- /**
1800
- * `grid` specifies the x and y that dragging should snap to.
1801
- */
1802
- grid: _propTypes.default.arrayOf(_propTypes.default.number),
1803
- /**
1804
- * `handle` specifies a selector to be used as the handle that initiates drag.
1805
- *
1806
- * Example:
1807
- *
1808
- * ```jsx
1809
- * let App = React.createClass({
1810
- * render: function () {
1811
- * return (
1812
- * <Draggable handle=".handle">
1813
- * <div>
1814
- * <div className="handle">Click me to drag</div>
1815
- * <div>This is some other content</div>
1816
- * </div>
1817
- * </Draggable>
1818
- * );
1819
- * }
1820
- * });
1821
- * ```
1822
- */
1823
- handle: _propTypes.default.string,
1824
- /**
1825
- * `cancel` specifies a selector to be used to prevent drag initialization.
1826
- *
1827
- * Example:
1828
- *
1829
- * ```jsx
1830
- * let App = React.createClass({
1831
- * render: function () {
1832
- * return(
1833
- * <Draggable cancel=".cancel">
1834
- * <div>
1835
- * <div className="cancel">You can't drag from here</div>
1836
- * <div>Dragging here works fine</div>
1837
- * </div>
1838
- * </Draggable>
1839
- * );
1840
- * }
1841
- * });
1842
- * ```
1843
- */
1844
- cancel: _propTypes.default.string,
1845
- /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
1846
- * Unfortunately, in order for <Draggable> to work properly, we need raw access
1847
- * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
1848
- * as in this example:
1849
- *
1850
- * function MyComponent() {
1851
- * const nodeRef = React.useRef(null);
1852
- * return (
1853
- * <Draggable nodeRef={nodeRef}>
1854
- * <div ref={nodeRef}>Example Target</div>
1855
- * </Draggable>
1856
- * );
1857
- * }
1858
- *
1859
- * This can be used for arbitrarily nested components, so long as the ref ends up
1860
- * pointing to the actual child DOM node and not a custom component.
1861
- */
1862
- nodeRef: _propTypes.default.object,
1863
- /**
1864
- * Called when dragging starts.
1865
- * If this function returns the boolean false, dragging will be canceled.
1866
- */
1867
- onStart: _propTypes.default.func,
1868
- /**
1869
- * Called while dragging.
1870
- * If this function returns the boolean false, dragging will be canceled.
1871
- */
1872
- onDrag: _propTypes.default.func,
1873
- /**
1874
- * Called when dragging stops.
1875
- * If this function returns the boolean false, the drag will remain active.
1876
- */
1877
- onStop: _propTypes.default.func,
1878
- /**
1879
- * A workaround option which can be passed if onMouseDown needs to be accessed,
1880
- * since it'll always be blocked (as there is internal use of onMouseDown)
1881
- */
1882
- onMouseDown: _propTypes.default.func,
1883
- /**
1884
- * `scale`, if set, applies scaling while dragging an element
1885
- */
1886
- scale: _propTypes.default.number,
1887
- /**
1888
- * These properties should be defined on the child, not here.
1889
- */
1890
- className: _shims.dontSetMe,
1891
- style: _shims.dontSetMe,
1892
- transform: _shims.dontSetMe
1893
- });
1894
- _defineProperty(DraggableCore, "defaultProps", {
1895
- allowAnyClick: false,
1896
- // by default only accept left click
1897
- disabled: false,
1898
- enableUserSelectHack: true,
1899
- onStart: function() {
1900
- },
1901
- onDrag: function() {
1902
- },
1903
- onStop: function() {
1904
- },
1905
- onMouseDown: function() {
1906
- },
1907
- scale: 1
1908
- });
1909
- }
1910
- });
1911
-
1912
- // node_modules/react-draggable/build/cjs/Draggable.js
1913
- var require_Draggable = __commonJS({
1914
- "node_modules/react-draggable/build/cjs/Draggable.js"(exports) {
1915
- "use strict";
1916
- Object.defineProperty(exports, "__esModule", {
1917
- value: true
1918
- });
1919
- Object.defineProperty(exports, "DraggableCore", {
1920
- enumerable: true,
1921
- get: function() {
1922
- return _DraggableCore.default;
1923
- }
1924
- });
1925
- exports.default = void 0;
1926
- var React = _interopRequireWildcard(__require("react"));
1927
- var _propTypes = _interopRequireDefault(require_prop_types());
1928
- var _reactDom = _interopRequireDefault(__require("react-dom"));
1929
- var _clsx = _interopRequireDefault((init_clsx_m(), __toCommonJS(clsx_m_exports)));
1930
- var _domFns = require_domFns();
1931
- var _positionFns = require_positionFns();
1932
- var _shims = require_shims();
1933
- var _DraggableCore = _interopRequireDefault(require_DraggableCore());
1934
- var _log = _interopRequireDefault(require_log());
1935
- function _interopRequireDefault(obj) {
1936
- return obj && obj.__esModule ? obj : { default: obj };
1937
- }
1938
- function _getRequireWildcardCache(nodeInterop) {
1939
- if (typeof WeakMap !== "function")
1940
- return null;
1941
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
1942
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
1943
- return (_getRequireWildcardCache = function(nodeInterop2) {
1944
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
1945
- })(nodeInterop);
1946
- }
1947
- function _interopRequireWildcard(obj, nodeInterop) {
1948
- if (!nodeInterop && obj && obj.__esModule) {
1949
- return obj;
1950
- }
1951
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
1952
- return { default: obj };
1953
- }
1954
- var cache = _getRequireWildcardCache(nodeInterop);
1955
- if (cache && cache.has(obj)) {
1956
- return cache.get(obj);
1957
- }
1958
- var newObj = {};
1959
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
1960
- for (var key in obj) {
1961
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
1962
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
1963
- if (desc && (desc.get || desc.set)) {
1964
- Object.defineProperty(newObj, key, desc);
1965
- } else {
1966
- newObj[key] = obj[key];
1967
- }
1968
- }
1969
- }
1970
- newObj.default = obj;
1971
- if (cache) {
1972
- cache.set(obj, newObj);
1973
- }
1974
- return newObj;
1975
- }
1976
- function _extends() {
1977
- _extends = Object.assign ? Object.assign.bind() : function(target) {
1978
- for (var i = 1; i < arguments.length; i++) {
1979
- var source = arguments[i];
1980
- for (var key in source) {
1981
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1982
- target[key] = source[key];
1983
- }
1984
- }
1985
- }
1986
- return target;
1987
- };
1988
- return _extends.apply(this, arguments);
1989
- }
1990
- function _defineProperty(obj, key, value) {
1991
- key = _toPropertyKey(key);
1992
- if (key in obj) {
1993
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
1994
- } else {
1995
- obj[key] = value;
1996
- }
1997
- return obj;
1998
- }
1999
- function _toPropertyKey(arg) {
2000
- var key = _toPrimitive(arg, "string");
2001
- return typeof key === "symbol" ? key : String(key);
2002
- }
2003
- function _toPrimitive(input, hint) {
2004
- if (typeof input !== "object" || input === null)
2005
- return input;
2006
- var prim = input[Symbol.toPrimitive];
2007
- if (prim !== void 0) {
2008
- var res = prim.call(input, hint || "default");
2009
- if (typeof res !== "object")
2010
- return res;
2011
- throw new TypeError("@@toPrimitive must return a primitive value.");
2012
- }
2013
- return (hint === "string" ? String : Number)(input);
2014
- }
2015
- var Draggable = class extends React.Component {
2016
- // React 16.3+
2017
- // Arity (props, state)
2018
- static getDerivedStateFromProps(_ref, _ref2) {
2019
- let {
2020
- position
2021
- } = _ref;
2022
- let {
2023
- prevPropsPosition
2024
- } = _ref2;
2025
- if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {
2026
- (0, _log.default)("Draggable: getDerivedStateFromProps %j", {
2027
- position,
2028
- prevPropsPosition
2029
- });
2030
- return {
2031
- x: position.x,
2032
- y: position.y,
2033
- prevPropsPosition: {
2034
- ...position
2035
- }
2036
- };
2037
- }
2038
- return null;
2039
- }
2040
- constructor(props) {
2041
- super(props);
2042
- _defineProperty(this, "onDragStart", (e, coreData) => {
2043
- (0, _log.default)("Draggable: onDragStart: %j", coreData);
2044
- const shouldStart = this.props.onStart(e, (0, _positionFns.createDraggableData)(this, coreData));
2045
- if (shouldStart === false)
2046
- return false;
2047
- this.setState({
2048
- dragging: true,
2049
- dragged: true
2050
- });
2051
- });
2052
- _defineProperty(this, "onDrag", (e, coreData) => {
2053
- if (!this.state.dragging)
2054
- return false;
2055
- (0, _log.default)("Draggable: onDrag: %j", coreData);
2056
- const uiData = (0, _positionFns.createDraggableData)(this, coreData);
2057
- const newState = {
2058
- x: uiData.x,
2059
- y: uiData.y,
2060
- slackX: 0,
2061
- slackY: 0
2062
- };
2063
- if (this.props.bounds) {
2064
- const {
2065
- x,
2066
- y
2067
- } = newState;
2068
- newState.x += this.state.slackX;
2069
- newState.y += this.state.slackY;
2070
- const [newStateX, newStateY] = (0, _positionFns.getBoundPosition)(this, newState.x, newState.y);
2071
- newState.x = newStateX;
2072
- newState.y = newStateY;
2073
- newState.slackX = this.state.slackX + (x - newState.x);
2074
- newState.slackY = this.state.slackY + (y - newState.y);
2075
- uiData.x = newState.x;
2076
- uiData.y = newState.y;
2077
- uiData.deltaX = newState.x - this.state.x;
2078
- uiData.deltaY = newState.y - this.state.y;
2079
- }
2080
- const shouldUpdate = this.props.onDrag(e, uiData);
2081
- if (shouldUpdate === false)
2082
- return false;
2083
- this.setState(newState);
2084
- });
2085
- _defineProperty(this, "onDragStop", (e, coreData) => {
2086
- if (!this.state.dragging)
2087
- return false;
2088
- const shouldContinue = this.props.onStop(e, (0, _positionFns.createDraggableData)(this, coreData));
2089
- if (shouldContinue === false)
2090
- return false;
2091
- (0, _log.default)("Draggable: onDragStop: %j", coreData);
2092
- const newState = {
2093
- dragging: false,
2094
- slackX: 0,
2095
- slackY: 0
2096
- };
2097
- const controlled = Boolean(this.props.position);
2098
- if (controlled) {
2099
- const {
2100
- x,
2101
- y
2102
- } = this.props.position;
2103
- newState.x = x;
2104
- newState.y = y;
2105
- }
2106
- this.setState(newState);
2107
- });
2108
- this.state = {
2109
- // Whether or not we are currently dragging.
2110
- dragging: false,
2111
- // Whether or not we have been dragged before.
2112
- dragged: false,
2113
- // Current transform x and y.
2114
- x: props.position ? props.position.x : props.defaultPosition.x,
2115
- y: props.position ? props.position.y : props.defaultPosition.y,
2116
- prevPropsPosition: {
2117
- ...props.position
2118
- },
2119
- // Used for compensating for out-of-bounds drags
2120
- slackX: 0,
2121
- slackY: 0,
2122
- // Can only determine if SVG after mounting
2123
- isElementSVG: false
2124
- };
2125
- if (props.position && !(props.onDrag || props.onStop)) {
2126
- 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.");
2127
- }
2128
- }
2129
- componentDidMount() {
2130
- if (typeof window.SVGElement !== "undefined" && this.findDOMNode() instanceof window.SVGElement) {
2131
- this.setState({
2132
- isElementSVG: true
2133
- });
2134
- }
2135
- }
2136
- componentWillUnmount() {
2137
- this.setState({
2138
- dragging: false
2139
- });
2140
- }
2141
- // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
2142
- // the underlying DOM node ourselves. See the README for more information.
2143
- findDOMNode() {
2144
- var _this$props$nodeRef$c, _this$props;
2145
- return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.nodeRef) === null || _this$props === void 0 ? void 0 : _this$props.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this);
2146
- }
2147
- render() {
2148
- const {
2149
- axis,
2150
- bounds,
2151
- children,
2152
- defaultPosition,
2153
- defaultClassName,
2154
- defaultClassNameDragging,
2155
- defaultClassNameDragged,
2156
- position,
2157
- positionOffset,
2158
- scale,
2159
- ...draggableCoreProps
2160
- } = this.props;
2161
- let style = {};
2162
- let svgTransform = null;
2163
- const controlled = Boolean(position);
2164
- const draggable = !controlled || this.state.dragging;
2165
- const validPosition = position || defaultPosition;
2166
- const transformOpts = {
2167
- // Set left if horizontal drag is enabled
2168
- x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,
2169
- // Set top if vertical drag is enabled
2170
- y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y
2171
- };
2172
- if (this.state.isElementSVG) {
2173
- svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);
2174
- } else {
2175
- style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);
2176
- }
2177
- const className = (0, _clsx.default)(children.props.className || "", defaultClassName, {
2178
- [defaultClassNameDragging]: this.state.dragging,
2179
- [defaultClassNameDragged]: this.state.dragged
2180
- });
2181
- return /* @__PURE__ */ React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {
2182
- onStart: this.onDragStart,
2183
- onDrag: this.onDrag,
2184
- onStop: this.onDragStop
2185
- }), /* @__PURE__ */ React.cloneElement(React.Children.only(children), {
2186
- className,
2187
- style: {
2188
- ...children.props.style,
2189
- ...style
2190
- },
2191
- transform: svgTransform
2192
- }));
2193
- }
2194
- };
2195
- exports.default = Draggable;
2196
- _defineProperty(Draggable, "displayName", "Draggable");
2197
- _defineProperty(Draggable, "propTypes", {
2198
- // Accepts all props <DraggableCore> accepts.
2199
- ..._DraggableCore.default.propTypes,
2200
- /**
2201
- * `axis` determines which axis the draggable can move.
2202
- *
2203
- * Note that all callbacks will still return data as normal. This only
2204
- * controls flushing to the DOM.
2205
- *
2206
- * 'both' allows movement horizontally and vertically.
2207
- * 'x' limits movement to horizontal axis.
2208
- * 'y' limits movement to vertical axis.
2209
- * 'none' limits all movement.
2210
- *
2211
- * Defaults to 'both'.
2212
- */
2213
- axis: _propTypes.default.oneOf(["both", "x", "y", "none"]),
2214
- /**
2215
- * `bounds` determines the range of movement available to the element.
2216
- * Available values are:
2217
- *
2218
- * 'parent' restricts movement within the Draggable's parent node.
2219
- *
2220
- * Alternatively, pass an object with the following properties, all of which are optional:
2221
- *
2222
- * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
2223
- *
2224
- * All values are in px.
2225
- *
2226
- * Example:
2227
- *
2228
- * ```jsx
2229
- * let App = React.createClass({
2230
- * render: function () {
2231
- * return (
2232
- * <Draggable bounds={{right: 300, bottom: 300}}>
2233
- * <div>Content</div>
2234
- * </Draggable>
2235
- * );
2236
- * }
2237
- * });
2238
- * ```
2239
- */
2240
- bounds: _propTypes.default.oneOfType([_propTypes.default.shape({
2241
- left: _propTypes.default.number,
2242
- right: _propTypes.default.number,
2243
- top: _propTypes.default.number,
2244
- bottom: _propTypes.default.number
2245
- }), _propTypes.default.string, _propTypes.default.oneOf([false])]),
2246
- defaultClassName: _propTypes.default.string,
2247
- defaultClassNameDragging: _propTypes.default.string,
2248
- defaultClassNameDragged: _propTypes.default.string,
2249
- /**
2250
- * `defaultPosition` specifies the x and y that the dragged item should start at
2251
- *
2252
- * Example:
2253
- *
2254
- * ```jsx
2255
- * let App = React.createClass({
2256
- * render: function () {
2257
- * return (
2258
- * <Draggable defaultPosition={{x: 25, y: 25}}>
2259
- * <div>I start with transformX: 25px and transformY: 25px;</div>
2260
- * </Draggable>
2261
- * );
2262
- * }
2263
- * });
2264
- * ```
2265
- */
2266
- defaultPosition: _propTypes.default.shape({
2267
- x: _propTypes.default.number,
2268
- y: _propTypes.default.number
2269
- }),
2270
- positionOffset: _propTypes.default.shape({
2271
- x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
2272
- y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])
2273
- }),
2274
- /**
2275
- * `position`, if present, defines the current position of the element.
2276
- *
2277
- * This is similar to how form elements in React work - if no `position` is supplied, the component
2278
- * is uncontrolled.
2279
- *
2280
- * Example:
2281
- *
2282
- * ```jsx
2283
- * let App = React.createClass({
2284
- * render: function () {
2285
- * return (
2286
- * <Draggable position={{x: 25, y: 25}}>
2287
- * <div>I start with transformX: 25px and transformY: 25px;</div>
2288
- * </Draggable>
2289
- * );
2290
- * }
2291
- * });
2292
- * ```
2293
- */
2294
- position: _propTypes.default.shape({
2295
- x: _propTypes.default.number,
2296
- y: _propTypes.default.number
2297
- }),
2298
- /**
2299
- * These properties should be defined on the child, not here.
2300
- */
2301
- className: _shims.dontSetMe,
2302
- style: _shims.dontSetMe,
2303
- transform: _shims.dontSetMe
2304
- });
2305
- _defineProperty(Draggable, "defaultProps", {
2306
- ..._DraggableCore.default.defaultProps,
2307
- axis: "both",
2308
- bounds: false,
2309
- defaultClassName: "react-draggable",
2310
- defaultClassNameDragging: "react-draggable-dragging",
2311
- defaultClassNameDragged: "react-draggable-dragged",
2312
- defaultPosition: {
2313
- x: 0,
2314
- y: 0
2315
- },
2316
- scale: 1
2317
- });
2318
- }
2319
- });
2320
-
2321
- // node_modules/react-draggable/build/cjs/cjs.js
2322
- var require_cjs = __commonJS({
2323
- "node_modules/react-draggable/build/cjs/cjs.js"(exports, module) {
2324
- "use strict";
2325
- var {
2326
- default: Draggable,
2327
- DraggableCore
2328
- } = require_Draggable();
2329
- module.exports = Draggable;
2330
- module.exports.default = Draggable;
2331
- module.exports.DraggableCore = DraggableCore;
2332
- }
2333
- });
2334
-
2335
- // node_modules/react-resizable/build/utils.js
2336
- var require_utils = __commonJS({
2337
- "node_modules/react-resizable/build/utils.js"(exports) {
2338
- "use strict";
2339
- exports.__esModule = true;
2340
- exports.cloneElement = cloneElement;
2341
- var _react = _interopRequireDefault(__require("react"));
2342
- function _interopRequireDefault(obj) {
2343
- return obj && obj.__esModule ? obj : { default: obj };
2344
- }
2345
- function ownKeys(object, enumerableOnly) {
2346
- var keys = Object.keys(object);
2347
- if (Object.getOwnPropertySymbols) {
2348
- var symbols = Object.getOwnPropertySymbols(object);
2349
- enumerableOnly && (symbols = symbols.filter(function(sym) {
2350
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2351
- })), keys.push.apply(keys, symbols);
2352
- }
2353
- return keys;
2354
- }
2355
- function _objectSpread(target) {
2356
- for (var i = 1; i < arguments.length; i++) {
2357
- var source = null != arguments[i] ? arguments[i] : {};
2358
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
2359
- _defineProperty(target, key, source[key]);
2360
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
2361
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2362
- });
2363
- }
2364
- return target;
2365
- }
2366
- function _defineProperty(obj, key, value) {
2367
- key = _toPropertyKey(key);
2368
- if (key in obj) {
2369
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
2370
- } else {
2371
- obj[key] = value;
2372
- }
2373
- return obj;
2374
- }
2375
- function _toPropertyKey(arg) {
2376
- var key = _toPrimitive(arg, "string");
2377
- return typeof key === "symbol" ? key : String(key);
2378
- }
2379
- function _toPrimitive(input, hint) {
2380
- if (typeof input !== "object" || input === null)
2381
- return input;
2382
- var prim = input[Symbol.toPrimitive];
2383
- if (prim !== void 0) {
2384
- var res = prim.call(input, hint || "default");
2385
- if (typeof res !== "object")
2386
- return res;
2387
- throw new TypeError("@@toPrimitive must return a primitive value.");
2388
- }
2389
- return (hint === "string" ? String : Number)(input);
2390
- }
2391
- function cloneElement(element, props) {
2392
- if (props.style && element.props.style) {
2393
- props.style = _objectSpread(_objectSpread({}, element.props.style), props.style);
2394
- }
2395
- if (props.className && element.props.className) {
2396
- props.className = element.props.className + " " + props.className;
2397
- }
2398
- return /* @__PURE__ */ _react.default.cloneElement(element, props);
2399
- }
2400
- }
2401
- });
2402
-
2403
- // node_modules/react-resizable/build/propTypes.js
2404
- var require_propTypes = __commonJS({
2405
- "node_modules/react-resizable/build/propTypes.js"(exports) {
2406
- "use strict";
2407
- exports.__esModule = true;
2408
- exports.resizableProps = void 0;
2409
- var _propTypes = _interopRequireDefault(require_prop_types());
2410
- var _reactDraggable = require_cjs();
2411
- function _interopRequireDefault(obj) {
2412
- return obj && obj.__esModule ? obj : { default: obj };
2413
- }
2414
- var resizableProps = {
2415
- /*
2416
- * Restricts resizing to a particular axis (default: 'both')
2417
- * 'both' - allows resizing by width or height
2418
- * 'x' - only allows the width to be changed
2419
- * 'y' - only allows the height to be changed
2420
- * 'none' - disables resizing altogether
2421
- * */
2422
- axis: _propTypes.default.oneOf(["both", "x", "y", "none"]),
2423
- className: _propTypes.default.string,
2424
- /*
2425
- * Require that one and only one child be present.
2426
- * */
2427
- children: _propTypes.default.element.isRequired,
2428
- /*
2429
- * These will be passed wholesale to react-draggable's DraggableCore
2430
- * */
2431
- draggableOpts: _propTypes.default.shape({
2432
- allowAnyClick: _propTypes.default.bool,
2433
- cancel: _propTypes.default.string,
2434
- children: _propTypes.default.node,
2435
- disabled: _propTypes.default.bool,
2436
- enableUserSelectHack: _propTypes.default.bool,
2437
- offsetParent: _propTypes.default.node,
2438
- grid: _propTypes.default.arrayOf(_propTypes.default.number),
2439
- handle: _propTypes.default.string,
2440
- nodeRef: _propTypes.default.object,
2441
- onStart: _propTypes.default.func,
2442
- onDrag: _propTypes.default.func,
2443
- onStop: _propTypes.default.func,
2444
- onMouseDown: _propTypes.default.func,
2445
- scale: _propTypes.default.number
2446
- }),
2447
- /*
2448
- * Initial height
2449
- * */
2450
- height: function height() {
2451
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2452
- args[_key] = arguments[_key];
2453
- }
2454
- var props = args[0];
2455
- if (props.axis === "both" || props.axis === "y") {
2456
- var _PropTypes$number;
2457
- return (_PropTypes$number = _propTypes.default.number).isRequired.apply(_PropTypes$number, args);
2458
- }
2459
- return _propTypes.default.number.apply(_propTypes.default, args);
2460
- },
2461
- /*
2462
- * Customize cursor resize handle
2463
- * */
2464
- handle: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
2465
- /*
2466
- * If you change this, be sure to update your css
2467
- * */
2468
- handleSize: _propTypes.default.arrayOf(_propTypes.default.number),
2469
- lockAspectRatio: _propTypes.default.bool,
2470
- /*
2471
- * Max X & Y measure
2472
- * */
2473
- maxConstraints: _propTypes.default.arrayOf(_propTypes.default.number),
2474
- /*
2475
- * Min X & Y measure
2476
- * */
2477
- minConstraints: _propTypes.default.arrayOf(_propTypes.default.number),
2478
- /*
2479
- * Called on stop resize event
2480
- * */
2481
- onResizeStop: _propTypes.default.func,
2482
- /*
2483
- * Called on start resize event
2484
- * */
2485
- onResizeStart: _propTypes.default.func,
2486
- /*
2487
- * Called on resize event
2488
- * */
2489
- onResize: _propTypes.default.func,
2490
- /*
2491
- * Defines which resize handles should be rendered (default: 'se')
2492
- * 's' - South handle (bottom-center)
2493
- * 'w' - West handle (left-center)
2494
- * 'e' - East handle (right-center)
2495
- * 'n' - North handle (top-center)
2496
- * 'sw' - Southwest handle (bottom-left)
2497
- * 'nw' - Northwest handle (top-left)
2498
- * 'se' - Southeast handle (bottom-right)
2499
- * 'ne' - Northeast handle (top-center)
2500
- * */
2501
- resizeHandles: _propTypes.default.arrayOf(_propTypes.default.oneOf(["s", "w", "e", "n", "sw", "nw", "se", "ne"])),
2502
- /*
2503
- * If `transform: scale(n)` is set on the parent, this should be set to `n`.
2504
- * */
2505
- transformScale: _propTypes.default.number,
2506
- /*
2507
- * Initial width
2508
- */
2509
- width: function width() {
2510
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2511
- args[_key2] = arguments[_key2];
2512
- }
2513
- var props = args[0];
2514
- if (props.axis === "both" || props.axis === "x") {
2515
- var _PropTypes$number2;
2516
- return (_PropTypes$number2 = _propTypes.default.number).isRequired.apply(_PropTypes$number2, args);
2517
- }
2518
- return _propTypes.default.number.apply(_propTypes.default, args);
2519
- }
2520
- };
2521
- exports.resizableProps = resizableProps;
2522
- }
2523
- });
2524
-
2525
- // node_modules/react-resizable/build/Resizable.js
2526
- var require_Resizable = __commonJS({
2527
- "node_modules/react-resizable/build/Resizable.js"(exports) {
2528
- "use strict";
2529
- exports.__esModule = true;
2530
- exports.default = void 0;
2531
- var React = _interopRequireWildcard(__require("react"));
2532
- var _reactDraggable = require_cjs();
2533
- var _utils = require_utils();
2534
- var _propTypes = require_propTypes();
2535
- var _excluded = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
2536
- function _getRequireWildcardCache(nodeInterop) {
2537
- if (typeof WeakMap !== "function")
2538
- return null;
2539
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
2540
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
2541
- return (_getRequireWildcardCache = function _getRequireWildcardCache2(nodeInterop2) {
2542
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
2543
- })(nodeInterop);
2544
- }
2545
- function _interopRequireWildcard(obj, nodeInterop) {
2546
- if (!nodeInterop && obj && obj.__esModule) {
2547
- return obj;
2548
- }
2549
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
2550
- return { default: obj };
2551
- }
2552
- var cache = _getRequireWildcardCache(nodeInterop);
2553
- if (cache && cache.has(obj)) {
2554
- return cache.get(obj);
2555
- }
2556
- var newObj = {};
2557
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
2558
- for (var key in obj) {
2559
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
2560
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
2561
- if (desc && (desc.get || desc.set)) {
2562
- Object.defineProperty(newObj, key, desc);
2563
- } else {
2564
- newObj[key] = obj[key];
2565
- }
2566
- }
2567
- }
2568
- newObj.default = obj;
2569
- if (cache) {
2570
- cache.set(obj, newObj);
2571
- }
2572
- return newObj;
2573
- }
2574
- function _extends() {
2575
- _extends = Object.assign ? Object.assign.bind() : function(target) {
2576
- for (var i = 1; i < arguments.length; i++) {
2577
- var source = arguments[i];
2578
- for (var key in source) {
2579
- if (Object.prototype.hasOwnProperty.call(source, key)) {
2580
- target[key] = source[key];
2581
- }
2582
- }
2583
- }
2584
- return target;
2585
- };
2586
- return _extends.apply(this, arguments);
2587
- }
2588
- function _objectWithoutPropertiesLoose(source, excluded) {
2589
- if (source == null)
2590
- return {};
2591
- var target = {};
2592
- var sourceKeys = Object.keys(source);
2593
- var key, i;
2594
- for (i = 0; i < sourceKeys.length; i++) {
2595
- key = sourceKeys[i];
2596
- if (excluded.indexOf(key) >= 0)
2597
- continue;
2598
- target[key] = source[key];
2599
- }
2600
- return target;
2601
- }
2602
- function ownKeys(object, enumerableOnly) {
2603
- var keys = Object.keys(object);
2604
- if (Object.getOwnPropertySymbols) {
2605
- var symbols = Object.getOwnPropertySymbols(object);
2606
- enumerableOnly && (symbols = symbols.filter(function(sym) {
2607
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2608
- })), keys.push.apply(keys, symbols);
2609
- }
2610
- return keys;
2611
- }
2612
- function _objectSpread(target) {
2613
- for (var i = 1; i < arguments.length; i++) {
2614
- var source = null != arguments[i] ? arguments[i] : {};
2615
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
2616
- _defineProperty(target, key, source[key]);
2617
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
2618
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2619
- });
2620
- }
2621
- return target;
2622
- }
2623
- function _defineProperty(obj, key, value) {
2624
- key = _toPropertyKey(key);
2625
- if (key in obj) {
2626
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
2627
- } else {
2628
- obj[key] = value;
2629
- }
2630
- return obj;
2631
- }
2632
- function _toPropertyKey(arg) {
2633
- var key = _toPrimitive(arg, "string");
2634
- return typeof key === "symbol" ? key : String(key);
2635
- }
2636
- function _toPrimitive(input, hint) {
2637
- if (typeof input !== "object" || input === null)
2638
- return input;
2639
- var prim = input[Symbol.toPrimitive];
2640
- if (prim !== void 0) {
2641
- var res = prim.call(input, hint || "default");
2642
- if (typeof res !== "object")
2643
- return res;
2644
- throw new TypeError("@@toPrimitive must return a primitive value.");
2645
- }
2646
- return (hint === "string" ? String : Number)(input);
2647
- }
2648
- function _inheritsLoose(subClass, superClass) {
2649
- subClass.prototype = Object.create(superClass.prototype);
2650
- subClass.prototype.constructor = subClass;
2651
- _setPrototypeOf(subClass, superClass);
2652
- }
2653
- function _setPrototypeOf(o, p) {
2654
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
2655
- o2.__proto__ = p2;
2656
- return o2;
2657
- };
2658
- return _setPrototypeOf(o, p);
2659
- }
2660
- var Resizable2 = /* @__PURE__ */ function(_React$Component) {
2661
- _inheritsLoose(Resizable3, _React$Component);
2662
- function Resizable3() {
2663
- var _this;
2664
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2665
- args[_key] = arguments[_key];
2666
- }
2667
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2668
- _this.handleRefs = {};
2669
- _this.lastHandleRect = null;
2670
- _this.slack = null;
2671
- return _this;
2672
- }
2673
- var _proto = Resizable3.prototype;
2674
- _proto.componentWillUnmount = function componentWillUnmount() {
2675
- this.resetData();
2676
- };
2677
- _proto.resetData = function resetData() {
2678
- this.lastHandleRect = this.slack = null;
2679
- };
2680
- _proto.runConstraints = function runConstraints(width, height) {
2681
- var _this$props = this.props, minConstraints = _this$props.minConstraints, maxConstraints = _this$props.maxConstraints, lockAspectRatio = _this$props.lockAspectRatio;
2682
- if (!minConstraints && !maxConstraints && !lockAspectRatio)
2683
- return [width, height];
2684
- if (lockAspectRatio) {
2685
- var ratio = this.props.width / this.props.height;
2686
- var deltaW = width - this.props.width;
2687
- var deltaH = height - this.props.height;
2688
- if (Math.abs(deltaW) > Math.abs(deltaH * ratio)) {
2689
- height = width / ratio;
2690
- } else {
2691
- width = height * ratio;
2692
- }
2693
- }
2694
- var oldW = width, oldH = height;
2695
- var _ref = this.slack || [0, 0], slackW = _ref[0], slackH = _ref[1];
2696
- width += slackW;
2697
- height += slackH;
2698
- if (minConstraints) {
2699
- width = Math.max(minConstraints[0], width);
2700
- height = Math.max(minConstraints[1], height);
2701
- }
2702
- if (maxConstraints) {
2703
- width = Math.min(maxConstraints[0], width);
2704
- height = Math.min(maxConstraints[1], height);
2705
- }
2706
- this.slack = [slackW + (oldW - width), slackH + (oldH - height)];
2707
- return [width, height];
2708
- };
2709
- _proto.resizeHandler = function resizeHandler(handlerName, axis) {
2710
- var _this2 = this;
2711
- return function(e, _ref2) {
2712
- var node = _ref2.node, deltaX = _ref2.deltaX, deltaY = _ref2.deltaY;
2713
- if (handlerName === "onResizeStart")
2714
- _this2.resetData();
2715
- var canDragX = (_this2.props.axis === "both" || _this2.props.axis === "x") && axis !== "n" && axis !== "s";
2716
- var canDragY = (_this2.props.axis === "both" || _this2.props.axis === "y") && axis !== "e" && axis !== "w";
2717
- if (!canDragX && !canDragY)
2718
- return;
2719
- var axisV = axis[0];
2720
- var axisH = axis[axis.length - 1];
2721
- var handleRect = node.getBoundingClientRect();
2722
- if (_this2.lastHandleRect != null) {
2723
- if (axisH === "w") {
2724
- var deltaLeftSinceLast = handleRect.left - _this2.lastHandleRect.left;
2725
- deltaX += deltaLeftSinceLast;
2726
- }
2727
- if (axisV === "n") {
2728
- var deltaTopSinceLast = handleRect.top - _this2.lastHandleRect.top;
2729
- deltaY += deltaTopSinceLast;
2730
- }
2731
- }
2732
- _this2.lastHandleRect = handleRect;
2733
- if (axisH === "w")
2734
- deltaX = -deltaX;
2735
- if (axisV === "n")
2736
- deltaY = -deltaY;
2737
- var width = _this2.props.width + (canDragX ? deltaX / _this2.props.transformScale : 0);
2738
- var height = _this2.props.height + (canDragY ? deltaY / _this2.props.transformScale : 0);
2739
- var _this2$runConstraints = _this2.runConstraints(width, height);
2740
- width = _this2$runConstraints[0];
2741
- height = _this2$runConstraints[1];
2742
- var dimensionsChanged = width !== _this2.props.width || height !== _this2.props.height;
2743
- var cb = typeof _this2.props[handlerName] === "function" ? _this2.props[handlerName] : null;
2744
- var shouldSkipCb = handlerName === "onResize" && !dimensionsChanged;
2745
- if (cb && !shouldSkipCb) {
2746
- e.persist == null ? void 0 : e.persist();
2747
- cb(e, {
2748
- node,
2749
- size: {
2750
- width,
2751
- height
2752
- },
2753
- handle: axis
2754
- });
2755
- }
2756
- if (handlerName === "onResizeStop")
2757
- _this2.resetData();
2758
- };
2759
- };
2760
- _proto.renderResizeHandle = function renderResizeHandle(handleAxis, ref) {
2761
- var handle = this.props.handle;
2762
- if (!handle) {
2763
- return /* @__PURE__ */ React.createElement("span", {
2764
- className: "react-resizable-handle react-resizable-handle-" + handleAxis,
2765
- ref
2766
- });
2767
- }
2768
- if (typeof handle === "function") {
2769
- return handle(handleAxis, ref);
2770
- }
2771
- var isDOMElement = typeof handle.type === "string";
2772
- var props = _objectSpread({
2773
- ref
2774
- }, isDOMElement ? {} : {
2775
- handleAxis
2776
- });
2777
- return /* @__PURE__ */ React.cloneElement(handle, props);
2778
- };
2779
- _proto.render = function render() {
2780
- var _this3 = this;
2781
- var _this$props2 = this.props, children = _this$props2.children, className = _this$props2.className, draggableOpts = _this$props2.draggableOpts, width = _this$props2.width, height = _this$props2.height, handle = _this$props2.handle, handleSize = _this$props2.handleSize, lockAspectRatio = _this$props2.lockAspectRatio, axis = _this$props2.axis, minConstraints = _this$props2.minConstraints, maxConstraints = _this$props2.maxConstraints, onResize = _this$props2.onResize, onResizeStop = _this$props2.onResizeStop, onResizeStart = _this$props2.onResizeStart, resizeHandles = _this$props2.resizeHandles, transformScale = _this$props2.transformScale, p = _objectWithoutPropertiesLoose(_this$props2, _excluded);
2782
- return (0, _utils.cloneElement)(children, _objectSpread(_objectSpread({}, p), {}, {
2783
- className: (className ? className + " " : "") + "react-resizable",
2784
- children: [].concat(children.props.children, resizeHandles.map(function(handleAxis) {
2785
- var _this3$handleRefs$han;
2786
- var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /* @__PURE__ */ React.createRef();
2787
- return /* @__PURE__ */ React.createElement(_reactDraggable.DraggableCore, _extends({}, draggableOpts, {
2788
- nodeRef: ref,
2789
- key: "resizableHandle-" + handleAxis,
2790
- onStop: _this3.resizeHandler("onResizeStop", handleAxis),
2791
- onStart: _this3.resizeHandler("onResizeStart", handleAxis),
2792
- onDrag: _this3.resizeHandler("onResize", handleAxis)
2793
- }), _this3.renderResizeHandle(handleAxis, ref));
2794
- }))
2795
- }));
2796
- };
2797
- return Resizable3;
2798
- }(React.Component);
2799
- exports.default = Resizable2;
2800
- Resizable2.propTypes = _propTypes.resizableProps;
2801
- Resizable2.defaultProps = {
2802
- axis: "both",
2803
- handleSize: [20, 20],
2804
- lockAspectRatio: false,
2805
- minConstraints: [20, 20],
2806
- maxConstraints: [Infinity, Infinity],
2807
- resizeHandles: ["se"],
2808
- transformScale: 1
2809
- };
2810
- }
2811
- });
2812
-
2813
- // node_modules/react-resizable/build/ResizableBox.js
2814
- var require_ResizableBox = __commonJS({
2815
- "node_modules/react-resizable/build/ResizableBox.js"(exports) {
2816
- "use strict";
2817
- exports.__esModule = true;
2818
- exports.default = void 0;
2819
- var React = _interopRequireWildcard(__require("react"));
2820
- var _propTypes = _interopRequireDefault(require_prop_types());
2821
- var _Resizable = _interopRequireDefault(require_Resizable());
2822
- var _propTypes2 = require_propTypes();
2823
- var _excluded = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
2824
- function _interopRequireDefault(obj) {
2825
- return obj && obj.__esModule ? obj : { default: obj };
2826
- }
2827
- function _getRequireWildcardCache(nodeInterop) {
2828
- if (typeof WeakMap !== "function")
2829
- return null;
2830
- var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
2831
- var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
2832
- return (_getRequireWildcardCache = function _getRequireWildcardCache2(nodeInterop2) {
2833
- return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
2834
- })(nodeInterop);
2835
- }
2836
- function _interopRequireWildcard(obj, nodeInterop) {
2837
- if (!nodeInterop && obj && obj.__esModule) {
2838
- return obj;
2839
- }
2840
- if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
2841
- return { default: obj };
2842
- }
2843
- var cache = _getRequireWildcardCache(nodeInterop);
2844
- if (cache && cache.has(obj)) {
2845
- return cache.get(obj);
2846
- }
2847
- var newObj = {};
2848
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
2849
- for (var key in obj) {
2850
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
2851
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
2852
- if (desc && (desc.get || desc.set)) {
2853
- Object.defineProperty(newObj, key, desc);
2854
- } else {
2855
- newObj[key] = obj[key];
2856
- }
2857
- }
2858
- }
2859
- newObj.default = obj;
2860
- if (cache) {
2861
- cache.set(obj, newObj);
2862
- }
2863
- return newObj;
2864
- }
2865
- function _extends() {
2866
- _extends = Object.assign ? Object.assign.bind() : function(target) {
2867
- for (var i = 1; i < arguments.length; i++) {
2868
- var source = arguments[i];
2869
- for (var key in source) {
2870
- if (Object.prototype.hasOwnProperty.call(source, key)) {
2871
- target[key] = source[key];
2872
- }
2873
- }
2874
- }
2875
- return target;
2876
- };
2877
- return _extends.apply(this, arguments);
2878
- }
2879
- function ownKeys(object, enumerableOnly) {
2880
- var keys = Object.keys(object);
2881
- if (Object.getOwnPropertySymbols) {
2882
- var symbols = Object.getOwnPropertySymbols(object);
2883
- enumerableOnly && (symbols = symbols.filter(function(sym) {
2884
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2885
- })), keys.push.apply(keys, symbols);
2886
- }
2887
- return keys;
2888
- }
2889
- function _objectSpread(target) {
2890
- for (var i = 1; i < arguments.length; i++) {
2891
- var source = null != arguments[i] ? arguments[i] : {};
2892
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
2893
- _defineProperty(target, key, source[key]);
2894
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
2895
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2896
- });
2897
- }
2898
- return target;
2899
- }
2900
- function _defineProperty(obj, key, value) {
2901
- key = _toPropertyKey(key);
2902
- if (key in obj) {
2903
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
2904
- } else {
2905
- obj[key] = value;
2906
- }
2907
- return obj;
2908
- }
2909
- function _toPropertyKey(arg) {
2910
- var key = _toPrimitive(arg, "string");
2911
- return typeof key === "symbol" ? key : String(key);
2912
- }
2913
- function _toPrimitive(input, hint) {
2914
- if (typeof input !== "object" || input === null)
2915
- return input;
2916
- var prim = input[Symbol.toPrimitive];
2917
- if (prim !== void 0) {
2918
- var res = prim.call(input, hint || "default");
2919
- if (typeof res !== "object")
2920
- return res;
2921
- throw new TypeError("@@toPrimitive must return a primitive value.");
2922
- }
2923
- return (hint === "string" ? String : Number)(input);
2924
- }
2925
- function _objectWithoutPropertiesLoose(source, excluded) {
2926
- if (source == null)
2927
- return {};
2928
- var target = {};
2929
- var sourceKeys = Object.keys(source);
2930
- var key, i;
2931
- for (i = 0; i < sourceKeys.length; i++) {
2932
- key = sourceKeys[i];
2933
- if (excluded.indexOf(key) >= 0)
2934
- continue;
2935
- target[key] = source[key];
2936
- }
2937
- return target;
2938
- }
2939
- function _inheritsLoose(subClass, superClass) {
2940
- subClass.prototype = Object.create(superClass.prototype);
2941
- subClass.prototype.constructor = subClass;
2942
- _setPrototypeOf(subClass, superClass);
2943
- }
2944
- function _setPrototypeOf(o, p) {
2945
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
2946
- o2.__proto__ = p2;
2947
- return o2;
2948
- };
2949
- return _setPrototypeOf(o, p);
2950
- }
2951
- var ResizableBox = /* @__PURE__ */ function(_React$Component) {
2952
- _inheritsLoose(ResizableBox2, _React$Component);
2953
- function ResizableBox2() {
2954
- var _this;
2955
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2956
- args[_key] = arguments[_key];
2957
- }
2958
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2959
- _this.state = {
2960
- width: _this.props.width,
2961
- height: _this.props.height,
2962
- propsWidth: _this.props.width,
2963
- propsHeight: _this.props.height
2964
- };
2965
- _this.onResize = function(e, data) {
2966
- var size = data.size;
2967
- if (_this.props.onResize) {
2968
- e.persist == null ? void 0 : e.persist();
2969
- _this.setState(size, function() {
2970
- return _this.props.onResize && _this.props.onResize(e, data);
2971
- });
2972
- } else {
2973
- _this.setState(size);
2974
- }
2975
- };
2976
- return _this;
2977
- }
2978
- ResizableBox2.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {
2979
- if (state.propsWidth !== props.width || state.propsHeight !== props.height) {
2980
- return {
2981
- width: props.width,
2982
- height: props.height,
2983
- propsWidth: props.width,
2984
- propsHeight: props.height
2985
- };
2986
- }
2987
- return null;
2988
- };
2989
- var _proto = ResizableBox2.prototype;
2990
- _proto.render = function render() {
2991
- var _this$props = this.props, handle = _this$props.handle, handleSize = _this$props.handleSize, onResize = _this$props.onResize, onResizeStart = _this$props.onResizeStart, onResizeStop = _this$props.onResizeStop, draggableOpts = _this$props.draggableOpts, minConstraints = _this$props.minConstraints, maxConstraints = _this$props.maxConstraints, lockAspectRatio = _this$props.lockAspectRatio, axis = _this$props.axis, width = _this$props.width, height = _this$props.height, resizeHandles = _this$props.resizeHandles, style = _this$props.style, transformScale = _this$props.transformScale, props = _objectWithoutPropertiesLoose(_this$props, _excluded);
2992
- return /* @__PURE__ */ React.createElement(_Resizable.default, {
2993
- axis,
2994
- draggableOpts,
2995
- handle,
2996
- handleSize,
2997
- height: this.state.height,
2998
- lockAspectRatio,
2999
- maxConstraints,
3000
- minConstraints,
3001
- onResizeStart,
3002
- onResize: this.onResize,
3003
- onResizeStop,
3004
- resizeHandles,
3005
- transformScale,
3006
- width: this.state.width
3007
- }, /* @__PURE__ */ React.createElement("div", _extends({}, props, {
3008
- style: _objectSpread(_objectSpread({}, style), {}, {
3009
- width: this.state.width + "px",
3010
- height: this.state.height + "px"
3011
- })
3012
- })));
3013
- };
3014
- return ResizableBox2;
3015
- }(React.Component);
3016
- exports.default = ResizableBox;
3017
- ResizableBox.propTypes = _objectSpread(_objectSpread({}, _propTypes2.resizableProps), {}, {
3018
- children: _propTypes.default.element
3019
- });
3020
- }
3021
- });
3022
-
3023
- // node_modules/react-resizable/index.js
3024
- var require_react_resizable = __commonJS({
3025
- "node_modules/react-resizable/index.js"(exports, module) {
3026
- "use strict";
3027
- module.exports = function() {
3028
- throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
3029
- };
3030
- module.exports.Resizable = require_Resizable().default;
3031
- module.exports.ResizableBox = require_ResizableBox().default;
3032
- }
3033
- });
3034
-
3035
1
  // test-app/src/component/table/index.tsx
3036
2
  import { Fragment as Fragment17, forwardRef as forwardRef3, useEffect as useEffect8, useImperativeHandle, useRef as useRef3, useState as useState7 } from "react";
3037
3
  import { Button as Button5, DropdownMenu as DropdownMenu3, DropdownToggle as DropdownToggle3, Input as Input8, UncontrolledDropdown, UncontrolledTooltip as UncontrolledTooltip3 } from "reactstrap";
@@ -3250,15 +216,15 @@ var generateUUID = () => {
3250
216
  let d = (/* @__PURE__ */ new Date()).getTime();
3251
217
  let d2 = typeof performance !== "undefined" && performance.now && performance.now() * 1e3 || 0;
3252
218
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
3253
- let r2 = Math.random() * 16;
219
+ let r = Math.random() * 16;
3254
220
  if (d > 0) {
3255
- r2 = (d + r2) % 16 | 0;
221
+ r = (d + r) % 16 | 0;
3256
222
  d = Math.floor(d / 16);
3257
223
  } else {
3258
- r2 = (d2 + r2) % 16 | 0;
224
+ r = (d2 + r) % 16 | 0;
3259
225
  d2 = Math.floor(d2 / 16);
3260
226
  }
3261
- return (c === "x" ? r2 : 3).toString(16);
227
+ return (c === "x" ? r : 3).toString(16);
3262
228
  });
3263
229
  };
3264
230
  var objSymbolDecimal = { 0: ",", 1: "." };
@@ -5146,11 +2112,11 @@ var SelectTable = forwardRef2((props, ref) => {
5146
2112
  });
5147
2113
 
5148
2114
  // test-app/src/component/table/header.tsx
5149
- var import_react_resizable = __toESM(require_react_resizable());
5150
2115
  import { Fragment as Fragment14 } from "react";
5151
2116
  import classnames7 from "classnames";
5152
2117
  import { Input as Input7 } from "reactstrap";
5153
2118
  import { useTranslation as useTranslation10 } from "react-i18next";
2119
+ import { Resizable } from "react-resizable";
5154
2120
  import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
5155
2121
  var HeaderTableCol = (props) => {
5156
2122
  const {
@@ -5176,7 +2142,7 @@ var HeaderTableCol = (props) => {
5176
2142
  }
5177
2143
  };
5178
2144
  return /* @__PURE__ */ jsx13(Fragment14, { children: col.visible !== false && /* @__PURE__ */ jsx13(
5179
- import_react_resizable.Resizable,
2145
+ Resizable,
5180
2146
  {
5181
2147
  className: "r-resize",
5182
2148
  width: typeof col.width === "number" ? col.width : Number((col.width ?? "").replaceAll(new RegExp(`[^0-9]`, "g"), "")),
@@ -7848,32 +4814,3 @@ export {
7848
4814
  roundNumber,
7849
4815
  useOnClickOutside
7850
4816
  };
7851
- /*! Bundled license information:
7852
-
7853
- react-is/cjs/react-is.production.min.js:
7854
- (** @license React v16.13.1
7855
- * react-is.production.min.js
7856
- *
7857
- * Copyright (c) Facebook, Inc. and its affiliates.
7858
- *
7859
- * This source code is licensed under the MIT license found in the
7860
- * LICENSE file in the root directory of this source tree.
7861
- *)
7862
-
7863
- react-is/cjs/react-is.development.js:
7864
- (** @license React v16.13.1
7865
- * react-is.development.js
7866
- *
7867
- * Copyright (c) Facebook, Inc. and its affiliates.
7868
- *
7869
- * This source code is licensed under the MIT license found in the
7870
- * LICENSE file in the root directory of this source tree.
7871
- *)
7872
-
7873
- object-assign/index.js:
7874
- (*
7875
- object-assign
7876
- (c) Sindre Sorhus
7877
- @license MIT
7878
- *)
7879
- */