stone-kit 0.0.877 → 0.0.879
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/App.js +1 -1
- package/dist/{src/pages/ButtonsPage/ButtonState/ButtonState.module.scss.js → ButtonState.module-DtW3aevR.js} +1 -4
- package/dist/FilterWithSave-Bp6rH8Pe.js +2230 -0
- package/dist/Menu-CgCfinVZ.js +513 -0
- package/dist/Option-BVIm7wOW.js +83 -0
- package/dist/{src/components/NewIcon/assets/PinTrans.svg.js → PinTrans-D6OZq76b.js} +4 -4
- package/dist/Router.js +9 -9
- package/dist/{src/components/NewIcon/assets/SmallFilter.svg.js → SmallFilter-C-VKnbkP.js} +3 -3
- package/dist/components/Button/ui/Button.js +73 -44
- package/dist/components/CheckBox/CheckBox.js +46 -35
- package/dist/components/CheckBoxNew/CheckBoxNew.js +23 -19
- package/dist/components/CheckboxSelect/ui/CheckboxSelect.js +31 -24
- package/dist/components/DestinationTab/ui/DestinationTab.js +48 -35
- package/dist/components/FieldInput/ui/FieldInput.js +10 -7
- package/dist/components/FilterWithSave/hooks/useFilterWithSave.js +5 -61
- package/dist/components/FilterWithSave/ui/FilterWithSave.js +7 -266
- package/dist/components/Flex/ui/Flex.js +61 -26
- package/dist/components/FormModal/ui/ModalForm.js +14 -289
- package/dist/components/GroupedInput/ui/GroupedInputs.js +6 -5
- package/dist/components/Input/ui/Input.js +3307 -74
- package/dist/components/Logo/ui/Logo.js +31 -19
- package/dist/components/Logo/ui/Logo.types.js +10 -18
- package/dist/components/LotCard/hooks/useLotCard.js +11 -125
- package/dist/components/LotCard/index.js +2 -2
- package/dist/components/LotCard/ui/LotCard.js +9 -150
- package/dist/components/LotCardSkeleton/ui/LotCardSkeleton.js +58 -31
- package/dist/components/MetroLabel/ui/MetroLabel.js +24 -19
- package/dist/components/MetroTag/ui/MetroTag.js +72 -59
- package/dist/components/Modal/ui/Modal.js +38 -33
- package/dist/components/ModalSuccess/ModalSuccess.js +35 -26
- package/dist/components/NewIcon/icons/PinTrans.js +3 -3
- package/dist/components/NewIcon/icons/SmallFilter.js +1 -1
- package/dist/components/NewIcon/ui/NewIcon.js +301 -141
- package/dist/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.js +15 -5
- package/dist/components/RoundButton/ui/RoundButton.js +60 -42
- package/dist/components/Select/ui/Category.js +29 -30
- package/dist/components/Select/ui/Option.js +5 -52
- package/dist/components/Select/ui/Select.js +23 -24
- package/dist/components/SliderNavigation/ui/SliderNavigation.js +28 -27
- package/dist/components/SortSelect/hooks/useSortSelect.js +4 -59
- package/dist/components/SortSelect/index.js +1 -1
- package/dist/components/SortSelect/ui/SortSelect.js +9 -114
- package/dist/components/SummarySelect/ui/SummarySelect.js +69 -59
- package/dist/components/Switcher/ui/Switcher.js +24 -13
- package/dist/components/TabSelect/ui/TabSelect.js +34 -28
- package/dist/components/TabSwitcher/index.js +2 -2
- package/dist/components/TabSwitcher/ui/TabSwitcher.js +7 -84
- package/dist/components/Tag/ui/Tag.js +67 -19
- package/dist/components/Text/ui/Text.js +13 -12
- package/dist/components/TextArea/TextArea.js +14 -11
- package/dist/components/ZoomControls/ui/ZoomControls.js +11 -8
- package/dist/components/mobileButton/ui/MobileButton.js +39 -34
- package/dist/index-DmANy9jd.js +890 -0
- package/dist/{node_modules/classnames/index.js → index-rKuIKazb.js} +15 -12
- package/dist/layout/Layout.js +8 -7
- package/dist/layout/components/Header/Header.js +44 -41
- package/dist/layout/components/Menu.js +6 -111
- package/dist/main.js +42 -46
- package/dist/pages/ButtonsPage/ButtonState/ButtonState.js +1 -1
- package/dist/pages/ButtonsPage/Buttons.js +62 -54
- package/dist/pages/CheckboxPage/CheckboxPage.js +51 -47
- package/dist/pages/FormsPage/FormsPage.js +32 -31
- package/dist/pages/HomePage/HomePage.js +4 -3
- package/dist/pages/IconsPage/IconsPage.js +10 -12
- package/dist/pages/InputPage/InputPage.js +12 -17
- package/dist/pages/LogoPage/LogoPage.js +14 -17
- package/dist/pages/LotsPage/LotsPage.js +15 -15
- package/dist/pages/ModalsPage/ModalPage.js +14 -19
- package/dist/pages/SelectPage/SelectPage.js +41 -42
- package/dist/pages/TabsPage/TabsPage.js +51 -49
- package/dist/pages/TagsPage/TagsPage.js +7 -10
- package/dist/stories/Button.js +4 -5
- package/dist/stories/Header.js +3 -4
- package/dist/stories/Page.js +2 -3
- package/dist/style.css +1 -1
- package/dist/useSortSelect-CjZXLFOG.js +80 -0
- package/package.json +4 -3
- package/dist/_virtual/_commonjsHelpers.js +0 -6
- package/dist/_virtual/bind.js +0 -4
- package/dist/_virtual/index.js +0 -4
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/index3.js +0 -4
- package/dist/_virtual/react-is.development.js +0 -4
- package/dist/_virtual/react-is.production.min.js +0 -4
- package/dist/node_modules/@remix-run/router/dist/router.js +0 -431
- package/dist/node_modules/classnames/bind.js +0 -42
- package/dist/node_modules/imask/esm/controls/html-contenteditable-mask-element.js +0 -35
- package/dist/node_modules/imask/esm/controls/html-input-mask-element.js +0 -31
- package/dist/node_modules/imask/esm/controls/html-mask-element.js +0 -48
- package/dist/node_modules/imask/esm/controls/input-history.js +0 -30
- package/dist/node_modules/imask/esm/controls/input.js +0 -224
- package/dist/node_modules/imask/esm/controls/mask-element.js +0 -43
- package/dist/node_modules/imask/esm/core/action-details.js +0 -51
- package/dist/node_modules/imask/esm/core/change-details.js +0 -36
- package/dist/node_modules/imask/esm/core/continuous-tail-details.js +0 -44
- package/dist/node_modules/imask/esm/core/holder.js +0 -6
- package/dist/node_modules/imask/esm/core/utils.js +0 -80
- package/dist/node_modules/imask/esm/index.js +0 -50
- package/dist/node_modules/imask/esm/masked/base.js +0 -257
- package/dist/node_modules/imask/esm/masked/date.js +0 -118
- package/dist/node_modules/imask/esm/masked/dynamic.js +0 -224
- package/dist/node_modules/imask/esm/masked/enum.js +0 -70
- package/dist/node_modules/imask/esm/masked/factory.js +0 -51
- package/dist/node_modules/imask/esm/masked/function.js +0 -23
- package/dist/node_modules/imask/esm/masked/number.js +0 -215
- package/dist/node_modules/imask/esm/masked/pattern/chunk-tail-details.js +0 -110
- package/dist/node_modules/imask/esm/masked/pattern/cursor.js +0 -102
- package/dist/node_modules/imask/esm/masked/pattern/fixed-definition.js +0 -103
- package/dist/node_modules/imask/esm/masked/pattern/input-definition.js +0 -134
- package/dist/node_modules/imask/esm/masked/pattern.js +0 -339
- package/dist/node_modules/imask/esm/masked/pipe.js +0 -23
- package/dist/node_modules/imask/esm/masked/range.js +0 -82
- package/dist/node_modules/imask/esm/masked/regexp.js +0 -21
- package/dist/node_modules/imask/esm/masked/repeat.js +0 -106
- package/dist/node_modules/object-assign/index.js +0 -55
- package/dist/node_modules/prop-types/checkPropTypes.js +0 -55
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -53
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -330
- package/dist/node_modules/prop-types/index.js +0 -15
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -11
- package/dist/node_modules/prop-types/lib/has.js +0 -7
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -95
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -79
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +0 -10
- package/dist/node_modules/react-hook-form/dist/index.esm.js +0 -1062
- package/dist/node_modules/react-imask/esm/input.js +0 -25
- package/dist/node_modules/react-imask/esm/mixin.js +0 -131
- package/dist/node_modules/react-router/dist/index.js +0 -486
- package/dist/node_modules/react-router-dom/dist/index.js +0 -424
- package/dist/src/components/Button/ui/Button.module.scss.js +0 -49
- package/dist/src/components/CheckBox/s.module.scss.js +0 -24
- package/dist/src/components/CheckBoxNew/s.module.scss.js +0 -13
- package/dist/src/components/CheckboxSelect/ui/s.module.scss.js +0 -19
- package/dist/src/components/DestinationTab/ui/DestinationTab.module.scss.js +0 -23
- package/dist/src/components/FieldInput/ui/FieldInput.module.scss.js +0 -11
- package/dist/src/components/FilterWithSave/ui/s.module.scss.js +0 -39
- package/dist/src/components/Flex/ui/Flex.module.scss.js +0 -41
- package/dist/src/components/FormModal/ui/ModalForm.module.scss.js +0 -31
- package/dist/src/components/GroupedInput/ui/GroupedInputs.module.scss.js +0 -7
- package/dist/src/components/Input/ui/Input.module.scss.js +0 -43
- package/dist/src/components/Logo/assets/LogoBlack.svg.js +0 -4
- package/dist/src/components/Logo/assets/LogoDom.svg.js +0 -4
- package/dist/src/components/Logo/assets/LogoNewDom.svg.js +0 -4
- package/dist/src/components/Logo/assets/LogoNewOffice.svg.js +0 -4
- package/dist/src/components/Logo/assets/LogoOffice.svg.js +0 -4
- package/dist/src/components/Logo/assets/LogoRealty.svg.js +0 -4
- package/dist/src/components/Logo/assets/LogoValue.svg.js +0 -4
- package/dist/src/components/Logo/assets/LogoWhite.svg.js +0 -4
- package/dist/src/components/Logo/ui/Logo.module.scss.js +0 -29
- package/dist/src/components/LotCard/assets/testLot.webp.js +0 -4
- package/dist/src/components/LotCard/ui/LotCard.module.scss.js +0 -71
- package/dist/src/components/LotCardSkeleton/ui/LotCardSkeleton.module.scss.js +0 -59
- package/dist/src/components/MetroLabel/ui/MetroLabel.module.scss.js +0 -15
- package/dist/src/components/MetroTag/ui/MetroTag.module.scss.js +0 -31
- package/dist/src/components/Modal/ui/Modal.module.scss.js +0 -15
- package/dist/src/components/ModalSuccess/styles.module.scss.js +0 -23
- package/dist/src/components/NewIcon/assets/ArrowLong.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/ArrowShort.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Auto.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Building.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Burger.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/BurgerClose.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Call.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Callback.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Case.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Check.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Circle.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Close.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/DirectionDown.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Download.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Filter.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Food.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Fullscreen.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Heart.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Layers.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/LayersFilled.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Loader.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Lock.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Metro.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Minus.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/MinusCheck.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Moon.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Park.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Pedestrian.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Phone.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/PhoneFilled.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Pin.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Play.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Play2.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Plus.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Redo.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Ruble.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Search.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/SelectChecked.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/SelectUnchecked.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Share.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Sport.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/SquareMeter.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Star.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/StarFilled.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Sun.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Telegram.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/Timer.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/TwoArrows.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/User.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/WhatsApp.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/WithoutDecor.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/arrowRight.svg.js +0 -10
- package/dist/src/components/NewIcon/assets/mail.svg.js +0 -10
- package/dist/src/components/NewIcon/ui/NewIcon.module.scss.js +0 -4
- package/dist/src/components/ProjectCardSkeleton/ui/ProjectCardSkeleton.module.scss.js +0 -25
- package/dist/src/components/RoundButton/ui/RoundButton.module.scss.js +0 -29
- package/dist/src/components/Select/ui/Select.module.scss.js +0 -52
- package/dist/src/components/SliderNavigation/ui/SliderNavigation.module.scss.js +0 -7
- package/dist/src/components/SortSelect/ui/SortSelect.module.scss.js +0 -41
- package/dist/src/components/SummarySelect/ui/SummarySelect.module.scss.js +0 -25
- package/dist/src/components/Switcher/ui/Switcher.module.scss.js +0 -27
- package/dist/src/components/TabSelect/ui/TabSelect.module.scss.js +0 -17
- package/dist/src/components/TabSwitcher/ui/TabSwitcher.module.scss.js +0 -57
- package/dist/src/components/Tag/ui/Tag.module.scss.js +0 -70
- package/dist/src/components/Text/ui/Text.module.scss.js +0 -7
- package/dist/src/components/TextArea/styles.module.scss.js +0 -9
- package/dist/src/components/ZoomControls/ui/ZoomControls.module.scss.js +0 -11
- package/dist/src/components/mobileButton/ui/MobileButton.module.scss.js +0 -12
- package/dist/src/layout/components/Header/s.module.scss.js +0 -19
- package/dist/src/layout/components/Menu.module.scss.js +0 -9
- package/dist/src/layout/style.module.scss.js +0 -7
- package/dist/src/pages/ButtonsPage/ButtonState/ButtonState.js +0 -18
- package/dist/src/pages/ButtonsPage/ButtonsPage.module.scss.js +0 -9
- package/dist/src/pages/CheckboxPage/CheckboxPage.module.scss.js +0 -13
- package/dist/src/pages/FormsPage/FormsPage.module.scss.js +0 -15
- package/dist/src/pages/HomePage/HomePage.module.scss.js +0 -7
- package/dist/src/pages/IconsPage/IconsPage.module.scss.js +0 -9
- package/dist/src/pages/InputPage/InputPage.module.scss.js +0 -4
- package/dist/src/pages/LogoPage/LogoPage.module.scss.js +0 -7
- package/dist/src/pages/LotsPage/LotsPage.module.scss.js +0 -13
- package/dist/src/pages/ModalsPage/ModalPage.module.scss.js +0 -4
- package/dist/src/pages/SelectPage/SelectPage.module.scss.js +0 -11
- package/dist/src/pages/TabsPage/TabsPage.module.scss.js +0 -17
- package/dist/src/pages/TagsPage/TagsPage.module.scss.js +0 -7
- package/dist/src/stories/button.css.js +0 -1
- package/dist/src/stories/header.css.js +0 -1
- package/dist/src/stories/page.css.js +0 -1
|
@@ -0,0 +1,890 @@
|
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @remix-run/router v1.19.0
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Remix Software Inc.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
9
|
+
*
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/
|
|
12
|
+
function D() {
|
|
13
|
+
return D = Object.assign ? Object.assign.bind() : function(e) {
|
|
14
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
15
|
+
var n = arguments[t];
|
|
16
|
+
for (var r in n)
|
|
17
|
+
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
18
|
+
}
|
|
19
|
+
return e;
|
|
20
|
+
}, D.apply(this, arguments);
|
|
21
|
+
}
|
|
22
|
+
var R;
|
|
23
|
+
(function(e) {
|
|
24
|
+
e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
|
|
25
|
+
})(R || (R = {}));
|
|
26
|
+
const z = "popstate";
|
|
27
|
+
function Ye(e) {
|
|
28
|
+
e === void 0 && (e = {});
|
|
29
|
+
function t(r, a) {
|
|
30
|
+
let {
|
|
31
|
+
pathname: o,
|
|
32
|
+
search: l,
|
|
33
|
+
hash: u
|
|
34
|
+
} = r.location;
|
|
35
|
+
return W(
|
|
36
|
+
"",
|
|
37
|
+
{
|
|
38
|
+
pathname: o,
|
|
39
|
+
search: l,
|
|
40
|
+
hash: u
|
|
41
|
+
},
|
|
42
|
+
// state defaults to `null` because `window.history.state` does
|
|
43
|
+
a.state && a.state.usr || null,
|
|
44
|
+
a.state && a.state.key || "default"
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function n(r, a) {
|
|
48
|
+
return typeof a == "string" ? a : G(a);
|
|
49
|
+
}
|
|
50
|
+
return se(t, n, null, e);
|
|
51
|
+
}
|
|
52
|
+
function f(e, t) {
|
|
53
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
54
|
+
throw new Error(t);
|
|
55
|
+
}
|
|
56
|
+
function b(e, t) {
|
|
57
|
+
if (!e) {
|
|
58
|
+
typeof console < "u" && console.warn(t);
|
|
59
|
+
try {
|
|
60
|
+
throw new Error(t);
|
|
61
|
+
} catch {
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function ie() {
|
|
66
|
+
return Math.random().toString(36).substr(2, 8);
|
|
67
|
+
}
|
|
68
|
+
function A(e, t) {
|
|
69
|
+
return {
|
|
70
|
+
usr: e.state,
|
|
71
|
+
key: e.key,
|
|
72
|
+
idx: t
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function W(e, t, n, r) {
|
|
76
|
+
return n === void 0 && (n = null), D({
|
|
77
|
+
pathname: typeof e == "string" ? e : e.pathname,
|
|
78
|
+
search: "",
|
|
79
|
+
hash: ""
|
|
80
|
+
}, typeof t == "string" ? O(t) : t, {
|
|
81
|
+
state: n,
|
|
82
|
+
// TODO: This could be cleaned up. push/replace should probably just take
|
|
83
|
+
// full Locations now and avoid the need to run through this flow at all
|
|
84
|
+
// But that's a pretty big refactor to the current test suite so going to
|
|
85
|
+
// keep as is for the time being and just let any incoming keys take precedence
|
|
86
|
+
key: t && t.key || r || ie()
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function G(e) {
|
|
90
|
+
let {
|
|
91
|
+
pathname: t = "/",
|
|
92
|
+
search: n = "",
|
|
93
|
+
hash: r = ""
|
|
94
|
+
} = e;
|
|
95
|
+
return n && n !== "?" && (t += n.charAt(0) === "?" ? n : "?" + n), r && r !== "#" && (t += r.charAt(0) === "#" ? r : "#" + r), t;
|
|
96
|
+
}
|
|
97
|
+
function O(e) {
|
|
98
|
+
let t = {};
|
|
99
|
+
if (e) {
|
|
100
|
+
let n = e.indexOf("#");
|
|
101
|
+
n >= 0 && (t.hash = e.substr(n), e = e.substr(0, n));
|
|
102
|
+
let r = e.indexOf("?");
|
|
103
|
+
r >= 0 && (t.search = e.substr(r), e = e.substr(0, r)), e && (t.pathname = e);
|
|
104
|
+
}
|
|
105
|
+
return t;
|
|
106
|
+
}
|
|
107
|
+
function se(e, t, n, r) {
|
|
108
|
+
r === void 0 && (r = {});
|
|
109
|
+
let {
|
|
110
|
+
window: a = document.defaultView,
|
|
111
|
+
v5Compat: o = !1
|
|
112
|
+
} = r, l = a.history, u = R.Pop, i = null, d = h();
|
|
113
|
+
d == null && (d = 0, l.replaceState(D({}, l.state, {
|
|
114
|
+
idx: d
|
|
115
|
+
}), ""));
|
|
116
|
+
function h() {
|
|
117
|
+
return (l.state || {
|
|
118
|
+
idx: null
|
|
119
|
+
}).idx;
|
|
120
|
+
}
|
|
121
|
+
function c() {
|
|
122
|
+
u = R.Pop;
|
|
123
|
+
let p = h(), E = p == null ? null : p - d;
|
|
124
|
+
d = p, i && i({
|
|
125
|
+
action: u,
|
|
126
|
+
location: g.location,
|
|
127
|
+
delta: E
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function m(p, E) {
|
|
131
|
+
u = R.Push;
|
|
132
|
+
let v = W(g.location, p, E);
|
|
133
|
+
d = h() + 1;
|
|
134
|
+
let N = A(v, d), L = g.createHref(v);
|
|
135
|
+
try {
|
|
136
|
+
l.pushState(N, "", L);
|
|
137
|
+
} catch (I) {
|
|
138
|
+
if (I instanceof DOMException && I.name === "DataCloneError")
|
|
139
|
+
throw I;
|
|
140
|
+
a.location.assign(L);
|
|
141
|
+
}
|
|
142
|
+
o && i && i({
|
|
143
|
+
action: u,
|
|
144
|
+
location: g.location,
|
|
145
|
+
delta: 1
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function x(p, E) {
|
|
149
|
+
u = R.Replace;
|
|
150
|
+
let v = W(g.location, p, E);
|
|
151
|
+
d = h();
|
|
152
|
+
let N = A(v, d), L = g.createHref(v);
|
|
153
|
+
l.replaceState(N, "", L), o && i && i({
|
|
154
|
+
action: u,
|
|
155
|
+
location: g.location,
|
|
156
|
+
delta: 0
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function y(p) {
|
|
160
|
+
let E = a.location.origin !== "null" ? a.location.origin : a.location.href, v = typeof p == "string" ? p : G(p);
|
|
161
|
+
return v = v.replace(/ $/, "%20"), f(E, "No window.location.(origin|href) available to create URL for href: " + v), new URL(v, E);
|
|
162
|
+
}
|
|
163
|
+
let g = {
|
|
164
|
+
get action() {
|
|
165
|
+
return u;
|
|
166
|
+
},
|
|
167
|
+
get location() {
|
|
168
|
+
return e(a, l);
|
|
169
|
+
},
|
|
170
|
+
listen(p) {
|
|
171
|
+
if (i)
|
|
172
|
+
throw new Error("A history only accepts one active listener");
|
|
173
|
+
return a.addEventListener(z, c), i = p, () => {
|
|
174
|
+
a.removeEventListener(z, c), i = null;
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
createHref(p) {
|
|
178
|
+
return t(a, p);
|
|
179
|
+
},
|
|
180
|
+
createURL: y,
|
|
181
|
+
encodeLocation(p) {
|
|
182
|
+
let E = y(p);
|
|
183
|
+
return {
|
|
184
|
+
pathname: E.pathname,
|
|
185
|
+
search: E.search,
|
|
186
|
+
hash: E.hash
|
|
187
|
+
};
|
|
188
|
+
},
|
|
189
|
+
push: m,
|
|
190
|
+
replace: x,
|
|
191
|
+
go(p) {
|
|
192
|
+
return l.go(p);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
return g;
|
|
196
|
+
}
|
|
197
|
+
var J;
|
|
198
|
+
(function(e) {
|
|
199
|
+
e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
|
|
200
|
+
})(J || (J = {}));
|
|
201
|
+
function ue(e, t, n) {
|
|
202
|
+
return n === void 0 && (n = "/"), ce(e, t, n, !1);
|
|
203
|
+
}
|
|
204
|
+
function ce(e, t, n, r) {
|
|
205
|
+
let a = typeof t == "string" ? O(t) : t, o = Q(a.pathname || "/", n);
|
|
206
|
+
if (o == null)
|
|
207
|
+
return null;
|
|
208
|
+
let l = K(e);
|
|
209
|
+
de(l);
|
|
210
|
+
let u = null;
|
|
211
|
+
for (let i = 0; u == null && i < l.length; ++i) {
|
|
212
|
+
let d = Re(o);
|
|
213
|
+
u = xe(l[i], d, r);
|
|
214
|
+
}
|
|
215
|
+
return u;
|
|
216
|
+
}
|
|
217
|
+
function K(e, t, n, r) {
|
|
218
|
+
t === void 0 && (t = []), n === void 0 && (n = []), r === void 0 && (r = "");
|
|
219
|
+
let a = (o, l, u) => {
|
|
220
|
+
let i = {
|
|
221
|
+
relativePath: u === void 0 ? o.path || "" : u,
|
|
222
|
+
caseSensitive: o.caseSensitive === !0,
|
|
223
|
+
childrenIndex: l,
|
|
224
|
+
route: o
|
|
225
|
+
};
|
|
226
|
+
i.relativePath.startsWith("/") && (f(i.relativePath.startsWith(r), 'Absolute route path "' + i.relativePath + '" nested under path ' + ('"' + r + '" is not valid. An absolute child route path ') + "must start with the combined path of all its parent routes."), i.relativePath = i.relativePath.slice(r.length));
|
|
227
|
+
let d = C([r, i.relativePath]), h = n.concat(i);
|
|
228
|
+
o.children && o.children.length > 0 && (f(
|
|
229
|
+
// Our types know better, but runtime JS may not!
|
|
230
|
+
// @ts-expect-error
|
|
231
|
+
o.index !== !0,
|
|
232
|
+
"Index routes must not have child routes. Please remove " + ('all child routes from route path "' + d + '".')
|
|
233
|
+
), K(o.children, t, h, d)), !(o.path == null && !o.index) && t.push({
|
|
234
|
+
path: d,
|
|
235
|
+
score: Ee(d, o.index),
|
|
236
|
+
routesMeta: h
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
return e.forEach((o, l) => {
|
|
240
|
+
var u;
|
|
241
|
+
if (o.path === "" || !((u = o.path) != null && u.includes("?")))
|
|
242
|
+
a(o, l);
|
|
243
|
+
else
|
|
244
|
+
for (let i of X(o.path))
|
|
245
|
+
a(o, l, i);
|
|
246
|
+
}), t;
|
|
247
|
+
}
|
|
248
|
+
function X(e) {
|
|
249
|
+
let t = e.split("/");
|
|
250
|
+
if (t.length === 0)
|
|
251
|
+
return [];
|
|
252
|
+
let [n, ...r] = t, a = n.endsWith("?"), o = n.replace(/\?$/, "");
|
|
253
|
+
if (r.length === 0)
|
|
254
|
+
return a ? [o, ""] : [o];
|
|
255
|
+
let l = X(r.join("/")), u = [];
|
|
256
|
+
return u.push(...l.map((i) => i === "" ? o : [o, i].join("/"))), a && u.push(...l), u.map((i) => e.startsWith("/") && i === "" ? "/" : i);
|
|
257
|
+
}
|
|
258
|
+
function de(e) {
|
|
259
|
+
e.sort((t, n) => t.score !== n.score ? n.score - t.score : ye(t.routesMeta.map((r) => r.childrenIndex), n.routesMeta.map((r) => r.childrenIndex)));
|
|
260
|
+
}
|
|
261
|
+
const he = /^:[\w-]+$/, pe = 3, fe = 2, me = 1, ve = 10, ge = -2, H = (e) => e === "*";
|
|
262
|
+
function Ee(e, t) {
|
|
263
|
+
let n = e.split("/"), r = n.length;
|
|
264
|
+
return n.some(H) && (r += ge), t && (r += fe), n.filter((a) => !H(a)).reduce((a, o) => a + (he.test(o) ? pe : o === "" ? me : ve), r);
|
|
265
|
+
}
|
|
266
|
+
function ye(e, t) {
|
|
267
|
+
return e.length === t.length && e.slice(0, -1).every((r, a) => r === t[a]) ? (
|
|
268
|
+
// If two routes are siblings, we should try to match the earlier sibling
|
|
269
|
+
// first. This allows people to have fine-grained control over the matching
|
|
270
|
+
// behavior by simply putting routes with identical paths in the order they
|
|
271
|
+
// want them tried.
|
|
272
|
+
e[e.length - 1] - t[t.length - 1]
|
|
273
|
+
) : (
|
|
274
|
+
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
275
|
+
// so they sort equally.
|
|
276
|
+
0
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
function xe(e, t, n) {
|
|
280
|
+
let {
|
|
281
|
+
routesMeta: r
|
|
282
|
+
} = e, a = {}, o = "/", l = [];
|
|
283
|
+
for (let u = 0; u < r.length; ++u) {
|
|
284
|
+
let i = r[u], d = u === r.length - 1, h = o === "/" ? t : t.slice(o.length) || "/", c = Y({
|
|
285
|
+
path: i.relativePath,
|
|
286
|
+
caseSensitive: i.caseSensitive,
|
|
287
|
+
end: d
|
|
288
|
+
}, h), m = i.route;
|
|
289
|
+
if (!c && d && n && !r[r.length - 1].route.index && (c = Y({
|
|
290
|
+
path: i.relativePath,
|
|
291
|
+
caseSensitive: i.caseSensitive,
|
|
292
|
+
end: !1
|
|
293
|
+
}, h)), !c)
|
|
294
|
+
return null;
|
|
295
|
+
Object.assign(a, c.params), l.push({
|
|
296
|
+
// TODO: Can this as be avoided?
|
|
297
|
+
params: a,
|
|
298
|
+
pathname: C([o, c.pathname]),
|
|
299
|
+
pathnameBase: we(C([o, c.pathnameBase])),
|
|
300
|
+
route: m
|
|
301
|
+
}), c.pathnameBase !== "/" && (o = C([o, c.pathnameBase]));
|
|
302
|
+
}
|
|
303
|
+
return l;
|
|
304
|
+
}
|
|
305
|
+
function Y(e, t) {
|
|
306
|
+
typeof e == "string" && (e = {
|
|
307
|
+
path: e,
|
|
308
|
+
caseSensitive: !1,
|
|
309
|
+
end: !0
|
|
310
|
+
});
|
|
311
|
+
let [n, r] = Ne(e.path, e.caseSensitive, e.end), a = t.match(n);
|
|
312
|
+
if (!a)
|
|
313
|
+
return null;
|
|
314
|
+
let o = a[0], l = o.replace(/(.)\/+$/, "$1"), u = a.slice(1);
|
|
315
|
+
return {
|
|
316
|
+
params: r.reduce((d, h, c) => {
|
|
317
|
+
let {
|
|
318
|
+
paramName: m,
|
|
319
|
+
isOptional: x
|
|
320
|
+
} = h;
|
|
321
|
+
if (m === "*") {
|
|
322
|
+
let g = u[c] || "";
|
|
323
|
+
l = o.slice(0, o.length - g.length).replace(/(.)\/+$/, "$1");
|
|
324
|
+
}
|
|
325
|
+
const y = u[c];
|
|
326
|
+
return x && !y ? d[m] = void 0 : d[m] = (y || "").replace(/%2F/g, "/"), d;
|
|
327
|
+
}, {}),
|
|
328
|
+
pathname: o,
|
|
329
|
+
pathnameBase: l,
|
|
330
|
+
pattern: e
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
function Ne(e, t, n) {
|
|
334
|
+
t === void 0 && (t = !1), n === void 0 && (n = !0), b(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
|
|
335
|
+
let r = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (l, u, i) => (r.push({
|
|
336
|
+
paramName: u,
|
|
337
|
+
isOptional: i != null
|
|
338
|
+
}), i ? "/?([^\\/]+)?" : "/([^\\/]+)"));
|
|
339
|
+
return e.endsWith("*") ? (r.push({
|
|
340
|
+
paramName: "*"
|
|
341
|
+
}), a += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? a += "\\/*$" : e !== "" && e !== "/" && (a += "(?:(?=\\/|$))"), [new RegExp(a, t ? void 0 : "i"), r];
|
|
342
|
+
}
|
|
343
|
+
function Re(e) {
|
|
344
|
+
try {
|
|
345
|
+
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
346
|
+
} catch (t) {
|
|
347
|
+
return b(!1, 'The URL path "' + e + '" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent ' + ("encoding (" + t + ").")), e;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function Q(e, t) {
|
|
351
|
+
if (t === "/")
|
|
352
|
+
return e;
|
|
353
|
+
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
354
|
+
return null;
|
|
355
|
+
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
|
|
356
|
+
return r && r !== "/" ? null : e.slice(n) || "/";
|
|
357
|
+
}
|
|
358
|
+
function Ce(e, t) {
|
|
359
|
+
t === void 0 && (t = "/");
|
|
360
|
+
let {
|
|
361
|
+
pathname: n,
|
|
362
|
+
search: r = "",
|
|
363
|
+
hash: a = ""
|
|
364
|
+
} = typeof e == "string" ? O(e) : e;
|
|
365
|
+
return {
|
|
366
|
+
pathname: n ? n.startsWith("/") ? n : be(n, t) : t,
|
|
367
|
+
search: Oe(r),
|
|
368
|
+
hash: De(a)
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function be(e, t) {
|
|
372
|
+
let n = t.replace(/\/+$/, "").split("/");
|
|
373
|
+
return e.split("/").forEach((a) => {
|
|
374
|
+
a === ".." ? n.length > 1 && n.pop() : a !== "." && n.push(a);
|
|
375
|
+
}), n.length > 1 ? n.join("/") : "/";
|
|
376
|
+
}
|
|
377
|
+
function j(e, t, n, r) {
|
|
378
|
+
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + t + "` field [" + JSON.stringify(r) + "]. Please separate it out to the ") + ("`to." + n + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
|
|
379
|
+
}
|
|
380
|
+
function Pe(e) {
|
|
381
|
+
return e.filter((t, n) => n === 0 || t.route.path && t.route.path.length > 0);
|
|
382
|
+
}
|
|
383
|
+
function Z(e, t) {
|
|
384
|
+
let n = Pe(e);
|
|
385
|
+
return t ? n.map((r, a) => a === n.length - 1 ? r.pathname : r.pathnameBase) : n.map((r) => r.pathnameBase);
|
|
386
|
+
}
|
|
387
|
+
function ee(e, t, n, r) {
|
|
388
|
+
r === void 0 && (r = !1);
|
|
389
|
+
let a;
|
|
390
|
+
typeof e == "string" ? a = O(e) : (a = D({}, e), f(!a.pathname || !a.pathname.includes("?"), j("?", "pathname", "search", a)), f(!a.pathname || !a.pathname.includes("#"), j("#", "pathname", "hash", a)), f(!a.search || !a.search.includes("#"), j("#", "search", "hash", a)));
|
|
391
|
+
let o = e === "" || a.pathname === "", l = o ? "/" : a.pathname, u;
|
|
392
|
+
if (l == null)
|
|
393
|
+
u = n;
|
|
394
|
+
else {
|
|
395
|
+
let c = t.length - 1;
|
|
396
|
+
if (!r && l.startsWith("..")) {
|
|
397
|
+
let m = l.split("/");
|
|
398
|
+
for (; m[0] === ".."; )
|
|
399
|
+
m.shift(), c -= 1;
|
|
400
|
+
a.pathname = m.join("/");
|
|
401
|
+
}
|
|
402
|
+
u = c >= 0 ? t[c] : "/";
|
|
403
|
+
}
|
|
404
|
+
let i = Ce(a, u), d = l && l !== "/" && l.endsWith("/"), h = (o || l === ".") && n.endsWith("/");
|
|
405
|
+
return !i.pathname.endsWith("/") && (d || h) && (i.pathname += "/"), i;
|
|
406
|
+
}
|
|
407
|
+
const C = (e) => e.join("/").replace(/\/\/+/g, "/"), we = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Oe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, De = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
|
|
408
|
+
function _e(e) {
|
|
409
|
+
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
410
|
+
}
|
|
411
|
+
const te = ["post", "put", "patch", "delete"];
|
|
412
|
+
new Set(te);
|
|
413
|
+
const Ve = ["get", ...te];
|
|
414
|
+
new Set(Ve);
|
|
415
|
+
/**
|
|
416
|
+
* React Router v6.26.0
|
|
417
|
+
*
|
|
418
|
+
* Copyright (c) Remix Software Inc.
|
|
419
|
+
*
|
|
420
|
+
* This source code is licensed under the MIT license found in the
|
|
421
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
422
|
+
*
|
|
423
|
+
* @license MIT
|
|
424
|
+
*/
|
|
425
|
+
function _() {
|
|
426
|
+
return _ = Object.assign ? Object.assign.bind() : function(e) {
|
|
427
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
428
|
+
var n = arguments[t];
|
|
429
|
+
for (var r in n)
|
|
430
|
+
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
431
|
+
}
|
|
432
|
+
return e;
|
|
433
|
+
}, _.apply(this, arguments);
|
|
434
|
+
}
|
|
435
|
+
const U = /* @__PURE__ */ s.createContext(null);
|
|
436
|
+
process.env.NODE_ENV !== "production" && (U.displayName = "DataRouter");
|
|
437
|
+
const ne = /* @__PURE__ */ s.createContext(null);
|
|
438
|
+
process.env.NODE_ENV !== "production" && (ne.displayName = "DataRouterState");
|
|
439
|
+
const Be = /* @__PURE__ */ s.createContext(null);
|
|
440
|
+
process.env.NODE_ENV !== "production" && (Be.displayName = "Await");
|
|
441
|
+
const w = /* @__PURE__ */ s.createContext(null);
|
|
442
|
+
process.env.NODE_ENV !== "production" && (w.displayName = "Navigation");
|
|
443
|
+
const B = /* @__PURE__ */ s.createContext(null);
|
|
444
|
+
process.env.NODE_ENV !== "production" && (B.displayName = "Location");
|
|
445
|
+
const P = /* @__PURE__ */ s.createContext({
|
|
446
|
+
outlet: null,
|
|
447
|
+
matches: [],
|
|
448
|
+
isDataRoute: !1
|
|
449
|
+
});
|
|
450
|
+
process.env.NODE_ENV !== "production" && (P.displayName = "Route");
|
|
451
|
+
const M = /* @__PURE__ */ s.createContext(null);
|
|
452
|
+
process.env.NODE_ENV !== "production" && (M.displayName = "RouteError");
|
|
453
|
+
function qe(e, t) {
|
|
454
|
+
let {
|
|
455
|
+
relative: n
|
|
456
|
+
} = t === void 0 ? {} : t;
|
|
457
|
+
S() || (process.env.NODE_ENV !== "production" ? f(
|
|
458
|
+
!1,
|
|
459
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
460
|
+
// router loaded. We can help them understand how to avoid that.
|
|
461
|
+
"useHref() may be used only in the context of a <Router> component."
|
|
462
|
+
) : f(!1));
|
|
463
|
+
let {
|
|
464
|
+
basename: r,
|
|
465
|
+
navigator: a
|
|
466
|
+
} = s.useContext(w), {
|
|
467
|
+
hash: o,
|
|
468
|
+
pathname: l,
|
|
469
|
+
search: u
|
|
470
|
+
} = Le(e, {
|
|
471
|
+
relative: n
|
|
472
|
+
}), i = l;
|
|
473
|
+
return r !== "/" && (i = l === "/" ? r : C([r, l])), a.createHref({
|
|
474
|
+
pathname: i,
|
|
475
|
+
search: u,
|
|
476
|
+
hash: o
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
function S() {
|
|
480
|
+
return s.useContext(B) != null;
|
|
481
|
+
}
|
|
482
|
+
function F() {
|
|
483
|
+
return S() || (process.env.NODE_ENV !== "production" ? f(
|
|
484
|
+
!1,
|
|
485
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
486
|
+
// router loaded. We can help them understand how to avoid that.
|
|
487
|
+
"useLocation() may be used only in the context of a <Router> component."
|
|
488
|
+
) : f(!1)), s.useContext(B).location;
|
|
489
|
+
}
|
|
490
|
+
const re = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
491
|
+
function ae(e) {
|
|
492
|
+
s.useContext(w).static || s.useLayoutEffect(e);
|
|
493
|
+
}
|
|
494
|
+
function Ge() {
|
|
495
|
+
let {
|
|
496
|
+
isDataRoute: e
|
|
497
|
+
} = s.useContext(P);
|
|
498
|
+
return e ? Je() : Se();
|
|
499
|
+
}
|
|
500
|
+
function Se() {
|
|
501
|
+
S() || (process.env.NODE_ENV !== "production" ? f(
|
|
502
|
+
!1,
|
|
503
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
504
|
+
// router loaded. We can help them understand how to avoid that.
|
|
505
|
+
"useNavigate() may be used only in the context of a <Router> component."
|
|
506
|
+
) : f(!1));
|
|
507
|
+
let e = s.useContext(U), {
|
|
508
|
+
basename: t,
|
|
509
|
+
future: n,
|
|
510
|
+
navigator: r
|
|
511
|
+
} = s.useContext(w), {
|
|
512
|
+
matches: a
|
|
513
|
+
} = s.useContext(P), {
|
|
514
|
+
pathname: o
|
|
515
|
+
} = F(), l = JSON.stringify(Z(a, n.v7_relativeSplatPath)), u = s.useRef(!1);
|
|
516
|
+
return ae(() => {
|
|
517
|
+
u.current = !0;
|
|
518
|
+
}), s.useCallback(function(d, h) {
|
|
519
|
+
if (h === void 0 && (h = {}), process.env.NODE_ENV !== "production" && b(u.current, re), !u.current)
|
|
520
|
+
return;
|
|
521
|
+
if (typeof d == "number") {
|
|
522
|
+
r.go(d);
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
let c = ee(d, JSON.parse(l), o, h.relative === "path");
|
|
526
|
+
e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : C([t, c.pathname])), (h.replace ? r.replace : r.push)(c, h.state, h);
|
|
527
|
+
}, [t, r, l, o, e]);
|
|
528
|
+
}
|
|
529
|
+
function Le(e, t) {
|
|
530
|
+
let {
|
|
531
|
+
relative: n
|
|
532
|
+
} = t === void 0 ? {} : t, {
|
|
533
|
+
future: r
|
|
534
|
+
} = s.useContext(w), {
|
|
535
|
+
matches: a
|
|
536
|
+
} = s.useContext(P), {
|
|
537
|
+
pathname: o
|
|
538
|
+
} = F(), l = JSON.stringify(Z(a, r.v7_relativeSplatPath));
|
|
539
|
+
return s.useMemo(() => ee(e, JSON.parse(l), o, n === "path"), [e, l, o, n]);
|
|
540
|
+
}
|
|
541
|
+
function Ue(e, t) {
|
|
542
|
+
return Ie(e, t);
|
|
543
|
+
}
|
|
544
|
+
function Ie(e, t, n, r) {
|
|
545
|
+
S() || (process.env.NODE_ENV !== "production" ? f(
|
|
546
|
+
!1,
|
|
547
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
548
|
+
// router loaded. We can help them understand how to avoid that.
|
|
549
|
+
"useRoutes() may be used only in the context of a <Router> component."
|
|
550
|
+
) : f(!1));
|
|
551
|
+
let {
|
|
552
|
+
navigator: a
|
|
553
|
+
} = s.useContext(w), {
|
|
554
|
+
matches: o
|
|
555
|
+
} = s.useContext(P), l = o[o.length - 1], u = l ? l.params : {}, i = l ? l.pathname : "/", d = l ? l.pathnameBase : "/", h = l && l.route;
|
|
556
|
+
if (process.env.NODE_ENV !== "production") {
|
|
557
|
+
let v = h && h.path || "";
|
|
558
|
+
le(i, !h || v.endsWith("*"), "You rendered descendant <Routes> (or called `useRoutes()`) at " + ('"' + i + '" (under <Route path="' + v + '">) but the ') + `parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
559
|
+
|
|
560
|
+
` + ('Please change the parent <Route path="' + v + '"> to <Route ') + ('path="' + (v === "/" ? "*" : v + "/*") + '">.'));
|
|
561
|
+
}
|
|
562
|
+
let c = F(), m;
|
|
563
|
+
if (t) {
|
|
564
|
+
var x;
|
|
565
|
+
let v = typeof t == "string" ? O(t) : t;
|
|
566
|
+
d === "/" || (x = v.pathname) != null && x.startsWith(d) || (process.env.NODE_ENV !== "production" ? f(!1, "When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was " + ('matched by all parent routes. The current pathname base is "' + d + '" ') + ('but pathname "' + v.pathname + '" was given in the `location` prop.')) : f(!1)), m = v;
|
|
567
|
+
} else
|
|
568
|
+
m = c;
|
|
569
|
+
let y = m.pathname || "/", g = y;
|
|
570
|
+
if (d !== "/") {
|
|
571
|
+
let v = d.replace(/^\//, "").split("/");
|
|
572
|
+
g = "/" + y.replace(/^\//, "").split("/").slice(v.length).join("/");
|
|
573
|
+
}
|
|
574
|
+
let p = ue(e, {
|
|
575
|
+
pathname: g
|
|
576
|
+
});
|
|
577
|
+
process.env.NODE_ENV !== "production" && (process.env.NODE_ENV !== "production" && b(h || p != null, 'No routes matched location "' + m.pathname + m.search + m.hash + '" '), process.env.NODE_ENV !== "production" && b(p == null || p[p.length - 1].route.element !== void 0 || p[p.length - 1].route.Component !== void 0 || p[p.length - 1].route.lazy !== void 0, 'Matched leaf route at location "' + m.pathname + m.search + m.hash + '" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));
|
|
578
|
+
let E = Fe(p && p.map((v) => Object.assign({}, v, {
|
|
579
|
+
params: Object.assign({}, u, v.params),
|
|
580
|
+
pathname: C([
|
|
581
|
+
d,
|
|
582
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
583
|
+
a.encodeLocation ? a.encodeLocation(v.pathname).pathname : v.pathname
|
|
584
|
+
]),
|
|
585
|
+
pathnameBase: v.pathnameBase === "/" ? d : C([
|
|
586
|
+
d,
|
|
587
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
588
|
+
a.encodeLocation ? a.encodeLocation(v.pathnameBase).pathname : v.pathnameBase
|
|
589
|
+
])
|
|
590
|
+
})), o, n, r);
|
|
591
|
+
return t && E ? /* @__PURE__ */ s.createElement(B.Provider, {
|
|
592
|
+
value: {
|
|
593
|
+
location: _({
|
|
594
|
+
pathname: "/",
|
|
595
|
+
search: "",
|
|
596
|
+
hash: "",
|
|
597
|
+
state: null,
|
|
598
|
+
key: "default"
|
|
599
|
+
}, m),
|
|
600
|
+
navigationType: R.Pop
|
|
601
|
+
}
|
|
602
|
+
}, E) : E;
|
|
603
|
+
}
|
|
604
|
+
function je() {
|
|
605
|
+
let e = Ae(), t = _e(e) ? e.status + " " + e.statusText : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, r = "rgba(200,200,200, 0.5)", a = {
|
|
606
|
+
padding: "0.5rem",
|
|
607
|
+
backgroundColor: r
|
|
608
|
+
}, o = {
|
|
609
|
+
padding: "2px 4px",
|
|
610
|
+
backgroundColor: r
|
|
611
|
+
}, l = null;
|
|
612
|
+
return process.env.NODE_ENV !== "production" && (console.error("Error handled by React Router default ErrorBoundary:", e), l = /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ s.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ s.createElement("code", {
|
|
613
|
+
style: o
|
|
614
|
+
}, "ErrorBoundary"), " or", " ", /* @__PURE__ */ s.createElement("code", {
|
|
615
|
+
style: o
|
|
616
|
+
}, "errorElement"), " prop on your route."))), /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ s.createElement("h3", {
|
|
617
|
+
style: {
|
|
618
|
+
fontStyle: "italic"
|
|
619
|
+
}
|
|
620
|
+
}, t), n ? /* @__PURE__ */ s.createElement("pre", {
|
|
621
|
+
style: a
|
|
622
|
+
}, n) : null, l);
|
|
623
|
+
}
|
|
624
|
+
const We = /* @__PURE__ */ s.createElement(je, null);
|
|
625
|
+
class $e extends s.Component {
|
|
626
|
+
constructor(t) {
|
|
627
|
+
super(t), this.state = {
|
|
628
|
+
location: t.location,
|
|
629
|
+
revalidation: t.revalidation,
|
|
630
|
+
error: t.error
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
static getDerivedStateFromError(t) {
|
|
634
|
+
return {
|
|
635
|
+
error: t
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
static getDerivedStateFromProps(t, n) {
|
|
639
|
+
return n.location !== t.location || n.revalidation !== "idle" && t.revalidation === "idle" ? {
|
|
640
|
+
error: t.error,
|
|
641
|
+
location: t.location,
|
|
642
|
+
revalidation: t.revalidation
|
|
643
|
+
} : {
|
|
644
|
+
error: t.error !== void 0 ? t.error : n.error,
|
|
645
|
+
location: n.location,
|
|
646
|
+
revalidation: t.revalidation || n.revalidation
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
componentDidCatch(t, n) {
|
|
650
|
+
console.error("React Router caught the following error during render", t, n);
|
|
651
|
+
}
|
|
652
|
+
render() {
|
|
653
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ s.createElement(P.Provider, {
|
|
654
|
+
value: this.props.routeContext
|
|
655
|
+
}, /* @__PURE__ */ s.createElement(M.Provider, {
|
|
656
|
+
value: this.state.error,
|
|
657
|
+
children: this.props.component
|
|
658
|
+
})) : this.props.children;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
function Me(e) {
|
|
662
|
+
let {
|
|
663
|
+
routeContext: t,
|
|
664
|
+
match: n,
|
|
665
|
+
children: r
|
|
666
|
+
} = e, a = s.useContext(U);
|
|
667
|
+
return a && a.static && a.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = n.route.id), /* @__PURE__ */ s.createElement(P.Provider, {
|
|
668
|
+
value: t
|
|
669
|
+
}, r);
|
|
670
|
+
}
|
|
671
|
+
function Fe(e, t, n, r) {
|
|
672
|
+
var a;
|
|
673
|
+
if (t === void 0 && (t = []), n === void 0 && (n = null), r === void 0 && (r = null), e == null) {
|
|
674
|
+
var o;
|
|
675
|
+
if (!n)
|
|
676
|
+
return null;
|
|
677
|
+
if (n.errors)
|
|
678
|
+
e = n.matches;
|
|
679
|
+
else if ((o = r) != null && o.v7_partialHydration && t.length === 0 && !n.initialized && n.matches.length > 0)
|
|
680
|
+
e = n.matches;
|
|
681
|
+
else
|
|
682
|
+
return null;
|
|
683
|
+
}
|
|
684
|
+
let l = e, u = (a = n) == null ? void 0 : a.errors;
|
|
685
|
+
if (u != null) {
|
|
686
|
+
let h = l.findIndex((c) => c.route.id && (u == null ? void 0 : u[c.route.id]) !== void 0);
|
|
687
|
+
h >= 0 || (process.env.NODE_ENV !== "production" ? f(!1, "Could not find a matching route for errors on route IDs: " + Object.keys(u).join(",")) : f(!1)), l = l.slice(0, Math.min(l.length, h + 1));
|
|
688
|
+
}
|
|
689
|
+
let i = !1, d = -1;
|
|
690
|
+
if (n && r && r.v7_partialHydration)
|
|
691
|
+
for (let h = 0; h < l.length; h++) {
|
|
692
|
+
let c = l[h];
|
|
693
|
+
if ((c.route.HydrateFallback || c.route.hydrateFallbackElement) && (d = h), c.route.id) {
|
|
694
|
+
let {
|
|
695
|
+
loaderData: m,
|
|
696
|
+
errors: x
|
|
697
|
+
} = n, y = c.route.loader && m[c.route.id] === void 0 && (!x || x[c.route.id] === void 0);
|
|
698
|
+
if (c.route.lazy || y) {
|
|
699
|
+
i = !0, d >= 0 ? l = l.slice(0, d + 1) : l = [l[0]];
|
|
700
|
+
break;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
return l.reduceRight((h, c, m) => {
|
|
705
|
+
let x, y = !1, g = null, p = null;
|
|
706
|
+
n && (x = u && c.route.id ? u[c.route.id] : void 0, g = c.route.errorElement || We, i && (d < 0 && m === 0 ? (le("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), y = !0, p = null) : d === m && (y = !0, p = c.route.hydrateFallbackElement || null)));
|
|
707
|
+
let E = t.concat(l.slice(0, m + 1)), v = () => {
|
|
708
|
+
let N;
|
|
709
|
+
return x ? N = g : y ? N = p : c.route.Component ? N = /* @__PURE__ */ s.createElement(c.route.Component, null) : c.route.element ? N = c.route.element : N = h, /* @__PURE__ */ s.createElement(Me, {
|
|
710
|
+
match: c,
|
|
711
|
+
routeContext: {
|
|
712
|
+
outlet: h,
|
|
713
|
+
matches: E,
|
|
714
|
+
isDataRoute: n != null
|
|
715
|
+
},
|
|
716
|
+
children: N
|
|
717
|
+
});
|
|
718
|
+
};
|
|
719
|
+
return n && (c.route.ErrorBoundary || c.route.errorElement || m === 0) ? /* @__PURE__ */ s.createElement($e, {
|
|
720
|
+
location: n.location,
|
|
721
|
+
revalidation: n.revalidation,
|
|
722
|
+
component: g,
|
|
723
|
+
error: x,
|
|
724
|
+
children: v(),
|
|
725
|
+
routeContext: {
|
|
726
|
+
outlet: null,
|
|
727
|
+
matches: E,
|
|
728
|
+
isDataRoute: !0
|
|
729
|
+
}
|
|
730
|
+
}) : v();
|
|
731
|
+
}, null);
|
|
732
|
+
}
|
|
733
|
+
var oe = /* @__PURE__ */ function(e) {
|
|
734
|
+
return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
|
|
735
|
+
}(oe || {}), V = /* @__PURE__ */ function(e) {
|
|
736
|
+
return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
|
|
737
|
+
}(V || {});
|
|
738
|
+
function k(e) {
|
|
739
|
+
return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
|
|
740
|
+
}
|
|
741
|
+
function ke(e) {
|
|
742
|
+
let t = s.useContext(U);
|
|
743
|
+
return t || (process.env.NODE_ENV !== "production" ? f(!1, k(e)) : f(!1)), t;
|
|
744
|
+
}
|
|
745
|
+
function Te(e) {
|
|
746
|
+
let t = s.useContext(ne);
|
|
747
|
+
return t || (process.env.NODE_ENV !== "production" ? f(!1, k(e)) : f(!1)), t;
|
|
748
|
+
}
|
|
749
|
+
function ze(e) {
|
|
750
|
+
let t = s.useContext(P);
|
|
751
|
+
return t || (process.env.NODE_ENV !== "production" ? f(!1, k(e)) : f(!1)), t;
|
|
752
|
+
}
|
|
753
|
+
function T(e) {
|
|
754
|
+
let t = ze(e), n = t.matches[t.matches.length - 1];
|
|
755
|
+
return n.route.id || (process.env.NODE_ENV !== "production" ? f(!1, e + ' can only be used on routes that contain a unique "id"') : f(!1)), n.route.id;
|
|
756
|
+
}
|
|
757
|
+
function Ke() {
|
|
758
|
+
return T(V.UseRouteId);
|
|
759
|
+
}
|
|
760
|
+
function Ae() {
|
|
761
|
+
var e;
|
|
762
|
+
let t = s.useContext(M), n = Te(V.UseRouteError), r = T(V.UseRouteError);
|
|
763
|
+
return t !== void 0 ? t : (e = n.errors) == null ? void 0 : e[r];
|
|
764
|
+
}
|
|
765
|
+
function Je() {
|
|
766
|
+
let {
|
|
767
|
+
router: e
|
|
768
|
+
} = ke(oe.UseNavigateStable), t = T(V.UseNavigateStable), n = s.useRef(!1);
|
|
769
|
+
return ae(() => {
|
|
770
|
+
n.current = !0;
|
|
771
|
+
}), s.useCallback(function(a, o) {
|
|
772
|
+
o === void 0 && (o = {}), process.env.NODE_ENV !== "production" && b(n.current, re), n.current && (typeof a == "number" ? e.navigate(a) : e.navigate(a, _({
|
|
773
|
+
fromRouteId: t
|
|
774
|
+
}, o)));
|
|
775
|
+
}, [e, t]);
|
|
776
|
+
}
|
|
777
|
+
const q = {};
|
|
778
|
+
function le(e, t, n) {
|
|
779
|
+
!t && !q[e] && (q[e] = !0, process.env.NODE_ENV !== "production" && b(!1, n));
|
|
780
|
+
}
|
|
781
|
+
function He(e) {
|
|
782
|
+
process.env.NODE_ENV !== "production" ? f(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.") : f(!1);
|
|
783
|
+
}
|
|
784
|
+
function Xe(e) {
|
|
785
|
+
let {
|
|
786
|
+
basename: t = "/",
|
|
787
|
+
children: n = null,
|
|
788
|
+
location: r,
|
|
789
|
+
navigationType: a = R.Pop,
|
|
790
|
+
navigator: o,
|
|
791
|
+
static: l = !1,
|
|
792
|
+
future: u
|
|
793
|
+
} = e;
|
|
794
|
+
S() && (process.env.NODE_ENV !== "production" ? f(!1, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.") : f(!1));
|
|
795
|
+
let i = t.replace(/^\/*/, "/"), d = s.useMemo(() => ({
|
|
796
|
+
basename: i,
|
|
797
|
+
navigator: o,
|
|
798
|
+
static: l,
|
|
799
|
+
future: _({
|
|
800
|
+
v7_relativeSplatPath: !1
|
|
801
|
+
}, u)
|
|
802
|
+
}), [i, u, o, l]);
|
|
803
|
+
typeof r == "string" && (r = O(r));
|
|
804
|
+
let {
|
|
805
|
+
pathname: h = "/",
|
|
806
|
+
search: c = "",
|
|
807
|
+
hash: m = "",
|
|
808
|
+
state: x = null,
|
|
809
|
+
key: y = "default"
|
|
810
|
+
} = r, g = s.useMemo(() => {
|
|
811
|
+
let p = Q(h, i);
|
|
812
|
+
return p == null ? null : {
|
|
813
|
+
location: {
|
|
814
|
+
pathname: p,
|
|
815
|
+
search: c,
|
|
816
|
+
hash: m,
|
|
817
|
+
state: x,
|
|
818
|
+
key: y
|
|
819
|
+
},
|
|
820
|
+
navigationType: a
|
|
821
|
+
};
|
|
822
|
+
}, [i, h, c, m, x, y, a]);
|
|
823
|
+
return process.env.NODE_ENV !== "production" && b(g != null, '<Router basename="' + i + '"> is not able to match the URL ' + ('"' + h + c + m + '" because it does not start with the ') + "basename, so the <Router> won't render anything."), g == null ? null : /* @__PURE__ */ s.createElement(w.Provider, {
|
|
824
|
+
value: d
|
|
825
|
+
}, /* @__PURE__ */ s.createElement(B.Provider, {
|
|
826
|
+
children: n,
|
|
827
|
+
value: g
|
|
828
|
+
}));
|
|
829
|
+
}
|
|
830
|
+
function Qe(e) {
|
|
831
|
+
let {
|
|
832
|
+
children: t,
|
|
833
|
+
location: n
|
|
834
|
+
} = e;
|
|
835
|
+
return Ue($(t), n);
|
|
836
|
+
}
|
|
837
|
+
new Promise(() => {
|
|
838
|
+
});
|
|
839
|
+
function $(e, t) {
|
|
840
|
+
t === void 0 && (t = []);
|
|
841
|
+
let n = [];
|
|
842
|
+
return s.Children.forEach(e, (r, a) => {
|
|
843
|
+
if (!/* @__PURE__ */ s.isValidElement(r))
|
|
844
|
+
return;
|
|
845
|
+
let o = [...t, a];
|
|
846
|
+
if (r.type === s.Fragment) {
|
|
847
|
+
n.push.apply(n, $(r.props.children, o));
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
r.type !== He && (process.env.NODE_ENV !== "production" ? f(!1, "[" + (typeof r.type == "string" ? r.type : r.type.name) + "] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>") : f(!1)), !r.props.index || !r.props.children || (process.env.NODE_ENV !== "production" ? f(!1, "An index route cannot have child routes.") : f(!1));
|
|
851
|
+
let l = {
|
|
852
|
+
id: r.props.id || o.join("-"),
|
|
853
|
+
caseSensitive: r.props.caseSensitive,
|
|
854
|
+
element: r.props.element,
|
|
855
|
+
Component: r.props.Component,
|
|
856
|
+
index: r.props.index,
|
|
857
|
+
path: r.props.path,
|
|
858
|
+
loader: r.props.loader,
|
|
859
|
+
action: r.props.action,
|
|
860
|
+
errorElement: r.props.errorElement,
|
|
861
|
+
ErrorBoundary: r.props.ErrorBoundary,
|
|
862
|
+
hasErrorBoundary: r.props.ErrorBoundary != null || r.props.errorElement != null,
|
|
863
|
+
shouldRevalidate: r.props.shouldRevalidate,
|
|
864
|
+
handle: r.props.handle,
|
|
865
|
+
lazy: r.props.lazy
|
|
866
|
+
};
|
|
867
|
+
r.props.children && (l.children = $(r.props.children, o)), n.push(l);
|
|
868
|
+
}), n;
|
|
869
|
+
}
|
|
870
|
+
export {
|
|
871
|
+
ne as D,
|
|
872
|
+
w as N,
|
|
873
|
+
Qe as R,
|
|
874
|
+
He as a,
|
|
875
|
+
Xe as b,
|
|
876
|
+
Ye as c,
|
|
877
|
+
Le as d,
|
|
878
|
+
F as e,
|
|
879
|
+
Ge as f,
|
|
880
|
+
G as g,
|
|
881
|
+
Ke as h,
|
|
882
|
+
P as i,
|
|
883
|
+
f as j,
|
|
884
|
+
C as k,
|
|
885
|
+
U as l,
|
|
886
|
+
Y as m,
|
|
887
|
+
Q as s,
|
|
888
|
+
qe as u,
|
|
889
|
+
b as w
|
|
890
|
+
};
|