unifyedx-storybook-new 0.1.36 → 0.1.39
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/unifyedx-storybook-new.css +309 -10825
- package/dist/unifyedx-storybook-new.es.js +1018 -819
- package/dist/unifyedx-storybook-new.es.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import require$$1, { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, { forwardRef, createElement, useState, useMemo, useId as useId$1, createContext, useContext, useCallback, useRef, useLayoutEffect, useEffect, Fragment as Fragment$1, useImperativeHandle, memo, useReducer } from 'react';
|
|
3
|
+
import React__default, { forwardRef, createElement, useState, useMemo, useId as useId$1, createContext, useContext, useCallback, useRef, useLayoutEffect, useEffect, Fragment as Fragment$1, useImperativeHandle, memo, useReducer, useSyncExternalStore, isValidElement, cloneElement } from 'react';
|
|
4
4
|
import { Popover as Popover$1, PopoverButton, PopoverPanel, Transition, Dialog, TransitionChild, DialogPanel, DialogTitle, TabGroup, TabList, Tab, TabPanels, RadioGroup as RadioGroup$1, Listbox, ListboxButton, ListboxOptions, ListboxOption, SwitchGroup, Switch, Menu as Menu$1, MenuButton, Portal, MenuItems, MenuItem, DialogBackdrop } from '@headlessui/react';
|
|
5
5
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
6
6
|
import { useFloating, offset as offset$2, flip as flip$2, shift as shift$2, autoUpdate as autoUpdate$1, useClick, useDismiss, useInteractions, FloatingPortal } from '@floating-ui/react';
|
|
7
7
|
import { unstable_batchedUpdates, createPortal } from 'react-dom';
|
|
8
8
|
import { CKEditor } from '@ckeditor/ckeditor5-react';
|
|
9
9
|
import { Essentials, Paragraph, Heading, Alignment, BlockQuote, Bold, Italic, Underline, Strikethrough, Link, List, Indent, IndentBlock, Table, SourceEditing, Undo, ClassicEditor } from 'ckeditor5';
|
|
10
|
+
import 'ckeditor5/ckeditor5.css';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* @license lucide-react v0.525.0 - ISC
|
|
@@ -477,7 +478,7 @@ const __iconNode = [
|
|
|
477
478
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
478
479
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
479
480
|
];
|
|
480
|
-
const X = createLucideIcon("x", __iconNode);
|
|
481
|
+
const X$1 = createLucideIcon("x", __iconNode);
|
|
481
482
|
|
|
482
483
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
483
484
|
|
|
@@ -730,7 +731,7 @@ const Badge = ({
|
|
|
730
731
|
className: "badge-remove-button",
|
|
731
732
|
onClick: onRemove,
|
|
732
733
|
"aria-label": `Remove ${label}`,
|
|
733
|
-
children: /* @__PURE__ */ jsx(X, { className: "badge-remove-icon" })
|
|
734
|
+
children: /* @__PURE__ */ jsx(X$1, { className: "badge-remove-icon" })
|
|
734
735
|
}
|
|
735
736
|
)
|
|
736
737
|
] });
|
|
@@ -2167,7 +2168,9 @@ const offsetRe = /([+-]\d\d):?(\d\d)?/;
|
|
|
2167
2168
|
function calcOffset(cacheStr, values) {
|
|
2168
2169
|
const hours = +(values[0] || 0);
|
|
2169
2170
|
const minutes = +(values[1] || 0);
|
|
2170
|
-
|
|
2171
|
+
// Convert seconds to minutes by dividing by 60 to keep the function return in minutes.
|
|
2172
|
+
const seconds = +(values[2] || 0) / 60;
|
|
2173
|
+
return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;
|
|
2171
2174
|
}
|
|
2172
2175
|
|
|
2173
2176
|
class TZDateMini extends Date {
|
|
@@ -2209,7 +2212,10 @@ class TZDateMini extends Date {
|
|
|
2209
2212
|
return new TZDateMini(+this, timeZone);
|
|
2210
2213
|
}
|
|
2211
2214
|
getTimezoneOffset() {
|
|
2212
|
-
|
|
2215
|
+
const offset = -tzOffset(this.timeZone, this);
|
|
2216
|
+
// Remove the seconds offset
|
|
2217
|
+
// use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.
|
|
2218
|
+
return offset > 0 ? Math.floor(offset) : Math.ceil(offset);
|
|
2213
2219
|
}
|
|
2214
2220
|
|
|
2215
2221
|
//#endregion
|
|
@@ -2269,7 +2275,7 @@ Object.getOwnPropertyNames(Date.prototype).forEach(method => {
|
|
|
2269
2275
|
*/
|
|
2270
2276
|
function syncToInternal(date) {
|
|
2271
2277
|
date.internal.setTime(+date);
|
|
2272
|
-
date.internal.
|
|
2278
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));
|
|
2273
2279
|
}
|
|
2274
2280
|
|
|
2275
2281
|
/**
|
|
@@ -2295,8 +2301,10 @@ function syncFromInternal(date) {
|
|
|
2295
2301
|
*/
|
|
2296
2302
|
function adjustToSystemTZ(date) {
|
|
2297
2303
|
// Save the time zone offset before all the adjustments
|
|
2298
|
-
const
|
|
2299
|
-
|
|
2304
|
+
const baseOffset = tzOffset(date.timeZone, date);
|
|
2305
|
+
// Remove the seconds offset
|
|
2306
|
+
// use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.
|
|
2307
|
+
const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);
|
|
2300
2308
|
//#region System DST adjustment
|
|
2301
2309
|
|
|
2302
2310
|
// The biggest problem with using the system time zone is that when we create
|
|
@@ -2350,9 +2358,29 @@ function adjustToSystemTZ(date) {
|
|
|
2350
2358
|
|
|
2351
2359
|
//#endregion
|
|
2352
2360
|
|
|
2361
|
+
//#region Seconds System diff adjustment
|
|
2362
|
+
|
|
2363
|
+
const systemDate = new Date(+date);
|
|
2364
|
+
// Set the UTC seconds to 0 to isolate the timezone offset in seconds.
|
|
2365
|
+
systemDate.setUTCSeconds(0);
|
|
2366
|
+
// For negative systemOffset, invert the seconds.
|
|
2367
|
+
const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;
|
|
2368
|
+
|
|
2369
|
+
// Calculate the seconds offset based on the timezone offset.
|
|
2370
|
+
const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;
|
|
2371
|
+
if (secondsOffset || systemSecondsOffset) {
|
|
2372
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);
|
|
2373
|
+
Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
//#endregion
|
|
2377
|
+
|
|
2353
2378
|
//#region Post-adjustment DST fix
|
|
2354
2379
|
|
|
2355
|
-
const
|
|
2380
|
+
const postBaseOffset = tzOffset(date.timeZone, date);
|
|
2381
|
+
// Remove the seconds offset
|
|
2382
|
+
// use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.
|
|
2383
|
+
const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);
|
|
2356
2384
|
const postSystemOffset = -new Date(+date).getTimezoneOffset();
|
|
2357
2385
|
const postOffsetDiff = postSystemOffset - postOffset;
|
|
2358
2386
|
const offsetChanged = postOffset !== offset;
|
|
@@ -2363,7 +2391,10 @@ function adjustToSystemTZ(date) {
|
|
|
2363
2391
|
// Now we need to check if got offset change during the post-adjustment.
|
|
2364
2392
|
// If so, we also need both dates to reflect that.
|
|
2365
2393
|
|
|
2366
|
-
const
|
|
2394
|
+
const newBaseOffset = tzOffset(date.timeZone, date);
|
|
2395
|
+
// Remove the seconds offset
|
|
2396
|
+
// use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.
|
|
2397
|
+
const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);
|
|
2367
2398
|
const offsetChange = postOffset - newOffset;
|
|
2368
2399
|
if (offsetChange) {
|
|
2369
2400
|
date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);
|
|
@@ -2374,19 +2405,6 @@ function adjustToSystemTZ(date) {
|
|
|
2374
2405
|
//#endregion
|
|
2375
2406
|
}
|
|
2376
2407
|
|
|
2377
|
-
/**
|
|
2378
|
-
* UTC date class. It maps getters and setters to corresponding UTC methods,
|
|
2379
|
-
* forcing all calculations in the UTC time zone.
|
|
2380
|
-
*
|
|
2381
|
-
* Combined with date-fns, it allows using the class the same way as
|
|
2382
|
-
* the original date class.
|
|
2383
|
-
*
|
|
2384
|
-
* This complete version provides not only getters, setters,
|
|
2385
|
-
* and `getTimezoneOffset`, but also the formatter functions, mirroring
|
|
2386
|
-
* all original `Date` functionality. Use this version when you need to format
|
|
2387
|
-
* a string or in an environment you don't fully control (a library).
|
|
2388
|
-
* For a minimal version, see `UTCDateMini`.
|
|
2389
|
-
*/
|
|
2390
2408
|
class TZDate extends TZDateMini {
|
|
2391
2409
|
//#region static
|
|
2392
2410
|
|
|
@@ -2466,127 +2484,6 @@ class TZDate extends TZDateMini {
|
|
|
2466
2484
|
//#endregion
|
|
2467
2485
|
}
|
|
2468
2486
|
|
|
2469
|
-
/**
|
|
2470
|
-
* Enum representing the UI elements composing DayPicker. These elements are
|
|
2471
|
-
* mapped to {@link CustomComponents}, {@link ClassNames}, and {@link Styles}.
|
|
2472
|
-
*
|
|
2473
|
-
* Some elements are extended by flags and modifiers.
|
|
2474
|
-
*/
|
|
2475
|
-
var UI;
|
|
2476
|
-
(function (UI) {
|
|
2477
|
-
/** The root component displaying the months and the navigation bar. */
|
|
2478
|
-
UI["Root"] = "root";
|
|
2479
|
-
/** The Chevron SVG element used by navigation buttons and dropdowns. */
|
|
2480
|
-
UI["Chevron"] = "chevron";
|
|
2481
|
-
/**
|
|
2482
|
-
* The grid cell with the day's date. Extended by {@link DayFlag} and
|
|
2483
|
-
* {@link SelectionState}.
|
|
2484
|
-
*/
|
|
2485
|
-
UI["Day"] = "day";
|
|
2486
|
-
/** The button containing the formatted day's date, inside the grid cell. */
|
|
2487
|
-
UI["DayButton"] = "day_button";
|
|
2488
|
-
/** The caption label of the month (when not showing the dropdown navigation). */
|
|
2489
|
-
UI["CaptionLabel"] = "caption_label";
|
|
2490
|
-
/** The container of the dropdown navigation (when enabled). */
|
|
2491
|
-
UI["Dropdowns"] = "dropdowns";
|
|
2492
|
-
/** The dropdown element to select for years and months. */
|
|
2493
|
-
UI["Dropdown"] = "dropdown";
|
|
2494
|
-
/** The container element of the dropdown. */
|
|
2495
|
-
UI["DropdownRoot"] = "dropdown_root";
|
|
2496
|
-
/** The root element of the footer. */
|
|
2497
|
-
UI["Footer"] = "footer";
|
|
2498
|
-
/** The month grid. */
|
|
2499
|
-
UI["MonthGrid"] = "month_grid";
|
|
2500
|
-
/** Contains the dropdown navigation or the caption label. */
|
|
2501
|
-
UI["MonthCaption"] = "month_caption";
|
|
2502
|
-
/** The dropdown with the months. */
|
|
2503
|
-
UI["MonthsDropdown"] = "months_dropdown";
|
|
2504
|
-
/** Wrapper of the month grid. */
|
|
2505
|
-
UI["Month"] = "month";
|
|
2506
|
-
/** The container of the displayed months. */
|
|
2507
|
-
UI["Months"] = "months";
|
|
2508
|
-
/** The navigation bar with the previous and next buttons. */
|
|
2509
|
-
UI["Nav"] = "nav";
|
|
2510
|
-
/**
|
|
2511
|
-
* The next month button in the navigation. *
|
|
2512
|
-
*
|
|
2513
|
-
* @since 9.1.0
|
|
2514
|
-
*/
|
|
2515
|
-
UI["NextMonthButton"] = "button_next";
|
|
2516
|
-
/**
|
|
2517
|
-
* The previous month button in the navigation.
|
|
2518
|
-
*
|
|
2519
|
-
* @since 9.1.0
|
|
2520
|
-
*/
|
|
2521
|
-
UI["PreviousMonthButton"] = "button_previous";
|
|
2522
|
-
/** The row containing the week. */
|
|
2523
|
-
UI["Week"] = "week";
|
|
2524
|
-
/** The group of row weeks in a month (`tbody`). */
|
|
2525
|
-
UI["Weeks"] = "weeks";
|
|
2526
|
-
/** The column header with the weekday. */
|
|
2527
|
-
UI["Weekday"] = "weekday";
|
|
2528
|
-
/** The row grouping the weekdays in the column headers. */
|
|
2529
|
-
UI["Weekdays"] = "weekdays";
|
|
2530
|
-
/** The cell containing the week number. */
|
|
2531
|
-
UI["WeekNumber"] = "week_number";
|
|
2532
|
-
/** The cell header of the week numbers column. */
|
|
2533
|
-
UI["WeekNumberHeader"] = "week_number_header";
|
|
2534
|
-
/** The dropdown with the years. */
|
|
2535
|
-
UI["YearsDropdown"] = "years_dropdown";
|
|
2536
|
-
})(UI || (UI = {}));
|
|
2537
|
-
/** Enum representing flags for the {@link UI.Day} element. */
|
|
2538
|
-
var DayFlag;
|
|
2539
|
-
(function (DayFlag) {
|
|
2540
|
-
/** The day is disabled. */
|
|
2541
|
-
DayFlag["disabled"] = "disabled";
|
|
2542
|
-
/** The day is hidden. */
|
|
2543
|
-
DayFlag["hidden"] = "hidden";
|
|
2544
|
-
/** The day is outside the current month. */
|
|
2545
|
-
DayFlag["outside"] = "outside";
|
|
2546
|
-
/** The day is focused. */
|
|
2547
|
-
DayFlag["focused"] = "focused";
|
|
2548
|
-
/** The day is today. */
|
|
2549
|
-
DayFlag["today"] = "today";
|
|
2550
|
-
})(DayFlag || (DayFlag = {}));
|
|
2551
|
-
/**
|
|
2552
|
-
* Enum representing selection states that can be applied to the {@link UI.Day}
|
|
2553
|
-
* element in selection mode.
|
|
2554
|
-
*/
|
|
2555
|
-
var SelectionState;
|
|
2556
|
-
(function (SelectionState) {
|
|
2557
|
-
/** The day is at the end of a selected range. */
|
|
2558
|
-
SelectionState["range_end"] = "range_end";
|
|
2559
|
-
/** The day is at the middle of a selected range. */
|
|
2560
|
-
SelectionState["range_middle"] = "range_middle";
|
|
2561
|
-
/** The day is at the start of a selected range. */
|
|
2562
|
-
SelectionState["range_start"] = "range_start";
|
|
2563
|
-
/** The day is selected. */
|
|
2564
|
-
SelectionState["selected"] = "selected";
|
|
2565
|
-
})(SelectionState || (SelectionState = {}));
|
|
2566
|
-
/**
|
|
2567
|
-
* Enum representing different animation states for transitioning between
|
|
2568
|
-
* months.
|
|
2569
|
-
*/
|
|
2570
|
-
var Animation;
|
|
2571
|
-
(function (Animation) {
|
|
2572
|
-
/** The entering weeks when they appear before the exiting month. */
|
|
2573
|
-
Animation["weeks_before_enter"] = "weeks_before_enter";
|
|
2574
|
-
/** The exiting weeks when they disappear before the entering month. */
|
|
2575
|
-
Animation["weeks_before_exit"] = "weeks_before_exit";
|
|
2576
|
-
/** The entering weeks when they appear after the exiting month. */
|
|
2577
|
-
Animation["weeks_after_enter"] = "weeks_after_enter";
|
|
2578
|
-
/** The exiting weeks when they disappear after the entering month. */
|
|
2579
|
-
Animation["weeks_after_exit"] = "weeks_after_exit";
|
|
2580
|
-
/** The entering caption when it appears after the exiting month. */
|
|
2581
|
-
Animation["caption_after_enter"] = "caption_after_enter";
|
|
2582
|
-
/** The exiting caption when it disappears after the entering month. */
|
|
2583
|
-
Animation["caption_after_exit"] = "caption_after_exit";
|
|
2584
|
-
/** The entering caption when it appears before the exiting month. */
|
|
2585
|
-
Animation["caption_before_enter"] = "caption_before_enter";
|
|
2586
|
-
/** The exiting caption when it disappears before the entering month. */
|
|
2587
|
-
Animation["caption_before_exit"] = "caption_before_exit";
|
|
2588
|
-
})(Animation || (Animation = {}));
|
|
2589
|
-
|
|
2590
2487
|
/**
|
|
2591
2488
|
* @module constants
|
|
2592
2489
|
* @summary Useful constants
|
|
@@ -6504,7 +6401,7 @@ class DateLib {
|
|
|
6504
6401
|
* @param formatStr The format string.
|
|
6505
6402
|
* @returns The formatted date string.
|
|
6506
6403
|
*/
|
|
6507
|
-
this.format = (date, formatStr,
|
|
6404
|
+
this.format = (date, formatStr, _options) => {
|
|
6508
6405
|
const formatted = this.overrides?.format
|
|
6509
6406
|
? this.overrides.format(date, formatStr, this.options)
|
|
6510
6407
|
: format$1(date, formatStr, this.options);
|
|
@@ -6530,7 +6427,7 @@ class DateLib {
|
|
|
6530
6427
|
* @param date The date to get the month for.
|
|
6531
6428
|
* @returns The month.
|
|
6532
6429
|
*/
|
|
6533
|
-
this.getMonth = (date,
|
|
6430
|
+
this.getMonth = (date, _options) => {
|
|
6534
6431
|
return this.overrides?.getMonth
|
|
6535
6432
|
? this.overrides.getMonth(date, this.options)
|
|
6536
6433
|
: getMonth$1(date, this.options);
|
|
@@ -6541,7 +6438,7 @@ class DateLib {
|
|
|
6541
6438
|
* @param date The date to get the year for.
|
|
6542
6439
|
* @returns The year.
|
|
6543
6440
|
*/
|
|
6544
|
-
this.getYear = (date,
|
|
6441
|
+
this.getYear = (date, _options) => {
|
|
6545
6442
|
return this.overrides?.getYear
|
|
6546
6443
|
? this.overrides.getYear(date, this.options)
|
|
6547
6444
|
: getYear$1(date, this.options);
|
|
@@ -6552,7 +6449,7 @@ class DateLib {
|
|
|
6552
6449
|
* @param date The date to get the week number for.
|
|
6553
6450
|
* @returns The week number.
|
|
6554
6451
|
*/
|
|
6555
|
-
this.getWeek = (date,
|
|
6452
|
+
this.getWeek = (date, _options) => {
|
|
6556
6453
|
return this.overrides?.getWeek
|
|
6557
6454
|
? this.overrides.getWeek(date, this.options)
|
|
6558
6455
|
: getWeek$1(date, this.options);
|
|
@@ -6676,7 +6573,7 @@ class DateLib {
|
|
|
6676
6573
|
* @param date The original date.
|
|
6677
6574
|
* @returns The start of the broadcast week.
|
|
6678
6575
|
*/
|
|
6679
|
-
this.startOfBroadcastWeek = (date,
|
|
6576
|
+
this.startOfBroadcastWeek = (date, _dateLib) => {
|
|
6680
6577
|
return this.overrides?.startOfBroadcastWeek
|
|
6681
6578
|
? this.overrides.startOfBroadcastWeek(date, this)
|
|
6682
6579
|
: startOfBroadcastWeek(date, this);
|
|
@@ -6720,7 +6617,7 @@ class DateLib {
|
|
|
6720
6617
|
* @param date The original date.
|
|
6721
6618
|
* @returns The start of the week.
|
|
6722
6619
|
*/
|
|
6723
|
-
this.startOfWeek = (date,
|
|
6620
|
+
this.startOfWeek = (date, _options) => {
|
|
6724
6621
|
return this.overrides?.startOfWeek
|
|
6725
6622
|
? this.overrides.startOfWeek(date, this.options)
|
|
6726
6623
|
: startOfWeek$1(date, this.options);
|
|
@@ -6750,7 +6647,7 @@ class DateLib {
|
|
|
6750
6647
|
const { numerals = "latn" } = this.options;
|
|
6751
6648
|
// Use Intl.NumberFormat to create a formatter with the specified numbering system
|
|
6752
6649
|
const formatter = new Intl.NumberFormat("en-US", {
|
|
6753
|
-
numberingSystem: numerals
|
|
6650
|
+
numberingSystem: numerals,
|
|
6754
6651
|
});
|
|
6755
6652
|
// Map Arabic digits (0-9) to the target numerals
|
|
6756
6653
|
const digitMap = {};
|
|
@@ -6840,281 +6737,6 @@ class CalendarWeek {
|
|
|
6840
6737
|
}
|
|
6841
6738
|
}
|
|
6842
6739
|
|
|
6843
|
-
/**
|
|
6844
|
-
* Checks if a given date is within a specified date range.
|
|
6845
|
-
*
|
|
6846
|
-
* @since 9.0.0
|
|
6847
|
-
* @param range - The date range to check against.
|
|
6848
|
-
* @param date - The date to check.
|
|
6849
|
-
* @param excludeEnds - If `true`, the range's start and end dates are excluded.
|
|
6850
|
-
* @param dateLib - The date utility library instance.
|
|
6851
|
-
* @returns `true` if the date is within the range, otherwise `false`.
|
|
6852
|
-
* @group Utilities
|
|
6853
|
-
*/
|
|
6854
|
-
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
6855
|
-
let { from, to } = range;
|
|
6856
|
-
const { differenceInCalendarDays, isSameDay } = dateLib;
|
|
6857
|
-
if (from && to) {
|
|
6858
|
-
const isRangeInverted = differenceInCalendarDays(to, from) < 0;
|
|
6859
|
-
if (isRangeInverted) {
|
|
6860
|
-
[from, to] = [to, from];
|
|
6861
|
-
}
|
|
6862
|
-
const isInRange = differenceInCalendarDays(date, from) >= (excludeEnds ? 1 : 0) &&
|
|
6863
|
-
differenceInCalendarDays(to, date) >= (excludeEnds ? 1 : 0);
|
|
6864
|
-
return isInRange;
|
|
6865
|
-
}
|
|
6866
|
-
if (!excludeEnds && to) {
|
|
6867
|
-
return isSameDay(to, date);
|
|
6868
|
-
}
|
|
6869
|
-
if (!excludeEnds && from) {
|
|
6870
|
-
return isSameDay(from, date);
|
|
6871
|
-
}
|
|
6872
|
-
return false;
|
|
6873
|
-
}
|
|
6874
|
-
|
|
6875
|
-
/**
|
|
6876
|
-
* Checks if the given value is of type {@link DateInterval}.
|
|
6877
|
-
*
|
|
6878
|
-
* @param matcher - The value to check.
|
|
6879
|
-
* @returns `true` if the value is a {@link DateInterval}, otherwise `false`.
|
|
6880
|
-
* @group Utilities
|
|
6881
|
-
*/
|
|
6882
|
-
function isDateInterval(matcher) {
|
|
6883
|
-
return Boolean(matcher &&
|
|
6884
|
-
typeof matcher === "object" &&
|
|
6885
|
-
"before" in matcher &&
|
|
6886
|
-
"after" in matcher);
|
|
6887
|
-
}
|
|
6888
|
-
/**
|
|
6889
|
-
* Checks if the given value is of type {@link DateRange}.
|
|
6890
|
-
*
|
|
6891
|
-
* @param value - The value to check.
|
|
6892
|
-
* @returns `true` if the value is a {@link DateRange}, otherwise `false`.
|
|
6893
|
-
* @group Utilities
|
|
6894
|
-
*/
|
|
6895
|
-
function isDateRange(value) {
|
|
6896
|
-
return Boolean(value && typeof value === "object" && "from" in value);
|
|
6897
|
-
}
|
|
6898
|
-
/**
|
|
6899
|
-
* Checks if the given value is of type {@link DateAfter}.
|
|
6900
|
-
*
|
|
6901
|
-
* @param value - The value to check.
|
|
6902
|
-
* @returns `true` if the value is a {@link DateAfter}, otherwise `false`.
|
|
6903
|
-
* @group Utilities
|
|
6904
|
-
*/
|
|
6905
|
-
function isDateAfterType(value) {
|
|
6906
|
-
return Boolean(value && typeof value === "object" && "after" in value);
|
|
6907
|
-
}
|
|
6908
|
-
/**
|
|
6909
|
-
* Checks if the given value is of type {@link DateBefore}.
|
|
6910
|
-
*
|
|
6911
|
-
* @param value - The value to check.
|
|
6912
|
-
* @returns `true` if the value is a {@link DateBefore}, otherwise `false`.
|
|
6913
|
-
* @group Utilities
|
|
6914
|
-
*/
|
|
6915
|
-
function isDateBeforeType(value) {
|
|
6916
|
-
return Boolean(value && typeof value === "object" && "before" in value);
|
|
6917
|
-
}
|
|
6918
|
-
/**
|
|
6919
|
-
* Checks if the given value is of type {@link DayOfWeek}.
|
|
6920
|
-
*
|
|
6921
|
-
* @param value - The value to check.
|
|
6922
|
-
* @returns `true` if the value is a {@link DayOfWeek}, otherwise `false`.
|
|
6923
|
-
* @group Utilities
|
|
6924
|
-
*/
|
|
6925
|
-
function isDayOfWeekType(value) {
|
|
6926
|
-
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
6927
|
-
}
|
|
6928
|
-
/**
|
|
6929
|
-
* Checks if the given value is an array of valid dates.
|
|
6930
|
-
*
|
|
6931
|
-
* @private
|
|
6932
|
-
* @param value - The value to check.
|
|
6933
|
-
* @param dateLib - The date utility library instance.
|
|
6934
|
-
* @returns `true` if the value is an array of valid dates, otherwise `false`.
|
|
6935
|
-
*/
|
|
6936
|
-
function isDatesArray(value, dateLib) {
|
|
6937
|
-
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
6938
|
-
}
|
|
6939
|
-
|
|
6940
|
-
/**
|
|
6941
|
-
* Checks if a given date matches at least one of the specified {@link Matcher}.
|
|
6942
|
-
*
|
|
6943
|
-
* @param date - The date to check.
|
|
6944
|
-
* @param matchers - The matchers to check against.
|
|
6945
|
-
* @param dateLib - The date utility library instance.
|
|
6946
|
-
* @returns `true` if the date matches any of the matchers, otherwise `false`.
|
|
6947
|
-
* @group Utilities
|
|
6948
|
-
*/
|
|
6949
|
-
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
6950
|
-
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
6951
|
-
const { isSameDay, differenceInCalendarDays, isAfter } = dateLib;
|
|
6952
|
-
return matchersArr.some((matcher) => {
|
|
6953
|
-
if (typeof matcher === "boolean") {
|
|
6954
|
-
return matcher;
|
|
6955
|
-
}
|
|
6956
|
-
if (dateLib.isDate(matcher)) {
|
|
6957
|
-
return isSameDay(date, matcher);
|
|
6958
|
-
}
|
|
6959
|
-
if (isDatesArray(matcher, dateLib)) {
|
|
6960
|
-
return matcher.includes(date);
|
|
6961
|
-
}
|
|
6962
|
-
if (isDateRange(matcher)) {
|
|
6963
|
-
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
6964
|
-
}
|
|
6965
|
-
if (isDayOfWeekType(matcher)) {
|
|
6966
|
-
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
6967
|
-
return matcher.dayOfWeek === date.getDay();
|
|
6968
|
-
}
|
|
6969
|
-
return matcher.dayOfWeek.includes(date.getDay());
|
|
6970
|
-
}
|
|
6971
|
-
if (isDateInterval(matcher)) {
|
|
6972
|
-
const diffBefore = differenceInCalendarDays(matcher.before, date);
|
|
6973
|
-
const diffAfter = differenceInCalendarDays(matcher.after, date);
|
|
6974
|
-
const isDayBefore = diffBefore > 0;
|
|
6975
|
-
const isDayAfter = diffAfter < 0;
|
|
6976
|
-
const isClosedInterval = isAfter(matcher.before, matcher.after);
|
|
6977
|
-
if (isClosedInterval) {
|
|
6978
|
-
return isDayAfter && isDayBefore;
|
|
6979
|
-
}
|
|
6980
|
-
else {
|
|
6981
|
-
return isDayBefore || isDayAfter;
|
|
6982
|
-
}
|
|
6983
|
-
}
|
|
6984
|
-
if (isDateAfterType(matcher)) {
|
|
6985
|
-
return differenceInCalendarDays(date, matcher.after) > 0;
|
|
6986
|
-
}
|
|
6987
|
-
if (isDateBeforeType(matcher)) {
|
|
6988
|
-
return differenceInCalendarDays(matcher.before, date) > 0;
|
|
6989
|
-
}
|
|
6990
|
-
if (typeof matcher === "function") {
|
|
6991
|
-
return matcher(date);
|
|
6992
|
-
}
|
|
6993
|
-
return false;
|
|
6994
|
-
});
|
|
6995
|
-
}
|
|
6996
|
-
|
|
6997
|
-
/**
|
|
6998
|
-
* Creates a function to retrieve the modifiers for a given day.
|
|
6999
|
-
*
|
|
7000
|
-
* This function calculates both internal and custom modifiers for each day
|
|
7001
|
-
* based on the provided calendar days and DayPicker props.
|
|
7002
|
-
*
|
|
7003
|
-
* @private
|
|
7004
|
-
* @param days The array of `CalendarDay` objects to process.
|
|
7005
|
-
* @param props The DayPicker props, including modifiers and configuration
|
|
7006
|
-
* options.
|
|
7007
|
-
* @param dateLib The date library to use for date manipulation.
|
|
7008
|
-
* @returns A function that retrieves the modifiers for a given `CalendarDay`.
|
|
7009
|
-
*/
|
|
7010
|
-
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
7011
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
7012
|
-
const { isSameDay, isSameMonth, startOfMonth, isBefore, endOfMonth, isAfter } = dateLib;
|
|
7013
|
-
const computedNavStart = navStart && startOfMonth(navStart);
|
|
7014
|
-
const computedNavEnd = navEnd && endOfMonth(navEnd);
|
|
7015
|
-
const internalModifiersMap = {
|
|
7016
|
-
[DayFlag.focused]: [],
|
|
7017
|
-
[DayFlag.outside]: [],
|
|
7018
|
-
[DayFlag.disabled]: [],
|
|
7019
|
-
[DayFlag.hidden]: [],
|
|
7020
|
-
[DayFlag.today]: []
|
|
7021
|
-
};
|
|
7022
|
-
const customModifiersMap = {};
|
|
7023
|
-
for (const day of days) {
|
|
7024
|
-
const { date, displayMonth } = day;
|
|
7025
|
-
const isOutside = Boolean(displayMonth && !isSameMonth(date, displayMonth));
|
|
7026
|
-
const isBeforeNavStart = Boolean(computedNavStart && isBefore(date, computedNavStart));
|
|
7027
|
-
const isAfterNavEnd = Boolean(computedNavEnd && isAfter(date, computedNavEnd));
|
|
7028
|
-
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
7029
|
-
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) ||
|
|
7030
|
-
isBeforeNavStart ||
|
|
7031
|
-
isAfterNavEnd ||
|
|
7032
|
-
// Broadcast calendar will show outside days as default
|
|
7033
|
-
(!broadcastCalendar && !showOutsideDays && isOutside) ||
|
|
7034
|
-
(broadcastCalendar && showOutsideDays === false && isOutside);
|
|
7035
|
-
const isToday = isSameDay(date, today ?? dateLib.today());
|
|
7036
|
-
if (isOutside)
|
|
7037
|
-
internalModifiersMap.outside.push(day);
|
|
7038
|
-
if (isDisabled)
|
|
7039
|
-
internalModifiersMap.disabled.push(day);
|
|
7040
|
-
if (isHidden)
|
|
7041
|
-
internalModifiersMap.hidden.push(day);
|
|
7042
|
-
if (isToday)
|
|
7043
|
-
internalModifiersMap.today.push(day);
|
|
7044
|
-
// Add custom modifiers
|
|
7045
|
-
if (modifiers) {
|
|
7046
|
-
Object.keys(modifiers).forEach((name) => {
|
|
7047
|
-
const modifierValue = modifiers?.[name];
|
|
7048
|
-
const isMatch = modifierValue
|
|
7049
|
-
? dateMatchModifiers(date, modifierValue, dateLib)
|
|
7050
|
-
: false;
|
|
7051
|
-
if (!isMatch)
|
|
7052
|
-
return;
|
|
7053
|
-
if (customModifiersMap[name]) {
|
|
7054
|
-
customModifiersMap[name].push(day);
|
|
7055
|
-
}
|
|
7056
|
-
else {
|
|
7057
|
-
customModifiersMap[name] = [day];
|
|
7058
|
-
}
|
|
7059
|
-
});
|
|
7060
|
-
}
|
|
7061
|
-
}
|
|
7062
|
-
return (day) => {
|
|
7063
|
-
// Initialize all the modifiers to false
|
|
7064
|
-
const dayFlags = {
|
|
7065
|
-
[DayFlag.focused]: false,
|
|
7066
|
-
[DayFlag.disabled]: false,
|
|
7067
|
-
[DayFlag.hidden]: false,
|
|
7068
|
-
[DayFlag.outside]: false,
|
|
7069
|
-
[DayFlag.today]: false
|
|
7070
|
-
};
|
|
7071
|
-
const customModifiers = {};
|
|
7072
|
-
// Find the modifiers for the given day
|
|
7073
|
-
for (const name in internalModifiersMap) {
|
|
7074
|
-
const days = internalModifiersMap[name];
|
|
7075
|
-
dayFlags[name] = days.some((d) => d === day);
|
|
7076
|
-
}
|
|
7077
|
-
for (const name in customModifiersMap) {
|
|
7078
|
-
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
7079
|
-
}
|
|
7080
|
-
return {
|
|
7081
|
-
...dayFlags,
|
|
7082
|
-
// custom modifiers should override all the previous ones
|
|
7083
|
-
...customModifiers
|
|
7084
|
-
};
|
|
7085
|
-
};
|
|
7086
|
-
}
|
|
7087
|
-
|
|
7088
|
-
/**
|
|
7089
|
-
* Returns the class names for a day based on its modifiers.
|
|
7090
|
-
*
|
|
7091
|
-
* This function combines the base class name for the day with any class names
|
|
7092
|
-
* associated with active modifiers.
|
|
7093
|
-
*
|
|
7094
|
-
* @param modifiers The modifiers applied to the day.
|
|
7095
|
-
* @param classNames The base class names for the calendar elements.
|
|
7096
|
-
* @param modifiersClassNames The class names associated with specific
|
|
7097
|
-
* modifiers.
|
|
7098
|
-
* @returns An array of class names for the day.
|
|
7099
|
-
*/
|
|
7100
|
-
function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
|
|
7101
|
-
const modifierClassNames = Object.entries(modifiers)
|
|
7102
|
-
.filter(([, active]) => active === true)
|
|
7103
|
-
.reduce((previousValue, [key]) => {
|
|
7104
|
-
if (modifiersClassNames[key]) {
|
|
7105
|
-
previousValue.push(modifiersClassNames[key]);
|
|
7106
|
-
}
|
|
7107
|
-
else if (classNames[DayFlag[key]]) {
|
|
7108
|
-
previousValue.push(classNames[DayFlag[key]]);
|
|
7109
|
-
}
|
|
7110
|
-
else if (classNames[SelectionState[key]]) {
|
|
7111
|
-
previousValue.push(classNames[SelectionState[key]]);
|
|
7112
|
-
}
|
|
7113
|
-
return previousValue;
|
|
7114
|
-
}, [classNames[UI.Day]]);
|
|
7115
|
-
return modifierClassNames;
|
|
7116
|
-
}
|
|
7117
|
-
|
|
7118
6740
|
/**
|
|
7119
6741
|
* Render the button elements in the calendar.
|
|
7120
6742
|
*
|
|
@@ -7143,7 +6765,9 @@ function CaptionLabel(props) {
|
|
|
7143
6765
|
*/
|
|
7144
6766
|
function Chevron(props) {
|
|
7145
6767
|
const { size = 24, orientation = "left", className } = props;
|
|
7146
|
-
return (
|
|
6768
|
+
return (
|
|
6769
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
6770
|
+
React__default.createElement("svg", { className: className, width: size, height: size, viewBox: "0 0 24 24" },
|
|
7147
6771
|
orientation === "up" && (React__default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" })),
|
|
7148
6772
|
orientation === "down" && (React__default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" })),
|
|
7149
6773
|
orientation === "left" && (React__default.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" })),
|
|
@@ -7181,6 +6805,127 @@ function DayButton(props) {
|
|
|
7181
6805
|
return React__default.createElement("button", { ref: ref, ...buttonProps });
|
|
7182
6806
|
}
|
|
7183
6807
|
|
|
6808
|
+
/**
|
|
6809
|
+
* Enum representing the UI elements composing DayPicker. These elements are
|
|
6810
|
+
* mapped to {@link CustomComponents}, {@link ClassNames}, and {@link Styles}.
|
|
6811
|
+
*
|
|
6812
|
+
* Some elements are extended by flags and modifiers.
|
|
6813
|
+
*/
|
|
6814
|
+
var UI;
|
|
6815
|
+
(function (UI) {
|
|
6816
|
+
/** The root component displaying the months and the navigation bar. */
|
|
6817
|
+
UI["Root"] = "root";
|
|
6818
|
+
/** The Chevron SVG element used by navigation buttons and dropdowns. */
|
|
6819
|
+
UI["Chevron"] = "chevron";
|
|
6820
|
+
/**
|
|
6821
|
+
* The grid cell with the day's date. Extended by {@link DayFlag} and
|
|
6822
|
+
* {@link SelectionState}.
|
|
6823
|
+
*/
|
|
6824
|
+
UI["Day"] = "day";
|
|
6825
|
+
/** The button containing the formatted day's date, inside the grid cell. */
|
|
6826
|
+
UI["DayButton"] = "day_button";
|
|
6827
|
+
/** The caption label of the month (when not showing the dropdown navigation). */
|
|
6828
|
+
UI["CaptionLabel"] = "caption_label";
|
|
6829
|
+
/** The container of the dropdown navigation (when enabled). */
|
|
6830
|
+
UI["Dropdowns"] = "dropdowns";
|
|
6831
|
+
/** The dropdown element to select for years and months. */
|
|
6832
|
+
UI["Dropdown"] = "dropdown";
|
|
6833
|
+
/** The container element of the dropdown. */
|
|
6834
|
+
UI["DropdownRoot"] = "dropdown_root";
|
|
6835
|
+
/** The root element of the footer. */
|
|
6836
|
+
UI["Footer"] = "footer";
|
|
6837
|
+
/** The month grid. */
|
|
6838
|
+
UI["MonthGrid"] = "month_grid";
|
|
6839
|
+
/** Contains the dropdown navigation or the caption label. */
|
|
6840
|
+
UI["MonthCaption"] = "month_caption";
|
|
6841
|
+
/** The dropdown with the months. */
|
|
6842
|
+
UI["MonthsDropdown"] = "months_dropdown";
|
|
6843
|
+
/** Wrapper of the month grid. */
|
|
6844
|
+
UI["Month"] = "month";
|
|
6845
|
+
/** The container of the displayed months. */
|
|
6846
|
+
UI["Months"] = "months";
|
|
6847
|
+
/** The navigation bar with the previous and next buttons. */
|
|
6848
|
+
UI["Nav"] = "nav";
|
|
6849
|
+
/**
|
|
6850
|
+
* The next month button in the navigation. *
|
|
6851
|
+
*
|
|
6852
|
+
* @since 9.1.0
|
|
6853
|
+
*/
|
|
6854
|
+
UI["NextMonthButton"] = "button_next";
|
|
6855
|
+
/**
|
|
6856
|
+
* The previous month button in the navigation.
|
|
6857
|
+
*
|
|
6858
|
+
* @since 9.1.0
|
|
6859
|
+
*/
|
|
6860
|
+
UI["PreviousMonthButton"] = "button_previous";
|
|
6861
|
+
/** The row containing the week. */
|
|
6862
|
+
UI["Week"] = "week";
|
|
6863
|
+
/** The group of row weeks in a month (`tbody`). */
|
|
6864
|
+
UI["Weeks"] = "weeks";
|
|
6865
|
+
/** The column header with the weekday. */
|
|
6866
|
+
UI["Weekday"] = "weekday";
|
|
6867
|
+
/** The row grouping the weekdays in the column headers. */
|
|
6868
|
+
UI["Weekdays"] = "weekdays";
|
|
6869
|
+
/** The cell containing the week number. */
|
|
6870
|
+
UI["WeekNumber"] = "week_number";
|
|
6871
|
+
/** The cell header of the week numbers column. */
|
|
6872
|
+
UI["WeekNumberHeader"] = "week_number_header";
|
|
6873
|
+
/** The dropdown with the years. */
|
|
6874
|
+
UI["YearsDropdown"] = "years_dropdown";
|
|
6875
|
+
})(UI || (UI = {}));
|
|
6876
|
+
/** Enum representing flags for the {@link UI.Day} element. */
|
|
6877
|
+
var DayFlag;
|
|
6878
|
+
(function (DayFlag) {
|
|
6879
|
+
/** The day is disabled. */
|
|
6880
|
+
DayFlag["disabled"] = "disabled";
|
|
6881
|
+
/** The day is hidden. */
|
|
6882
|
+
DayFlag["hidden"] = "hidden";
|
|
6883
|
+
/** The day is outside the current month. */
|
|
6884
|
+
DayFlag["outside"] = "outside";
|
|
6885
|
+
/** The day is focused. */
|
|
6886
|
+
DayFlag["focused"] = "focused";
|
|
6887
|
+
/** The day is today. */
|
|
6888
|
+
DayFlag["today"] = "today";
|
|
6889
|
+
})(DayFlag || (DayFlag = {}));
|
|
6890
|
+
/**
|
|
6891
|
+
* Enum representing selection states that can be applied to the {@link UI.Day}
|
|
6892
|
+
* element in selection mode.
|
|
6893
|
+
*/
|
|
6894
|
+
var SelectionState;
|
|
6895
|
+
(function (SelectionState) {
|
|
6896
|
+
/** The day is at the end of a selected range. */
|
|
6897
|
+
SelectionState["range_end"] = "range_end";
|
|
6898
|
+
/** The day is at the middle of a selected range. */
|
|
6899
|
+
SelectionState["range_middle"] = "range_middle";
|
|
6900
|
+
/** The day is at the start of a selected range. */
|
|
6901
|
+
SelectionState["range_start"] = "range_start";
|
|
6902
|
+
/** The day is selected. */
|
|
6903
|
+
SelectionState["selected"] = "selected";
|
|
6904
|
+
})(SelectionState || (SelectionState = {}));
|
|
6905
|
+
/**
|
|
6906
|
+
* Enum representing different animation states for transitioning between
|
|
6907
|
+
* months.
|
|
6908
|
+
*/
|
|
6909
|
+
var Animation;
|
|
6910
|
+
(function (Animation) {
|
|
6911
|
+
/** The entering weeks when they appear before the exiting month. */
|
|
6912
|
+
Animation["weeks_before_enter"] = "weeks_before_enter";
|
|
6913
|
+
/** The exiting weeks when they disappear before the entering month. */
|
|
6914
|
+
Animation["weeks_before_exit"] = "weeks_before_exit";
|
|
6915
|
+
/** The entering weeks when they appear after the exiting month. */
|
|
6916
|
+
Animation["weeks_after_enter"] = "weeks_after_enter";
|
|
6917
|
+
/** The exiting weeks when they disappear after the entering month. */
|
|
6918
|
+
Animation["weeks_after_exit"] = "weeks_after_exit";
|
|
6919
|
+
/** The entering caption when it appears after the exiting month. */
|
|
6920
|
+
Animation["caption_after_enter"] = "caption_after_enter";
|
|
6921
|
+
/** The exiting caption when it disappears after the entering month. */
|
|
6922
|
+
Animation["caption_after_exit"] = "caption_after_exit";
|
|
6923
|
+
/** The entering caption when it appears before the exiting month. */
|
|
6924
|
+
Animation["caption_before_enter"] = "caption_before_enter";
|
|
6925
|
+
/** The exiting caption when it disappears before the entering month. */
|
|
6926
|
+
Animation["caption_before_exit"] = "caption_before_exit";
|
|
6927
|
+
})(Animation || (Animation = {}));
|
|
6928
|
+
|
|
7184
6929
|
/**
|
|
7185
6930
|
* Render a dropdown component for navigation in the calendar.
|
|
7186
6931
|
*
|
|
@@ -7302,7 +7047,7 @@ function MonthsDropdown(props) {
|
|
|
7302
7047
|
*/
|
|
7303
7048
|
function Nav(props) {
|
|
7304
7049
|
const { onPreviousClick, onNextClick, previousMonth, nextMonth, ...navProps } = props;
|
|
7305
|
-
const { components, classNames, labels: { labelPrevious, labelNext } } = useDayPicker();
|
|
7050
|
+
const { components, classNames, labels: { labelPrevious, labelNext }, } = useDayPicker();
|
|
7306
7051
|
const handleNextClick = useCallback((e) => {
|
|
7307
7052
|
if (nextMonth) {
|
|
7308
7053
|
onNextClick?.(e);
|
|
@@ -7477,6 +7222,281 @@ const components = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty
|
|
|
7477
7222
|
YearsDropdown
|
|
7478
7223
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7479
7224
|
|
|
7225
|
+
/**
|
|
7226
|
+
* Checks if a given date is within a specified date range.
|
|
7227
|
+
*
|
|
7228
|
+
* @since 9.0.0
|
|
7229
|
+
* @param range - The date range to check against.
|
|
7230
|
+
* @param date - The date to check.
|
|
7231
|
+
* @param excludeEnds - If `true`, the range's start and end dates are excluded.
|
|
7232
|
+
* @param dateLib - The date utility library instance.
|
|
7233
|
+
* @returns `true` if the date is within the range, otherwise `false`.
|
|
7234
|
+
* @group Utilities
|
|
7235
|
+
*/
|
|
7236
|
+
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
7237
|
+
let { from, to } = range;
|
|
7238
|
+
const { differenceInCalendarDays, isSameDay } = dateLib;
|
|
7239
|
+
if (from && to) {
|
|
7240
|
+
const isRangeInverted = differenceInCalendarDays(to, from) < 0;
|
|
7241
|
+
if (isRangeInverted) {
|
|
7242
|
+
[from, to] = [to, from];
|
|
7243
|
+
}
|
|
7244
|
+
const isInRange = differenceInCalendarDays(date, from) >= (excludeEnds ? 1 : 0) &&
|
|
7245
|
+
differenceInCalendarDays(to, date) >= (excludeEnds ? 1 : 0);
|
|
7246
|
+
return isInRange;
|
|
7247
|
+
}
|
|
7248
|
+
if (!excludeEnds && to) {
|
|
7249
|
+
return isSameDay(to, date);
|
|
7250
|
+
}
|
|
7251
|
+
if (!excludeEnds && from) {
|
|
7252
|
+
return isSameDay(from, date);
|
|
7253
|
+
}
|
|
7254
|
+
return false;
|
|
7255
|
+
}
|
|
7256
|
+
|
|
7257
|
+
/**
|
|
7258
|
+
* Checks if the given value is of type {@link DateInterval}.
|
|
7259
|
+
*
|
|
7260
|
+
* @param matcher - The value to check.
|
|
7261
|
+
* @returns `true` if the value is a {@link DateInterval}, otherwise `false`.
|
|
7262
|
+
* @group Utilities
|
|
7263
|
+
*/
|
|
7264
|
+
function isDateInterval(matcher) {
|
|
7265
|
+
return Boolean(matcher &&
|
|
7266
|
+
typeof matcher === "object" &&
|
|
7267
|
+
"before" in matcher &&
|
|
7268
|
+
"after" in matcher);
|
|
7269
|
+
}
|
|
7270
|
+
/**
|
|
7271
|
+
* Checks if the given value is of type {@link DateRange}.
|
|
7272
|
+
*
|
|
7273
|
+
* @param value - The value to check.
|
|
7274
|
+
* @returns `true` if the value is a {@link DateRange}, otherwise `false`.
|
|
7275
|
+
* @group Utilities
|
|
7276
|
+
*/
|
|
7277
|
+
function isDateRange(value) {
|
|
7278
|
+
return Boolean(value && typeof value === "object" && "from" in value);
|
|
7279
|
+
}
|
|
7280
|
+
/**
|
|
7281
|
+
* Checks if the given value is of type {@link DateAfter}.
|
|
7282
|
+
*
|
|
7283
|
+
* @param value - The value to check.
|
|
7284
|
+
* @returns `true` if the value is a {@link DateAfter}, otherwise `false`.
|
|
7285
|
+
* @group Utilities
|
|
7286
|
+
*/
|
|
7287
|
+
function isDateAfterType(value) {
|
|
7288
|
+
return Boolean(value && typeof value === "object" && "after" in value);
|
|
7289
|
+
}
|
|
7290
|
+
/**
|
|
7291
|
+
* Checks if the given value is of type {@link DateBefore}.
|
|
7292
|
+
*
|
|
7293
|
+
* @param value - The value to check.
|
|
7294
|
+
* @returns `true` if the value is a {@link DateBefore}, otherwise `false`.
|
|
7295
|
+
* @group Utilities
|
|
7296
|
+
*/
|
|
7297
|
+
function isDateBeforeType(value) {
|
|
7298
|
+
return Boolean(value && typeof value === "object" && "before" in value);
|
|
7299
|
+
}
|
|
7300
|
+
/**
|
|
7301
|
+
* Checks if the given value is of type {@link DayOfWeek}.
|
|
7302
|
+
*
|
|
7303
|
+
* @param value - The value to check.
|
|
7304
|
+
* @returns `true` if the value is a {@link DayOfWeek}, otherwise `false`.
|
|
7305
|
+
* @group Utilities
|
|
7306
|
+
*/
|
|
7307
|
+
function isDayOfWeekType(value) {
|
|
7308
|
+
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
7309
|
+
}
|
|
7310
|
+
/**
|
|
7311
|
+
* Checks if the given value is an array of valid dates.
|
|
7312
|
+
*
|
|
7313
|
+
* @private
|
|
7314
|
+
* @param value - The value to check.
|
|
7315
|
+
* @param dateLib - The date utility library instance.
|
|
7316
|
+
* @returns `true` if the value is an array of valid dates, otherwise `false`.
|
|
7317
|
+
*/
|
|
7318
|
+
function isDatesArray(value, dateLib) {
|
|
7319
|
+
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
7320
|
+
}
|
|
7321
|
+
|
|
7322
|
+
/**
|
|
7323
|
+
* Checks if a given date matches at least one of the specified {@link Matcher}.
|
|
7324
|
+
*
|
|
7325
|
+
* @param date - The date to check.
|
|
7326
|
+
* @param matchers - The matchers to check against.
|
|
7327
|
+
* @param dateLib - The date utility library instance.
|
|
7328
|
+
* @returns `true` if the date matches any of the matchers, otherwise `false`.
|
|
7329
|
+
* @group Utilities
|
|
7330
|
+
*/
|
|
7331
|
+
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
7332
|
+
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
7333
|
+
const { isSameDay, differenceInCalendarDays, isAfter } = dateLib;
|
|
7334
|
+
return matchersArr.some((matcher) => {
|
|
7335
|
+
if (typeof matcher === "boolean") {
|
|
7336
|
+
return matcher;
|
|
7337
|
+
}
|
|
7338
|
+
if (dateLib.isDate(matcher)) {
|
|
7339
|
+
return isSameDay(date, matcher);
|
|
7340
|
+
}
|
|
7341
|
+
if (isDatesArray(matcher, dateLib)) {
|
|
7342
|
+
return matcher.includes(date);
|
|
7343
|
+
}
|
|
7344
|
+
if (isDateRange(matcher)) {
|
|
7345
|
+
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
7346
|
+
}
|
|
7347
|
+
if (isDayOfWeekType(matcher)) {
|
|
7348
|
+
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
7349
|
+
return matcher.dayOfWeek === date.getDay();
|
|
7350
|
+
}
|
|
7351
|
+
return matcher.dayOfWeek.includes(date.getDay());
|
|
7352
|
+
}
|
|
7353
|
+
if (isDateInterval(matcher)) {
|
|
7354
|
+
const diffBefore = differenceInCalendarDays(matcher.before, date);
|
|
7355
|
+
const diffAfter = differenceInCalendarDays(matcher.after, date);
|
|
7356
|
+
const isDayBefore = diffBefore > 0;
|
|
7357
|
+
const isDayAfter = diffAfter < 0;
|
|
7358
|
+
const isClosedInterval = isAfter(matcher.before, matcher.after);
|
|
7359
|
+
if (isClosedInterval) {
|
|
7360
|
+
return isDayAfter && isDayBefore;
|
|
7361
|
+
}
|
|
7362
|
+
else {
|
|
7363
|
+
return isDayBefore || isDayAfter;
|
|
7364
|
+
}
|
|
7365
|
+
}
|
|
7366
|
+
if (isDateAfterType(matcher)) {
|
|
7367
|
+
return differenceInCalendarDays(date, matcher.after) > 0;
|
|
7368
|
+
}
|
|
7369
|
+
if (isDateBeforeType(matcher)) {
|
|
7370
|
+
return differenceInCalendarDays(matcher.before, date) > 0;
|
|
7371
|
+
}
|
|
7372
|
+
if (typeof matcher === "function") {
|
|
7373
|
+
return matcher(date);
|
|
7374
|
+
}
|
|
7375
|
+
return false;
|
|
7376
|
+
});
|
|
7377
|
+
}
|
|
7378
|
+
|
|
7379
|
+
/**
|
|
7380
|
+
* Creates a function to retrieve the modifiers for a given day.
|
|
7381
|
+
*
|
|
7382
|
+
* This function calculates both internal and custom modifiers for each day
|
|
7383
|
+
* based on the provided calendar days and DayPicker props.
|
|
7384
|
+
*
|
|
7385
|
+
* @private
|
|
7386
|
+
* @param days The array of `CalendarDay` objects to process.
|
|
7387
|
+
* @param props The DayPicker props, including modifiers and configuration
|
|
7388
|
+
* options.
|
|
7389
|
+
* @param dateLib The date library to use for date manipulation.
|
|
7390
|
+
* @returns A function that retrieves the modifiers for a given `CalendarDay`.
|
|
7391
|
+
*/
|
|
7392
|
+
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
7393
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today, } = props;
|
|
7394
|
+
const { isSameDay, isSameMonth, startOfMonth, isBefore, endOfMonth, isAfter, } = dateLib;
|
|
7395
|
+
const computedNavStart = navStart && startOfMonth(navStart);
|
|
7396
|
+
const computedNavEnd = navEnd && endOfMonth(navEnd);
|
|
7397
|
+
const internalModifiersMap = {
|
|
7398
|
+
[DayFlag.focused]: [],
|
|
7399
|
+
[DayFlag.outside]: [],
|
|
7400
|
+
[DayFlag.disabled]: [],
|
|
7401
|
+
[DayFlag.hidden]: [],
|
|
7402
|
+
[DayFlag.today]: [],
|
|
7403
|
+
};
|
|
7404
|
+
const customModifiersMap = {};
|
|
7405
|
+
for (const day of days) {
|
|
7406
|
+
const { date, displayMonth } = day;
|
|
7407
|
+
const isOutside = Boolean(displayMonth && !isSameMonth(date, displayMonth));
|
|
7408
|
+
const isBeforeNavStart = Boolean(computedNavStart && isBefore(date, computedNavStart));
|
|
7409
|
+
const isAfterNavEnd = Boolean(computedNavEnd && isAfter(date, computedNavEnd));
|
|
7410
|
+
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
7411
|
+
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) ||
|
|
7412
|
+
isBeforeNavStart ||
|
|
7413
|
+
isAfterNavEnd ||
|
|
7414
|
+
// Broadcast calendar will show outside days as default
|
|
7415
|
+
(!broadcastCalendar && !showOutsideDays && isOutside) ||
|
|
7416
|
+
(broadcastCalendar && showOutsideDays === false && isOutside);
|
|
7417
|
+
const isToday = isSameDay(date, today ?? dateLib.today());
|
|
7418
|
+
if (isOutside)
|
|
7419
|
+
internalModifiersMap.outside.push(day);
|
|
7420
|
+
if (isDisabled)
|
|
7421
|
+
internalModifiersMap.disabled.push(day);
|
|
7422
|
+
if (isHidden)
|
|
7423
|
+
internalModifiersMap.hidden.push(day);
|
|
7424
|
+
if (isToday)
|
|
7425
|
+
internalModifiersMap.today.push(day);
|
|
7426
|
+
// Add custom modifiers
|
|
7427
|
+
if (modifiers) {
|
|
7428
|
+
Object.keys(modifiers).forEach((name) => {
|
|
7429
|
+
const modifierValue = modifiers?.[name];
|
|
7430
|
+
const isMatch = modifierValue
|
|
7431
|
+
? dateMatchModifiers(date, modifierValue, dateLib)
|
|
7432
|
+
: false;
|
|
7433
|
+
if (!isMatch)
|
|
7434
|
+
return;
|
|
7435
|
+
if (customModifiersMap[name]) {
|
|
7436
|
+
customModifiersMap[name].push(day);
|
|
7437
|
+
}
|
|
7438
|
+
else {
|
|
7439
|
+
customModifiersMap[name] = [day];
|
|
7440
|
+
}
|
|
7441
|
+
});
|
|
7442
|
+
}
|
|
7443
|
+
}
|
|
7444
|
+
return (day) => {
|
|
7445
|
+
// Initialize all the modifiers to false
|
|
7446
|
+
const dayFlags = {
|
|
7447
|
+
[DayFlag.focused]: false,
|
|
7448
|
+
[DayFlag.disabled]: false,
|
|
7449
|
+
[DayFlag.hidden]: false,
|
|
7450
|
+
[DayFlag.outside]: false,
|
|
7451
|
+
[DayFlag.today]: false,
|
|
7452
|
+
};
|
|
7453
|
+
const customModifiers = {};
|
|
7454
|
+
// Find the modifiers for the given day
|
|
7455
|
+
for (const name in internalModifiersMap) {
|
|
7456
|
+
const days = internalModifiersMap[name];
|
|
7457
|
+
dayFlags[name] = days.some((d) => d === day);
|
|
7458
|
+
}
|
|
7459
|
+
for (const name in customModifiersMap) {
|
|
7460
|
+
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
7461
|
+
}
|
|
7462
|
+
return {
|
|
7463
|
+
...dayFlags,
|
|
7464
|
+
// custom modifiers should override all the previous ones
|
|
7465
|
+
...customModifiers,
|
|
7466
|
+
};
|
|
7467
|
+
};
|
|
7468
|
+
}
|
|
7469
|
+
|
|
7470
|
+
/**
|
|
7471
|
+
* Returns the class names for a day based on its modifiers.
|
|
7472
|
+
*
|
|
7473
|
+
* This function combines the base class name for the day with any class names
|
|
7474
|
+
* associated with active modifiers.
|
|
7475
|
+
*
|
|
7476
|
+
* @param modifiers The modifiers applied to the day.
|
|
7477
|
+
* @param classNames The base class names for the calendar elements.
|
|
7478
|
+
* @param modifiersClassNames The class names associated with specific
|
|
7479
|
+
* modifiers.
|
|
7480
|
+
* @returns An array of class names for the day.
|
|
7481
|
+
*/
|
|
7482
|
+
function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
|
|
7483
|
+
const modifierClassNames = Object.entries(modifiers)
|
|
7484
|
+
.filter(([, active]) => active === true)
|
|
7485
|
+
.reduce((previousValue, [key]) => {
|
|
7486
|
+
if (modifiersClassNames[key]) {
|
|
7487
|
+
previousValue.push(modifiersClassNames[key]);
|
|
7488
|
+
}
|
|
7489
|
+
else if (classNames[DayFlag[key]]) {
|
|
7490
|
+
previousValue.push(classNames[DayFlag[key]]);
|
|
7491
|
+
}
|
|
7492
|
+
else if (classNames[SelectionState[key]]) {
|
|
7493
|
+
previousValue.push(classNames[SelectionState[key]]);
|
|
7494
|
+
}
|
|
7495
|
+
return previousValue;
|
|
7496
|
+
}, [classNames[UI.Day]]);
|
|
7497
|
+
return modifierClassNames;
|
|
7498
|
+
}
|
|
7499
|
+
|
|
7480
7500
|
/**
|
|
7481
7501
|
* Merges custom components from the props with the default components.
|
|
7482
7502
|
*
|
|
@@ -7490,7 +7510,7 @@ const components = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty
|
|
|
7490
7510
|
function getComponents(customComponents) {
|
|
7491
7511
|
return {
|
|
7492
7512
|
...components,
|
|
7493
|
-
...customComponents
|
|
7513
|
+
...customComponents,
|
|
7494
7514
|
};
|
|
7495
7515
|
}
|
|
7496
7516
|
|
|
@@ -7510,7 +7530,7 @@ function getDataAttributes(props) {
|
|
|
7510
7530
|
"data-multiple-months": (props.numberOfMonths && props.numberOfMonths > 1) || undefined,
|
|
7511
7531
|
"data-week-numbers": props.showWeekNumber || undefined,
|
|
7512
7532
|
"data-broadcast-calendar": props.broadcastCalendar || undefined,
|
|
7513
|
-
"data-nav-layout": props.navLayout || undefined
|
|
7533
|
+
"data-nav-layout": props.navLayout || undefined,
|
|
7514
7534
|
};
|
|
7515
7535
|
Object.entries(props).forEach(([key, val]) => {
|
|
7516
7536
|
if (key.startsWith("data-")) {
|
|
@@ -7603,6 +7623,22 @@ function formatMonthDropdown(month, dateLib = defaultDateLib) {
|
|
|
7603
7623
|
return dateLib.format(month, "LLLL");
|
|
7604
7624
|
}
|
|
7605
7625
|
|
|
7626
|
+
/**
|
|
7627
|
+
* Formats the name of a weekday to be displayed in the weekdays header.
|
|
7628
|
+
*
|
|
7629
|
+
* @defaultValue `cccccc` (e.g., "Mo" for Monday).
|
|
7630
|
+
* @param weekday The date representing the weekday.
|
|
7631
|
+
* @param options Configuration options for the date library.
|
|
7632
|
+
* @param dateLib The date library to use for formatting. If not provided, a new
|
|
7633
|
+
* instance is created.
|
|
7634
|
+
* @returns The formatted weekday name as a string.
|
|
7635
|
+
* @group Formatters
|
|
7636
|
+
* @see https://daypicker.dev/docs/translation#custom-formatters
|
|
7637
|
+
*/
|
|
7638
|
+
function formatWeekdayName(weekday, options, dateLib) {
|
|
7639
|
+
return (dateLib ?? new DateLib(options)).format(weekday, "cccccc");
|
|
7640
|
+
}
|
|
7641
|
+
|
|
7606
7642
|
/**
|
|
7607
7643
|
* Formats the week number.
|
|
7608
7644
|
*
|
|
@@ -7633,22 +7669,6 @@ function formatWeekNumberHeader() {
|
|
|
7633
7669
|
return ``;
|
|
7634
7670
|
}
|
|
7635
7671
|
|
|
7636
|
-
/**
|
|
7637
|
-
* Formats the name of a weekday to be displayed in the weekdays header.
|
|
7638
|
-
*
|
|
7639
|
-
* @defaultValue `cccccc` (e.g., "Mo" for Monday).
|
|
7640
|
-
* @param weekday The date representing the weekday.
|
|
7641
|
-
* @param options Configuration options for the date library.
|
|
7642
|
-
* @param dateLib The date library to use for formatting. If not provided, a new
|
|
7643
|
-
* instance is created.
|
|
7644
|
-
* @returns The formatted weekday name as a string.
|
|
7645
|
-
* @group Formatters
|
|
7646
|
-
* @see https://daypicker.dev/docs/translation#custom-formatters
|
|
7647
|
-
*/
|
|
7648
|
-
function formatWeekdayName(weekday, options, dateLib) {
|
|
7649
|
-
return (dateLib ?? new DateLib(options)).format(weekday, "cccccc");
|
|
7650
|
-
}
|
|
7651
|
-
|
|
7652
7672
|
/**
|
|
7653
7673
|
* Formats the year for the dropdown option label.
|
|
7654
7674
|
*
|
|
@@ -7699,7 +7719,7 @@ function getFormatters(customFormatters) {
|
|
|
7699
7719
|
}
|
|
7700
7720
|
return {
|
|
7701
7721
|
...defaultFormatters,
|
|
7702
|
-
...customFormatters
|
|
7722
|
+
...customFormatters,
|
|
7703
7723
|
};
|
|
7704
7724
|
}
|
|
7705
7725
|
|
|
@@ -7719,10 +7739,10 @@ function getFormatters(customFormatters) {
|
|
|
7719
7739
|
* if no months are available.
|
|
7720
7740
|
*/
|
|
7721
7741
|
function getMonthOptions(displayMonth, navStart, navEnd, formatters, dateLib) {
|
|
7722
|
-
const { startOfMonth, startOfYear, endOfYear, eachMonthOfInterval, getMonth } = dateLib;
|
|
7742
|
+
const { startOfMonth, startOfYear, endOfYear, eachMonthOfInterval, getMonth, } = dateLib;
|
|
7723
7743
|
const months = eachMonthOfInterval({
|
|
7724
7744
|
start: startOfYear(displayMonth),
|
|
7725
|
-
end: endOfYear(displayMonth)
|
|
7745
|
+
end: endOfYear(displayMonth),
|
|
7726
7746
|
});
|
|
7727
7747
|
const options = months.map((month) => {
|
|
7728
7748
|
const label = formatters.formatMonthDropdown(month, dateLib);
|
|
@@ -7753,7 +7773,7 @@ function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
|
7753
7773
|
.forEach(([modifier]) => {
|
|
7754
7774
|
style = {
|
|
7755
7775
|
...style,
|
|
7756
|
-
...modifiersStyles?.[modifier]
|
|
7776
|
+
...modifiersStyles?.[modifier],
|
|
7757
7777
|
};
|
|
7758
7778
|
});
|
|
7759
7779
|
return style;
|
|
@@ -7792,10 +7812,11 @@ function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
|
7792
7812
|
* @param navEnd The end date for navigation.
|
|
7793
7813
|
* @param formatters The formatters to use for formatting the year labels.
|
|
7794
7814
|
* @param dateLib The date library to use for date manipulation.
|
|
7815
|
+
* @param reverse If true, reverses the order of the years (descending).
|
|
7795
7816
|
* @returns An array of dropdown options representing the years, or `undefined`
|
|
7796
7817
|
* if `navStart` or `navEnd` is not provided.
|
|
7797
7818
|
*/
|
|
7798
|
-
function getYearOptions(navStart, navEnd, formatters, dateLib) {
|
|
7819
|
+
function getYearOptions(navStart, navEnd, formatters, dateLib, reverse = false) {
|
|
7799
7820
|
if (!navStart)
|
|
7800
7821
|
return undefined;
|
|
7801
7822
|
if (!navEnd)
|
|
@@ -7809,16 +7830,47 @@ function getYearOptions(navStart, navEnd, formatters, dateLib) {
|
|
|
7809
7830
|
years.push(year);
|
|
7810
7831
|
year = addYears(year, 1);
|
|
7811
7832
|
}
|
|
7833
|
+
if (reverse)
|
|
7834
|
+
years.reverse();
|
|
7812
7835
|
return years.map((year) => {
|
|
7813
7836
|
const label = formatters.formatYearDropdown(year, dateLib);
|
|
7814
7837
|
return {
|
|
7815
7838
|
value: getYear(year),
|
|
7816
7839
|
label,
|
|
7817
|
-
disabled: false
|
|
7840
|
+
disabled: false,
|
|
7818
7841
|
};
|
|
7819
7842
|
});
|
|
7820
7843
|
}
|
|
7821
7844
|
|
|
7845
|
+
/**
|
|
7846
|
+
* Generates the ARIA label for a day button.
|
|
7847
|
+
*
|
|
7848
|
+
* Use the `modifiers` argument to provide additional context for the label,
|
|
7849
|
+
* such as indicating if the day is "today" or "selected."
|
|
7850
|
+
*
|
|
7851
|
+
* @defaultValue The formatted date.
|
|
7852
|
+
* @param date - The date to format.
|
|
7853
|
+
* @param modifiers - The modifiers providing context for the day.
|
|
7854
|
+
* @param options - Optional configuration for the date formatting library.
|
|
7855
|
+
* @param dateLib - An optional instance of the date formatting library.
|
|
7856
|
+
* @returns The ARIA label for the day button.
|
|
7857
|
+
* @group Labels
|
|
7858
|
+
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
7859
|
+
*/
|
|
7860
|
+
function labelDayButton(date, modifiers, options, dateLib) {
|
|
7861
|
+
let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
|
|
7862
|
+
if (modifiers.today)
|
|
7863
|
+
label = `Today, ${label}`;
|
|
7864
|
+
if (modifiers.selected)
|
|
7865
|
+
label = `${label}, selected`;
|
|
7866
|
+
return label;
|
|
7867
|
+
}
|
|
7868
|
+
/**
|
|
7869
|
+
* @ignore
|
|
7870
|
+
* @deprecated Use `labelDayButton` instead.
|
|
7871
|
+
*/
|
|
7872
|
+
const labelDay = labelDayButton;
|
|
7873
|
+
|
|
7822
7874
|
/**
|
|
7823
7875
|
* Generates the ARIA label for the month grid, which is announced when entering
|
|
7824
7876
|
* the grid.
|
|
@@ -7860,33 +7912,17 @@ function labelGridcell(date, modifiers, options, dateLib) {
|
|
|
7860
7912
|
}
|
|
7861
7913
|
|
|
7862
7914
|
/**
|
|
7863
|
-
* Generates the ARIA label for
|
|
7864
|
-
*
|
|
7865
|
-
* Use the `modifiers` argument to provide additional context for the label,
|
|
7866
|
-
* such as indicating if the day is "today" or "selected."
|
|
7915
|
+
* Generates the ARIA label for the months dropdown.
|
|
7867
7916
|
*
|
|
7868
|
-
* @defaultValue
|
|
7869
|
-
* @param date - The date to format.
|
|
7870
|
-
* @param modifiers - The modifiers providing context for the day.
|
|
7917
|
+
* @defaultValue `"Choose the Month"`
|
|
7871
7918
|
* @param options - Optional configuration for the date formatting library.
|
|
7872
|
-
* @
|
|
7873
|
-
* @returns The ARIA label for the day button.
|
|
7919
|
+
* @returns The ARIA label for the months dropdown.
|
|
7874
7920
|
* @group Labels
|
|
7875
7921
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
7876
7922
|
*/
|
|
7877
|
-
function
|
|
7878
|
-
|
|
7879
|
-
if (modifiers.today)
|
|
7880
|
-
label = `Today, ${label}`;
|
|
7881
|
-
if (modifiers.selected)
|
|
7882
|
-
label = `${label}, selected`;
|
|
7883
|
-
return label;
|
|
7923
|
+
function labelMonthDropdown(_options) {
|
|
7924
|
+
return "Choose the Month";
|
|
7884
7925
|
}
|
|
7885
|
-
/**
|
|
7886
|
-
* @ignore
|
|
7887
|
-
* @deprecated Use `labelDayButton` instead.
|
|
7888
|
-
*/
|
|
7889
|
-
const labelDay = labelDayButton;
|
|
7890
7926
|
|
|
7891
7927
|
/**
|
|
7892
7928
|
* Generates the ARIA label for the navigation toolbar.
|
|
@@ -7900,19 +7936,6 @@ function labelNav() {
|
|
|
7900
7936
|
return "";
|
|
7901
7937
|
}
|
|
7902
7938
|
|
|
7903
|
-
/**
|
|
7904
|
-
* Generates the ARIA label for the months dropdown.
|
|
7905
|
-
*
|
|
7906
|
-
* @defaultValue `"Choose the Month"`
|
|
7907
|
-
* @param options - Optional configuration for the date formatting library.
|
|
7908
|
-
* @returns The ARIA label for the months dropdown.
|
|
7909
|
-
* @group Labels
|
|
7910
|
-
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
7911
|
-
*/
|
|
7912
|
-
function labelMonthDropdown(options) {
|
|
7913
|
-
return "Choose the Month";
|
|
7914
|
-
}
|
|
7915
|
-
|
|
7916
7939
|
/**
|
|
7917
7940
|
* Generates the ARIA label for the "next month" button.
|
|
7918
7941
|
*
|
|
@@ -7923,7 +7946,7 @@ function labelMonthDropdown(options) {
|
|
|
7923
7946
|
* @group Labels
|
|
7924
7947
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
7925
7948
|
*/
|
|
7926
|
-
function labelNext(
|
|
7949
|
+
function labelNext(_month) {
|
|
7927
7950
|
return "Go to the Next Month";
|
|
7928
7951
|
}
|
|
7929
7952
|
|
|
@@ -7937,7 +7960,7 @@ function labelNext(month) {
|
|
|
7937
7960
|
* @group Labels
|
|
7938
7961
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
7939
7962
|
*/
|
|
7940
|
-
function labelPrevious(
|
|
7963
|
+
function labelPrevious(_month) {
|
|
7941
7964
|
return "Go to the Previous Month";
|
|
7942
7965
|
}
|
|
7943
7966
|
|
|
@@ -7966,7 +7989,7 @@ function labelWeekday(date, options, dateLib) {
|
|
|
7966
7989
|
* @group Labels
|
|
7967
7990
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
7968
7991
|
*/
|
|
7969
|
-
function labelWeekNumber(weekNumber,
|
|
7992
|
+
function labelWeekNumber(weekNumber, _options) {
|
|
7970
7993
|
return `Week ${weekNumber}`;
|
|
7971
7994
|
}
|
|
7972
7995
|
|
|
@@ -7979,7 +8002,7 @@ function labelWeekNumber(weekNumber, options) {
|
|
|
7979
8002
|
* @group Labels
|
|
7980
8003
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
7981
8004
|
*/
|
|
7982
|
-
function labelWeekNumberHeader(
|
|
8005
|
+
function labelWeekNumberHeader(_options) {
|
|
7983
8006
|
return "Week Number";
|
|
7984
8007
|
}
|
|
7985
8008
|
|
|
@@ -7992,7 +8015,7 @@ function labelWeekNumberHeader(options) {
|
|
|
7992
8015
|
* @group Labels
|
|
7993
8016
|
* @see https://daypicker.dev/docs/translation#aria-labels
|
|
7994
8017
|
*/
|
|
7995
|
-
function labelYearDropdown(
|
|
8018
|
+
function labelYearDropdown(_options) {
|
|
7996
8019
|
return "Choose the Year";
|
|
7997
8020
|
}
|
|
7998
8021
|
|
|
@@ -8019,7 +8042,7 @@ const asHtmlElement = (element) => {
|
|
|
8019
8042
|
return null;
|
|
8020
8043
|
};
|
|
8021
8044
|
const queryMonthEls = (element) => [
|
|
8022
|
-
...(element.querySelectorAll("[data-animated-month]") ?? [])
|
|
8045
|
+
...(element.querySelectorAll("[data-animated-month]") ?? []),
|
|
8023
8046
|
];
|
|
8024
8047
|
const queryMonthEl = (element) => asHtmlElement(element.querySelector("[data-animated-month]"));
|
|
8025
8048
|
const queryCaptionEl = (element) => asHtmlElement(element.querySelector("[data-animated-caption]"));
|
|
@@ -8037,7 +8060,7 @@ const queryWeekdaysEl = (element) => asHtmlElement(element.querySelector("[data-
|
|
|
8037
8060
|
* @param options - Configuration options for the animation, including class
|
|
8038
8061
|
* names, months, focused day, and the date utility library.
|
|
8039
8062
|
*/
|
|
8040
|
-
function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib }) {
|
|
8063
|
+
function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib, }) {
|
|
8041
8064
|
const previousRootElSnapshotRef = useRef(null);
|
|
8042
8065
|
const previousMonthsRef = useRef(months);
|
|
8043
8066
|
const animatingRef = useRef(false);
|
|
@@ -8106,8 +8129,7 @@ function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib
|
|
|
8106
8129
|
? queryMonthEls(previousRootElSnapshot)
|
|
8107
8130
|
: [];
|
|
8108
8131
|
const currentMonthEls = queryMonthEls(rootElRef.current);
|
|
8109
|
-
if (currentMonthEls &&
|
|
8110
|
-
currentMonthEls.every((el) => el instanceof HTMLElement) &&
|
|
8132
|
+
if (currentMonthEls?.every((el) => el instanceof HTMLElement) &&
|
|
8111
8133
|
previousMonthEls &&
|
|
8112
8134
|
previousMonthEls.every((el) => el instanceof HTMLElement)) {
|
|
8113
8135
|
animatingRef.current = true;
|
|
@@ -8200,7 +8222,7 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
8200
8222
|
const firstMonth = displayMonths[0];
|
|
8201
8223
|
const lastMonth = displayMonths[displayMonths.length - 1];
|
|
8202
8224
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};
|
|
8203
|
-
const { addDays, differenceInCalendarDays, differenceInCalendarMonths, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, isAfter, startOfBroadcastWeek, startOfISOWeek, startOfWeek } = dateLib;
|
|
8225
|
+
const { addDays, differenceInCalendarDays, differenceInCalendarMonths, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, isAfter, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
8204
8226
|
const startWeekFirstDate = broadcastCalendar
|
|
8205
8227
|
? startOfBroadcastWeek(firstMonth, dateLib)
|
|
8206
8228
|
: ISOWeek
|
|
@@ -8246,10 +8268,10 @@ function getDays(calendarMonths) {
|
|
|
8246
8268
|
const initialDays = [];
|
|
8247
8269
|
return calendarMonths.reduce((days, month) => {
|
|
8248
8270
|
const weekDays = month.weeks.reduce((weekDays, week) => {
|
|
8249
|
-
return
|
|
8250
|
-
}, initialDays);
|
|
8251
|
-
return
|
|
8252
|
-
}, initialDays);
|
|
8271
|
+
return weekDays.concat(week.days.slice());
|
|
8272
|
+
}, initialDays.slice());
|
|
8273
|
+
return days.concat(weekDays.slice());
|
|
8274
|
+
}, initialDays.slice());
|
|
8253
8275
|
}
|
|
8254
8276
|
|
|
8255
8277
|
/**
|
|
@@ -8287,7 +8309,7 @@ function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib)
|
|
|
8287
8309
|
* @returns The initial month to display.
|
|
8288
8310
|
*/
|
|
8289
8311
|
function getInitialMonth(props, navStart, navEnd, dateLib) {
|
|
8290
|
-
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1 } = props;
|
|
8312
|
+
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, } = props;
|
|
8291
8313
|
let initialMonth = month || defaultMonth || today;
|
|
8292
8314
|
const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;
|
|
8293
8315
|
if (navEnd &&
|
|
@@ -8316,7 +8338,7 @@ function getInitialMonth(props, navStart, navEnd, dateLib) {
|
|
|
8316
8338
|
* display.
|
|
8317
8339
|
*/
|
|
8318
8340
|
function getMonths(displayMonths, dates, props, dateLib) {
|
|
8319
|
-
const { addDays, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, getISOWeek, getWeek, startOfBroadcastWeek, startOfISOWeek, startOfWeek } = dateLib;
|
|
8341
|
+
const { addDays, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, getISOWeek, getWeek, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
8320
8342
|
const dayPickerMonths = displayMonths.reduce((months, month) => {
|
|
8321
8343
|
const firstDateOfFirstWeek = props.broadcastCalendar
|
|
8322
8344
|
? startOfBroadcastWeek(month, dateLib)
|
|
@@ -8374,7 +8396,7 @@ function getMonths(displayMonths, dates, props, dateLib) {
|
|
|
8374
8396
|
*/
|
|
8375
8397
|
function getNavMonths(props, dateLib) {
|
|
8376
8398
|
let { startMonth, endMonth } = props;
|
|
8377
|
-
const { startOfYear, startOfDay, startOfMonth, endOfMonth, addYears, endOfYear, newDate, today } = dateLib;
|
|
8399
|
+
const { startOfYear, startOfDay, startOfMonth, endOfMonth, addYears, endOfYear, newDate, today, } = dateLib;
|
|
8378
8400
|
// Handle deprecated code
|
|
8379
8401
|
const { fromYear, toYear, fromMonth, toMonth } = props;
|
|
8380
8402
|
if (!startMonth && fromMonth) {
|
|
@@ -8411,7 +8433,7 @@ function getNavMonths(props, dateLib) {
|
|
|
8411
8433
|
}
|
|
8412
8434
|
return [
|
|
8413
8435
|
startMonth ? startOfDay(startMonth) : startMonth,
|
|
8414
|
-
endMonth ? startOfDay(endMonth) : endMonth
|
|
8436
|
+
endMonth ? startOfDay(endMonth) : endMonth,
|
|
8415
8437
|
];
|
|
8416
8438
|
}
|
|
8417
8439
|
|
|
@@ -8495,8 +8517,8 @@ function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, date
|
|
|
8495
8517
|
function getWeeks(months) {
|
|
8496
8518
|
const initialWeeks = [];
|
|
8497
8519
|
return months.reduce((weeks, month) => {
|
|
8498
|
-
return
|
|
8499
|
-
}, initialWeeks);
|
|
8520
|
+
return weeks.concat(month.weeks.slice());
|
|
8521
|
+
}, initialWeeks.slice());
|
|
8500
8522
|
}
|
|
8501
8523
|
|
|
8502
8524
|
/**
|
|
@@ -8543,10 +8565,10 @@ function useCalendar(props, dateLib) {
|
|
|
8543
8565
|
const [firstMonth, setFirstMonth] = useControlledValue(initialMonth,
|
|
8544
8566
|
// initialMonth is always computed from props.month if provided
|
|
8545
8567
|
props.month ? initialMonth : undefined);
|
|
8568
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: change the initial month when the time zone changes.
|
|
8546
8569
|
useEffect(() => {
|
|
8547
8570
|
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
8548
8571
|
setFirstMonth(newInitialMonth);
|
|
8549
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8550
8572
|
}, [props.timeZone]);
|
|
8551
8573
|
/** The months displayed in the calendar. */
|
|
8552
8574
|
const displayMonths = getDisplayMonths(firstMonth, navEnd, props, dateLib);
|
|
@@ -8594,7 +8616,7 @@ function useCalendar(props, dateLib) {
|
|
|
8594
8616
|
previousMonth,
|
|
8595
8617
|
nextMonth,
|
|
8596
8618
|
goToMonth,
|
|
8597
|
-
goToDay
|
|
8619
|
+
goToDay,
|
|
8598
8620
|
};
|
|
8599
8621
|
return calendar;
|
|
8600
8622
|
}
|
|
@@ -8687,7 +8709,7 @@ function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {
|
|
|
8687
8709
|
*/
|
|
8688
8710
|
function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
|
|
8689
8711
|
const { ISOWeek, broadcastCalendar } = props;
|
|
8690
|
-
const { addDays, addMonths, addWeeks, addYears, endOfBroadcastWeek, endOfISOWeek, endOfWeek, max, min, startOfBroadcastWeek, startOfISOWeek, startOfWeek } = dateLib;
|
|
8712
|
+
const { addDays, addMonths, addWeeks, addYears, endOfBroadcastWeek, endOfISOWeek, endOfWeek, max, min, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;
|
|
8691
8713
|
const moveFns = {
|
|
8692
8714
|
day: addDays,
|
|
8693
8715
|
week: addWeeks,
|
|
@@ -8702,7 +8724,7 @@ function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dat
|
|
|
8702
8724
|
? endOfBroadcastWeek(date)
|
|
8703
8725
|
: ISOWeek
|
|
8704
8726
|
? endOfISOWeek(date)
|
|
8705
|
-
: endOfWeek(date)
|
|
8727
|
+
: endOfWeek(date),
|
|
8706
8728
|
};
|
|
8707
8729
|
let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
|
|
8708
8730
|
if (moveDir === "before" && navStart) {
|
|
@@ -8737,7 +8759,8 @@ function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMo
|
|
|
8737
8759
|
return undefined;
|
|
8738
8760
|
}
|
|
8739
8761
|
const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
8740
|
-
const isDisabled = Boolean(props.disabled &&
|
|
8762
|
+
const isDisabled = Boolean(props.disabled &&
|
|
8763
|
+
dateMatchModifiers(focusableDate, props.disabled, dateLib));
|
|
8741
8764
|
const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));
|
|
8742
8765
|
const targetMonth = focusableDate;
|
|
8743
8766
|
const focusDay = new CalendarDay(focusableDate, targetMonth, dateLib);
|
|
@@ -8788,7 +8811,7 @@ function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
|
8788
8811
|
setFocused,
|
|
8789
8812
|
focused: focusedDay,
|
|
8790
8813
|
blur,
|
|
8791
|
-
moveFocus
|
|
8814
|
+
moveFocus,
|
|
8792
8815
|
};
|
|
8793
8816
|
return useFocus;
|
|
8794
8817
|
}
|
|
@@ -8803,7 +8826,7 @@ function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
|
8803
8826
|
* and a function to check if a date is selected.
|
|
8804
8827
|
*/
|
|
8805
8828
|
function useMulti(props, dateLib) {
|
|
8806
|
-
const { selected: initiallySelected, required, onSelect } = props;
|
|
8829
|
+
const { selected: initiallySelected, required, onSelect, } = props;
|
|
8807
8830
|
const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);
|
|
8808
8831
|
const selected = !onSelect ? internallySelected : initiallySelected;
|
|
8809
8832
|
const { isSameDay } = dateLib;
|
|
@@ -8843,7 +8866,7 @@ function useMulti(props, dateLib) {
|
|
|
8843
8866
|
return {
|
|
8844
8867
|
selected,
|
|
8845
8868
|
select,
|
|
8846
|
-
isSelected
|
|
8869
|
+
isSelected,
|
|
8847
8870
|
};
|
|
8848
8871
|
}
|
|
8849
8872
|
|
|
@@ -8872,7 +8895,10 @@ function addToRange(date, initialRange, min = 0, max = 0, required = false, date
|
|
|
8872
8895
|
// adding date to an incomplete range
|
|
8873
8896
|
if (isSameDay(from, date)) {
|
|
8874
8897
|
// adding a date equal to the start of the range
|
|
8875
|
-
if (
|
|
8898
|
+
if (min === 0) {
|
|
8899
|
+
range = { from, to: date };
|
|
8900
|
+
}
|
|
8901
|
+
else if (required) {
|
|
8876
8902
|
range = { from, to: undefined };
|
|
8877
8903
|
}
|
|
8878
8904
|
else {
|
|
@@ -9017,7 +9043,7 @@ function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {
|
|
|
9017
9043
|
if (isClosedInterval) {
|
|
9018
9044
|
return rangeOverlaps(range, {
|
|
9019
9045
|
from: dateLib.addDays(matcher.after, 1),
|
|
9020
|
-
to: dateLib.addDays(matcher.before, -1)
|
|
9046
|
+
to: dateLib.addDays(matcher.before, -1),
|
|
9021
9047
|
}, dateLib);
|
|
9022
9048
|
}
|
|
9023
9049
|
return (dateMatchModifiers(range.from, matcher, dateLib) ||
|
|
@@ -9056,7 +9082,7 @@ function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {
|
|
|
9056
9082
|
* range, and a function to check if a date is within the range.
|
|
9057
9083
|
*/
|
|
9058
9084
|
function useRange(props, dateLib) {
|
|
9059
|
-
const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect } = props;
|
|
9085
|
+
const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect, } = props;
|
|
9060
9086
|
const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);
|
|
9061
9087
|
const selected = !onSelect ? internallySelected : initiallySelected;
|
|
9062
9088
|
const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);
|
|
@@ -9081,7 +9107,7 @@ function useRange(props, dateLib) {
|
|
|
9081
9107
|
return {
|
|
9082
9108
|
selected,
|
|
9083
9109
|
select,
|
|
9084
|
-
isSelected
|
|
9110
|
+
isSelected,
|
|
9085
9111
|
};
|
|
9086
9112
|
}
|
|
9087
9113
|
|
|
@@ -9095,7 +9121,7 @@ function useRange(props, dateLib) {
|
|
|
9095
9121
|
* and a function to check if a date is selected.
|
|
9096
9122
|
*/
|
|
9097
9123
|
function useSingle(props, dateLib) {
|
|
9098
|
-
const { selected: initiallySelected, required, onSelect } = props;
|
|
9124
|
+
const { selected: initiallySelected, required, onSelect, } = props;
|
|
9099
9125
|
const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);
|
|
9100
9126
|
const selected = !onSelect ? internallySelected : initiallySelected;
|
|
9101
9127
|
const { isSameDay } = dateLib;
|
|
@@ -9122,7 +9148,7 @@ function useSingle(props, dateLib) {
|
|
|
9122
9148
|
return {
|
|
9123
9149
|
selected,
|
|
9124
9150
|
select,
|
|
9125
|
-
isSelected
|
|
9151
|
+
isSelected,
|
|
9126
9152
|
};
|
|
9127
9153
|
}
|
|
9128
9154
|
|
|
@@ -9164,7 +9190,7 @@ function DayPicker(initialProps) {
|
|
|
9164
9190
|
let props = initialProps;
|
|
9165
9191
|
if (props.timeZone) {
|
|
9166
9192
|
props = {
|
|
9167
|
-
...initialProps
|
|
9193
|
+
...initialProps,
|
|
9168
9194
|
};
|
|
9169
9195
|
if (props.today) {
|
|
9170
9196
|
props.today = new TZDate(props.today, props.timeZone);
|
|
@@ -9194,7 +9220,7 @@ function DayPicker(initialProps) {
|
|
|
9194
9220
|
: undefined,
|
|
9195
9221
|
to: props.selected.to
|
|
9196
9222
|
? new TZDate(props.selected.to, props.timeZone)
|
|
9197
|
-
: undefined
|
|
9223
|
+
: undefined,
|
|
9198
9224
|
};
|
|
9199
9225
|
}
|
|
9200
9226
|
}
|
|
@@ -9207,7 +9233,7 @@ function DayPicker(initialProps) {
|
|
|
9207
9233
|
useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
|
|
9208
9234
|
useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
|
|
9209
9235
|
timeZone: props.timeZone,
|
|
9210
|
-
numerals: props.numerals
|
|
9236
|
+
numerals: props.numerals,
|
|
9211
9237
|
}, props.dateLib);
|
|
9212
9238
|
return {
|
|
9213
9239
|
dateLib,
|
|
@@ -9215,7 +9241,7 @@ function DayPicker(initialProps) {
|
|
|
9215
9241
|
formatters: getFormatters(props.formatters),
|
|
9216
9242
|
labels: { ...defaultLabels, ...props.labels },
|
|
9217
9243
|
locale,
|
|
9218
|
-
classNames: { ...getDefaultClassNames(), ...props.classNames }
|
|
9244
|
+
classNames: { ...getDefaultClassNames(), ...props.classNames },
|
|
9219
9245
|
};
|
|
9220
9246
|
}, [
|
|
9221
9247
|
props.locale,
|
|
@@ -9230,16 +9256,16 @@ function DayPicker(initialProps) {
|
|
|
9230
9256
|
props.components,
|
|
9231
9257
|
props.formatters,
|
|
9232
9258
|
props.labels,
|
|
9233
|
-
props.classNames
|
|
9259
|
+
props.classNames,
|
|
9234
9260
|
]);
|
|
9235
|
-
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
9236
|
-
const { formatCaption, formatDay, formatMonthDropdown, formatWeekNumber, formatWeekNumberHeader, formatWeekdayName, formatYearDropdown } = formatters;
|
|
9261
|
+
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles, } = props;
|
|
9262
|
+
const { formatCaption, formatDay, formatMonthDropdown, formatWeekNumber, formatWeekNumberHeader, formatWeekdayName, formatYearDropdown, } = formatters;
|
|
9237
9263
|
const calendar = useCalendar(props, dateLib);
|
|
9238
|
-
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
|
|
9264
|
+
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth, } = calendar;
|
|
9239
9265
|
const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);
|
|
9240
|
-
const { isSelected, select, selected: selectedValue } = useSelection(props, dateLib) ?? {};
|
|
9266
|
+
const { isSelected, select, selected: selectedValue, } = useSelection(props, dateLib) ?? {};
|
|
9241
9267
|
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected ?? (() => false), dateLib);
|
|
9242
|
-
const { labelDayButton, labelGridcell, labelGrid, labelMonthDropdown, labelNav, labelPrevious, labelNext, labelWeekday, labelWeekNumber, labelWeekNumberHeader, labelYearDropdown } = labels;
|
|
9268
|
+
const { labelDayButton, labelGridcell, labelGrid, labelMonthDropdown, labelNav, labelPrevious, labelNext, labelWeekday, labelWeekNumber, labelWeekNumberHeader, labelYearDropdown, } = labels;
|
|
9243
9269
|
const weekdays = useMemo(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);
|
|
9244
9270
|
const isInteractive = mode !== undefined || onDayClick !== undefined;
|
|
9245
9271
|
const handlePreviousClick = useCallback(() => {
|
|
@@ -9273,18 +9299,18 @@ function DayPicker(initialProps) {
|
|
|
9273
9299
|
const keyMap = {
|
|
9274
9300
|
ArrowLeft: [
|
|
9275
9301
|
e.shiftKey ? "month" : "day",
|
|
9276
|
-
props.dir === "rtl" ? "after" : "before"
|
|
9302
|
+
props.dir === "rtl" ? "after" : "before",
|
|
9277
9303
|
],
|
|
9278
9304
|
ArrowRight: [
|
|
9279
9305
|
e.shiftKey ? "month" : "day",
|
|
9280
|
-
props.dir === "rtl" ? "before" : "after"
|
|
9306
|
+
props.dir === "rtl" ? "before" : "after",
|
|
9281
9307
|
],
|
|
9282
9308
|
ArrowDown: [e.shiftKey ? "year" : "week", "after"],
|
|
9283
9309
|
ArrowUp: [e.shiftKey ? "year" : "week", "before"],
|
|
9284
9310
|
PageUp: [e.shiftKey ? "year" : "month", "before"],
|
|
9285
9311
|
PageDown: [e.shiftKey ? "year" : "month", "after"],
|
|
9286
9312
|
Home: ["startOfWeek", "before"],
|
|
9287
|
-
End: ["endOfWeek", "after"]
|
|
9313
|
+
End: ["endOfWeek", "after"],
|
|
9288
9314
|
};
|
|
9289
9315
|
if (keyMap[e.key]) {
|
|
9290
9316
|
e.preventDefault();
|
|
@@ -9314,7 +9340,7 @@ function DayPicker(initialProps) {
|
|
|
9314
9340
|
className: [classNames[UI.Root], props.className]
|
|
9315
9341
|
.filter(Boolean)
|
|
9316
9342
|
.join(" "),
|
|
9317
|
-
style: { ...styles?.[UI.Root], ...props.style }
|
|
9343
|
+
style: { ...styles?.[UI.Root], ...props.style },
|
|
9318
9344
|
}), [classNames, props.className, props.style, styles]);
|
|
9319
9345
|
const dataAttributes = getDataAttributes(props);
|
|
9320
9346
|
const rootElRef = useRef(null);
|
|
@@ -9322,7 +9348,7 @@ function DayPicker(initialProps) {
|
|
|
9322
9348
|
classNames,
|
|
9323
9349
|
months,
|
|
9324
9350
|
focused,
|
|
9325
|
-
dateLib
|
|
9351
|
+
dateLib,
|
|
9326
9352
|
});
|
|
9327
9353
|
const contextValue = {
|
|
9328
9354
|
dayPickerProps: props,
|
|
@@ -9338,25 +9364,25 @@ function DayPicker(initialProps) {
|
|
|
9338
9364
|
classNames,
|
|
9339
9365
|
styles,
|
|
9340
9366
|
labels,
|
|
9341
|
-
formatters
|
|
9367
|
+
formatters,
|
|
9342
9368
|
};
|
|
9343
9369
|
return (React__default.createElement(dayPickerContext.Provider, { value: contextValue },
|
|
9344
9370
|
React__default.createElement(components.Root, { rootRef: props.animate ? rootElRef : undefined, className: className, style: style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], ...dataAttributes },
|
|
9345
9371
|
React__default.createElement(components.Months, { className: classNames[UI.Months], style: styles?.[UI.Months] },
|
|
9346
9372
|
!props.hideNavigation && !navLayout && (React__default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], "aria-label": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),
|
|
9347
9373
|
months.map((calendarMonth, displayIndex) => {
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9374
|
+
return (React__default.createElement(components.Month, { "data-animated-month": props.animate ? "true" : undefined, className: classNames[UI.Month], style: styles?.[UI.Month],
|
|
9375
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
9376
|
+
key: displayIndex, displayIndex: displayIndex, calendarMonth: calendarMonth },
|
|
9351
9377
|
navLayout === "around" &&
|
|
9352
9378
|
!props.hideNavigation &&
|
|
9353
9379
|
displayIndex === 0 && (React__default.createElement(components.PreviousMonthButton, { type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, "aria-disabled": previousMonth ? undefined : true, "aria-label": labelPrevious(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : undefined },
|
|
9354
9380
|
React__default.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" }))),
|
|
9355
9381
|
React__default.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : undefined, className: classNames[UI.MonthCaption], style: styles?.[UI.MonthCaption], calendarMonth: calendarMonth, displayIndex: displayIndex }, captionLayout?.startsWith("dropdown") ? (React__default.createElement(components.DropdownNav, { className: classNames[UI.Dropdowns], style: styles?.[UI.Dropdowns] },
|
|
9356
9382
|
captionLayout === "dropdown" ||
|
|
9357
|
-
captionLayout === "dropdown-months" ? (React__default.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown(), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options:
|
|
9383
|
+
captionLayout === "dropdown-months" ? (React__default.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown(), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib), style: styles?.[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) })) : (React__default.createElement("span", null, formatMonthDropdown(calendarMonth.date, dateLib))),
|
|
9358
9384
|
captionLayout === "dropdown" ||
|
|
9359
|
-
captionLayout === "dropdown-years" ? (React__default.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown(dateLib.options), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options:
|
|
9385
|
+
captionLayout === "dropdown-years" ? (React__default.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown(dateLib.options), classNames: classNames, components: components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters, dateLib, Boolean(props.reverseYears)), style: styles?.[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) })) : (React__default.createElement("span", null, formatYearDropdown(calendarMonth.date, dateLib))),
|
|
9360
9386
|
React__default.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
9361
9387
|
border: 0,
|
|
9362
9388
|
clip: "rect(0 0 0 0)",
|
|
@@ -9367,8 +9393,10 @@ function DayPicker(initialProps) {
|
|
|
9367
9393
|
position: "absolute",
|
|
9368
9394
|
width: "1px",
|
|
9369
9395
|
whiteSpace: "nowrap",
|
|
9370
|
-
wordWrap: "normal"
|
|
9371
|
-
} }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))) : (
|
|
9396
|
+
wordWrap: "normal",
|
|
9397
|
+
} }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))) : (
|
|
9398
|
+
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
9399
|
+
React__default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))),
|
|
9372
9400
|
navLayout === "around" &&
|
|
9373
9401
|
!props.hideNavigation &&
|
|
9374
9402
|
displayIndex === numberOfMonths - 1 && (React__default.createElement(components.NextMonthButton, { type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, "aria-disabled": nextMonth ? undefined : true, "aria-label": labelNext(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : undefined },
|
|
@@ -9380,11 +9408,13 @@ function DayPicker(initialProps) {
|
|
|
9380
9408
|
undefined, className: classNames[UI.MonthGrid], style: styles?.[UI.MonthGrid] },
|
|
9381
9409
|
!props.hideWeekdays && (React__default.createElement(components.Weekdays, { "data-animated-weekdays": props.animate ? "true" : undefined, className: classNames[UI.Weekdays], style: styles?.[UI.Weekdays] },
|
|
9382
9410
|
showWeekNumber && (React__default.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles?.[UI.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader())),
|
|
9383
|
-
weekdays.map((weekday
|
|
9384
|
-
React__default.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : undefined, className: classNames[UI.Weeks], style: styles?.[UI.Weeks] }, calendarMonth.weeks.map((week
|
|
9411
|
+
weekdays.map((weekday) => (React__default.createElement(components.Weekday, { "aria-label": labelWeekday(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles?.[UI.Weekday], scope: "col" }, formatWeekdayName(weekday, dateLib.options, dateLib)))))),
|
|
9412
|
+
React__default.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : undefined, className: classNames[UI.Weeks], style: styles?.[UI.Weeks] }, calendarMonth.weeks.map((week) => {
|
|
9385
9413
|
return (React__default.createElement(components.Week, { className: classNames[UI.Week], key: week.weekNumber, style: styles?.[UI.Week], week: week },
|
|
9386
|
-
showWeekNumber && (
|
|
9387
|
-
|
|
9414
|
+
showWeekNumber && (
|
|
9415
|
+
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
9416
|
+
React__default.createElement(components.WeekNumber, { week: week, style: styles?.[UI.WeekNumber], "aria-label": labelWeekNumber(week.weekNumber, {
|
|
9417
|
+
locale,
|
|
9388
9418
|
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber(week.weekNumber, dateLib))),
|
|
9389
9419
|
week.days.map((day) => {
|
|
9390
9420
|
const { date } = day;
|
|
@@ -9407,14 +9437,18 @@ function DayPicker(initialProps) {
|
|
|
9407
9437
|
const ariaLabel = !isInteractive && !modifiers.hidden
|
|
9408
9438
|
? labelGridcell(date, modifiers, dateLib.options, dateLib)
|
|
9409
9439
|
: undefined;
|
|
9410
|
-
return (
|
|
9440
|
+
return (
|
|
9441
|
+
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
9442
|
+
React__default.createElement(components.Day, { key: `${dateLib.format(date, "yyyy-MM-dd")}_${dateLib.format(day.displayMonth, "yyyy-MM")}`, day: day, modifiers: modifiers, className: className.join(" "), style: style, role: "gridcell", "aria-selected": modifiers.selected || undefined, "aria-label": ariaLabel, "data-day": dateLib.format(date, "yyyy-MM-dd"), "data-month": day.outside
|
|
9411
9443
|
? dateLib.format(date, "yyyy-MM")
|
|
9412
9444
|
: undefined, "data-selected": modifiers.selected || undefined, "data-disabled": modifiers.disabled || undefined, "data-hidden": modifiers.hidden || undefined, "data-outside": day.outside || undefined, "data-focused": modifiers.focused || undefined, "data-today": modifiers.today || undefined }, !modifiers.hidden && isInteractive ? (React__default.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles?.[UI.DayButton], type: "button", day: day, modifiers: modifiers, disabled: modifiers.disabled || undefined, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay(date, dateLib.options, dateLib))) : (!modifiers.hidden &&
|
|
9413
9445
|
formatDay(day.date, dateLib.options, dateLib))));
|
|
9414
9446
|
})));
|
|
9415
9447
|
})))));
|
|
9416
9448
|
})),
|
|
9417
|
-
props.footer && (
|
|
9449
|
+
props.footer && (
|
|
9450
|
+
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
9451
|
+
React__default.createElement(components.Footer, { className: classNames[UI.Footer], style: styles?.[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)))));
|
|
9418
9452
|
}
|
|
9419
9453
|
|
|
9420
9454
|
const Popover = ({ children }) => {
|
|
@@ -9471,7 +9505,7 @@ const DatePicker = ({
|
|
|
9471
9505
|
onClick: handleClear,
|
|
9472
9506
|
className: "datepicker-clear-button",
|
|
9473
9507
|
"aria-label": "Clear selected date",
|
|
9474
|
-
children: /* @__PURE__ */ jsx(X, { size: 16 })
|
|
9508
|
+
children: /* @__PURE__ */ jsx(X$1, { size: 16 })
|
|
9475
9509
|
}
|
|
9476
9510
|
)
|
|
9477
9511
|
] }) }),
|
|
@@ -9541,7 +9575,7 @@ const DateRangePicker$1 = ({
|
|
|
9541
9575
|
onClick: handleClear,
|
|
9542
9576
|
className: "datepicker-clear-button",
|
|
9543
9577
|
"aria-label": "Clear selected date range",
|
|
9544
|
-
children: /* @__PURE__ */ jsx(X, { size: 16 })
|
|
9578
|
+
children: /* @__PURE__ */ jsx(X$1, { size: 16 })
|
|
9545
9579
|
}
|
|
9546
9580
|
)
|
|
9547
9581
|
] }) }),
|
|
@@ -9562,7 +9596,7 @@ const DateRangePicker$1 = ({
|
|
|
9562
9596
|
] });
|
|
9563
9597
|
};
|
|
9564
9598
|
|
|
9565
|
-
var r$
|
|
9599
|
+
var r$2={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return "string"==typeof r?r.length>0:"number"==typeof r},n$1=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return (r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return {r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o$2=function(r){return {r:n$1(r.r),g:n$1(r.g),b:n$1(r.b),a:n$1(r.a,3)}},i$1=/^#([0-9a-f]{3,8})$/i,s$1=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h$1=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return {h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b$1=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return {r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return {h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return {h:n$1(r.h),s:n$1(r.s),l:n$1(r.l),a:n$1(r.a,3)}},f=function(r){return b$1((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e;},c=function(r){return {h:(t=h$1(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u;},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y$1={string:[[function(r){var t=i$1.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n$1(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n$1(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r$2[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return {h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b$1(h)},"hsv"]]},N$2=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return [e,t[n][1]]}return [null,void 0]},x$1=function(r){return "string"==typeof r?N$2(r.trim(),y$1.string):"object"==typeof r&&null!==r?N$2(r,y$1.object):[null,void 0]},M$1=function(r,t){var n=c(r);return {h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H$1=function(r){return (299*r.r+587*r.g+114*r.b)/1e3/255},$$2=function(r,t){var n=c(r);return {h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x$1(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1};}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n$1(H$1(this.rgba),2)},r.prototype.isDark=function(){return H$1(this.rgba)<.5},r.prototype.isLight=function(){return H$1(this.rgba)>=.5},r.prototype.toHex=function(){return r=o$2(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s$1(n$1(255*a)):"","#"+s$1(t)+s$1(e)+s$1(u)+i;var r,t,e,u,a,i;},r.prototype.toRgb=function(){return o$2(this.rgba)},r.prototype.toRgbString=function(){return r=o$2(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u;},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u;},r.prototype.toHsv=function(){return r=h$1(this.rgba),{h:n$1(r.h),s:n$1(r.s),v:n$1(r.v),a:n$1(r.a,3)};var r;},r.prototype.invert=function(){return w$1({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r;},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w$1(M$1(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w$1(M$1(this.rgba,-r))},r.prototype.grayscale=function(){return w$1(M$1(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w$1($$2(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w$1($$2(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return "number"==typeof r?w$1({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n$1(this.rgba.a,3);var t;},r.prototype.hue=function(r){var t=c(this.rgba);return "number"==typeof r?w$1({h:r,s:t.s,l:t.l,a:t.a}):n$1(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w$1(r).toHex()},r}(),w$1=function(r){return r instanceof j?r:new j(r)},S$1=[],k$1=function(r){r.forEach(function(r){S$1.indexOf(r)<0&&(r(j,y$1),S$1.push(r));});};
|
|
9566
9600
|
|
|
9567
9601
|
function namesPlugin(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return "transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g);}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"]);}
|
|
9568
9602
|
|
|
@@ -10165,7 +10199,7 @@ const FileUploadModal = ({
|
|
|
10165
10199
|
type: "button",
|
|
10166
10200
|
onClick: onClose,
|
|
10167
10201
|
className: "close-button",
|
|
10168
|
-
children: /* @__PURE__ */ jsx(X, { size: 20 })
|
|
10202
|
+
children: /* @__PURE__ */ jsx(X$1, { size: 20 })
|
|
10169
10203
|
}
|
|
10170
10204
|
)
|
|
10171
10205
|
] }),
|
|
@@ -10863,7 +10897,7 @@ var asyncTag = '[object AsyncFunction]',
|
|
|
10863
10897
|
* _.isFunction(/abc/);
|
|
10864
10898
|
* // => false
|
|
10865
10899
|
*/
|
|
10866
|
-
function isFunction$
|
|
10900
|
+
function isFunction$4(value) {
|
|
10867
10901
|
if (!isObject$4(value)) {
|
|
10868
10902
|
return false;
|
|
10869
10903
|
}
|
|
@@ -10955,7 +10989,7 @@ function baseIsNative(value) {
|
|
|
10955
10989
|
if (!isObject$4(value) || isMasked(value)) {
|
|
10956
10990
|
return false;
|
|
10957
10991
|
}
|
|
10958
|
-
var pattern = isFunction$
|
|
10992
|
+
var pattern = isFunction$4(value) ? reIsNative : reIsHostCtor;
|
|
10959
10993
|
return pattern.test(toSource(value));
|
|
10960
10994
|
}
|
|
10961
10995
|
|
|
@@ -11826,7 +11860,7 @@ function baseKeys(object) {
|
|
|
11826
11860
|
* // => false
|
|
11827
11861
|
*/
|
|
11828
11862
|
function isArrayLike(value) {
|
|
11829
|
-
return value != null && isLength(value.length) && !isFunction$
|
|
11863
|
+
return value != null && isLength(value.length) && !isFunction$4(value);
|
|
11830
11864
|
}
|
|
11831
11865
|
|
|
11832
11866
|
/**
|
|
@@ -13255,7 +13289,7 @@ function useFormikContext() {
|
|
|
13255
13289
|
}
|
|
13256
13290
|
/** @private is the given object a Function? */
|
|
13257
13291
|
|
|
13258
|
-
var isFunction$
|
|
13292
|
+
var isFunction$3 = function isFunction(obj) {
|
|
13259
13293
|
return typeof obj === 'function';
|
|
13260
13294
|
};
|
|
13261
13295
|
/** @private is the given object an Object? */
|
|
@@ -13276,7 +13310,7 @@ var isString$2 = function isString(obj) {
|
|
|
13276
13310
|
/** @private is the given object/value a promise? */
|
|
13277
13311
|
|
|
13278
13312
|
var isPromise = function isPromise(value) {
|
|
13279
|
-
return isObject$3(value) && isFunction$
|
|
13313
|
+
return isObject$3(value) && isFunction$3(value.then);
|
|
13280
13314
|
};
|
|
13281
13315
|
/**
|
|
13282
13316
|
* Same as document.activeElement but wraps in a try-catch block. In IE it is
|
|
@@ -13598,7 +13632,7 @@ function useFormik(_ref) {
|
|
|
13598
13632
|
|
|
13599
13633
|
var runValidationSchema = useCallback(function (values, field) {
|
|
13600
13634
|
var validationSchema = props.validationSchema;
|
|
13601
|
-
var schema = isFunction$
|
|
13635
|
+
var schema = isFunction$3(validationSchema) ? validationSchema(field) : validationSchema;
|
|
13602
13636
|
var promise = field && schema.validateAt ? schema.validateAt(field, values) : validateYupSchema(values, schema);
|
|
13603
13637
|
return new Promise(function (resolve, reject) {
|
|
13604
13638
|
promise.then(function () {
|
|
@@ -13628,7 +13662,7 @@ function useFormik(_ref) {
|
|
|
13628
13662
|
}, []);
|
|
13629
13663
|
var runFieldLevelValidations = useCallback(function (values) {
|
|
13630
13664
|
var fieldKeysWithValidation = Object.keys(fieldRegistry.current).filter(function (f) {
|
|
13631
|
-
return isFunction$
|
|
13665
|
+
return isFunction$3(fieldRegistry.current[f].validate);
|
|
13632
13666
|
}); // Construct an array with all of the field validation functions
|
|
13633
13667
|
|
|
13634
13668
|
var fieldValidations = fieldKeysWithValidation.length > 0 ? fieldKeysWithValidation.map(function (f) {
|
|
@@ -13771,7 +13805,7 @@ function useFormik(_ref) {
|
|
|
13771
13805
|
// This will efficiently validate a single field by avoiding state
|
|
13772
13806
|
// changes if the validation function is synchronous. It's different from
|
|
13773
13807
|
// what is called when using validateForm.
|
|
13774
|
-
if (fieldRegistry.current[name] && isFunction$
|
|
13808
|
+
if (fieldRegistry.current[name] && isFunction$3(fieldRegistry.current[name].validate)) {
|
|
13775
13809
|
var value = getIn$1(state.values, name);
|
|
13776
13810
|
var maybePromise = fieldRegistry.current[name].validate(value);
|
|
13777
13811
|
|
|
@@ -13854,7 +13888,7 @@ function useFormik(_ref) {
|
|
|
13854
13888
|
});
|
|
13855
13889
|
}, []);
|
|
13856
13890
|
var setValues = useEventCallback(function (values, shouldValidate) {
|
|
13857
|
-
var resolvedValues = isFunction$
|
|
13891
|
+
var resolvedValues = isFunction$3(values) ? values(state.values) : values;
|
|
13858
13892
|
dispatch({
|
|
13859
13893
|
type: 'SET_VALUES',
|
|
13860
13894
|
payload: resolvedValues
|
|
@@ -13982,7 +14016,7 @@ function useFormik(_ref) {
|
|
|
13982
14016
|
}
|
|
13983
14017
|
});
|
|
13984
14018
|
var setFormikState = useCallback(function (stateOrCb) {
|
|
13985
|
-
if (isFunction$
|
|
14019
|
+
if (isFunction$3(stateOrCb)) {
|
|
13986
14020
|
dispatch({
|
|
13987
14021
|
type: 'SET_FORMIK_STATE',
|
|
13988
14022
|
payload: stateOrCb
|
|
@@ -14079,11 +14113,11 @@ function useFormik(_ref) {
|
|
|
14079
14113
|
});
|
|
14080
14114
|
});
|
|
14081
14115
|
var handleSubmit = useEventCallback(function (e) {
|
|
14082
|
-
if (e && e.preventDefault && isFunction$
|
|
14116
|
+
if (e && e.preventDefault && isFunction$3(e.preventDefault)) {
|
|
14083
14117
|
e.preventDefault();
|
|
14084
14118
|
}
|
|
14085
14119
|
|
|
14086
|
-
if (e && e.stopPropagation && isFunction$
|
|
14120
|
+
if (e && e.stopPropagation && isFunction$3(e.stopPropagation)) {
|
|
14087
14121
|
e.stopPropagation();
|
|
14088
14122
|
} // Warn if form submission is triggered by a <button> without a
|
|
14089
14123
|
// specified `type` attribute during development. This mitigates
|
|
@@ -14123,11 +14157,11 @@ function useFormik(_ref) {
|
|
|
14123
14157
|
return onSubmit(state.values, imperativeMethods);
|
|
14124
14158
|
});
|
|
14125
14159
|
var handleReset = useEventCallback(function (e) {
|
|
14126
|
-
if (e && e.preventDefault && isFunction$
|
|
14160
|
+
if (e && e.preventDefault && isFunction$3(e.preventDefault)) {
|
|
14127
14161
|
e.preventDefault();
|
|
14128
14162
|
}
|
|
14129
14163
|
|
|
14130
|
-
if (e && e.stopPropagation && isFunction$
|
|
14164
|
+
if (e && e.stopPropagation && isFunction$3(e.stopPropagation)) {
|
|
14131
14165
|
e.stopPropagation();
|
|
14132
14166
|
}
|
|
14133
14167
|
|
|
@@ -14195,7 +14229,7 @@ function useFormik(_ref) {
|
|
|
14195
14229
|
return !isEqual$1(initialValues.current, state.values);
|
|
14196
14230
|
}, [initialValues.current, state.values]);
|
|
14197
14231
|
var isValid = useMemo(function () {
|
|
14198
|
-
return typeof isInitialValid !== 'undefined' ? dirty ? state.errors && Object.keys(state.errors).length === 0 : isInitialValid !== false && isFunction$
|
|
14232
|
+
return typeof isInitialValid !== 'undefined' ? dirty ? state.errors && Object.keys(state.errors).length === 0 : isInitialValid !== false && isFunction$3(isInitialValid) ? isInitialValid(props) : isInitialValid : state.errors && Object.keys(state.errors).length === 0;
|
|
14199
14233
|
}, [isInitialValid, dirty, state.errors, props]);
|
|
14200
14234
|
|
|
14201
14235
|
var ctx = _extends({}, state, {
|
|
@@ -40959,7 +40993,7 @@ const Sidebar = ({
|
|
|
40959
40993
|
onClick: onToggleCollapse,
|
|
40960
40994
|
className: "collapse-button desktop-only",
|
|
40961
40995
|
"aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
40962
|
-
children: isCollapsed ? /* @__PURE__ */ jsx(Menu, {}) : /* @__PURE__ */ jsx(X, {})
|
|
40996
|
+
children: isCollapsed ? /* @__PURE__ */ jsx(Menu, {}) : /* @__PURE__ */ jsx(X$1, {})
|
|
40963
40997
|
}
|
|
40964
40998
|
)
|
|
40965
40999
|
] }),
|
|
@@ -42127,14 +42161,9 @@ function getWindowScrollBarX(element, rect) {
|
|
|
42127
42161
|
return rect.left + leftScroll;
|
|
42128
42162
|
}
|
|
42129
42163
|
|
|
42130
|
-
function getHTMLOffset(documentElement, scroll
|
|
42131
|
-
if (ignoreScrollbarX === void 0) {
|
|
42132
|
-
ignoreScrollbarX = false;
|
|
42133
|
-
}
|
|
42164
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
42134
42165
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
42135
|
-
const x = htmlRect.left + scroll.scrollLeft - (
|
|
42136
|
-
// RTL <body> scrollbar.
|
|
42137
|
-
getWindowScrollBarX(documentElement, htmlRect));
|
|
42166
|
+
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
42138
42167
|
const y = htmlRect.top + scroll.scrollTop;
|
|
42139
42168
|
return {
|
|
42140
42169
|
x,
|
|
@@ -42173,7 +42202,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
42173
42202
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
42174
42203
|
}
|
|
42175
42204
|
}
|
|
42176
|
-
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll
|
|
42205
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
42177
42206
|
return {
|
|
42178
42207
|
width: rect.width * scale.x,
|
|
42179
42208
|
height: rect.height * scale.y,
|
|
@@ -42207,6 +42236,10 @@ function getDocumentRect(element) {
|
|
|
42207
42236
|
};
|
|
42208
42237
|
}
|
|
42209
42238
|
|
|
42239
|
+
// Safety check: ensure the scrollbar space is reasonable in case this
|
|
42240
|
+
// calculation is affected by unusual styles.
|
|
42241
|
+
// Most scrollbars leave 15-18px of space.
|
|
42242
|
+
const SCROLLBAR_MAX = 25;
|
|
42210
42243
|
function getViewportRect(element, strategy) {
|
|
42211
42244
|
const win = getWindow$1(element);
|
|
42212
42245
|
const html = getDocumentElement(element);
|
|
@@ -42224,6 +42257,24 @@ function getViewportRect(element, strategy) {
|
|
|
42224
42257
|
y = visualViewport.offsetTop;
|
|
42225
42258
|
}
|
|
42226
42259
|
}
|
|
42260
|
+
const windowScrollbarX = getWindowScrollBarX(html);
|
|
42261
|
+
// <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
|
|
42262
|
+
// visual width of the <html> but this is not considered in the size
|
|
42263
|
+
// of `html.clientWidth`.
|
|
42264
|
+
if (windowScrollbarX <= 0) {
|
|
42265
|
+
const doc = html.ownerDocument;
|
|
42266
|
+
const body = doc.body;
|
|
42267
|
+
const bodyStyles = getComputedStyle(body);
|
|
42268
|
+
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
42269
|
+
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
42270
|
+
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
42271
|
+
width -= clippingStableScrollbarWidth;
|
|
42272
|
+
}
|
|
42273
|
+
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
42274
|
+
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
42275
|
+
// by the scrollbar amount so there isn't extra space on the right.
|
|
42276
|
+
width += windowScrollbarX;
|
|
42277
|
+
}
|
|
42227
42278
|
return {
|
|
42228
42279
|
width,
|
|
42229
42280
|
height,
|
|
@@ -42705,7 +42756,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
42705
42756
|
* @copyright ReactTooltip Team
|
|
42706
42757
|
* @license MIT
|
|
42707
42758
|
*/
|
|
42708
|
-
const h="react-tooltip-core-styles",w="react-tooltip-base-styles",b={core:false,base:false};function S({css:e,id:t=w,type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||b[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t=h),l||(l={});const{insertAt:i}=l;if(document.getElementById(t))return;const c=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id=t,s.type="text/css","top"===i&&c.firstChild?c.insertBefore(s,c.firstChild):c.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),b[o]=true;}const E=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:l="top",offset:r=10,strategy:n="absolute",middlewares:i=[offset(Number(r)),flip({fallbackAxisSideDirection:"start"}),shift({padding:5})],border:c,arrowSize:s=8})=>{if(!e)return {tooltipStyles:{},tooltipArrowStyles:{},place:l};if(null===t)return {tooltipStyles:{},tooltipArrowStyles:{},place:l};const a=i;return o?(a.push(arrow({element:o,padding:5})),computePosition(e,t,{placement:l,strategy:n,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const i={left:`${e}px`,top:`${t}px`,border:c},{x:a,y:u}=null!==(r=l.arrow)&&void 0!==r?r:{x:0,y:0},d=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",p=c&&{borderBottom:c,borderRight:c};let v=0;if(c){const e=`${c}`.match(/(\d+)px/);v=(null==e?void 0:e[1])?Number(e[1]):1;}return {tooltipStyles:i,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=u?`${u}px`:"",right:"",bottom:"",...p,[d]:`-${s/2+v}px`},place:o}}))):computePosition(e,t,{placement:"bottom",strategy:n,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))},A=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),_$1=(e,t,o)=>{let l=null;const r=function(...r){const n=()=>{l=null;};!l&&(e.apply(this,r),l=setTimeout(n,t));};return r.cancel=()=>{l&&(clearTimeout(l),l=null);},r},O=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,k=(e,t)=>{if(e===t)return true;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,o)=>k(e,t[o])));if(Array.isArray(e)!==Array.isArray(t))return false;if(!O(e)||!O(t))return e===t;const o=Object.keys(e),l=Object.keys(t);return o.length===l.length&&o.every((o=>k(e[o],t[o])))},T=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return false;const t=getComputedStyle(e);return ["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return "auto"===o||"scroll"===o}))},L=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(T(t))return t;t=t.parentElement;}return document.scrollingElement||document.documentElement},C="undefined"!=typeof window?useLayoutEffect:useEffect,R=e=>{e.current&&(clearTimeout(e.current),e.current=null);},x="DEFAULT_TOOLTIP_ID",N={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},$=createContext({getTooltipData:()=>N});function z(e=x){return useContext($).getTooltipData(e)}var B={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},D={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const q=({forwardRef:t,id:l,className:i,classNameArrow:c,variant:u="dark",anchorId:d,anchorSelect:p,place:v="top",offset:m=10,events:h=["hover"],openOnClick:w=false,positionStrategy:b="absolute",middlewares:S,wrapper:g,delayShow:A=0,delayHide:O=0,float:T=false,hidden:x=false,noArrow:N=false,clickable:$=false,closeOnEsc:I=false,closeOnScroll:j=false,closeOnResize:q=false,openEvents:H,closeEvents:M,globalCloseEvents:W,imperativeModeOnly:P,style:V,position:F,afterShow:K,afterHide:U,disableTooltip:X,content:Y,contentWrapperRef:G,isOpen:Z,defaultIsOpen:J=false,setIsOpen:Q,activeAnchor:ee,setActiveAnchor:te,border:oe,opacity:le,arrowColor:re,arrowSize:ne=8,role:ie="tooltip"})=>{var ce;const se=useRef(null),ae=useRef(null),ue=useRef(null),de=useRef(null),pe=useRef(null),[ve,me]=useState({tooltipStyles:{},tooltipArrowStyles:{},place:v}),[fe,ye]=useState(false),[he,we]=useState(false),[be,Se]=useState(null),ge=useRef(false),Ee=useRef(null),{anchorRefs:Ae,setActiveAnchor:_e}=z(l),Oe=useRef(false),[ke,Te]=useState([]),Le=useRef(false),Ce=w||h.includes("click"),Re=Ce||(null==H?void 0:H.click)||(null==H?void 0:H.dblclick)||(null==H?void 0:H.mousedown),xe=H?{...H}:{mouseover:true,focus:true,mouseenter:false,click:false,dblclick:false,mousedown:false};!H&&Ce&&Object.assign(xe,{mouseenter:false,focus:false,mouseover:false,click:true});const Ne=M?{...M}:{mouseout:true,blur:true,mouseleave:false,click:false,dblclick:false,mouseup:false};!M&&Ce&&Object.assign(Ne,{mouseleave:false,blur:false,mouseout:false});const $e=W?{...W}:{escape:I||false,scroll:j||false,resize:q||false,clickOutsideAnchor:Re||false};P&&(Object.assign(xe,{mouseover:false,focus:false,mouseenter:false,click:false,dblclick:false,mousedown:false}),Object.assign(Ne,{mouseout:false,blur:false,mouseleave:false,click:false,dblclick:false,mouseup:false}),Object.assign($e,{escape:false,scroll:false,resize:false,clickOutsideAnchor:false})),C((()=>(Le.current=true,()=>{Le.current=false;})),[]);const Ie=e=>{Le.current&&(e&&we(true),setTimeout((()=>{Le.current&&(null==Q||Q(e),void 0===Z&&ye(e));}),10));};useEffect((()=>{if(void 0===Z)return ()=>null;Z&&we(true);const e=setTimeout((()=>{ye(Z);}),10);return ()=>{clearTimeout(e);}}),[Z]),useEffect((()=>{if(fe!==ge.current)if(R(pe),ge.current=fe,fe)null==K||K();else {const e=(e=>{const t=e.match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,o,l]=t;return Number(o)*("ms"===l?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));pe.current=setTimeout((()=>{we(false),Se(null),null==U||U();}),e+25);}}),[fe]);const ze=e=>{me((t=>k(t,e)?t:e));},je=(e=A)=>{R(ue),he?Ie(true):ue.current=setTimeout((()=>{Ie(true);}),e);},Be=(e=O)=>{R(de),de.current=setTimeout((()=>{Oe.current||Ie(false);}),e);},De=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return te(null),void _e({current:null});A?je():Ie(true),te(o),_e({current:o}),R(de);},qe=()=>{$?Be(O||100):O?Be():Ie(false),R(ue);},He=({x:e,y:t})=>{var o;const l={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};E({place:null!==(o=null==be?void 0:be.place)&&void 0!==o?o:v,offset:m,elementReference:l,tooltipReference:se.current,tooltipArrowReference:ae.current,strategy:b,middlewares:S,border:oe,arrowSize:ne}).then((e=>{ze(e);}));},Me=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};He(o),Ee.current=o;},We=e=>{var t;if(!fe)return;const o=e.target;if(!o.isConnected)return;if(null===(t=se.current)||void 0===t?void 0:t.contains(o))return;[document.querySelector(`[id='${d}']`),...ke].some((e=>null==e?void 0:e.contains(o)))||(Ie(false),R(ue));},Pe=_$1(De,50),Ve=_$1(qe,50),Fe=e=>{Ve.cancel(),Pe(e);},Ke=()=>{Pe.cancel(),Ve();},Ue=useCallback((()=>{var e,t;const o=null!==(e=null==be?void 0:be.position)&&void 0!==e?e:F;o?He(o):T?Ee.current&&He(Ee.current):(null==ee?void 0:ee.isConnected)&&E({place:null!==(t=null==be?void 0:be.place)&&void 0!==t?t:v,offset:m,elementReference:ee,tooltipReference:se.current,tooltipArrowReference:ae.current,strategy:b,middlewares:S,border:oe,arrowSize:ne}).then((e=>{Le.current&&ze(e);}));}),[fe,ee,Y,V,v,null==be?void 0:be.place,m,b,F,null==be?void 0:be.position,T,ne]);useEffect((()=>{var e,t;const o=new Set(Ae);ke.forEach((e=>{(null==X?void 0:X(e))||o.add({current:e});}));const l=document.querySelector(`[id='${d}']`);l&&!(null==X?void 0:X(l))&&o.add({current:l});const r=()=>{Ie(false);},n=L(ee),i=L(se.current);$e.scroll&&(window.addEventListener("scroll",r),null==n||n.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r));let c=null;$e.resize?window.addEventListener("resize",r):ee&&se.current&&(c=autoUpdate(ee,se.current,Ue,{ancestorResize:true,elementResize:true,layoutShift:true}));const s=e=>{"Escape"===e.key&&Ie(false);};$e.escape&&window.addEventListener("keydown",s),$e.clickOutsideAnchor&&window.addEventListener("click",We);const a=[],u=e=>Boolean((null==e?void 0:e.target)&&(null==ee?void 0:ee.contains(e.target))),p=e=>{fe&&u(e)||De(e);},v=e=>{fe&&u(e)&&qe();},m=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(xe).forEach((([e,t])=>{t&&(m.includes(e)?a.push({event:e,listener:Fe}):y.includes(e)&&a.push({event:e,listener:p}));})),Object.entries(Ne).forEach((([e,t])=>{t&&(m.includes(e)?a.push({event:e,listener:Ke}):y.includes(e)&&a.push({event:e,listener:v}));})),T&&a.push({event:"pointermove",listener:Me});const h=()=>{Oe.current=true;},w=()=>{Oe.current=false,qe();},b=$&&(Ne.mouseout||Ne.mouseleave);return b&&(null===(e=se.current)||void 0===e||e.addEventListener("mouseover",h),null===(t=se.current)||void 0===t||t.addEventListener("mouseout",w)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.addEventListener(e,t);}));})),()=>{var e,t;$e.scroll&&(window.removeEventListener("scroll",r),null==n||n.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r)),$e.resize?window.removeEventListener("resize",r):null==c||c(),$e.clickOutsideAnchor&&window.removeEventListener("click",We),$e.escape&&window.removeEventListener("keydown",s),b&&(null===(e=se.current)||void 0===e||e.removeEventListener("mouseover",h),null===(t=se.current)||void 0===t||t.removeEventListener("mouseout",w)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.removeEventListener(e,t);}));}));}}),[ee,Ue,he,Ae,ke,H,M,W,Ce,A,O]),useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==be?void 0:be.anchorSelect)&&void 0!==e?e:p)&&void 0!==t?t:"";!o&&l&&(o=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===l?t.push(e.target):e.oldValue===l&&r.push(e.target);}if("childList"===e.type){if(ee){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}t.some((e=>{var t;return !!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,ee))&&(we(false),Ie(false),te(null),R(ue),R(de),true)}));}if(o)try{const l=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...l.filter((e=>e.matches(o)))),t.push(...l.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]));}));return r.observe(document.body,{childList:true,subtree:true,attributes:true,attributeFilter:["data-tooltip-id"],attributeOldValue:true}),()=>{r.disconnect();}}),[l,p,null==be?void 0:be.anchorSelect,ee]),useEffect((()=>{Ue();}),[Ue]),useEffect((()=>{if(!(null==G?void 0:G.current))return ()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ue()));}));return e.observe(G.current),()=>{e.disconnect();}}),[Y,null==G?void 0:G.current]),useEffect((()=>{var e;const t=document.querySelector(`[id='${d}']`),o=[...ke,t];ee&&o.includes(ee)||te(null!==(e=ke[0])&&void 0!==e?e:t);}),[d,ke,ee]),useEffect((()=>(J&&Ie(true),()=>{R(ue),R(de);})),[]),useEffect((()=>{var e;let t=null!==(e=null==be?void 0:be.anchorSelect)&&void 0!==e?e:p;if(!t&&l&&(t=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e);}catch(e){Te([]);}}),[l,p,null==be?void 0:be.anchorSelect]),useEffect((()=>{ue.current&&(R(ue),je(A));}),[A]);const Xe=null!==(ce=null==be?void 0:be.content)&&void 0!==ce?ce:Y,Ye=fe&&Object.keys(ve.tooltipStyles).length>0;return useImperativeHandle(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect);}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}Se(null!=e?e:null),(null==e?void 0:e.delay)?je(e.delay):Ie(true);},close:e=>{(null==e?void 0:e.delay)?Be(e.delay):Ie(false);},activeAnchor:ee,place:ve.place,isOpen:Boolean(he&&!x&&Xe&&Ye)}))),he&&!x&&Xe?React__default.createElement(g,{id:l,role:ie,className:classNames$1("react-tooltip",B.tooltip,D.tooltip,D[u],i,`react-tooltip__place-${ve.place}`,B[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===b&&B.fixed,$&&B.clickable),onTransitionEnd:e=>{R(pe),fe||"opacity"!==e.propertyName||(we(false),Se(null),null==U||U());},style:{...V,...ve.tooltipStyles,opacity:void 0!==le&&Ye?le:void 0},ref:se},Xe,React__default.createElement(g,{className:classNames$1("react-tooltip-arrow",B.arrow,D.arrow,c,N&&B.noArrow),style:{...ve.tooltipArrowStyles,background:re?`linear-gradient(to right bottom, transparent 50%, ${re} 50%)`:void 0,"--rt-arrow-size":`${ne}px`},ref:ae})):null},H=({content:t})=>React__default.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),M=React__default.forwardRef((({id:t,anchorId:l,anchorSelect:n,content:i,html:c,render:a,className:u,classNameArrow:d,variant:p="dark",place:v="top",offset:m=10,wrapper:f="div",children:h=null,events:w=["hover"],openOnClick:b=false,positionStrategy:S="absolute",middlewares:g,delayShow:E=0,delayHide:_=0,float:O=false,hidden:k=false,noArrow:T=false,clickable:L=false,closeOnEsc:C=false,closeOnScroll:R=false,closeOnResize:x=false,openEvents:N,closeEvents:$,globalCloseEvents:I,imperativeModeOnly:j=false,style:B,position:D,isOpen:M,defaultIsOpen:W=false,disableStyleInjection:P=false,border:V,opacity:F,arrowColor:K,arrowSize:U,setIsOpen:X,afterShow:Y,afterHide:G,disableTooltip:Z,role:J="tooltip"},Q)=>{const[ee,te]=useState(i),[oe,le]=useState(c),[re,ne]=useState(v),[ie,ce]=useState(p),[se,ae]=useState(m),[ue,de]=useState(E),[pe,ve]=useState(_),[me,fe]=useState(O),[ye,he]=useState(k),[we,be]=useState(f),[Se,ge]=useState(w),[Ee,Ae]=useState(S),[_e,Oe]=useState(null),[ke,Te]=useState(null),Le=useRef(P),{anchorRefs:Ce,activeAnchor:Re}=z(t),xe=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var l;if(o.startsWith("data-tooltip-")){t[o.replace(/^data-tooltip-/,"")]=null!==(l=null==e?void 0:e.getAttribute(o))&&void 0!==l?l:null;}return t}),{}),Ne=e=>{const t={place:e=>{var t;ne(null!==(t=e)&&void 0!==t?t:v);},content:e=>{te(null!=e?e:i);},html:e=>{le(null!=e?e:c);},variant:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:p);},offset:e=>{ae(null===e?m:Number(e));},wrapper:e=>{var t;be(null!==(t=e)&&void 0!==t?t:f);},events:e=>{const t=null==e?void 0:e.split(" ");ge(null!=t?t:w);},"position-strategy":e=>{var t;Ae(null!==(t=e)&&void 0!==t?t:S);},"delay-show":e=>{de(null===e?E:Number(e));},"delay-hide":e=>{ve(null===e?_:Number(e));},float:e=>{fe(null===e?O:"true"===e);},hidden:e=>{he(null===e?k:"true"===e);},"class-name":e=>{Oe(e);}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var l;null===(l=t[e])||void 0===l||l.call(t,o);}));};useEffect((()=>{te(i);}),[i]),useEffect((()=>{le(c);}),[c]),useEffect((()=>{ne(v);}),[v]),useEffect((()=>{ce(p);}),[p]),useEffect((()=>{ae(m);}),[m]),useEffect((()=>{de(E);}),[E]),useEffect((()=>{ve(_);}),[_]),useEffect((()=>{fe(O);}),[O]),useEffect((()=>{he(k);}),[k]),useEffect((()=>{Ae(S);}),[S]),useEffect((()=>{Le.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");}),[P]),useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}));}),[]),useEffect((()=>{var e;const o=new Set(Ce);let r=n;if(!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),r)try{document.querySelectorAll(r).forEach((e=>{o.add({current:e});}));}catch(e){console.warn(`[react-tooltip] "${r}" is not a valid CSS selector`);}const i=document.querySelector(`[id='${l}']`);if(i&&o.add({current:i}),!o.size)return ()=>null;const c=null!==(e=null!=ke?ke:i)&&void 0!==e?e:Re.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!c||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=xe(c);Ne(o);}));})),a={attributes:true,childList:false,subtree:false};if(c){const e=xe(c);Ne(e),s.observe(c,a);}return ()=>{s.disconnect();}}),[Ce,Re,ke,l,n]),useEffect((()=>{(null==B?void 0:B.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),V&&!A("border",`${V}`)&&console.warn(`[react-tooltip] "${V}" is not a valid \`border\`.`),(null==B?void 0:B.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!A("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`);}),[]);let $e=h;const Ie=useRef(null);if(a){const t=a({content:(null==ke?void 0:ke.getAttribute("data-tooltip-content"))||ee||null,activeAnchor:ke});$e=t?React__default.createElement("div",{ref:Ie,className:"react-tooltip-content-wrapper"},t):null;}else ee&&($e=ee);oe&&($e=React__default.createElement(H,{content:oe}));const ze={forwardRef:Q,id:t,anchorId:l,anchorSelect:n,className:classNames$1(u,_e),classNameArrow:d,content:$e,contentWrapperRef:Ie,place:re,variant:ie,offset:se,wrapper:we,events:Se,openOnClick:b,positionStrategy:Ee,middlewares:g,delayShow:ue,delayHide:pe,float:me,hidden:ye,noArrow:T,clickable:L,closeOnEsc:C,closeOnScroll:R,closeOnResize:x,openEvents:N,closeEvents:$,globalCloseEvents:I,imperativeModeOnly:j,style:B,position:D,isOpen:M,defaultIsOpen:W,border:V,opacity:F,arrowColor:K,arrowSize:U,setIsOpen:X,afterShow:Y,afterHide:G,disableTooltip:Z,activeAnchor:ke,setActiveAnchor:e=>Te(e),role:J};return React__default.createElement(q,{...ze})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||S({css:`:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}`,type:"core"}),e.detail.disableBase||S({css:`
|
|
42759
|
+
const h="react-tooltip-core-styles",w="react-tooltip-base-styles",b={core:false,base:false};function S({css:e,id:t=w,type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||b[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t=h),l||(l={});const{insertAt:i}=l;if(document.getElementById(t))return;const c=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id=t,s.type="text/css","top"===i&&c.firstChild?c.insertBefore(s,c.firstChild):c.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),b[o]=true;}const E=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:l="top",offset:r=10,strategy:n="absolute",middlewares:i=[offset(Number(r)),flip({fallbackAxisSideDirection:"start"}),shift({padding:5})],border:c,arrowSize:s=8})=>{if(!e)return {tooltipStyles:{},tooltipArrowStyles:{},place:l};if(null===t)return {tooltipStyles:{},tooltipArrowStyles:{},place:l};const a=i;return o?(a.push(arrow({element:o,padding:5})),computePosition(e,t,{placement:l,strategy:n,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const i={left:`${e}px`,top:`${t}px`,border:c},{x:a,y:u}=null!==(r=l.arrow)&&void 0!==r?r:{x:0,y:0},d=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",p=c&&{borderBottom:c,borderRight:c};let v=0;if(c){const e=`${c}`.match(/(\d+)px/);v=(null==e?void 0:e[1])?Number(e[1]):1;}return {tooltipStyles:i,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=u?`${u}px`:"",right:"",bottom:"",...p,[d]:`-${s/2+v}px`},place:o}}))):computePosition(e,t,{placement:"bottom",strategy:n,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))},A=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),_$1=(e,t,o)=>{let l=null;const r=function(...r){const n=()=>{l=null;};!l&&(e.apply(this,r),l=setTimeout(n,t));};return r.cancel=()=>{l&&(clearTimeout(l),l=null);},r},O=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,k=(e,t)=>{if(e===t)return true;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,o)=>k(e,t[o])));if(Array.isArray(e)!==Array.isArray(t))return false;if(!O(e)||!O(t))return e===t;const o=Object.keys(e),l=Object.keys(t);return o.length===l.length&&o.every((o=>k(e[o],t[o])))},T=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return false;const t=getComputedStyle(e);return ["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return "auto"===o||"scroll"===o}))},L$1=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(T(t))return t;t=t.parentElement;}return document.scrollingElement||document.documentElement},C="undefined"!=typeof window?useLayoutEffect:useEffect,R=e=>{e.current&&(clearTimeout(e.current),e.current=null);},x="DEFAULT_TOOLTIP_ID",N$1={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},$$1=createContext({getTooltipData:()=>N$1});function z$1(e=x){return useContext($$1).getTooltipData(e)}var B$1={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},D={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const q=({forwardRef:t,id:l,className:i,classNameArrow:c,variant:u="dark",anchorId:d,anchorSelect:p,place:v="top",offset:m=10,events:h=["hover"],openOnClick:w=false,positionStrategy:b="absolute",middlewares:S,wrapper:g,delayShow:A=0,delayHide:O=0,float:T=false,hidden:x=false,noArrow:N=false,clickable:$=false,closeOnEsc:I=false,closeOnScroll:j=false,closeOnResize:q=false,openEvents:H,closeEvents:M,globalCloseEvents:W,imperativeModeOnly:P,style:V,position:F,afterShow:K,afterHide:U,disableTooltip:X,content:Y,contentWrapperRef:G,isOpen:Z,defaultIsOpen:J=false,setIsOpen:Q,activeAnchor:ee,setActiveAnchor:te,border:oe,opacity:le,arrowColor:re,arrowSize:ne=8,role:ie="tooltip"})=>{var ce;const se=useRef(null),ae=useRef(null),ue=useRef(null),de=useRef(null),pe=useRef(null),[ve,me]=useState({tooltipStyles:{},tooltipArrowStyles:{},place:v}),[fe,ye]=useState(false),[he,we]=useState(false),[be,Se]=useState(null),ge=useRef(false),Ee=useRef(null),{anchorRefs:Ae,setActiveAnchor:_e}=z$1(l),Oe=useRef(false),[ke,Te]=useState([]),Le=useRef(false),Ce=w||h.includes("click"),Re=Ce||(null==H?void 0:H.click)||(null==H?void 0:H.dblclick)||(null==H?void 0:H.mousedown),xe=H?{...H}:{mouseover:true,focus:true,mouseenter:false,click:false,dblclick:false,mousedown:false};!H&&Ce&&Object.assign(xe,{mouseenter:false,focus:false,mouseover:false,click:true});const Ne=M?{...M}:{mouseout:true,blur:true,mouseleave:false,click:false,dblclick:false,mouseup:false};!M&&Ce&&Object.assign(Ne,{mouseleave:false,blur:false,mouseout:false});const $e=W?{...W}:{escape:I||false,scroll:j||false,resize:q||false,clickOutsideAnchor:Re||false};P&&(Object.assign(xe,{mouseover:false,focus:false,mouseenter:false,click:false,dblclick:false,mousedown:false}),Object.assign(Ne,{mouseout:false,blur:false,mouseleave:false,click:false,dblclick:false,mouseup:false}),Object.assign($e,{escape:false,scroll:false,resize:false,clickOutsideAnchor:false})),C((()=>(Le.current=true,()=>{Le.current=false;})),[]);const Ie=e=>{Le.current&&(e&&we(true),setTimeout((()=>{Le.current&&(null==Q||Q(e),void 0===Z&&ye(e));}),10));};useEffect((()=>{if(void 0===Z)return ()=>null;Z&&we(true);const e=setTimeout((()=>{ye(Z);}),10);return ()=>{clearTimeout(e);}}),[Z]),useEffect((()=>{if(fe!==ge.current)if(R(pe),ge.current=fe,fe)null==K||K();else {const e=(e=>{const t=e.match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,o,l]=t;return Number(o)*("ms"===l?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));pe.current=setTimeout((()=>{we(false),Se(null),null==U||U();}),e+25);}}),[fe]);const ze=e=>{me((t=>k(t,e)?t:e));},je=(e=A)=>{R(ue),he?Ie(true):ue.current=setTimeout((()=>{Ie(true);}),e);},Be=(e=O)=>{R(de),de.current=setTimeout((()=>{Oe.current||Ie(false);}),e);},De=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return te(null),void _e({current:null});A?je():Ie(true),te(o),_e({current:o}),R(de);},qe=()=>{$?Be(O||100):O?Be():Ie(false),R(ue);},He=({x:e,y:t})=>{var o;const l={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};E({place:null!==(o=null==be?void 0:be.place)&&void 0!==o?o:v,offset:m,elementReference:l,tooltipReference:se.current,tooltipArrowReference:ae.current,strategy:b,middlewares:S,border:oe,arrowSize:ne}).then((e=>{ze(e);}));},Me=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};He(o),Ee.current=o;},We=e=>{var t;if(!fe)return;const o=e.target;if(!o.isConnected)return;if(null===(t=se.current)||void 0===t?void 0:t.contains(o))return;[document.querySelector(`[id='${d}']`),...ke].some((e=>null==e?void 0:e.contains(o)))||(Ie(false),R(ue));},Pe=_$1(De,50),Ve=_$1(qe,50),Fe=e=>{Ve.cancel(),Pe(e);},Ke=()=>{Pe.cancel(),Ve();},Ue=useCallback((()=>{var e,t;const o=null!==(e=null==be?void 0:be.position)&&void 0!==e?e:F;o?He(o):T?Ee.current&&He(Ee.current):(null==ee?void 0:ee.isConnected)&&E({place:null!==(t=null==be?void 0:be.place)&&void 0!==t?t:v,offset:m,elementReference:ee,tooltipReference:se.current,tooltipArrowReference:ae.current,strategy:b,middlewares:S,border:oe,arrowSize:ne}).then((e=>{Le.current&&ze(e);}));}),[fe,ee,Y,V,v,null==be?void 0:be.place,m,b,F,null==be?void 0:be.position,T,ne]);useEffect((()=>{var e,t;const o=new Set(Ae);ke.forEach((e=>{(null==X?void 0:X(e))||o.add({current:e});}));const l=document.querySelector(`[id='${d}']`);l&&!(null==X?void 0:X(l))&&o.add({current:l});const r=()=>{Ie(false);},n=L$1(ee),i=L$1(se.current);$e.scroll&&(window.addEventListener("scroll",r),null==n||n.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r));let c=null;$e.resize?window.addEventListener("resize",r):ee&&se.current&&(c=autoUpdate(ee,se.current,Ue,{ancestorResize:true,elementResize:true,layoutShift:true}));const s=e=>{"Escape"===e.key&&Ie(false);};$e.escape&&window.addEventListener("keydown",s),$e.clickOutsideAnchor&&window.addEventListener("click",We);const a=[],u=e=>Boolean((null==e?void 0:e.target)&&(null==ee?void 0:ee.contains(e.target))),p=e=>{fe&&u(e)||De(e);},v=e=>{fe&&u(e)&&qe();},m=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],y=["click","dblclick","mousedown","mouseup"];Object.entries(xe).forEach((([e,t])=>{t&&(m.includes(e)?a.push({event:e,listener:Fe}):y.includes(e)&&a.push({event:e,listener:p}));})),Object.entries(Ne).forEach((([e,t])=>{t&&(m.includes(e)?a.push({event:e,listener:Ke}):y.includes(e)&&a.push({event:e,listener:v}));})),T&&a.push({event:"pointermove",listener:Me});const h=()=>{Oe.current=true;},w=()=>{Oe.current=false,qe();},b=$&&(Ne.mouseout||Ne.mouseleave);return b&&(null===(e=se.current)||void 0===e||e.addEventListener("mouseover",h),null===(t=se.current)||void 0===t||t.addEventListener("mouseout",w)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.addEventListener(e,t);}));})),()=>{var e,t;$e.scroll&&(window.removeEventListener("scroll",r),null==n||n.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r)),$e.resize?window.removeEventListener("resize",r):null==c||c(),$e.clickOutsideAnchor&&window.removeEventListener("click",We),$e.escape&&window.removeEventListener("keydown",s),b&&(null===(e=se.current)||void 0===e||e.removeEventListener("mouseover",h),null===(t=se.current)||void 0===t||t.removeEventListener("mouseout",w)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.removeEventListener(e,t);}));}));}}),[ee,Ue,he,Ae,ke,H,M,W,Ce,A,O]),useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==be?void 0:be.anchorSelect)&&void 0!==e?e:p)&&void 0!==t?t:"";!o&&l&&(o=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===l?t.push(e.target):e.oldValue===l&&r.push(e.target);}if("childList"===e.type){if(ee){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}t.some((e=>{var t;return !!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,ee))&&(we(false),Ie(false),te(null),R(ue),R(de),true)}));}if(o)try{const l=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...l.filter((e=>e.matches(o)))),t.push(...l.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}}})),(t.length||r.length)&&Te((e=>[...e.filter((e=>!r.includes(e))),...t]));}));return r.observe(document.body,{childList:true,subtree:true,attributes:true,attributeFilter:["data-tooltip-id"],attributeOldValue:true}),()=>{r.disconnect();}}),[l,p,null==be?void 0:be.anchorSelect,ee]),useEffect((()=>{Ue();}),[Ue]),useEffect((()=>{if(!(null==G?void 0:G.current))return ()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ue()));}));return e.observe(G.current),()=>{e.disconnect();}}),[Y,null==G?void 0:G.current]),useEffect((()=>{var e;const t=document.querySelector(`[id='${d}']`),o=[...ke,t];ee&&o.includes(ee)||te(null!==(e=ke[0])&&void 0!==e?e:t);}),[d,ke,ee]),useEffect((()=>(J&&Ie(true),()=>{R(ue),R(de);})),[]),useEffect((()=>{var e;let t=null!==(e=null==be?void 0:be.anchorSelect)&&void 0!==e?e:p;if(!t&&l&&(t=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`),t)try{const e=Array.from(document.querySelectorAll(t));Te(e);}catch(e){Te([]);}}),[l,p,null==be?void 0:be.anchorSelect]),useEffect((()=>{ue.current&&(R(ue),je(A));}),[A]);const Xe=null!==(ce=null==be?void 0:be.content)&&void 0!==ce?ce:Y,Ye=fe&&Object.keys(ve.tooltipStyles).length>0;return useImperativeHandle(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect);}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}Se(null!=e?e:null),(null==e?void 0:e.delay)?je(e.delay):Ie(true);},close:e=>{(null==e?void 0:e.delay)?Be(e.delay):Ie(false);},activeAnchor:ee,place:ve.place,isOpen:Boolean(he&&!x&&Xe&&Ye)}))),he&&!x&&Xe?React__default.createElement(g,{id:l,role:ie,className:classNames$1("react-tooltip",B$1.tooltip,D.tooltip,D[u],i,`react-tooltip__place-${ve.place}`,B$1[Ye?"show":"closing"],Ye?"react-tooltip__show":"react-tooltip__closing","fixed"===b&&B$1.fixed,$&&B$1.clickable),onTransitionEnd:e=>{R(pe),fe||"opacity"!==e.propertyName||(we(false),Se(null),null==U||U());},style:{...V,...ve.tooltipStyles,opacity:void 0!==le&&Ye?le:void 0},ref:se},Xe,React__default.createElement(g,{className:classNames$1("react-tooltip-arrow",B$1.arrow,D.arrow,c,N&&B$1.noArrow),style:{...ve.tooltipArrowStyles,background:re?`linear-gradient(to right bottom, transparent 50%, ${re} 50%)`:void 0,"--rt-arrow-size":`${ne}px`},ref:ae})):null},H=({content:t})=>React__default.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),M=React__default.forwardRef((({id:t,anchorId:l,anchorSelect:n,content:i,html:c,render:a,className:u,classNameArrow:d,variant:p="dark",place:v="top",offset:m=10,wrapper:f="div",children:h=null,events:w=["hover"],openOnClick:b=false,positionStrategy:S="absolute",middlewares:g,delayShow:E=0,delayHide:_=0,float:O=false,hidden:k=false,noArrow:T=false,clickable:L=false,closeOnEsc:C=false,closeOnScroll:R=false,closeOnResize:x=false,openEvents:N,closeEvents:$,globalCloseEvents:I,imperativeModeOnly:j=false,style:B,position:D,isOpen:M,defaultIsOpen:W=false,disableStyleInjection:P=false,border:V,opacity:F,arrowColor:K,arrowSize:U,setIsOpen:X,afterShow:Y,afterHide:G,disableTooltip:Z,role:J="tooltip"},Q)=>{const[ee,te]=useState(i),[oe,le]=useState(c),[re,ne]=useState(v),[ie,ce]=useState(p),[se,ae]=useState(m),[ue,de]=useState(E),[pe,ve]=useState(_),[me,fe]=useState(O),[ye,he]=useState(k),[we,be]=useState(f),[Se,ge]=useState(w),[Ee,Ae]=useState(S),[_e,Oe]=useState(null),[ke,Te]=useState(null),Le=useRef(P),{anchorRefs:Ce,activeAnchor:Re}=z$1(t),xe=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var l;if(o.startsWith("data-tooltip-")){t[o.replace(/^data-tooltip-/,"")]=null!==(l=null==e?void 0:e.getAttribute(o))&&void 0!==l?l:null;}return t}),{}),Ne=e=>{const t={place:e=>{var t;ne(null!==(t=e)&&void 0!==t?t:v);},content:e=>{te(null!=e?e:i);},html:e=>{le(null!=e?e:c);},variant:e=>{var t;ce(null!==(t=e)&&void 0!==t?t:p);},offset:e=>{ae(null===e?m:Number(e));},wrapper:e=>{var t;be(null!==(t=e)&&void 0!==t?t:f);},events:e=>{const t=null==e?void 0:e.split(" ");ge(null!=t?t:w);},"position-strategy":e=>{var t;Ae(null!==(t=e)&&void 0!==t?t:S);},"delay-show":e=>{de(null===e?E:Number(e));},"delay-hide":e=>{ve(null===e?_:Number(e));},float:e=>{fe(null===e?O:"true"===e);},hidden:e=>{he(null===e?k:"true"===e);},"class-name":e=>{Oe(e);}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var l;null===(l=t[e])||void 0===l||l.call(t,o);}));};useEffect((()=>{te(i);}),[i]),useEffect((()=>{le(c);}),[c]),useEffect((()=>{ne(v);}),[v]),useEffect((()=>{ce(p);}),[p]),useEffect((()=>{ae(m);}),[m]),useEffect((()=>{de(E);}),[E]),useEffect((()=>{ve(_);}),[_]),useEffect((()=>{fe(O);}),[O]),useEffect((()=>{he(k);}),[k]),useEffect((()=>{Ae(S);}),[S]),useEffect((()=>{Le.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");}),[P]),useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}));}),[]),useEffect((()=>{var e;const o=new Set(Ce);let r=n;if(!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),r)try{document.querySelectorAll(r).forEach((e=>{o.add({current:e});}));}catch(e){console.warn(`[react-tooltip] "${r}" is not a valid CSS selector`);}const i=document.querySelector(`[id='${l}']`);if(i&&o.add({current:i}),!o.size)return ()=>null;const c=null!==(e=null!=ke?ke:i)&&void 0!==e?e:Re.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!c||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=xe(c);Ne(o);}));})),a={attributes:true,childList:false,subtree:false};if(c){const e=xe(c);Ne(e),s.observe(c,a);}return ()=>{s.disconnect();}}),[Ce,Re,ke,l,n]),useEffect((()=>{(null==B?void 0:B.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),V&&!A("border",`${V}`)&&console.warn(`[react-tooltip] "${V}" is not a valid \`border\`.`),(null==B?void 0:B.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!A("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`);}),[]);let $e=h;const Ie=useRef(null);if(a){const t=a({content:(null==ke?void 0:ke.getAttribute("data-tooltip-content"))||ee||null,activeAnchor:ke});$e=t?React__default.createElement("div",{ref:Ie,className:"react-tooltip-content-wrapper"},t):null;}else ee&&($e=ee);oe&&($e=React__default.createElement(H,{content:oe}));const ze={forwardRef:Q,id:t,anchorId:l,anchorSelect:n,className:classNames$1(u,_e),classNameArrow:d,content:$e,contentWrapperRef:Ie,place:re,variant:ie,offset:se,wrapper:we,events:Se,openOnClick:b,positionStrategy:Ee,middlewares:g,delayShow:ue,delayHide:pe,float:me,hidden:ye,noArrow:T,clickable:L,closeOnEsc:C,closeOnScroll:R,closeOnResize:x,openEvents:N,closeEvents:$,globalCloseEvents:I,imperativeModeOnly:j,style:B,position:D,isOpen:M,defaultIsOpen:W,border:V,opacity:F,arrowColor:K,arrowSize:U,setIsOpen:X,afterShow:Y,afterHide:G,disableTooltip:Z,activeAnchor:ke,setActiveAnchor:e=>Te(e),role:J};return React__default.createElement(q,{...ze})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||S({css:`:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s;--rt-arrow-size:8px}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit;z-index:-1}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}`,type:"core"}),e.detail.disableBase||S({css:`
|
|
42709
42760
|
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"});}));
|
|
42710
42761
|
|
|
42711
42762
|
const Tooltip = ({
|
|
@@ -42823,7 +42874,7 @@ const WizardModal = ({
|
|
|
42823
42874
|
onClick: onClose,
|
|
42824
42875
|
className: "wizard-close-button",
|
|
42825
42876
|
"aria-label": "Close modal",
|
|
42826
|
-
children: /* @__PURE__ */ jsx(X, { size: 24 })
|
|
42877
|
+
children: /* @__PURE__ */ jsx(X$1, { size: 24 })
|
|
42827
42878
|
}
|
|
42828
42879
|
)
|
|
42829
42880
|
] }),
|
|
@@ -43549,7 +43600,7 @@ var isEmptyObject$1 = (value) => isObject$2(value) && !Object.keys(value).length
|
|
|
43549
43600
|
|
|
43550
43601
|
var isFileInput = (element) => element.type === 'file';
|
|
43551
43602
|
|
|
43552
|
-
var isFunction$
|
|
43603
|
+
var isFunction$2 = (value) => typeof value === 'function';
|
|
43553
43604
|
|
|
43554
43605
|
var isHTMLElement$1 = (value) => {
|
|
43555
43606
|
if (!isWeb) {
|
|
@@ -43606,7 +43657,7 @@ function unset(object, path) {
|
|
|
43606
43657
|
|
|
43607
43658
|
var objectHasFunction = (data) => {
|
|
43608
43659
|
for (const key in data) {
|
|
43609
|
-
if (isFunction$
|
|
43660
|
+
if (isFunction$2(data[key])) {
|
|
43610
43661
|
return true;
|
|
43611
43662
|
}
|
|
43612
43663
|
}
|
|
@@ -43760,7 +43811,7 @@ var getValidationModes = (mode) => ({
|
|
|
43760
43811
|
const ASYNC_FUNCTION = 'AsyncFunction';
|
|
43761
43812
|
var hasPromiseValidation = (fieldReference) => !!fieldReference &&
|
|
43762
43813
|
!!fieldReference.validate &&
|
|
43763
|
-
!!((isFunction$
|
|
43814
|
+
!!((isFunction$2(fieldReference.validate) &&
|
|
43764
43815
|
fieldReference.validate.constructor.name === ASYNC_FUNCTION) ||
|
|
43765
43816
|
(isObject$2(fieldReference.validate) &&
|
|
43766
43817
|
Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION)));
|
|
@@ -44039,7 +44090,7 @@ var validateField = async (field, disabledFieldNames, formValues, validateAllFie
|
|
|
44039
44090
|
}
|
|
44040
44091
|
}
|
|
44041
44092
|
if (validate) {
|
|
44042
|
-
if (isFunction$
|
|
44093
|
+
if (isFunction$2(validate)) {
|
|
44043
44094
|
const result = await validate(inputValue, formValues);
|
|
44044
44095
|
const validateError = getValidateError(result, inputRef);
|
|
44045
44096
|
if (validateError) {
|
|
@@ -44100,7 +44151,7 @@ function createFormControl(props = {}) {
|
|
|
44100
44151
|
submitCount: 0,
|
|
44101
44152
|
isDirty: false,
|
|
44102
44153
|
isReady: false,
|
|
44103
|
-
isLoading: isFunction$
|
|
44154
|
+
isLoading: isFunction$2(_options.defaultValues),
|
|
44104
44155
|
isValidating: false,
|
|
44105
44156
|
isSubmitted: false,
|
|
44106
44157
|
isSubmitting: false,
|
|
@@ -44678,7 +44729,7 @@ function createFormControl(props = {}) {
|
|
|
44678
44729
|
});
|
|
44679
44730
|
options && options.shouldFocus && ref && ref.focus && ref.focus();
|
|
44680
44731
|
};
|
|
44681
|
-
const watch = (name, defaultValue) => isFunction$
|
|
44732
|
+
const watch = (name, defaultValue) => isFunction$2(name)
|
|
44682
44733
|
? _subjects.state.subscribe({
|
|
44683
44734
|
next: (payload) => 'values' in payload &&
|
|
44684
44735
|
name(_getWatch(undefined, defaultValue), payload),
|
|
@@ -45032,7 +45083,7 @@ function createFormControl(props = {}) {
|
|
|
45032
45083
|
defaultValues: _defaultValues,
|
|
45033
45084
|
});
|
|
45034
45085
|
};
|
|
45035
|
-
const reset = (formValues, keepStateOptions) => _reset(isFunction$
|
|
45086
|
+
const reset = (formValues, keepStateOptions) => _reset(isFunction$2(formValues)
|
|
45036
45087
|
? formValues(_formValues)
|
|
45037
45088
|
: formValues, keepStateOptions);
|
|
45038
45089
|
const setFocus = (name, options = {}) => {
|
|
@@ -45045,7 +45096,7 @@ function createFormControl(props = {}) {
|
|
|
45045
45096
|
if (fieldRef.focus) {
|
|
45046
45097
|
fieldRef.focus();
|
|
45047
45098
|
options.shouldSelect &&
|
|
45048
|
-
isFunction$
|
|
45099
|
+
isFunction$2(fieldRef.select) &&
|
|
45049
45100
|
fieldRef.select();
|
|
45050
45101
|
}
|
|
45051
45102
|
}
|
|
@@ -45056,7 +45107,7 @@ function createFormControl(props = {}) {
|
|
|
45056
45107
|
...updatedFormState,
|
|
45057
45108
|
};
|
|
45058
45109
|
};
|
|
45059
|
-
const _resetDefaultValues = () => isFunction$
|
|
45110
|
+
const _resetDefaultValues = () => isFunction$2(_options.defaultValues) &&
|
|
45060
45111
|
_options.defaultValues().then((values) => {
|
|
45061
45112
|
reset(values, _options.resetOptions);
|
|
45062
45113
|
_subjects.state.next({
|
|
@@ -45483,7 +45534,7 @@ function useForm(props = {}) {
|
|
|
45483
45534
|
const [formState, updateFormState] = React__default.useState({
|
|
45484
45535
|
isDirty: false,
|
|
45485
45536
|
isValidating: false,
|
|
45486
|
-
isLoading: isFunction$
|
|
45537
|
+
isLoading: isFunction$2(props.defaultValues),
|
|
45487
45538
|
isSubmitted: false,
|
|
45488
45539
|
isSubmitting: false,
|
|
45489
45540
|
isSubmitSuccessful: false,
|
|
@@ -45495,7 +45546,7 @@ function useForm(props = {}) {
|
|
|
45495
45546
|
errors: props.errors || {},
|
|
45496
45547
|
disabled: props.disabled || false,
|
|
45497
45548
|
isReady: false,
|
|
45498
|
-
defaultValues: isFunction$
|
|
45549
|
+
defaultValues: isFunction$2(props.defaultValues)
|
|
45499
45550
|
? undefined
|
|
45500
45551
|
: props.defaultValues,
|
|
45501
45552
|
});
|
|
@@ -45505,7 +45556,7 @@ function useForm(props = {}) {
|
|
|
45505
45556
|
...props.formControl,
|
|
45506
45557
|
formState,
|
|
45507
45558
|
};
|
|
45508
|
-
if (props.defaultValues && !isFunction$
|
|
45559
|
+
if (props.defaultValues && !isFunction$2(props.defaultValues)) {
|
|
45509
45560
|
props.formControl.reset(props.defaultValues, props.resetOptions);
|
|
45510
45561
|
}
|
|
45511
45562
|
}
|
|
@@ -45591,7 +45642,7 @@ function useForm(props = {}) {
|
|
|
45591
45642
|
return _formControl.current;
|
|
45592
45643
|
}
|
|
45593
45644
|
|
|
45594
|
-
const r=(t,r,o)=>{if(t&&"reportValidity"in t){const s=get(o,r);t.setCustomValidity(s&&s.message||""),t.reportValidity();}},o$1=(e,t)=>{for(const o in t.fields){const s=t.fields[o];s&&s.ref&&"reportValidity"in s.ref?r(s.ref,o,e):s&&s.refs&&s.refs.forEach(t=>r(t,o,e));}},s=(r,s)=>{s.shouldUseNativeValidation&&o$1(r,s);const n={};for(const o in r){const f=get(s.fields,o),c=Object.assign(r[o]||{},{ref:f&&f.ref});if(i(s.names||Object.keys(r),o)){const r=Object.assign({},get(n,o));set(r,"root",c),set(n,o,r);}else set(n,o,c);}return n},i=(e,t)=>{const r=n(t);return e.some(e=>n(e).match(`^${r}\\.\\d+`))};function n(e){return e.replace(/\]|\[/g,"")}
|
|
45645
|
+
const r$1=(t,r,o)=>{if(t&&"reportValidity"in t){const s=get(o,r);t.setCustomValidity(s&&s.message||""),t.reportValidity();}},o$1=(e,t)=>{for(const o in t.fields){const s=t.fields[o];s&&s.ref&&"reportValidity"in s.ref?r$1(s.ref,o,e):s&&s.refs&&s.refs.forEach(t=>r$1(t,o,e));}},s=(r,s)=>{s.shouldUseNativeValidation&&o$1(r,s);const n={};for(const o in r){const f=get(s.fields,o),c=Object.assign(r[o]||{},{ref:f&&f.ref});if(i(s.names||Object.keys(r),o)){const r=Object.assign({},get(n,o));set(r,"root",c),set(n,o,r);}else set(n,o,c);}return n},i=(e,t)=>{const r=n(t);return e.some(e=>n(e).match(`^${r}\\.\\d+`))};function n(e){return e.replace(/\]|\[/g,"")}
|
|
45595
45646
|
|
|
45596
45647
|
function o(o,n,s$1){return void 0===s$1&&(s$1={}),function(a,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(o["sync"===s$1.mode?"validateSync":"validate"](a,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&o$1({},c),{values:s$1.raw?Object.assign({},a):t,errors:{}}}));}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return {values:{},errors:s((o=e,n=!c.shouldUseNativeValidation&&"all"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,s=o&&o[t.type];e[t.path]=appendErrors(t.path,n,e,t.type,s?[].concat(s,t.message):t.message);}return e},{})),c)};var o,n;}))}catch(e){return Promise.reject(e)}}}
|
|
45597
45648
|
|
|
@@ -48063,7 +48114,7 @@ const isUndefined = typeOfTest('undefined');
|
|
|
48063
48114
|
*/
|
|
48064
48115
|
function isBuffer(val) {
|
|
48065
48116
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
48066
|
-
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
48117
|
+
&& isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
48067
48118
|
}
|
|
48068
48119
|
|
|
48069
48120
|
/**
|
|
@@ -48108,7 +48159,7 @@ const isString = typeOfTest('string');
|
|
|
48108
48159
|
* @param {*} val The value to test
|
|
48109
48160
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
48110
48161
|
*/
|
|
48111
|
-
const isFunction = typeOfTest('function');
|
|
48162
|
+
const isFunction$1 = typeOfTest('function');
|
|
48112
48163
|
|
|
48113
48164
|
/**
|
|
48114
48165
|
* Determine if a value is a Number
|
|
@@ -48164,7 +48215,7 @@ const isEmptyObject = (val) => {
|
|
|
48164
48215
|
if (!isObject(val) || isBuffer(val)) {
|
|
48165
48216
|
return false;
|
|
48166
48217
|
}
|
|
48167
|
-
|
|
48218
|
+
|
|
48168
48219
|
try {
|
|
48169
48220
|
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
48170
48221
|
} catch (e) {
|
|
@@ -48216,7 +48267,7 @@ const isFileList = kindOfTest('FileList');
|
|
|
48216
48267
|
*
|
|
48217
48268
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
48218
48269
|
*/
|
|
48219
|
-
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
48270
|
+
const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
|
|
48220
48271
|
|
|
48221
48272
|
/**
|
|
48222
48273
|
* Determine if a value is a FormData
|
|
@@ -48229,10 +48280,10 @@ const isFormData = (thing) => {
|
|
|
48229
48280
|
let kind;
|
|
48230
48281
|
return thing && (
|
|
48231
48282
|
(typeof FormData === 'function' && thing instanceof FormData) || (
|
|
48232
|
-
isFunction(thing.append) && (
|
|
48283
|
+
isFunction$1(thing.append) && (
|
|
48233
48284
|
(kind = kindOf(thing)) === 'formdata' ||
|
|
48234
48285
|
// detect form-data instance
|
|
48235
|
-
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
48286
|
+
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
|
|
48236
48287
|
)
|
|
48237
48288
|
)
|
|
48238
48289
|
)
|
|
@@ -48357,7 +48408,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
48357
48408
|
* @returns {Object} Result of all merge properties
|
|
48358
48409
|
*/
|
|
48359
48410
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
48360
|
-
const {caseless} = isContextDefined(this) && this || {};
|
|
48411
|
+
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
48361
48412
|
const result = {};
|
|
48362
48413
|
const assignValue = (val, key) => {
|
|
48363
48414
|
const targetKey = caseless && findKey(result, key) || key;
|
|
@@ -48367,7 +48418,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
48367
48418
|
result[targetKey] = merge({}, val);
|
|
48368
48419
|
} else if (isArray(val)) {
|
|
48369
48420
|
result[targetKey] = val.slice();
|
|
48370
|
-
} else {
|
|
48421
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
48371
48422
|
result[targetKey] = val;
|
|
48372
48423
|
}
|
|
48373
48424
|
};
|
|
@@ -48390,7 +48441,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
48390
48441
|
*/
|
|
48391
48442
|
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
48392
48443
|
forEach(b, (val, key) => {
|
|
48393
|
-
if (thisArg && isFunction(val)) {
|
|
48444
|
+
if (thisArg && isFunction$1(val)) {
|
|
48394
48445
|
a[key] = bind(val, thisArg);
|
|
48395
48446
|
} else {
|
|
48396
48447
|
a[key] = val;
|
|
@@ -48606,13 +48657,13 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
48606
48657
|
const freezeMethods = (obj) => {
|
|
48607
48658
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
48608
48659
|
// skip restricted props in strict mode
|
|
48609
|
-
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
48660
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
48610
48661
|
return false;
|
|
48611
48662
|
}
|
|
48612
48663
|
|
|
48613
48664
|
const value = obj[name];
|
|
48614
48665
|
|
|
48615
|
-
if (!isFunction(value)) return;
|
|
48666
|
+
if (!isFunction$1(value)) return;
|
|
48616
48667
|
|
|
48617
48668
|
descriptor.enumerable = false;
|
|
48618
48669
|
|
|
@@ -48649,6 +48700,8 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
48649
48700
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
48650
48701
|
};
|
|
48651
48702
|
|
|
48703
|
+
|
|
48704
|
+
|
|
48652
48705
|
/**
|
|
48653
48706
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
48654
48707
|
*
|
|
@@ -48657,7 +48710,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
48657
48710
|
* @returns {boolean}
|
|
48658
48711
|
*/
|
|
48659
48712
|
function isSpecCompliantForm(thing) {
|
|
48660
|
-
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
48713
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
|
48661
48714
|
}
|
|
48662
48715
|
|
|
48663
48716
|
const toJSONObject = (obj) => {
|
|
@@ -48699,7 +48752,7 @@ const toJSONObject = (obj) => {
|
|
|
48699
48752
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
48700
48753
|
|
|
48701
48754
|
const isThenable = (thing) =>
|
|
48702
|
-
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
48755
|
+
thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
48703
48756
|
|
|
48704
48757
|
// original code
|
|
48705
48758
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
@@ -48723,7 +48776,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
48723
48776
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
48724
48777
|
})(
|
|
48725
48778
|
typeof setImmediate === 'function',
|
|
48726
|
-
isFunction(_global.postMessage)
|
|
48779
|
+
isFunction$1(_global.postMessage)
|
|
48727
48780
|
);
|
|
48728
48781
|
|
|
48729
48782
|
const asap = typeof queueMicrotask !== 'undefined' ?
|
|
@@ -48732,7 +48785,7 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|
|
48732
48785
|
// *********************
|
|
48733
48786
|
|
|
48734
48787
|
|
|
48735
|
-
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
48788
|
+
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
48736
48789
|
|
|
48737
48790
|
|
|
48738
48791
|
const utils$1 = {
|
|
@@ -48756,7 +48809,7 @@ const utils$1 = {
|
|
|
48756
48809
|
isFile,
|
|
48757
48810
|
isBlob,
|
|
48758
48811
|
isRegExp,
|
|
48759
|
-
isFunction,
|
|
48812
|
+
isFunction: isFunction$1,
|
|
48760
48813
|
isStream,
|
|
48761
48814
|
isURLSearchParams,
|
|
48762
48815
|
isTypedArray,
|
|
@@ -48882,11 +48935,18 @@ AxiosError$1.from = (error, code, config, request, response, customProps) => {
|
|
|
48882
48935
|
return prop !== 'isAxiosError';
|
|
48883
48936
|
});
|
|
48884
48937
|
|
|
48885
|
-
|
|
48938
|
+
const msg = error && error.message ? error.message : 'Error';
|
|
48886
48939
|
|
|
48887
|
-
|
|
48940
|
+
// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
|
|
48941
|
+
const errCode = code == null && error ? error.code : code;
|
|
48942
|
+
AxiosError$1.call(axiosError, msg, errCode, config, request, response);
|
|
48943
|
+
|
|
48944
|
+
// Chain the original error on the standard field; non-enumerable to avoid JSON noise
|
|
48945
|
+
if (error && axiosError.cause == null) {
|
|
48946
|
+
Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
|
|
48947
|
+
}
|
|
48888
48948
|
|
|
48889
|
-
axiosError.name = error.name;
|
|
48949
|
+
axiosError.name = (error && error.name) || 'Error';
|
|
48890
48950
|
|
|
48891
48951
|
customProps && Object.assign(axiosError, customProps);
|
|
48892
48952
|
|
|
@@ -49177,9 +49237,7 @@ function encode(val) {
|
|
|
49177
49237
|
replace(/%3A/gi, ':').
|
|
49178
49238
|
replace(/%24/g, '$').
|
|
49179
49239
|
replace(/%2C/gi, ',').
|
|
49180
|
-
replace(/%20/g, '+')
|
|
49181
|
-
replace(/%5B/gi, '[').
|
|
49182
|
-
replace(/%5D/gi, ']');
|
|
49240
|
+
replace(/%20/g, '+');
|
|
49183
49241
|
}
|
|
49184
49242
|
|
|
49185
49243
|
/**
|
|
@@ -49504,7 +49562,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
49504
49562
|
return (encoder || JSON.stringify)(rawValue);
|
|
49505
49563
|
}
|
|
49506
49564
|
|
|
49507
|
-
const defaults = {
|
|
49565
|
+
const defaults$1 = {
|
|
49508
49566
|
|
|
49509
49567
|
transitional: transitionalDefaults,
|
|
49510
49568
|
|
|
@@ -49569,7 +49627,7 @@ const defaults = {
|
|
|
49569
49627
|
}],
|
|
49570
49628
|
|
|
49571
49629
|
transformResponse: [function transformResponse(data) {
|
|
49572
|
-
const transitional = this.transitional || defaults.transitional;
|
|
49630
|
+
const transitional = this.transitional || defaults$1.transitional;
|
|
49573
49631
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
49574
49632
|
const JSONRequested = this.responseType === 'json';
|
|
49575
49633
|
|
|
@@ -49582,7 +49640,7 @@ const defaults = {
|
|
|
49582
49640
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
49583
49641
|
|
|
49584
49642
|
try {
|
|
49585
|
-
return JSON.parse(data);
|
|
49643
|
+
return JSON.parse(data, this.parseReviver);
|
|
49586
49644
|
} catch (e) {
|
|
49587
49645
|
if (strictJSONParsing) {
|
|
49588
49646
|
if (e.name === 'SyntaxError') {
|
|
@@ -49626,7 +49684,7 @@ const defaults = {
|
|
|
49626
49684
|
};
|
|
49627
49685
|
|
|
49628
49686
|
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
49629
|
-
defaults.headers[method] = {};
|
|
49687
|
+
defaults$1.headers[method] = {};
|
|
49630
49688
|
});
|
|
49631
49689
|
|
|
49632
49690
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
@@ -49998,7 +50056,7 @@ utils$1.freezeMethods(AxiosHeaders$1);
|
|
|
49998
50056
|
* @returns {*} The resulting transformed data
|
|
49999
50057
|
*/
|
|
50000
50058
|
function transformData(fns, response) {
|
|
50001
|
-
const config = this || defaults;
|
|
50059
|
+
const config = this || defaults$1;
|
|
50002
50060
|
const context = response || config;
|
|
50003
50061
|
const headers = AxiosHeaders$1.from(context.headers);
|
|
50004
50062
|
let data = context.data;
|
|
@@ -50403,7 +50461,7 @@ function mergeConfig$1(config1, config2) {
|
|
|
50403
50461
|
const resolveConfig = (config) => {
|
|
50404
50462
|
const newConfig = mergeConfig$1({}, config);
|
|
50405
50463
|
|
|
50406
|
-
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
|
50464
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
50407
50465
|
|
|
50408
50466
|
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
50409
50467
|
|
|
@@ -50416,17 +50474,21 @@ const resolveConfig = (config) => {
|
|
|
50416
50474
|
);
|
|
50417
50475
|
}
|
|
50418
50476
|
|
|
50419
|
-
let contentType;
|
|
50420
|
-
|
|
50421
50477
|
if (utils$1.isFormData(data)) {
|
|
50422
50478
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
50423
|
-
headers.setContentType(undefined); //
|
|
50424
|
-
} else if ((
|
|
50425
|
-
//
|
|
50426
|
-
const
|
|
50427
|
-
headers
|
|
50479
|
+
headers.setContentType(undefined); // browser handles it
|
|
50480
|
+
} else if (utils$1.isFunction(data.getHeaders)) {
|
|
50481
|
+
// Node.js FormData (like form-data package)
|
|
50482
|
+
const formHeaders = data.getHeaders();
|
|
50483
|
+
// Only set safe headers to avoid overwriting security headers
|
|
50484
|
+
const allowedHeaders = ['content-type', 'content-length'];
|
|
50485
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
50486
|
+
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
50487
|
+
headers.set(key, val);
|
|
50488
|
+
}
|
|
50489
|
+
});
|
|
50428
50490
|
}
|
|
50429
|
-
}
|
|
50491
|
+
}
|
|
50430
50492
|
|
|
50431
50493
|
// Add xsrf header
|
|
50432
50494
|
// This is only done if running in a standard browser environment.
|
|
@@ -50543,15 +50605,18 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
50543
50605
|
};
|
|
50544
50606
|
|
|
50545
50607
|
// Handle low level network errors
|
|
50546
|
-
|
|
50547
|
-
|
|
50548
|
-
|
|
50549
|
-
|
|
50550
|
-
|
|
50551
|
-
|
|
50552
|
-
|
|
50608
|
+
request.onerror = function handleError(event) {
|
|
50609
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
50610
|
+
// (message may be empty; when present, surface it)
|
|
50611
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
50612
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
50613
|
+
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
50614
|
+
// attach the underlying event for consumers who want details
|
|
50615
|
+
err.event = event || null;
|
|
50616
|
+
reject(err);
|
|
50617
|
+
request = null;
|
|
50553
50618
|
};
|
|
50554
|
-
|
|
50619
|
+
|
|
50555
50620
|
// Handle timeout
|
|
50556
50621
|
request.ontimeout = function handleTimeout() {
|
|
50557
50622
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
@@ -50765,14 +50830,18 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
50765
50830
|
})
|
|
50766
50831
|
};
|
|
50767
50832
|
|
|
50768
|
-
const
|
|
50769
|
-
|
|
50833
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
50834
|
+
|
|
50835
|
+
const {isFunction} = utils$1;
|
|
50836
|
+
|
|
50837
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
|
50838
|
+
Request, Response
|
|
50839
|
+
}))(utils$1.global);
|
|
50840
|
+
|
|
50841
|
+
const {
|
|
50842
|
+
ReadableStream: ReadableStream$1, TextEncoder
|
|
50843
|
+
} = utils$1.global;
|
|
50770
50844
|
|
|
50771
|
-
// used only inside the fetch adapter
|
|
50772
|
-
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
50773
|
-
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
50774
|
-
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
|
50775
|
-
);
|
|
50776
50845
|
|
|
50777
50846
|
const test = (fn, ...args) => {
|
|
50778
50847
|
try {
|
|
@@ -50782,211 +50851,268 @@ const test = (fn, ...args) => {
|
|
|
50782
50851
|
}
|
|
50783
50852
|
};
|
|
50784
50853
|
|
|
50785
|
-
const
|
|
50786
|
-
|
|
50854
|
+
const factory = (env) => {
|
|
50855
|
+
env = utils$1.merge.call({
|
|
50856
|
+
skipUndefined: true
|
|
50857
|
+
}, globalFetchAPI, env);
|
|
50787
50858
|
|
|
50788
|
-
const
|
|
50789
|
-
|
|
50790
|
-
|
|
50791
|
-
|
|
50792
|
-
duplexAccessed = true;
|
|
50793
|
-
return 'half';
|
|
50794
|
-
},
|
|
50795
|
-
}).headers.has('Content-Type');
|
|
50859
|
+
const {fetch: envFetch, Request, Response} = env;
|
|
50860
|
+
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
50861
|
+
const isRequestSupported = isFunction(Request);
|
|
50862
|
+
const isResponseSupported = isFunction(Response);
|
|
50796
50863
|
|
|
50797
|
-
|
|
50798
|
-
|
|
50864
|
+
if (!isFetchSupported) {
|
|
50865
|
+
return false;
|
|
50866
|
+
}
|
|
50799
50867
|
|
|
50800
|
-
const
|
|
50868
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
|
50801
50869
|
|
|
50802
|
-
const
|
|
50803
|
-
|
|
50870
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
50871
|
+
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
50872
|
+
async (str) => new Uint8Array(await new Request(str).arrayBuffer())
|
|
50873
|
+
);
|
|
50804
50874
|
|
|
50875
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
50876
|
+
let duplexAccessed = false;
|
|
50805
50877
|
|
|
50806
|
-
const
|
|
50807
|
-
|
|
50808
|
-
|
|
50878
|
+
const hasContentType = new Request(platform.origin, {
|
|
50879
|
+
body: new ReadableStream$1(),
|
|
50880
|
+
method: 'POST',
|
|
50881
|
+
get duplex() {
|
|
50882
|
+
duplexAccessed = true;
|
|
50883
|
+
return 'half';
|
|
50884
|
+
},
|
|
50885
|
+
}).headers.has('Content-Type');
|
|
50809
50886
|
|
|
50810
|
-
|
|
50811
|
-
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
50812
|
-
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
|
|
50813
|
-
(_, config) => {
|
|
50814
|
-
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
50815
|
-
});
|
|
50887
|
+
return duplexAccessed && !hasContentType;
|
|
50816
50888
|
});
|
|
50817
|
-
})(new Response));
|
|
50818
50889
|
|
|
50819
|
-
const
|
|
50820
|
-
|
|
50821
|
-
return 0;
|
|
50822
|
-
}
|
|
50890
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
|
|
50891
|
+
test(() => utils$1.isReadableStream(new Response('').body));
|
|
50823
50892
|
|
|
50824
|
-
|
|
50825
|
-
|
|
50826
|
-
}
|
|
50893
|
+
const resolvers = {
|
|
50894
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
50895
|
+
};
|
|
50827
50896
|
|
|
50828
|
-
|
|
50829
|
-
|
|
50830
|
-
|
|
50831
|
-
|
|
50897
|
+
isFetchSupported && ((() => {
|
|
50898
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
50899
|
+
!resolvers[type] && (resolvers[type] = (res, config) => {
|
|
50900
|
+
let method = res && res[type];
|
|
50901
|
+
|
|
50902
|
+
if (method) {
|
|
50903
|
+
return method.call(res);
|
|
50904
|
+
}
|
|
50905
|
+
|
|
50906
|
+
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
50907
|
+
});
|
|
50832
50908
|
});
|
|
50833
|
-
|
|
50834
|
-
}
|
|
50909
|
+
})());
|
|
50835
50910
|
|
|
50836
|
-
|
|
50837
|
-
|
|
50838
|
-
|
|
50911
|
+
const getBodyLength = async (body) => {
|
|
50912
|
+
if (body == null) {
|
|
50913
|
+
return 0;
|
|
50914
|
+
}
|
|
50839
50915
|
|
|
50840
|
-
|
|
50841
|
-
|
|
50842
|
-
|
|
50916
|
+
if (utils$1.isBlob(body)) {
|
|
50917
|
+
return body.size;
|
|
50918
|
+
}
|
|
50843
50919
|
|
|
50844
|
-
|
|
50845
|
-
|
|
50846
|
-
|
|
50847
|
-
|
|
50920
|
+
if (utils$1.isSpecCompliantForm(body)) {
|
|
50921
|
+
const _request = new Request(platform.origin, {
|
|
50922
|
+
method: 'POST',
|
|
50923
|
+
body,
|
|
50924
|
+
});
|
|
50925
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
50926
|
+
}
|
|
50848
50927
|
|
|
50849
|
-
|
|
50850
|
-
|
|
50928
|
+
if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
|
50929
|
+
return body.byteLength;
|
|
50930
|
+
}
|
|
50851
50931
|
|
|
50852
|
-
|
|
50853
|
-
|
|
50932
|
+
if (utils$1.isURLSearchParams(body)) {
|
|
50933
|
+
body = body + '';
|
|
50934
|
+
}
|
|
50854
50935
|
|
|
50855
|
-
|
|
50856
|
-
|
|
50857
|
-
|
|
50858
|
-
|
|
50859
|
-
data,
|
|
50860
|
-
signal,
|
|
50861
|
-
cancelToken,
|
|
50862
|
-
timeout,
|
|
50863
|
-
onDownloadProgress,
|
|
50864
|
-
onUploadProgress,
|
|
50865
|
-
responseType,
|
|
50866
|
-
headers,
|
|
50867
|
-
withCredentials = 'same-origin',
|
|
50868
|
-
fetchOptions
|
|
50869
|
-
} = resolveConfig(config);
|
|
50936
|
+
if (utils$1.isString(body)) {
|
|
50937
|
+
return (await encodeText(body)).byteLength;
|
|
50938
|
+
}
|
|
50939
|
+
};
|
|
50870
50940
|
|
|
50871
|
-
|
|
50941
|
+
const resolveBodyLength = async (headers, body) => {
|
|
50942
|
+
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
50872
50943
|
|
|
50873
|
-
|
|
50944
|
+
return length == null ? getBodyLength(body) : length;
|
|
50945
|
+
};
|
|
50874
50946
|
|
|
50875
|
-
|
|
50947
|
+
return async (config) => {
|
|
50948
|
+
let {
|
|
50949
|
+
url,
|
|
50950
|
+
method,
|
|
50951
|
+
data,
|
|
50952
|
+
signal,
|
|
50953
|
+
cancelToken,
|
|
50954
|
+
timeout,
|
|
50955
|
+
onDownloadProgress,
|
|
50956
|
+
onUploadProgress,
|
|
50957
|
+
responseType,
|
|
50958
|
+
headers,
|
|
50959
|
+
withCredentials = 'same-origin',
|
|
50960
|
+
fetchOptions
|
|
50961
|
+
} = resolveConfig(config);
|
|
50962
|
+
|
|
50963
|
+
let _fetch = envFetch || fetch;
|
|
50964
|
+
|
|
50965
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
50876
50966
|
|
|
50877
|
-
|
|
50967
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
50968
|
+
|
|
50969
|
+
let request = null;
|
|
50970
|
+
|
|
50971
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
50878
50972
|
composedSignal.unsubscribe();
|
|
50879
|
-
|
|
50973
|
+
});
|
|
50880
50974
|
|
|
50881
|
-
|
|
50975
|
+
let requestContentLength;
|
|
50882
50976
|
|
|
50883
|
-
|
|
50884
|
-
|
|
50885
|
-
|
|
50886
|
-
|
|
50887
|
-
|
|
50888
|
-
|
|
50889
|
-
|
|
50890
|
-
|
|
50891
|
-
|
|
50892
|
-
|
|
50977
|
+
try {
|
|
50978
|
+
if (
|
|
50979
|
+
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
|
|
50980
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
50981
|
+
) {
|
|
50982
|
+
let _request = new Request(url, {
|
|
50983
|
+
method: 'POST',
|
|
50984
|
+
body: data,
|
|
50985
|
+
duplex: "half"
|
|
50986
|
+
});
|
|
50893
50987
|
|
|
50894
|
-
|
|
50988
|
+
let contentTypeHeader;
|
|
50895
50989
|
|
|
50896
|
-
|
|
50897
|
-
|
|
50898
|
-
|
|
50990
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
50991
|
+
headers.setContentType(contentTypeHeader);
|
|
50992
|
+
}
|
|
50899
50993
|
|
|
50900
|
-
|
|
50901
|
-
|
|
50902
|
-
|
|
50903
|
-
|
|
50904
|
-
|
|
50994
|
+
if (_request.body) {
|
|
50995
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
50996
|
+
requestContentLength,
|
|
50997
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
50998
|
+
);
|
|
50905
50999
|
|
|
50906
|
-
|
|
51000
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
51001
|
+
}
|
|
50907
51002
|
}
|
|
50908
|
-
}
|
|
50909
51003
|
|
|
50910
|
-
|
|
50911
|
-
|
|
50912
|
-
|
|
51004
|
+
if (!utils$1.isString(withCredentials)) {
|
|
51005
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
51006
|
+
}
|
|
50913
51007
|
|
|
50914
|
-
|
|
50915
|
-
|
|
50916
|
-
|
|
50917
|
-
request = new Request(url, {
|
|
50918
|
-
...fetchOptions,
|
|
50919
|
-
signal: composedSignal,
|
|
50920
|
-
method: method.toUpperCase(),
|
|
50921
|
-
headers: headers.normalize().toJSON(),
|
|
50922
|
-
body: data,
|
|
50923
|
-
duplex: "half",
|
|
50924
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
50925
|
-
});
|
|
51008
|
+
// Cloudflare Workers throws when credentials are defined
|
|
51009
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
|
51010
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
50926
51011
|
|
|
50927
|
-
|
|
51012
|
+
const resolvedOptions = {
|
|
51013
|
+
...fetchOptions,
|
|
51014
|
+
signal: composedSignal,
|
|
51015
|
+
method: method.toUpperCase(),
|
|
51016
|
+
headers: headers.normalize().toJSON(),
|
|
51017
|
+
body: data,
|
|
51018
|
+
duplex: "half",
|
|
51019
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
51020
|
+
};
|
|
50928
51021
|
|
|
50929
|
-
|
|
51022
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
50930
51023
|
|
|
50931
|
-
|
|
50932
|
-
const options = {};
|
|
51024
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
50933
51025
|
|
|
50934
|
-
|
|
50935
|
-
options[prop] = response[prop];
|
|
50936
|
-
});
|
|
51026
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
50937
51027
|
|
|
50938
|
-
|
|
51028
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
51029
|
+
const options = {};
|
|
50939
51030
|
|
|
50940
|
-
|
|
50941
|
-
|
|
50942
|
-
|
|
50943
|
-
) || [];
|
|
51031
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
51032
|
+
options[prop] = response[prop];
|
|
51033
|
+
});
|
|
50944
51034
|
|
|
50945
|
-
|
|
50946
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
50947
|
-
flush && flush();
|
|
50948
|
-
unsubscribe && unsubscribe();
|
|
50949
|
-
}),
|
|
50950
|
-
options
|
|
50951
|
-
);
|
|
50952
|
-
}
|
|
51035
|
+
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
50953
51036
|
|
|
50954
|
-
|
|
51037
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
51038
|
+
responseContentLength,
|
|
51039
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
51040
|
+
) || [];
|
|
50955
51041
|
|
|
50956
|
-
|
|
51042
|
+
response = new Response(
|
|
51043
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
51044
|
+
flush && flush();
|
|
51045
|
+
unsubscribe && unsubscribe();
|
|
51046
|
+
}),
|
|
51047
|
+
options
|
|
51048
|
+
);
|
|
51049
|
+
}
|
|
50957
51050
|
|
|
50958
|
-
|
|
51051
|
+
responseType = responseType || 'text';
|
|
50959
51052
|
|
|
50960
|
-
|
|
50961
|
-
settle(resolve, reject, {
|
|
50962
|
-
data: responseData,
|
|
50963
|
-
headers: AxiosHeaders$1.from(response.headers),
|
|
50964
|
-
status: response.status,
|
|
50965
|
-
statusText: response.statusText,
|
|
50966
|
-
config,
|
|
50967
|
-
request
|
|
50968
|
-
});
|
|
50969
|
-
})
|
|
50970
|
-
} catch (err) {
|
|
50971
|
-
unsubscribe && unsubscribe();
|
|
51053
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
|
50972
51054
|
|
|
50973
|
-
|
|
50974
|
-
|
|
50975
|
-
|
|
50976
|
-
{
|
|
50977
|
-
|
|
50978
|
-
|
|
50979
|
-
|
|
51055
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
51056
|
+
|
|
51057
|
+
return await new Promise((resolve, reject) => {
|
|
51058
|
+
settle(resolve, reject, {
|
|
51059
|
+
data: responseData,
|
|
51060
|
+
headers: AxiosHeaders$1.from(response.headers),
|
|
51061
|
+
status: response.status,
|
|
51062
|
+
statusText: response.statusText,
|
|
51063
|
+
config,
|
|
51064
|
+
request
|
|
51065
|
+
});
|
|
51066
|
+
})
|
|
51067
|
+
} catch (err) {
|
|
51068
|
+
unsubscribe && unsubscribe();
|
|
51069
|
+
|
|
51070
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
51071
|
+
throw Object.assign(
|
|
51072
|
+
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
|
|
51073
|
+
{
|
|
51074
|
+
cause: err.cause || err
|
|
51075
|
+
}
|
|
51076
|
+
)
|
|
51077
|
+
}
|
|
51078
|
+
|
|
51079
|
+
throw AxiosError$1.from(err, err && err.code, config, request);
|
|
50980
51080
|
}
|
|
51081
|
+
}
|
|
51082
|
+
};
|
|
51083
|
+
|
|
51084
|
+
const seedCache = new Map();
|
|
51085
|
+
|
|
51086
|
+
const getFetch = (config) => {
|
|
51087
|
+
let env = config ? config.env : {};
|
|
51088
|
+
const {fetch, Request, Response} = env;
|
|
51089
|
+
const seeds = [
|
|
51090
|
+
Request, Response, fetch
|
|
51091
|
+
];
|
|
51092
|
+
|
|
51093
|
+
let len = seeds.length, i = len,
|
|
51094
|
+
seed, target, map = seedCache;
|
|
51095
|
+
|
|
51096
|
+
while (i--) {
|
|
51097
|
+
seed = seeds[i];
|
|
51098
|
+
target = map.get(seed);
|
|
51099
|
+
|
|
51100
|
+
target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
|
|
50981
51101
|
|
|
50982
|
-
|
|
51102
|
+
map = target;
|
|
50983
51103
|
}
|
|
50984
|
-
|
|
51104
|
+
|
|
51105
|
+
return target;
|
|
51106
|
+
};
|
|
51107
|
+
|
|
51108
|
+
getFetch();
|
|
50985
51109
|
|
|
50986
51110
|
const knownAdapters = {
|
|
50987
51111
|
http: httpAdapter,
|
|
50988
51112
|
xhr: xhrAdapter,
|
|
50989
|
-
fetch:
|
|
51113
|
+
fetch: {
|
|
51114
|
+
get: getFetch,
|
|
51115
|
+
}
|
|
50990
51116
|
};
|
|
50991
51117
|
|
|
50992
51118
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
@@ -51005,7 +51131,7 @@ const renderReason = (reason) => `- ${reason}`;
|
|
|
51005
51131
|
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
51006
51132
|
|
|
51007
51133
|
const adapters = {
|
|
51008
|
-
getAdapter: (adapters) => {
|
|
51134
|
+
getAdapter: (adapters, config) => {
|
|
51009
51135
|
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
51010
51136
|
|
|
51011
51137
|
const {length} = adapters;
|
|
@@ -51028,7 +51154,7 @@ const adapters = {
|
|
|
51028
51154
|
}
|
|
51029
51155
|
}
|
|
51030
51156
|
|
|
51031
|
-
if (adapter) {
|
|
51157
|
+
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
51032
51158
|
break;
|
|
51033
51159
|
}
|
|
51034
51160
|
|
|
@@ -51096,7 +51222,7 @@ function dispatchRequest(config) {
|
|
|
51096
51222
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
51097
51223
|
}
|
|
51098
51224
|
|
|
51099
|
-
const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
|
|
51225
|
+
const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
|
|
51100
51226
|
|
|
51101
51227
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
51102
51228
|
throwIfCancellationRequested(config);
|
|
@@ -51130,7 +51256,7 @@ function dispatchRequest(config) {
|
|
|
51130
51256
|
});
|
|
51131
51257
|
}
|
|
51132
51258
|
|
|
51133
|
-
const VERSION$1 = "1.
|
|
51259
|
+
const VERSION$1 = "1.12.2";
|
|
51134
51260
|
|
|
51135
51261
|
const validators$1 = {};
|
|
51136
51262
|
|
|
@@ -51386,8 +51512,6 @@ let Axios$1 = class Axios {
|
|
|
51386
51512
|
|
|
51387
51513
|
let newConfig = config;
|
|
51388
51514
|
|
|
51389
|
-
i = 0;
|
|
51390
|
-
|
|
51391
51515
|
while (i < len) {
|
|
51392
51516
|
const onFulfilled = requestInterceptorChain[i++];
|
|
51393
51517
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -51719,7 +51843,7 @@ function createInstance(defaultConfig) {
|
|
|
51719
51843
|
}
|
|
51720
51844
|
|
|
51721
51845
|
// Create the default instance to be exported
|
|
51722
|
-
const axios = createInstance(defaults);
|
|
51846
|
+
const axios = createInstance(defaults$1);
|
|
51723
51847
|
|
|
51724
51848
|
// Expose Axios class to allow class inheritance
|
|
51725
51849
|
axios.Axios = Axios$1;
|
|
@@ -70661,7 +70785,7 @@ const CustomDialog = ({
|
|
|
70661
70785
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
|
|
70662
70786
|
header?.customHeader && header.customHeader,
|
|
70663
70787
|
header?.title && !header?.customHeader && /* @__PURE__ */ jsx(DialogTitle, { className: "text-lg font-bold", children: header?.title }),
|
|
70664
|
-
header?.isCrossShow && /* @__PURE__ */ jsx("button", { onClick: () => setIsOpen(false), className: "p-2", children: /* @__PURE__ */ jsx(X, { className: "w-5 h-5" }) })
|
|
70788
|
+
header?.isCrossShow && /* @__PURE__ */ jsx("button", { onClick: () => setIsOpen(false), className: "p-2", children: /* @__PURE__ */ jsx(X$1, { className: "w-5 h-5" }) })
|
|
70665
70789
|
] }),
|
|
70666
70790
|
/* @__PURE__ */ jsx(
|
|
70667
70791
|
"div",
|
|
@@ -74913,15 +75037,14 @@ const baseConfig = {
|
|
|
74913
75037
|
"redo"
|
|
74914
75038
|
]
|
|
74915
75039
|
};
|
|
74916
|
-
const
|
|
75040
|
+
const CustomCKEditor = ({ value, onChange, config = {} }) => {
|
|
74917
75041
|
const mergedConfig = {
|
|
74918
75042
|
...baseConfig,
|
|
74919
75043
|
...config,
|
|
74920
|
-
|
|
74921
|
-
|
|
74922
|
-
placeholder: config.placeholder || baseConfig.placeholder
|
|
75044
|
+
toolbar: config.toolbar ?? baseConfig.toolbar,
|
|
75045
|
+
placeholder: config.placeholder ?? baseConfig.placeholder
|
|
74923
75046
|
};
|
|
74924
|
-
return /* @__PURE__ */ jsx(
|
|
75047
|
+
return /* @__PURE__ */ jsx(
|
|
74925
75048
|
CKEditor,
|
|
74926
75049
|
{
|
|
74927
75050
|
editor: ClassicEditor,
|
|
@@ -74929,20 +75052,96 @@ const CKEditorControlled = ({ value, onChange, config = {} }) => {
|
|
|
74929
75052
|
data: value,
|
|
74930
75053
|
onReady: (editor) => {
|
|
74931
75054
|
if (mergedConfig.height) {
|
|
74932
|
-
editor.ui.view.editable.element.style.minHeight =
|
|
75055
|
+
editor.ui.view.editable.element.style.minHeight = mergedConfig.height;
|
|
74933
75056
|
}
|
|
74934
75057
|
},
|
|
74935
|
-
onChange: (_, editor) =>
|
|
74936
|
-
const data = editor.getData();
|
|
74937
|
-
onChange(data);
|
|
74938
|
-
}
|
|
75058
|
+
onChange: (_, editor) => onChange(editor.getData())
|
|
74939
75059
|
}
|
|
74940
|
-
)
|
|
75060
|
+
);
|
|
74941
75061
|
};
|
|
74942
|
-
|
|
75062
|
+
|
|
75063
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
74943
75064
|
|
|
74944
75065
|
function Mt(t){if(typeof document=="undefined")return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t));}Mt(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
74945
|
-
`);
|
|
75066
|
+
`);var L=t=>typeof t=="number"&&!isNaN(t),N=t=>typeof t=="string",P=t=>typeof t=="function",mt=t=>N(t)||L(t),B=t=>N(t)||P(t)?t:null,pt=(t,o)=>t===false||L(t)&&t>0?t:o,z=t=>isValidElement(t)||N(t)||P(t)||L(t);function Z(t,o,e=300){let{scrollHeight:r,style:s}=t;requestAnimationFrame(()=>{s.minHeight="initial",s.height=r+"px",s.transition=`all ${e}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(o,e);});});}function $({enter:t,exit:o,appendPosition:e=false,collapse:r=true,collapseDuration:s=300}){return function({children:a,position:d,preventExitTransition:c,done:T,nodeRef:g,isIn:v,playToast:x}){let C=e?`${t}--${d}`:t,S=e?`${o}--${d}`:o,E=useRef(0);return useLayoutEffect(()=>{let f=g.current,p=C.split(" "),b=n=>{n.target===g.current&&(x(),f.removeEventListener("animationend",b),f.removeEventListener("animationcancel",b),E.current===0&&n.type!=="animationcancel"&&f.classList.remove(...p));};(()=>{f.classList.add(...p),f.addEventListener("animationend",b),f.addEventListener("animationcancel",b);})();},[]),useEffect(()=>{let f=g.current,p=()=>{f.removeEventListener("animationend",p),r?Z(f,T,s):T();};v||(c?p():(()=>{E.current=1,f.className+=` ${S}`,f.addEventListener("animationend",p);})());},[v]),React__default.createElement(React__default.Fragment,null,a)}}function J(t,o){return {content:tt(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:o}}function tt(t,o,e=false){return isValidElement(t)&&!N(t.type)?cloneElement(t,{closeToast:o.closeToast,toastProps:o,data:o.data,isPaused:e}):P(t)?t({closeToast:o.closeToast,toastProps:o,data:o.data,isPaused:e}):t}function yt({closeToast:t,theme:o,ariaLabel:e="close"}){return React__default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${o}`,type:"button",onClick:r=>{r.stopPropagation(),t(true);},"aria-label":e},React__default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},React__default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function gt({delay:t,isRunning:o,closeToast:e,type:r="default",hide:s,className:l,controlledProgress:a,progress:d,rtl:c,isIn:T,theme:g}){let v=s||a&&d===0,x={animationDuration:`${t}ms`,animationPlayState:o?"running":"paused"};a&&(x.transform=`scaleX(${d})`);let C=clsx("Toastify__progress-bar",a?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${r}`,{["Toastify__progress-bar--rtl"]:c}),S=P(l)?l({rtl:c,type:r,defaultClassName:C}):clsx(C,l),E={[a&&d>=1?"onTransitionEnd":"onAnimationEnd"]:a&&d<1?null:()=>{T&&e();}};return React__default.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},React__default.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${r}`}),React__default.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:S,style:x,...E}))}var Xt=1,at=()=>`${Xt++}`;function _t(t,o,e){let r=1,s=0,l=[],a=[],d=o,c=new Map,T=new Set,g=i=>(T.add(i),()=>T.delete(i)),v=()=>{a=Array.from(c.values()),T.forEach(i=>i());},x=({containerId:i,toastId:n,updateId:u})=>{let h=i?i!==t:t!==1,m=c.has(n)&&u==null;return h||m},C=(i,n)=>{c.forEach(u=>{var h;(n==null||n===u.props.toastId)&&((h=u.toggle)==null||h.call(u,i));});},S=i=>{var n,u;(u=(n=i.props)==null?void 0:n.onClose)==null||u.call(n,i.removalReason),i.isActive=false;},E=i=>{if(i==null)c.forEach(S);else {let n=c.get(i);n&&S(n);}v();},f=()=>{s-=l.length,l=[];},p=i=>{var m,_;let{toastId:n,updateId:u}=i.props,h=u==null;i.staleId&&c.delete(i.staleId),i.isActive=true,c.set(n,i),v(),e(J(i,h?"added":"updated")),h&&((_=(m=i.props).onOpen)==null||_.call(m));};return {id:t,props:d,observe:g,toggle:C,removeToast:E,toasts:c,clearQueue:f,buildToast:(i,n)=>{if(x(n))return;let{toastId:u,updateId:h,data:m,staleId:_,delay:k}=n,M=h==null;M&&s++;let A={...d,style:d.toastStyle,key:r++,...Object.fromEntries(Object.entries(n).filter(([D,Y])=>Y!=null)),toastId:u,updateId:h,data:m,isIn:false,className:B(n.className||d.toastClassName),progressClassName:B(n.progressClassName||d.progressClassName),autoClose:n.isLoading?false:pt(n.autoClose,d.autoClose),closeToast(D){c.get(u).removalReason=D,E(u);},deleteToast(){let D=c.get(u);if(D!=null){if(e(J(D,"removed")),c.delete(u),s--,s<0&&(s=0),l.length>0){p(l.shift());return}v();}}};A.closeButton=d.closeButton,n.closeButton===false||z(n.closeButton)?A.closeButton=n.closeButton:n.closeButton===true&&(A.closeButton=z(d.closeButton)?d.closeButton:true);let R={content:i,props:A,staleId:_};d.limit&&d.limit>0&&s>d.limit&&M?l.push(R):L(k)?setTimeout(()=>{p(R);},k):p(R);},setProps(i){d=i;},setToggle:(i,n)=>{let u=c.get(i);u&&(u.toggle=n);},isToastActive:i=>{var n;return (n=c.get(i))==null?void 0:n.isActive},getSnapshot:()=>a}}var I=new Map,F=[],st=new Set,Vt=t=>st.forEach(o=>o(t)),bt=()=>I.size>0;function Qt(){F.forEach(t=>nt(t.content,t.options)),F=[];}var vt=(t,{containerId:o})=>{var e;return (e=I.get(o||1))==null?void 0:e.toasts.get(t)};function X(t,o){var r;if(o)return !!((r=I.get(o))!=null&&r.isToastActive(t));let e=false;return I.forEach(s=>{s.isToastActive(t)&&(e=true);}),e}function ht(t){if(!bt()){F=F.filter(o=>t!=null&&o.options.toastId!==t);return}if(t==null||mt(t))I.forEach(o=>{o.removeToast(t);});else if(t&&("containerId"in t||"id"in t)){let o=I.get(t.containerId);o?o.removeToast(t.id):I.forEach(e=>{e.removeToast(t.id);});}}var Ct=(t={})=>{I.forEach(o=>{o.props.limit&&(!t.containerId||o.id===t.containerId)&&o.clearQueue();});};function nt(t,o){z(t)&&(bt()||F.push({content:t,options:o}),I.forEach(e=>{e.buildToast(t,o);}));}function xt(t){var o;(o=I.get(t.containerId||1))==null||o.setToggle(t.id,t.fn);}function rt(t,o){I.forEach(e=>{(o==null||!(o!=null&&o.containerId)||(o==null?void 0:o.containerId)===e.id)&&e.toggle(t,o==null?void 0:o.id);});}function Et(t){let o=t.containerId||1;return {subscribe(e){let r=_t(o,t,Vt);I.set(o,r);let s=r.observe(e);return Qt(),()=>{s(),I.delete(o);}},setProps(e){var r;(r=I.get(o))==null||r.setProps(e);},getSnapshot(){var e;return (e=I.get(o))==null?void 0:e.getSnapshot()}}}function Pt(t){return st.add(t),()=>{st.delete(t);}}function Wt(t){return t&&(N(t.toastId)||L(t.toastId))?t.toastId:at()}function U(t,o){return nt(t,o),o.toastId}function V(t,o){return {...o,type:o&&o.type||t,toastId:Wt(o)}}function Q(t){return (o,e)=>U(o,V(t,e))}function y(t,o){return U(t,V("default",o))}y.loading=(t,o)=>U(t,V("default",{isLoading:true,autoClose:false,closeOnClick:false,closeButton:false,draggable:false,...o}));function Gt(t,{pending:o,error:e,success:r},s){let l;o&&(l=N(o)?y.loading(o,s):y.loading(o.render,{...s,...o}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(T,g,v)=>{if(g==null){y.dismiss(l);return}let x={type:T,...a,...s,data:v},C=N(g)?{render:g}:g;return l?y.update(l,{...x,...C}):y(C.render,{...x,...C}),v},c=P(t)?t():t;return c.then(T=>d("success",r,T)).catch(T=>d("error",e,T)),c}y.promise=Gt;y.success=Q("success");y.info=Q("info");y.error=Q("error");y.warning=Q("warning");y.warn=y.warning;y.dark=(t,o)=>U(t,V("default",{theme:"dark",...o}));function qt(t){ht(t);}y.dismiss=qt;y.clearWaitingQueue=Ct;y.isActive=X;y.update=(t,o={})=>{let e=vt(t,o);if(e){let{props:r,content:s}=e,l={delay:100,...r,...o,toastId:o.toastId||t,updateId:at()};l.toastId!==t&&(l.staleId=t);let a=l.render||s;delete l.render,U(a,l);}};y.done=t=>{y.update(t,{progress:1});};y.onChange=Pt;y.play=t=>rt(true,t);y.pause=t=>rt(false,t);function It(t){var a;let{subscribe:o,getSnapshot:e,setProps:r}=useRef(Et(t)).current;r(t);let s=(a=useSyncExternalStore(o,e,e))==null?void 0:a.slice();function l(d){if(!s)return [];let c=new Map;return t.newestOnTop&&s.reverse(),s.forEach(T=>{let{position:g}=T.props;c.has(g)||c.set(g,[]),c.get(g).push(T);}),Array.from(c,T=>d(T[0],T[1]))}return {getToastToRender:l,isToastActive:X,count:s==null?void 0:s.length}}function At(t){let[o,e]=useState(false),[r,s]=useState(false),l=useRef(null),a=useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:true,canDrag:false,didMove:false}).current,{autoClose:d,pauseOnHover:c,closeToast:T,onClick:g,closeOnClick:v}=t;xt({id:t.toastId,containerId:t.containerId,fn:e}),useEffect(()=>{if(t.pauseOnFocusLoss)return x(),()=>{C();}},[t.pauseOnFocusLoss]);function x(){document.hasFocus()||p(),window.addEventListener("focus",f),window.addEventListener("blur",p);}function C(){window.removeEventListener("focus",f),window.removeEventListener("blur",p);}function S(m){if(t.draggable===true||t.draggable===m.pointerType){b();let _=l.current;a.canCloseOnClick=true,a.canDrag=true,_.style.transition="none",t.draggableDirection==="x"?(a.start=m.clientX,a.removalDistance=_.offsetWidth*(t.draggablePercent/100)):(a.start=m.clientY,a.removalDistance=_.offsetHeight*(t.draggablePercent===80?t.draggablePercent*1.5:t.draggablePercent)/100);}}function E(m){let{top:_,bottom:k,left:M,right:A}=l.current.getBoundingClientRect();m.nativeEvent.type!=="touchend"&&t.pauseOnHover&&m.clientX>=M&&m.clientX<=A&&m.clientY>=_&&m.clientY<=k?p():f();}function f(){e(true);}function p(){e(false);}function b(){a.didMove=false,document.addEventListener("pointermove",n),document.addEventListener("pointerup",u);}function i(){document.removeEventListener("pointermove",n),document.removeEventListener("pointerup",u);}function n(m){let _=l.current;if(a.canDrag&&_){a.didMove=true,o&&p(),t.draggableDirection==="x"?a.delta=m.clientX-a.start:a.delta=m.clientY-a.start,a.start!==m.clientX&&(a.canCloseOnClick=false);let k=t.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`;_.style.transform=`translate3d(${k},0)`,_.style.opacity=`${1-Math.abs(a.delta/a.removalDistance)}`;}}function u(){i();let m=l.current;if(a.canDrag&&a.didMove&&m){if(a.canDrag=false,Math.abs(a.delta)>a.removalDistance){s(true),t.closeToast(true),t.collapseAll();return}m.style.transition="transform 0.2s, opacity 0.2s",m.style.removeProperty("transform"),m.style.removeProperty("opacity");}}let h={onPointerDown:S,onPointerUp:E};return d&&c&&(h.onMouseEnter=p,t.stacked||(h.onMouseLeave=f)),v&&(h.onClick=m=>{g&&g(m),a.canCloseOnClick&&T(true);}),{playToast:f,pauseToast:p,isRunning:o,preventExitTransition:r,toastRef:l,eventHandlers:h}}var Ot=typeof window!="undefined"?useLayoutEffect:useEffect;var G=({theme:t,type:o,isLoading:e,...r})=>React__default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${o})`,...r});function ao(t){return React__default.createElement(G,{...t},React__default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function so(t){return React__default.createElement(G,{...t},React__default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function no(t){return React__default.createElement(G,{...t},React__default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function ro(t){return React__default.createElement(G,{...t},React__default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function io(){return React__default.createElement("div",{className:"Toastify__spinner"})}var W={info:so,warning:ao,success:no,error:ro,spinner:io},lo=t=>t in W;function Nt({theme:t,type:o,isLoading:e,icon:r}){let s=null,l={theme:t,type:o};return r===false||(P(r)?s=r({...l,isLoading:e}):isValidElement(r)?s=cloneElement(r,l):e?s=W.spinner():lo(o)&&(s=W[o](l))),s}var wt=t=>{let{isRunning:o,preventExitTransition:e,toastRef:r,eventHandlers:s,playToast:l}=At(t),{closeButton:a,children:d,autoClose:c,onClick:T,type:g,hideProgressBar:v,closeToast:x,transition:C,position:S,className:E,style:f,progressClassName:p,updateId:b,role:i,progress:n,rtl:u,toastId:h,deleteToast:m,isIn:_,isLoading:k,closeOnClick:M,theme:A,ariaLabel:R}=t,D=clsx("Toastify__toast",`Toastify__toast-theme--${A}`,`Toastify__toast--${g}`,{["Toastify__toast--rtl"]:u},{["Toastify__toast--close-on-click"]:M}),Y=P(E)?E({rtl:u,position:S,type:g,defaultClassName:D}):clsx(D,E),ft=Nt(t),dt=!!n||!c,j={closeToast:x,type:g,theme:A},H=null;return a===false||(P(a)?H=a(j):isValidElement(a)?H=cloneElement(a,j):H=yt(j)),React__default.createElement(C,{isIn:_,done:m,position:S,preventExitTransition:e,nodeRef:r,playToast:l},React__default.createElement("div",{id:h,tabIndex:0,onClick:T,"data-in":_,className:Y,...s,style:f,ref:r,..._&&{role:i,"aria-label":R}},ft!=null&&React__default.createElement("div",{className:clsx("Toastify__toast-icon",{["Toastify--animate-icon Toastify__zoom-enter"]:!k})},ft),tt(d,t,!o),H,!t.customProgressBar&&React__default.createElement(gt,{...b&&!dt?{key:`p-${b}`}:{},rtl:u,theme:A,delay:c,isRunning:o,isIn:_,closeToast:x,hide:v,type:g,className:p,controlledProgress:dt,progress:n||0})))};var K=(t,o=false)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:o}),lt=$(K("bounce",true)),mo=$(K("slide",true));var _o={position:"top-right",transition:lt,autoClose:5e3,closeButton:true,pauseOnHover:true,pauseOnFocusLoss:true,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&t.code==="KeyT"};function Lt(t){let o={..._o,...t},e=t.stacked,[r,s]=useState(true),l=useRef(null),{getToastToRender:a,isToastActive:d,count:c}=It(o),{className:T,style:g,rtl:v,containerId:x,hotKeys:C}=o;function S(f){let p=clsx("Toastify__toast-container",`Toastify__toast-container--${f}`,{["Toastify__toast-container--rtl"]:v});return P(T)?T({position:f,rtl:v,defaultClassName:p}):clsx(p,B(T))}function E(){e&&(s(true),y.play());}return Ot(()=>{var f;if(e){let p=l.current.querySelectorAll('[data-in="true"]'),b=12,i=(f=o.position)==null?void 0:f.includes("top"),n=0,u=0;Array.from(p).reverse().forEach((h,m)=>{let _=h;_.classList.add("Toastify__toast--stacked"),m>0&&(_.dataset.collapsed=`${r}`),_.dataset.pos||(_.dataset.pos=i?"top":"bot");let k=n*(r?.2:1)+(r?0:b*m);_.style.setProperty("--y",`${i?k:k*-1}px`),_.style.setProperty("--g",`${b}`),_.style.setProperty("--s",`${1-(r?u:0)}`),n+=_.offsetHeight,u+=.025;});}},[r,c,e]),useEffect(()=>{function f(p){var i;let b=l.current;C(p)&&((i=b.querySelector('[tabIndex="0"]'))==null||i.focus(),s(false),y.pause()),p.key==="Escape"&&(document.activeElement===b||b!=null&&b.contains(document.activeElement))&&(s(true),y.play());}return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f);}},[C]),React__default.createElement("section",{ref:l,className:"Toastify",id:x,onMouseEnter:()=>{e&&(s(false),y.pause());},onMouseLeave:E,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":o["aria-label"]},a((f,p)=>{let b=p.length?{...g}:{...g,pointerEvents:"none"};return React__default.createElement("div",{tabIndex:-1,className:S(f),"data-stacked":e,style:b,key:`c-${f}`},p.map(({content:i,props:n})=>React__default.createElement(wt,{...n,stacked:e,collapseAll:E,isIn:d(n.toastId,n.containerId),key:`t-${n.key}`},i)))}))}
|
|
75067
|
+
|
|
75068
|
+
function ToastProvider({ children }) {
|
|
75069
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75070
|
+
children,
|
|
75071
|
+
/* @__PURE__ */ jsx(
|
|
75072
|
+
Lt,
|
|
75073
|
+
{
|
|
75074
|
+
position: "bottom-right",
|
|
75075
|
+
autoClose: 3500,
|
|
75076
|
+
newestOnTop: false,
|
|
75077
|
+
closeOnClick: true,
|
|
75078
|
+
rtl: false,
|
|
75079
|
+
pauseOnFocusLoss: false,
|
|
75080
|
+
draggable: true,
|
|
75081
|
+
pauseOnHover: true,
|
|
75082
|
+
transition: mo,
|
|
75083
|
+
limit: 4,
|
|
75084
|
+
closeButton: true,
|
|
75085
|
+
bodyClassName: "ui-toast__body",
|
|
75086
|
+
toastClassName: "ui-toast__toast",
|
|
75087
|
+
containerId: "ui-toast"
|
|
75088
|
+
}
|
|
75089
|
+
),
|
|
75090
|
+
/* @__PURE__ */ jsx("div", { id: "ui-toast-backdrop", "aria-hidden": "true" })
|
|
75091
|
+
] });
|
|
75092
|
+
}
|
|
75093
|
+
|
|
75094
|
+
const defaults = {
|
|
75095
|
+
containerId: "ui-toast",
|
|
75096
|
+
position: "bottom-right",
|
|
75097
|
+
autoClose: 3500,
|
|
75098
|
+
hideProgressBar: true,
|
|
75099
|
+
pauseOnFocusLoss: false,
|
|
75100
|
+
closeOnClick: true
|
|
75101
|
+
};
|
|
75102
|
+
let backdropCount = 0;
|
|
75103
|
+
const addBackdrop = () => {
|
|
75104
|
+
if (typeof document === "undefined") return;
|
|
75105
|
+
backdropCount += 1;
|
|
75106
|
+
document.body.classList.add("toast-backdrop");
|
|
75107
|
+
};
|
|
75108
|
+
const removeBackdrop = () => {
|
|
75109
|
+
if (typeof document === "undefined") return;
|
|
75110
|
+
backdropCount = Math.max(0, backdropCount - 1);
|
|
75111
|
+
if (backdropCount === 0) document.body.classList.remove("toast-backdrop");
|
|
75112
|
+
};
|
|
75113
|
+
const notify = {
|
|
75114
|
+
success: (msg, opts) => y.success(msg, { ...defaults, ...opts }),
|
|
75115
|
+
info: (msg, opts) => y.info(msg, { ...defaults, ...opts }),
|
|
75116
|
+
warn: (msg, opts) => y.warn(msg, { ...defaults, ...opts }),
|
|
75117
|
+
// Error: no autoClose + modal-like behavior via backdrop
|
|
75118
|
+
error: (msg, opts) => y.error(msg, {
|
|
75119
|
+
...defaults,
|
|
75120
|
+
autoClose: false,
|
|
75121
|
+
closeOnClick: false,
|
|
75122
|
+
draggable: false,
|
|
75123
|
+
onOpen: addBackdrop,
|
|
75124
|
+
onClose: removeBackdrop,
|
|
75125
|
+
...opts
|
|
75126
|
+
}),
|
|
75127
|
+
// Promise helper (error branch inherits the modal behavior)
|
|
75128
|
+
promise: (p, messages, opts) => y.promise(
|
|
75129
|
+
p,
|
|
75130
|
+
{
|
|
75131
|
+
pending: messages?.pending,
|
|
75132
|
+
success: messages?.success,
|
|
75133
|
+
error: {
|
|
75134
|
+
render: () => messages?.error || "Something went wrong.",
|
|
75135
|
+
autoClose: false,
|
|
75136
|
+
closeOnClick: false,
|
|
75137
|
+
draggable: false,
|
|
75138
|
+
onOpen: addBackdrop,
|
|
75139
|
+
onClose: removeBackdrop
|
|
75140
|
+
}
|
|
75141
|
+
},
|
|
75142
|
+
{ ...defaults, ...opts }
|
|
75143
|
+
)
|
|
75144
|
+
};
|
|
74946
75145
|
|
|
74947
|
-
export { AddUserGroupsRolesModal, Avatar, AvatarGroup, Badge, Breadcrumbs, Button$1 as Button, Checkbox, CustomDialog, DatePicker, DateRangePicker$1 as DateRangePicker, FileUploadModal, FullScreenLoader, GenericFilter, Input, Modal, MultiSelect, OptionsMenu, PageHeader, PageLayout, Pagination, RadioGroup, SearchBar, Select, Sidebar, Spinner, Textarea, ToggleSwitch, Tooltip, TreeView, UnifyedCoreButton, WizardModal, adGroupsListSearchApi, axiosDelete, axiosGet, axiosPatch, axiosPost, axiosPut, cookies$1 as cookies, createHttpClient, directoryPermissionsApi, filePermissionsApi, gateWayUrl, gatewayBase, getBaseUrl, getSnapshot, http, localStore, myDriveGatewayBaseV2, provisioningBase, rbacBase, searchRolesApi, sessionStore, userSearchBase };
|
|
75146
|
+
export { AddUserGroupsRolesModal, Avatar, AvatarGroup, Badge, Breadcrumbs, Button$1 as Button, Checkbox, CustomCKEditor, CustomDialog, DatePicker, DateRangePicker$1 as DateRangePicker, FileUploadModal, FullScreenLoader, GenericFilter, Input, Modal, MultiSelect, OptionsMenu, PageHeader, PageLayout, Pagination, RadioGroup, SearchBar, Select, Sidebar, Spinner, Textarea, ToastProvider, ToggleSwitch, Tooltip, TreeView, UnifyedCoreButton, WizardModal, adGroupsListSearchApi, axiosDelete, axiosGet, axiosPatch, axiosPost, axiosPut, cookies$1 as cookies, createHttpClient, directoryPermissionsApi, filePermissionsApi, gateWayUrl, gatewayBase, getBaseUrl, getSnapshot, http, localStore, myDriveGatewayBaseV2, notify, provisioningBase, rbacBase, searchRolesApi, sessionStore, userSearchBase };
|
|
74948
75147
|
//# sourceMappingURL=unifyedx-storybook-new.es.js.map
|