@qikbar/qikbar 0.0.20 → 0.0.22
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/qikbar.es.js +830 -814
- package/dist/qikbar.umd.js +23 -23
- package/package.json +3 -3
package/dist/qikbar.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap";.qikbar-demo{flex:1}#qikbar.qikbar-light{--bg-color: #f8fafc;--border-color: #e2e8f0;--category-color: #334155;--placeholder-color: #cbd5e1;--item-color: #0f172a;--item-hover: #cbd5e1;--item-focus: #e2e8f0;--logo-primary: #ef4444;--logo-secondary: #0f172a}#qikbar.qikbar-dark{--bg-color: #0f172a;--border-color: #1e293b;--category-color: #cbd5e1;--placeholder-color: #475569;--item-color: white;--item-hover: #334155;--item-focus: #475569;--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-gray{--bg-color: #111827;--border-color: #1f2937;--category-color: #d1d5db;--placeholder-color: #4b5563;--item-color: #f9fafb;--item-hover: #6b7280;--item-focus: #4b5563;--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-og{--bg-color: rgba(6, 2, 13, .95);--border-color: rgba(105, 106, 108, 1);--category-color: rgb(196, 196, 196);--placeholder-color: rgb(205, 205, 205);--item-color: white;--item-hover: rgba(53, 53, 55, .6);--item-focus: rgba(53, 53, 55, .7);--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-rose{--bg-color: #fff1f2;--border-color: #ffe4e6;--category-color: #e11d48;--placeholder-color: #fecdd3;--item-color: #881337;--item-hover: #fda4af;--item-focus: #fecdd3;--logo-primary: #9f1239;--logo-secondary: #e11d48}#qikbar *:not(svg,path){all:unset;box-sizing:border-box}#qikbar .qikbar-command-demo-wrapper{z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:0;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400}#qikbar .qikbar-command-wrapper{z-index:10000;position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:140px 30px 30px;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#qikbar .qikbar-admin-offset{left:0;width:calc(100% - 400px)}#qikbar .qikbar-embedded{position:fixed;right:0;top:0;height:100vh}#qikbar .qikbar-embedded iframe{width:400px;height:100vh;overflow:scroll}#qikbar .qikbar-admin-edit{font-size:12px;margin-right:4px}#qikbar .qickbar-embedded-hidden{display:none}#qikbar .qikbar-command-wrapper p{margin:0}#qikbar .qikbar-command-bar{width:100%;margin:0 30px;max-width:800px;min-width:200px;background-color:var(--bg-color);border-radius:10px;border:2px solid var(--border-color);display:flex;flex-direction:column;max-height:600px;overflow:scroll}#qikbar .qikbar-command-content{position:relative;display:flex;height:100%;min-height:0}#qikbar .qikbar-command-error{padding:20px;font-size:18px;color:var(--item-color);display:block}#qikbar .qikbar-command-error a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-command-footer{border-top:1px solid var(--border-color);padding:8px 6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color)}#qikbar .qikbar-details-container{display:flex;position:relative;flex:1}#qikbar .qikbar-details-wrapper{flex:1;border-left:1px solid var(--border-color);max-width:100%;overflow:scroll}#qikbar .qikbar-details{padding:8px;font-size:14px;max-height:100%;display:block;position:relative}#qikbar .qikbar-fieldset{display:flex;margin-bottom:10px}#qikbar .qikbar-field{color:var(--item-color);flex:1;display:block}#qikbar .qikbar-field-label{font-weight:700}#qikbar .qikbar-field-value a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-field-value img{width:100%}#qikbar .qikbar-crumbs{width:100%;padding:0 10px}#qikbar .qikbar-crumb{font-size:12px;cursor:pointer;color:var(--category-color)}#qikbar .qikbar-crumb:last-child{font-weight:bolder}#qikbar .qikbar-crumb-divider{margin:0 6px}#qikbar .qikbar-search-wrapper{display:flex;flex-direction:column}#qikbar .qikbar-search{font-weight:500;background-color:var(--bg-color);font-size:20px;border:none;border-radius:10px 10px 0 0;width:100%;padding:14px 10px;color:var(--item-color);outline:none;border-bottom:1px solid var(--border-color)}#qikbar .qikbar-search::-moz-placeholder{color:var(--placeholder-color)}#qikbar .qikbar-search::placeholder{color:var(--placeholder-color)}#qikbar .qikbar-list{flex:1;list-style:none;padding:0;margin:4px 0;overflow:scroll}#qikbar .qikbar-item-empty{margin:2px 4px;padding:6px;color:var(--item-color);display:flex;font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item{margin:2px 4px;padding:6px;display:flex;cursor:pointer;justify-content:space-between;align-items:center;color:var(--item-color);font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item li{display:flex;align-items:flex-start}#qikbar .qikbar-item li div{display:flex;flex-direction:column}#qikbar .qikbar-item li svg{min-width:24px;width:24px;height:24px;margin-right:4px}#qikbar .qikbar-item-description{font-size:11px;line-height:1.2;color:var(--category-color)}#qikbar .qikbar-item-type{font-size:12px;color:var(--category-color)}#qikbar .qikbar-category-wrapper{display:flex;padding:2px 10px;font-size:14px;align-items:center}#qikbar .qikbar-category-icon{width:16px;height:16px;color:var(--category-color);margin-right:2px}#qikbar .qikbar-category{color:var(--category-color);margin-left:4px}#qikbar .qikbar-search-wrapper:has(> .qikbar-search:focus)+.qikbar-command-content .qikbar-list .qikbar-item:first-of-type{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-logo{width:89px;height:30px;cursor:pointer}#qikbar .qikbar-logo .qikbar-logo-primary-fill{fill:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-primary-stroke{stroke:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-secondary{fill:var(--logo-secondary)}#qikbar .qikbar-actions-wrapper{position:relative}#qikbar .qikbar-actions-panel{position:absolute;bottom:35px;right:0;min-width:200px;background-color:var(--bg-color);border-radius:5px;border:1px solid var(--border-color)}#qikbar .qikbar-actions-list{list-style:none;padding:2px;margin:0;display:flex;flex-direction:column}#qikbar .qikbar-action{width:100%;font-size:14px;border:none;padding:6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color);text-decoration:none;font-weight:500;border-radius:5px;cursor:pointer}#qikbar .qikbar-action:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-action:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-actions{font-size:14px;background-color:var(--bg-color);border:1px solid var(--border-color);border-radius:5px;color:var(--item-color);cursor:pointer;padding:2px;display:flex}#qikbar .qikbar-actions:hover{background-color:var(--item-hover)}#qikbar .qikbar-actions:focus{background-color:var(--item-focus);color:var(--item-color)}#qikbar .qikbar-actions-action{margin-left:2px}#qikbar .qikbar-keys{font-size:12px;margin-left:4px}#qikbar .qikbar-kbd{padding:.2rem .4rem;font-size:87.5%;color:var(--item-color);background-color:var(--border-color);border-radius:.25rem;box-shadow:inset 0 -.1rem #00000040}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap";.qikbar-demo{flex:1}#qikbar.qikbar-light{--bg-color: #f8fafc;--border-color: #e2e8f0;--category-color: #334155;--placeholder-color: #cbd5e1;--item-color: #0f172a;--item-hover: #cbd5e1;--item-focus: #e2e8f0;--logo-primary: #ef4444;--logo-secondary: #0f172a}#qikbar.qikbar-dark{--bg-color: #0f172a;--border-color: #1e293b;--category-color: #cbd5e1;--placeholder-color: #475569;--item-color: white;--item-hover: #334155;--item-focus: #475569;--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-gray{--bg-color: #111827;--border-color: #1f2937;--category-color: #d1d5db;--placeholder-color: #4b5563;--item-color: #f9fafb;--item-hover: #6b7280;--item-focus: #4b5563;--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-og{--bg-color: rgba(6, 2, 13, .95);--border-color: rgba(105, 106, 108, 1);--category-color: rgb(196, 196, 196);--placeholder-color: rgb(205, 205, 205);--item-color: white;--item-hover: rgba(53, 53, 55, .6);--item-focus: rgba(53, 53, 55, .7);--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-rose{--bg-color: #fff1f2;--border-color: #ffe4e6;--category-color: #e11d48;--placeholder-color: #fecdd3;--item-color: #881337;--item-hover: #fda4af;--item-focus: #fecdd3;--logo-primary: #9f1239;--logo-secondary: #e11d48}#qikbar *:not(svg,path){all:unset;box-sizing:border-box}#qikbar .qikbar-command-demo-wrapper{z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:0;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400}#qikbar .qikbar-command-wrapper{z-index:10000;position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:140px 30px 30px;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#qikbar .qikbar-admin-offset{left:0;width:calc(100% - 400px)}#qikbar .qikbar-embedded{position:fixed;right:0;top:0;height:100vh}#qikbar .qikbar-embedded iframe{width:400px;height:100vh;overflow:scroll}#qikbar .qikbar-admin-edit{font-size:12px;margin-right:4px}#qikbar .qickbar-embedded-hidden{display:none}#qikbar .qikbar-command-wrapper p{margin:0}#qikbar .qikbar-command-bar{width:100%;margin:0 30px;max-width:800px;min-width:200px;background-color:var(--bg-color);border-radius:10px;border:2px solid var(--border-color);display:flex;flex-direction:column;max-height:600px;overflow:scroll}#qikbar .qikbar-command-content{position:relative;display:flex;height:100%;min-height:0}#qikbar .qikbar-command-error{padding:20px;font-size:18px;color:var(--item-color);display:block}#qikbar .qikbar-command-error a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-command-footer{border-top:1px solid var(--border-color);padding:8px 6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color)}#qikbar .qikbar-details-container{display:flex;position:relative;flex:1}#qikbar .qikbar-details-wrapper{flex:1;border-left:1px solid var(--border-color);max-width:100%;overflow:scroll}#qikbar .qikbar-details{padding:8px;font-size:14px;max-height:100%;display:block;position:relative}#qikbar .qikbar-fieldset{display:flex;margin-bottom:10px}#qikbar .qikbar-field{color:var(--item-color);flex:1;display:block;margin-bottom:4px}#qikbar .qikbar-field-label{font-weight:700;margin-right:8px}#qikbar .qikbar-field-value a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-field-value img{width:100%}#qikbar .qikbar-crumbs{width:100%;padding:0 10px}#qikbar .qikbar-crumb{font-size:12px;cursor:pointer;color:var(--category-color)}#qikbar .qikbar-crumb:last-child{font-weight:bolder}#qikbar .qikbar-crumb-divider{margin:0 6px}#qikbar .qikbar-search-wrapper{display:flex;flex-direction:column}#qikbar .qikbar-search{font-weight:500;background-color:var(--bg-color);font-size:20px;border:none;border-radius:10px 10px 0 0;width:100%;padding:14px 10px;color:var(--item-color);outline:none;border-bottom:1px solid var(--border-color)}#qikbar .qikbar-search::-moz-placeholder{color:var(--placeholder-color)}#qikbar .qikbar-search::placeholder{color:var(--placeholder-color)}#qikbar .qikbar-list{flex:1;list-style:none;padding:0;margin:4px 0;overflow:scroll}#qikbar .qikbar-item-empty{margin:2px 4px;padding:6px;color:var(--item-color);display:flex;font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item{margin:2px 4px;padding:6px;display:flex;cursor:pointer;justify-content:space-between;align-items:center;color:var(--item-color);font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item li{display:flex;align-items:flex-start}#qikbar .qikbar-item li div{display:flex;flex-direction:column}#qikbar .qikbar-item li svg{min-width:24px;width:24px;height:24px;margin-right:4px}#qikbar .qikbar-item-description{font-size:11px;line-height:1.2;color:var(--category-color)}#qikbar .qikbar-item-type{font-size:12px;color:var(--category-color)}#qikbar .qikbar-category-wrapper{display:flex;padding:2px 10px;font-size:14px;align-items:center}#qikbar .qikbar-category-icon{width:16px;height:16px;color:var(--category-color);margin-right:2px}#qikbar .qikbar-category{color:var(--category-color);margin-left:4px}#qikbar .qikbar-search-wrapper:has(> .qikbar-search:focus)+.qikbar-command-content .qikbar-list .qikbar-item:first-of-type{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-logo{width:89px;height:30px;cursor:pointer}#qikbar .qikbar-logo .qikbar-logo-primary-fill{fill:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-primary-stroke{stroke:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-secondary{fill:var(--logo-secondary)}#qikbar .qikbar-actions-wrapper{position:relative}#qikbar .qikbar-actions-panel{position:absolute;bottom:35px;right:0;min-width:200px;background-color:var(--bg-color);border-radius:5px;border:1px solid var(--border-color)}#qikbar .qikbar-actions-list{list-style:none;padding:2px;margin:0;display:flex;flex-direction:column}#qikbar .qikbar-action{width:100%;font-size:14px;border:none;padding:6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color);text-decoration:none;font-weight:500;border-radius:5px;cursor:pointer}#qikbar .qikbar-action:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-action:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-actions{font-size:14px;background-color:var(--bg-color);border:1px solid var(--border-color);border-radius:5px;color:var(--item-color);cursor:pointer;padding:2px;display:flex}#qikbar .qikbar-actions:hover{background-color:var(--item-hover)}#qikbar .qikbar-actions:focus{background-color:var(--item-focus);color:var(--item-color)}#qikbar .qikbar-actions-action{margin-left:2px}#qikbar .qikbar-keys{font-size:12px;margin-left:4px}#qikbar .qikbar-kbd{padding:.2rem .4rem;font-size:87.5%;color:var(--item-color);background-color:var(--border-color);border-radius:.25rem;box-shadow:inset 0 -.1rem #00000040}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
var ba = Object.defineProperty;
|
|
3
3
|
var wa = (t, e, r) => e in t ? ba(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
4
4
|
var Wn = (t, e, r) => (wa(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
5
5
|
import * as p from "react";
|
|
6
|
-
import
|
|
6
|
+
import Et, { useDebugValue as Ca, useContext as Rt, useRef as un, useEffect as Ge, createContext as Ea, useState as We, useMemo as is, Component as Ra } from "react";
|
|
7
7
|
import Sa from "react-dom";
|
|
8
8
|
var wr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
9
9
|
function xa(t) {
|
|
@@ -31,7 +31,7 @@ function _a() {
|
|
|
31
31
|
if (Kn)
|
|
32
32
|
return Kt;
|
|
33
33
|
Kn = 1;
|
|
34
|
-
var t =
|
|
34
|
+
var t = Et, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
35
35
|
function a(l, o, u) {
|
|
36
36
|
var c, f = {}, d = null, m = null;
|
|
37
37
|
u !== void 0 && (d = "" + u), o.key !== void 0 && (d = "" + o.key), o.ref !== void 0 && (m = o.ref);
|
|
@@ -57,8 +57,8 @@ var Yt = {};
|
|
|
57
57
|
var Yn;
|
|
58
58
|
function Ta() {
|
|
59
59
|
return Yn || (Yn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
60
|
-
var t =
|
|
61
|
-
function
|
|
60
|
+
var t = Et, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), l = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), v = Symbol.iterator, w = "@@iterator";
|
|
61
|
+
function E(h) {
|
|
62
62
|
if (h === null || typeof h != "object")
|
|
63
63
|
return null;
|
|
64
64
|
var x = v && h[v] || h[w];
|
|
@@ -67,14 +67,14 @@ function Ta() {
|
|
|
67
67
|
var O = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
68
68
|
function k(h) {
|
|
69
69
|
{
|
|
70
|
-
for (var x = arguments.length, T = new Array(x > 1 ? x - 1 : 0),
|
|
71
|
-
T[
|
|
70
|
+
for (var x = arguments.length, T = new Array(x > 1 ? x - 1 : 0), U = 1; U < x; U++)
|
|
71
|
+
T[U - 1] = arguments[U];
|
|
72
72
|
C("error", h, T);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
function C(h, x, T) {
|
|
76
76
|
{
|
|
77
|
-
var
|
|
77
|
+
var U = O.ReactDebugCurrentFrame, Y = U.getStackAddendum();
|
|
78
78
|
Y !== "" && (x += "%s", T = T.concat([Y]));
|
|
79
79
|
var Z = T.map(function(K) {
|
|
80
80
|
return String(K);
|
|
@@ -82,26 +82,26 @@ function Ta() {
|
|
|
82
82
|
Z.unshift("Warning: " + x), Function.prototype.apply.call(console[h], console, Z);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
function
|
|
88
|
-
return !!(typeof h == "string" || typeof h == "function" || h === n || h === s ||
|
|
85
|
+
var R = !1, A = !1, _ = !1, j = !1, N = !1, F;
|
|
86
|
+
F = Symbol.for("react.module.reference");
|
|
87
|
+
function J(h) {
|
|
88
|
+
return !!(typeof h == "string" || typeof h == "function" || h === n || h === s || N || h === i || h === u || h === c || j || h === m || R || A || _ || typeof h == "object" && h !== null && (h.$$typeof === d || h.$$typeof === f || h.$$typeof === a || h.$$typeof === l || h.$$typeof === o || // This needs to include all possible module reference object
|
|
89
89
|
// types supported by any Flight configuration anywhere since
|
|
90
90
|
// we don't know which Flight build this will end up being used
|
|
91
91
|
// with.
|
|
92
|
-
h.$$typeof ===
|
|
92
|
+
h.$$typeof === F || h.getModuleId !== void 0));
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
var
|
|
96
|
-
if (
|
|
97
|
-
return
|
|
94
|
+
function H(h, x, T) {
|
|
95
|
+
var U = h.displayName;
|
|
96
|
+
if (U)
|
|
97
|
+
return U;
|
|
98
98
|
var Y = x.displayName || x.name || "";
|
|
99
99
|
return Y !== "" ? T + "(" + Y + ")" : T;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function M(h) {
|
|
102
102
|
return h.displayName || "Context";
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function re(h) {
|
|
105
105
|
if (h == null)
|
|
106
106
|
return null;
|
|
107
107
|
if (typeof h.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof h == "function")
|
|
@@ -126,19 +126,19 @@ function Ta() {
|
|
|
126
126
|
switch (h.$$typeof) {
|
|
127
127
|
case l:
|
|
128
128
|
var x = h;
|
|
129
|
-
return
|
|
129
|
+
return M(x) + ".Consumer";
|
|
130
130
|
case a:
|
|
131
131
|
var T = h;
|
|
132
|
-
return
|
|
132
|
+
return M(T._context) + ".Provider";
|
|
133
133
|
case o:
|
|
134
|
-
return
|
|
134
|
+
return H(h, h.render, "ForwardRef");
|
|
135
135
|
case f:
|
|
136
|
-
var
|
|
137
|
-
return
|
|
136
|
+
var U = h.displayName || null;
|
|
137
|
+
return U !== null ? U : re(h.type) || "Memo";
|
|
138
138
|
case d: {
|
|
139
139
|
var Y = h, Z = Y._payload, K = Y._init;
|
|
140
140
|
try {
|
|
141
|
-
return
|
|
141
|
+
return re(K(Z));
|
|
142
142
|
} catch {
|
|
143
143
|
return null;
|
|
144
144
|
}
|
|
@@ -146,14 +146,14 @@ function Ta() {
|
|
|
146
146
|
}
|
|
147
147
|
return null;
|
|
148
148
|
}
|
|
149
|
-
var ce = Object.assign, ye = 0, ve,
|
|
149
|
+
var ce = Object.assign, ye = 0, ve, X, Le, tt, ie, Ce, dr;
|
|
150
150
|
function hr() {
|
|
151
151
|
}
|
|
152
152
|
hr.__reactDisabledLog = !0;
|
|
153
153
|
function fr() {
|
|
154
154
|
{
|
|
155
155
|
if (ye === 0) {
|
|
156
|
-
ve = console.log,
|
|
156
|
+
ve = console.log, X = console.info, Le = console.warn, tt = console.error, ie = console.group, Ce = console.groupCollapsed, dr = console.groupEnd;
|
|
157
157
|
var h = {
|
|
158
158
|
configurable: !0,
|
|
159
159
|
enumerable: !0,
|
|
@@ -186,7 +186,7 @@ function Ta() {
|
|
|
186
186
|
value: ve
|
|
187
187
|
}),
|
|
188
188
|
info: ce({}, h, {
|
|
189
|
-
value:
|
|
189
|
+
value: X
|
|
190
190
|
}),
|
|
191
191
|
warn: ce({}, h, {
|
|
192
192
|
value: Le
|
|
@@ -215,28 +215,28 @@ function Ta() {
|
|
|
215
215
|
try {
|
|
216
216
|
throw Error();
|
|
217
217
|
} catch (Y) {
|
|
218
|
-
var
|
|
219
|
-
Ht =
|
|
218
|
+
var U = Y.stack.trim().match(/\n( *(at )?)/);
|
|
219
|
+
Ht = U && U[1] || "";
|
|
220
220
|
}
|
|
221
221
|
return `
|
|
222
222
|
` + Ht + h;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
var
|
|
225
|
+
var kt = !1, rt;
|
|
226
226
|
{
|
|
227
227
|
var Qt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
228
228
|
rt = new Qt();
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
if (!h ||
|
|
230
|
+
function Dt(h, x) {
|
|
231
|
+
if (!h || kt)
|
|
232
232
|
return "";
|
|
233
233
|
{
|
|
234
234
|
var T = rt.get(h);
|
|
235
235
|
if (T !== void 0)
|
|
236
236
|
return T;
|
|
237
237
|
}
|
|
238
|
-
var
|
|
239
|
-
|
|
238
|
+
var U;
|
|
239
|
+
kt = !0;
|
|
240
240
|
var Y = Error.prepareStackTrace;
|
|
241
241
|
Error.prepareStackTrace = void 0;
|
|
242
242
|
var Z;
|
|
@@ -254,14 +254,14 @@ function Ta() {
|
|
|
254
254
|
try {
|
|
255
255
|
Reflect.construct(K, []);
|
|
256
256
|
} catch (ze) {
|
|
257
|
-
|
|
257
|
+
U = ze;
|
|
258
258
|
}
|
|
259
259
|
Reflect.construct(h, [], K);
|
|
260
260
|
} else {
|
|
261
261
|
try {
|
|
262
262
|
K.call();
|
|
263
263
|
} catch (ze) {
|
|
264
|
-
|
|
264
|
+
U = ze;
|
|
265
265
|
}
|
|
266
266
|
h.call(K.prototype);
|
|
267
267
|
}
|
|
@@ -269,23 +269,23 @@ function Ta() {
|
|
|
269
269
|
try {
|
|
270
270
|
throw Error();
|
|
271
271
|
} catch (ze) {
|
|
272
|
-
|
|
272
|
+
U = ze;
|
|
273
273
|
}
|
|
274
274
|
h();
|
|
275
275
|
}
|
|
276
276
|
} catch (ze) {
|
|
277
|
-
if (ze &&
|
|
278
|
-
for (var
|
|
279
|
-
`), be =
|
|
280
|
-
`), ae =
|
|
277
|
+
if (ze && U && typeof ze.stack == "string") {
|
|
278
|
+
for (var W = ze.stack.split(`
|
|
279
|
+
`), be = U.stack.split(`
|
|
280
|
+
`), ae = W.length - 1, oe = be.length - 1; ae >= 1 && oe >= 0 && W[ae] !== be[oe]; )
|
|
281
281
|
oe--;
|
|
282
282
|
for (; ae >= 1 && oe >= 0; ae--, oe--)
|
|
283
|
-
if (
|
|
283
|
+
if (W[ae] !== be[oe]) {
|
|
284
284
|
if (ae !== 1 || oe !== 1)
|
|
285
285
|
do
|
|
286
|
-
if (ae--, oe--, oe < 0 ||
|
|
286
|
+
if (ae--, oe--, oe < 0 || W[ae] !== be[oe]) {
|
|
287
287
|
var ke = `
|
|
288
|
-
` +
|
|
288
|
+
` + W[ae].replace(" at new ", " at ");
|
|
289
289
|
return h.displayName && ke.includes("<anonymous>") && (ke = ke.replace("<anonymous>", h.displayName)), typeof h == "function" && rt.set(h, ke), ke;
|
|
290
290
|
}
|
|
291
291
|
while (ae >= 1 && oe >= 0);
|
|
@@ -293,23 +293,23 @@ function Ta() {
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
} finally {
|
|
296
|
-
|
|
296
|
+
kt = !1, Bt.current = Z, Kr(), Error.prepareStackTrace = Y;
|
|
297
297
|
}
|
|
298
|
-
var
|
|
298
|
+
var At = h ? h.displayName || h.name : "", zn = At ? Ae(At) : "";
|
|
299
299
|
return typeof h == "function" && rt.set(h, zn), zn;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
return
|
|
301
|
+
function Lt(h, x, T) {
|
|
302
|
+
return Dt(h, !1);
|
|
303
303
|
}
|
|
304
304
|
function pr(h) {
|
|
305
305
|
var x = h.prototype;
|
|
306
306
|
return !!(x && x.isReactComponent);
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Pt(h, x, T) {
|
|
309
309
|
if (h == null)
|
|
310
310
|
return "";
|
|
311
311
|
if (typeof h == "function")
|
|
312
|
-
return
|
|
312
|
+
return Dt(h, pr(h));
|
|
313
313
|
if (typeof h == "string")
|
|
314
314
|
return Ae(h);
|
|
315
315
|
switch (h) {
|
|
@@ -321,13 +321,13 @@ function Ta() {
|
|
|
321
321
|
if (typeof h == "object")
|
|
322
322
|
switch (h.$$typeof) {
|
|
323
323
|
case o:
|
|
324
|
-
return
|
|
324
|
+
return Lt(h.render);
|
|
325
325
|
case f:
|
|
326
|
-
return
|
|
326
|
+
return Pt(h.type, x, T);
|
|
327
327
|
case d: {
|
|
328
|
-
var
|
|
328
|
+
var U = h, Y = U._payload, Z = U._init;
|
|
329
329
|
try {
|
|
330
|
-
return
|
|
330
|
+
return Pt(Z(Y), x, T);
|
|
331
331
|
} catch {
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -337,27 +337,27 @@ function Ta() {
|
|
|
337
337
|
var ct = Object.prototype.hasOwnProperty, mr = {}, nt = O.ReactDebugCurrentFrame;
|
|
338
338
|
function He(h) {
|
|
339
339
|
if (h) {
|
|
340
|
-
var x = h._owner, T =
|
|
340
|
+
var x = h._owner, T = Pt(h.type, h._source, x ? x.type : null);
|
|
341
341
|
nt.setExtraStackFrame(T);
|
|
342
342
|
} else
|
|
343
343
|
nt.setExtraStackFrame(null);
|
|
344
344
|
}
|
|
345
|
-
function gr(h, x, T,
|
|
345
|
+
function gr(h, x, T, U, Y) {
|
|
346
346
|
{
|
|
347
347
|
var Z = Function.call.bind(ct);
|
|
348
348
|
for (var K in h)
|
|
349
349
|
if (Z(h, K)) {
|
|
350
|
-
var
|
|
350
|
+
var W = void 0;
|
|
351
351
|
try {
|
|
352
352
|
if (typeof h[K] != "function") {
|
|
353
|
-
var be = Error((
|
|
353
|
+
var be = Error((U || "React class") + ": " + T + " type `" + K + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[K] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
354
354
|
throw be.name = "Invariant Violation", be;
|
|
355
355
|
}
|
|
356
|
-
|
|
356
|
+
W = h[K](x, K, U, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
357
357
|
} catch (ae) {
|
|
358
|
-
|
|
358
|
+
W = ae;
|
|
359
359
|
}
|
|
360
|
-
|
|
360
|
+
W && !(W instanceof Error) && (He(Y), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", U || "React class", T, K, typeof W), He(null)), W instanceof Error && !(W.message in mr) && (mr[W.message] = !0, He(Y), k("Failed %s type: %s", T, W.message), He(null));
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
}
|
|
@@ -390,9 +390,9 @@ function Ta() {
|
|
|
390
390
|
ref: !0,
|
|
391
391
|
__self: !0,
|
|
392
392
|
__source: !0
|
|
393
|
-
}, D,
|
|
394
|
-
|
|
395
|
-
function
|
|
393
|
+
}, D, V, I;
|
|
394
|
+
I = {};
|
|
395
|
+
function z(h) {
|
|
396
396
|
if (ct.call(h, "ref")) {
|
|
397
397
|
var x = Object.getOwnPropertyDescriptor(h, "ref").get;
|
|
398
398
|
if (x && x.isReactWarning)
|
|
@@ -400,7 +400,7 @@ function Ta() {
|
|
|
400
400
|
}
|
|
401
401
|
return h.ref !== void 0;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function q(h) {
|
|
404
404
|
if (ct.call(h, "key")) {
|
|
405
405
|
var x = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
406
406
|
if (x && x.isReactWarning)
|
|
@@ -410,11 +410,11 @@ function Ta() {
|
|
|
410
410
|
}
|
|
411
411
|
function he(h, x) {
|
|
412
412
|
if (typeof h.ref == "string" && S.current && x && S.current.stateNode !== x) {
|
|
413
|
-
var T =
|
|
414
|
-
|
|
413
|
+
var T = re(S.current.type);
|
|
414
|
+
I[T] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', re(S.current.type), h.ref), I[T] = !0);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Q(h, x) {
|
|
418
418
|
{
|
|
419
419
|
var T = function() {
|
|
420
420
|
D || (D = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
|
|
@@ -425,10 +425,10 @@ function Ta() {
|
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function ne(h, x) {
|
|
429
429
|
{
|
|
430
430
|
var T = function() {
|
|
431
|
-
|
|
431
|
+
V || (V = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
|
|
432
432
|
};
|
|
433
433
|
T.isReactWarning = !0, Object.defineProperty(h, "ref", {
|
|
434
434
|
get: T,
|
|
@@ -436,8 +436,8 @@ function Ta() {
|
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
var Se = function(h, x, T,
|
|
440
|
-
var
|
|
439
|
+
var Se = function(h, x, T, U, Y, Z, K) {
|
|
440
|
+
var W = {
|
|
441
441
|
// This tag allows us to uniquely identify this as a React Element
|
|
442
442
|
$$typeof: e,
|
|
443
443
|
// Built-in properties that belong on the element
|
|
@@ -448,27 +448,27 @@ function Ta() {
|
|
|
448
448
|
// Record the component responsible for creating this element.
|
|
449
449
|
_owner: Z
|
|
450
450
|
};
|
|
451
|
-
return
|
|
451
|
+
return W._store = {}, Object.defineProperty(W._store, "validated", {
|
|
452
452
|
configurable: !1,
|
|
453
453
|
enumerable: !1,
|
|
454
454
|
writable: !0,
|
|
455
455
|
value: !1
|
|
456
|
-
}), Object.defineProperty(
|
|
456
|
+
}), Object.defineProperty(W, "_self", {
|
|
457
457
|
configurable: !1,
|
|
458
458
|
enumerable: !1,
|
|
459
459
|
writable: !1,
|
|
460
|
-
value:
|
|
461
|
-
}), Object.defineProperty(
|
|
460
|
+
value: U
|
|
461
|
+
}), Object.defineProperty(W, "_source", {
|
|
462
462
|
configurable: !1,
|
|
463
463
|
enumerable: !1,
|
|
464
464
|
writable: !1,
|
|
465
465
|
value: Y
|
|
466
|
-
}), Object.freeze && (Object.freeze(
|
|
466
|
+
}), Object.freeze && (Object.freeze(W.props), Object.freeze(W)), W;
|
|
467
467
|
};
|
|
468
|
-
function xe(h, x, T,
|
|
468
|
+
function xe(h, x, T, U, Y) {
|
|
469
469
|
{
|
|
470
|
-
var Z, K = {},
|
|
471
|
-
T !== void 0 && (b(T),
|
|
470
|
+
var Z, K = {}, W = null, be = null;
|
|
471
|
+
T !== void 0 && (b(T), W = "" + T), q(x) && (b(x.key), W = "" + x.key), z(x) && (be = x.ref, he(x, Y));
|
|
472
472
|
for (Z in x)
|
|
473
473
|
ct.call(x, Z) && !L.hasOwnProperty(Z) && (K[Z] = x[Z]);
|
|
474
474
|
if (h && h.defaultProps) {
|
|
@@ -476,17 +476,17 @@ function Ta() {
|
|
|
476
476
|
for (Z in ae)
|
|
477
477
|
K[Z] === void 0 && (K[Z] = ae[Z]);
|
|
478
478
|
}
|
|
479
|
-
if (
|
|
479
|
+
if (W || be) {
|
|
480
480
|
var oe = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
|
|
481
|
-
|
|
481
|
+
W && Q(K, oe), be && ne(K, oe);
|
|
482
482
|
}
|
|
483
|
-
return Se(h,
|
|
483
|
+
return Se(h, W, be, Y, U, S.current, K);
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
var Qe = O.ReactCurrentOwner, dt = O.ReactDebugCurrentFrame;
|
|
487
487
|
function Pe(h) {
|
|
488
488
|
if (h) {
|
|
489
|
-
var x = h._owner, T =
|
|
489
|
+
var x = h._owner, T = Pt(h.type, h._source, x ? x.type : null);
|
|
490
490
|
dt.setExtraStackFrame(T);
|
|
491
491
|
} else
|
|
492
492
|
dt.setExtraStackFrame(null);
|
|
@@ -499,7 +499,7 @@ function Ta() {
|
|
|
499
499
|
function de() {
|
|
500
500
|
{
|
|
501
501
|
if (Qe.current) {
|
|
502
|
-
var h =
|
|
502
|
+
var h = re(Qe.current.type);
|
|
503
503
|
if (h)
|
|
504
504
|
return `
|
|
505
505
|
|
|
@@ -520,7 +520,7 @@ Check your code at ` + x + ":" + T + ".";
|
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
var qe = {};
|
|
523
|
-
function
|
|
523
|
+
function Nt(h) {
|
|
524
524
|
{
|
|
525
525
|
var x = de();
|
|
526
526
|
if (!x) {
|
|
@@ -532,17 +532,17 @@ Check the top-level render call using <` + T + ">.");
|
|
|
532
532
|
return x;
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function jt(h, x) {
|
|
536
536
|
{
|
|
537
537
|
if (!h._store || h._store.validated || h.key != null)
|
|
538
538
|
return;
|
|
539
539
|
h._store.validated = !0;
|
|
540
|
-
var T =
|
|
540
|
+
var T = Nt(x);
|
|
541
541
|
if (qe[T])
|
|
542
542
|
return;
|
|
543
543
|
qe[T] = !0;
|
|
544
|
-
var
|
|
545
|
-
h && h._owner && h._owner !== Qe.current && (
|
|
544
|
+
var U = "";
|
|
545
|
+
h && h._owner && h._owner !== Qe.current && (U = " It was passed a child from " + re(h._owner.type) + "."), Pe(h), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, U), Pe(null);
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
function vr(h, x) {
|
|
@@ -551,16 +551,16 @@ Check the top-level render call using <` + T + ">.");
|
|
|
551
551
|
return;
|
|
552
552
|
if (Wt(h))
|
|
553
553
|
for (var T = 0; T < h.length; T++) {
|
|
554
|
-
var
|
|
555
|
-
ht(
|
|
554
|
+
var U = h[T];
|
|
555
|
+
ht(U) && jt(U, x);
|
|
556
556
|
}
|
|
557
557
|
else if (ht(h))
|
|
558
558
|
h._store && (h._store.validated = !0);
|
|
559
559
|
else if (h) {
|
|
560
|
-
var Y =
|
|
560
|
+
var Y = E(h);
|
|
561
561
|
if (typeof Y == "function" && Y !== h.entries)
|
|
562
562
|
for (var Z = Y.call(h), K; !(K = Z.next()).done; )
|
|
563
|
-
ht(K.value) &&
|
|
563
|
+
ht(K.value) && jt(K.value, x);
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
}
|
|
@@ -579,11 +579,11 @@ Check the top-level render call using <` + T + ">.");
|
|
|
579
579
|
else
|
|
580
580
|
return;
|
|
581
581
|
if (T) {
|
|
582
|
-
var
|
|
583
|
-
gr(T, h.props, "prop",
|
|
582
|
+
var U = re(x);
|
|
583
|
+
gr(T, h.props, "prop", U, h);
|
|
584
584
|
} else if (x.PropTypes !== void 0 && !Fe) {
|
|
585
585
|
Fe = !0;
|
|
586
|
-
var Y =
|
|
586
|
+
var Y = re(x);
|
|
587
587
|
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Y || "Unknown");
|
|
588
588
|
}
|
|
589
589
|
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -592,25 +592,25 @@ Check the top-level render call using <` + T + ">.");
|
|
|
592
592
|
function Ne(h) {
|
|
593
593
|
{
|
|
594
594
|
for (var x = Object.keys(h.props), T = 0; T < x.length; T++) {
|
|
595
|
-
var
|
|
596
|
-
if (
|
|
597
|
-
Pe(h), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
595
|
+
var U = x[T];
|
|
596
|
+
if (U !== "children" && U !== "key") {
|
|
597
|
+
Pe(h), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", U), Pe(null);
|
|
598
598
|
break;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
h.ref !== null && (Pe(h), k("Invalid attribute `ref` supplied to `React.Fragment`."), Pe(null));
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Mt(h, x, T, U, Y, Z) {
|
|
605
605
|
{
|
|
606
|
-
var K =
|
|
606
|
+
var K = J(h);
|
|
607
607
|
if (!K) {
|
|
608
|
-
var
|
|
609
|
-
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (
|
|
608
|
+
var W = "";
|
|
609
|
+
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (W += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
610
610
|
var be = Te(Y);
|
|
611
|
-
be ?
|
|
611
|
+
be ? W += be : W += de();
|
|
612
612
|
var ae;
|
|
613
|
-
h === null ? ae = "null" : Wt(h) ? ae = "array" : h !== void 0 && h.$$typeof === e ? (ae = "<" + (
|
|
613
|
+
h === null ? ae = "null" : Wt(h) ? ae = "array" : h !== void 0 && h.$$typeof === e ? (ae = "<" + (re(h.type) || "Unknown") + " />", W = " Did you accidentally export a JSX literal instead of a component?") : ae = typeof h, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ae, W);
|
|
614
614
|
}
|
|
615
615
|
var oe = xe(h, x, T, Y, Z);
|
|
616
616
|
if (oe == null)
|
|
@@ -618,10 +618,10 @@ Check the top-level render call using <` + T + ">.");
|
|
|
618
618
|
if (K) {
|
|
619
619
|
var ke = x.children;
|
|
620
620
|
if (ke !== void 0)
|
|
621
|
-
if (
|
|
621
|
+
if (U)
|
|
622
622
|
if (Wt(ke)) {
|
|
623
|
-
for (var
|
|
624
|
-
vr(ke[
|
|
623
|
+
for (var At = 0; At < ke.length; At++)
|
|
624
|
+
vr(ke[At], h);
|
|
625
625
|
Object.freeze && Object.freeze(ke);
|
|
626
626
|
} else
|
|
627
627
|
k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
@@ -632,10 +632,10 @@ Check the top-level render call using <` + T + ">.");
|
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
function br(h, x, T) {
|
|
635
|
-
return
|
|
635
|
+
return Mt(h, x, T, !0);
|
|
636
636
|
}
|
|
637
637
|
function Zr(h, x, T) {
|
|
638
|
-
return
|
|
638
|
+
return Mt(h, x, T, !1);
|
|
639
639
|
}
|
|
640
640
|
var ya = Zr, va = br;
|
|
641
641
|
Yt.Fragment = n, Yt.jsx = ya, Yt.jsxs = va;
|
|
@@ -709,18 +709,18 @@ function Pa() {
|
|
|
709
709
|
if (Zn)
|
|
710
710
|
return Xr;
|
|
711
711
|
Zn = 1;
|
|
712
|
-
var t =
|
|
712
|
+
var t = Et;
|
|
713
713
|
function e(f, d) {
|
|
714
714
|
return f === d && (f !== 0 || 1 / f === 1 / d) || f !== f && d !== d;
|
|
715
715
|
}
|
|
716
716
|
var r = typeof Object.is == "function" ? Object.is : e, n = t.useState, i = t.useEffect, s = t.useLayoutEffect, a = t.useDebugValue;
|
|
717
717
|
function l(f, d) {
|
|
718
|
-
var m = d(), v = n({ inst: { value: m, getSnapshot: d } }), w = v[0].inst,
|
|
718
|
+
var m = d(), v = n({ inst: { value: m, getSnapshot: d } }), w = v[0].inst, E = v[1];
|
|
719
719
|
return s(function() {
|
|
720
|
-
w.value = m, w.getSnapshot = d, o(w) &&
|
|
720
|
+
w.value = m, w.getSnapshot = d, o(w) && E({ inst: w });
|
|
721
721
|
}, [f, m, d]), i(function() {
|
|
722
|
-
return o(w) &&
|
|
723
|
-
o(w) &&
|
|
722
|
+
return o(w) && E({ inst: w }), f(function() {
|
|
723
|
+
o(w) && E({ inst: w });
|
|
724
724
|
});
|
|
725
725
|
}, [f]), a(m), m;
|
|
726
726
|
}
|
|
@@ -754,70 +754,70 @@ var Jn;
|
|
|
754
754
|
function Na() {
|
|
755
755
|
return Jn || (Jn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
756
756
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
757
|
-
var t =
|
|
757
|
+
var t = Et, e = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
758
758
|
function r(C) {
|
|
759
759
|
{
|
|
760
|
-
for (var
|
|
761
|
-
|
|
762
|
-
n("error", C,
|
|
760
|
+
for (var R = arguments.length, A = new Array(R > 1 ? R - 1 : 0), _ = 1; _ < R; _++)
|
|
761
|
+
A[_ - 1] = arguments[_];
|
|
762
|
+
n("error", C, A);
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
|
-
function n(C,
|
|
765
|
+
function n(C, R, A) {
|
|
766
766
|
{
|
|
767
767
|
var _ = e.ReactDebugCurrentFrame, j = _.getStackAddendum();
|
|
768
|
-
j !== "" && (
|
|
769
|
-
var
|
|
770
|
-
return String(
|
|
768
|
+
j !== "" && (R += "%s", A = A.concat([j]));
|
|
769
|
+
var N = A.map(function(F) {
|
|
770
|
+
return String(F);
|
|
771
771
|
});
|
|
772
|
-
|
|
772
|
+
N.unshift("Warning: " + R), Function.prototype.apply.call(console[C], console, N);
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
|
-
function i(C,
|
|
776
|
-
return C ===
|
|
775
|
+
function i(C, R) {
|
|
776
|
+
return C === R && (C !== 0 || 1 / C === 1 / R) || C !== C && R !== R;
|
|
777
777
|
}
|
|
778
778
|
var s = typeof Object.is == "function" ? Object.is : i, a = t.useState, l = t.useEffect, o = t.useLayoutEffect, u = t.useDebugValue, c = !1, f = !1;
|
|
779
|
-
function d(C,
|
|
779
|
+
function d(C, R, A) {
|
|
780
780
|
c || t.startTransition !== void 0 && (c = !0, r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
781
|
-
var _ =
|
|
781
|
+
var _ = R();
|
|
782
782
|
if (!f) {
|
|
783
|
-
var j =
|
|
783
|
+
var j = R();
|
|
784
784
|
s(_, j) || (r("The result of getSnapshot should be cached to avoid an infinite loop"), f = !0);
|
|
785
785
|
}
|
|
786
|
-
var
|
|
786
|
+
var N = a({
|
|
787
787
|
inst: {
|
|
788
788
|
value: _,
|
|
789
|
-
getSnapshot:
|
|
789
|
+
getSnapshot: R
|
|
790
790
|
}
|
|
791
|
-
}),
|
|
791
|
+
}), F = N[0].inst, J = N[1];
|
|
792
792
|
return o(function() {
|
|
793
|
-
|
|
794
|
-
inst:
|
|
793
|
+
F.value = _, F.getSnapshot = R, m(F) && J({
|
|
794
|
+
inst: F
|
|
795
795
|
});
|
|
796
|
-
}, [C, _,
|
|
797
|
-
m(
|
|
798
|
-
inst:
|
|
796
|
+
}, [C, _, R]), l(function() {
|
|
797
|
+
m(F) && J({
|
|
798
|
+
inst: F
|
|
799
799
|
});
|
|
800
|
-
var
|
|
801
|
-
m(
|
|
802
|
-
inst:
|
|
800
|
+
var H = function() {
|
|
801
|
+
m(F) && J({
|
|
802
|
+
inst: F
|
|
803
803
|
});
|
|
804
804
|
};
|
|
805
|
-
return C(
|
|
805
|
+
return C(H);
|
|
806
806
|
}, [C]), u(_), _;
|
|
807
807
|
}
|
|
808
808
|
function m(C) {
|
|
809
|
-
var
|
|
809
|
+
var R = C.getSnapshot, A = C.value;
|
|
810
810
|
try {
|
|
811
|
-
var _ =
|
|
812
|
-
return !s(
|
|
811
|
+
var _ = R();
|
|
812
|
+
return !s(A, _);
|
|
813
813
|
} catch {
|
|
814
814
|
return !0;
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
function v(C,
|
|
818
|
-
return
|
|
817
|
+
function v(C, R, A) {
|
|
818
|
+
return R();
|
|
819
819
|
}
|
|
820
|
-
var w = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u",
|
|
820
|
+
var w = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", E = !w, O = E ? v : d, k = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : O;
|
|
821
821
|
en.useSyncExternalStore = k, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
822
822
|
}()), en;
|
|
823
823
|
}
|
|
@@ -841,7 +841,7 @@ function ja() {
|
|
|
841
841
|
if (ei)
|
|
842
842
|
return Jr;
|
|
843
843
|
ei = 1;
|
|
844
|
-
var t =
|
|
844
|
+
var t = Et, e = bn();
|
|
845
845
|
function r(u, c) {
|
|
846
846
|
return u === c && (u !== 0 || 1 / u === 1 / c) || u !== u && c !== c;
|
|
847
847
|
}
|
|
@@ -859,26 +859,26 @@ function ja() {
|
|
|
859
859
|
if (k = !0, C = _, _ = d(_), m !== void 0 && w.hasValue) {
|
|
860
860
|
var j = w.value;
|
|
861
861
|
if (m(j, _))
|
|
862
|
-
return
|
|
862
|
+
return R = j;
|
|
863
863
|
}
|
|
864
|
-
return
|
|
864
|
+
return R = _;
|
|
865
865
|
}
|
|
866
|
-
if (j =
|
|
866
|
+
if (j = R, n(C, _))
|
|
867
867
|
return j;
|
|
868
|
-
var
|
|
869
|
-
return m !== void 0 && m(j,
|
|
868
|
+
var N = d(_);
|
|
869
|
+
return m !== void 0 && m(j, N) ? j : (C = _, R = N);
|
|
870
870
|
}
|
|
871
|
-
var k = !1, C,
|
|
871
|
+
var k = !1, C, R, A = f === void 0 ? null : f;
|
|
872
872
|
return [function() {
|
|
873
873
|
return O(c());
|
|
874
|
-
},
|
|
875
|
-
return O(
|
|
874
|
+
}, A === null ? void 0 : function() {
|
|
875
|
+
return O(A());
|
|
876
876
|
}];
|
|
877
877
|
}, [c, f, d, m]);
|
|
878
|
-
var
|
|
878
|
+
var E = i(u, v[0], v[1]);
|
|
879
879
|
return a(function() {
|
|
880
|
-
w.hasValue = !0, w.value =
|
|
881
|
-
}, [
|
|
880
|
+
w.hasValue = !0, w.value = E;
|
|
881
|
+
}, [E]), o(E), E;
|
|
882
882
|
}, Jr;
|
|
883
883
|
}
|
|
884
884
|
var tn = {};
|
|
@@ -895,44 +895,44 @@ var ti;
|
|
|
895
895
|
function Ma() {
|
|
896
896
|
return ti || (ti = 1, process.env.NODE_ENV !== "production" && function() {
|
|
897
897
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
898
|
-
var t =
|
|
898
|
+
var t = Et, e = bn();
|
|
899
899
|
function r(c, f) {
|
|
900
900
|
return c === f && (c !== 0 || 1 / c === 1 / f) || c !== c && f !== f;
|
|
901
901
|
}
|
|
902
902
|
var n = typeof Object.is == "function" ? Object.is : r, i = e.useSyncExternalStore, s = t.useRef, a = t.useEffect, l = t.useMemo, o = t.useDebugValue;
|
|
903
903
|
function u(c, f, d, m, v) {
|
|
904
|
-
var w = s(null),
|
|
905
|
-
w.current === null ? (
|
|
904
|
+
var w = s(null), E;
|
|
905
|
+
w.current === null ? (E = {
|
|
906
906
|
hasValue: !1,
|
|
907
907
|
value: null
|
|
908
|
-
}, w.current =
|
|
908
|
+
}, w.current = E) : E = w.current;
|
|
909
909
|
var O = l(function() {
|
|
910
|
-
var
|
|
911
|
-
if (!
|
|
912
|
-
|
|
913
|
-
var
|
|
914
|
-
if (v !== void 0 &&
|
|
915
|
-
var ce =
|
|
916
|
-
if (v(ce,
|
|
910
|
+
var A = !1, _, j, N = function(M) {
|
|
911
|
+
if (!A) {
|
|
912
|
+
A = !0, _ = M;
|
|
913
|
+
var re = m(M);
|
|
914
|
+
if (v !== void 0 && E.hasValue) {
|
|
915
|
+
var ce = E.value;
|
|
916
|
+
if (v(ce, re))
|
|
917
917
|
return j = ce, ce;
|
|
918
918
|
}
|
|
919
|
-
return j =
|
|
919
|
+
return j = re, re;
|
|
920
920
|
}
|
|
921
921
|
var ye = _, ve = j;
|
|
922
|
-
if (n(ye,
|
|
922
|
+
if (n(ye, M))
|
|
923
923
|
return ve;
|
|
924
|
-
var
|
|
925
|
-
return v !== void 0 && v(ve,
|
|
926
|
-
},
|
|
927
|
-
return
|
|
928
|
-
},
|
|
929
|
-
return
|
|
924
|
+
var X = m(M);
|
|
925
|
+
return v !== void 0 && v(ve, X) ? ve : (_ = M, j = X, X);
|
|
926
|
+
}, F = d === void 0 ? null : d, J = function() {
|
|
927
|
+
return N(f());
|
|
928
|
+
}, H = F === null ? void 0 : function() {
|
|
929
|
+
return N(F());
|
|
930
930
|
};
|
|
931
|
-
return [
|
|
932
|
-
}, [f, d, m, v]), k = O[0], C = O[1],
|
|
931
|
+
return [J, H];
|
|
932
|
+
}, [f, d, m, v]), k = O[0], C = O[1], R = i(c, k, C);
|
|
933
933
|
return a(function() {
|
|
934
|
-
|
|
935
|
-
}, [
|
|
934
|
+
E.hasValue = !0, E.value = R;
|
|
935
|
+
}, [R]), o(R), R;
|
|
936
936
|
}
|
|
937
937
|
tn.useSyncExternalStoreWithSelector = u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
938
938
|
}()), tn;
|
|
@@ -999,8 +999,8 @@ function Va(t) {
|
|
|
999
999
|
}
|
|
1000
1000
|
function c(m, v, w) {
|
|
1001
1001
|
v === void 0 && (v = null);
|
|
1002
|
-
let
|
|
1003
|
-
return Ua(
|
|
1002
|
+
let E = dn(i ? u().pathname : "/", m, v, w);
|
|
1003
|
+
return Ua(E.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(m)), E;
|
|
1004
1004
|
}
|
|
1005
1005
|
function f(m) {
|
|
1006
1006
|
return typeof m == "string" ? m : Ve(m);
|
|
@@ -1061,7 +1061,7 @@ function Va(t) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
};
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function P(t, e) {
|
|
1065
1065
|
if (t === !1 || t === null || typeof t > "u")
|
|
1066
1066
|
throw new Error(e);
|
|
1067
1067
|
}
|
|
@@ -1119,7 +1119,7 @@ function Ba(t) {
|
|
|
1119
1119
|
function ss(t, e, r) {
|
|
1120
1120
|
return e === void 0 && (e = []), r === void 0 && (r = /* @__PURE__ */ new Set()), t.map((n, i) => {
|
|
1121
1121
|
let s = [...e, i], a = typeof n.id == "string" ? n.id : s.join("-");
|
|
1122
|
-
return
|
|
1122
|
+
return P(n.index !== !0 || !n.children, "Cannot specify children on an index route"), P(!r.has(a), 'Found a route id collision on id "' + a + `". Route id's must be globally unique within Data Router usages`), r.add(a), Ba(n) ? G({}, n, {
|
|
1123
1123
|
id: a
|
|
1124
1124
|
}) : G({}, n, {
|
|
1125
1125
|
id: a,
|
|
@@ -1157,9 +1157,9 @@ function as(t, e, r, n) {
|
|
|
1157
1157
|
childrenIndex: a,
|
|
1158
1158
|
route: s
|
|
1159
1159
|
};
|
|
1160
|
-
o.relativePath.startsWith("/") && (
|
|
1160
|
+
o.relativePath.startsWith("/") && (P(o.relativePath.startsWith(n), 'Absolute route path "' + o.relativePath + '" nested under path ' + ('"' + n + '" is not valid. An absolute child route path ') + "must start with the combined path of all its parent routes."), o.relativePath = o.relativePath.slice(n.length));
|
|
1161
1161
|
let u = Ie([n, o.relativePath]), c = r.concat(o);
|
|
1162
|
-
s.children && s.children.length > 0 && (
|
|
1162
|
+
s.children && s.children.length > 0 && (P(
|
|
1163
1163
|
// Our types know better, but runtime JS may not!
|
|
1164
1164
|
// @ts-expect-error
|
|
1165
1165
|
s.index !== !0,
|
|
@@ -1321,7 +1321,7 @@ function Mr(t) {
|
|
|
1321
1321
|
function wn(t, e, r, n) {
|
|
1322
1322
|
n === void 0 && (n = !1);
|
|
1323
1323
|
let i;
|
|
1324
|
-
typeof t == "string" ? i = $e(t) : (i = G({}, t),
|
|
1324
|
+
typeof t == "string" ? i = $e(t) : (i = G({}, t), P(!i.pathname || !i.pathname.includes("?"), rn("?", "pathname", "search", i)), P(!i.pathname || !i.pathname.includes("#"), rn("#", "pathname", "hash", i)), P(!i.search || !i.search.includes("#"), rn("#", "search", "hash", i)));
|
|
1325
1325
|
let s = t === "" || i.pathname === "", a = s ? "/" : i.pathname, l;
|
|
1326
1326
|
if (n || a == null)
|
|
1327
1327
|
l = r;
|
|
@@ -1343,7 +1343,7 @@ class ii extends Error {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
class uo {
|
|
1345
1345
|
constructor(e, r) {
|
|
1346
|
-
this.pendingKeysSet = /* @__PURE__ */ new Set(), this.subscribers = /* @__PURE__ */ new Set(), this.deferredKeys = [],
|
|
1346
|
+
this.pendingKeysSet = /* @__PURE__ */ new Set(), this.subscribers = /* @__PURE__ */ new Set(), this.deferredKeys = [], P(e && typeof e == "object" && !Array.isArray(e), "defer() only accepts plain objects");
|
|
1347
1347
|
let n;
|
|
1348
1348
|
this.abortPromise = new Promise((s, a) => n = a), this.controller = new AbortController();
|
|
1349
1349
|
let i = () => n(new ii("Deferred data aborted"));
|
|
@@ -1398,7 +1398,7 @@ class uo {
|
|
|
1398
1398
|
return this.pendingKeysSet.size === 0;
|
|
1399
1399
|
}
|
|
1400
1400
|
get unwrappedData() {
|
|
1401
|
-
return
|
|
1401
|
+
return P(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds"), Object.entries(this.data).reduce((e, r) => {
|
|
1402
1402
|
let [n, i] = r;
|
|
1403
1403
|
return Object.assign(e, {
|
|
1404
1404
|
[n]: ho(i)
|
|
@@ -1448,7 +1448,7 @@ const ds = ["post", "put", "patch", "delete"], fo = new Set(ds), po = ["get", ..
|
|
|
1448
1448
|
location: void 0
|
|
1449
1449
|
}, hs = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", bo = !hs;
|
|
1450
1450
|
function wo(t) {
|
|
1451
|
-
|
|
1451
|
+
P(t.routes.length > 0, "You must provide a non-empty routes array to createRouter");
|
|
1452
1452
|
let e = ss(t.routes), r = null, n = /* @__PURE__ */ new Set(), i = null, s = null, a = null, l = t.hydrationData != null, o = er(e, t.history.location, t.basename), u = null;
|
|
1453
1453
|
if (o == null) {
|
|
1454
1454
|
let g = it(404, {
|
|
@@ -1476,7 +1476,7 @@ function wo(t) {
|
|
|
1476
1476
|
errors: t.hydrationData && t.hydrationData.errors || u,
|
|
1477
1477
|
fetchers: /* @__PURE__ */ new Map(),
|
|
1478
1478
|
blockers: /* @__PURE__ */ new Map()
|
|
1479
|
-
}, m = le.Pop, v = !1, w,
|
|
1479
|
+
}, m = le.Pop, v = !1, w, E = !1, O = !1, k = [], C = [], R = /* @__PURE__ */ new Map(), A = 0, _ = -1, j = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), H = null, M = /* @__PURE__ */ new Map(), re = !1;
|
|
1480
1480
|
function ce() {
|
|
1481
1481
|
return r = t.history.listen((g) => {
|
|
1482
1482
|
let {
|
|
@@ -1484,18 +1484,18 @@ function wo(t) {
|
|
|
1484
1484
|
location: S,
|
|
1485
1485
|
delta: L
|
|
1486
1486
|
} = g;
|
|
1487
|
-
if (
|
|
1488
|
-
|
|
1487
|
+
if (re) {
|
|
1488
|
+
re = !1;
|
|
1489
1489
|
return;
|
|
1490
1490
|
}
|
|
1491
|
-
Ue(
|
|
1491
|
+
Ue(H != null && L === null, "You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");
|
|
1492
1492
|
let D = gr({
|
|
1493
1493
|
currentLocation: d.location,
|
|
1494
1494
|
nextLocation: S,
|
|
1495
1495
|
historyAction: b
|
|
1496
1496
|
});
|
|
1497
1497
|
if (D && L != null) {
|
|
1498
|
-
|
|
1498
|
+
re = !0, t.history.go(L * -1), He(D, {
|
|
1499
1499
|
state: "blocked",
|
|
1500
1500
|
location: S,
|
|
1501
1501
|
proceed() {
|
|
@@ -1507,7 +1507,7 @@ function wo(t) {
|
|
|
1507
1507
|
}), t.history.go(L);
|
|
1508
1508
|
},
|
|
1509
1509
|
reset() {
|
|
1510
|
-
nt(D),
|
|
1510
|
+
nt(D), X({
|
|
1511
1511
|
blockers: new Map(f.state.blockers)
|
|
1512
1512
|
});
|
|
1513
1513
|
}
|
|
@@ -1518,34 +1518,34 @@ function wo(t) {
|
|
|
1518
1518
|
}), d.initialized || Ce(le.Pop, d.location), f;
|
|
1519
1519
|
}
|
|
1520
1520
|
function ye() {
|
|
1521
|
-
r && r(), n.clear(), w && w.abort(), d.fetchers.forEach((g, b) =>
|
|
1521
|
+
r && r(), n.clear(), w && w.abort(), d.fetchers.forEach((g, b) => Dt(b)), d.blockers.forEach((g, b) => nt(b));
|
|
1522
1522
|
}
|
|
1523
1523
|
function ve(g) {
|
|
1524
1524
|
return n.add(g), () => n.delete(g);
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function X(g) {
|
|
1527
1527
|
d = G({}, d, g), n.forEach((b) => b(d));
|
|
1528
1528
|
}
|
|
1529
1529
|
function Le(g, b) {
|
|
1530
1530
|
var S, L;
|
|
1531
|
-
let D = d.actionData != null && d.navigation.formMethod != null && Ke(d.navigation.formMethod) && d.navigation.state === "loading" && ((S = g.state) == null ? void 0 : S._isRedirect) !== !0,
|
|
1532
|
-
b.actionData ? Object.keys(b.actionData).length > 0 ?
|
|
1533
|
-
let
|
|
1534
|
-
for (let [
|
|
1535
|
-
nt(
|
|
1536
|
-
let
|
|
1537
|
-
|
|
1538
|
-
actionData:
|
|
1539
|
-
loaderData:
|
|
1531
|
+
let D = d.actionData != null && d.navigation.formMethod != null && Ke(d.navigation.formMethod) && d.navigation.state === "loading" && ((S = g.state) == null ? void 0 : S._isRedirect) !== !0, V;
|
|
1532
|
+
b.actionData ? Object.keys(b.actionData).length > 0 ? V = b.actionData : V = null : D ? V = d.actionData : V = null;
|
|
1533
|
+
let I = b.loaderData ? ci(d.loaderData, b.loaderData, b.matches || [], b.errors) : d.loaderData;
|
|
1534
|
+
for (let [q] of M)
|
|
1535
|
+
nt(q);
|
|
1536
|
+
let z = v === !0 || d.navigation.formMethod != null && Ke(d.navigation.formMethod) && ((L = g.state) == null ? void 0 : L._isRedirect) !== !0;
|
|
1537
|
+
X(G({}, b, {
|
|
1538
|
+
actionData: V,
|
|
1539
|
+
loaderData: I,
|
|
1540
1540
|
historyAction: m,
|
|
1541
1541
|
location: g,
|
|
1542
1542
|
initialized: !0,
|
|
1543
1543
|
navigation: nn,
|
|
1544
1544
|
revalidation: "idle",
|
|
1545
1545
|
restoreScrollPosition: yr(g, b.matches || d.matches),
|
|
1546
|
-
preventScrollReset:
|
|
1546
|
+
preventScrollReset: z,
|
|
1547
1547
|
blockers: new Map(d.blockers)
|
|
1548
|
-
})),
|
|
1548
|
+
})), E || m === le.Pop || (m === le.Push ? t.history.push(g, g.state) : m === le.Replace && t.history.replace(g, g.state)), m = le.Pop, v = !1, E = !1, O = !1, k = [], C = [];
|
|
1549
1549
|
}
|
|
1550
1550
|
async function tt(g, b) {
|
|
1551
1551
|
if (typeof g == "number") {
|
|
@@ -1556,36 +1556,36 @@ function wo(t) {
|
|
|
1556
1556
|
path: S,
|
|
1557
1557
|
submission: L,
|
|
1558
1558
|
error: D
|
|
1559
|
-
} = ai(g, b),
|
|
1560
|
-
|
|
1561
|
-
let
|
|
1562
|
-
|
|
1563
|
-
let he = b && "preventScrollReset" in b ? b.preventScrollReset === !0 : void 0,
|
|
1564
|
-
currentLocation:
|
|
1565
|
-
nextLocation:
|
|
1566
|
-
historyAction:
|
|
1559
|
+
} = ai(g, b), V = d.location, I = dn(d.location, S, b && b.state);
|
|
1560
|
+
I = G({}, I, t.history.encodeLocation(I));
|
|
1561
|
+
let z = b && b.replace != null ? b.replace : void 0, q = le.Push;
|
|
1562
|
+
z === !0 ? q = le.Replace : z === !1 || L != null && Ke(L.formMethod) && L.formAction === d.location.pathname + d.location.search && (q = le.Replace);
|
|
1563
|
+
let he = b && "preventScrollReset" in b ? b.preventScrollReset === !0 : void 0, Q = gr({
|
|
1564
|
+
currentLocation: V,
|
|
1565
|
+
nextLocation: I,
|
|
1566
|
+
historyAction: q
|
|
1567
1567
|
});
|
|
1568
|
-
if (
|
|
1569
|
-
He(
|
|
1568
|
+
if (Q) {
|
|
1569
|
+
He(Q, {
|
|
1570
1570
|
state: "blocked",
|
|
1571
|
-
location:
|
|
1571
|
+
location: I,
|
|
1572
1572
|
proceed() {
|
|
1573
|
-
He(
|
|
1573
|
+
He(Q, {
|
|
1574
1574
|
state: "proceeding",
|
|
1575
1575
|
proceed: void 0,
|
|
1576
1576
|
reset: void 0,
|
|
1577
|
-
location:
|
|
1577
|
+
location: I
|
|
1578
1578
|
}), tt(g, b);
|
|
1579
1579
|
},
|
|
1580
1580
|
reset() {
|
|
1581
|
-
nt(
|
|
1581
|
+
nt(Q), X({
|
|
1582
1582
|
blockers: new Map(d.blockers)
|
|
1583
1583
|
});
|
|
1584
1584
|
}
|
|
1585
1585
|
});
|
|
1586
1586
|
return;
|
|
1587
1587
|
}
|
|
1588
|
-
return await Ce(
|
|
1588
|
+
return await Ce(q, I, {
|
|
1589
1589
|
submission: L,
|
|
1590
1590
|
// Send through the formData serialization error if we have one so we can
|
|
1591
1591
|
// render at the right error boundary after we match routes
|
|
@@ -1595,7 +1595,7 @@ function wo(t) {
|
|
|
1595
1595
|
});
|
|
1596
1596
|
}
|
|
1597
1597
|
function ie() {
|
|
1598
|
-
if (rt(),
|
|
1598
|
+
if (rt(), X({
|
|
1599
1599
|
revalidation: "loading"
|
|
1600
1600
|
}), d.navigation.state !== "submitting") {
|
|
1601
1601
|
if (d.navigation.state === "idle") {
|
|
@@ -1610,10 +1610,10 @@ function wo(t) {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
}
|
|
1612
1612
|
async function Ce(g, b, S) {
|
|
1613
|
-
w && w.abort(), w = null, m = g,
|
|
1613
|
+
w && w.abort(), w = null, m = g, E = (S && S.startUninterruptedRevalidation) === !0, Yr(d.location, d.matches), v = (S && S.preventScrollReset) === !0;
|
|
1614
1614
|
let L = S && S.overrideNavigation, D = er(e, b, t.basename);
|
|
1615
1615
|
if (!D) {
|
|
1616
|
-
let
|
|
1616
|
+
let ne = it(404, {
|
|
1617
1617
|
pathname: b.pathname
|
|
1618
1618
|
}), {
|
|
1619
1619
|
matches: Se,
|
|
@@ -1623,7 +1623,7 @@ function wo(t) {
|
|
|
1623
1623
|
matches: Se,
|
|
1624
1624
|
loaderData: {},
|
|
1625
1625
|
errors: {
|
|
1626
|
-
[xe.id]:
|
|
1626
|
+
[xe.id]: ne
|
|
1627
1627
|
}
|
|
1628
1628
|
});
|
|
1629
1629
|
return;
|
|
@@ -1635,93 +1635,93 @@ function wo(t) {
|
|
|
1635
1635
|
return;
|
|
1636
1636
|
}
|
|
1637
1637
|
w = new AbortController();
|
|
1638
|
-
let
|
|
1638
|
+
let V = Jt(t.history, b, w.signal, S && S.submission), I, z;
|
|
1639
1639
|
if (S && S.pendingError)
|
|
1640
|
-
|
|
1640
|
+
z = {
|
|
1641
1641
|
[qt(D).route.id]: S.pendingError
|
|
1642
1642
|
};
|
|
1643
1643
|
else if (S && S.submission && Ke(S.submission.formMethod)) {
|
|
1644
|
-
let
|
|
1644
|
+
let ne = await dr(V, b, S.submission, D, {
|
|
1645
1645
|
replace: S.replace
|
|
1646
1646
|
});
|
|
1647
|
-
if (
|
|
1647
|
+
if (ne.shortCircuited)
|
|
1648
1648
|
return;
|
|
1649
|
-
|
|
1649
|
+
I = ne.pendingActionData, z = ne.pendingActionError, L = G({
|
|
1650
1650
|
state: "loading",
|
|
1651
1651
|
location: b
|
|
1652
|
-
}, S.submission),
|
|
1653
|
-
signal:
|
|
1652
|
+
}, S.submission), V = new Request(V.url, {
|
|
1653
|
+
signal: V.signal
|
|
1654
1654
|
});
|
|
1655
1655
|
}
|
|
1656
1656
|
let {
|
|
1657
|
-
shortCircuited:
|
|
1657
|
+
shortCircuited: q,
|
|
1658
1658
|
loaderData: he,
|
|
1659
|
-
errors:
|
|
1660
|
-
} = await hr(
|
|
1661
|
-
|
|
1659
|
+
errors: Q
|
|
1660
|
+
} = await hr(V, b, D, L, S && S.submission, S && S.replace, I, z);
|
|
1661
|
+
q || (w = null, Le(b, G({
|
|
1662
1662
|
matches: D
|
|
1663
|
-
},
|
|
1664
|
-
actionData:
|
|
1663
|
+
}, I ? {
|
|
1664
|
+
actionData: I
|
|
1665
1665
|
} : {}, {
|
|
1666
1666
|
loaderData: he,
|
|
1667
|
-
errors:
|
|
1667
|
+
errors: Q
|
|
1668
1668
|
})));
|
|
1669
1669
|
}
|
|
1670
1670
|
async function dr(g, b, S, L, D) {
|
|
1671
1671
|
rt();
|
|
1672
|
-
let
|
|
1672
|
+
let V = G({
|
|
1673
1673
|
state: "submitting",
|
|
1674
1674
|
location: b
|
|
1675
1675
|
}, S);
|
|
1676
|
-
|
|
1677
|
-
navigation:
|
|
1676
|
+
X({
|
|
1677
|
+
navigation: V
|
|
1678
1678
|
});
|
|
1679
|
-
let
|
|
1680
|
-
if (!
|
|
1681
|
-
|
|
1679
|
+
let I, z = mi(L, b);
|
|
1680
|
+
if (!z.route.action)
|
|
1681
|
+
I = {
|
|
1682
1682
|
type: fe.error,
|
|
1683
1683
|
error: it(405, {
|
|
1684
1684
|
method: g.method,
|
|
1685
1685
|
pathname: b.pathname,
|
|
1686
|
-
routeId:
|
|
1686
|
+
routeId: z.route.id
|
|
1687
1687
|
})
|
|
1688
1688
|
};
|
|
1689
|
-
else if (
|
|
1689
|
+
else if (I = await Zt("action", g, z, L, f.basename), g.signal.aborted)
|
|
1690
1690
|
return {
|
|
1691
1691
|
shortCircuited: !0
|
|
1692
1692
|
};
|
|
1693
|
-
if (Vt(
|
|
1694
|
-
let
|
|
1695
|
-
return D && D.replace != null ?
|
|
1693
|
+
if (Vt(I)) {
|
|
1694
|
+
let q;
|
|
1695
|
+
return D && D.replace != null ? q = D.replace : q = I.location === d.location.pathname + d.location.search, await Ae(d, I, {
|
|
1696
1696
|
submission: S,
|
|
1697
|
-
replace:
|
|
1697
|
+
replace: q
|
|
1698
1698
|
}), {
|
|
1699
1699
|
shortCircuited: !0
|
|
1700
1700
|
};
|
|
1701
1701
|
}
|
|
1702
|
-
if (rr(
|
|
1703
|
-
let
|
|
1702
|
+
if (rr(I)) {
|
|
1703
|
+
let q = qt(L, z.route.id);
|
|
1704
1704
|
return (D && D.replace) !== !0 && (m = le.Push), {
|
|
1705
1705
|
// Send back an empty object we can use to clear out any prior actionData
|
|
1706
1706
|
pendingActionData: {},
|
|
1707
1707
|
pendingActionError: {
|
|
1708
|
-
[
|
|
1708
|
+
[q.route.id]: I.error
|
|
1709
1709
|
}
|
|
1710
1710
|
};
|
|
1711
1711
|
}
|
|
1712
|
-
if (
|
|
1712
|
+
if (mt(I))
|
|
1713
1713
|
throw it(400, {
|
|
1714
1714
|
type: "defer-action"
|
|
1715
1715
|
});
|
|
1716
1716
|
return {
|
|
1717
1717
|
pendingActionData: {
|
|
1718
|
-
[
|
|
1718
|
+
[z.route.id]: I.data
|
|
1719
1719
|
}
|
|
1720
1720
|
};
|
|
1721
1721
|
}
|
|
1722
|
-
async function hr(g, b, S, L, D,
|
|
1723
|
-
let
|
|
1724
|
-
|
|
1722
|
+
async function hr(g, b, S, L, D, V, I, z) {
|
|
1723
|
+
let q = L;
|
|
1724
|
+
q || (q = G({
|
|
1725
1725
|
state: "loading",
|
|
1726
1726
|
location: b,
|
|
1727
1727
|
formMethod: void 0,
|
|
@@ -1729,26 +1729,26 @@ function wo(t) {
|
|
|
1729
1729
|
formEncType: void 0,
|
|
1730
1730
|
formData: void 0
|
|
1731
1731
|
}, D));
|
|
1732
|
-
let he = D || (
|
|
1733
|
-
formMethod:
|
|
1734
|
-
formAction:
|
|
1735
|
-
formData:
|
|
1736
|
-
formEncType:
|
|
1737
|
-
} : void 0), [
|
|
1738
|
-
if (zt((de) => !(S && S.some((Te) => Te.route.id === de)) ||
|
|
1732
|
+
let he = D || (q.formMethod && q.formAction && q.formData && q.formEncType ? {
|
|
1733
|
+
formMethod: q.formMethod,
|
|
1734
|
+
formAction: q.formAction,
|
|
1735
|
+
formData: q.formData,
|
|
1736
|
+
formEncType: q.formEncType
|
|
1737
|
+
} : void 0), [Q, ne] = oi(t.history, d, S, he, b, O, k, C, I, z, F);
|
|
1738
|
+
if (zt((de) => !(S && S.some((Te) => Te.route.id === de)) || Q && Q.some((Te) => Te.route.id === de)), Q.length === 0 && ne.length === 0)
|
|
1739
1739
|
return Le(b, G({
|
|
1740
1740
|
matches: S,
|
|
1741
1741
|
loaderData: {},
|
|
1742
1742
|
// Commit pending error if we're short circuiting
|
|
1743
|
-
errors:
|
|
1744
|
-
},
|
|
1745
|
-
actionData:
|
|
1743
|
+
errors: z || null
|
|
1744
|
+
}, I ? {
|
|
1745
|
+
actionData: I
|
|
1746
1746
|
} : {})), {
|
|
1747
1747
|
shortCircuited: !0
|
|
1748
1748
|
};
|
|
1749
|
-
if (!
|
|
1750
|
-
|
|
1751
|
-
let qe = d.fetchers.get(Te.key),
|
|
1749
|
+
if (!E) {
|
|
1750
|
+
ne.forEach((Te) => {
|
|
1751
|
+
let qe = d.fetchers.get(Te.key), Nt = {
|
|
1752
1752
|
state: "loading",
|
|
1753
1753
|
data: qe && qe.data,
|
|
1754
1754
|
formMethod: void 0,
|
|
@@ -1757,51 +1757,51 @@ function wo(t) {
|
|
|
1757
1757
|
formData: void 0,
|
|
1758
1758
|
" _hasFetcherDoneAnything ": !0
|
|
1759
1759
|
};
|
|
1760
|
-
d.fetchers.set(Te.key,
|
|
1760
|
+
d.fetchers.set(Te.key, Nt);
|
|
1761
1761
|
});
|
|
1762
|
-
let de =
|
|
1763
|
-
|
|
1764
|
-
navigation:
|
|
1762
|
+
let de = I || d.actionData;
|
|
1763
|
+
X(G({
|
|
1764
|
+
navigation: q
|
|
1765
1765
|
}, de ? Object.keys(de).length === 0 ? {
|
|
1766
1766
|
actionData: null
|
|
1767
1767
|
} : {
|
|
1768
1768
|
actionData: de
|
|
1769
|
-
} : {},
|
|
1769
|
+
} : {}, ne.length > 0 ? {
|
|
1770
1770
|
fetchers: new Map(d.fetchers)
|
|
1771
1771
|
} : {}));
|
|
1772
1772
|
}
|
|
1773
|
-
_ = ++
|
|
1773
|
+
_ = ++A, ne.forEach((de) => R.set(de.key, w));
|
|
1774
1774
|
let {
|
|
1775
1775
|
results: Se,
|
|
1776
1776
|
loaderResults: xe,
|
|
1777
1777
|
fetcherResults: Qe
|
|
1778
|
-
} = await
|
|
1778
|
+
} = await kt(d.matches, S, Q, ne, g);
|
|
1779
1779
|
if (g.signal.aborted)
|
|
1780
1780
|
return {
|
|
1781
1781
|
shortCircuited: !0
|
|
1782
1782
|
};
|
|
1783
|
-
|
|
1783
|
+
ne.forEach((de) => R.delete(de.key));
|
|
1784
1784
|
let dt = hi(Se);
|
|
1785
1785
|
if (dt)
|
|
1786
1786
|
return await Ae(d, dt, {
|
|
1787
|
-
replace:
|
|
1787
|
+
replace: V
|
|
1788
1788
|
}), {
|
|
1789
1789
|
shortCircuited: !0
|
|
1790
1790
|
};
|
|
1791
1791
|
let {
|
|
1792
1792
|
loaderData: Pe,
|
|
1793
1793
|
errors: Fe
|
|
1794
|
-
} = ui(d, S,
|
|
1795
|
-
|
|
1794
|
+
} = ui(d, S, Q, xe, z, ne, Qe, J);
|
|
1795
|
+
J.forEach((de, Te) => {
|
|
1796
1796
|
de.subscribe((qe) => {
|
|
1797
|
-
(qe || de.done) &&
|
|
1797
|
+
(qe || de.done) && J.delete(Te);
|
|
1798
1798
|
});
|
|
1799
|
-
}),
|
|
1799
|
+
}), Pt();
|
|
1800
1800
|
let ht = ct(_);
|
|
1801
1801
|
return G({
|
|
1802
1802
|
loaderData: Pe,
|
|
1803
1803
|
errors: Fe
|
|
1804
|
-
}, ht ||
|
|
1804
|
+
}, ht || ne.length > 0 ? {
|
|
1805
1805
|
fetchers: new Map(d.fetchers)
|
|
1806
1806
|
} : {});
|
|
1807
1807
|
}
|
|
@@ -1811,7 +1811,7 @@ function wo(t) {
|
|
|
1811
1811
|
function Kr(g, b, S, L) {
|
|
1812
1812
|
if (bo)
|
|
1813
1813
|
throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");
|
|
1814
|
-
|
|
1814
|
+
R.has(g) && Lt(g);
|
|
1815
1815
|
let D = er(e, S, t.basename);
|
|
1816
1816
|
if (!D) {
|
|
1817
1817
|
Qt(g, b, it(404, {
|
|
@@ -1820,76 +1820,76 @@ function wo(t) {
|
|
|
1820
1820
|
return;
|
|
1821
1821
|
}
|
|
1822
1822
|
let {
|
|
1823
|
-
path:
|
|
1824
|
-
submission:
|
|
1825
|
-
} = ai(S, L, !0),
|
|
1826
|
-
if (v = (L && L.preventScrollReset) === !0,
|
|
1827
|
-
Bt(g, b,
|
|
1823
|
+
path: V,
|
|
1824
|
+
submission: I
|
|
1825
|
+
} = ai(S, L, !0), z = mi(D, V);
|
|
1826
|
+
if (v = (L && L.preventScrollReset) === !0, I && Ke(I.formMethod)) {
|
|
1827
|
+
Bt(g, b, V, z, D, I);
|
|
1828
1828
|
return;
|
|
1829
1829
|
}
|
|
1830
|
-
|
|
1830
|
+
F.set(g, {
|
|
1831
1831
|
routeId: b,
|
|
1832
|
-
path:
|
|
1833
|
-
match:
|
|
1832
|
+
path: V,
|
|
1833
|
+
match: z,
|
|
1834
1834
|
matches: D
|
|
1835
|
-
}), Ht(g, b,
|
|
1835
|
+
}), Ht(g, b, V, z, D, I);
|
|
1836
1836
|
}
|
|
1837
|
-
async function Bt(g, b, S, L, D,
|
|
1838
|
-
if (rt(),
|
|
1837
|
+
async function Bt(g, b, S, L, D, V) {
|
|
1838
|
+
if (rt(), F.delete(g), !L.route.action) {
|
|
1839
1839
|
let Ne = it(405, {
|
|
1840
|
-
method:
|
|
1840
|
+
method: V.formMethod,
|
|
1841
1841
|
pathname: S,
|
|
1842
1842
|
routeId: b
|
|
1843
1843
|
});
|
|
1844
1844
|
Qt(g, b, Ne);
|
|
1845
1845
|
return;
|
|
1846
1846
|
}
|
|
1847
|
-
let
|
|
1847
|
+
let I = d.fetchers.get(g), z = G({
|
|
1848
1848
|
state: "submitting"
|
|
1849
|
-
},
|
|
1850
|
-
data:
|
|
1849
|
+
}, V, {
|
|
1850
|
+
data: I && I.data,
|
|
1851
1851
|
" _hasFetcherDoneAnything ": !0
|
|
1852
1852
|
});
|
|
1853
|
-
d.fetchers.set(g,
|
|
1853
|
+
d.fetchers.set(g, z), X({
|
|
1854
1854
|
fetchers: new Map(d.fetchers)
|
|
1855
1855
|
});
|
|
1856
|
-
let
|
|
1857
|
-
|
|
1858
|
-
let
|
|
1856
|
+
let q = new AbortController(), he = Jt(t.history, S, q.signal, V);
|
|
1857
|
+
R.set(g, q);
|
|
1858
|
+
let Q = await Zt("action", he, L, D, f.basename);
|
|
1859
1859
|
if (he.signal.aborted) {
|
|
1860
|
-
|
|
1860
|
+
R.get(g) === q && R.delete(g);
|
|
1861
1861
|
return;
|
|
1862
1862
|
}
|
|
1863
|
-
if (Vt(
|
|
1864
|
-
|
|
1863
|
+
if (Vt(Q)) {
|
|
1864
|
+
R.delete(g), N.add(g);
|
|
1865
1865
|
let Ne = G({
|
|
1866
1866
|
state: "loading"
|
|
1867
|
-
},
|
|
1867
|
+
}, V, {
|
|
1868
1868
|
data: void 0,
|
|
1869
1869
|
" _hasFetcherDoneAnything ": !0
|
|
1870
1870
|
});
|
|
1871
|
-
return d.fetchers.set(g, Ne),
|
|
1871
|
+
return d.fetchers.set(g, Ne), X({
|
|
1872
1872
|
fetchers: new Map(d.fetchers)
|
|
1873
|
-
}), Ae(d,
|
|
1873
|
+
}), Ae(d, Q, {
|
|
1874
1874
|
isFetchActionRedirect: !0
|
|
1875
1875
|
});
|
|
1876
1876
|
}
|
|
1877
|
-
if (rr(
|
|
1878
|
-
Qt(g, b,
|
|
1877
|
+
if (rr(Q)) {
|
|
1878
|
+
Qt(g, b, Q.error);
|
|
1879
1879
|
return;
|
|
1880
1880
|
}
|
|
1881
|
-
if (
|
|
1881
|
+
if (mt(Q))
|
|
1882
1882
|
throw it(400, {
|
|
1883
1883
|
type: "defer-action"
|
|
1884
1884
|
});
|
|
1885
|
-
let
|
|
1886
|
-
|
|
1887
|
-
let Qe = ++
|
|
1885
|
+
let ne = d.navigation.location || d.location, Se = Jt(t.history, ne, q.signal), xe = d.navigation.state !== "idle" ? er(e, d.navigation.location, t.basename) : d.matches;
|
|
1886
|
+
P(xe, "Didn't find any matches after fetcher action");
|
|
1887
|
+
let Qe = ++A;
|
|
1888
1888
|
j.set(g, Qe);
|
|
1889
1889
|
let dt = G({
|
|
1890
1890
|
state: "loading",
|
|
1891
|
-
data:
|
|
1892
|
-
},
|
|
1891
|
+
data: Q.data
|
|
1892
|
+
}, V, {
|
|
1893
1893
|
" _hasFetcherDoneAnything ": !0
|
|
1894
1894
|
});
|
|
1895
1895
|
d.fetchers.set(g, dt);
|
|
@@ -1897,20 +1897,20 @@ function wo(t) {
|
|
|
1897
1897
|
t.history,
|
|
1898
1898
|
d,
|
|
1899
1899
|
xe,
|
|
1900
|
-
|
|
1901
|
-
|
|
1900
|
+
V,
|
|
1901
|
+
ne,
|
|
1902
1902
|
O,
|
|
1903
1903
|
k,
|
|
1904
1904
|
C,
|
|
1905
1905
|
{
|
|
1906
|
-
[L.route.id]:
|
|
1906
|
+
[L.route.id]: Q.data
|
|
1907
1907
|
},
|
|
1908
1908
|
void 0,
|
|
1909
1909
|
// No need to send through errors since we short circuit above
|
|
1910
|
-
|
|
1910
|
+
F
|
|
1911
1911
|
);
|
|
1912
1912
|
Fe.filter((Ne) => Ne.key !== g).forEach((Ne) => {
|
|
1913
|
-
let
|
|
1913
|
+
let Mt = Ne.key, br = d.fetchers.get(Mt), Zr = {
|
|
1914
1914
|
state: "loading",
|
|
1915
1915
|
data: br && br.data,
|
|
1916
1916
|
formMethod: void 0,
|
|
@@ -1919,27 +1919,27 @@ function wo(t) {
|
|
|
1919
1919
|
formData: void 0,
|
|
1920
1920
|
" _hasFetcherDoneAnything ": !0
|
|
1921
1921
|
};
|
|
1922
|
-
d.fetchers.set(
|
|
1923
|
-
}),
|
|
1922
|
+
d.fetchers.set(Mt, Zr), R.set(Mt, q);
|
|
1923
|
+
}), X({
|
|
1924
1924
|
fetchers: new Map(d.fetchers)
|
|
1925
1925
|
});
|
|
1926
1926
|
let {
|
|
1927
1927
|
results: ht,
|
|
1928
1928
|
loaderResults: de,
|
|
1929
1929
|
fetcherResults: Te
|
|
1930
|
-
} = await
|
|
1931
|
-
if (
|
|
1930
|
+
} = await kt(d.matches, xe, Pe, Fe, Se);
|
|
1931
|
+
if (q.signal.aborted)
|
|
1932
1932
|
return;
|
|
1933
|
-
j.delete(g),
|
|
1933
|
+
j.delete(g), R.delete(g), Fe.forEach((Ne) => R.delete(Ne.key));
|
|
1934
1934
|
let qe = hi(ht);
|
|
1935
1935
|
if (qe)
|
|
1936
1936
|
return Ae(d, qe);
|
|
1937
1937
|
let {
|
|
1938
|
-
loaderData:
|
|
1939
|
-
errors:
|
|
1940
|
-
} = ui(d, d.matches, Pe, de, void 0, Fe, Te,
|
|
1938
|
+
loaderData: Nt,
|
|
1939
|
+
errors: jt
|
|
1940
|
+
} = ui(d, d.matches, Pe, de, void 0, Fe, Te, J), vr = {
|
|
1941
1941
|
state: "idle",
|
|
1942
|
-
data:
|
|
1942
|
+
data: Q.data,
|
|
1943
1943
|
formMethod: void 0,
|
|
1944
1944
|
formAction: void 0,
|
|
1945
1945
|
formEncType: void 0,
|
|
@@ -1948,62 +1948,62 @@ function wo(t) {
|
|
|
1948
1948
|
};
|
|
1949
1949
|
d.fetchers.set(g, vr);
|
|
1950
1950
|
let Gr = ct(Qe);
|
|
1951
|
-
d.navigation.state === "loading" && Qe > _ ? (
|
|
1951
|
+
d.navigation.state === "loading" && Qe > _ ? (P(m, "Expected pending action"), w && w.abort(), Le(d.navigation.location, {
|
|
1952
1952
|
matches: xe,
|
|
1953
|
-
loaderData:
|
|
1954
|
-
errors:
|
|
1953
|
+
loaderData: Nt,
|
|
1954
|
+
errors: jt,
|
|
1955
1955
|
fetchers: new Map(d.fetchers)
|
|
1956
|
-
})) : (
|
|
1957
|
-
errors:
|
|
1958
|
-
loaderData: ci(d.loaderData,
|
|
1956
|
+
})) : (X(G({
|
|
1957
|
+
errors: jt,
|
|
1958
|
+
loaderData: ci(d.loaderData, Nt, xe, jt)
|
|
1959
1959
|
}, Gr ? {
|
|
1960
1960
|
fetchers: new Map(d.fetchers)
|
|
1961
1961
|
} : {})), O = !1);
|
|
1962
1962
|
}
|
|
1963
|
-
async function Ht(g, b, S, L, D,
|
|
1964
|
-
let
|
|
1963
|
+
async function Ht(g, b, S, L, D, V) {
|
|
1964
|
+
let I = d.fetchers.get(g), z = G({
|
|
1965
1965
|
state: "loading",
|
|
1966
1966
|
formMethod: void 0,
|
|
1967
1967
|
formAction: void 0,
|
|
1968
1968
|
formEncType: void 0,
|
|
1969
1969
|
formData: void 0
|
|
1970
|
-
},
|
|
1971
|
-
data:
|
|
1970
|
+
}, V, {
|
|
1971
|
+
data: I && I.data,
|
|
1972
1972
|
" _hasFetcherDoneAnything ": !0
|
|
1973
1973
|
});
|
|
1974
|
-
d.fetchers.set(g,
|
|
1974
|
+
d.fetchers.set(g, z), X({
|
|
1975
1975
|
fetchers: new Map(d.fetchers)
|
|
1976
1976
|
});
|
|
1977
|
-
let
|
|
1978
|
-
|
|
1979
|
-
let
|
|
1980
|
-
if (
|
|
1977
|
+
let q = new AbortController(), he = Jt(t.history, S, q.signal);
|
|
1978
|
+
R.set(g, q);
|
|
1979
|
+
let Q = await Zt("loader", he, L, D, f.basename);
|
|
1980
|
+
if (mt(Q) && (Q = await gs(Q, he.signal, !0) || Q), R.get(g) === q && R.delete(g), he.signal.aborted)
|
|
1981
1981
|
return;
|
|
1982
|
-
if (Vt(
|
|
1983
|
-
await Ae(d,
|
|
1982
|
+
if (Vt(Q)) {
|
|
1983
|
+
await Ae(d, Q);
|
|
1984
1984
|
return;
|
|
1985
1985
|
}
|
|
1986
|
-
if (rr(
|
|
1986
|
+
if (rr(Q)) {
|
|
1987
1987
|
let Se = qt(d.matches, b);
|
|
1988
|
-
d.fetchers.delete(g),
|
|
1988
|
+
d.fetchers.delete(g), X({
|
|
1989
1989
|
fetchers: new Map(d.fetchers),
|
|
1990
1990
|
errors: {
|
|
1991
|
-
[Se.route.id]:
|
|
1991
|
+
[Se.route.id]: Q.error
|
|
1992
1992
|
}
|
|
1993
1993
|
});
|
|
1994
1994
|
return;
|
|
1995
1995
|
}
|
|
1996
|
-
|
|
1997
|
-
let
|
|
1996
|
+
P(!mt(Q), "Unhandled fetcher deferred data");
|
|
1997
|
+
let ne = {
|
|
1998
1998
|
state: "idle",
|
|
1999
|
-
data:
|
|
1999
|
+
data: Q.data,
|
|
2000
2000
|
formMethod: void 0,
|
|
2001
2001
|
formAction: void 0,
|
|
2002
2002
|
formEncType: void 0,
|
|
2003
2003
|
formData: void 0,
|
|
2004
2004
|
" _hasFetcherDoneAnything ": !0
|
|
2005
2005
|
};
|
|
2006
|
-
d.fetchers.set(g,
|
|
2006
|
+
d.fetchers.set(g, ne), X({
|
|
2007
2007
|
fetchers: new Map(d.fetchers)
|
|
2008
2008
|
});
|
|
2009
2009
|
}
|
|
@@ -2011,49 +2011,49 @@ function wo(t) {
|
|
|
2011
2011
|
var L;
|
|
2012
2012
|
let {
|
|
2013
2013
|
submission: D,
|
|
2014
|
-
replace:
|
|
2015
|
-
isFetchActionRedirect:
|
|
2014
|
+
replace: V,
|
|
2015
|
+
isFetchActionRedirect: I
|
|
2016
2016
|
} = S === void 0 ? {} : S;
|
|
2017
2017
|
b.revalidate && (O = !0);
|
|
2018
|
-
let
|
|
2018
|
+
let z = dn(
|
|
2019
2019
|
g.location,
|
|
2020
2020
|
b.location,
|
|
2021
2021
|
// TODO: This can be removed once we get rid of useTransition in Remix v2
|
|
2022
2022
|
G({
|
|
2023
2023
|
_isRedirect: !0
|
|
2024
|
-
},
|
|
2024
|
+
}, I ? {
|
|
2025
2025
|
_isFetchActionRedirect: !0
|
|
2026
2026
|
} : {})
|
|
2027
2027
|
);
|
|
2028
|
-
if (
|
|
2028
|
+
if (P(z, "Expected a location on the redirect navigation"), hs && typeof ((L = window) == null ? void 0 : L.location) < "u") {
|
|
2029
2029
|
let xe = t.history.createURL(b.location).origin;
|
|
2030
2030
|
if (window.location.origin !== xe) {
|
|
2031
|
-
|
|
2031
|
+
V ? window.location.replace(b.location) : window.location.assign(b.location);
|
|
2032
2032
|
return;
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
2035
|
w = null;
|
|
2036
|
-
let
|
|
2036
|
+
let q = V === !0 ? le.Replace : le.Push, {
|
|
2037
2037
|
formMethod: he,
|
|
2038
|
-
formAction:
|
|
2039
|
-
formEncType:
|
|
2038
|
+
formAction: Q,
|
|
2039
|
+
formEncType: ne,
|
|
2040
2040
|
formData: Se
|
|
2041
2041
|
} = g.navigation;
|
|
2042
|
-
!D && he &&
|
|
2042
|
+
!D && he && Q && Se && ne && (D = {
|
|
2043
2043
|
formMethod: he,
|
|
2044
|
-
formAction:
|
|
2045
|
-
formEncType:
|
|
2044
|
+
formAction: Q,
|
|
2045
|
+
formEncType: ne,
|
|
2046
2046
|
formData: Se
|
|
2047
|
-
}), yo.has(b.status) && D && Ke(D.formMethod) ? await Ce(
|
|
2047
|
+
}), yo.has(b.status) && D && Ke(D.formMethod) ? await Ce(q, z, {
|
|
2048
2048
|
submission: G({}, D, {
|
|
2049
2049
|
formAction: b.location
|
|
2050
2050
|
}),
|
|
2051
2051
|
// Preserve this flag across redirects
|
|
2052
2052
|
preventScrollReset: v
|
|
2053
|
-
}) : await Ce(
|
|
2053
|
+
}) : await Ce(q, z, {
|
|
2054
2054
|
overrideNavigation: {
|
|
2055
2055
|
state: "loading",
|
|
2056
|
-
location:
|
|
2056
|
+
location: z,
|
|
2057
2057
|
formMethod: D ? D.formMethod : void 0,
|
|
2058
2058
|
formAction: D ? D.formAction : void 0,
|
|
2059
2059
|
formEncType: D ? D.formEncType : void 0,
|
|
@@ -2063,34 +2063,34 @@ function wo(t) {
|
|
|
2063
2063
|
preventScrollReset: v
|
|
2064
2064
|
});
|
|
2065
2065
|
}
|
|
2066
|
-
async function
|
|
2067
|
-
let
|
|
2068
|
-
return await Promise.all([fi(g, S,
|
|
2069
|
-
results:
|
|
2070
|
-
loaderResults:
|
|
2071
|
-
fetcherResults:
|
|
2066
|
+
async function kt(g, b, S, L, D) {
|
|
2067
|
+
let V = await Promise.all([...S.map((q) => Zt("loader", D, q, b, f.basename)), ...L.map((q) => Zt("loader", Jt(t.history, q.path, D.signal), q.match, q.matches, f.basename))]), I = V.slice(0, S.length), z = V.slice(S.length);
|
|
2068
|
+
return await Promise.all([fi(g, S, I, D.signal, !1, d.loaderData), fi(g, L.map((q) => q.match), z, D.signal, !0)]), {
|
|
2069
|
+
results: V,
|
|
2070
|
+
loaderResults: I,
|
|
2071
|
+
fetcherResults: z
|
|
2072
2072
|
};
|
|
2073
2073
|
}
|
|
2074
2074
|
function rt() {
|
|
2075
|
-
O = !0, k.push(...zt()),
|
|
2076
|
-
|
|
2075
|
+
O = !0, k.push(...zt()), F.forEach((g, b) => {
|
|
2076
|
+
R.has(b) && (C.push(b), Lt(b));
|
|
2077
2077
|
});
|
|
2078
2078
|
}
|
|
2079
2079
|
function Qt(g, b, S) {
|
|
2080
2080
|
let L = qt(d.matches, b);
|
|
2081
|
-
|
|
2081
|
+
Dt(g), X({
|
|
2082
2082
|
errors: {
|
|
2083
2083
|
[L.route.id]: S
|
|
2084
2084
|
},
|
|
2085
2085
|
fetchers: new Map(d.fetchers)
|
|
2086
2086
|
});
|
|
2087
2087
|
}
|
|
2088
|
-
function kt(g) {
|
|
2089
|
-
E.has(g) && Dt(g), B.delete(g), j.delete(g), P.delete(g), d.fetchers.delete(g);
|
|
2090
|
-
}
|
|
2091
2088
|
function Dt(g) {
|
|
2092
|
-
|
|
2093
|
-
|
|
2089
|
+
R.has(g) && Lt(g), F.delete(g), j.delete(g), N.delete(g), d.fetchers.delete(g);
|
|
2090
|
+
}
|
|
2091
|
+
function Lt(g) {
|
|
2092
|
+
let b = R.get(g);
|
|
2093
|
+
P(b, "Expected fetch controller: " + g), b.abort(), R.delete(g);
|
|
2094
2094
|
}
|
|
2095
2095
|
function pr(g) {
|
|
2096
2096
|
for (let b of g) {
|
|
@@ -2106,11 +2106,11 @@ function wo(t) {
|
|
|
2106
2106
|
d.fetchers.set(b, L);
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
|
-
function
|
|
2109
|
+
function Pt() {
|
|
2110
2110
|
let g = [];
|
|
2111
|
-
for (let b of
|
|
2111
|
+
for (let b of N) {
|
|
2112
2112
|
let S = d.fetchers.get(b);
|
|
2113
|
-
|
|
2113
|
+
P(S, "Expected fetcher: " + b), S.state === "loading" && (N.delete(b), g.push(b));
|
|
2114
2114
|
}
|
|
2115
2115
|
pr(g);
|
|
2116
2116
|
}
|
|
@@ -2119,20 +2119,20 @@ function wo(t) {
|
|
|
2119
2119
|
for (let [S, L] of j)
|
|
2120
2120
|
if (L < g) {
|
|
2121
2121
|
let D = d.fetchers.get(S);
|
|
2122
|
-
|
|
2122
|
+
P(D, "Expected fetcher: " + S), D.state === "loading" && (Lt(S), j.delete(S), b.push(S));
|
|
2123
2123
|
}
|
|
2124
2124
|
return pr(b), b.length > 0;
|
|
2125
2125
|
}
|
|
2126
2126
|
function mr(g, b) {
|
|
2127
2127
|
let S = d.blockers.get(g) || si;
|
|
2128
|
-
return
|
|
2128
|
+
return M.get(g) !== b && (M.set(g, b), H == null ? H = g : g !== H && Ue(!1, "A router only supports one blocker at a time")), S;
|
|
2129
2129
|
}
|
|
2130
2130
|
function nt(g) {
|
|
2131
|
-
d.blockers.delete(g),
|
|
2131
|
+
d.blockers.delete(g), M.delete(g), H === g && (H = null);
|
|
2132
2132
|
}
|
|
2133
2133
|
function He(g, b) {
|
|
2134
2134
|
let S = d.blockers.get(g) || si;
|
|
2135
|
-
|
|
2135
|
+
P(S.state === "unblocked" && b.state === "blocked" || S.state === "blocked" && b.state === "blocked" || S.state === "blocked" && b.state === "proceeding" || S.state === "blocked" && b.state === "unblocked" || S.state === "proceeding" && b.state === "unblocked", "Invalid blocker state transition: " + S.state + " -> " + b.state), d.blockers.set(g, b), X({
|
|
2136
2136
|
blockers: new Map(d.blockers)
|
|
2137
2137
|
});
|
|
2138
2138
|
}
|
|
@@ -2142,29 +2142,29 @@ function wo(t) {
|
|
|
2142
2142
|
nextLocation: S,
|
|
2143
2143
|
historyAction: L
|
|
2144
2144
|
} = g;
|
|
2145
|
-
if (
|
|
2145
|
+
if (H == null)
|
|
2146
2146
|
return;
|
|
2147
|
-
let D =
|
|
2148
|
-
|
|
2149
|
-
let
|
|
2150
|
-
if (!(
|
|
2147
|
+
let D = M.get(H);
|
|
2148
|
+
P(D, "Could not find a function for the active blocker");
|
|
2149
|
+
let V = d.blockers.get(H);
|
|
2150
|
+
if (!(V && V.state === "proceeding") && D({
|
|
2151
2151
|
currentLocation: b,
|
|
2152
2152
|
nextLocation: S,
|
|
2153
2153
|
historyAction: L
|
|
2154
2154
|
}))
|
|
2155
|
-
return
|
|
2155
|
+
return H;
|
|
2156
2156
|
}
|
|
2157
2157
|
function zt(g) {
|
|
2158
2158
|
let b = [];
|
|
2159
|
-
return
|
|
2160
|
-
(!g || g(L)) && (S.cancel(), b.push(L),
|
|
2159
|
+
return J.forEach((S, L) => {
|
|
2160
|
+
(!g || g(L)) && (S.cancel(), b.push(L), J.delete(L));
|
|
2161
2161
|
}), b;
|
|
2162
2162
|
}
|
|
2163
2163
|
function Wt(g, b, S) {
|
|
2164
2164
|
if (i = g, a = b, s = S || ((L) => L.key), !l && d.navigation === nn) {
|
|
2165
2165
|
l = !0;
|
|
2166
2166
|
let L = yr(d.location, d.matches);
|
|
2167
|
-
L != null &&
|
|
2167
|
+
L != null && X({
|
|
2168
2168
|
restoreScrollPosition: L
|
|
2169
2169
|
});
|
|
2170
2170
|
}
|
|
@@ -2180,7 +2180,7 @@ function wo(t) {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
function yr(g, b) {
|
|
2182
2182
|
if (i && s && a) {
|
|
2183
|
-
let S = b.map((
|
|
2183
|
+
let S = b.map((V) => pi(V, d.loaderData)), L = s(g, S) || g.key, D = i[L];
|
|
2184
2184
|
if (typeof D == "number")
|
|
2185
2185
|
return D;
|
|
2186
2186
|
}
|
|
@@ -2207,12 +2207,12 @@ function wo(t) {
|
|
|
2207
2207
|
createHref: (g) => t.history.createHref(g),
|
|
2208
2208
|
encodeLocation: (g) => t.history.encodeLocation(g),
|
|
2209
2209
|
getFetcher: fr,
|
|
2210
|
-
deleteFetcher:
|
|
2210
|
+
deleteFetcher: Dt,
|
|
2211
2211
|
dispose: ye,
|
|
2212
2212
|
getBlocker: mr,
|
|
2213
2213
|
deleteBlocker: nt,
|
|
2214
|
-
_internalFetchControllers:
|
|
2215
|
-
_internalActiveDeferreds:
|
|
2214
|
+
_internalFetchControllers: R,
|
|
2215
|
+
_internalActiveDeferreds: J
|
|
2216
2216
|
}, f;
|
|
2217
2217
|
}
|
|
2218
2218
|
function Co(t) {
|
|
@@ -2263,26 +2263,26 @@ function oi(t, e, r, n, i, s, a, l, o, u, c) {
|
|
|
2263
2263
|
s || // Clicked the same link, resubmitted a GET form
|
|
2264
2264
|
d.toString() === m.toString() || // Search params affect all loaders
|
|
2265
2265
|
d.search !== m.search
|
|
2266
|
-
), w = u ? Object.keys(u)[0] : void 0, O = Eo(r, w).filter((C,
|
|
2266
|
+
), w = u ? Object.keys(u)[0] : void 0, O = Eo(r, w).filter((C, R) => {
|
|
2267
2267
|
if (C.route.loader == null)
|
|
2268
2268
|
return !1;
|
|
2269
|
-
if (Ro(e.loaderData, e.matches[
|
|
2269
|
+
if (Ro(e.loaderData, e.matches[R], C) || a.some((j) => j === C.route.id))
|
|
2270
2270
|
return !0;
|
|
2271
|
-
let
|
|
2271
|
+
let A = e.matches[R], _ = C;
|
|
2272
2272
|
return li(C, G({
|
|
2273
2273
|
currentUrl: d,
|
|
2274
|
-
currentParams:
|
|
2274
|
+
currentParams: A.params,
|
|
2275
2275
|
nextUrl: m,
|
|
2276
2276
|
nextParams: _.params
|
|
2277
2277
|
}, n, {
|
|
2278
2278
|
actionResult: f,
|
|
2279
|
-
defaultShouldRevalidate: v || fs(
|
|
2279
|
+
defaultShouldRevalidate: v || fs(A, _)
|
|
2280
2280
|
}));
|
|
2281
2281
|
}), k = [];
|
|
2282
|
-
return c && c.forEach((C,
|
|
2283
|
-
if (r.some((
|
|
2284
|
-
l.includes(
|
|
2285
|
-
key:
|
|
2282
|
+
return c && c.forEach((C, R) => {
|
|
2283
|
+
if (r.some((A) => A.route.id === C.routeId))
|
|
2284
|
+
l.includes(R) ? k.push(G({
|
|
2285
|
+
key: R
|
|
2286
2286
|
}, C)) : li(C.match, G({
|
|
2287
2287
|
currentUrl: d,
|
|
2288
2288
|
currentParams: e.matches[e.matches.length - 1].params,
|
|
@@ -2292,7 +2292,7 @@ function oi(t, e, r, n, i, s, a, l, o, u, c) {
|
|
|
2292
2292
|
actionResult: f,
|
|
2293
2293
|
defaultShouldRevalidate: v
|
|
2294
2294
|
})) && k.push(G({
|
|
2295
|
-
key:
|
|
2295
|
+
key: R
|
|
2296
2296
|
}, C));
|
|
2297
2297
|
else
|
|
2298
2298
|
return;
|
|
@@ -2329,11 +2329,11 @@ async function Zt(t, e, r, n, i, s, a, l) {
|
|
|
2329
2329
|
e.signal.addEventListener("abort", d);
|
|
2330
2330
|
try {
|
|
2331
2331
|
let m = r.route[t];
|
|
2332
|
-
|
|
2332
|
+
P(m, "Could not find the " + t + ' to run on the "' + r.route.id + '" route'), u = await Promise.race([m({
|
|
2333
2333
|
request: e,
|
|
2334
2334
|
params: r.params,
|
|
2335
2335
|
context: l
|
|
2336
|
-
}), f]),
|
|
2336
|
+
}), f]), P(u !== void 0, "You defined " + (t === "action" ? "an action" : "a loader") + " for route " + ('"' + r.route.id + "\" but didn't return anything from your `" + t + "` ") + "function. Please return a value or `null`.");
|
|
2337
2337
|
} catch (m) {
|
|
2338
2338
|
o = fe.error, u = m;
|
|
2339
2339
|
} finally {
|
|
@@ -2342,26 +2342,26 @@ async function Zt(t, e, r, n, i, s, a, l) {
|
|
|
2342
2342
|
if (Oo(u)) {
|
|
2343
2343
|
let m = u.status;
|
|
2344
2344
|
if (go.has(m)) {
|
|
2345
|
-
let
|
|
2346
|
-
if (
|
|
2345
|
+
let E = u.headers.get("Location");
|
|
2346
|
+
if (P(E, "Redirects returned/thrown from loaders/actions must have a Location header"), /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(E)) {
|
|
2347
2347
|
if (!s) {
|
|
2348
|
-
let k = new URL(e.url), C =
|
|
2349
|
-
C.origin === k.origin && (
|
|
2348
|
+
let k = new URL(e.url), C = E.startsWith("//") ? new URL(k.protocol + E) : new URL(E);
|
|
2349
|
+
C.origin === k.origin && (E = C.pathname + C.search + C.hash);
|
|
2350
2350
|
}
|
|
2351
2351
|
} else {
|
|
2352
|
-
let k = n.slice(0, n.indexOf(r) + 1), C = Mr(k).map((
|
|
2353
|
-
if (
|
|
2354
|
-
let
|
|
2355
|
-
|
|
2352
|
+
let k = n.slice(0, n.indexOf(r) + 1), C = Mr(k).map((A) => A.pathnameBase), R = wn(E, C, new URL(e.url).pathname);
|
|
2353
|
+
if (P(Ve(R), "Unable to resolve redirect location: " + E), i) {
|
|
2354
|
+
let A = R.pathname;
|
|
2355
|
+
R.pathname = A === "/" ? i : Ie([i, A]);
|
|
2356
2356
|
}
|
|
2357
|
-
|
|
2357
|
+
E = Ve(R);
|
|
2358
2358
|
}
|
|
2359
2359
|
if (s)
|
|
2360
|
-
throw u.headers.set("Location",
|
|
2360
|
+
throw u.headers.set("Location", E), u;
|
|
2361
2361
|
return {
|
|
2362
2362
|
type: fe.redirect,
|
|
2363
2363
|
status: m,
|
|
2364
|
-
location:
|
|
2364
|
+
location: E,
|
|
2365
2365
|
revalidate: u.headers.get("X-Remix-Revalidate") !== null
|
|
2366
2366
|
};
|
|
2367
2367
|
}
|
|
@@ -2417,11 +2417,11 @@ function So(t, e, r, n, i) {
|
|
|
2417
2417
|
let s = {}, a = null, l, o = !1, u = {};
|
|
2418
2418
|
return r.forEach((c, f) => {
|
|
2419
2419
|
let d = e[f].route.id;
|
|
2420
|
-
if (
|
|
2420
|
+
if (P(!Vt(c), "Cannot handle redirect results in processLoaderData"), rr(c)) {
|
|
2421
2421
|
let m = qt(t, d), v = c.error;
|
|
2422
2422
|
n && (v = Object.values(n)[0], n = void 0), a = a || {}, a[m.route.id] == null && (a[m.route.id] = v), s[d] = void 0, o || (o = !0, l = cs(c.error) ? c.error.status : 500), c.headers && (u[d] = c.headers);
|
|
2423
2423
|
} else
|
|
2424
|
-
|
|
2424
|
+
mt(c) ? (i.set(d, c.deferredData), s[d] = c.deferredData.data) : s[d] = c.data, c.statusCode != null && c.statusCode !== 200 && !o && (l = c.statusCode), c.headers && (u[d] = c.headers);
|
|
2425
2425
|
}), n && (a = n, s[Object.keys(n)[0]] = void 0), {
|
|
2426
2426
|
loaderData: s,
|
|
2427
2427
|
errors: a,
|
|
@@ -2439,7 +2439,7 @@ function ui(t, e, r, n, i, s, a, l) {
|
|
|
2439
2439
|
key: f,
|
|
2440
2440
|
match: d
|
|
2441
2441
|
} = s[c];
|
|
2442
|
-
|
|
2442
|
+
P(a !== void 0 && a[c] !== void 0, "Did not find corresponding fetcher result");
|
|
2443
2443
|
let m = a[c];
|
|
2444
2444
|
if (rr(m)) {
|
|
2445
2445
|
let v = qt(t.matches, d.route.id);
|
|
@@ -2447,9 +2447,9 @@ function ui(t, e, r, n, i, s, a, l) {
|
|
|
2447
2447
|
[v.route.id]: m.error
|
|
2448
2448
|
})), t.fetchers.delete(f);
|
|
2449
2449
|
} else if (Vt(m))
|
|
2450
|
-
|
|
2451
|
-
else if (
|
|
2452
|
-
|
|
2450
|
+
P(!1, "Unhandled fetcher revalidation redirect");
|
|
2451
|
+
else if (mt(m))
|
|
2452
|
+
P(!1, "Unhandled fetcher deferred data");
|
|
2453
2453
|
else {
|
|
2454
2454
|
let v = {
|
|
2455
2455
|
state: "idle",
|
|
@@ -2519,7 +2519,7 @@ function ms(t) {
|
|
|
2519
2519
|
function xo(t, e) {
|
|
2520
2520
|
return t.pathname === e.pathname && t.search === e.search && t.hash !== e.hash;
|
|
2521
2521
|
}
|
|
2522
|
-
function
|
|
2522
|
+
function mt(t) {
|
|
2523
2523
|
return t.type === fe.deferred;
|
|
2524
2524
|
}
|
|
2525
2525
|
function rr(t) {
|
|
@@ -2540,7 +2540,7 @@ function Ke(t) {
|
|
|
2540
2540
|
async function fi(t, e, r, n, i, s) {
|
|
2541
2541
|
for (let a = 0; a < r.length; a++) {
|
|
2542
2542
|
let l = r[a], o = e[a], u = t.find((f) => f.route.id === o.route.id), c = u != null && !fs(u, o) && (s && s[o.route.id]) !== void 0;
|
|
2543
|
-
|
|
2543
|
+
mt(l) && (i || c) && await gs(l, n, i).then((f) => {
|
|
2544
2544
|
f && (r[a] = f || r[a]);
|
|
2545
2545
|
});
|
|
2546
2546
|
}
|
|
@@ -2664,8 +2664,8 @@ const or = /* @__PURE__ */ p.createContext(null);
|
|
|
2664
2664
|
process.env.NODE_ENV !== "production" && (or.displayName = "DataRouterState");
|
|
2665
2665
|
const Io = /* @__PURE__ */ p.createContext(null);
|
|
2666
2666
|
process.env.NODE_ENV !== "production" && (Io.displayName = "Await");
|
|
2667
|
-
const
|
|
2668
|
-
process.env.NODE_ENV !== "production" && (
|
|
2667
|
+
const St = /* @__PURE__ */ p.createContext(null);
|
|
2668
|
+
process.env.NODE_ENV !== "production" && (St.displayName = "Navigation");
|
|
2669
2669
|
const lr = /* @__PURE__ */ p.createContext(null);
|
|
2670
2670
|
process.env.NODE_ENV !== "production" && (lr.displayName = "Location");
|
|
2671
2671
|
const Be = /* @__PURE__ */ p.createContext({
|
|
@@ -2679,16 +2679,16 @@ function Vo(t, e) {
|
|
|
2679
2679
|
let {
|
|
2680
2680
|
relative: r
|
|
2681
2681
|
} = e === void 0 ? {} : e;
|
|
2682
|
-
ur() || (process.env.NODE_ENV !== "production" ?
|
|
2682
|
+
ur() || (process.env.NODE_ENV !== "production" ? P(
|
|
2683
2683
|
!1,
|
|
2684
2684
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
2685
2685
|
// router loaded. We can help them understand how to avoid that.
|
|
2686
2686
|
"useHref() may be used only in the context of a <Router> component."
|
|
2687
|
-
) :
|
|
2687
|
+
) : P(!1));
|
|
2688
2688
|
let {
|
|
2689
2689
|
basename: n,
|
|
2690
2690
|
navigator: i
|
|
2691
|
-
} = p.useContext(
|
|
2691
|
+
} = p.useContext(St), {
|
|
2692
2692
|
hash: s,
|
|
2693
2693
|
pathname: a,
|
|
2694
2694
|
search: l
|
|
@@ -2704,29 +2704,29 @@ function Vo(t, e) {
|
|
|
2704
2704
|
function ur() {
|
|
2705
2705
|
return p.useContext(lr) != null;
|
|
2706
2706
|
}
|
|
2707
|
-
function
|
|
2708
|
-
return ur() || (process.env.NODE_ENV !== "production" ?
|
|
2707
|
+
function xt() {
|
|
2708
|
+
return ur() || (process.env.NODE_ENV !== "production" ? P(
|
|
2709
2709
|
!1,
|
|
2710
2710
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
2711
2711
|
// router loaded. We can help them understand how to avoid that.
|
|
2712
2712
|
"useLocation() may be used only in the context of a <Router> component."
|
|
2713
|
-
) :
|
|
2713
|
+
) : P(!1)), p.useContext(lr).location;
|
|
2714
2714
|
}
|
|
2715
2715
|
function bs() {
|
|
2716
|
-
ur() || (process.env.NODE_ENV !== "production" ?
|
|
2716
|
+
ur() || (process.env.NODE_ENV !== "production" ? P(
|
|
2717
2717
|
!1,
|
|
2718
2718
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
2719
2719
|
// router loaded. We can help them understand how to avoid that.
|
|
2720
2720
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
2721
|
-
) :
|
|
2721
|
+
) : P(!1));
|
|
2722
2722
|
let {
|
|
2723
2723
|
basename: t,
|
|
2724
2724
|
navigator: e
|
|
2725
|
-
} = p.useContext(
|
|
2725
|
+
} = p.useContext(St), {
|
|
2726
2726
|
matches: r
|
|
2727
2727
|
} = p.useContext(Be), {
|
|
2728
2728
|
pathname: n
|
|
2729
|
-
} =
|
|
2729
|
+
} = xt(), i = JSON.stringify(Mr(r).map((l) => l.pathnameBase)), s = p.useRef(!1);
|
|
2730
2730
|
return p.useEffect(() => {
|
|
2731
2731
|
s.current = !0;
|
|
2732
2732
|
}), p.useCallback(function(l, o) {
|
|
@@ -2760,19 +2760,19 @@ function Ar(t, e) {
|
|
|
2760
2760
|
matches: n
|
|
2761
2761
|
} = p.useContext(Be), {
|
|
2762
2762
|
pathname: i
|
|
2763
|
-
} =
|
|
2763
|
+
} = xt(), s = JSON.stringify(Mr(n).map((a) => a.pathnameBase));
|
|
2764
2764
|
return p.useMemo(() => wn(t, JSON.parse(s), i, r === "path"), [t, s, i, r]);
|
|
2765
2765
|
}
|
|
2766
2766
|
function Ho(t, e) {
|
|
2767
|
-
ur() || (process.env.NODE_ENV !== "production" ?
|
|
2767
|
+
ur() || (process.env.NODE_ENV !== "production" ? P(
|
|
2768
2768
|
!1,
|
|
2769
2769
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
2770
2770
|
// router loaded. We can help them understand how to avoid that.
|
|
2771
2771
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
2772
|
-
) :
|
|
2772
|
+
) : P(!1));
|
|
2773
2773
|
let {
|
|
2774
2774
|
navigator: r
|
|
2775
|
-
} = p.useContext(
|
|
2775
|
+
} = p.useContext(St), n = p.useContext(or), {
|
|
2776
2776
|
matches: i
|
|
2777
2777
|
} = p.useContext(Be), s = i[i.length - 1], a = s ? s.params : {}, l = s ? s.pathname : "/", o = s ? s.pathnameBase : "/", u = s && s.route;
|
|
2778
2778
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2781,18 +2781,18 @@ function Ho(t, e) {
|
|
|
2781
2781
|
|
|
2782
2782
|
` + ('Please change the parent <Route path="' + O + '"> to <Route ') + ('path="' + (O === "/" ? "*" : O + "/*") + '">.'));
|
|
2783
2783
|
}
|
|
2784
|
-
let c =
|
|
2784
|
+
let c = xt(), f;
|
|
2785
2785
|
if (e) {
|
|
2786
2786
|
var d;
|
|
2787
2787
|
let O = typeof e == "string" ? $e(e) : e;
|
|
2788
|
-
o === "/" || (d = O.pathname) != null && d.startsWith(o) || (process.env.NODE_ENV !== "production" ?
|
|
2788
|
+
o === "/" || (d = O.pathname) != null && d.startsWith(o) || (process.env.NODE_ENV !== "production" ? P(!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 "' + o + '" ') + ('but pathname "' + O.pathname + '" was given in the `location` prop.')) : P(!1)), f = O;
|
|
2789
2789
|
} else
|
|
2790
2790
|
f = c;
|
|
2791
2791
|
let m = f.pathname || "/", v = o === "/" ? m : m.slice(o.length) || "/", w = er(t, {
|
|
2792
2792
|
pathname: v
|
|
2793
2793
|
});
|
|
2794
2794
|
process.env.NODE_ENV !== "production" && (process.env.NODE_ENV !== "production" && Ue(u || w != null, 'No routes matched location "' + f.pathname + f.search + f.hash + '" '), process.env.NODE_ENV !== "production" && Ue(w == null || w[w.length - 1].route.element !== void 0, 'Matched leaf route at location "' + f.pathname + f.search + f.hash + '" does not have an element. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));
|
|
2795
|
-
let
|
|
2795
|
+
let E = Ko(w && w.map((O) => Object.assign({}, O, {
|
|
2796
2796
|
params: Object.assign({}, a, O.params),
|
|
2797
2797
|
pathname: Ie([
|
|
2798
2798
|
o,
|
|
@@ -2805,7 +2805,7 @@ function Ho(t, e) {
|
|
|
2805
2805
|
r.encodeLocation ? r.encodeLocation(O.pathnameBase).pathname : O.pathnameBase
|
|
2806
2806
|
])
|
|
2807
2807
|
})), i, n || void 0);
|
|
2808
|
-
return e &&
|
|
2808
|
+
return e && E ? /* @__PURE__ */ p.createElement(lr.Provider, {
|
|
2809
2809
|
value: {
|
|
2810
2810
|
location: _r({
|
|
2811
2811
|
pathname: "/",
|
|
@@ -2816,7 +2816,7 @@ function Ho(t, e) {
|
|
|
2816
2816
|
}, f),
|
|
2817
2817
|
navigationType: le.Pop
|
|
2818
2818
|
}
|
|
2819
|
-
},
|
|
2819
|
+
}, E) : E;
|
|
2820
2820
|
}
|
|
2821
2821
|
function Qo() {
|
|
2822
2822
|
let t = Cs(), e = cs(t) ? t.status + " " + t.statusText : t instanceof Error ? t.message : JSON.stringify(t), r = t instanceof Error ? t.stack : null, n = "rgba(200,200,200, 0.5)", i = {
|
|
@@ -2890,7 +2890,7 @@ function Ko(t, e, r) {
|
|
|
2890
2890
|
let n = t, i = r == null ? void 0 : r.errors;
|
|
2891
2891
|
if (i != null) {
|
|
2892
2892
|
let s = n.findIndex((a) => a.route.id && (i == null ? void 0 : i[a.route.id]));
|
|
2893
|
-
s >= 0 || (process.env.NODE_ENV !== "production" ?
|
|
2893
|
+
s >= 0 || (process.env.NODE_ENV !== "production" ? P(!1, "Could not find a matching route for the current errors: " + i) : P(!1)), n = n.slice(0, Math.min(n.length, s + 1));
|
|
2894
2894
|
}
|
|
2895
2895
|
return n.reduceRight((s, a, l) => {
|
|
2896
2896
|
let o = a.route.id ? i == null ? void 0 : i[a.route.id] : null, u = r ? a.route.errorElement || /* @__PURE__ */ p.createElement(Qo, null) : null, c = e.concat(n.slice(0, l + 1)), f = () => /* @__PURE__ */ p.createElement(Wo, {
|
|
@@ -2925,15 +2925,15 @@ function ws(t) {
|
|
|
2925
2925
|
}
|
|
2926
2926
|
function Yo(t) {
|
|
2927
2927
|
let e = p.useContext(or);
|
|
2928
|
-
return e || (process.env.NODE_ENV !== "production" ?
|
|
2928
|
+
return e || (process.env.NODE_ENV !== "production" ? P(!1, ws(t)) : P(!1)), e;
|
|
2929
2929
|
}
|
|
2930
2930
|
function Go(t) {
|
|
2931
2931
|
let e = p.useContext(Be);
|
|
2932
|
-
return e || (process.env.NODE_ENV !== "production" ?
|
|
2932
|
+
return e || (process.env.NODE_ENV !== "production" ? P(!1, ws(t)) : P(!1)), e;
|
|
2933
2933
|
}
|
|
2934
2934
|
function Zo(t) {
|
|
2935
2935
|
let e = Go(t), r = e.matches[e.matches.length - 1];
|
|
2936
|
-
return r.route.id || (process.env.NODE_ENV !== "production" ?
|
|
2936
|
+
return r.route.id || (process.env.NODE_ENV !== "production" ? P(!1, t + ' can only be used on routes that contain a unique "id"') : P(!1)), r.route.id;
|
|
2937
2937
|
}
|
|
2938
2938
|
function Cs() {
|
|
2939
2939
|
var t;
|
|
@@ -2990,7 +2990,7 @@ function Xo(t) {
|
|
|
2990
2990
|
return $o(t.context);
|
|
2991
2991
|
}
|
|
2992
2992
|
function el(t) {
|
|
2993
|
-
process.env.NODE_ENV !== "production" ?
|
|
2993
|
+
process.env.NODE_ENV !== "production" ? P(!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>.") : P(!1);
|
|
2994
2994
|
}
|
|
2995
2995
|
function tl(t) {
|
|
2996
2996
|
let {
|
|
@@ -3001,7 +3001,7 @@ function tl(t) {
|
|
|
3001
3001
|
navigator: s,
|
|
3002
3002
|
static: a = !1
|
|
3003
3003
|
} = t;
|
|
3004
|
-
ur() && (process.env.NODE_ENV !== "production" ?
|
|
3004
|
+
ur() && (process.env.NODE_ENV !== "production" ? P(!1, "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.") : P(!1));
|
|
3005
3005
|
let l = e.replace(/^\/*/, "/"), o = p.useMemo(() => ({
|
|
3006
3006
|
basename: l,
|
|
3007
3007
|
navigator: s,
|
|
@@ -3024,7 +3024,7 @@ function tl(t) {
|
|
|
3024
3024
|
key: m
|
|
3025
3025
|
};
|
|
3026
3026
|
}, [l, u, c, f, d, m]);
|
|
3027
|
-
return process.env.NODE_ENV !== "production" && Ue(v != null, '<Router basename="' + l + '"> is not able to match the URL ' + ('"' + u + c + f + '" because it does not start with the ') + "basename, so the <Router> won't render anything."), v == null ? null : /* @__PURE__ */ p.createElement(
|
|
3027
|
+
return process.env.NODE_ENV !== "production" && Ue(v != null, '<Router basename="' + l + '"> is not able to match the URL ' + ('"' + u + c + f + '" because it does not start with the ') + "basename, so the <Router> won't render anything."), v == null ? null : /* @__PURE__ */ p.createElement(St.Provider, {
|
|
3028
3028
|
value: o
|
|
3029
3029
|
}, /* @__PURE__ */ p.createElement(lr.Provider, {
|
|
3030
3030
|
children: r,
|
|
@@ -3057,7 +3057,7 @@ function hn(t, e) {
|
|
|
3057
3057
|
r.push.apply(r, hn(n.props.children, e));
|
|
3058
3058
|
return;
|
|
3059
3059
|
}
|
|
3060
|
-
n.type !== el && (process.env.NODE_ENV !== "production" ?
|
|
3060
|
+
n.type !== el && (process.env.NODE_ENV !== "production" ? P(!1, "[" + (typeof n.type == "string" ? n.type : n.type.name) + "] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>") : P(!1)), !n.props.index || !n.props.children || (process.env.NODE_ENV !== "production" ? P(!1, "An index route cannot have child routes.") : P(!1));
|
|
3061
3061
|
let s = [...e, i], a = {
|
|
3062
3062
|
id: n.props.id || s.join("-"),
|
|
3063
3063
|
caseSensitive: n.props.caseSensitive,
|
|
@@ -3101,15 +3101,15 @@ function Ss(t, e) {
|
|
|
3101
3101
|
*
|
|
3102
3102
|
* @license MIT
|
|
3103
3103
|
*/
|
|
3104
|
-
function
|
|
3105
|
-
return
|
|
3104
|
+
function bt() {
|
|
3105
|
+
return bt = Object.assign ? Object.assign.bind() : function(t) {
|
|
3106
3106
|
for (var e = 1; e < arguments.length; e++) {
|
|
3107
3107
|
var r = arguments[e];
|
|
3108
3108
|
for (var n in r)
|
|
3109
3109
|
Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
3110
3110
|
}
|
|
3111
3111
|
return t;
|
|
3112
|
-
},
|
|
3112
|
+
}, bt.apply(this, arguments);
|
|
3113
3113
|
}
|
|
3114
3114
|
function En(t, e) {
|
|
3115
3115
|
if (t == null)
|
|
@@ -3187,10 +3187,10 @@ const hl = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
3187
3187
|
preventScrollReset: c
|
|
3188
3188
|
} = e, f = En(e, ul), d = typeof u == "string" ? u : Ve(u), m = /^[a-z+]+:\/\//i.test(d) || d.startsWith("//"), v = d, w = !1;
|
|
3189
3189
|
if (hl && m) {
|
|
3190
|
-
let C = new URL(window.location.href),
|
|
3191
|
-
|
|
3190
|
+
let C = new URL(window.location.href), R = d.startsWith("//") ? new URL(C.protocol + d) : new URL(d);
|
|
3191
|
+
R.origin === C.origin ? v = R.pathname + R.search + R.hash : w = !0;
|
|
3192
3192
|
}
|
|
3193
|
-
let
|
|
3193
|
+
let E = Vo(v, {
|
|
3194
3194
|
relative: i
|
|
3195
3195
|
}), O = yl(v, {
|
|
3196
3196
|
replace: a,
|
|
@@ -3204,8 +3204,8 @@ const hl = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
3204
3204
|
}
|
|
3205
3205
|
return (
|
|
3206
3206
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
3207
|
-
/* @__PURE__ */ p.createElement("a",
|
|
3208
|
-
href: m ? d :
|
|
3207
|
+
/* @__PURE__ */ p.createElement("a", bt({}, f, {
|
|
3208
|
+
href: m ? d : E,
|
|
3209
3209
|
onClick: w || s ? n : k,
|
|
3210
3210
|
ref: r,
|
|
3211
3211
|
target: o
|
|
@@ -3224,22 +3224,22 @@ const fl = /* @__PURE__ */ p.forwardRef(function(e, r) {
|
|
|
3224
3224
|
children: u
|
|
3225
3225
|
} = e, c = En(e, cl), f = Ar(o, {
|
|
3226
3226
|
relative: c.relative
|
|
3227
|
-
}), d =
|
|
3227
|
+
}), d = xt(), m = p.useContext(or), {
|
|
3228
3228
|
navigator: v
|
|
3229
|
-
} = p.useContext(
|
|
3230
|
-
i || (
|
|
3231
|
-
let k =
|
|
3232
|
-
typeof s == "function" ?
|
|
3229
|
+
} = p.useContext(St), w = v.encodeLocation ? v.encodeLocation(f).pathname : f.pathname, E = d.pathname, O = m && m.navigation && m.navigation.location ? m.navigation.location.pathname : null;
|
|
3230
|
+
i || (E = E.toLowerCase(), O = O ? O.toLowerCase() : null, w = w.toLowerCase());
|
|
3231
|
+
let k = E === w || !a && E.startsWith(w) && E.charAt(w.length) === "/", C = O != null && (O === w || !a && O.startsWith(w) && O.charAt(w.length) === "/"), R = k ? n : void 0, A;
|
|
3232
|
+
typeof s == "function" ? A = s({
|
|
3233
3233
|
isActive: k,
|
|
3234
3234
|
isPending: C
|
|
3235
|
-
}) :
|
|
3235
|
+
}) : A = [s, k ? "active" : null, C ? "pending" : null].filter(Boolean).join(" ");
|
|
3236
3236
|
let _ = typeof l == "function" ? l({
|
|
3237
3237
|
isActive: k,
|
|
3238
3238
|
isPending: C
|
|
3239
3239
|
}) : l;
|
|
3240
|
-
return /* @__PURE__ */ p.createElement(qr,
|
|
3241
|
-
"aria-current":
|
|
3242
|
-
className:
|
|
3240
|
+
return /* @__PURE__ */ p.createElement(qr, bt({}, c, {
|
|
3241
|
+
"aria-current": R,
|
|
3242
|
+
className: A,
|
|
3243
3243
|
ref: r,
|
|
3244
3244
|
style: _,
|
|
3245
3245
|
to: o
|
|
@@ -3249,7 +3249,7 @@ const fl = /* @__PURE__ */ p.forwardRef(function(e, r) {
|
|
|
3249
3249
|
}) : u);
|
|
3250
3250
|
});
|
|
3251
3251
|
process.env.NODE_ENV !== "production" && (fl.displayName = "NavLink");
|
|
3252
|
-
const pl = /* @__PURE__ */ p.forwardRef((t, e) => /* @__PURE__ */ p.createElement(xs,
|
|
3252
|
+
const pl = /* @__PURE__ */ p.forwardRef((t, e) => /* @__PURE__ */ p.createElement(xs, bt({}, t, {
|
|
3253
3253
|
ref: e
|
|
3254
3254
|
})));
|
|
3255
3255
|
process.env.NODE_ENV !== "production" && (pl.displayName = "Form");
|
|
@@ -3266,19 +3266,19 @@ const xs = /* @__PURE__ */ p.forwardRef((t, e) => {
|
|
|
3266
3266
|
preventScrollReset: c
|
|
3267
3267
|
} = t, f = En(t, dl), d = vl(l, o), m = i.toLowerCase() === "get" ? "get" : "post", v = Os(s, {
|
|
3268
3268
|
relative: u
|
|
3269
|
-
}), w = (
|
|
3270
|
-
if (a && a(
|
|
3269
|
+
}), w = (E) => {
|
|
3270
|
+
if (a && a(E), E.defaultPrevented)
|
|
3271
3271
|
return;
|
|
3272
|
-
|
|
3273
|
-
let O =
|
|
3274
|
-
d(O ||
|
|
3272
|
+
E.preventDefault();
|
|
3273
|
+
let O = E.nativeEvent.submitter, k = (O == null ? void 0 : O.getAttribute("formmethod")) || i;
|
|
3274
|
+
d(O || E.currentTarget, {
|
|
3275
3275
|
method: k,
|
|
3276
3276
|
replace: n,
|
|
3277
3277
|
relative: u,
|
|
3278
3278
|
preventScrollReset: c
|
|
3279
3279
|
});
|
|
3280
3280
|
};
|
|
3281
|
-
return /* @__PURE__ */ p.createElement("form",
|
|
3281
|
+
return /* @__PURE__ */ p.createElement("form", bt({
|
|
3282
3282
|
ref: e,
|
|
3283
3283
|
method: m,
|
|
3284
3284
|
action: v,
|
|
@@ -3300,7 +3300,7 @@ function ml(t) {
|
|
|
3300
3300
|
}
|
|
3301
3301
|
function gl(t) {
|
|
3302
3302
|
let e = p.useContext(ar);
|
|
3303
|
-
return e || (process.env.NODE_ENV !== "production" ?
|
|
3303
|
+
return e || (process.env.NODE_ENV !== "production" ? P(!1, ml(t)) : P(!1)), e;
|
|
3304
3304
|
}
|
|
3305
3305
|
function yl(t, e) {
|
|
3306
3306
|
let {
|
|
@@ -3309,7 +3309,7 @@ function yl(t, e) {
|
|
|
3309
3309
|
state: i,
|
|
3310
3310
|
preventScrollReset: s,
|
|
3311
3311
|
relative: a
|
|
3312
|
-
} = e === void 0 ? {} : e, l = bs(), o =
|
|
3312
|
+
} = e === void 0 ? {} : e, l = bs(), o = xt(), u = Ar(t, {
|
|
3313
3313
|
relative: a
|
|
3314
3314
|
});
|
|
3315
3315
|
return p.useCallback((c) => {
|
|
@@ -3344,7 +3344,7 @@ function vl(t, e) {
|
|
|
3344
3344
|
formMethod: a,
|
|
3345
3345
|
formEncType: l
|
|
3346
3346
|
};
|
|
3347
|
-
t ? (e == null && (process.env.NODE_ENV !== "production" ?
|
|
3347
|
+
t ? (e == null && (process.env.NODE_ENV !== "production" ? P(!1, "No routeId available for useFetcher()") : P(!1)), r.fetch(t, e, c, f)) : r.navigate(c, f);
|
|
3348
3348
|
}, [n, r, t, e]);
|
|
3349
3349
|
}
|
|
3350
3350
|
function Os(t, e) {
|
|
@@ -3352,11 +3352,11 @@ function Os(t, e) {
|
|
|
3352
3352
|
relative: r
|
|
3353
3353
|
} = e === void 0 ? {} : e, {
|
|
3354
3354
|
basename: n
|
|
3355
|
-
} = p.useContext(
|
|
3356
|
-
i || (process.env.NODE_ENV !== "production" ?
|
|
3357
|
-
let [s] = i.matches.slice(-1), a =
|
|
3355
|
+
} = p.useContext(St), i = p.useContext(Be);
|
|
3356
|
+
i || (process.env.NODE_ENV !== "production" ? P(!1, "useFormAction must be used inside a RouteContext") : P(!1));
|
|
3357
|
+
let [s] = i.matches.slice(-1), a = bt({}, Ar(t || ".", {
|
|
3358
3358
|
relative: r
|
|
3359
|
-
})), l =
|
|
3359
|
+
})), l = xt();
|
|
3360
3360
|
if (t == null && (a.search = l.search, a.hash = l.hash, s.route.index)) {
|
|
3361
3361
|
let o = new URLSearchParams(a.search);
|
|
3362
3362
|
o.delete("index"), a.search = o.toString() ? "?" + o.toString() : "";
|
|
@@ -3368,7 +3368,7 @@ function bl({
|
|
|
3368
3368
|
setShowAdminEdit: e,
|
|
3369
3369
|
enabledAdminEdit: r
|
|
3370
3370
|
}) {
|
|
3371
|
-
const { actions: n, showActions: i, setShowActions: s, navigateTo: a } =
|
|
3371
|
+
const { actions: n, showActions: i, setShowActions: s, navigateTo: a } = Rt(ut), l = un();
|
|
3372
3372
|
return Ge(() => {
|
|
3373
3373
|
const o = (u) => {
|
|
3374
3374
|
u.metaKey && u.key === "Enter" && (u.preventDefault(), u.stopPropagation(), n.length > 0 && s((c) => !c)), i && u.key !== "ArrowUp" && u.key !== "ArrowDown" && u.key !== "Enter" && s(!1), i && u.key === "ArrowDown" && u.target.className === "qikbar-action" && u.target.nextElementSibling && u.target.nextElementSibling.focus(), i && u.key === "ArrowUp" && u.target.className === "qikbar-action" && u.target.previousElementSibling && u.target.previousElementSibling.focus();
|
|
@@ -3433,18 +3433,14 @@ function bl({
|
|
|
3433
3433
|
}
|
|
3434
3434
|
),
|
|
3435
3435
|
n.length > 0 && /* @__PURE__ */ y.jsxs("div", { className: "qikbar-actions-wrapper", children: [
|
|
3436
|
-
i && /* @__PURE__ */ y.jsx("div", { className: "qikbar-actions-panel", children: /* @__PURE__ */ y.jsx("ul", { className: "qikbar-actions-list", ref: l, children: n.
|
|
3436
|
+
i && /* @__PURE__ */ y.jsx("div", { className: "qikbar-actions-panel", children: /* @__PURE__ */ y.jsx("ul", { className: "qikbar-actions-list", ref: l, children: n.map((o) => /* @__PURE__ */ y.jsx(
|
|
3437
3437
|
"button",
|
|
3438
3438
|
{
|
|
3439
|
-
onClick: () => a(
|
|
3440
|
-
o.click.href,
|
|
3441
|
-
o.click.title,
|
|
3442
|
-
o.click.target
|
|
3443
|
-
),
|
|
3439
|
+
onClick: () => a(o.href, o.title, o.target),
|
|
3444
3440
|
className: "qikbar-action",
|
|
3445
3441
|
children: o.title
|
|
3446
3442
|
},
|
|
3447
|
-
o.
|
|
3443
|
+
o.title
|
|
3448
3444
|
)) }) }),
|
|
3449
3445
|
/* @__PURE__ */ y.jsxs(
|
|
3450
3446
|
"button",
|
|
@@ -3466,7 +3462,7 @@ function bl({
|
|
|
3466
3462
|
] });
|
|
3467
3463
|
}
|
|
3468
3464
|
function wl() {
|
|
3469
|
-
const { search: t, setSearch: e, searchRef: r, placeholder: n } =
|
|
3465
|
+
const { search: t, setSearch: e, searchRef: r, placeholder: n } = Rt(ut);
|
|
3470
3466
|
return /* @__PURE__ */ y.jsx(
|
|
3471
3467
|
"input",
|
|
3472
3468
|
{
|
|
@@ -3485,7 +3481,7 @@ function wl() {
|
|
|
3485
3481
|
function Cl({
|
|
3486
3482
|
crumbs: t
|
|
3487
3483
|
}) {
|
|
3488
|
-
const { setCrumbs: e } =
|
|
3484
|
+
const { setCrumbs: e } = Rt(ut);
|
|
3489
3485
|
return t.length === 0 ? null : /* @__PURE__ */ y.jsx("ul", { className: "qikbar-crumbs", children: t.map((r, n) => {
|
|
3490
3486
|
const i = t.length - 1 === n;
|
|
3491
3487
|
return /* @__PURE__ */ y.jsx("li", { className: "qikbar-crumb", children: /* @__PURE__ */ y.jsxs(
|
|
@@ -3508,59 +3504,59 @@ function _s({
|
|
|
3508
3504
|
wrapperClass: e = "qikbar-command-wrapper",
|
|
3509
3505
|
defaultOpen: r = !1
|
|
3510
3506
|
}) {
|
|
3511
|
-
const n = un(null), i =
|
|
3507
|
+
const n = un(null), i = xt(), s = bs(), [a, l] = We(!1), [o, u] = We([]), [c, f] = We([]), [d, m] = We(!1), [v, w] = We(r), [E, O] = We(""), [k, C] = We("Search for resources"), R = un(), [A, _] = We(0), j = Ee();
|
|
3512
3508
|
if (Ge(() => {
|
|
3513
|
-
var
|
|
3514
|
-
v && ((
|
|
3509
|
+
var H;
|
|
3510
|
+
v && ((H = R.current) == null || H.focus(), _(0), document.body.style.overflow = "hidden"), v || (s(""), m(!1), u([]), f([]), document.body.style.overflow = "unset");
|
|
3515
3511
|
}, [v, i.pathname]), Ge(() => {
|
|
3516
|
-
const
|
|
3517
|
-
var
|
|
3518
|
-
if (v && ["Space", "ArrowUp", "ArrowDown"].indexOf(
|
|
3519
|
-
|
|
3512
|
+
const H = (M) => {
|
|
3513
|
+
var re, ce, ye, ve, X, Le, tt;
|
|
3514
|
+
if (v && ["Space", "ArrowUp", "ArrowDown"].indexOf(M.key) > -1 && M.preventDefault(), M.metaKey && M.key === "Enter") {
|
|
3515
|
+
M.preventDefault(), M.stopPropagation();
|
|
3520
3516
|
return;
|
|
3521
3517
|
}
|
|
3522
|
-
if (v &&
|
|
3518
|
+
if (v && M.key === "ArrowDown" && M.target.localName === "input" && ((re = n.current) != null && re.getElementsByClassName("qikbar-item")[1]) && (_(1), n.current.getElementsByClassName(
|
|
3523
3519
|
"qikbar-item"
|
|
3524
|
-
)[1].focus()), v &&
|
|
3520
|
+
)[1].focus()), v && M.target.localName === "input" && E === "" && M.key === "Backspace" && (s(-1), f((ie) => ie.slice(0, -1))), v && M.key === "Escape" && !t && (O(""), s(""), w(!1), u([])), v && M.key === "Enter" && M.target.localName === "input" && ((ce = n.current) != null && ce.getElementsByClassName("qikbar-item")[0]) && (n.current.getElementsByClassName(
|
|
3525
3521
|
"qikbar-item"
|
|
3526
|
-
)[0].click(), O("")), v &&
|
|
3522
|
+
)[0].click(), O("")), v && M.key === "ArrowDown" && M.target.getAttribute("data-testid") === "qikbar-item" && M.target.nextElementSibling) {
|
|
3527
3523
|
let ie;
|
|
3528
|
-
|
|
3524
|
+
M.target.nextElementSibling.className === "qikbar-category-wrapper" ? ie = M.target.nextElementSibling.nextElementSibling : ie = M.target.nextElementSibling;
|
|
3529
3525
|
const Ce = Array.prototype.indexOf.call(
|
|
3530
|
-
(ve = (ye =
|
|
3526
|
+
(ve = (ye = M.target) == null ? void 0 : ye.parentNode) == null ? void 0 : ve.getElementsByClassName("qikbar-item"),
|
|
3531
3527
|
ie
|
|
3532
3528
|
);
|
|
3533
3529
|
_(Ce), ie == null || ie.focus();
|
|
3534
3530
|
}
|
|
3535
|
-
if (v &&
|
|
3531
|
+
if (v && M.key === "ArrowUp" && M.target.getAttribute("data-testid") === "qikbar-item" && M.target.previousElementSibling) {
|
|
3536
3532
|
let ie;
|
|
3537
|
-
if (
|
|
3533
|
+
if (M.target.previousElementSibling.className === "qikbar-category-wrapper" ? ie = M.target.previousElementSibling.previousElementSibling : ie = M.target.previousElementSibling, !ie)
|
|
3538
3534
|
return;
|
|
3539
3535
|
const Ce = Array.prototype.indexOf.call(
|
|
3540
|
-
(Le = (
|
|
3536
|
+
(Le = (X = M.target) == null ? void 0 : X.parentNode) == null ? void 0 : Le.getElementsByClassName("qikbar-item"),
|
|
3541
3537
|
ie
|
|
3542
3538
|
);
|
|
3543
3539
|
_(Ce), ie == null || ie.focus();
|
|
3544
3540
|
}
|
|
3545
|
-
v &&
|
|
3541
|
+
v && M.key !== "ArrowUp" && M.key !== "ArrowDown" && M.key !== "Enter" && !M.metaKey && !t && (_(0), (tt = R.current) == null || tt.focus()), M.metaKey && M.key === "k" && !t && (v && (s(""), O(""), _(0), u([]), f([])), w((ie) => !ie)), v && M.key === "Enter" && O("");
|
|
3546
3542
|
};
|
|
3547
|
-
return document.addEventListener("keydown",
|
|
3548
|
-
document.removeEventListener("keydown",
|
|
3543
|
+
return document.addEventListener("keydown", H), () => {
|
|
3544
|
+
document.removeEventListener("keydown", H);
|
|
3549
3545
|
};
|
|
3550
|
-
}, [v,
|
|
3546
|
+
}, [v, E]), !v)
|
|
3551
3547
|
return null;
|
|
3552
|
-
const
|
|
3548
|
+
const F = !!new URLSearchParams(window.location.search).get("qikbarAdmin"), J = "https://app.qikbar.com";
|
|
3553
3549
|
return /* @__PURE__ */ y.jsxs(
|
|
3554
3550
|
"div",
|
|
3555
3551
|
{
|
|
3556
3552
|
className: `${e} ${a && "qikbar-admin-offset"}`,
|
|
3557
3553
|
"data-testid": "command-bar-container",
|
|
3558
3554
|
children: [
|
|
3559
|
-
|
|
3555
|
+
F && /* @__PURE__ */ y.jsx(
|
|
3560
3556
|
"div",
|
|
3561
3557
|
{
|
|
3562
3558
|
className: a ? "qikbar-embedded" : "qickbar-embedded-hidden",
|
|
3563
|
-
children: /* @__PURE__ */ y.jsx("iframe", { src: `${
|
|
3559
|
+
children: /* @__PURE__ */ y.jsx("iframe", { src: `${J}/sites/${j.id}/edit/?embedded=true` })
|
|
3564
3560
|
}
|
|
3565
3561
|
),
|
|
3566
3562
|
/* @__PURE__ */ y.jsx(
|
|
@@ -3568,11 +3564,11 @@ function _s({
|
|
|
3568
3564
|
{
|
|
3569
3565
|
value: {
|
|
3570
3566
|
demo: t,
|
|
3571
|
-
search:
|
|
3572
|
-
searchRef:
|
|
3567
|
+
search: E,
|
|
3568
|
+
searchRef: R,
|
|
3573
3569
|
setIsOpen: w,
|
|
3574
3570
|
setSearch: O,
|
|
3575
|
-
activeIndex:
|
|
3571
|
+
activeIndex: A,
|
|
3576
3572
|
placeholder: k,
|
|
3577
3573
|
setPlaceholder: C,
|
|
3578
3574
|
setActions: u,
|
|
@@ -3581,22 +3577,22 @@ function _s({
|
|
|
3581
3577
|
actions: o,
|
|
3582
3578
|
showActions: d,
|
|
3583
3579
|
setShowActions: m,
|
|
3584
|
-
navigateTo: (
|
|
3580
|
+
navigateTo: (H, M, re = "self") => {
|
|
3585
3581
|
var ce, ye;
|
|
3586
|
-
switch (m(!1), O(""),
|
|
3582
|
+
switch (m(!1), O(""), re) {
|
|
3587
3583
|
case "self":
|
|
3588
|
-
_(0), s(
|
|
3584
|
+
_(0), s(H), (ce = R.current) == null || ce.focus(), H !== (i == null ? void 0 : i.pathname) && u([]), n.current.getElementsByClassName(
|
|
3589
3585
|
"qikbar-list"
|
|
3590
|
-
)[0].scrollTo(0, 0), f((ve) => [...ve, { title:
|
|
3586
|
+
)[0].scrollTo(0, 0), f((ve) => [...ve, { title: M, to: H }]);
|
|
3591
3587
|
break;
|
|
3592
3588
|
case "internal":
|
|
3593
|
-
s(""), w(!1), f([]), u([]), j != null && j.router ? (ye = j == null ? void 0 : j.router) == null || ye.call(j,
|
|
3589
|
+
s(""), w(!1), f([]), u([]), j != null && j.router ? (ye = j == null ? void 0 : j.router) == null || ye.call(j, H) : window.location = H;
|
|
3594
3590
|
break;
|
|
3595
3591
|
case "external":
|
|
3596
|
-
s(""), w(!1), f([]), u([]), window.open(
|
|
3592
|
+
s(""), w(!1), f([]), u([]), window.open(H, "_blank");
|
|
3597
3593
|
break;
|
|
3598
3594
|
default:
|
|
3599
|
-
s(
|
|
3595
|
+
s(H), f((ve) => [...ve, { title: M, to: H }]);
|
|
3600
3596
|
}
|
|
3601
3597
|
}
|
|
3602
3598
|
},
|
|
@@ -3609,7 +3605,7 @@ function _s({
|
|
|
3609
3605
|
/* @__PURE__ */ y.jsx(
|
|
3610
3606
|
bl,
|
|
3611
3607
|
{
|
|
3612
|
-
enabledAdminEdit:
|
|
3608
|
+
enabledAdminEdit: F,
|
|
3613
3609
|
showAdminEdit: a,
|
|
3614
3610
|
setShowAdminEdit: l
|
|
3615
3611
|
}
|
|
@@ -4075,13 +4071,13 @@ function Rn({
|
|
|
4075
4071
|
tag: o
|
|
4076
4072
|
}
|
|
4077
4073
|
}) {
|
|
4078
|
-
const { setIsOpen: u, setCrumbs: c, setActions: f, demo: d } =
|
|
4074
|
+
const { setIsOpen: u, setCrumbs: c, setActions: f, demo: d } = Rt(ut), m = Ee();
|
|
4079
4075
|
if (l)
|
|
4080
4076
|
return null;
|
|
4081
4077
|
const v = i ? "a" : qr, w = (k) => {
|
|
4082
4078
|
var C;
|
|
4083
4079
|
m != null && m.router && ((C = m == null ? void 0 : m.router) == null || C.call(m, i), !d && u(!1), k.preventDefault());
|
|
4084
|
-
},
|
|
4080
|
+
}, E = r || (s == null ? void 0 : s.path) || "/", O = i ? {
|
|
4085
4081
|
...yu(i) ? {
|
|
4086
4082
|
rel: "noopener",
|
|
4087
4083
|
target: "_blank",
|
|
@@ -4089,9 +4085,9 @@ function Rn({
|
|
|
4089
4085
|
onClick: () => !d && u(!1)
|
|
4090
4086
|
} : { href: i, onClick: w }
|
|
4091
4087
|
} : {
|
|
4092
|
-
to:
|
|
4088
|
+
to: E,
|
|
4093
4089
|
onClick: () => {
|
|
4094
|
-
f([]), c((k) => [...k, { title: e, to:
|
|
4090
|
+
f([]), c((k) => [...k, { title: e, to: E }]);
|
|
4095
4091
|
}
|
|
4096
4092
|
};
|
|
4097
4093
|
return /* @__PURE__ */ y.jsxs(
|
|
@@ -4115,32 +4111,32 @@ function Rn({
|
|
|
4115
4111
|
);
|
|
4116
4112
|
}
|
|
4117
4113
|
function kr({ placeholder: t }) {
|
|
4118
|
-
const { setPlaceholder: e } =
|
|
4114
|
+
const { setPlaceholder: e } = Rt(ut);
|
|
4119
4115
|
return Ge(() => {
|
|
4120
4116
|
e(t);
|
|
4121
4117
|
}, [e, t]), null;
|
|
4122
4118
|
}
|
|
4123
4119
|
function Ds({ fields: t }) {
|
|
4124
|
-
return /* @__PURE__ */ y.jsx("div", { className: "qikbar-details-wrapper", children: /* @__PURE__ */ y.jsx("div", { className: "qikbar-details", children: t.map((
|
|
4125
|
-
n && /* @__PURE__ */ y.jsxs("span", { className: "qikbar-field-label", children: [
|
|
4126
|
-
|
|
4120
|
+
return /* @__PURE__ */ y.jsx("div", { className: "qikbar-details-wrapper", children: /* @__PURE__ */ y.jsx("div", { className: "qikbar-details", children: t.map(({ label: e, value: r, html: n }, i) => /* @__PURE__ */ y.jsxs("div", { className: "qikbar-field", children: [
|
|
4121
|
+
!n && e && /* @__PURE__ */ y.jsxs("span", { className: "qikbar-field-label", children: [
|
|
4122
|
+
e,
|
|
4127
4123
|
":"
|
|
4128
4124
|
] }),
|
|
4129
|
-
|
|
4125
|
+
n ? /* @__PURE__ */ y.jsx(
|
|
4130
4126
|
"p",
|
|
4131
4127
|
{
|
|
4132
|
-
dangerouslySetInnerHTML: { __html:
|
|
4128
|
+
dangerouslySetInnerHTML: { __html: r },
|
|
4133
4129
|
className: "qikbar-field-value"
|
|
4134
4130
|
}
|
|
4135
|
-
) : /* @__PURE__ */ y.jsx("p", { className: "qikbar-field-value", children:
|
|
4136
|
-
] },
|
|
4131
|
+
) : /* @__PURE__ */ y.jsx("p", { className: "qikbar-field-value", children: r })
|
|
4132
|
+
] }, i)) }) });
|
|
4137
4133
|
}
|
|
4138
4134
|
function Ls({
|
|
4139
4135
|
categories: t,
|
|
4140
4136
|
placeholderText: e
|
|
4141
4137
|
}) {
|
|
4142
4138
|
var c;
|
|
4143
|
-
const { activeIndex: r, search: n, setActions: i, navigateTo: s } =
|
|
4139
|
+
const { activeIndex: r, search: n, setActions: i, navigateTo: s } = Rt(ut), a = t.map((f) => ({
|
|
4144
4140
|
...f,
|
|
4145
4141
|
children: f.commands.filter(
|
|
4146
4142
|
(d) => d.title.toLowerCase().includes(n.toLowerCase())
|
|
@@ -4243,7 +4239,7 @@ function Si(t, e) {
|
|
|
4243
4239
|
if (!e.options.mutationKey)
|
|
4244
4240
|
return !1;
|
|
4245
4241
|
if (r) {
|
|
4246
|
-
if (
|
|
4242
|
+
if (gt(e.options.mutationKey) !== gt(s))
|
|
4247
4243
|
return !1;
|
|
4248
4244
|
} else if (!It(e.options.mutationKey, s))
|
|
4249
4245
|
return !1;
|
|
@@ -4251,9 +4247,9 @@ function Si(t, e) {
|
|
|
4251
4247
|
return !(typeof n == "boolean" && e.state.status === "loading" !== n || i && !i(e));
|
|
4252
4248
|
}
|
|
4253
4249
|
function Sn(t, e) {
|
|
4254
|
-
return ((e == null ? void 0 : e.queryKeyHashFn) ||
|
|
4250
|
+
return ((e == null ? void 0 : e.queryKeyHashFn) || gt)(t);
|
|
4255
4251
|
}
|
|
4256
|
-
function
|
|
4252
|
+
function gt(t) {
|
|
4257
4253
|
return JSON.stringify(t, (e, r) => mn(r) ? Object.keys(r).sort().reduce((n, i) => (n[i] = r[i], n), {}) : r);
|
|
4258
4254
|
}
|
|
4259
4255
|
function It(t, e) {
|
|
@@ -4412,39 +4408,39 @@ function Rr(t) {
|
|
|
4412
4408
|
}
|
|
4413
4409
|
function Fs(t) {
|
|
4414
4410
|
let e = !1, r = 0, n = !1, i, s, a;
|
|
4415
|
-
const l = new Promise((
|
|
4416
|
-
s =
|
|
4417
|
-
}), o = (
|
|
4418
|
-
n || (m(new As(
|
|
4411
|
+
const l = new Promise((E, O) => {
|
|
4412
|
+
s = E, a = O;
|
|
4413
|
+
}), o = (E) => {
|
|
4414
|
+
n || (m(new As(E)), t.abort == null || t.abort());
|
|
4419
4415
|
}, u = () => {
|
|
4420
4416
|
e = !0;
|
|
4421
4417
|
}, c = () => {
|
|
4422
4418
|
e = !1;
|
|
4423
|
-
}, f = () => !Dr.isFocused() || t.networkMode !== "always" && !Lr.isOnline(), d = (
|
|
4424
|
-
n || (n = !0, t.onSuccess == null || t.onSuccess(
|
|
4425
|
-
}, m = (
|
|
4426
|
-
n || (n = !0, t.onError == null || t.onError(
|
|
4427
|
-
}, v = () => new Promise((
|
|
4419
|
+
}, f = () => !Dr.isFocused() || t.networkMode !== "always" && !Lr.isOnline(), d = (E) => {
|
|
4420
|
+
n || (n = !0, t.onSuccess == null || t.onSuccess(E), i == null || i(), s(E));
|
|
4421
|
+
}, m = (E) => {
|
|
4422
|
+
n || (n = !0, t.onError == null || t.onError(E), i == null || i(), a(E));
|
|
4423
|
+
}, v = () => new Promise((E) => {
|
|
4428
4424
|
i = (O) => {
|
|
4429
4425
|
if (n || !f())
|
|
4430
|
-
return
|
|
4426
|
+
return E(O);
|
|
4431
4427
|
}, t.onPause == null || t.onPause();
|
|
4432
4428
|
}).then(() => {
|
|
4433
4429
|
i = void 0, n || t.onContinue == null || t.onContinue();
|
|
4434
4430
|
}), w = () => {
|
|
4435
4431
|
if (n)
|
|
4436
4432
|
return;
|
|
4437
|
-
let
|
|
4433
|
+
let E;
|
|
4438
4434
|
try {
|
|
4439
|
-
|
|
4435
|
+
E = t.fn();
|
|
4440
4436
|
} catch (O) {
|
|
4441
|
-
|
|
4437
|
+
E = Promise.reject(O);
|
|
4442
4438
|
}
|
|
4443
|
-
Promise.resolve(
|
|
4439
|
+
Promise.resolve(E).then(d).catch((O) => {
|
|
4444
4440
|
var k, C;
|
|
4445
4441
|
if (n)
|
|
4446
4442
|
return;
|
|
4447
|
-
const
|
|
4443
|
+
const R = (k = t.retry) != null ? k : 3, A = (C = t.retryDelay) != null ? C : Eu, _ = typeof A == "function" ? A(r, O) : A, j = R === !0 || typeof R == "number" && r < R || typeof R == "function" && R(r, O);
|
|
4448
4444
|
if (e || !j) {
|
|
4449
4445
|
m(O);
|
|
4450
4446
|
return;
|
|
@@ -4930,11 +4926,11 @@ class _u extends qs {
|
|
|
4930
4926
|
var C;
|
|
4931
4927
|
return this.retryer = Fs({
|
|
4932
4928
|
fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
|
|
4933
|
-
onFail: (
|
|
4929
|
+
onFail: (R, A) => {
|
|
4934
4930
|
this.dispatch({
|
|
4935
4931
|
type: "failed",
|
|
4936
|
-
failureCount:
|
|
4937
|
-
error:
|
|
4932
|
+
failureCount: R,
|
|
4933
|
+
error: A
|
|
4938
4934
|
});
|
|
4939
4935
|
},
|
|
4940
4936
|
onPause: () => {
|
|
@@ -4960,10 +4956,10 @@ class _u extends qs {
|
|
|
4960
4956
|
type: "loading",
|
|
4961
4957
|
variables: this.options.variables
|
|
4962
4958
|
}), await ((u = (c = this.mutationCache.config).onMutate) == null ? void 0 : u.call(c, this.state.variables, this));
|
|
4963
|
-
const
|
|
4964
|
-
|
|
4959
|
+
const R = await ((f = (d = this.options).onMutate) == null ? void 0 : f.call(d, this.state.variables));
|
|
4960
|
+
R !== this.state.context && this.dispatch({
|
|
4965
4961
|
type: "loading",
|
|
4966
|
-
context:
|
|
4962
|
+
context: R,
|
|
4967
4963
|
variables: this.state.variables
|
|
4968
4964
|
});
|
|
4969
4965
|
}
|
|
@@ -4974,8 +4970,8 @@ class _u extends qs {
|
|
|
4974
4970
|
}), C;
|
|
4975
4971
|
} catch (C) {
|
|
4976
4972
|
try {
|
|
4977
|
-
var m, v, w,
|
|
4978
|
-
throw await ((m = (v = this.mutationCache.config).onError) == null ? void 0 : m.call(v, C, this.state.variables, this.state.context, this)), process.env.NODE_ENV !== "production" && this.logger.error(C), await ((w = (
|
|
4973
|
+
var m, v, w, E, O, k;
|
|
4974
|
+
throw await ((m = (v = this.mutationCache.config).onError) == null ? void 0 : m.call(v, C, this.state.variables, this.state.context, this)), process.env.NODE_ENV !== "production" && this.logger.error(C), await ((w = (E = this.options).onError) == null ? void 0 : w.call(E, C, this.state.variables, this.state.context)), await ((O = (k = this.options).onSettled) == null ? void 0 : O.call(k, void 0, C, this.state.variables, this.state.context)), C;
|
|
4979
4975
|
} finally {
|
|
4980
4976
|
this.dispatch({
|
|
4981
4977
|
type: "error",
|
|
@@ -5127,7 +5123,7 @@ function Du() {
|
|
|
5127
5123
|
var e, r, n, i, s, a;
|
|
5128
5124
|
const l = (e = t.fetchOptions) == null || (r = e.meta) == null ? void 0 : r.refetchPage, o = (n = t.fetchOptions) == null || (i = n.meta) == null ? void 0 : i.fetchMore, u = o == null ? void 0 : o.pageParam, c = (o == null ? void 0 : o.direction) === "forward", f = (o == null ? void 0 : o.direction) === "backward", d = ((s = t.state.data) == null ? void 0 : s.pages) || [], m = ((a = t.state.data) == null ? void 0 : a.pageParams) || [];
|
|
5129
5125
|
let v = m, w = !1;
|
|
5130
|
-
const
|
|
5126
|
+
const E = (_) => {
|
|
5131
5127
|
Object.defineProperty(_, "signal", {
|
|
5132
5128
|
enumerable: !0,
|
|
5133
5129
|
get: () => {
|
|
@@ -5135,51 +5131,51 @@ function Du() {
|
|
|
5135
5131
|
if ((j = t.signal) != null && j.aborted)
|
|
5136
5132
|
w = !0;
|
|
5137
5133
|
else {
|
|
5138
|
-
var
|
|
5139
|
-
(
|
|
5134
|
+
var N;
|
|
5135
|
+
(N = t.signal) == null || N.addEventListener("abort", () => {
|
|
5140
5136
|
w = !0;
|
|
5141
5137
|
});
|
|
5142
5138
|
}
|
|
5143
5139
|
return t.signal;
|
|
5144
5140
|
}
|
|
5145
5141
|
});
|
|
5146
|
-
}, O = t.options.queryFn || (() => Promise.reject("Missing queryFn")), k = (_, j,
|
|
5142
|
+
}, O = t.options.queryFn || (() => Promise.reject("Missing queryFn")), k = (_, j, N, F) => (v = F ? [j, ...v] : [...v, j], F ? [N, ..._] : [..._, N]), C = (_, j, N, F) => {
|
|
5147
5143
|
if (w)
|
|
5148
5144
|
return Promise.reject("Cancelled");
|
|
5149
|
-
if (typeof
|
|
5145
|
+
if (typeof N > "u" && !j && _.length)
|
|
5150
5146
|
return Promise.resolve(_);
|
|
5151
|
-
const
|
|
5147
|
+
const J = {
|
|
5152
5148
|
queryKey: t.queryKey,
|
|
5153
|
-
pageParam:
|
|
5149
|
+
pageParam: N,
|
|
5154
5150
|
meta: t.options.meta
|
|
5155
5151
|
};
|
|
5156
|
-
|
|
5157
|
-
const
|
|
5158
|
-
return Promise.resolve(
|
|
5152
|
+
E(J);
|
|
5153
|
+
const H = O(J);
|
|
5154
|
+
return Promise.resolve(H).then((re) => k(_, N, re, F));
|
|
5159
5155
|
};
|
|
5160
|
-
let
|
|
5156
|
+
let R;
|
|
5161
5157
|
if (!d.length)
|
|
5162
|
-
|
|
5158
|
+
R = C([]);
|
|
5163
5159
|
else if (c) {
|
|
5164
5160
|
const _ = typeof u < "u", j = _ ? u : ki(t.options, d);
|
|
5165
|
-
|
|
5161
|
+
R = C(d, _, j);
|
|
5166
5162
|
} else if (f) {
|
|
5167
5163
|
const _ = typeof u < "u", j = _ ? u : Lu(t.options, d);
|
|
5168
|
-
|
|
5164
|
+
R = C(d, _, j, !0);
|
|
5169
5165
|
} else {
|
|
5170
5166
|
v = [];
|
|
5171
5167
|
const _ = typeof t.options.getNextPageParam > "u";
|
|
5172
|
-
|
|
5173
|
-
for (let
|
|
5174
|
-
|
|
5175
|
-
if (l && d[
|
|
5176
|
-
const
|
|
5177
|
-
return C(
|
|
5168
|
+
R = (l && d[0] ? l(d[0], 0, d) : !0) ? C([], _, m[0]) : Promise.resolve(k([], m[0], d[0]));
|
|
5169
|
+
for (let N = 1; N < d.length; N++)
|
|
5170
|
+
R = R.then((F) => {
|
|
5171
|
+
if (l && d[N] ? l(d[N], N, d) : !0) {
|
|
5172
|
+
const H = _ ? m[N] : ki(t.options, F);
|
|
5173
|
+
return C(F, _, H);
|
|
5178
5174
|
}
|
|
5179
|
-
return Promise.resolve(k(
|
|
5175
|
+
return Promise.resolve(k(F, m[N], d[N]));
|
|
5180
5176
|
});
|
|
5181
5177
|
}
|
|
5182
|
-
return
|
|
5178
|
+
return R.then((_) => ({
|
|
5183
5179
|
pages: _,
|
|
5184
5180
|
pageParams: v
|
|
5185
5181
|
}));
|
|
@@ -5341,7 +5337,7 @@ class Pu {
|
|
|
5341
5337
|
this.defaultOptions = e;
|
|
5342
5338
|
}
|
|
5343
5339
|
setQueryDefaults(e, r) {
|
|
5344
|
-
const n = this.queryDefaults.find((i) =>
|
|
5340
|
+
const n = this.queryDefaults.find((i) => gt(e) === gt(i.queryKey));
|
|
5345
5341
|
n ? n.defaultOptions = r : this.queryDefaults.push({
|
|
5346
5342
|
queryKey: e,
|
|
5347
5343
|
defaultOptions: r
|
|
@@ -5354,7 +5350,7 @@ class Pu {
|
|
|
5354
5350
|
return process.env.NODE_ENV !== "production" && this.queryDefaults.filter((i) => It(e, i.queryKey)).length > 1 && this.logger.error("[QueryClient] Several query defaults match with key '" + JSON.stringify(e) + "'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."), r == null ? void 0 : r.defaultOptions;
|
|
5355
5351
|
}
|
|
5356
5352
|
setMutationDefaults(e, r) {
|
|
5357
|
-
const n = this.mutationDefaults.find((i) =>
|
|
5353
|
+
const n = this.mutationDefaults.find((i) => gt(e) === gt(i.mutationKey));
|
|
5358
5354
|
n ? n.defaultOptions = r : this.mutationDefaults.push({
|
|
5359
5355
|
mutationKey: e,
|
|
5360
5356
|
defaultOptions: r
|
|
@@ -5510,46 +5506,46 @@ class Nu extends cr {
|
|
|
5510
5506
|
error: m,
|
|
5511
5507
|
errorUpdatedAt: v,
|
|
5512
5508
|
fetchStatus: w,
|
|
5513
|
-
status:
|
|
5509
|
+
status: E
|
|
5514
5510
|
} = f, O = !1, k = !1, C;
|
|
5515
5511
|
if (r._optimisticResults) {
|
|
5516
|
-
const
|
|
5517
|
-
(
|
|
5512
|
+
const N = this.hasListeners(), F = !N && Di(e, r), J = N && Li(e, n, r, i);
|
|
5513
|
+
(F || J) && (w = Vr(e.options.networkMode) ? "fetching" : "paused", d || (E = "loading")), r._optimisticResults === "isRestoring" && (w = "idle");
|
|
5518
5514
|
}
|
|
5519
|
-
if (r.keepPreviousData && !f.dataUpdatedAt && c != null && c.isSuccess &&
|
|
5520
|
-
C = c.data, d = c.dataUpdatedAt,
|
|
5515
|
+
if (r.keepPreviousData && !f.dataUpdatedAt && c != null && c.isSuccess && E !== "error")
|
|
5516
|
+
C = c.data, d = c.dataUpdatedAt, E = c.status, O = !0;
|
|
5521
5517
|
else if (r.select && typeof f.data < "u")
|
|
5522
5518
|
if (s && f.data === (a == null ? void 0 : a.data) && r.select === this.selectFn)
|
|
5523
5519
|
C = this.selectResult;
|
|
5524
5520
|
else
|
|
5525
5521
|
try {
|
|
5526
5522
|
this.selectFn = r.select, C = r.select(f.data), C = gn(s == null ? void 0 : s.data, C, r), this.selectResult = C, this.selectError = null;
|
|
5527
|
-
} catch (
|
|
5528
|
-
process.env.NODE_ENV !== "production" && this.client.getLogger().error(
|
|
5523
|
+
} catch (N) {
|
|
5524
|
+
process.env.NODE_ENV !== "production" && this.client.getLogger().error(N), this.selectError = N;
|
|
5529
5525
|
}
|
|
5530
5526
|
else
|
|
5531
5527
|
C = f.data;
|
|
5532
|
-
if (typeof r.placeholderData < "u" && typeof C > "u" &&
|
|
5533
|
-
let
|
|
5528
|
+
if (typeof r.placeholderData < "u" && typeof C > "u" && E === "loading") {
|
|
5529
|
+
let N;
|
|
5534
5530
|
if (s != null && s.isPlaceholderData && r.placeholderData === (l == null ? void 0 : l.placeholderData))
|
|
5535
|
-
|
|
5536
|
-
else if (
|
|
5531
|
+
N = s.data;
|
|
5532
|
+
else if (N = typeof r.placeholderData == "function" ? r.placeholderData() : r.placeholderData, r.select && typeof N < "u")
|
|
5537
5533
|
try {
|
|
5538
|
-
|
|
5539
|
-
} catch (
|
|
5540
|
-
process.env.NODE_ENV !== "production" && this.client.getLogger().error(
|
|
5534
|
+
N = r.select(N), this.selectError = null;
|
|
5535
|
+
} catch (F) {
|
|
5536
|
+
process.env.NODE_ENV !== "production" && this.client.getLogger().error(F), this.selectError = F;
|
|
5541
5537
|
}
|
|
5542
|
-
typeof
|
|
5538
|
+
typeof N < "u" && (E = "success", C = gn(s == null ? void 0 : s.data, N, r), k = !0);
|
|
5543
5539
|
}
|
|
5544
|
-
this.selectError && (m = this.selectError, C = this.selectResult, v = Date.now(),
|
|
5545
|
-
const
|
|
5540
|
+
this.selectError && (m = this.selectError, C = this.selectResult, v = Date.now(), E = "error");
|
|
5541
|
+
const R = w === "fetching", A = E === "loading", _ = E === "error";
|
|
5546
5542
|
return {
|
|
5547
|
-
status:
|
|
5543
|
+
status: E,
|
|
5548
5544
|
fetchStatus: w,
|
|
5549
|
-
isLoading:
|
|
5550
|
-
isSuccess:
|
|
5545
|
+
isLoading: A,
|
|
5546
|
+
isSuccess: E === "success",
|
|
5551
5547
|
isError: _,
|
|
5552
|
-
isInitialLoading:
|
|
5548
|
+
isInitialLoading: A && R,
|
|
5553
5549
|
data: C,
|
|
5554
5550
|
dataUpdatedAt: d,
|
|
5555
5551
|
error: m,
|
|
@@ -5559,8 +5555,8 @@ class Nu extends cr {
|
|
|
5559
5555
|
errorUpdateCount: f.errorUpdateCount,
|
|
5560
5556
|
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
5561
5557
|
isFetchedAfterMount: f.dataUpdateCount > u.dataUpdateCount || f.errorUpdateCount > u.errorUpdateCount,
|
|
5562
|
-
isFetching:
|
|
5563
|
-
isRefetching:
|
|
5558
|
+
isFetching: R,
|
|
5559
|
+
isRefetching: R && !A,
|
|
5564
5560
|
isLoadingError: _ && f.dataUpdatedAt === 0,
|
|
5565
5561
|
isPaused: w === "paused",
|
|
5566
5562
|
isPlaceholderData: k,
|
|
@@ -5770,7 +5766,7 @@ var pc = Array.prototype, mc = Function.prototype, Qs = Object.prototype, on = _
|
|
|
5770
5766
|
}(), zs = mc.toString, Tn = Qs.hasOwnProperty, Ws = Qs.toString, gc = RegExp(
|
|
5771
5767
|
"^" + zs.call(Tn).replace(oc, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
5772
5768
|
), ji = _n.Symbol, yc = pc.splice, vc = Ks(_n, "Map"), sr = Ks(Object, "create"), Mi = ji ? ji.prototype : void 0, Ai = Mi ? Mi.toString : void 0;
|
|
5773
|
-
function
|
|
5769
|
+
function wt(t) {
|
|
5774
5770
|
var e = -1, r = t ? t.length : 0;
|
|
5775
5771
|
for (this.clear(); ++e < r; ) {
|
|
5776
5772
|
var n = t[e];
|
|
@@ -5799,11 +5795,11 @@ function Rc(t, e) {
|
|
|
5799
5795
|
var r = this.__data__;
|
|
5800
5796
|
return r[t] = sr && e === void 0 ? Bs : e, this;
|
|
5801
5797
|
}
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5798
|
+
wt.prototype.clear = bc;
|
|
5799
|
+
wt.prototype.delete = wc;
|
|
5800
|
+
wt.prototype.get = Cc;
|
|
5801
|
+
wt.prototype.has = Ec;
|
|
5802
|
+
wt.prototype.set = Rc;
|
|
5807
5803
|
function Ut(t) {
|
|
5808
5804
|
var e = -1, r = t ? t.length : 0;
|
|
5809
5805
|
for (this.clear(); ++e < r; ) {
|
|
@@ -5837,7 +5833,7 @@ Ut.prototype.delete = xc;
|
|
|
5837
5833
|
Ut.prototype.get = Oc;
|
|
5838
5834
|
Ut.prototype.has = _c;
|
|
5839
5835
|
Ut.prototype.set = Tc;
|
|
5840
|
-
function
|
|
5836
|
+
function Ot(t) {
|
|
5841
5837
|
var e = -1, r = t ? t.length : 0;
|
|
5842
5838
|
for (this.clear(); ++e < r; ) {
|
|
5843
5839
|
var n = t[e];
|
|
@@ -5846,9 +5842,9 @@ function xt(t) {
|
|
|
5846
5842
|
}
|
|
5847
5843
|
function kc() {
|
|
5848
5844
|
this.__data__ = {
|
|
5849
|
-
hash: new
|
|
5845
|
+
hash: new wt(),
|
|
5850
5846
|
map: new (vc || Ut)(),
|
|
5851
|
-
string: new
|
|
5847
|
+
string: new wt()
|
|
5852
5848
|
};
|
|
5853
5849
|
}
|
|
5854
5850
|
function Dc(t) {
|
|
@@ -5863,11 +5859,11 @@ function Pc(t) {
|
|
|
5863
5859
|
function Nc(t, e) {
|
|
5864
5860
|
return $r(this, t).set(t, e), this;
|
|
5865
5861
|
}
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5862
|
+
Ot.prototype.clear = kc;
|
|
5863
|
+
Ot.prototype.delete = Dc;
|
|
5864
|
+
Ot.prototype.get = Lc;
|
|
5865
|
+
Ot.prototype.has = Pc;
|
|
5866
|
+
Ot.prototype.set = Nc;
|
|
5871
5867
|
function Ur(t, e) {
|
|
5872
5868
|
for (var r = t.length; r--; )
|
|
5873
5869
|
if (Hc(t[r][0], e))
|
|
@@ -5954,9 +5950,9 @@ function kn(t, e) {
|
|
|
5954
5950
|
var a = t.apply(this, n);
|
|
5955
5951
|
return r.cache = s.set(i, a), a;
|
|
5956
5952
|
};
|
|
5957
|
-
return r.cache = new (kn.Cache ||
|
|
5953
|
+
return r.cache = new (kn.Cache || Ot)(), r;
|
|
5958
5954
|
}
|
|
5959
|
-
kn.Cache =
|
|
5955
|
+
kn.Cache = Ot;
|
|
5960
5956
|
function Hc(t, e) {
|
|
5961
5957
|
return t === e || t !== t && e !== e;
|
|
5962
5958
|
}
|
|
@@ -6001,7 +5997,7 @@ class je {
|
|
|
6001
5997
|
return this.end - this.begin;
|
|
6002
5998
|
}
|
|
6003
5999
|
}
|
|
6004
|
-
class
|
|
6000
|
+
class _t {
|
|
6005
6001
|
liquidMethodMissing(e) {
|
|
6006
6002
|
}
|
|
6007
6003
|
}
|
|
@@ -6021,11 +6017,11 @@ function Pr(t) {
|
|
|
6021
6017
|
function Jc(t) {
|
|
6022
6018
|
return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
6023
6019
|
}
|
|
6024
|
-
function U(t) {
|
|
6025
|
-
return t = $(t), Xe(t) ? t : et(t) ? "" : Re(t) ? t.map((e) => U(e)).join("") : String(t);
|
|
6026
|
-
}
|
|
6027
6020
|
function $(t) {
|
|
6028
|
-
return t
|
|
6021
|
+
return t = B(t), Xe(t) ? t : et(t) ? "" : Re(t) ? t.map((e) => $(e)).join("") : String(t);
|
|
6022
|
+
}
|
|
6023
|
+
function B(t) {
|
|
6024
|
+
return t instanceof _t && we(t.valueOf) ? t.valueOf() : t;
|
|
6029
6025
|
}
|
|
6030
6026
|
function Br(t) {
|
|
6031
6027
|
return typeof t == "number";
|
|
@@ -6088,7 +6084,7 @@ function Ii(t, e) {
|
|
|
6088
6084
|
return t == null && e == null ? 0 : t == null ? 1 : e == null || (t = Fi.call(t), e = Fi.call(e), t < e) ? -1 : t > e ? 1 : 0;
|
|
6089
6085
|
}
|
|
6090
6086
|
function _e(t) {
|
|
6091
|
-
return (...e) => t(...e.map(
|
|
6087
|
+
return (...e) => t(...e.map(B));
|
|
6092
6088
|
}
|
|
6093
6089
|
function Nn(t) {
|
|
6094
6090
|
return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
@@ -6152,17 +6148,17 @@ function ld(t, e) {
|
|
|
6152
6148
|
const [r, n] = e.getPosition();
|
|
6153
6149
|
return t += `, line:${r}, col:${n}`, t;
|
|
6154
6150
|
}
|
|
6155
|
-
const
|
|
6156
|
-
|
|
6151
|
+
const ee = [0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 4, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 8, 0, 0, 0, 0, 8, 0, 0, 0, 64, 0, 65, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 2, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], Mn = 1, Qr = 4, Ui = 8, ra = 16, ud = 32, cd = 64;
|
|
6152
|
+
ee[160] = ee[5760] = ee[6158] = ee[8192] = ee[8193] = ee[8194] = ee[8195] = ee[8196] = ee[8197] = ee[8198] = ee[8199] = ee[8200] = ee[8201] = ee[8202] = ee[8232] = ee[8233] = ee[8239] = ee[8287] = ee[12288] = Qr;
|
|
6157
6153
|
function pe(t, e) {
|
|
6158
6154
|
if (!t) {
|
|
6159
6155
|
const r = typeof e == "function" ? e() : e || `expect ${t} to be true`;
|
|
6160
6156
|
throw new ad(r);
|
|
6161
6157
|
}
|
|
6162
6158
|
}
|
|
6163
|
-
class dd extends
|
|
6159
|
+
class dd extends _t {
|
|
6164
6160
|
equals(e) {
|
|
6165
|
-
return et(
|
|
6161
|
+
return et(B(e));
|
|
6166
6162
|
}
|
|
6167
6163
|
gt() {
|
|
6168
6164
|
return !1;
|
|
@@ -6180,9 +6176,9 @@ class dd extends Ot {
|
|
|
6180
6176
|
return null;
|
|
6181
6177
|
}
|
|
6182
6178
|
}
|
|
6183
|
-
class zr extends
|
|
6179
|
+
class zr extends _t {
|
|
6184
6180
|
equals(e) {
|
|
6185
|
-
return e instanceof zr ? !1 : (e =
|
|
6181
|
+
return e instanceof zr ? !1 : (e = B(e), Xe(e) || Re(e) ? e.length === 0 : Pn(e) ? Object.keys(e).length === 0 : !1);
|
|
6186
6182
|
}
|
|
6187
6183
|
gt() {
|
|
6188
6184
|
return !1;
|
|
@@ -6202,10 +6198,10 @@ class zr extends Ot {
|
|
|
6202
6198
|
}
|
|
6203
6199
|
class hd extends zr {
|
|
6204
6200
|
equals(e) {
|
|
6205
|
-
return e === !1 || et(
|
|
6201
|
+
return e === !1 || et(B(e)) ? !0 : Xe(e) ? /^\s*$/.test(e) : super.equals(e);
|
|
6206
6202
|
}
|
|
6207
6203
|
}
|
|
6208
|
-
class An extends
|
|
6204
|
+
class An extends _t {
|
|
6209
6205
|
constructor(e, r, n) {
|
|
6210
6206
|
super(), this.i = 0, this.length = e, this.name = `${n}-${r}`;
|
|
6211
6207
|
}
|
|
@@ -6234,7 +6230,7 @@ class An extends Ot {
|
|
|
6234
6230
|
return JSON.stringify(this);
|
|
6235
6231
|
}
|
|
6236
6232
|
}
|
|
6237
|
-
class $i extends
|
|
6233
|
+
class $i extends _t {
|
|
6238
6234
|
constructor(e = () => "") {
|
|
6239
6235
|
super(), this.superBlockRender = e;
|
|
6240
6236
|
}
|
|
@@ -6263,7 +6259,7 @@ function fd(t) {
|
|
|
6263
6259
|
let i = e;
|
|
6264
6260
|
for (let s = 0; s < r.length; s++) {
|
|
6265
6261
|
const a = r[s];
|
|
6266
|
-
i[a] = i[a] || {}, s === r.length - 1 &&
|
|
6262
|
+
i[a] = i[a] || {}, s === r.length - 1 && ee[r.charCodeAt(s)] & Mn && (i[a].needBoundary = !0), i = i[a];
|
|
6267
6263
|
}
|
|
6268
6264
|
i.handler = n, i.end = !0;
|
|
6269
6265
|
}
|
|
@@ -6353,7 +6349,7 @@ function ot(t) {
|
|
|
6353
6349
|
return e;
|
|
6354
6350
|
}
|
|
6355
6351
|
function Fn(t) {
|
|
6356
|
-
return t =
|
|
6352
|
+
return t = B(t), Re(t) ? t : Xe(t) && t.length > 0 ? [t] : Xc(t) ? Array.from(t) : Pn(t) ? Object.keys(t).map((e) => [e, t[e]]) : [];
|
|
6357
6353
|
}
|
|
6358
6354
|
function Ze(t) {
|
|
6359
6355
|
return et(t) ? [] : Re(t) ? t : [t];
|
|
@@ -6578,7 +6574,7 @@ class qn extends je {
|
|
|
6578
6574
|
class zi extends qn {
|
|
6579
6575
|
constructor(e, r, n, i, s) {
|
|
6580
6576
|
const { trimTagLeft: a, trimTagRight: l, tagDelimiterLeft: o, tagDelimiterRight: u } = i, c = e.slice(r + o.length, n - u.length);
|
|
6581
|
-
super(
|
|
6577
|
+
super(te.Tag, c, e, r, n, a, l, s);
|
|
6582
6578
|
const f = new me(this.content, i.operators);
|
|
6583
6579
|
if (this.name = f.readTagName(), !this.name)
|
|
6584
6580
|
throw new jn("illegal tag syntax", this);
|
|
@@ -6588,12 +6584,12 @@ class zi extends qn {
|
|
|
6588
6584
|
class Td extends qn {
|
|
6589
6585
|
constructor(e, r, n, i, s) {
|
|
6590
6586
|
const { trimOutputLeft: a, trimOutputRight: l, outputDelimiterLeft: o, outputDelimiterRight: u } = i, c = e.slice(r + o.length, n - u.length);
|
|
6591
|
-
super(
|
|
6587
|
+
super(te.Output, c, e, r, n, a, l, s);
|
|
6592
6588
|
}
|
|
6593
6589
|
}
|
|
6594
6590
|
class Wi extends je {
|
|
6595
6591
|
constructor(e, r, n, i) {
|
|
6596
|
-
super(
|
|
6592
|
+
super(te.HTML, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.trimLeft = 0, this.trimRight = 0;
|
|
6597
6593
|
}
|
|
6598
6594
|
getContent() {
|
|
6599
6595
|
return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
|
|
@@ -6601,24 +6597,24 @@ class Wi extends je {
|
|
|
6601
6597
|
}
|
|
6602
6598
|
class kd extends je {
|
|
6603
6599
|
constructor(e, r) {
|
|
6604
|
-
super(
|
|
6600
|
+
super(te.Number, e.input, e.begin, r ? r.end : e.end, e.file), this.whole = e, this.decimal = r;
|
|
6605
6601
|
}
|
|
6606
6602
|
}
|
|
6607
6603
|
class Sr extends je {
|
|
6608
6604
|
constructor(e, r, n, i) {
|
|
6609
|
-
super(
|
|
6605
|
+
super(te.Word, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.content = this.getText();
|
|
6610
6606
|
}
|
|
6611
6607
|
isNumber(e = !1) {
|
|
6612
|
-
const r = e &&
|
|
6608
|
+
const r = e && ee[this.input.charCodeAt(this.begin)] & cd ? this.begin + 1 : this.begin;
|
|
6613
6609
|
for (let n = r; n < this.end; n++)
|
|
6614
|
-
if (!(
|
|
6610
|
+
if (!(ee[this.input.charCodeAt(n)] & ud))
|
|
6615
6611
|
return !1;
|
|
6616
6612
|
return !0;
|
|
6617
6613
|
}
|
|
6618
6614
|
}
|
|
6619
6615
|
class Dd extends je {
|
|
6620
6616
|
constructor(e, r, n, i) {
|
|
6621
|
-
super(
|
|
6617
|
+
super(te.Literal, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.literal = this.getText();
|
|
6622
6618
|
}
|
|
6623
6619
|
}
|
|
6624
6620
|
const Ki = {
|
|
@@ -6647,7 +6643,7 @@ const Ki = {
|
|
|
6647
6643
|
};
|
|
6648
6644
|
class Pd extends je {
|
|
6649
6645
|
constructor(e, r, n, i) {
|
|
6650
|
-
super(
|
|
6646
|
+
super(te.Operator, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.operator = this.getText();
|
|
6651
6647
|
}
|
|
6652
6648
|
getPrecedence() {
|
|
6653
6649
|
const e = this.getText();
|
|
@@ -6656,33 +6652,33 @@ class Pd extends je {
|
|
|
6656
6652
|
}
|
|
6657
6653
|
class Yi extends je {
|
|
6658
6654
|
constructor(e, r, n) {
|
|
6659
|
-
super(
|
|
6655
|
+
super(te.PropertyAccess, e.input, e.begin, n, e.file), this.variable = e, this.props = r, this.propertyName = this.variable instanceof Sr ? this.variable.getText() : da(this.variable.getText());
|
|
6660
6656
|
}
|
|
6661
6657
|
}
|
|
6662
6658
|
class Nd extends je {
|
|
6663
6659
|
constructor(e, r, n, i, s, a) {
|
|
6664
|
-
super(
|
|
6660
|
+
super(te.Filter, n, i, s, a), this.name = e, this.args = r;
|
|
6665
6661
|
}
|
|
6666
6662
|
}
|
|
6667
6663
|
class jd extends je {
|
|
6668
6664
|
constructor(e, r, n, i, s, a) {
|
|
6669
|
-
super(
|
|
6665
|
+
super(te.Hash, e, r, n, a), this.input = e, this.begin = r, this.end = n, this.name = i, this.value = s, this.file = a;
|
|
6670
6666
|
}
|
|
6671
6667
|
}
|
|
6672
6668
|
class Md extends je {
|
|
6673
6669
|
constructor(e, r, n, i) {
|
|
6674
|
-
super(
|
|
6670
|
+
super(te.Quoted, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i;
|
|
6675
6671
|
}
|
|
6676
6672
|
}
|
|
6677
6673
|
class Ad extends je {
|
|
6678
6674
|
constructor(e, r, n, i, s, a) {
|
|
6679
|
-
super(
|
|
6675
|
+
super(te.Range, e, r, n, a), this.input = e, this.begin = r, this.end = n, this.lhs = i, this.rhs = s, this.file = a;
|
|
6680
6676
|
}
|
|
6681
6677
|
}
|
|
6682
6678
|
class Fd extends qn {
|
|
6683
6679
|
constructor(e, r, n, i, s) {
|
|
6684
6680
|
const a = e.slice(r, n);
|
|
6685
|
-
if (super(
|
|
6681
|
+
if (super(te.Tag, a, e, r, n, !1, !1, s), !/\S/.test(a))
|
|
6686
6682
|
this.name = "", this.args = "";
|
|
6687
6683
|
else {
|
|
6688
6684
|
const l = new me(this.content, i.operators);
|
|
@@ -6697,7 +6693,7 @@ class qd {
|
|
|
6697
6693
|
this.buffer = "";
|
|
6698
6694
|
}
|
|
6699
6695
|
write(e) {
|
|
6700
|
-
this.buffer +=
|
|
6696
|
+
this.buffer += $(e);
|
|
6701
6697
|
}
|
|
6702
6698
|
}
|
|
6703
6699
|
class Id {
|
|
@@ -6710,7 +6706,7 @@ class Vd {
|
|
|
6710
6706
|
this.buffer = "";
|
|
6711
6707
|
}
|
|
6712
6708
|
write(e) {
|
|
6713
|
-
e =
|
|
6709
|
+
e = B(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = $(this.buffer) + $(e);
|
|
6714
6710
|
}
|
|
6715
6711
|
}
|
|
6716
6712
|
class Ud {
|
|
@@ -6806,23 +6802,23 @@ function* Wd(t) {
|
|
|
6806
6802
|
for (; e.length; )
|
|
6807
6803
|
yield e.pop();
|
|
6808
6804
|
}
|
|
6809
|
-
function
|
|
6805
|
+
function yt(t, e) {
|
|
6810
6806
|
return !Wr(t, e);
|
|
6811
6807
|
}
|
|
6812
6808
|
function Wr(t, e) {
|
|
6813
6809
|
return e.opts.jsTruthy ? !t : t === !1 || t === void 0 || t === null;
|
|
6814
6810
|
}
|
|
6815
6811
|
const Kd = {
|
|
6816
|
-
"==": (t, e) => Oe(t) ? t.equals(e) : Oe(e) ? e.equals(t) :
|
|
6817
|
-
"!=": (t, e) => Oe(t) ? !t.equals(e) : Oe(e) ? !e.equals(t) :
|
|
6818
|
-
">": (t, e) => Oe(t) ? t.gt(e) : Oe(e) ? e.lt(t) :
|
|
6819
|
-
"<": (t, e) => Oe(t) ? t.lt(e) : Oe(e) ? e.gt(t) :
|
|
6820
|
-
">=": (t, e) => Oe(t) ? t.geq(e) : Oe(e) ? e.leq(t) :
|
|
6821
|
-
"<=": (t, e) => Oe(t) ? t.leq(e) : Oe(e) ? e.geq(t) :
|
|
6822
|
-
contains: (t, e) => (t =
|
|
6823
|
-
not: (t, e) => Wr(
|
|
6824
|
-
and: (t, e, r) =>
|
|
6825
|
-
or: (t, e, r) =>
|
|
6812
|
+
"==": (t, e) => Oe(t) ? t.equals(e) : Oe(e) ? e.equals(t) : B(t) === B(e),
|
|
6813
|
+
"!=": (t, e) => Oe(t) ? !t.equals(e) : Oe(e) ? !e.equals(t) : B(t) !== B(e),
|
|
6814
|
+
">": (t, e) => Oe(t) ? t.gt(e) : Oe(e) ? e.lt(t) : B(t) > B(e),
|
|
6815
|
+
"<": (t, e) => Oe(t) ? t.lt(e) : Oe(e) ? e.gt(t) : B(t) < B(e),
|
|
6816
|
+
">=": (t, e) => Oe(t) ? t.geq(e) : Oe(e) ? e.leq(t) : B(t) >= B(e),
|
|
6817
|
+
"<=": (t, e) => Oe(t) ? t.leq(e) : Oe(e) ? e.geq(t) : B(t) <= B(e),
|
|
6818
|
+
contains: (t, e) => (t = B(t), e = B(e), t && we(t.indexOf) ? t.indexOf(e) > -1 : !1),
|
|
6819
|
+
not: (t, e) => Wr(B(t), e),
|
|
6820
|
+
and: (t, e, r) => yt(B(t), r) && yt(B(e), r),
|
|
6821
|
+
or: (t, e, r) => yt(B(t), r) || yt(B(e), r)
|
|
6826
6822
|
};
|
|
6827
6823
|
class ln {
|
|
6828
6824
|
constructor(e, r, n, i) {
|
|
@@ -6915,7 +6911,7 @@ var rh = /* @__PURE__ */ Object.freeze({
|
|
|
6915
6911
|
sep: th
|
|
6916
6912
|
});
|
|
6917
6913
|
function nh(t, e, ...r) {
|
|
6918
|
-
return t =
|
|
6914
|
+
return t = B(t), Re(t) || Xe(t) ? t.length ? t : e : t === !1 && new Map(r).get("allow_false") ? !1 : Wr(t, this.context) ? e : t;
|
|
6919
6915
|
}
|
|
6920
6916
|
function ua(t) {
|
|
6921
6917
|
return JSON.stringify(t);
|
|
@@ -6937,20 +6933,20 @@ const ih = {
|
|
|
6937
6933
|
"'": "'"
|
|
6938
6934
|
};
|
|
6939
6935
|
function Vn(t) {
|
|
6940
|
-
return
|
|
6936
|
+
return $(t).replace(/&|<|>|"|'/g, (e) => sh[e]);
|
|
6941
6937
|
}
|
|
6942
6938
|
function oh(t) {
|
|
6943
|
-
return
|
|
6939
|
+
return $(t).replace(/&(amp|lt|gt|#34|#39);/g, (e) => ah[e]);
|
|
6944
6940
|
}
|
|
6945
6941
|
function lh(t) {
|
|
6946
|
-
return Vn(oh(
|
|
6942
|
+
return Vn(oh($(t)));
|
|
6947
6943
|
}
|
|
6948
6944
|
function uh(t) {
|
|
6949
|
-
return
|
|
6945
|
+
return $(t).replace(/\n/g, `<br />
|
|
6950
6946
|
`);
|
|
6951
6947
|
}
|
|
6952
6948
|
function ch(t) {
|
|
6953
|
-
return
|
|
6949
|
+
return $(t).replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g, "");
|
|
6954
6950
|
}
|
|
6955
6951
|
var dh = /* @__PURE__ */ Object.freeze({
|
|
6956
6952
|
__proto__: null,
|
|
@@ -7006,27 +7002,27 @@ function ph(t, e, r, n = t.length) {
|
|
|
7006
7002
|
let i = r, s = e, a;
|
|
7007
7003
|
for (; i[t[s]] && s < n; )
|
|
7008
7004
|
i = i[t[s++]], i.end && (a = i);
|
|
7009
|
-
return !a || a.needBoundary &&
|
|
7005
|
+
return !a || a.needBoundary && ee[t.charCodeAt(s)] & Mn ? -1 : s;
|
|
7010
7006
|
}
|
|
7011
7007
|
function mh(t, e) {
|
|
7012
7008
|
let r = !1;
|
|
7013
7009
|
for (let n = 0; n < t.length; n++) {
|
|
7014
7010
|
const i = t[n];
|
|
7015
|
-
Oh(i) && (!r && i.trimLeft && gh(t[n - 1], e.greedy),
|
|
7011
|
+
Oh(i) && (!r && i.trimLeft && gh(t[n - 1], e.greedy), Tt(i) && (i.name === "raw" ? r = !0 : i.name === "endraw" && (r = !1)), !r && i.trimRight && yh(t[n + 1], e.greedy));
|
|
7016
7012
|
}
|
|
7017
7013
|
}
|
|
7018
7014
|
function gh(t, e) {
|
|
7019
7015
|
if (!t || !$n(t))
|
|
7020
7016
|
return;
|
|
7021
7017
|
const r = e ? Qr : ra;
|
|
7022
|
-
for (;
|
|
7018
|
+
for (; ee[t.input.charCodeAt(t.end - 1 - t.trimRight)] & r; )
|
|
7023
7019
|
t.trimRight++;
|
|
7024
7020
|
}
|
|
7025
7021
|
function yh(t, e) {
|
|
7026
7022
|
if (!t || !$n(t))
|
|
7027
7023
|
return;
|
|
7028
7024
|
const r = e ? Qr : ra;
|
|
7029
|
-
for (;
|
|
7025
|
+
for (; ee[t.input.charCodeAt(t.begin + t.trimLeft)] & r; )
|
|
7030
7026
|
t.trimLeft++;
|
|
7031
7027
|
t.input.charAt(t.begin + t.trimLeft) === `
|
|
7032
7028
|
` && t.trimLeft++;
|
|
@@ -7299,7 +7295,7 @@ class me {
|
|
|
7299
7295
|
return !0;
|
|
7300
7296
|
}
|
|
7301
7297
|
peekType(e = 0) {
|
|
7302
|
-
return
|
|
7298
|
+
return ee[this.input.charCodeAt(this.p + e)];
|
|
7303
7299
|
}
|
|
7304
7300
|
peek(e = 0) {
|
|
7305
7301
|
return this.input[this.p + e];
|
|
@@ -7324,7 +7320,7 @@ class vh {
|
|
|
7324
7320
|
this.trigger("start");
|
|
7325
7321
|
let e;
|
|
7326
7322
|
for (; !this.stopRequested && (e = this.tokens.shift()); ) {
|
|
7327
|
-
if (this.trigger("token", e) ||
|
|
7323
|
+
if (this.trigger("token", e) || Tt(e) && this.trigger(`tag:${e.name}`, e))
|
|
7328
7324
|
continue;
|
|
7329
7325
|
const r = this.parseToken(e, this.tokens);
|
|
7330
7326
|
this.trigger("template", r);
|
|
@@ -7425,10 +7421,10 @@ class Eh extends Un {
|
|
|
7425
7421
|
r.write(this.str);
|
|
7426
7422
|
}
|
|
7427
7423
|
}
|
|
7428
|
-
var
|
|
7424
|
+
var Ct;
|
|
7429
7425
|
(function(t) {
|
|
7430
7426
|
t.Partials = "partials", t.Layouts = "layouts", t.Root = "root";
|
|
7431
|
-
})(
|
|
7427
|
+
})(Ct || (Ct = {}));
|
|
7432
7428
|
class Rh {
|
|
7433
7429
|
constructor(e) {
|
|
7434
7430
|
if (this.options = e, e.relativeReference) {
|
|
@@ -7442,7 +7438,7 @@ class Rh {
|
|
|
7442
7438
|
}
|
|
7443
7439
|
*lookup(e, r, n, i) {
|
|
7444
7440
|
const { fs: s } = this.options, a = this.options[r];
|
|
7445
|
-
for (const l of this.candidates(e, a, i, r !==
|
|
7441
|
+
for (const l of this.candidates(e, a, i, r !== Ct.Root))
|
|
7446
7442
|
if (n ? s.existsSync(l) : yield s.exists(l))
|
|
7447
7443
|
return l;
|
|
7448
7444
|
throw this.lookupError(e, a);
|
|
@@ -7492,7 +7488,7 @@ class Sh {
|
|
|
7492
7488
|
}
|
|
7493
7489
|
parseToken(e, r) {
|
|
7494
7490
|
try {
|
|
7495
|
-
if (
|
|
7491
|
+
if (Tt(e)) {
|
|
7496
7492
|
const n = this.liquid.tags[e.name];
|
|
7497
7493
|
return pe(n, `tag "${e.name}" not found`), new n(e, r, this.liquid);
|
|
7498
7494
|
}
|
|
@@ -7504,7 +7500,7 @@ class Sh {
|
|
|
7504
7500
|
parseStream(e) {
|
|
7505
7501
|
return new vh(e, (r, n) => this.parseToken(r, n));
|
|
7506
7502
|
}
|
|
7507
|
-
*_parseFileCached(e, r, n =
|
|
7503
|
+
*_parseFileCached(e, r, n = Ct.Root, i) {
|
|
7508
7504
|
const s = this.cache, a = this.loader.shouldLoadRelative(e) ? i + "," + e : n + ":" + e, l = yield s.read(a);
|
|
7509
7505
|
if (l)
|
|
7510
7506
|
return l;
|
|
@@ -7516,7 +7512,7 @@ class Sh {
|
|
|
7516
7512
|
throw s.remove(a), c;
|
|
7517
7513
|
}
|
|
7518
7514
|
}
|
|
7519
|
-
*_parseFile(e, r, n =
|
|
7515
|
+
*_parseFile(e, r, n = Ct.Root, i) {
|
|
7520
7516
|
const s = yield this.loader.lookup(e, n, r, i);
|
|
7521
7517
|
return this.liquid.parse(r ? this.fs.readFileSync(s) : yield this.fs.readFile(s), s);
|
|
7522
7518
|
}
|
|
@@ -7559,47 +7555,47 @@ function da(t) {
|
|
|
7559
7555
|
}
|
|
7560
7556
|
return e;
|
|
7561
7557
|
}
|
|
7562
|
-
var
|
|
7558
|
+
var te;
|
|
7563
7559
|
(function(t) {
|
|
7564
7560
|
t[t.Number = 1] = "Number", t[t.Literal = 2] = "Literal", t[t.Tag = 4] = "Tag", t[t.Output = 8] = "Output", t[t.HTML = 16] = "HTML", t[t.Filter = 32] = "Filter", t[t.Hash = 64] = "Hash", t[t.PropertyAccess = 128] = "PropertyAccess", t[t.Word = 256] = "Word", t[t.Range = 512] = "Range", t[t.Quoted = 1024] = "Quoted", t[t.Operator = 2048] = "Operator", t[t.Delimited = 12] = "Delimited";
|
|
7565
|
-
})(
|
|
7561
|
+
})(te || (te = {}));
|
|
7566
7562
|
function Oh(t) {
|
|
7567
|
-
return !!(Me(t) &
|
|
7563
|
+
return !!(Me(t) & te.Delimited);
|
|
7568
7564
|
}
|
|
7569
7565
|
function ha(t) {
|
|
7570
|
-
return Me(t) ===
|
|
7566
|
+
return Me(t) === te.Operator;
|
|
7571
7567
|
}
|
|
7572
7568
|
function $n(t) {
|
|
7573
|
-
return Me(t) ===
|
|
7569
|
+
return Me(t) === te.HTML;
|
|
7574
7570
|
}
|
|
7575
7571
|
function _h(t) {
|
|
7576
|
-
return Me(t) ===
|
|
7572
|
+
return Me(t) === te.Output;
|
|
7577
7573
|
}
|
|
7578
|
-
function
|
|
7579
|
-
return Me(t) ===
|
|
7574
|
+
function Tt(t) {
|
|
7575
|
+
return Me(t) === te.Tag;
|
|
7580
7576
|
}
|
|
7581
7577
|
function fa(t) {
|
|
7582
|
-
return Me(t) ===
|
|
7578
|
+
return Me(t) === te.Quoted;
|
|
7583
7579
|
}
|
|
7584
7580
|
function Th(t) {
|
|
7585
|
-
return Me(t) ===
|
|
7581
|
+
return Me(t) === te.Literal;
|
|
7586
7582
|
}
|
|
7587
7583
|
function kh(t) {
|
|
7588
|
-
return Me(t) ===
|
|
7584
|
+
return Me(t) === te.Number;
|
|
7589
7585
|
}
|
|
7590
7586
|
function Dh(t) {
|
|
7591
|
-
return Me(t) ===
|
|
7587
|
+
return Me(t) === te.PropertyAccess;
|
|
7592
7588
|
}
|
|
7593
7589
|
function Lh(t) {
|
|
7594
|
-
return Me(t) ===
|
|
7590
|
+
return Me(t) === te.Word;
|
|
7595
7591
|
}
|
|
7596
7592
|
function Ph(t) {
|
|
7597
|
-
return Me(t) ===
|
|
7593
|
+
return Me(t) === te.Range;
|
|
7598
7594
|
}
|
|
7599
7595
|
function Me(t) {
|
|
7600
7596
|
return t ? t.kind : -1;
|
|
7601
7597
|
}
|
|
7602
|
-
class
|
|
7598
|
+
class Ft {
|
|
7603
7599
|
constructor(e = {}, r = ft, n = {}) {
|
|
7604
7600
|
var i, s;
|
|
7605
7601
|
this.scopes = [{}], this.registers = {}, this.sync = !!n.sync, this.opts = r, this.globals = (i = n.globals) !== null && i !== void 0 ? i : r.globals, this.environments = e, this.strictVariables = (s = n.strictVariables) !== null && s !== void 0 ? s : this.opts.strictVariables;
|
|
@@ -7666,10 +7662,10 @@ function Nh(t, e, r) {
|
|
|
7666
7662
|
if (Re(t) && e < 0)
|
|
7667
7663
|
return t[t.length + +e];
|
|
7668
7664
|
const n = jh(t, e, r);
|
|
7669
|
-
return n === void 0 && t instanceof
|
|
7665
|
+
return n === void 0 && t instanceof _t ? t.liquidMethodMissing(e) : we(n) ? n.call(t) : e === "size" ? Fh(t) : e === "first" ? Mh(t) : e === "last" ? Ah(t) : n;
|
|
7670
7666
|
}
|
|
7671
7667
|
function jh(t, e, r) {
|
|
7672
|
-
if (!(r && !Object.hasOwnProperty.call(t, e) && !(t instanceof
|
|
7668
|
+
if (!(r && !Object.hasOwnProperty.call(t, e) && !(t instanceof _t)))
|
|
7673
7669
|
return t[e];
|
|
7674
7670
|
}
|
|
7675
7671
|
function Mh(t) {
|
|
@@ -7686,18 +7682,18 @@ function Fh(t) {
|
|
|
7686
7682
|
if (typeof t == "object")
|
|
7687
7683
|
return Object.keys(t).length;
|
|
7688
7684
|
}
|
|
7689
|
-
var
|
|
7685
|
+
var vt;
|
|
7690
7686
|
(function(t) {
|
|
7691
7687
|
t[t.OUTPUT = 0] = "OUTPUT", t[t.STORE = 1] = "STORE";
|
|
7692
|
-
})(
|
|
7688
|
+
})(vt || (vt = {}));
|
|
7693
7689
|
const qh = _e(Math.abs), Ih = _e(Math.max), Vh = _e(Math.min), Uh = _e(Math.ceil), $h = _e((t, e, r = !1) => r ? Math.floor(t / e) : t / e), Bh = _e(Math.floor), Hh = _e((t, e) => t - e), Qh = _e((t, e) => t % e), zh = _e((t, e) => t * e);
|
|
7694
7690
|
function Wh(t, e = 0) {
|
|
7695
|
-
t =
|
|
7691
|
+
t = B(t), e = B(e);
|
|
7696
7692
|
const r = Math.pow(10, e);
|
|
7697
7693
|
return Math.round(t * r) / r;
|
|
7698
7694
|
}
|
|
7699
7695
|
function Kh(t, e) {
|
|
7700
|
-
return t =
|
|
7696
|
+
return t = B(t), e = B(e), Number(t) + Number(e);
|
|
7701
7697
|
}
|
|
7702
7698
|
var Yh = /* @__PURE__ */ Object.freeze({
|
|
7703
7699
|
__proto__: null,
|
|
@@ -7713,7 +7709,7 @@ var Yh = /* @__PURE__ */ Object.freeze({
|
|
|
7713
7709
|
round: Wh,
|
|
7714
7710
|
plus: Kh
|
|
7715
7711
|
});
|
|
7716
|
-
const Gh = (t) =>
|
|
7712
|
+
const Gh = (t) => $(t).split("+").map(decodeURIComponent).join(" "), Zh = (t) => $(t).split(" ").map(encodeURIComponent).join("+");
|
|
7717
7713
|
var Jh = /* @__PURE__ */ Object.freeze({
|
|
7718
7714
|
__proto__: null,
|
|
7719
7715
|
url_decode: Gh,
|
|
@@ -7722,10 +7718,10 @@ var Jh = /* @__PURE__ */ Object.freeze({
|
|
|
7722
7718
|
const Xh = _e((t, e) => Ze(t).join(e === void 0 ? " " : e)), ef = _e((t) => Re(t) ? Ln(t) : ""), tf = _e((t) => Re(t) ? t[0] : ""), rf = _e((t) => [...Ze(t)].reverse());
|
|
7723
7719
|
function* nf(t, e) {
|
|
7724
7720
|
const r = [];
|
|
7725
|
-
for (const n of Ze(
|
|
7721
|
+
for (const n of Ze(B(t)))
|
|
7726
7722
|
r.push([
|
|
7727
7723
|
n,
|
|
7728
|
-
e ? yield this.context._getFromScope(n,
|
|
7724
|
+
e ? yield this.context._getFromScope(n, $(e).split(".")) : n
|
|
7729
7725
|
]);
|
|
7730
7726
|
return r.sort((n, i) => {
|
|
7731
7727
|
const s = n[1], a = i[1];
|
|
@@ -7733,35 +7729,35 @@ function* nf(t, e) {
|
|
|
7733
7729
|
}).map((n) => n[0]);
|
|
7734
7730
|
}
|
|
7735
7731
|
function sf(t, e) {
|
|
7736
|
-
t =
|
|
7737
|
-
const r =
|
|
7732
|
+
t = B(t);
|
|
7733
|
+
const r = $(e), n = e === void 0 ? Ii : (i, s) => Ii(i[r], s[r]);
|
|
7738
7734
|
return [...Ze(t)].sort(n);
|
|
7739
7735
|
}
|
|
7740
7736
|
const af = (t) => t && t.length || 0;
|
|
7741
7737
|
function* of(t, e) {
|
|
7742
7738
|
const r = [];
|
|
7743
|
-
for (const n of Ze(
|
|
7744
|
-
r.push(yield this.context._getFromScope(n,
|
|
7739
|
+
for (const n of Ze(B(t)))
|
|
7740
|
+
r.push(yield this.context._getFromScope(n, $(e).split(".")));
|
|
7745
7741
|
return r;
|
|
7746
7742
|
}
|
|
7747
7743
|
function lf(t) {
|
|
7748
|
-
return t =
|
|
7744
|
+
return t = B(t), Ze(t).filter((e) => !et(B(e)));
|
|
7749
7745
|
}
|
|
7750
7746
|
function uf(t, e = []) {
|
|
7751
|
-
return t =
|
|
7747
|
+
return t = B(t), e = Ze(e).map((r) => B(r)), Ze(t).concat(e);
|
|
7752
7748
|
}
|
|
7753
7749
|
function cf(t, e, r = 1) {
|
|
7754
|
-
return t =
|
|
7750
|
+
return t = B(t), et(t) ? [] : (Re(t) || (t = $(t)), e = e < 0 ? t.length + e : e, t.slice(e, e + r));
|
|
7755
7751
|
}
|
|
7756
7752
|
function* df(t, e, r) {
|
|
7757
7753
|
const n = [];
|
|
7758
|
-
t = Ze(
|
|
7754
|
+
t = Ze(B(t));
|
|
7759
7755
|
for (const i of t)
|
|
7760
|
-
n.push(yield this.context._getFromScope(i,
|
|
7761
|
-
return t.filter((i, s) => r === void 0 ?
|
|
7756
|
+
n.push(yield this.context._getFromScope(i, $(e).split(".")));
|
|
7757
|
+
return t.filter((i, s) => r === void 0 ? yt(n[s], this.context) : Oe(r) ? r.equals(n[s]) : n[s] === r);
|
|
7762
7758
|
}
|
|
7763
7759
|
function hf(t) {
|
|
7764
|
-
t =
|
|
7760
|
+
t = B(t);
|
|
7765
7761
|
const e = {};
|
|
7766
7762
|
return (t || []).filter((r) => Zs.call(e, String(r)) ? !1 : (e[String(r)] = !0, !0));
|
|
7767
7763
|
}
|
|
@@ -7785,7 +7781,7 @@ const pf = "%A, %B %-e, %Y at %-l:%M %P %z";
|
|
|
7785
7781
|
function mf(t, e, r) {
|
|
7786
7782
|
const n = this.context.opts;
|
|
7787
7783
|
let i;
|
|
7788
|
-
return t =
|
|
7784
|
+
return t = B(t), e = B(e), et(e) ? e = pf : e = $(e), t === "now" || t === "today" ? i = new Date() : Br(t) ? i = new Date(t * 1e3) : Xe(t) ? /^\d+$/.test(t) ? i = new Date(+t * 1e3) : n.preserveTimezones ? i = lt.createDateFixedToTimezone(t) : i = new Date(t) : i = t, gf(i) ? (r !== void 0 ? i = new lt(i, es(i, r)) : n.timezoneOffset !== void 0 && (i = new lt(i, es(i, n.timezoneOffset))), Rd(i, e)) : t;
|
|
7789
7785
|
}
|
|
7790
7786
|
function gf(t) {
|
|
7791
7787
|
return (t instanceof Date || t instanceof lt) && !isNaN(t.getTime());
|
|
@@ -7801,66 +7797,66 @@ var yf = /* @__PURE__ */ Object.freeze({
|
|
|
7801
7797
|
date: mf
|
|
7802
7798
|
});
|
|
7803
7799
|
function vf(t, e) {
|
|
7804
|
-
return pe(arguments.length === 2, "append expect 2 arguments"),
|
|
7800
|
+
return pe(arguments.length === 2, "append expect 2 arguments"), $(t) + $(e);
|
|
7805
7801
|
}
|
|
7806
7802
|
function bf(t, e) {
|
|
7807
|
-
return pe(arguments.length === 2, "prepend expect 2 arguments"),
|
|
7803
|
+
return pe(arguments.length === 2, "prepend expect 2 arguments"), $(e) + $(t);
|
|
7808
7804
|
}
|
|
7809
7805
|
function wf(t, e) {
|
|
7810
|
-
return e ? (e = Nn(
|
|
7806
|
+
return e ? (e = Nn($(e)), $(t).replace(new RegExp(`^[${e}]+`, "g"), "")) : $(t).replace(/^\s+/, "");
|
|
7811
7807
|
}
|
|
7812
7808
|
function Cf(t) {
|
|
7813
|
-
return
|
|
7809
|
+
return $(t).toLowerCase();
|
|
7814
7810
|
}
|
|
7815
7811
|
function Ef(t) {
|
|
7816
|
-
return
|
|
7812
|
+
return $(t).toUpperCase();
|
|
7817
7813
|
}
|
|
7818
7814
|
function Rf(t, e) {
|
|
7819
|
-
return
|
|
7815
|
+
return $(t).split(String(e)).join("");
|
|
7820
7816
|
}
|
|
7821
7817
|
function Sf(t, e) {
|
|
7822
|
-
return
|
|
7818
|
+
return $(t).replace(String(e), "");
|
|
7823
7819
|
}
|
|
7824
7820
|
function xf(t, e) {
|
|
7825
|
-
const r =
|
|
7821
|
+
const r = $(t), n = String(e), i = r.lastIndexOf(n);
|
|
7826
7822
|
return i === -1 ? r : r.substring(0, i) + r.substring(i + n.length + 1);
|
|
7827
7823
|
}
|
|
7828
7824
|
function Of(t, e) {
|
|
7829
|
-
return e ? (e = Nn(
|
|
7825
|
+
return e ? (e = Nn($(e)), $(t).replace(new RegExp(`[${e}]+$`, "g"), "")) : $(t).replace(/\s+$/, "");
|
|
7830
7826
|
}
|
|
7831
7827
|
function _f(t, e) {
|
|
7832
|
-
const r =
|
|
7828
|
+
const r = $(t).split(String(e));
|
|
7833
7829
|
for (; r.length && r[r.length - 1] === ""; )
|
|
7834
7830
|
r.pop();
|
|
7835
7831
|
return r;
|
|
7836
7832
|
}
|
|
7837
7833
|
function Tf(t, e) {
|
|
7838
|
-
return e ? (e = Nn(
|
|
7834
|
+
return e ? (e = Nn($(e)), $(t).replace(new RegExp(`^[${e}]+`, "g"), "").replace(new RegExp(`[${e}]+$`, "g"), "")) : $(t).trim();
|
|
7839
7835
|
}
|
|
7840
7836
|
function kf(t) {
|
|
7841
|
-
return
|
|
7837
|
+
return $(t).replace(/\n/g, "");
|
|
7842
7838
|
}
|
|
7843
7839
|
function Df(t) {
|
|
7844
|
-
return t =
|
|
7840
|
+
return t = $(t), t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
|
7845
7841
|
}
|
|
7846
7842
|
function Lf(t, e, r) {
|
|
7847
|
-
return
|
|
7843
|
+
return $(t).split(String(e)).join(r);
|
|
7848
7844
|
}
|
|
7849
7845
|
function Pf(t, e, r) {
|
|
7850
|
-
return
|
|
7846
|
+
return $(t).replace(String(e), r);
|
|
7851
7847
|
}
|
|
7852
7848
|
function Nf(t, e, r) {
|
|
7853
|
-
const n =
|
|
7849
|
+
const n = $(t), i = String(e), s = n.lastIndexOf(i);
|
|
7854
7850
|
if (s === -1)
|
|
7855
7851
|
return n;
|
|
7856
7852
|
const a = String(r);
|
|
7857
7853
|
return n.substring(0, s) + a + n.substring(s + i.length);
|
|
7858
7854
|
}
|
|
7859
7855
|
function jf(t, e = 50, r = "...") {
|
|
7860
|
-
return t =
|
|
7856
|
+
return t = $(t), t.length <= e ? t : t.substring(0, e - r.length) + r;
|
|
7861
7857
|
}
|
|
7862
7858
|
function Mf(t, e = 15, r = "...") {
|
|
7863
|
-
const n =
|
|
7859
|
+
const n = $(t).split(/\s+/);
|
|
7864
7860
|
e <= 0 && (e = 1);
|
|
7865
7861
|
let i = n.slice(0, e).join(" ");
|
|
7866
7862
|
return n.length >= e && (i += r), i;
|
|
@@ -7953,7 +7949,7 @@ class Bf extends se {
|
|
|
7953
7949
|
const i = new me(e.args, this.liquid.options.operators);
|
|
7954
7950
|
for (this.variable = Hf(i), pe(this.variable, () => `${e.args} not valid identifier`); r.length; ) {
|
|
7955
7951
|
const s = r.shift();
|
|
7956
|
-
if (
|
|
7952
|
+
if (Tt(s) && s.name === "endcapture")
|
|
7957
7953
|
return;
|
|
7958
7954
|
this.templates.push(n.parser.parseToken(s, r));
|
|
7959
7955
|
}
|
|
@@ -7991,7 +7987,7 @@ class Qf extends se {
|
|
|
7991
7987
|
s.start();
|
|
7992
7988
|
}
|
|
7993
7989
|
*render(e, r) {
|
|
7994
|
-
const n = this.liquid.renderer, i =
|
|
7990
|
+
const n = this.liquid.renderer, i = B(yield this.value.value(e, e.opts.lenientIf));
|
|
7995
7991
|
let s = !1;
|
|
7996
7992
|
for (const a of this.branches)
|
|
7997
7993
|
for (const l of a.values) {
|
|
@@ -8008,7 +8004,7 @@ class zf extends se {
|
|
|
8008
8004
|
constructor(e, r, n) {
|
|
8009
8005
|
for (super(e, r, n); r.length; ) {
|
|
8010
8006
|
const i = r.shift();
|
|
8011
|
-
if (
|
|
8007
|
+
if (Tt(i) && i.name === "endcomment")
|
|
8012
8008
|
return;
|
|
8013
8009
|
}
|
|
8014
8010
|
throw new Error(`tag ${e.getText()} not closed`);
|
|
@@ -8040,7 +8036,7 @@ class Wf extends se {
|
|
|
8040
8036
|
*render(e, r) {
|
|
8041
8037
|
const { liquid: n, hash: i } = this, s = yield Hn(this.file, e, n);
|
|
8042
8038
|
pe(s, () => `illegal filename "${s}"`);
|
|
8043
|
-
const a = new
|
|
8039
|
+
const a = new Ft({}, e.opts, { sync: e.sync, globals: e.globals, strictVariables: e.strictVariables }), l = a.bottom();
|
|
8044
8040
|
if (jr(l, yield i.render(e)), this.with) {
|
|
8045
8041
|
const { value: o, alias: u } = this.with;
|
|
8046
8042
|
l[u || s] = yield ge(o, e);
|
|
@@ -8093,7 +8089,7 @@ class Kf extends se {
|
|
|
8093
8089
|
const { liquid: n, hash: i, withVar: s } = this, { renderer: a } = n, l = yield Hn(this.file, e, n);
|
|
8094
8090
|
pe(l, () => `illegal filename "${l}"`);
|
|
8095
8091
|
const o = e.saveRegister("blocks", "blockMode");
|
|
8096
|
-
e.setRegister("blocks", {}), e.setRegister("blockMode",
|
|
8092
|
+
e.setRegister("blocks", {}), e.setRegister("blockMode", vt.OUTPUT);
|
|
8097
8093
|
const u = yield i.render(e);
|
|
8098
8094
|
s && (u[l] = yield ge(s, e));
|
|
8099
8095
|
const c = yield n._parsePartialFile(l, e.sync, this.currentFile);
|
|
@@ -8108,7 +8104,7 @@ class Yf extends se {
|
|
|
8108
8104
|
}
|
|
8109
8105
|
render(e, r) {
|
|
8110
8106
|
const n = e.environments;
|
|
8111
|
-
Br(n[this.variable]) || (n[this.variable] = 0), r.write(
|
|
8107
|
+
Br(n[this.variable]) || (n[this.variable] = 0), r.write($(--n[this.variable]));
|
|
8112
8108
|
}
|
|
8113
8109
|
}
|
|
8114
8110
|
class Gf extends se {
|
|
@@ -8149,7 +8145,7 @@ class Zf extends se {
|
|
|
8149
8145
|
const n = this.liquid.renderer;
|
|
8150
8146
|
for (const { value: i, templates: s } of this.branches) {
|
|
8151
8147
|
const a = yield i.value(e, e.opts.lenientIf);
|
|
8152
|
-
if (
|
|
8148
|
+
if (yt(a, e)) {
|
|
8153
8149
|
yield n.renderTemplates(s, e, r);
|
|
8154
8150
|
return;
|
|
8155
8151
|
}
|
|
@@ -8167,7 +8163,7 @@ class Jf extends se {
|
|
|
8167
8163
|
const n = e.environments;
|
|
8168
8164
|
Br(n[this.variable]) || (n[this.variable] = 0);
|
|
8169
8165
|
const i = n[this.variable];
|
|
8170
|
-
n[this.variable]++, r.write(
|
|
8166
|
+
n[this.variable]++, r.write($(i));
|
|
8171
8167
|
}
|
|
8172
8168
|
}
|
|
8173
8169
|
class Xf extends se {
|
|
@@ -8179,15 +8175,15 @@ class Xf extends se {
|
|
|
8179
8175
|
*render(e, r) {
|
|
8180
8176
|
const { liquid: n, args: i, file: s } = this, { renderer: a } = n;
|
|
8181
8177
|
if (s === void 0) {
|
|
8182
|
-
e.setRegister("blockMode",
|
|
8178
|
+
e.setRegister("blockMode", vt.OUTPUT), yield a.renderTemplates(this.templates, e, r);
|
|
8183
8179
|
return;
|
|
8184
8180
|
}
|
|
8185
8181
|
const l = yield Hn(this.file, e, n);
|
|
8186
8182
|
pe(l, () => `illegal filename "${l}"`);
|
|
8187
8183
|
const o = yield n._parseLayoutFile(l, e.sync, this.currentFile);
|
|
8188
|
-
e.setRegister("blockMode",
|
|
8184
|
+
e.setRegister("blockMode", vt.STORE);
|
|
8189
8185
|
const u = yield a.renderTemplates(this.templates, e), c = e.getRegister("blocks");
|
|
8190
|
-
c[""] === void 0 && (c[""] = (f, d) => d.write(u)), e.setRegister("blockMode",
|
|
8186
|
+
c[""] === void 0 && (c[""] = (f, d) => d.write(u)), e.setRegister("blockMode", vt.OUTPUT), e.push(yield i.render(e)), yield a.renderTemplates(o, e, r), e.pop();
|
|
8191
8187
|
}
|
|
8192
8188
|
}
|
|
8193
8189
|
class ep extends se {
|
|
@@ -8196,7 +8192,7 @@ class ep extends se {
|
|
|
8196
8192
|
const i = /\w+/.exec(e.args);
|
|
8197
8193
|
for (this.block = i ? i[0] : ""; r.length; ) {
|
|
8198
8194
|
const s = r.shift();
|
|
8199
|
-
if (
|
|
8195
|
+
if (Tt(s) && s.name === "endblock")
|
|
8200
8196
|
return;
|
|
8201
8197
|
const a = n.parser.parseToken(s, r);
|
|
8202
8198
|
this.templates.push(a);
|
|
@@ -8205,7 +8201,7 @@ class ep extends se {
|
|
|
8205
8201
|
}
|
|
8206
8202
|
*render(e, r) {
|
|
8207
8203
|
const n = this.getBlockRender(e);
|
|
8208
|
-
e.getRegister("blockMode") ===
|
|
8204
|
+
e.getRegister("blockMode") === vt.STORE ? e.getRegister("blocks")[this.block] = n : yield n(new $i(), r);
|
|
8209
8205
|
}
|
|
8210
8206
|
getBlockRender(e) {
|
|
8211
8207
|
const { liquid: r, templates: n } = this, i = e.getRegister("blocks")[this.block], s = function* (a, l) {
|
|
@@ -8218,7 +8214,7 @@ class tp extends se {
|
|
|
8218
8214
|
constructor(e, r, n) {
|
|
8219
8215
|
for (super(e, r, n), this.tokens = []; r.length; ) {
|
|
8220
8216
|
const i = r.shift();
|
|
8221
|
-
if (
|
|
8217
|
+
if (Tt(i) && i.name === "endraw")
|
|
8222
8218
|
return;
|
|
8223
8219
|
this.tokens.push(i);
|
|
8224
8220
|
}
|
|
@@ -8284,7 +8280,7 @@ class ip extends se {
|
|
|
8284
8280
|
templates: i = []
|
|
8285
8281
|
})).on("tag:elsif", (s) => this.branches.push({
|
|
8286
8282
|
value: new Je(s.args, this.liquid),
|
|
8287
|
-
test:
|
|
8283
|
+
test: yt,
|
|
8288
8284
|
templates: i = []
|
|
8289
8285
|
})).on("tag:else", () => i = this.elseTemplates).on("tag:endunless", function() {
|
|
8290
8286
|
this.stop();
|
|
@@ -8372,7 +8368,7 @@ class Qn {
|
|
|
8372
8368
|
return this.parser.parse(e, r);
|
|
8373
8369
|
}
|
|
8374
8370
|
_render(e, r, n) {
|
|
8375
|
-
const i = r instanceof
|
|
8371
|
+
const i = r instanceof Ft ? r : new Ft(r, this.options, n);
|
|
8376
8372
|
return this.renderer.renderTemplates(e, i);
|
|
8377
8373
|
}
|
|
8378
8374
|
render(e, r, n) {
|
|
@@ -8384,7 +8380,7 @@ class Qn {
|
|
|
8384
8380
|
return ot(this._render(e, r, Object.assign(Object.assign({}, n), { sync: !0 })));
|
|
8385
8381
|
}
|
|
8386
8382
|
renderToNodeStream(e, r, n = {}) {
|
|
8387
|
-
const i = new
|
|
8383
|
+
const i = new Ft(r, this.options, n);
|
|
8388
8384
|
return this.renderer.renderTemplatesToNodeStream(e, i);
|
|
8389
8385
|
}
|
|
8390
8386
|
_parseAndRender(e, r, n) {
|
|
@@ -8400,10 +8396,10 @@ class Qn {
|
|
|
8400
8396
|
return ot(this._parseAndRender(e, r, Object.assign(Object.assign({}, n), { sync: !0 })));
|
|
8401
8397
|
}
|
|
8402
8398
|
_parsePartialFile(e, r, n) {
|
|
8403
|
-
return this.parser.parseFile(e, r,
|
|
8399
|
+
return this.parser.parseFile(e, r, Ct.Partials, n);
|
|
8404
8400
|
}
|
|
8405
8401
|
_parseLayoutFile(e, r, n) {
|
|
8406
|
-
return this.parser.parseFile(e, r,
|
|
8402
|
+
return this.parser.parseFile(e, r, Ct.Layouts, n);
|
|
8407
8403
|
}
|
|
8408
8404
|
_parseFile(e, r, n, i) {
|
|
8409
8405
|
return this.parser.parseFile(e, r, n, i);
|
|
@@ -8435,7 +8431,7 @@ class Qn {
|
|
|
8435
8431
|
});
|
|
8436
8432
|
}
|
|
8437
8433
|
_evalValue(e, r) {
|
|
8438
|
-
const n = new Je(e, this), i = r instanceof
|
|
8434
|
+
const n = new Je(e, this), i = r instanceof Ft ? r : new Ft(r, this.options);
|
|
8439
8435
|
return n.value(i);
|
|
8440
8436
|
}
|
|
8441
8437
|
evalValue(e, r) {
|
|
@@ -8468,7 +8464,7 @@ class Qn {
|
|
|
8468
8464
|
};
|
|
8469
8465
|
}
|
|
8470
8466
|
}
|
|
8471
|
-
const
|
|
8467
|
+
const pt = new Qn();
|
|
8472
8468
|
function dp(t, e) {
|
|
8473
8469
|
return is(
|
|
8474
8470
|
() => hp(t, e),
|
|
@@ -8480,13 +8476,13 @@ function hp(t, e) {
|
|
|
8480
8476
|
const n = e || r.transform;
|
|
8481
8477
|
return n ? Object.keys(n).reduce((i, s) => s === "details" ? (i[s] = n[s].map((a) => Array.isArray(a) ? a.map((l) => ({
|
|
8482
8478
|
label: l.label,
|
|
8483
|
-
value:
|
|
8479
|
+
value: pt.parseAndRenderSync(l.value, r),
|
|
8484
8480
|
html: l.html
|
|
8485
8481
|
})) : {
|
|
8486
8482
|
label: a.label,
|
|
8487
|
-
value:
|
|
8483
|
+
value: pt.parseAndRenderSync(a.value, r),
|
|
8488
8484
|
html: a.html
|
|
8489
|
-
}), i) : s === "actions" ? (i[s] = n[s].map((a) => Object.keys(a).reduce((l, o) => (typeof a[o] == "object" ? l[o] = Object.keys(a[o]).reduce((u, c) => (u[c] =
|
|
8485
|
+
}), i) : s === "actions" ? (i[s] = n[s].map((a) => Object.keys(a).reduce((l, o) => (typeof a[o] == "object" ? l[o] = Object.keys(a[o]).reduce((u, c) => (u[c] = pt.parseAndRenderSync(a[o][c], r), u), {}) : l[o] = pt.parseAndRenderSync(a[o], r), l), {})), i) : (i[s] = pt.parseAndRenderSync(n[s], r), i), {}) : r;
|
|
8490
8486
|
});
|
|
8491
8487
|
}
|
|
8492
8488
|
function pa({
|
|
@@ -8494,38 +8490,58 @@ function pa({
|
|
|
8494
8490
|
placeholderText: e,
|
|
8495
8491
|
dynamicOptions: r
|
|
8496
8492
|
}) {
|
|
8497
|
-
var
|
|
8498
|
-
let {
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8493
|
+
var J;
|
|
8494
|
+
let {
|
|
8495
|
+
asyncUrl: n,
|
|
8496
|
+
method: i,
|
|
8497
|
+
payload: s,
|
|
8498
|
+
transform: a,
|
|
8499
|
+
clientSideFilter: l,
|
|
8500
|
+
rootData: o,
|
|
8501
|
+
includeHeaders: u
|
|
8502
|
+
} = r, c = Bo();
|
|
8503
|
+
const f = Ee(), { activeIndex: d, search: m, setActions: v, navigateTo: w } = Rt(ut), E = Ju(m, 500), O = u && f.headers ? f.headers : {}, k = {
|
|
8504
|
+
method: i || "get",
|
|
8505
|
+
credentials: "include",
|
|
8506
|
+
headers: O
|
|
8507
|
+
};
|
|
8508
|
+
s && k.method !== "get" && (k.body = pt.parseAndRenderSync(s, {
|
|
8509
|
+
...c,
|
|
8510
|
+
query: E
|
|
8511
|
+
}));
|
|
8512
|
+
const {
|
|
8513
|
+
isLoading: C,
|
|
8514
|
+
error: R,
|
|
8515
|
+
data: A = []
|
|
8503
8516
|
} = Zu({
|
|
8504
|
-
queryKey: [t,
|
|
8517
|
+
queryKey: [t, l ? "" : E],
|
|
8505
8518
|
enabled: !!n,
|
|
8506
|
-
queryFn: () => fetch(
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8519
|
+
queryFn: () => fetch(
|
|
8520
|
+
pt.parseAndRenderSync(n, {
|
|
8521
|
+
...c,
|
|
8522
|
+
query: E
|
|
8523
|
+
}),
|
|
8524
|
+
k
|
|
8525
|
+
).then((H) => H.json())
|
|
8526
|
+
}), _ = o ? Yc(A, o, []) : A, j = is(
|
|
8527
|
+
() => Array.isArray(_) ? _ : [_],
|
|
8528
|
+
[_]
|
|
8513
8529
|
);
|
|
8514
|
-
let
|
|
8515
|
-
|
|
8516
|
-
(
|
|
8530
|
+
let N = dp(j, a);
|
|
8531
|
+
l && (N = N.filter(
|
|
8532
|
+
(H) => H.title.toLowerCase().includes(m.toLowerCase())
|
|
8517
8533
|
));
|
|
8518
|
-
const
|
|
8534
|
+
const F = N[d];
|
|
8519
8535
|
return Ge(() => {
|
|
8520
|
-
|
|
8521
|
-
}, [
|
|
8536
|
+
F && F.actions ? v(F.actions) : v([]);
|
|
8537
|
+
}, [F, m, d, v]), C ? /* @__PURE__ */ y.jsx(nr, { children: /* @__PURE__ */ y.jsx("div", { className: "qikbar-item-empty", children: "loading..." }) }) : N.length === 0 ? /* @__PURE__ */ y.jsxs(nr, { children: [
|
|
8522
8538
|
/* @__PURE__ */ y.jsx(kr, { placeholder: e }),
|
|
8523
8539
|
/* @__PURE__ */ y.jsx("div", { className: "qikbar-item-empty", children: "No matches" })
|
|
8524
8540
|
] }) : /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
|
|
8525
8541
|
/* @__PURE__ */ y.jsx(kr, { placeholder: e }),
|
|
8526
8542
|
/* @__PURE__ */ y.jsxs(nr, { children: [
|
|
8527
|
-
/* @__PURE__ */ y.jsx(Ts, { children:
|
|
8528
|
-
|
|
8543
|
+
/* @__PURE__ */ y.jsx(Ts, { children: N.map((H) => /* @__PURE__ */ y.jsx(Rn, { item: H }, H.id)) }),
|
|
8544
|
+
F && ((J = F == null ? void 0 : F.details) == null ? void 0 : J.length) > 0 && /* @__PURE__ */ y.jsx(Ds, { fields: F.details })
|
|
8529
8545
|
] })
|
|
8530
8546
|
] });
|
|
8531
8547
|
}
|
|
@@ -8694,7 +8710,7 @@ function mp({ id: t }) {
|
|
|
8694
8710
|
Xt.createRoot(
|
|
8695
8711
|
document.getElementById(r)
|
|
8696
8712
|
).render(
|
|
8697
|
-
/* @__PURE__ */ y.jsx(
|
|
8713
|
+
/* @__PURE__ */ y.jsx(Et.StrictMode, { children: /* @__PURE__ */ y.jsx(fp, { children: /* @__PURE__ */ y.jsx(Us, { client: ga, children: /* @__PURE__ */ y.jsx(pp, {}) }) }) })
|
|
8698
8714
|
), window.Qikbar.booted = !0;
|
|
8699
8715
|
},
|
|
8700
8716
|
setTheme: (r) => Ee.getState().setTheme(r),
|