@calenderjs/react 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -22,917 +22,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  mod
23
23
  ));
24
24
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
25
- const require$$0 = require("react");
26
- var jsxRuntime = { exports: {} };
27
- var reactJsxRuntime_production_min = {};
28
- var hasRequiredReactJsxRuntime_production_min;
29
- function requireReactJsxRuntime_production_min() {
30
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
31
- hasRequiredReactJsxRuntime_production_min = 1;
32
- var f = require$$0, k = /* @__PURE__ */ Symbol.for("react.element"), l = /* @__PURE__ */ Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
33
- function q(c, a, g) {
34
- var b, d = {}, e = null, h = null;
35
- void 0 !== g && (e = "" + g);
36
- void 0 !== a.key && (e = "" + a.key);
37
- void 0 !== a.ref && (h = a.ref);
38
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
39
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
40
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
41
- }
42
- reactJsxRuntime_production_min.Fragment = l;
43
- reactJsxRuntime_production_min.jsx = q;
44
- reactJsxRuntime_production_min.jsxs = q;
45
- return reactJsxRuntime_production_min;
46
- }
47
- var reactJsxRuntime_development = {};
48
- var hasRequiredReactJsxRuntime_development;
49
- function requireReactJsxRuntime_development() {
50
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
51
- hasRequiredReactJsxRuntime_development = 1;
52
- if (process.env.NODE_ENV !== "production") {
53
- (function() {
54
- var React = require$$0;
55
- var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
56
- var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
57
- var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
58
- var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
59
- var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
60
- var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
61
- var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
62
- var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
63
- var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
64
- var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
65
- var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
66
- var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
67
- var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
68
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
69
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
70
- function getIteratorFn(maybeIterable) {
71
- if (maybeIterable === null || typeof maybeIterable !== "object") {
72
- return null;
73
- }
74
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
75
- if (typeof maybeIterator === "function") {
76
- return maybeIterator;
77
- }
78
- return null;
79
- }
80
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
81
- function error(format) {
82
- {
83
- {
84
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
85
- args[_key2 - 1] = arguments[_key2];
86
- }
87
- printWarning("error", format, args);
88
- }
89
- }
90
- }
91
- function printWarning(level, format, args) {
92
- {
93
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
94
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
95
- if (stack !== "") {
96
- format += "%s";
97
- args = args.concat([stack]);
98
- }
99
- var argsWithFormat = args.map(function(item) {
100
- return String(item);
101
- });
102
- argsWithFormat.unshift("Warning: " + format);
103
- Function.prototype.apply.call(console[level], console, argsWithFormat);
104
- }
105
- }
106
- var enableScopeAPI = false;
107
- var enableCacheElement = false;
108
- var enableTransitionTracing = false;
109
- var enableLegacyHidden = false;
110
- var enableDebugTracing = false;
111
- var REACT_MODULE_REFERENCE;
112
- {
113
- REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
114
- }
115
- function isValidElementType(type) {
116
- if (typeof type === "string" || typeof type === "function") {
117
- return true;
118
- }
119
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
120
- return true;
121
- }
122
- if (typeof type === "object" && type !== null) {
123
- if (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 || // This needs to include all possible module reference object
124
- // types supported by any Flight configuration anywhere since
125
- // we don't know which Flight build this will end up being used
126
- // with.
127
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
128
- return true;
129
- }
130
- }
131
- return false;
132
- }
133
- function getWrappedName(outerType, innerType, wrapperName) {
134
- var displayName = outerType.displayName;
135
- if (displayName) {
136
- return displayName;
137
- }
138
- var functionName = innerType.displayName || innerType.name || "";
139
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
140
- }
141
- function getContextName(type) {
142
- return type.displayName || "Context";
143
- }
144
- function getComponentNameFromType(type) {
145
- if (type == null) {
146
- return null;
147
- }
148
- {
149
- if (typeof type.tag === "number") {
150
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
151
- }
152
- }
153
- if (typeof type === "function") {
154
- return type.displayName || type.name || null;
155
- }
156
- if (typeof type === "string") {
157
- return type;
158
- }
159
- switch (type) {
160
- case REACT_FRAGMENT_TYPE:
161
- return "Fragment";
162
- case REACT_PORTAL_TYPE:
163
- return "Portal";
164
- case REACT_PROFILER_TYPE:
165
- return "Profiler";
166
- case REACT_STRICT_MODE_TYPE:
167
- return "StrictMode";
168
- case REACT_SUSPENSE_TYPE:
169
- return "Suspense";
170
- case REACT_SUSPENSE_LIST_TYPE:
171
- return "SuspenseList";
172
- }
173
- if (typeof type === "object") {
174
- switch (type.$$typeof) {
175
- case REACT_CONTEXT_TYPE:
176
- var context = type;
177
- return getContextName(context) + ".Consumer";
178
- case REACT_PROVIDER_TYPE:
179
- var provider = type;
180
- return getContextName(provider._context) + ".Provider";
181
- case REACT_FORWARD_REF_TYPE:
182
- return getWrappedName(type, type.render, "ForwardRef");
183
- case REACT_MEMO_TYPE:
184
- var outerName = type.displayName || null;
185
- if (outerName !== null) {
186
- return outerName;
187
- }
188
- return getComponentNameFromType(type.type) || "Memo";
189
- case REACT_LAZY_TYPE: {
190
- var lazyComponent = type;
191
- var payload = lazyComponent._payload;
192
- var init = lazyComponent._init;
193
- try {
194
- return getComponentNameFromType(init(payload));
195
- } catch (x) {
196
- return null;
197
- }
198
- }
199
- }
200
- }
201
- return null;
202
- }
203
- var assign = Object.assign;
204
- var disabledDepth = 0;
205
- var prevLog;
206
- var prevInfo;
207
- var prevWarn;
208
- var prevError;
209
- var prevGroup;
210
- var prevGroupCollapsed;
211
- var prevGroupEnd;
212
- function disabledLog() {
213
- }
214
- disabledLog.__reactDisabledLog = true;
215
- function disableLogs() {
216
- {
217
- if (disabledDepth === 0) {
218
- prevLog = console.log;
219
- prevInfo = console.info;
220
- prevWarn = console.warn;
221
- prevError = console.error;
222
- prevGroup = console.group;
223
- prevGroupCollapsed = console.groupCollapsed;
224
- prevGroupEnd = console.groupEnd;
225
- var props = {
226
- configurable: true,
227
- enumerable: true,
228
- value: disabledLog,
229
- writable: true
230
- };
231
- Object.defineProperties(console, {
232
- info: props,
233
- log: props,
234
- warn: props,
235
- error: props,
236
- group: props,
237
- groupCollapsed: props,
238
- groupEnd: props
239
- });
240
- }
241
- disabledDepth++;
242
- }
243
- }
244
- function reenableLogs() {
245
- {
246
- disabledDepth--;
247
- if (disabledDepth === 0) {
248
- var props = {
249
- configurable: true,
250
- enumerable: true,
251
- writable: true
252
- };
253
- Object.defineProperties(console, {
254
- log: assign({}, props, {
255
- value: prevLog
256
- }),
257
- info: assign({}, props, {
258
- value: prevInfo
259
- }),
260
- warn: assign({}, props, {
261
- value: prevWarn
262
- }),
263
- error: assign({}, props, {
264
- value: prevError
265
- }),
266
- group: assign({}, props, {
267
- value: prevGroup
268
- }),
269
- groupCollapsed: assign({}, props, {
270
- value: prevGroupCollapsed
271
- }),
272
- groupEnd: assign({}, props, {
273
- value: prevGroupEnd
274
- })
275
- });
276
- }
277
- if (disabledDepth < 0) {
278
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
279
- }
280
- }
281
- }
282
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
283
- var prefix;
284
- function describeBuiltInComponentFrame(name, source, ownerFn) {
285
- {
286
- if (prefix === void 0) {
287
- try {
288
- throw Error();
289
- } catch (x) {
290
- var match = x.stack.trim().match(/\n( *(at )?)/);
291
- prefix = match && match[1] || "";
292
- }
293
- }
294
- return "\n" + prefix + name;
295
- }
296
- }
297
- var reentry = false;
298
- var componentFrameCache;
299
- {
300
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
301
- componentFrameCache = new PossiblyWeakMap();
302
- }
303
- function describeNativeComponentFrame(fn, construct) {
304
- if (!fn || reentry) {
305
- return "";
306
- }
307
- {
308
- var frame = componentFrameCache.get(fn);
309
- if (frame !== void 0) {
310
- return frame;
311
- }
312
- }
313
- var control;
314
- reentry = true;
315
- var previousPrepareStackTrace = Error.prepareStackTrace;
316
- Error.prepareStackTrace = void 0;
317
- var previousDispatcher;
318
- {
319
- previousDispatcher = ReactCurrentDispatcher.current;
320
- ReactCurrentDispatcher.current = null;
321
- disableLogs();
322
- }
323
- try {
324
- if (construct) {
325
- var Fake = function() {
326
- throw Error();
327
- };
328
- Object.defineProperty(Fake.prototype, "props", {
329
- set: function() {
330
- throw Error();
331
- }
332
- });
333
- if (typeof Reflect === "object" && Reflect.construct) {
334
- try {
335
- Reflect.construct(Fake, []);
336
- } catch (x) {
337
- control = x;
338
- }
339
- Reflect.construct(fn, [], Fake);
340
- } else {
341
- try {
342
- Fake.call();
343
- } catch (x) {
344
- control = x;
345
- }
346
- fn.call(Fake.prototype);
347
- }
348
- } else {
349
- try {
350
- throw Error();
351
- } catch (x) {
352
- control = x;
353
- }
354
- fn();
355
- }
356
- } catch (sample) {
357
- if (sample && control && typeof sample.stack === "string") {
358
- var sampleLines = sample.stack.split("\n");
359
- var controlLines = control.stack.split("\n");
360
- var s = sampleLines.length - 1;
361
- var c = controlLines.length - 1;
362
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
363
- c--;
364
- }
365
- for (; s >= 1 && c >= 0; s--, c--) {
366
- if (sampleLines[s] !== controlLines[c]) {
367
- if (s !== 1 || c !== 1) {
368
- do {
369
- s--;
370
- c--;
371
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
372
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
373
- if (fn.displayName && _frame.includes("<anonymous>")) {
374
- _frame = _frame.replace("<anonymous>", fn.displayName);
375
- }
376
- {
377
- if (typeof fn === "function") {
378
- componentFrameCache.set(fn, _frame);
379
- }
380
- }
381
- return _frame;
382
- }
383
- } while (s >= 1 && c >= 0);
384
- }
385
- break;
386
- }
387
- }
388
- }
389
- } finally {
390
- reentry = false;
391
- {
392
- ReactCurrentDispatcher.current = previousDispatcher;
393
- reenableLogs();
394
- }
395
- Error.prepareStackTrace = previousPrepareStackTrace;
396
- }
397
- var name = fn ? fn.displayName || fn.name : "";
398
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
399
- {
400
- if (typeof fn === "function") {
401
- componentFrameCache.set(fn, syntheticFrame);
402
- }
403
- }
404
- return syntheticFrame;
405
- }
406
- function describeFunctionComponentFrame(fn, source, ownerFn) {
407
- {
408
- return describeNativeComponentFrame(fn, false);
409
- }
410
- }
411
- function shouldConstruct(Component) {
412
- var prototype = Component.prototype;
413
- return !!(prototype && prototype.isReactComponent);
414
- }
415
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
416
- if (type == null) {
417
- return "";
418
- }
419
- if (typeof type === "function") {
420
- {
421
- return describeNativeComponentFrame(type, shouldConstruct(type));
422
- }
423
- }
424
- if (typeof type === "string") {
425
- return describeBuiltInComponentFrame(type);
426
- }
427
- switch (type) {
428
- case REACT_SUSPENSE_TYPE:
429
- return describeBuiltInComponentFrame("Suspense");
430
- case REACT_SUSPENSE_LIST_TYPE:
431
- return describeBuiltInComponentFrame("SuspenseList");
432
- }
433
- if (typeof type === "object") {
434
- switch (type.$$typeof) {
435
- case REACT_FORWARD_REF_TYPE:
436
- return describeFunctionComponentFrame(type.render);
437
- case REACT_MEMO_TYPE:
438
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
439
- case REACT_LAZY_TYPE: {
440
- var lazyComponent = type;
441
- var payload = lazyComponent._payload;
442
- var init = lazyComponent._init;
443
- try {
444
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
445
- } catch (x) {
446
- }
447
- }
448
- }
449
- }
450
- return "";
451
- }
452
- var hasOwnProperty = Object.prototype.hasOwnProperty;
453
- var loggedTypeFailures = {};
454
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
455
- function setCurrentlyValidatingElement(element) {
456
- {
457
- if (element) {
458
- var owner = element._owner;
459
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
460
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
461
- } else {
462
- ReactDebugCurrentFrame.setExtraStackFrame(null);
463
- }
464
- }
465
- }
466
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
467
- {
468
- var has = Function.call.bind(hasOwnProperty);
469
- for (var typeSpecName in typeSpecs) {
470
- if (has(typeSpecs, typeSpecName)) {
471
- var error$1 = void 0;
472
- try {
473
- if (typeof typeSpecs[typeSpecName] !== "function") {
474
- var err = Error((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`.");
475
- err.name = "Invariant Violation";
476
- throw err;
477
- }
478
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
479
- } catch (ex) {
480
- error$1 = ex;
481
- }
482
- if (error$1 && !(error$1 instanceof Error)) {
483
- setCurrentlyValidatingElement(element);
484
- error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
485
- setCurrentlyValidatingElement(null);
486
- }
487
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
488
- loggedTypeFailures[error$1.message] = true;
489
- setCurrentlyValidatingElement(element);
490
- error("Failed %s type: %s", location, error$1.message);
491
- setCurrentlyValidatingElement(null);
492
- }
493
- }
494
- }
495
- }
496
- }
497
- var isArrayImpl = Array.isArray;
498
- function isArray(a) {
499
- return isArrayImpl(a);
500
- }
501
- function typeName(value) {
502
- {
503
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
504
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
505
- return type;
506
- }
507
- }
508
- function willCoercionThrow(value) {
509
- {
510
- try {
511
- testStringCoercion(value);
512
- return false;
513
- } catch (e) {
514
- return true;
515
- }
516
- }
517
- }
518
- function testStringCoercion(value) {
519
- return "" + value;
520
- }
521
- function checkKeyStringCoercion(value) {
522
- {
523
- if (willCoercionThrow(value)) {
524
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
525
- return testStringCoercion(value);
526
- }
527
- }
528
- }
529
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
530
- var RESERVED_PROPS = {
531
- key: true,
532
- ref: true,
533
- __self: true,
534
- __source: true
535
- };
536
- var specialPropKeyWarningShown;
537
- var specialPropRefWarningShown;
538
- function hasValidRef(config) {
539
- {
540
- if (hasOwnProperty.call(config, "ref")) {
541
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
542
- if (getter && getter.isReactWarning) {
543
- return false;
544
- }
545
- }
546
- }
547
- return config.ref !== void 0;
548
- }
549
- function hasValidKey(config) {
550
- {
551
- if (hasOwnProperty.call(config, "key")) {
552
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
553
- if (getter && getter.isReactWarning) {
554
- return false;
555
- }
556
- }
557
- }
558
- return config.key !== void 0;
559
- }
560
- function warnIfStringRefCannotBeAutoConverted(config, self) {
561
- {
562
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self) ;
563
- }
564
- }
565
- function defineKeyPropWarningGetter(props, displayName) {
566
- {
567
- var warnAboutAccessingKey = function() {
568
- if (!specialPropKeyWarningShown) {
569
- specialPropKeyWarningShown = true;
570
- error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
571
- }
572
- };
573
- warnAboutAccessingKey.isReactWarning = true;
574
- Object.defineProperty(props, "key", {
575
- get: warnAboutAccessingKey,
576
- configurable: true
577
- });
578
- }
579
- }
580
- function defineRefPropWarningGetter(props, displayName) {
581
- {
582
- var warnAboutAccessingRef = function() {
583
- if (!specialPropRefWarningShown) {
584
- specialPropRefWarningShown = true;
585
- error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
586
- }
587
- };
588
- warnAboutAccessingRef.isReactWarning = true;
589
- Object.defineProperty(props, "ref", {
590
- get: warnAboutAccessingRef,
591
- configurable: true
592
- });
593
- }
594
- }
595
- var ReactElement = function(type, key, ref, self, source, owner, props) {
596
- var element = {
597
- // This tag allows us to uniquely identify this as a React Element
598
- $$typeof: REACT_ELEMENT_TYPE,
599
- // Built-in properties that belong on the element
600
- type,
601
- key,
602
- ref,
603
- props,
604
- // Record the component responsible for creating this element.
605
- _owner: owner
606
- };
607
- {
608
- element._store = {};
609
- Object.defineProperty(element._store, "validated", {
610
- configurable: false,
611
- enumerable: false,
612
- writable: true,
613
- value: false
614
- });
615
- Object.defineProperty(element, "_self", {
616
- configurable: false,
617
- enumerable: false,
618
- writable: false,
619
- value: self
620
- });
621
- Object.defineProperty(element, "_source", {
622
- configurable: false,
623
- enumerable: false,
624
- writable: false,
625
- value: source
626
- });
627
- if (Object.freeze) {
628
- Object.freeze(element.props);
629
- Object.freeze(element);
630
- }
631
- }
632
- return element;
633
- };
634
- function jsxDEV(type, config, maybeKey, source, self) {
635
- {
636
- var propName;
637
- var props = {};
638
- var key = null;
639
- var ref = null;
640
- if (maybeKey !== void 0) {
641
- {
642
- checkKeyStringCoercion(maybeKey);
643
- }
644
- key = "" + maybeKey;
645
- }
646
- if (hasValidKey(config)) {
647
- {
648
- checkKeyStringCoercion(config.key);
649
- }
650
- key = "" + config.key;
651
- }
652
- if (hasValidRef(config)) {
653
- ref = config.ref;
654
- warnIfStringRefCannotBeAutoConverted(config, self);
655
- }
656
- for (propName in config) {
657
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
658
- props[propName] = config[propName];
659
- }
660
- }
661
- if (type && type.defaultProps) {
662
- var defaultProps = type.defaultProps;
663
- for (propName in defaultProps) {
664
- if (props[propName] === void 0) {
665
- props[propName] = defaultProps[propName];
666
- }
667
- }
668
- }
669
- if (key || ref) {
670
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
671
- if (key) {
672
- defineKeyPropWarningGetter(props, displayName);
673
- }
674
- if (ref) {
675
- defineRefPropWarningGetter(props, displayName);
676
- }
677
- }
678
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
679
- }
680
- }
681
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
682
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
683
- function setCurrentlyValidatingElement$1(element) {
684
- {
685
- if (element) {
686
- var owner = element._owner;
687
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
688
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
689
- } else {
690
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
691
- }
692
- }
693
- }
694
- var propTypesMisspellWarningShown;
695
- {
696
- propTypesMisspellWarningShown = false;
697
- }
698
- function isValidElement(object) {
699
- {
700
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
701
- }
702
- }
703
- function getDeclarationErrorAddendum() {
704
- {
705
- if (ReactCurrentOwner$1.current) {
706
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
707
- if (name) {
708
- return "\n\nCheck the render method of `" + name + "`.";
709
- }
710
- }
711
- return "";
712
- }
713
- }
714
- function getSourceInfoErrorAddendum(source) {
715
- {
716
- return "";
717
- }
718
- }
719
- var ownerHasKeyUseWarning = {};
720
- function getCurrentComponentErrorInfo(parentType) {
721
- {
722
- var info = getDeclarationErrorAddendum();
723
- if (!info) {
724
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
725
- if (parentName) {
726
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
727
- }
728
- }
729
- return info;
730
- }
731
- }
732
- function validateExplicitKey(element, parentType) {
733
- {
734
- if (!element._store || element._store.validated || element.key != null) {
735
- return;
736
- }
737
- element._store.validated = true;
738
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
739
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
740
- return;
741
- }
742
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
743
- var childOwner = "";
744
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
745
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
746
- }
747
- setCurrentlyValidatingElement$1(element);
748
- error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
749
- setCurrentlyValidatingElement$1(null);
750
- }
751
- }
752
- function validateChildKeys(node, parentType) {
753
- {
754
- if (typeof node !== "object") {
755
- return;
756
- }
757
- if (isArray(node)) {
758
- for (var i = 0; i < node.length; i++) {
759
- var child = node[i];
760
- if (isValidElement(child)) {
761
- validateExplicitKey(child, parentType);
762
- }
763
- }
764
- } else if (isValidElement(node)) {
765
- if (node._store) {
766
- node._store.validated = true;
767
- }
768
- } else if (node) {
769
- var iteratorFn = getIteratorFn(node);
770
- if (typeof iteratorFn === "function") {
771
- if (iteratorFn !== node.entries) {
772
- var iterator = iteratorFn.call(node);
773
- var step;
774
- while (!(step = iterator.next()).done) {
775
- if (isValidElement(step.value)) {
776
- validateExplicitKey(step.value, parentType);
777
- }
778
- }
779
- }
780
- }
781
- }
782
- }
783
- }
784
- function validatePropTypes(element) {
785
- {
786
- var type = element.type;
787
- if (type === null || type === void 0 || typeof type === "string") {
788
- return;
789
- }
790
- var propTypes;
791
- if (typeof type === "function") {
792
- propTypes = type.propTypes;
793
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
794
- // Inner props are checked in the reconciler.
795
- type.$$typeof === REACT_MEMO_TYPE)) {
796
- propTypes = type.propTypes;
797
- } else {
798
- return;
799
- }
800
- if (propTypes) {
801
- var name = getComponentNameFromType(type);
802
- checkPropTypes(propTypes, element.props, "prop", name, element);
803
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
804
- propTypesMisspellWarningShown = true;
805
- var _name = getComponentNameFromType(type);
806
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
807
- }
808
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
809
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
810
- }
811
- }
812
- }
813
- function validateFragmentProps(fragment) {
814
- {
815
- var keys = Object.keys(fragment.props);
816
- for (var i = 0; i < keys.length; i++) {
817
- var key = keys[i];
818
- if (key !== "children" && key !== "key") {
819
- setCurrentlyValidatingElement$1(fragment);
820
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
821
- setCurrentlyValidatingElement$1(null);
822
- break;
823
- }
824
- }
825
- if (fragment.ref !== null) {
826
- setCurrentlyValidatingElement$1(fragment);
827
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
828
- setCurrentlyValidatingElement$1(null);
829
- }
830
- }
831
- }
832
- var didWarnAboutKeySpread = {};
833
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
834
- {
835
- var validType = isValidElementType(type);
836
- if (!validType) {
837
- var info = "";
838
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
839
- info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
840
- }
841
- var sourceInfo = getSourceInfoErrorAddendum();
842
- if (sourceInfo) {
843
- info += sourceInfo;
844
- } else {
845
- info += getDeclarationErrorAddendum();
846
- }
847
- var typeString;
848
- if (type === null) {
849
- typeString = "null";
850
- } else if (isArray(type)) {
851
- typeString = "array";
852
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
853
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
854
- info = " Did you accidentally export a JSX literal instead of a component?";
855
- } else {
856
- typeString = typeof type;
857
- }
858
- error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
859
- }
860
- var element = jsxDEV(type, props, key, source, self);
861
- if (element == null) {
862
- return element;
863
- }
864
- if (validType) {
865
- var children = props.children;
866
- if (children !== void 0) {
867
- if (isStaticChildren) {
868
- if (isArray(children)) {
869
- for (var i = 0; i < children.length; i++) {
870
- validateChildKeys(children[i], type);
871
- }
872
- if (Object.freeze) {
873
- Object.freeze(children);
874
- }
875
- } else {
876
- error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
877
- }
878
- } else {
879
- validateChildKeys(children, type);
880
- }
881
- }
882
- }
883
- {
884
- if (hasOwnProperty.call(props, "key")) {
885
- var componentName = getComponentNameFromType(type);
886
- var keys = Object.keys(props).filter(function(k) {
887
- return k !== "key";
888
- });
889
- var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
890
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
891
- var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
892
- error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
893
- didWarnAboutKeySpread[componentName + beforeExample] = true;
894
- }
895
- }
896
- }
897
- if (type === REACT_FRAGMENT_TYPE) {
898
- validateFragmentProps(element);
899
- } else {
900
- validatePropTypes(element);
901
- }
902
- return element;
903
- }
904
- }
905
- function jsxWithValidationStatic(type, props, key) {
906
- {
907
- return jsxWithValidation(type, props, key, true);
908
- }
909
- }
910
- function jsxWithValidationDynamic(type, props, key) {
911
- {
912
- return jsxWithValidation(type, props, key, false);
913
- }
914
- }
915
- var jsx = jsxWithValidationDynamic;
916
- var jsxs = jsxWithValidationStatic;
917
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
918
- reactJsxRuntime_development.jsx = jsx;
919
- reactJsxRuntime_development.jsxs = jsxs;
920
- })();
921
- }
922
- return reactJsxRuntime_development;
923
- }
924
- var hasRequiredJsxRuntime;
925
- function requireJsxRuntime() {
926
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
927
- hasRequiredJsxRuntime = 1;
928
- if (process.env.NODE_ENV === "production") {
929
- jsxRuntime.exports = requireReactJsxRuntime_production_min();
930
- } else {
931
- jsxRuntime.exports = requireReactJsxRuntime_development();
932
- }
933
- return jsxRuntime.exports;
934
- }
935
- var jsxRuntimeExports = requireJsxRuntime();
25
+ const jsxRuntime = require("react/jsx-runtime");
26
+ const react = require("react");
936
27
  let calendarRegistered = false;
937
28
  const registerCalendar = () => {
938
29
  if (typeof window !== "undefined" && !calendarRegistered) {
@@ -940,7 +31,7 @@ const registerCalendar = () => {
940
31
  calendarRegistered = true;
941
32
  }
942
33
  };
943
- const Calendar = require$$0.forwardRef(
34
+ const Calendar = react.forwardRef(
944
35
  ({
945
36
  view = "month",
946
37
  date,
@@ -954,13 +45,13 @@ const Calendar = require$$0.forwardRef(
954
45
  style,
955
46
  ...rest
956
47
  }, ref) => {
957
- const calendarRef = require$$0.useRef(null);
958
- const [isClient, setIsClient] = require$$0.useState(false);
959
- require$$0.useEffect(() => {
48
+ const calendarRef = react.useRef(null);
49
+ const [isClient, setIsClient] = react.useState(false);
50
+ react.useEffect(() => {
960
51
  setIsClient(true);
961
52
  registerCalendar();
962
53
  }, []);
963
- require$$0.useImperativeHandle(ref, () => ({
54
+ react.useImperativeHandle(ref, () => ({
964
55
  getElement: () => calendarRef.current,
965
56
  setView: (newView) => {
966
57
  if (calendarRef.current) {
@@ -979,7 +70,7 @@ const Calendar = require$$0.forwardRef(
979
70
  }
980
71
  }
981
72
  }));
982
- require$$0.useEffect(() => {
73
+ react.useEffect(() => {
983
74
  if (!calendarRef.current) return;
984
75
  const element = calendarRef.current;
985
76
  if (view !== void 0) {
@@ -995,7 +86,7 @@ const Calendar = require$$0.forwardRef(
995
86
  element.user = user;
996
87
  }
997
88
  }, [view, date, events, user]);
998
- require$$0.useEffect(() => {
89
+ react.useEffect(() => {
999
90
  if (!calendarRef.current) return;
1000
91
  const element = calendarRef.current;
1001
92
  const handleDateChange = (e) => {
@@ -1022,7 +113,7 @@ const Calendar = require$$0.forwardRef(
1022
113
  };
1023
114
  }, [onDateChange, onViewChange, onEventClick, onDateDoubleClick]);
1024
115
  if (!isClient) {
1025
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
116
+ return /* @__PURE__ */ jsxRuntime.jsx(
1026
117
  "div",
1027
118
  {
1028
119
  className,
@@ -1034,11 +125,11 @@ const Calendar = require$$0.forwardRef(
1034
125
  justifyContent: "center"
1035
126
  },
1036
127
  ...rest,
1037
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "加载中..." })
128
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: "加载中..." })
1038
129
  }
1039
130
  );
1040
131
  }
1041
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
132
+ return /* @__PURE__ */ jsxRuntime.jsx(
1042
133
  "wsx-calendar",
1043
134
  {
1044
135
  ref: calendarRef,
@@ -1058,15 +149,15 @@ function ResizableSplitter({
1058
149
  maxLeftWidth = 80,
1059
150
  className = ""
1060
151
  }) {
1061
- const [leftWidth, setLeftWidth] = require$$0.useState(initialLeftWidth);
1062
- const [isDragging, setIsDragging] = require$$0.useState(false);
1063
- const containerRef = require$$0.useRef(null);
1064
- const splitterRef = require$$0.useRef(null);
1065
- const handleMouseDown = require$$0.useCallback((e) => {
152
+ const [leftWidth, setLeftWidth] = react.useState(initialLeftWidth);
153
+ const [isDragging, setIsDragging] = react.useState(false);
154
+ const containerRef = react.useRef(null);
155
+ const splitterRef = react.useRef(null);
156
+ const handleMouseDown = react.useCallback((e) => {
1066
157
  e.preventDefault();
1067
158
  setIsDragging(true);
1068
159
  }, []);
1069
- const handleMouseMove = require$$0.useCallback(
160
+ const handleMouseMove = react.useCallback(
1070
161
  (e) => {
1071
162
  if (!isDragging || !containerRef.current) return;
1072
163
  const containerRect = containerRef.current.getBoundingClientRect();
@@ -1079,10 +170,10 @@ function ResizableSplitter({
1079
170
  },
1080
171
  [isDragging, minLeftWidth, maxLeftWidth]
1081
172
  );
1082
- const handleMouseUp = require$$0.useCallback(() => {
173
+ const handleMouseUp = react.useCallback(() => {
1083
174
  setIsDragging(false);
1084
175
  }, []);
1085
- require$$0.useEffect(() => {
176
+ react.useEffect(() => {
1086
177
  if (isDragging) {
1087
178
  document.addEventListener("mousemove", handleMouseMove);
1088
179
  document.addEventListener("mouseup", handleMouseUp);
@@ -1096,7 +187,7 @@ function ResizableSplitter({
1096
187
  };
1097
188
  }
1098
189
  }, [isDragging, handleMouseMove, handleMouseUp]);
1099
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
190
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1100
191
  "div",
1101
192
  {
1102
193
  ref: containerRef,
@@ -1108,7 +199,7 @@ function ResizableSplitter({
1108
199
  position: "relative"
1109
200
  },
1110
201
  children: [
1111
- /* @__PURE__ */ jsxRuntimeExports.jsx(
202
+ /* @__PURE__ */ jsxRuntime.jsx(
1112
203
  "div",
1113
204
  {
1114
205
  style: {
@@ -1121,7 +212,7 @@ function ResizableSplitter({
1121
212
  children: left
1122
213
  }
1123
214
  ),
1124
- /* @__PURE__ */ jsxRuntimeExports.jsx(
215
+ /* @__PURE__ */ jsxRuntime.jsx(
1125
216
  "div",
1126
217
  {
1127
218
  ref: splitterRef,
@@ -1145,7 +236,7 @@ function ResizableSplitter({
1145
236
  e.currentTarget.style.backgroundColor = "var(--resizable-splitter-bg-color, #ddd)";
1146
237
  }
1147
238
  },
1148
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
239
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1149
240
  "div",
1150
241
  {
1151
242
  style: {
@@ -1162,7 +253,7 @@ function ResizableSplitter({
1162
253
  justifyContent: "center",
1163
254
  pointerEvents: "none"
1164
255
  },
1165
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
256
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1166
257
  "div",
1167
258
  {
1168
259
  style: {
@@ -1171,7 +262,7 @@ function ResizableSplitter({
1171
262
  gap: "var(--resizable-splitter-dot-gap, 2px)"
1172
263
  },
1173
264
  children: [
1174
- /* @__PURE__ */ jsxRuntimeExports.jsx(
265
+ /* @__PURE__ */ jsxRuntime.jsx(
1175
266
  "div",
1176
267
  {
1177
268
  style: {
@@ -1182,7 +273,7 @@ function ResizableSplitter({
1182
273
  }
1183
274
  }
1184
275
  ),
1185
- /* @__PURE__ */ jsxRuntimeExports.jsx(
276
+ /* @__PURE__ */ jsxRuntime.jsx(
1186
277
  "div",
1187
278
  {
1188
279
  style: {
@@ -1193,7 +284,7 @@ function ResizableSplitter({
1193
284
  }
1194
285
  }
1195
286
  ),
1196
- /* @__PURE__ */ jsxRuntimeExports.jsx(
287
+ /* @__PURE__ */ jsxRuntime.jsx(
1197
288
  "div",
1198
289
  {
1199
290
  style: {
@@ -1211,7 +302,7 @@ function ResizableSplitter({
1211
302
  )
1212
303
  }
1213
304
  ),
1214
- /* @__PURE__ */ jsxRuntimeExports.jsx(
305
+ /* @__PURE__ */ jsxRuntime.jsx(
1215
306
  "div",
1216
307
  {
1217
308
  style: {