@qikbar/qikbar 0.0.23 → 0.0.24
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 +15 -14
- package/dist/qikbar.umd.js +4 -4
- package/package.json +1 -1
package/dist/qikbar.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var
|
|
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);
|
|
@@ -674,7 +674,7 @@ const Gn = (t) => {
|
|
|
674
674
|
e = u ?? typeof c != "object" ? c : Object.assign({}, e, c), r.forEach((d) => d(e, f));
|
|
675
675
|
}
|
|
676
676
|
}, i = () => e, l = { setState: n, getState: i, subscribe: (o) => (r.add(o), () => r.delete(o)), destroy: () => {
|
|
677
|
-
({ VITE_DEV: "
|
|
677
|
+
({ VITE_DEV: "false", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0 } && "production") !== "production" && console.warn(
|
|
678
678
|
"[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."
|
|
679
679
|
), r.clear();
|
|
680
680
|
} };
|
|
@@ -952,7 +952,7 @@ function qa(t, e = t.getState, r) {
|
|
|
952
952
|
return Ca(n), n;
|
|
953
953
|
}
|
|
954
954
|
const ri = (t) => {
|
|
955
|
-
({ VITE_DEV: "
|
|
955
|
+
({ VITE_DEV: "false", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0 } && "production") !== "production" && typeof t != "function" && console.warn(
|
|
956
956
|
'[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.'
|
|
957
957
|
);
|
|
958
958
|
const e = typeof t == "function" ? ka(t) : t, r = (n, i) => qa(e, n, i);
|
|
@@ -3545,7 +3545,7 @@ function _s({
|
|
|
3545
3545
|
};
|
|
3546
3546
|
}, [v, E]), !v)
|
|
3547
3547
|
return null;
|
|
3548
|
-
const F = !!new URLSearchParams(window.location.search).get("qikbarAdmin"), J = "
|
|
3548
|
+
const F = !!new URLSearchParams(window.location.search).get("qikbarAdmin"), J = "https://app.qikbar.com";
|
|
3549
3549
|
return /* @__PURE__ */ y.jsxs(
|
|
3550
3550
|
"div",
|
|
3551
3551
|
{
|
|
@@ -4117,18 +4117,19 @@ function kr({ placeholder: t }) {
|
|
|
4117
4117
|
}, [e, t]), null;
|
|
4118
4118
|
}
|
|
4119
4119
|
function Ds({ fields: t }) {
|
|
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.
|
|
4121
|
-
|
|
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) => n ? /* @__PURE__ */ y.jsx(
|
|
4121
|
+
"div",
|
|
4122
|
+
{
|
|
4123
|
+
className: "qikbar-field",
|
|
4124
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
4125
|
+
},
|
|
4126
|
+
i
|
|
4127
|
+
) : /* @__PURE__ */ y.jsxs("div", { className: "qikbar-field", children: [
|
|
4128
|
+
e && /* @__PURE__ */ y.jsxs("span", { className: "qikbar-field-label", children: [
|
|
4122
4129
|
e,
|
|
4123
4130
|
":"
|
|
4124
4131
|
] }),
|
|
4125
|
-
|
|
4126
|
-
"p",
|
|
4127
|
-
{
|
|
4128
|
-
dangerouslySetInnerHTML: { __html: r },
|
|
4129
|
-
className: "qikbar-field-value"
|
|
4130
|
-
}
|
|
4131
|
-
) : /* @__PURE__ */ y.jsx("p", { className: "qikbar-field-value", children: r })
|
|
4132
|
+
/* @__PURE__ */ y.jsx("p", { className: "qikbar-field-value", children: r })
|
|
4132
4133
|
] }, i)) }) });
|
|
4133
4134
|
}
|
|
4134
4135
|
function Ls({
|
|
@@ -8698,7 +8699,7 @@ function pp() {
|
|
|
8698
8699
|
]);
|
|
8699
8700
|
return /* @__PURE__ */ y.jsx("div", { id: "qikbar", className: `qikbar-light qikbar-${e}`, children: /* @__PURE__ */ y.jsx(Es, { router: r }) });
|
|
8700
8701
|
}
|
|
8701
|
-
const ns = async (t) => fetch(`
|
|
8702
|
+
const ns = async (t) => fetch(`https://app.qikbar.com/api/site/${t}`).then((r) => r.json()).then((r) => {
|
|
8702
8703
|
r != null && r.routes && Ee.getState().addCommands(r.routes), r != null && r.theme && Ee.getState().setTheme(r.theme), r != null && r.id && Ee.getState().setId(r.id);
|
|
8703
8704
|
}).catch((r) => {
|
|
8704
8705
|
console.error(r);
|
package/dist/qikbar.umd.js
CHANGED
|
@@ -25,7 +25,7 @@ Check the render method of \``+h+"`."}return""}}function Le(h){{if(h!==void 0){v
|
|
|
25
25
|
|
|
26
26
|
Check your code at `+x+":"+T+"."}return""}}var Qe={};function qt(h){{var x=he();if(!x){var T=typeof h=="string"?h:h.displayName||h.name;T&&(x=`
|
|
27
27
|
|
|
28
|
-
Check the top-level render call using <`+T+">.")}return x}}function It(h,x){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var T=qt(x);if(Qe[T])return;Qe[T]=!0;var $="";h&&h._owner&&h._owner!==Xe.current&&($=" It was passed a child from "+ne(h._owner.type)+"."),Ne(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,$),Ne(null)}}function Qr(h,x){{if(typeof h!="object")return;if(ur(h))for(var T=0;T<h.length;T++){var $=h[T];_t($)&&It($,x)}else if(_t(h))h._store&&(h._store.validated=!0);else if(h){var G=E(h);if(typeof G=="function"&&G!==h.entries)for(var J=G.call(h),Y;!(Y=J.next()).done;)_t(Y.value)&&It(Y.value,x)}}}function $n(h){{var x=h.type;if(x==null||typeof x=="string")return;var T;if(typeof x=="function")T=x.propTypes;else if(typeof x=="object"&&(x.$$typeof===o||x.$$typeof===f))T=x.propTypes;else return;if(T){var $=ne(x);Br(T,h.props,"prop",$,h)}else if(x.PropTypes!==void 0&&!He){He=!0;var G=ne(x);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof x.getDefaultProps=="function"&&!x.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ae(h){{for(var x=Object.keys(h.props),T=0;T<x.length;T++){var $=x[T];if($!=="children"&&$!=="key"){Ne(h),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Ne(null);break}}h.ref!==null&&(Ne(h),k("Invalid attribute `ref` supplied to `React.Fragment`."),Ne(null))}}function Vt(h,x,T,$,G,J){{var Y=te(h);if(!Y){var K="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(K+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ee=Le(G);Ee?K+=Ee:K+=he();var oe;h===null?oe="null":ur(h)?oe="array":h!==void 0&&h.$$typeof===e?(oe="<"+(ne(h.type)||"Unknown")+" />",K=" Did you accidentally export a JSX literal instead of a component?"):oe=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",oe,K)}var ce=ke(h,x,T,G,J);if(ce==null)return ce;if(Y){var Pe=x.children;if(Pe!==void 0)if($)if(ur(Pe)){for(var Ut=0;Ut<Pe.length;Ut++)Qr(Pe[Ut],h);Object.freeze&&Object.freeze(Pe)}else 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.");else Qr(Pe,h)}return h===n?Ae(ce):$n(ce),ce}}function zr(h,x,T){return Vt(h,x,T,!0)}function Bn(h,x,T){return Vt(h,x,T,!1)}var $f=Bn,Bf=zr;Bt.Fragment=n,Bt.jsx=$f,Bt.jsxs=Bf}()),Bt}(function(t){process.env.NODE_ENV==="production"?t.exports=va():t.exports=ba()})(ya);var Ht={},Qt=ct;if(process.env.NODE_ENV==="production")Ht.createRoot=Qt.createRoot,Ht.hydrateRoot=Qt.hydrateRoot;else{var dr=Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ht.createRoot=function(t,e){dr.usingClientEntryPoint=!0;try{return Qt.createRoot(t,e)}finally{dr.usingClientEntryPoint=!1}},Ht.hydrateRoot=function(t,e,r){dr.usingClientEntryPoint=!0;try{return Qt.hydrateRoot(t,e,r)}finally{dr.usingClientEntryPoint=!1}}}const zn=t=>{let e;const r=new Set,n=(o,u)=>{const c=typeof o=="function"?o(e):o;if(!Object.is(c,e)){const f=e;e=u??typeof c!="object"?c:Object.assign({},e,c),r.forEach(d=>d(e,f))}},i=()=>e,l={setState:n,getState:i,subscribe:o=>(r.add(o),()=>r.delete(o)),destroy:()=>{({VITE_DEV:"
|
|
28
|
+
Check the top-level render call using <`+T+">.")}return x}}function It(h,x){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var T=qt(x);if(Qe[T])return;Qe[T]=!0;var $="";h&&h._owner&&h._owner!==Xe.current&&($=" It was passed a child from "+ne(h._owner.type)+"."),Ne(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,$),Ne(null)}}function Qr(h,x){{if(typeof h!="object")return;if(ur(h))for(var T=0;T<h.length;T++){var $=h[T];_t($)&&It($,x)}else if(_t(h))h._store&&(h._store.validated=!0);else if(h){var G=E(h);if(typeof G=="function"&&G!==h.entries)for(var J=G.call(h),Y;!(Y=J.next()).done;)_t(Y.value)&&It(Y.value,x)}}}function $n(h){{var x=h.type;if(x==null||typeof x=="string")return;var T;if(typeof x=="function")T=x.propTypes;else if(typeof x=="object"&&(x.$$typeof===o||x.$$typeof===f))T=x.propTypes;else return;if(T){var $=ne(x);Br(T,h.props,"prop",$,h)}else if(x.PropTypes!==void 0&&!He){He=!0;var G=ne(x);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof x.getDefaultProps=="function"&&!x.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ae(h){{for(var x=Object.keys(h.props),T=0;T<x.length;T++){var $=x[T];if($!=="children"&&$!=="key"){Ne(h),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Ne(null);break}}h.ref!==null&&(Ne(h),k("Invalid attribute `ref` supplied to `React.Fragment`."),Ne(null))}}function Vt(h,x,T,$,G,J){{var Y=te(h);if(!Y){var K="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(K+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ee=Le(G);Ee?K+=Ee:K+=he();var oe;h===null?oe="null":ur(h)?oe="array":h!==void 0&&h.$$typeof===e?(oe="<"+(ne(h.type)||"Unknown")+" />",K=" Did you accidentally export a JSX literal instead of a component?"):oe=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",oe,K)}var ce=ke(h,x,T,G,J);if(ce==null)return ce;if(Y){var Pe=x.children;if(Pe!==void 0)if($)if(ur(Pe)){for(var Ut=0;Ut<Pe.length;Ut++)Qr(Pe[Ut],h);Object.freeze&&Object.freeze(Pe)}else 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.");else Qr(Pe,h)}return h===n?Ae(ce):$n(ce),ce}}function zr(h,x,T){return Vt(h,x,T,!0)}function Bn(h,x,T){return Vt(h,x,T,!1)}var $f=Bn,Bf=zr;Bt.Fragment=n,Bt.jsx=$f,Bt.jsxs=Bf}()),Bt}(function(t){process.env.NODE_ENV==="production"?t.exports=va():t.exports=ba()})(ya);var Ht={},Qt=ct;if(process.env.NODE_ENV==="production")Ht.createRoot=Qt.createRoot,Ht.hydrateRoot=Qt.hydrateRoot;else{var dr=Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ht.createRoot=function(t,e){dr.usingClientEntryPoint=!0;try{return Qt.createRoot(t,e)}finally{dr.usingClientEntryPoint=!1}},Ht.hydrateRoot=function(t,e,r){dr.usingClientEntryPoint=!0;try{return Qt.hydrateRoot(t,e,r)}finally{dr.usingClientEntryPoint=!1}}}const zn=t=>{let e;const r=new Set,n=(o,u)=>{const c=typeof o=="function"?o(e):o;if(!Object.is(c,e)){const f=e;e=u??typeof c!="object"?c:Object.assign({},e,c),r.forEach(d=>d(e,f))}},i=()=>e,l={setState:n,getState:i,subscribe:o=>(r.add(o),()=>r.delete(o)),destroy:()=>{({VITE_DEV:"false",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()}};return e=t(n,i,l),l},wa=t=>t?zn(t):zn;var Wr={},Ca={get exports(){return Wr},set exports(t){Wr=t}},Kr={},hr={},Ea={get exports(){return hr},set exports(t){hr=t}},Yr={};/**
|
|
29
29
|
* @license React
|
|
30
30
|
* use-sync-external-store-shim.production.min.js
|
|
31
31
|
*
|
|
@@ -57,7 +57,7 @@ Check the top-level render call using <`+T+">.")}return x}}function It(h,x){{if(
|
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the MIT license found in the
|
|
59
59
|
* LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/var Zn;function Oa(){return Zn||(Zn=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=M,e=Zr();function r(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,l=t.useMemo,o=t.useDebugValue;function u(c,f,d,m,v){var w=s(null),E;w.current===null?(E={hasValue:!1,value:null},w.current=E):E=w.current;var O=l(function(){var A=!1,_,F,j=function(N){if(!A){A=!0,_=N;var ne=m(N);if(v!==void 0&&E.hasValue){var de=E.value;if(v(de,ne))return F=de,de}return F=ne,ne}var we=_,Ce=F;if(n(we,N))return Ce;var re=m(N);return v!==void 0&&v(Ce,re)?Ce:(_=N,F=re,re)},q=d===void 0?null:d,te=function(){return j(f())},Q=q===null?void 0:function(){return j(q())};return[te,Q]},[f,d,m,v]),k=O[0],C=O[1],S=i(c,k,C);return a(function(){E.hasValue=!0,E.value=S},[S]),o(S),S}Jr.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jr}(function(t){process.env.NODE_ENV==="production"?t.exports=xa():t.exports=Oa()})(Ca);const _a=ga(Wr),{useSyncExternalStoreWithSelector:Ta}=_a;function ka(t,e=t.getState,r){const n=Ta(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return M.useDebugValue(n),n}const Jn=t=>{({VITE_DEV:"
|
|
60
|
+
*/var Zn;function Oa(){return Zn||(Zn=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=M,e=Zr();function r(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,l=t.useMemo,o=t.useDebugValue;function u(c,f,d,m,v){var w=s(null),E;w.current===null?(E={hasValue:!1,value:null},w.current=E):E=w.current;var O=l(function(){var A=!1,_,F,j=function(N){if(!A){A=!0,_=N;var ne=m(N);if(v!==void 0&&E.hasValue){var de=E.value;if(v(de,ne))return F=de,de}return F=ne,ne}var we=_,Ce=F;if(n(we,N))return Ce;var re=m(N);return v!==void 0&&v(Ce,re)?Ce:(_=N,F=re,re)},q=d===void 0?null:d,te=function(){return j(f())},Q=q===null?void 0:function(){return j(q())};return[te,Q]},[f,d,m,v]),k=O[0],C=O[1],S=i(c,k,C);return a(function(){E.hasValue=!0,E.value=S},[S]),o(S),S}Jr.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jr}(function(t){process.env.NODE_ENV==="production"?t.exports=xa():t.exports=Oa()})(Ca);const _a=ga(Wr),{useSyncExternalStoreWithSelector:Ta}=_a;function ka(t,e=t.getState,r){const n=Ta(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return M.useDebugValue(n),n}const Jn=t=>{({VITE_DEV:"false",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&typeof t!="function"&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const e=typeof t=="function"?wa(t):t,r=(n,i)=>ka(e,n,i);return Object.assign(r,e),r},Da=t=>t?Jn(t):Jn;/**
|
|
61
61
|
* @remix-run/router v1.3.1
|
|
62
62
|
*
|
|
63
63
|
* Copyright (c) Remix Software Inc.
|
|
@@ -86,7 +86,7 @@ Check the top-level render call using <`+T+">.")}return x}}function It(h,x){{if(
|
|
|
86
86
|
* LICENSE.md file in the root directory of this source tree.
|
|
87
87
|
*
|
|
88
88
|
* @license MIT
|
|
89
|
-
*/function pt(){return pt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pt.apply(this,arguments)}function on(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}const yr="get",ln="application/x-www-form-urlencoded";function vr(t){return t!=null&&typeof t.tagName=="string"}function zo(t){return vr(t)&&t.tagName.toLowerCase()==="button"}function Wo(t){return vr(t)&&t.tagName.toLowerCase()==="form"}function Ko(t){return vr(t)&&t.tagName.toLowerCase()==="input"}function Yo(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Go(t,e){return t.button===0&&(!e||e==="_self")&&!Yo(t)}function Zo(t,e,r){let n,i,s,a;if(Wo(t)){let c=r.submissionTrigger;n=r.method||t.getAttribute("method")||yr,i=r.action||t.getAttribute("action")||e,s=r.encType||t.getAttribute("enctype")||ln,a=new FormData(t),c&&c.name&&a.append(c.name,c.value)}else if(zo(t)||Ko(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');n=r.method||t.getAttribute("formmethod")||c.getAttribute("method")||yr,i=r.action||t.getAttribute("formaction")||c.getAttribute("action")||e,s=r.encType||t.getAttribute("formenctype")||c.getAttribute("enctype")||ln,a=new FormData(c),t.name&&a.append(t.name,t.value)}else{if(vr(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(n=r.method||yr,i=r.action||e,s=r.encType||ln,t instanceof FormData)a=t;else if(a=new FormData,t instanceof URLSearchParams)for(let[c,f]of t)a.append(c,f);else if(t!=null)for(let c of Object.keys(t))a.append(c,t[c])}let{protocol:l,host:o}=window.location;return{url:new URL(i,l+"//"+o),method:n.toLowerCase(),encType:s,formData:a}}const Jo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Xo=["aria-current","caseSensitive","className","end","style","to","children"],el=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];process.env.NODE_ENV;const tl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",br=p.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:a,state:l,target:o,to:u,preventScrollReset:c}=e,f=on(e,Jo),d=typeof u=="string"?u:qe(u),m=/^[a-z+]+:\/\//i.test(d)||d.startsWith("//"),v=d,w=!1;if(tl&&m){let C=new URL(window.location.href),S=d.startsWith("//")?new URL(C.protocol+d):new URL(d);S.origin===C.origin?v=S.pathname+S.search+S.hash:w=!0}let E=ko(v,{relative:i}),O=al(v,{replace:a,state:l,target:o,preventScrollReset:c,relative:i});function k(C){n&&n(C),C.defaultPrevented||O(C)}return p.createElement("a",pt({},f,{href:m?d:E,onClick:w||s?n:k,ref:r,target:o}))});process.env.NODE_ENV!=="production"&&(br.displayName="Link");const rl=p.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:a=!1,style:l,to:o,children:u}=e,c=on(e,Xo),f=mr(o,{relative:c.relative}),d=ft(),m=p.useContext(Zt),{navigator:v}=p.useContext(ht),w=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,E=d.pathname,O=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(E=E.toLowerCase(),O=O?O.toLowerCase():null,w=w.toLowerCase());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)==="/"),S=k?n:void 0,A;typeof s=="function"?A=s({isActive:k,isPending:C}):A=[s,k?"active":null,C?"pending":null].filter(Boolean).join(" ");let _=typeof l=="function"?l({isActive:k,isPending:C}):l;return p.createElement(br,pt({},c,{"aria-current":S,className:A,ref:r,style:_,to:o}),typeof u=="function"?u({isActive:k,isPending:C}):u)});process.env.NODE_ENV!=="production"&&(rl.displayName="NavLink");const nl=p.forwardRef((t,e)=>p.createElement(Ai,pt({},t,{ref:e})));process.env.NODE_ENV!=="production"&&(nl.displayName="Form");const Ai=p.forwardRef((t,e)=>{let{reloadDocument:r,replace:n,method:i=yr,action:s,onSubmit:a,fetcherKey:l,routeId:o,relative:u,preventScrollReset:c}=t,f=on(t,el),d=ol(l,o),m=i.toLowerCase()==="get"?"get":"post",v=Ii(s,{relative:u}),w=E=>{if(a&&a(E),E.defaultPrevented)return;E.preventDefault();let O=E.nativeEvent.submitter,k=(O==null?void 0:O.getAttribute("formmethod"))||i;d(O||E.currentTarget,{method:k,replace:n,relative:u,preventScrollReset:c})};return p.createElement("form",pt({ref:e,method:m,action:v,onSubmit:r?a:w},f))});process.env.NODE_ENV!=="production"&&(Ai.displayName="FormImpl"),process.env.NODE_ENV;var un;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(un||(un={}));var qi;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(qi||(qi={}));function il(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function sl(t){let e=p.useContext(Gt);return e||(process.env.NODE_ENV!=="production"?P(!1,il(t)):P(!1)),e}function al(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a}=e===void 0?{}:e,l=Ti(),o=ft(),u=mr(t,{relative:a});return p.useCallback(c=>{if(Go(c,r)){c.preventDefault();let f=n!==void 0?n:qe(o)===qe(u);l(t,{replace:f,state:i,preventScrollReset:s,relative:a})}},[o,l,u,n,i,r,t,s,a])}function ol(t,e){let{router:r}=sl(un.UseSubmitImpl),n=Ii();return p.useCallback(function(i,s){if(s===void 0&&(s={}),typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:a,encType:l,formData:o,url:u}=Zo(i,n,s),c=u.pathname+u.search,f={replace:s.replace,preventScrollReset:s.preventScrollReset,formData:o,formMethod:a,formEncType:l};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)},[n,r,t,e])}function Ii(t,e){let{relative:r}=e===void 0?{}:e,{basename:n}=p.useContext(ht),i=p.useContext($e);i||(process.env.NODE_ENV!=="production"?P(!1,"useFormAction must be used inside a RouteContext"):P(!1));let[s]=i.matches.slice(-1),a=pt({},mr(t||".",{relative:r})),l=ft();if(t==null&&(a.search=l.search,a.hash=l.hash,s.route.index)){let o=new URLSearchParams(a.search);o.delete("index"),a.search=o.toString()?"?"+o.toString():""}return(!t||t===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:Ue([n,a.pathname])),qe(a)}function ll({showAdminEdit:t,setShowAdminEdit:e,enabledAdminEdit:r}){const{actions:n,showActions:i,setShowActions:s,navigateTo:a}=M.useContext(rt),l=M.useRef();return M.useEffect(()=>{const o=u=>{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()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[i,n]),M.useEffect(()=>{var o,u;i&&((u=(o=l==null?void 0:l.current)==null?void 0:o.firstChild)==null||u.focus())},[i]),y.jsxs("div",{className:"qikbar-command-footer",children:[y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})}),r&&y.jsx("button",{className:"qikbar-admin-edit",onClick:()=>e(o=>!o),children:"Edit Qikbar"}),n.length>0&&y.jsxs("div",{className:"qikbar-actions-wrapper",children:[i&&y.jsx("div",{className:"qikbar-actions-panel",children:y.jsx("ul",{className:"qikbar-actions-list",ref:l,children:n.map(o=>y.jsx("button",{onClick:()=>a(o.href,o.title,o.target),className:"qikbar-action",children:o.title},o.title))})}),y.jsxs("button",{onClick:()=>s(o=>!o),className:"qikbar-actions",children:[y.jsx("span",{className:"qikbar-actions-action",children:"Actions"}),y.jsxs("span",{className:"qikbar-keys",children:[y.jsx("kbd",{className:"qikbar-kbd",children:"Cmd"})," +"," ",y.jsx("kbd",{className:"qikbar-kbd",children:"Enter"})]})]})]})]})}function ul(){const{search:t,setSearch:e,searchRef:r,placeholder:n}=M.useContext(rt);return y.jsx("input",{"data-testid":"qikbar-search",placeholder:n,className:"qikbar-search",ref:r,autoFocus:!0,value:t,onChange:i=>e(i.target.value),name:"search",type:"text"})}function cl({crumbs:t}){const{setCrumbs:e}=M.useContext(rt);return t.length===0?null:y.jsx("ul",{className:"qikbar-crumbs",children:t.map((r,n)=>{const i=t.length-1===n;return y.jsx("li",{className:"qikbar-crumb",children:y.jsxs(br,{to:r.to,onClick:()=>e(s=>i?s:s.slice(0,n+1)),children:[r.title," ",!i&&y.jsx("span",{className:"qikbar-crumb-divider",children:">"})]})},n)})})}const rt=M.createContext(null);function Vi({demo:t=!1,wrapperClass:e="qikbar-command-wrapper",defaultOpen:r=!1}){const n=M.useRef(null),i=ft(),s=Ti(),[a,l]=M.useState(!1),[o,u]=M.useState([]),[c,f]=M.useState([]),[d,m]=M.useState(!1),[v,w]=M.useState(r),[E,O]=M.useState(""),[k,C]=M.useState("Search for resources"),S=M.useRef(),[A,_]=M.useState(0),F=Re();if(M.useEffect(()=>{var Q;v&&((Q=S.current)==null||Q.focus(),_(0),t||(document.body.style.overflow="hidden")),v||(s(""),m(!1),u([]),f([]),document.body.style.overflow="unset")},[v,i.pathname]),M.useEffect(()=>{const Q=N=>{var ne,de,we,Ce,re,Me,ot;if(v&&["Space","ArrowUp","ArrowDown"].indexOf(N.key)>-1&&N.preventDefault(),N.metaKey&&N.key==="Enter"){N.preventDefault(),N.stopPropagation();return}if(v&&N.key==="ArrowDown"&&N.target.localName==="input"&&((ne=n.current)!=null&&ne.getElementsByClassName("qikbar-item")[1])&&(_(1),n.current.getElementsByClassName("qikbar-item")[1].focus()),v&&N.target.localName==="input"&&E===""&&N.key==="Backspace"&&(s(-1),f(se=>se.slice(0,-1))),v&&N.key==="Escape"&&!t&&(O(""),s(""),w(!1),u([])),v&&N.key==="Enter"&&N.target.localName==="input"&&((de=n.current)!=null&&de.getElementsByClassName("qikbar-item")[0])&&(n.current.getElementsByClassName("qikbar-item")[0].click(),O("")),v&&N.key==="ArrowDown"&&N.target.getAttribute("data-testid")==="qikbar-item"&&N.target.nextElementSibling){let se;N.target.nextElementSibling.className==="qikbar-category-wrapper"?se=N.target.nextElementSibling.nextElementSibling:se=N.target.nextElementSibling;const xe=Array.prototype.indexOf.call((Ce=(we=N.target)==null?void 0:we.parentNode)==null?void 0:Ce.getElementsByClassName("qikbar-item"),se);_(xe),se==null||se.focus()}if(v&&N.key==="ArrowUp"&&N.target.getAttribute("data-testid")==="qikbar-item"&&N.target.previousElementSibling){let se;if(N.target.previousElementSibling.className==="qikbar-category-wrapper"?se=N.target.previousElementSibling.previousElementSibling:se=N.target.previousElementSibling,!se)return;const xe=Array.prototype.indexOf.call((Me=(re=N.target)==null?void 0:re.parentNode)==null?void 0:Me.getElementsByClassName("qikbar-item"),se);_(xe),se==null||se.focus()}v&&N.key!=="ArrowUp"&&N.key!=="ArrowDown"&&N.key!=="Enter"&&!N.metaKey&&!t&&(_(0),(ot=S.current)==null||ot.focus()),N.metaKey&&N.key==="k"&&!t&&(v&&(s(""),O(""),_(0),u([]),f([])),w(se=>!se)),v&&N.key==="Enter"&&O("")};return document.addEventListener("keydown",Q),()=>{document.removeEventListener("keydown",Q)}},[v,E]),!v)return null;const q=!!new URLSearchParams(window.location.search).get("qikbarAdmin"),te="http://localhost:3000";return y.jsxs("div",{className:`${e} ${a&&"qikbar-admin-offset"}`,"data-testid":"command-bar-container",children:[q&&y.jsx("div",{className:a?"qikbar-embedded":"qickbar-embedded-hidden",children:y.jsx("iframe",{src:`${te}/sites/${F.id}/edit/?embedded=true`})}),y.jsx(rt.Provider,{value:{demo:t,search:E,searchRef:S,setIsOpen:w,setSearch:O,activeIndex:A,placeholder:k,setPlaceholder:C,setActions:u,setCrumbs:f,crumbs:c,actions:o,showActions:d,setShowActions:m,navigateTo:(Q,N,ne="self")=>{var de,we;switch(m(!1),O(""),ne){case"self":_(0),s(Q),(de=S.current)==null||de.focus(),Q!==(i==null?void 0:i.pathname)&&u([]),n.current.getElementsByClassName("qikbar-list")[0].scrollTo(0,0),f(Ce=>[...Ce,{title:N,to:Q}]);break;case"internal":s(""),w(!1),f([]),u([]),F!=null&&F.router?(we=F==null?void 0:F.router)==null||we.call(F,Q):window.location=Q;break;case"external":s(""),w(!1),f([]),u([]),window.open(Q,"_blank");break;default:s(Q),f(Ce=>[...Ce,{title:N,to:Q}])}}},children:y.jsxs("div",{className:"qikbar-command-bar",ref:n,children:[y.jsxs("div",{className:"qikbar-search-wrapper",children:[y.jsx(cl,{crumbs:c}),y.jsx(ul,{})]}),y.jsx("div",{className:"qikbar-command-content",children:y.jsx($o,{})}),y.jsx(ll,{enabledAdminEdit:q,showAdminEdit:a,setShowAdminEdit:l})]})})]})}function dl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0M3.124 7.5A8.969 8.969 0 015.292 3m13.416 0a8.969 8.969 0 012.168 4.5"}))}const hl=p.forwardRef(dl);function fl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"}))}const pl=p.forwardRef(fl);function ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"}))}const gl=p.forwardRef(ml);function yl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"}))}const vl=p.forwardRef(yl);function bl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"}))}const wl=p.forwardRef(bl);function Cl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"}))}const El=p.forwardRef(Cl);function Sl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 110-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 01-1.44-4.282m3.102.069a18.03 18.03 0 01-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 018.835 2.535M10.34 6.66a23.847 23.847 0 008.835-2.535m0 0A23.74 23.74 0 0018.795 3m.38 1.125a23.91 23.91 0 011.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 001.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 010 3.46"}))}const Rl=p.forwardRef(Sl);function xl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const Ol=p.forwardRef(xl);function _l({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"}))}const Tl=p.forwardRef(_l);function kl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const Dl=p.forwardRef(kl);function Ll({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"}))}const Pl=p.forwardRef(Ll);function jl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 019 14.437V9.564z"}))}const Fl=p.forwardRef(jl);function Ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"}))}const Nl=p.forwardRef(Ml);function Al({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"}))}const ql=p.forwardRef(Al);function Il({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"}))}const Vl=p.forwardRef(Il);function Ul({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75a4.5 4.5 0 01-4.884 4.484c-1.076-.091-2.264.071-2.95.904l-7.152 8.684a2.548 2.548 0 11-3.586-3.586l8.684-7.152c.833-.686.995-1.874.904-2.95a4.5 4.5 0 016.336-4.486l-3.276 3.276a3.004 3.004 0 002.25 2.25l3.276-3.276c.256.565.398 1.192.398 1.852z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.867 19.125h.008v.008h-.008v-.008z"}))}const $l=p.forwardRef(Ul);function Bl({iconName:t}){switch(t){case"CalendarIcon":return y.jsx(gl,{});case"CalendarDaysIcon":return y.jsx(pl,{});case"FireIcon":return y.jsx(vl,{});case"MegaphoneIcon":return y.jsx(Rl,{});case"WrenchIcon":return y.jsx($l,{});case"WrenchScrewdriverIcon":return y.jsx(Vl,{});case"ShareIcon":return y.jsx(Ol,{});case"ShoppingBagIcon":return y.jsx(Tl,{});case"ShoppingCartIcon":return y.jsx(Dl,{});case"StarIcon":return y.jsx(Pl,{});case"StopCircleIcon":return y.jsx(Fl,{});case"StopIcon":return y.jsx(Nl,{});case"LockClosedIcon":return y.jsx(El,{});case"LinkIcon":return y.jsx(wl,{});case"UserGroupIcon":return y.jsx(ql,{});case"BellAlertIcon":return y.jsx(hl,{});default:return null}}function er({children:t}){return y.jsx("div",{className:"qikbar-details-container",children:t})}function Ui({children:t}){return y.jsx("ul",{className:"qikbar-list",children:t})}function $i({item:{name:t,children:e,Icon:r}}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"qikbar-category-wrapper",children:[r&&y.jsx(r,{}),y.jsx("p",{className:"qikbar-category",children:t})]}),e.map(n=>n.children?y.jsx($i,{item:n},n.id):y.jsx(cn,{item:n},n.id))]})}var Bi=function(t){return t.indexOf("//")===0&&(t=location.protocol+t),t.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]},Hl=function(t){if(t)return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&Bi(location.href)!==Bi(t)};function cn({item:{iconName:t,title:e,to:r,description:n,href:i,route:s,action:a,children:l,tag:o}}){const{setIsOpen:u,setCrumbs:c,setActions:f,demo:d}=M.useContext(rt),m=Re();if(l)return null;const v=i?"a":br,w=k=>{var C;m!=null&&m.router&&((C=m==null?void 0:m.router)==null||C.call(m,i),!d&&u(!1),k.preventDefault())},E=r||(s==null?void 0:s.path)||"/",O=i?{...Hl(i)?{rel:"noopener",target:"_blank",href:i,onClick:()=>!d&&u(!1)}:{href:i,onClick:w}}:{to:E,onClick:()=>{f([]),c(k=>[...k,{title:e,to:E}])}};return y.jsxs(v,{"data-testid":"qikbar-item",className:"qikbar-item",...O,onClick:a||(O==null?void 0:O.onClick),children:[y.jsxs("li",{children:[t&&y.jsx(Bl,{iconName:t}),y.jsxs("div",{children:[y.jsx("p",{className:"qikbar-item-title",children:e}),y.jsx("p",{className:"qikbar-item-description",children:n})]})]}),o&&y.jsx("p",{className:"qikbar-item-type",children:o})]})}function wr({placeholder:t}){const{setPlaceholder:e}=M.useContext(rt);return M.useEffect(()=>{e(t)},[e,t]),null}function Hi({fields:t}){return y.jsx("div",{className:"qikbar-details-wrapper",children:y.jsx("div",{className:"qikbar-details",children:t.map(({label:e,value:r,html:n},i)=>y.jsxs("div",{className:"qikbar-field",children:[!n&&e&&y.jsxs("span",{className:"qikbar-field-label",children:[e,":"]}),n?y.jsx("p",{dangerouslySetInnerHTML:{__html:r},className:"qikbar-field-value"}):y.jsx("p",{className:"qikbar-field-value",children:r})]},i))})})}function Qi({categories:t,placeholderText:e}){var c;const{activeIndex:r,search:n,setActions:i,navigateTo:s}=M.useContext(rt),a=t.map(f=>({...f,children:f.commands.filter(d=>d.title.toLowerCase().includes(n.toLowerCase()))})).filter(f=>f.children.length>0),o=a.reduce((f,d)=>[...f,...d.children],[])[r],u=o==null?void 0:o.actions;return o==null||o.fields,M.useEffect(()=>{i(o&&u?u:[])},[o,n,r]),a.length===0?y.jsxs(er,{children:[y.jsx(wr,{placeholder:e}),y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})]}):y.jsxs(y.Fragment,{children:[y.jsx(wr,{placeholder:e}),y.jsxs(er,{children:[y.jsx(Ui,{children:a.map(f=>f.children?y.jsx($i,{item:f},f.name):y.jsx(cn,{item:f},f.id))}),o&&((c=o==null?void 0:o.details)==null?void 0:c.length)>0&&y.jsx(Hi,{fields:o.details})]})]})}class tr{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const rr=typeof window>"u"||"Deno"in window;function De(){}function Ql(t,e){return typeof t=="function"?t(e):t}function dn(t){return typeof t=="number"&&t>=0&&t!==1/0}function zi(t,e){return Math.max(t+(e||0)-Date.now(),0)}function nr(t,e,r){return Cr(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function nt(t,e,r){return Cr(t)?[{...e,queryKey:t},r]:[t||{},e]}function Wi(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:l}=t;if(Cr(a)){if(n){if(e.queryHash!==hn(a,e.options))return!1}else if(!Dt(e.queryKey,a))return!1}if(r!=="all"){const o=e.isActive();if(r==="active"&&!o||r==="inactive"&&o)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function Ki(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(Cr(s)){if(!e.options.mutationKey)return!1;if(r){if(mt(e.options.mutationKey)!==mt(s))return!1}else if(!Dt(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function hn(t,e){return((e==null?void 0:e.queryKeyHashFn)||mt)(t)}function mt(t){return JSON.stringify(t,(e,r)=>fn(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Dt(t,e){return Yi(t,e)}function Yi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!Yi(t[r],e[r])):!1}function Gi(t,e){if(t===e)return t;const r=Ji(t)&&Ji(e);if(r||fn(t)&&fn(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,a=r?[]:{};let l=0;for(let o=0;o<s;o++){const u=r?o:i[o];a[u]=Gi(t[u],e[u]),a[u]===t[u]&&l++}return n===s&&l===n?t:a}return e}function Zi(t,e){if(t&&!e||e&&!t)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Ji(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function fn(t){if(!Xi(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!Xi(r)||!r.hasOwnProperty("isPrototypeOf"))}function Xi(t){return Object.prototype.toString.call(t)==="[object Object]"}function Cr(t){return Array.isArray(t)}function es(t){return new Promise(e=>{setTimeout(e,t)})}function ts(t){es(0).then(t)}function zl(){if(typeof AbortController=="function")return new AbortController}function pn(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Gi(t,e):e}class Wl extends tr{constructor(){super(),this.setup=e=>{if(!rr&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Er=new Wl;class Kl extends tr{constructor(){super(),this.setup=e=>{if(!rr&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Sr=new Kl;function Yl(t){return Math.min(1e3*2**t,3e4)}function Rr(t){return(t??"online")==="online"?Sr.isOnline():!0}class rs{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function xr(t){return t instanceof rs}function ns(t){let e=!1,r=0,n=!1,i,s,a;const l=new Promise((E,O)=>{s=E,a=O}),o=E=>{n||(m(new rs(E)),t.abort==null||t.abort())},u=()=>{e=!0},c=()=>{e=!1},f=()=>!Er.isFocused()||t.networkMode!=="always"&&!Sr.isOnline(),d=E=>{n||(n=!0,t.onSuccess==null||t.onSuccess(E),i==null||i(),s(E))},m=E=>{n||(n=!0,t.onError==null||t.onError(E),i==null||i(),a(E))},v=()=>new Promise(E=>{i=O=>{if(n||!f())return E(O)},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),w=()=>{if(n)return;let E;try{E=t.fn()}catch(O){E=Promise.reject(O)}Promise.resolve(E).then(d).catch(O=>{var k,C;if(n)return;const S=(k=t.retry)!=null?k:3,A=(C=t.retryDelay)!=null?C:Yl,_=typeof A=="function"?A(r,O):A,F=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,O);if(e||!F){m(O);return}r++,t.onFail==null||t.onFail(r,O),es(_).then(()=>{if(f())return v()}).then(()=>{e?m(O):w()})})};return Rr(t.networkMode)?w():v().then(w),{promise:l,cancel:o,continue:()=>{i==null||i()},cancelRetry:u,continueRetry:c}}const mn=console;function Gl(){let t=[],e=0,r=c=>{c()},n=c=>{c()};const i=c=>{let f;e++;try{f=c()}finally{e--,e||l()}return f},s=c=>{e?t.push(c):ts(()=>{r(c)})},a=c=>(...f)=>{s(()=>{c(...f)})},l=()=>{const c=t;t=[],c.length&&ts(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:a,schedule:s,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c}}}const ue=Gl();class is{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dn(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(rr?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Zl extends is{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||mn,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Jl(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=pn(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(De).catch(De):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!zi(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(v=>v.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||process.env.NODE_ENV!=="production"&&this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const a=zl(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};o(l);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn"),c={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(o(c),(n=this.options.behavior)==null||n.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=c.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta})}const d=m=>{if(xr(m)&&m.silent||this.dispatch({type:"error",error:m}),!xr(m)){var v,w;(v=(w=this.cache.config).onError)==null||v.call(w,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=ns({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var v,w;if(typeof m>"u"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),d(new Error("undefined"));return}this.setData(m),(v=(w=this.cache.config).onSuccess)==null||v.call(w,m,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(m,v)=>{this.dispatch({type:"failed",failureCount:m,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:Rr(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return xr(a)&&a.revert&&this.revertState?{...this.revertState}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),ue.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function Jl(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Xl extends tr{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,a=(i=r.queryHash)!=null?i:hn(s,r);let l=this.get(a);return l||(l=new Zl({cache:this,logger:e.getLogger(),queryKey:s,queryHash:a,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(l)),l}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){ue.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=nt(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>Wi(n,i))}findAll(e,r){const[n]=nt(e,r);return Object.keys(n).length>0?this.queries.filter(i=>Wi(n,i)):this.queries}notify(e){ue.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){ue.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){ue.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class eu extends is{constructor(e){super(),this.options={...e.defaultOptions,...e.options},this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||mn,this.observers=[],this.state=e.state||tu(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const e=()=>{var C;return this.retryer=ns({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(S,A)=>{this.dispatch({type:"failed",failureCount:S,error:A})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,a,l,o;if(!r){var u,c,f,d;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(c=this.mutationCache.config).onMutate)==null?void 0:u.call(c,this.state.variables,this));const S=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,this.state.variables));S!==this.state.context&&this.dispatch({type:"loading",context:S,variables:this.state.variables})}const C=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,C,this.state.variables,this.state.context,this)),await((s=(a=this.options).onSuccess)==null?void 0:s.call(a,C,this.state.variables,this.state.context)),await((l=(o=this.options).onSettled)==null?void 0:l.call(o,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var m,v,w,E,O,k;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}finally{this.dispatch({type:"error",error:C})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Rr(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),ue.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function tu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ru extends tr{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new eu({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){ue.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>Ki(e,r))}findAll(e){return this.mutations.filter(r=>Ki(e,r))}notify(e){ue.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.mutations.filter(r=>r.state.isPaused);return ue.batch(()=>e.reduce((r,n)=>r.then(()=>n.continue().catch(De)),Promise.resolve()))}}function nu(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,a;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)||[];let v=m,w=!1;const E=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>{var F;if((F=t.signal)!=null&&F.aborted)w=!0;else{var j;(j=t.signal)==null||j.addEventListener("abort",()=>{w=!0})}return t.signal}})},O=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),k=(_,F,j,q)=>(v=q?[F,...v]:[...v,F],q?[j,..._]:[..._,j]),C=(_,F,j,q)=>{if(w)return Promise.reject("Cancelled");if(typeof j>"u"&&!F&&_.length)return Promise.resolve(_);const te={queryKey:t.queryKey,pageParam:j,meta:t.options.meta};E(te);const Q=O(te);return Promise.resolve(Q).then(ne=>k(_,j,ne,q))};let S;if(!d.length)S=C([]);else if(c){const _=typeof u<"u",F=_?u:ss(t.options,d);S=C(d,_,F)}else if(f){const _=typeof u<"u",F=_?u:iu(t.options,d);S=C(d,_,F,!0)}else{v=[];const _=typeof t.options.getNextPageParam>"u";S=(l&&d[0]?l(d[0],0,d):!0)?C([],_,m[0]):Promise.resolve(k([],m[0],d[0]));for(let j=1;j<d.length;j++)S=S.then(q=>{if(l&&d[j]?l(d[j],j,d):!0){const Q=_?m[j]:ss(t.options,q);return C(q,_,Q)}return Promise.resolve(k(q,m[j],d[j]))})}return S.then(_=>({pages:_,pageParams:v}))}}}}function ss(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function iu(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}class su{constructor(e={}){this.queryCache=e.queryCache||new Xl,this.mutationCache=e.mutationCache||new ru,this.logger=e.logger||mn,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Er.subscribe(()=>{Er.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Sr.subscribe(()=>{Sr.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=nt(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=nr(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,a=Ql(r,s);if(typeof a>"u")return;const l=nr(e),o=this.defaultQueryOptions(l);return this.queryCache.build(this,o).setData(a,{...n,manual:!0})}setQueriesData(e,r,n){return ue.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=nt(e,r),i=this.queryCache;ue.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=nt(e,r,n),a=this.queryCache,l={type:"active",...i};return ue.batch(()=>(a.findAll(i).forEach(o=>{o.reset()}),this.refetchQueries(l,s)))}cancelQueries(e,r,n){const[i,s={}]=nt(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const a=ue.batch(()=>this.queryCache.findAll(i).map(l=>l.cancel(s)));return Promise.all(a).then(De).catch(De)}invalidateQueries(e,r,n){const[i,s]=nt(e,r,n);return ue.batch(()=>{var a,l;if(this.queryCache.findAll(i).forEach(u=>{u.invalidate()}),i.refetchType==="none")return Promise.resolve();const o={...i,type:(a=(l=i.refetchType)!=null?l:i.type)!=null?a:"active"};return this.refetchQueries(o,s)})}refetchQueries(e,r,n){const[i,s]=nt(e,r,n),a=ue.batch(()=>this.queryCache.findAll(i).filter(o=>!o.isDisabled()).map(o=>{var u;return o.fetch(void 0,{...s,cancelRefetch:(u=s==null?void 0:s.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let l=Promise.all(a).then(De);return s!=null&&s.throwOnError||(l=l.catch(De)),l}fetchQuery(e,r,n){const i=nr(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const a=this.queryCache.build(this,s);return a.isStaleByTime(s.staleTime)?a.fetch(s):Promise.resolve(a.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(De).catch(De)}fetchInfiniteQuery(e,r,n){const i=nr(e,r,n);return i.behavior=nu(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(De).catch(De)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>mt(e)===mt(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>Dt(e,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>Dt(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}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>mt(e)===mt(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>Dt(e,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>Dt(e,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=hn(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class au extends tr{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),as(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return gn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),process.env.NODE_ENV!=="production"&&typeof(e==null?void 0:e.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),Zi(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&os(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(De)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),rr||this.currentResult.isStale||!dn(this.options.staleTime))return;const r=zi(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(rr||this.options.enabled===!1||!dn(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Er.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,o=e!==n,u=o?e.state:this.currentQueryInitialState,c=o?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:d,error:m,errorUpdatedAt:v,fetchStatus:w,status:E}=f,O=!1,k=!1,C;if(r._optimisticResults){const j=this.hasListeners(),q=!j&&as(e,r),te=j&&os(e,n,r,i);(q||te)&&(w=Rr(e.options.networkMode)?"fetching":"paused",d||(E="loading")),r._optimisticResults==="isRestoring"&&(w="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&c!=null&&c.isSuccess&&E!=="error")C=c.data,d=c.dataUpdatedAt,E=c.status,O=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(a==null?void 0:a.data)&&r.select===this.selectFn)C=this.selectResult;else try{this.selectFn=r.select,C=r.select(f.data),C=pn(s==null?void 0:s.data,C,r),this.selectResult=C,this.selectError=null}catch(j){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(j),this.selectError=j}else C=f.data;if(typeof r.placeholderData<"u"&&typeof C>"u"&&E==="loading"){let j;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData))j=s.data;else if(j=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof j<"u")try{j=r.select(j),this.selectError=null}catch(q){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(q),this.selectError=q}typeof j<"u"&&(E="success",C=pn(s==null?void 0:s.data,j,r),k=!0)}this.selectError&&(m=this.selectError,C=this.selectResult,v=Date.now(),E="error");const S=w==="fetching",A=E==="loading",_=E==="error";return{status:E,fetchStatus:w,isLoading:A,isSuccess:E==="success",isError:_,isInitialLoading:A&&S,data:C,dataUpdatedAt:d,error:m,errorUpdatedAt:v,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!A,isLoadingError:_&&f.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:k,isPreviousData:O,isRefetchError:_&&f.dataUpdatedAt!==0,isStale:yn(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Zi(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(o=>{const u=o;return this.currentResult[u]!==r[u]&&l.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!xr(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){ue.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var a,l,o,u;(a=(l=this.options).onError)==null||a.call(l,this.currentResult.error),(o=(u=this.options).onSettled)==null||o.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(c=>{c(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ou(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function as(t,e){return ou(t,e)||t.state.dataUpdatedAt>0&&gn(t,e,e.refetchOnMount)}function gn(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&yn(t,e)}return!1}function os(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&yn(t,r)}function yn(t,e){return t.isStaleByTime(e.staleTime)}var lu=Zr();const uu=lu.useSyncExternalStore,ls=p.createContext(void 0),us=p.createContext(!1);function cs(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ls),window.ReactQueryClientContext):ls)}const cu=({context:t}={})=>{const e=p.useContext(cs(t,p.useContext(us)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ds=({client:t,children:e,context:r,contextSharing:n=!1})=>{p.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),process.env.NODE_ENV!=="production"&&n&&t.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=cs(r,n);return p.createElement(us.Provider,{value:!r&&n},p.createElement(i.Provider,{value:t},e))},hs=p.createContext(!1),du=()=>p.useContext(hs);hs.Provider;function hu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const fu=p.createContext(hu()),pu=()=>p.useContext(fu);function mu(t,e){return typeof t=="function"?t(...e):!!t}const gu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},yu=t=>{p.useEffect(()=>{t.clearReset()},[t])},vu=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&mu(r,[t.error,n]),bu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},wu=(t,e)=>t.isLoading&&t.isFetching&&!e,Cu=(t,e,r)=>(t==null?void 0:t.suspense)&&wu(e,r),Eu=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function Su(t,e){const r=cu({context:t.context}),n=du(),i=pu(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=ue.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=ue.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=ue.batchCalls(s.onSettled)),bu(s),gu(s,i),yu(i);const[a]=p.useState(()=>new e(r,s)),l=a.getOptimisticResult(s);if(uu(p.useCallback(o=>n?()=>{}:a.subscribe(ue.batchCalls(o)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),Cu(s,l,n))throw Eu(s,a,i);if(vu({result:l,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw l.error;return s.notifyOnChangeProps?l:a.trackResult(l)}function Ru(t,e,r){const n=nr(t,e,r);return Su(n,au)}function xu(t,e){const[r,n]=M.useState(t);return M.useEffect(()=>{const i=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(i)}},[t,e]),r}var Ou="Expected a function",fs="__lodash_hash_undefined__",ps=1/0,_u="[object Function]",Tu="[object GeneratorFunction]",ku="[object Symbol]",Du=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lu=/^\w*$/,Pu=/^\./,ju=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fu=/[\\^$.*+?()[\]{}|]/g,Mu=/\\(\\)?/g,Nu=/^\[object .+?Constructor\]$/,Au=typeof cr=="object"&&cr&&cr.Object===Object&&cr,qu=typeof self=="object"&&self&&self.Object===Object&&self,vn=Au||qu||Function("return this")();function Iu(t,e){return t==null?void 0:t[e]}function Vu(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Uu=Array.prototype,$u=Function.prototype,ms=Object.prototype,bn=vn["__core-js_shared__"],gs=function(){var t=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ys=$u.toString,wn=ms.hasOwnProperty,vs=ms.toString,Bu=RegExp("^"+ys.call(wn).replace(Fu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bs=vn.Symbol,Hu=Uu.splice,Qu=Es(vn,"Map"),ir=Es(Object,"create"),ws=bs?bs.prototype:void 0,Cs=ws?ws.toString:void 0;function gt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function zu(){this.__data__=ir?ir(null):{}}function Wu(t){return this.has(t)&&delete this.__data__[t]}function Ku(t){var e=this.__data__;if(ir){var r=e[t];return r===fs?void 0:r}return wn.call(e,t)?e[t]:void 0}function Yu(t){var e=this.__data__;return ir?e[t]!==void 0:wn.call(e,t)}function Gu(t,e){var r=this.__data__;return r[t]=ir&&e===void 0?fs:e,this}gt.prototype.clear=zu,gt.prototype.delete=Wu,gt.prototype.get=Ku,gt.prototype.has=Yu,gt.prototype.set=Gu;function Lt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Zu(){this.__data__=[]}function Ju(t){var e=this.__data__,r=Or(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Hu.call(e,r,1),!0}function Xu(t){var e=this.__data__,r=Or(e,t);return r<0?void 0:e[r][1]}function ec(t){return Or(this.__data__,t)>-1}function tc(t,e){var r=this.__data__,n=Or(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Lt.prototype.clear=Zu,Lt.prototype.delete=Ju,Lt.prototype.get=Xu,Lt.prototype.has=ec,Lt.prototype.set=tc;function yt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rc(){this.__data__={hash:new gt,map:new(Qu||Lt),string:new gt}}function nc(t){return _r(this,t).delete(t)}function ic(t){return _r(this,t).get(t)}function sc(t){return _r(this,t).has(t)}function ac(t,e){return _r(this,t).set(t,e),this}yt.prototype.clear=rc,yt.prototype.delete=nc,yt.prototype.get=ic,yt.prototype.has=sc,yt.prototype.set=ac;function Or(t,e){for(var r=t.length;r--;)if(yc(t[r][0],e))return r;return-1}function oc(t,e){e=dc(e,t)?[e]:cc(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[mc(e[r++])];return r&&r==n?t:void 0}function lc(t){if(!Rs(t)||fc(t))return!1;var e=vc(t)||Vu(t)?Bu:Nu;return e.test(gc(t))}function uc(t){if(typeof t=="string")return t;if(En(t))return Cs?Cs.call(t):"";var e=t+"";return e=="0"&&1/t==-ps?"-0":e}function cc(t){return Ss(t)?t:pc(t)}function _r(t,e){var r=t.__data__;return hc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Es(t,e){var r=Iu(t,e);return lc(r)?r:void 0}function dc(t,e){if(Ss(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||En(t)?!0:Lu.test(t)||!Du.test(t)||e!=null&&t in Object(e)}function hc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function fc(t){return!!gs&&gs in t}var pc=Cn(function(t){t=wc(t);var e=[];return Pu.test(t)&&e.push(""),t.replace(ju,function(r,n,i,s){e.push(i?s.replace(Mu,"$1"):n||r)}),e});function mc(t){if(typeof t=="string"||En(t))return t;var e=t+"";return e=="0"&&1/t==-ps?"-0":e}function gc(t){if(t!=null){try{return ys.call(t)}catch{}try{return t+""}catch{}}return""}function Cn(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Ou);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a),a};return r.cache=new(Cn.Cache||yt),r}Cn.Cache=yt;function yc(t,e){return t===e||t!==t&&e!==e}var Ss=Array.isArray;function vc(t){var e=Rs(t)?vs.call(t):"";return e==_u||e==Tu}function Rs(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function bc(t){return!!t&&typeof t=="object"}function En(t){return typeof t=="symbol"||bc(t)&&vs.call(t)==ku}function wc(t){return t==null?"":uc(t)}function Cc(t,e,r){var n=t==null?void 0:oc(t,e);return n===void 0?r:n}var Ec=Cc;class je{constructor(e,r,n,i,s){this.kind=e,this.input=r,this.begin=n,this.end=i,this.file=s}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,r]=[1,1];for(let n=0;n<this.begin;n++)this.input[n]===`
|
|
89
|
+
*/function pt(){return pt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pt.apply(this,arguments)}function on(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}const yr="get",ln="application/x-www-form-urlencoded";function vr(t){return t!=null&&typeof t.tagName=="string"}function zo(t){return vr(t)&&t.tagName.toLowerCase()==="button"}function Wo(t){return vr(t)&&t.tagName.toLowerCase()==="form"}function Ko(t){return vr(t)&&t.tagName.toLowerCase()==="input"}function Yo(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Go(t,e){return t.button===0&&(!e||e==="_self")&&!Yo(t)}function Zo(t,e,r){let n,i,s,a;if(Wo(t)){let c=r.submissionTrigger;n=r.method||t.getAttribute("method")||yr,i=r.action||t.getAttribute("action")||e,s=r.encType||t.getAttribute("enctype")||ln,a=new FormData(t),c&&c.name&&a.append(c.name,c.value)}else if(zo(t)||Ko(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');n=r.method||t.getAttribute("formmethod")||c.getAttribute("method")||yr,i=r.action||t.getAttribute("formaction")||c.getAttribute("action")||e,s=r.encType||t.getAttribute("formenctype")||c.getAttribute("enctype")||ln,a=new FormData(c),t.name&&a.append(t.name,t.value)}else{if(vr(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(n=r.method||yr,i=r.action||e,s=r.encType||ln,t instanceof FormData)a=t;else if(a=new FormData,t instanceof URLSearchParams)for(let[c,f]of t)a.append(c,f);else if(t!=null)for(let c of Object.keys(t))a.append(c,t[c])}let{protocol:l,host:o}=window.location;return{url:new URL(i,l+"//"+o),method:n.toLowerCase(),encType:s,formData:a}}const Jo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Xo=["aria-current","caseSensitive","className","end","style","to","children"],el=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];process.env.NODE_ENV;const tl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",br=p.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:a,state:l,target:o,to:u,preventScrollReset:c}=e,f=on(e,Jo),d=typeof u=="string"?u:qe(u),m=/^[a-z+]+:\/\//i.test(d)||d.startsWith("//"),v=d,w=!1;if(tl&&m){let C=new URL(window.location.href),S=d.startsWith("//")?new URL(C.protocol+d):new URL(d);S.origin===C.origin?v=S.pathname+S.search+S.hash:w=!0}let E=ko(v,{relative:i}),O=al(v,{replace:a,state:l,target:o,preventScrollReset:c,relative:i});function k(C){n&&n(C),C.defaultPrevented||O(C)}return p.createElement("a",pt({},f,{href:m?d:E,onClick:w||s?n:k,ref:r,target:o}))});process.env.NODE_ENV!=="production"&&(br.displayName="Link");const rl=p.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:a=!1,style:l,to:o,children:u}=e,c=on(e,Xo),f=mr(o,{relative:c.relative}),d=ft(),m=p.useContext(Zt),{navigator:v}=p.useContext(ht),w=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,E=d.pathname,O=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(E=E.toLowerCase(),O=O?O.toLowerCase():null,w=w.toLowerCase());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)==="/"),S=k?n:void 0,A;typeof s=="function"?A=s({isActive:k,isPending:C}):A=[s,k?"active":null,C?"pending":null].filter(Boolean).join(" ");let _=typeof l=="function"?l({isActive:k,isPending:C}):l;return p.createElement(br,pt({},c,{"aria-current":S,className:A,ref:r,style:_,to:o}),typeof u=="function"?u({isActive:k,isPending:C}):u)});process.env.NODE_ENV!=="production"&&(rl.displayName="NavLink");const nl=p.forwardRef((t,e)=>p.createElement(Ai,pt({},t,{ref:e})));process.env.NODE_ENV!=="production"&&(nl.displayName="Form");const Ai=p.forwardRef((t,e)=>{let{reloadDocument:r,replace:n,method:i=yr,action:s,onSubmit:a,fetcherKey:l,routeId:o,relative:u,preventScrollReset:c}=t,f=on(t,el),d=ol(l,o),m=i.toLowerCase()==="get"?"get":"post",v=Ii(s,{relative:u}),w=E=>{if(a&&a(E),E.defaultPrevented)return;E.preventDefault();let O=E.nativeEvent.submitter,k=(O==null?void 0:O.getAttribute("formmethod"))||i;d(O||E.currentTarget,{method:k,replace:n,relative:u,preventScrollReset:c})};return p.createElement("form",pt({ref:e,method:m,action:v,onSubmit:r?a:w},f))});process.env.NODE_ENV!=="production"&&(Ai.displayName="FormImpl"),process.env.NODE_ENV;var un;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(un||(un={}));var qi;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(qi||(qi={}));function il(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function sl(t){let e=p.useContext(Gt);return e||(process.env.NODE_ENV!=="production"?P(!1,il(t)):P(!1)),e}function al(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a}=e===void 0?{}:e,l=Ti(),o=ft(),u=mr(t,{relative:a});return p.useCallback(c=>{if(Go(c,r)){c.preventDefault();let f=n!==void 0?n:qe(o)===qe(u);l(t,{replace:f,state:i,preventScrollReset:s,relative:a})}},[o,l,u,n,i,r,t,s,a])}function ol(t,e){let{router:r}=sl(un.UseSubmitImpl),n=Ii();return p.useCallback(function(i,s){if(s===void 0&&(s={}),typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:a,encType:l,formData:o,url:u}=Zo(i,n,s),c=u.pathname+u.search,f={replace:s.replace,preventScrollReset:s.preventScrollReset,formData:o,formMethod:a,formEncType:l};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)},[n,r,t,e])}function Ii(t,e){let{relative:r}=e===void 0?{}:e,{basename:n}=p.useContext(ht),i=p.useContext($e);i||(process.env.NODE_ENV!=="production"?P(!1,"useFormAction must be used inside a RouteContext"):P(!1));let[s]=i.matches.slice(-1),a=pt({},mr(t||".",{relative:r})),l=ft();if(t==null&&(a.search=l.search,a.hash=l.hash,s.route.index)){let o=new URLSearchParams(a.search);o.delete("index"),a.search=o.toString()?"?"+o.toString():""}return(!t||t===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:Ue([n,a.pathname])),qe(a)}function ll({showAdminEdit:t,setShowAdminEdit:e,enabledAdminEdit:r}){const{actions:n,showActions:i,setShowActions:s,navigateTo:a}=M.useContext(rt),l=M.useRef();return M.useEffect(()=>{const o=u=>{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()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[i,n]),M.useEffect(()=>{var o,u;i&&((u=(o=l==null?void 0:l.current)==null?void 0:o.firstChild)==null||u.focus())},[i]),y.jsxs("div",{className:"qikbar-command-footer",children:[y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})}),r&&y.jsx("button",{className:"qikbar-admin-edit",onClick:()=>e(o=>!o),children:"Edit Qikbar"}),n.length>0&&y.jsxs("div",{className:"qikbar-actions-wrapper",children:[i&&y.jsx("div",{className:"qikbar-actions-panel",children:y.jsx("ul",{className:"qikbar-actions-list",ref:l,children:n.map(o=>y.jsx("button",{onClick:()=>a(o.href,o.title,o.target),className:"qikbar-action",children:o.title},o.title))})}),y.jsxs("button",{onClick:()=>s(o=>!o),className:"qikbar-actions",children:[y.jsx("span",{className:"qikbar-actions-action",children:"Actions"}),y.jsxs("span",{className:"qikbar-keys",children:[y.jsx("kbd",{className:"qikbar-kbd",children:"Cmd"})," +"," ",y.jsx("kbd",{className:"qikbar-kbd",children:"Enter"})]})]})]})]})}function ul(){const{search:t,setSearch:e,searchRef:r,placeholder:n}=M.useContext(rt);return y.jsx("input",{"data-testid":"qikbar-search",placeholder:n,className:"qikbar-search",ref:r,autoFocus:!0,value:t,onChange:i=>e(i.target.value),name:"search",type:"text"})}function cl({crumbs:t}){const{setCrumbs:e}=M.useContext(rt);return t.length===0?null:y.jsx("ul",{className:"qikbar-crumbs",children:t.map((r,n)=>{const i=t.length-1===n;return y.jsx("li",{className:"qikbar-crumb",children:y.jsxs(br,{to:r.to,onClick:()=>e(s=>i?s:s.slice(0,n+1)),children:[r.title," ",!i&&y.jsx("span",{className:"qikbar-crumb-divider",children:">"})]})},n)})})}const rt=M.createContext(null);function Vi({demo:t=!1,wrapperClass:e="qikbar-command-wrapper",defaultOpen:r=!1}){const n=M.useRef(null),i=ft(),s=Ti(),[a,l]=M.useState(!1),[o,u]=M.useState([]),[c,f]=M.useState([]),[d,m]=M.useState(!1),[v,w]=M.useState(r),[E,O]=M.useState(""),[k,C]=M.useState("Search for resources"),S=M.useRef(),[A,_]=M.useState(0),F=Re();if(M.useEffect(()=>{var Q;v&&((Q=S.current)==null||Q.focus(),_(0),t||(document.body.style.overflow="hidden")),v||(s(""),m(!1),u([]),f([]),document.body.style.overflow="unset")},[v,i.pathname]),M.useEffect(()=>{const Q=N=>{var ne,de,we,Ce,re,Me,ot;if(v&&["Space","ArrowUp","ArrowDown"].indexOf(N.key)>-1&&N.preventDefault(),N.metaKey&&N.key==="Enter"){N.preventDefault(),N.stopPropagation();return}if(v&&N.key==="ArrowDown"&&N.target.localName==="input"&&((ne=n.current)!=null&&ne.getElementsByClassName("qikbar-item")[1])&&(_(1),n.current.getElementsByClassName("qikbar-item")[1].focus()),v&&N.target.localName==="input"&&E===""&&N.key==="Backspace"&&(s(-1),f(se=>se.slice(0,-1))),v&&N.key==="Escape"&&!t&&(O(""),s(""),w(!1),u([])),v&&N.key==="Enter"&&N.target.localName==="input"&&((de=n.current)!=null&&de.getElementsByClassName("qikbar-item")[0])&&(n.current.getElementsByClassName("qikbar-item")[0].click(),O("")),v&&N.key==="ArrowDown"&&N.target.getAttribute("data-testid")==="qikbar-item"&&N.target.nextElementSibling){let se;N.target.nextElementSibling.className==="qikbar-category-wrapper"?se=N.target.nextElementSibling.nextElementSibling:se=N.target.nextElementSibling;const xe=Array.prototype.indexOf.call((Ce=(we=N.target)==null?void 0:we.parentNode)==null?void 0:Ce.getElementsByClassName("qikbar-item"),se);_(xe),se==null||se.focus()}if(v&&N.key==="ArrowUp"&&N.target.getAttribute("data-testid")==="qikbar-item"&&N.target.previousElementSibling){let se;if(N.target.previousElementSibling.className==="qikbar-category-wrapper"?se=N.target.previousElementSibling.previousElementSibling:se=N.target.previousElementSibling,!se)return;const xe=Array.prototype.indexOf.call((Me=(re=N.target)==null?void 0:re.parentNode)==null?void 0:Me.getElementsByClassName("qikbar-item"),se);_(xe),se==null||se.focus()}v&&N.key!=="ArrowUp"&&N.key!=="ArrowDown"&&N.key!=="Enter"&&!N.metaKey&&!t&&(_(0),(ot=S.current)==null||ot.focus()),N.metaKey&&N.key==="k"&&!t&&(v&&(s(""),O(""),_(0),u([]),f([])),w(se=>!se)),v&&N.key==="Enter"&&O("")};return document.addEventListener("keydown",Q),()=>{document.removeEventListener("keydown",Q)}},[v,E]),!v)return null;const q=!!new URLSearchParams(window.location.search).get("qikbarAdmin"),te="https://app.qikbar.com";return y.jsxs("div",{className:`${e} ${a&&"qikbar-admin-offset"}`,"data-testid":"command-bar-container",children:[q&&y.jsx("div",{className:a?"qikbar-embedded":"qickbar-embedded-hidden",children:y.jsx("iframe",{src:`${te}/sites/${F.id}/edit/?embedded=true`})}),y.jsx(rt.Provider,{value:{demo:t,search:E,searchRef:S,setIsOpen:w,setSearch:O,activeIndex:A,placeholder:k,setPlaceholder:C,setActions:u,setCrumbs:f,crumbs:c,actions:o,showActions:d,setShowActions:m,navigateTo:(Q,N,ne="self")=>{var de,we;switch(m(!1),O(""),ne){case"self":_(0),s(Q),(de=S.current)==null||de.focus(),Q!==(i==null?void 0:i.pathname)&&u([]),n.current.getElementsByClassName("qikbar-list")[0].scrollTo(0,0),f(Ce=>[...Ce,{title:N,to:Q}]);break;case"internal":s(""),w(!1),f([]),u([]),F!=null&&F.router?(we=F==null?void 0:F.router)==null||we.call(F,Q):window.location=Q;break;case"external":s(""),w(!1),f([]),u([]),window.open(Q,"_blank");break;default:s(Q),f(Ce=>[...Ce,{title:N,to:Q}])}}},children:y.jsxs("div",{className:"qikbar-command-bar",ref:n,children:[y.jsxs("div",{className:"qikbar-search-wrapper",children:[y.jsx(cl,{crumbs:c}),y.jsx(ul,{})]}),y.jsx("div",{className:"qikbar-command-content",children:y.jsx($o,{})}),y.jsx(ll,{enabledAdminEdit:q,showAdminEdit:a,setShowAdminEdit:l})]})})]})}function dl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0M3.124 7.5A8.969 8.969 0 015.292 3m13.416 0a8.969 8.969 0 012.168 4.5"}))}const hl=p.forwardRef(dl);function fl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"}))}const pl=p.forwardRef(fl);function ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"}))}const gl=p.forwardRef(ml);function yl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"}))}const vl=p.forwardRef(yl);function bl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"}))}const wl=p.forwardRef(bl);function Cl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"}))}const El=p.forwardRef(Cl);function Sl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 110-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 01-1.44-4.282m3.102.069a18.03 18.03 0 01-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 018.835 2.535M10.34 6.66a23.847 23.847 0 008.835-2.535m0 0A23.74 23.74 0 0018.795 3m.38 1.125a23.91 23.91 0 011.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 001.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 010 3.46"}))}const Rl=p.forwardRef(Sl);function xl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const Ol=p.forwardRef(xl);function _l({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"}))}const Tl=p.forwardRef(_l);function kl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const Dl=p.forwardRef(kl);function Ll({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"}))}const Pl=p.forwardRef(Ll);function jl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 019 14.437V9.564z"}))}const Fl=p.forwardRef(jl);function Ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"}))}const Nl=p.forwardRef(Ml);function Al({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"}))}const ql=p.forwardRef(Al);function Il({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"}))}const Vl=p.forwardRef(Il);function Ul({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75a4.5 4.5 0 01-4.884 4.484c-1.076-.091-2.264.071-2.95.904l-7.152 8.684a2.548 2.548 0 11-3.586-3.586l8.684-7.152c.833-.686.995-1.874.904-2.95a4.5 4.5 0 016.336-4.486l-3.276 3.276a3.004 3.004 0 002.25 2.25l3.276-3.276c.256.565.398 1.192.398 1.852z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.867 19.125h.008v.008h-.008v-.008z"}))}const $l=p.forwardRef(Ul);function Bl({iconName:t}){switch(t){case"CalendarIcon":return y.jsx(gl,{});case"CalendarDaysIcon":return y.jsx(pl,{});case"FireIcon":return y.jsx(vl,{});case"MegaphoneIcon":return y.jsx(Rl,{});case"WrenchIcon":return y.jsx($l,{});case"WrenchScrewdriverIcon":return y.jsx(Vl,{});case"ShareIcon":return y.jsx(Ol,{});case"ShoppingBagIcon":return y.jsx(Tl,{});case"ShoppingCartIcon":return y.jsx(Dl,{});case"StarIcon":return y.jsx(Pl,{});case"StopCircleIcon":return y.jsx(Fl,{});case"StopIcon":return y.jsx(Nl,{});case"LockClosedIcon":return y.jsx(El,{});case"LinkIcon":return y.jsx(wl,{});case"UserGroupIcon":return y.jsx(ql,{});case"BellAlertIcon":return y.jsx(hl,{});default:return null}}function er({children:t}){return y.jsx("div",{className:"qikbar-details-container",children:t})}function Ui({children:t}){return y.jsx("ul",{className:"qikbar-list",children:t})}function $i({item:{name:t,children:e,Icon:r}}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"qikbar-category-wrapper",children:[r&&y.jsx(r,{}),y.jsx("p",{className:"qikbar-category",children:t})]}),e.map(n=>n.children?y.jsx($i,{item:n},n.id):y.jsx(cn,{item:n},n.id))]})}var Bi=function(t){return t.indexOf("//")===0&&(t=location.protocol+t),t.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]},Hl=function(t){if(t)return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&Bi(location.href)!==Bi(t)};function cn({item:{iconName:t,title:e,to:r,description:n,href:i,route:s,action:a,children:l,tag:o}}){const{setIsOpen:u,setCrumbs:c,setActions:f,demo:d}=M.useContext(rt),m=Re();if(l)return null;const v=i?"a":br,w=k=>{var C;m!=null&&m.router&&((C=m==null?void 0:m.router)==null||C.call(m,i),!d&&u(!1),k.preventDefault())},E=r||(s==null?void 0:s.path)||"/",O=i?{...Hl(i)?{rel:"noopener",target:"_blank",href:i,onClick:()=>!d&&u(!1)}:{href:i,onClick:w}}:{to:E,onClick:()=>{f([]),c(k=>[...k,{title:e,to:E}])}};return y.jsxs(v,{"data-testid":"qikbar-item",className:"qikbar-item",...O,onClick:a||(O==null?void 0:O.onClick),children:[y.jsxs("li",{children:[t&&y.jsx(Bl,{iconName:t}),y.jsxs("div",{children:[y.jsx("p",{className:"qikbar-item-title",children:e}),y.jsx("p",{className:"qikbar-item-description",children:n})]})]}),o&&y.jsx("p",{className:"qikbar-item-type",children:o})]})}function wr({placeholder:t}){const{setPlaceholder:e}=M.useContext(rt);return M.useEffect(()=>{e(t)},[e,t]),null}function Hi({fields:t}){return y.jsx("div",{className:"qikbar-details-wrapper",children:y.jsx("div",{className:"qikbar-details",children:t.map(({label:e,value:r,html:n},i)=>n?y.jsx("div",{className:"qikbar-field",dangerouslySetInnerHTML:{__html:r}},i):y.jsxs("div",{className:"qikbar-field",children:[e&&y.jsxs("span",{className:"qikbar-field-label",children:[e,":"]}),y.jsx("p",{className:"qikbar-field-value",children:r})]},i))})})}function Qi({categories:t,placeholderText:e}){var c;const{activeIndex:r,search:n,setActions:i,navigateTo:s}=M.useContext(rt),a=t.map(f=>({...f,children:f.commands.filter(d=>d.title.toLowerCase().includes(n.toLowerCase()))})).filter(f=>f.children.length>0),o=a.reduce((f,d)=>[...f,...d.children],[])[r],u=o==null?void 0:o.actions;return o==null||o.fields,M.useEffect(()=>{i(o&&u?u:[])},[o,n,r]),a.length===0?y.jsxs(er,{children:[y.jsx(wr,{placeholder:e}),y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})]}):y.jsxs(y.Fragment,{children:[y.jsx(wr,{placeholder:e}),y.jsxs(er,{children:[y.jsx(Ui,{children:a.map(f=>f.children?y.jsx($i,{item:f},f.name):y.jsx(cn,{item:f},f.id))}),o&&((c=o==null?void 0:o.details)==null?void 0:c.length)>0&&y.jsx(Hi,{fields:o.details})]})]})}class tr{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const rr=typeof window>"u"||"Deno"in window;function De(){}function Ql(t,e){return typeof t=="function"?t(e):t}function dn(t){return typeof t=="number"&&t>=0&&t!==1/0}function zi(t,e){return Math.max(t+(e||0)-Date.now(),0)}function nr(t,e,r){return Cr(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function nt(t,e,r){return Cr(t)?[{...e,queryKey:t},r]:[t||{},e]}function Wi(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:l}=t;if(Cr(a)){if(n){if(e.queryHash!==hn(a,e.options))return!1}else if(!Dt(e.queryKey,a))return!1}if(r!=="all"){const o=e.isActive();if(r==="active"&&!o||r==="inactive"&&o)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function Ki(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(Cr(s)){if(!e.options.mutationKey)return!1;if(r){if(mt(e.options.mutationKey)!==mt(s))return!1}else if(!Dt(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function hn(t,e){return((e==null?void 0:e.queryKeyHashFn)||mt)(t)}function mt(t){return JSON.stringify(t,(e,r)=>fn(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Dt(t,e){return Yi(t,e)}function Yi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!Yi(t[r],e[r])):!1}function Gi(t,e){if(t===e)return t;const r=Ji(t)&&Ji(e);if(r||fn(t)&&fn(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,a=r?[]:{};let l=0;for(let o=0;o<s;o++){const u=r?o:i[o];a[u]=Gi(t[u],e[u]),a[u]===t[u]&&l++}return n===s&&l===n?t:a}return e}function Zi(t,e){if(t&&!e||e&&!t)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Ji(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function fn(t){if(!Xi(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!Xi(r)||!r.hasOwnProperty("isPrototypeOf"))}function Xi(t){return Object.prototype.toString.call(t)==="[object Object]"}function Cr(t){return Array.isArray(t)}function es(t){return new Promise(e=>{setTimeout(e,t)})}function ts(t){es(0).then(t)}function zl(){if(typeof AbortController=="function")return new AbortController}function pn(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Gi(t,e):e}class Wl extends tr{constructor(){super(),this.setup=e=>{if(!rr&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Er=new Wl;class Kl extends tr{constructor(){super(),this.setup=e=>{if(!rr&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Sr=new Kl;function Yl(t){return Math.min(1e3*2**t,3e4)}function Rr(t){return(t??"online")==="online"?Sr.isOnline():!0}class rs{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function xr(t){return t instanceof rs}function ns(t){let e=!1,r=0,n=!1,i,s,a;const l=new Promise((E,O)=>{s=E,a=O}),o=E=>{n||(m(new rs(E)),t.abort==null||t.abort())},u=()=>{e=!0},c=()=>{e=!1},f=()=>!Er.isFocused()||t.networkMode!=="always"&&!Sr.isOnline(),d=E=>{n||(n=!0,t.onSuccess==null||t.onSuccess(E),i==null||i(),s(E))},m=E=>{n||(n=!0,t.onError==null||t.onError(E),i==null||i(),a(E))},v=()=>new Promise(E=>{i=O=>{if(n||!f())return E(O)},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),w=()=>{if(n)return;let E;try{E=t.fn()}catch(O){E=Promise.reject(O)}Promise.resolve(E).then(d).catch(O=>{var k,C;if(n)return;const S=(k=t.retry)!=null?k:3,A=(C=t.retryDelay)!=null?C:Yl,_=typeof A=="function"?A(r,O):A,F=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,O);if(e||!F){m(O);return}r++,t.onFail==null||t.onFail(r,O),es(_).then(()=>{if(f())return v()}).then(()=>{e?m(O):w()})})};return Rr(t.networkMode)?w():v().then(w),{promise:l,cancel:o,continue:()=>{i==null||i()},cancelRetry:u,continueRetry:c}}const mn=console;function Gl(){let t=[],e=0,r=c=>{c()},n=c=>{c()};const i=c=>{let f;e++;try{f=c()}finally{e--,e||l()}return f},s=c=>{e?t.push(c):ts(()=>{r(c)})},a=c=>(...f)=>{s(()=>{c(...f)})},l=()=>{const c=t;t=[],c.length&&ts(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:a,schedule:s,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c}}}const ue=Gl();class is{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dn(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(rr?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Zl extends is{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||mn,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Jl(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=pn(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(De).catch(De):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!zi(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(v=>v.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||process.env.NODE_ENV!=="production"&&this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const a=zl(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};o(l);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn"),c={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(o(c),(n=this.options.behavior)==null||n.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=c.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta})}const d=m=>{if(xr(m)&&m.silent||this.dispatch({type:"error",error:m}),!xr(m)){var v,w;(v=(w=this.cache.config).onError)==null||v.call(w,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=ns({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var v,w;if(typeof m>"u"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),d(new Error("undefined"));return}this.setData(m),(v=(w=this.cache.config).onSuccess)==null||v.call(w,m,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(m,v)=>{this.dispatch({type:"failed",failureCount:m,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:Rr(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return xr(a)&&a.revert&&this.revertState?{...this.revertState}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),ue.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function Jl(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Xl extends tr{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,a=(i=r.queryHash)!=null?i:hn(s,r);let l=this.get(a);return l||(l=new Zl({cache:this,logger:e.getLogger(),queryKey:s,queryHash:a,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(l)),l}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){ue.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=nt(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>Wi(n,i))}findAll(e,r){const[n]=nt(e,r);return Object.keys(n).length>0?this.queries.filter(i=>Wi(n,i)):this.queries}notify(e){ue.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){ue.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){ue.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class eu extends is{constructor(e){super(),this.options={...e.defaultOptions,...e.options},this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||mn,this.observers=[],this.state=e.state||tu(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const e=()=>{var C;return this.retryer=ns({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(S,A)=>{this.dispatch({type:"failed",failureCount:S,error:A})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,a,l,o;if(!r){var u,c,f,d;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(c=this.mutationCache.config).onMutate)==null?void 0:u.call(c,this.state.variables,this));const S=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,this.state.variables));S!==this.state.context&&this.dispatch({type:"loading",context:S,variables:this.state.variables})}const C=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,C,this.state.variables,this.state.context,this)),await((s=(a=this.options).onSuccess)==null?void 0:s.call(a,C,this.state.variables,this.state.context)),await((l=(o=this.options).onSettled)==null?void 0:l.call(o,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var m,v,w,E,O,k;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}finally{this.dispatch({type:"error",error:C})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Rr(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),ue.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function tu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ru extends tr{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new eu({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){ue.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>Ki(e,r))}findAll(e){return this.mutations.filter(r=>Ki(e,r))}notify(e){ue.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.mutations.filter(r=>r.state.isPaused);return ue.batch(()=>e.reduce((r,n)=>r.then(()=>n.continue().catch(De)),Promise.resolve()))}}function nu(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,a;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)||[];let v=m,w=!1;const E=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>{var F;if((F=t.signal)!=null&&F.aborted)w=!0;else{var j;(j=t.signal)==null||j.addEventListener("abort",()=>{w=!0})}return t.signal}})},O=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),k=(_,F,j,q)=>(v=q?[F,...v]:[...v,F],q?[j,..._]:[..._,j]),C=(_,F,j,q)=>{if(w)return Promise.reject("Cancelled");if(typeof j>"u"&&!F&&_.length)return Promise.resolve(_);const te={queryKey:t.queryKey,pageParam:j,meta:t.options.meta};E(te);const Q=O(te);return Promise.resolve(Q).then(ne=>k(_,j,ne,q))};let S;if(!d.length)S=C([]);else if(c){const _=typeof u<"u",F=_?u:ss(t.options,d);S=C(d,_,F)}else if(f){const _=typeof u<"u",F=_?u:iu(t.options,d);S=C(d,_,F,!0)}else{v=[];const _=typeof t.options.getNextPageParam>"u";S=(l&&d[0]?l(d[0],0,d):!0)?C([],_,m[0]):Promise.resolve(k([],m[0],d[0]));for(let j=1;j<d.length;j++)S=S.then(q=>{if(l&&d[j]?l(d[j],j,d):!0){const Q=_?m[j]:ss(t.options,q);return C(q,_,Q)}return Promise.resolve(k(q,m[j],d[j]))})}return S.then(_=>({pages:_,pageParams:v}))}}}}function ss(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function iu(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}class su{constructor(e={}){this.queryCache=e.queryCache||new Xl,this.mutationCache=e.mutationCache||new ru,this.logger=e.logger||mn,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Er.subscribe(()=>{Er.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Sr.subscribe(()=>{Sr.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=nt(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=nr(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,a=Ql(r,s);if(typeof a>"u")return;const l=nr(e),o=this.defaultQueryOptions(l);return this.queryCache.build(this,o).setData(a,{...n,manual:!0})}setQueriesData(e,r,n){return ue.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=nt(e,r),i=this.queryCache;ue.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=nt(e,r,n),a=this.queryCache,l={type:"active",...i};return ue.batch(()=>(a.findAll(i).forEach(o=>{o.reset()}),this.refetchQueries(l,s)))}cancelQueries(e,r,n){const[i,s={}]=nt(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const a=ue.batch(()=>this.queryCache.findAll(i).map(l=>l.cancel(s)));return Promise.all(a).then(De).catch(De)}invalidateQueries(e,r,n){const[i,s]=nt(e,r,n);return ue.batch(()=>{var a,l;if(this.queryCache.findAll(i).forEach(u=>{u.invalidate()}),i.refetchType==="none")return Promise.resolve();const o={...i,type:(a=(l=i.refetchType)!=null?l:i.type)!=null?a:"active"};return this.refetchQueries(o,s)})}refetchQueries(e,r,n){const[i,s]=nt(e,r,n),a=ue.batch(()=>this.queryCache.findAll(i).filter(o=>!o.isDisabled()).map(o=>{var u;return o.fetch(void 0,{...s,cancelRefetch:(u=s==null?void 0:s.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let l=Promise.all(a).then(De);return s!=null&&s.throwOnError||(l=l.catch(De)),l}fetchQuery(e,r,n){const i=nr(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const a=this.queryCache.build(this,s);return a.isStaleByTime(s.staleTime)?a.fetch(s):Promise.resolve(a.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(De).catch(De)}fetchInfiniteQuery(e,r,n){const i=nr(e,r,n);return i.behavior=nu(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(De).catch(De)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>mt(e)===mt(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>Dt(e,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>Dt(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}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>mt(e)===mt(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>Dt(e,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>Dt(e,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=hn(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class au extends tr{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),as(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return gn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),process.env.NODE_ENV!=="production"&&typeof(e==null?void 0:e.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),Zi(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&os(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(De)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),rr||this.currentResult.isStale||!dn(this.options.staleTime))return;const r=zi(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(rr||this.options.enabled===!1||!dn(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Er.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,o=e!==n,u=o?e.state:this.currentQueryInitialState,c=o?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:d,error:m,errorUpdatedAt:v,fetchStatus:w,status:E}=f,O=!1,k=!1,C;if(r._optimisticResults){const j=this.hasListeners(),q=!j&&as(e,r),te=j&&os(e,n,r,i);(q||te)&&(w=Rr(e.options.networkMode)?"fetching":"paused",d||(E="loading")),r._optimisticResults==="isRestoring"&&(w="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&c!=null&&c.isSuccess&&E!=="error")C=c.data,d=c.dataUpdatedAt,E=c.status,O=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(a==null?void 0:a.data)&&r.select===this.selectFn)C=this.selectResult;else try{this.selectFn=r.select,C=r.select(f.data),C=pn(s==null?void 0:s.data,C,r),this.selectResult=C,this.selectError=null}catch(j){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(j),this.selectError=j}else C=f.data;if(typeof r.placeholderData<"u"&&typeof C>"u"&&E==="loading"){let j;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData))j=s.data;else if(j=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof j<"u")try{j=r.select(j),this.selectError=null}catch(q){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(q),this.selectError=q}typeof j<"u"&&(E="success",C=pn(s==null?void 0:s.data,j,r),k=!0)}this.selectError&&(m=this.selectError,C=this.selectResult,v=Date.now(),E="error");const S=w==="fetching",A=E==="loading",_=E==="error";return{status:E,fetchStatus:w,isLoading:A,isSuccess:E==="success",isError:_,isInitialLoading:A&&S,data:C,dataUpdatedAt:d,error:m,errorUpdatedAt:v,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!A,isLoadingError:_&&f.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:k,isPreviousData:O,isRefetchError:_&&f.dataUpdatedAt!==0,isStale:yn(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Zi(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(o=>{const u=o;return this.currentResult[u]!==r[u]&&l.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!xr(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){ue.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var a,l,o,u;(a=(l=this.options).onError)==null||a.call(l,this.currentResult.error),(o=(u=this.options).onSettled)==null||o.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(c=>{c(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ou(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function as(t,e){return ou(t,e)||t.state.dataUpdatedAt>0&&gn(t,e,e.refetchOnMount)}function gn(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&yn(t,e)}return!1}function os(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&yn(t,r)}function yn(t,e){return t.isStaleByTime(e.staleTime)}var lu=Zr();const uu=lu.useSyncExternalStore,ls=p.createContext(void 0),us=p.createContext(!1);function cs(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ls),window.ReactQueryClientContext):ls)}const cu=({context:t}={})=>{const e=p.useContext(cs(t,p.useContext(us)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ds=({client:t,children:e,context:r,contextSharing:n=!1})=>{p.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),process.env.NODE_ENV!=="production"&&n&&t.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=cs(r,n);return p.createElement(us.Provider,{value:!r&&n},p.createElement(i.Provider,{value:t},e))},hs=p.createContext(!1),du=()=>p.useContext(hs);hs.Provider;function hu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const fu=p.createContext(hu()),pu=()=>p.useContext(fu);function mu(t,e){return typeof t=="function"?t(...e):!!t}const gu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},yu=t=>{p.useEffect(()=>{t.clearReset()},[t])},vu=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&mu(r,[t.error,n]),bu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},wu=(t,e)=>t.isLoading&&t.isFetching&&!e,Cu=(t,e,r)=>(t==null?void 0:t.suspense)&&wu(e,r),Eu=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function Su(t,e){const r=cu({context:t.context}),n=du(),i=pu(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=ue.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=ue.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=ue.batchCalls(s.onSettled)),bu(s),gu(s,i),yu(i);const[a]=p.useState(()=>new e(r,s)),l=a.getOptimisticResult(s);if(uu(p.useCallback(o=>n?()=>{}:a.subscribe(ue.batchCalls(o)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),Cu(s,l,n))throw Eu(s,a,i);if(vu({result:l,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw l.error;return s.notifyOnChangeProps?l:a.trackResult(l)}function Ru(t,e,r){const n=nr(t,e,r);return Su(n,au)}function xu(t,e){const[r,n]=M.useState(t);return M.useEffect(()=>{const i=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(i)}},[t,e]),r}var Ou="Expected a function",fs="__lodash_hash_undefined__",ps=1/0,_u="[object Function]",Tu="[object GeneratorFunction]",ku="[object Symbol]",Du=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lu=/^\w*$/,Pu=/^\./,ju=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fu=/[\\^$.*+?()[\]{}|]/g,Mu=/\\(\\)?/g,Nu=/^\[object .+?Constructor\]$/,Au=typeof cr=="object"&&cr&&cr.Object===Object&&cr,qu=typeof self=="object"&&self&&self.Object===Object&&self,vn=Au||qu||Function("return this")();function Iu(t,e){return t==null?void 0:t[e]}function Vu(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Uu=Array.prototype,$u=Function.prototype,ms=Object.prototype,bn=vn["__core-js_shared__"],gs=function(){var t=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ys=$u.toString,wn=ms.hasOwnProperty,vs=ms.toString,Bu=RegExp("^"+ys.call(wn).replace(Fu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bs=vn.Symbol,Hu=Uu.splice,Qu=Es(vn,"Map"),ir=Es(Object,"create"),ws=bs?bs.prototype:void 0,Cs=ws?ws.toString:void 0;function gt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function zu(){this.__data__=ir?ir(null):{}}function Wu(t){return this.has(t)&&delete this.__data__[t]}function Ku(t){var e=this.__data__;if(ir){var r=e[t];return r===fs?void 0:r}return wn.call(e,t)?e[t]:void 0}function Yu(t){var e=this.__data__;return ir?e[t]!==void 0:wn.call(e,t)}function Gu(t,e){var r=this.__data__;return r[t]=ir&&e===void 0?fs:e,this}gt.prototype.clear=zu,gt.prototype.delete=Wu,gt.prototype.get=Ku,gt.prototype.has=Yu,gt.prototype.set=Gu;function Lt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Zu(){this.__data__=[]}function Ju(t){var e=this.__data__,r=Or(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Hu.call(e,r,1),!0}function Xu(t){var e=this.__data__,r=Or(e,t);return r<0?void 0:e[r][1]}function ec(t){return Or(this.__data__,t)>-1}function tc(t,e){var r=this.__data__,n=Or(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Lt.prototype.clear=Zu,Lt.prototype.delete=Ju,Lt.prototype.get=Xu,Lt.prototype.has=ec,Lt.prototype.set=tc;function yt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rc(){this.__data__={hash:new gt,map:new(Qu||Lt),string:new gt}}function nc(t){return _r(this,t).delete(t)}function ic(t){return _r(this,t).get(t)}function sc(t){return _r(this,t).has(t)}function ac(t,e){return _r(this,t).set(t,e),this}yt.prototype.clear=rc,yt.prototype.delete=nc,yt.prototype.get=ic,yt.prototype.has=sc,yt.prototype.set=ac;function Or(t,e){for(var r=t.length;r--;)if(yc(t[r][0],e))return r;return-1}function oc(t,e){e=dc(e,t)?[e]:cc(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[mc(e[r++])];return r&&r==n?t:void 0}function lc(t){if(!Rs(t)||fc(t))return!1;var e=vc(t)||Vu(t)?Bu:Nu;return e.test(gc(t))}function uc(t){if(typeof t=="string")return t;if(En(t))return Cs?Cs.call(t):"";var e=t+"";return e=="0"&&1/t==-ps?"-0":e}function cc(t){return Ss(t)?t:pc(t)}function _r(t,e){var r=t.__data__;return hc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Es(t,e){var r=Iu(t,e);return lc(r)?r:void 0}function dc(t,e){if(Ss(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||En(t)?!0:Lu.test(t)||!Du.test(t)||e!=null&&t in Object(e)}function hc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function fc(t){return!!gs&&gs in t}var pc=Cn(function(t){t=wc(t);var e=[];return Pu.test(t)&&e.push(""),t.replace(ju,function(r,n,i,s){e.push(i?s.replace(Mu,"$1"):n||r)}),e});function mc(t){if(typeof t=="string"||En(t))return t;var e=t+"";return e=="0"&&1/t==-ps?"-0":e}function gc(t){if(t!=null){try{return ys.call(t)}catch{}try{return t+""}catch{}}return""}function Cn(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Ou);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a),a};return r.cache=new(Cn.Cache||yt),r}Cn.Cache=yt;function yc(t,e){return t===e||t!==t&&e!==e}var Ss=Array.isArray;function vc(t){var e=Rs(t)?vs.call(t):"";return e==_u||e==Tu}function Rs(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function bc(t){return!!t&&typeof t=="object"}function En(t){return typeof t=="symbol"||bc(t)&&vs.call(t)==ku}function wc(t){return t==null?"":uc(t)}function Cc(t,e,r){var n=t==null?void 0:oc(t,e);return n===void 0?r:n}var Ec=Cc;class je{constructor(e,r,n,i,s){this.kind=e,this.input=r,this.begin=n,this.end=i,this.file=s}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,r]=[1,1];for(let n=0;n<this.begin;n++)this.input[n]===`
|
|
90
90
|
`?(e++,r=1):r++;return[e,r]}size(){return this.end-this.begin}}class vt{liquidMethodMissing(e){}}const Sc=Object.prototype.toString,xs=String.prototype.toLowerCase,Os=Object.hasOwnProperty;function We(t){return typeof t=="string"}function be(t){return typeof t=="function"}function Rc(t){return t&&be(t.then)}function Tr(t){return t&&be(t.next)&&be(t.throw)&&be(t.return)}function xc(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function B(t){return t=H(t),We(t)?t:Ke(t)?"":Se(t)?t.map(e=>B(e)).join(""):String(t)}function H(t){return t instanceof vt&&be(t.valueOf)?t.valueOf():t}function kr(t){return typeof t=="number"}function _s(t){return t&&be(t.toLiquid)?_s(t.toLiquid()):t}function Ke(t){return t==null}function Se(t){return Sc.call(t)==="[object Array]"}function Oc(t){return Rn(t)&&Symbol.iterator in t}function Ts(t,e){t=t||{};for(const r in t)if(Os.call(t,r)&&e(t[r],r,t)===!1)break;return t}function Sn(t){return t[t.length-1]}function Rn(t){const e=typeof t;return t!==null&&(e==="object"||e==="function")}function ks(t,e,r=1){const n=[];for(let i=t;i<e;i+=r)n.push(i);return n}function Dr(t,e,r=" "){return Ds(t,e,r,(n,i)=>i+n)}function _c(t,e,r=" "){return Ds(t,e,r,(n,i)=>n+i)}function Ds(t,e,r,n){t=String(t);let i=e-t.length;for(;i-- >0;)t=n(t,r);return t}function Ls(t){return t}function Tc(t){return[...t].some(r=>r>="a"&&r<="z")?t.toUpperCase():t.toLowerCase()}function kc(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Ps(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=xs.call(t),e=xs.call(e),t<e)?-1:t>e?1:0}function Oe(t){return(...e)=>t(...e.map(H))}function xn(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}class Lr extends Error{constructor(e,r){super(e.message),this.originalError=e,this.token=r,this.context=""}update(){const e=this.originalError;this.context=Fc(this.token),this.message=Mc(e.message,this.token),this.stack=this.message+`
|
|
91
91
|
`+this.context+`
|
|
92
92
|
`+this.stack+`
|
|
@@ -110,4 +110,4 @@ From `+e.stack}}class On extends Lr{constructor(e,r){super(new Error(e),r),this.
|
|
|
110
110
|
`)}function Nd(t){return B(t).replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}var Ad=Object.freeze({__proto__:null,escape:Fn,escape_once:Fd,newline_to_br:Md,strip_html:Nd});const wt={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:Td,dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:Cd};function qd(t){if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let e;typeof t.cache=="number"?e=t.cache>0?new Ys(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Ys(1024):void 0,t.cache=e}return t=Object.assign(Object.assign(Object.assign({},wt),t.jekyllInclude?{dynamicPartials:!1}:{}),t),!t.fs.dirname&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` is required for relativeReference, set relativeReference to `false` to suppress this warning, or provide implementation for `fs.dirname`"),t.relativeReference=!1),t.root=Ar(t.root),t.partials=Ar(t.partials),t.layouts=Ar(t.layouts),t.outputEscape=t.outputEscape&&Id(t.outputEscape),t}function Id(t){return t==="escape"?Fn:t==="json"?Zs:(pe(be(t),"`outputEscape` need to be of type string or function"),t)}function Ar(t){let e=[];return Se(t)&&(e=t),We(t)&&(e=[t]),e}function Vd(t,e,r,n=t.length){let i=r,s=e,a;for(;i[t[s]]&&s<n;)i=i[t[s++]],i.end&&(a=i);return!a||a.needBoundary&&X[t.charCodeAt(s)]&_n?-1:s}function Ud(t,e){let r=!1;for(let n=0;n<t.length;n++){const i=t[n];Jd(i)&&(!r&&i.trimLeft&&$d(t[n-1],e.greedy),Et(i)&&(i.name==="raw"?r=!0:i.name==="endraw"&&(r=!1)),!r&&i.trimRight&&Bd(t[n+1],e.greedy))}}function $d(t,e){if(!t||!Nn(t))return;const r=e?Pr:Ms;for(;X[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Bd(t,e){if(!t||!Nn(t))return;const r=e?Pr:Ms;for(;X[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
|
|
111
111
|
`&&t.trimLeft++}class me{constructor(e,r=wt.operators,n){this.input=e,this.file=n,this.p=0,this.rawBeginAt=-1,this.N=e.length,this.opTrie=Vc(r)}readExpression(){return new md(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){const e=this.readOperator();if(e){yield e;continue}const r=this.readValue();if(r){yield r;continue}return}}readOperator(){this.skipBlank();const e=Vd(this.input,this.p,this.opTrie);if(e!==-1)return new sd(this.input,this.p,this.p=e,this.file)}readFilters(){const e=[];for(;;){const r=this.readFilter();if(!r)return e;e.push(r)}}readFilter(){if(this.skipBlank(),this.end())return null;pe(this.peek()==="|",()=>`unexpected token at ${this.snapshot()}`),this.p++;const e=this.p,r=this.readIdentifier();if(!r.size())return null;const n=[];if(this.skipBlank(),this.peek()===":")do{++this.p;const i=this.readFilterArg();i&&n.push(i),this.skipBlank(),pe(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");return new ad(r.getText(),n,this.input,e,this.p,this.file)}readFilterArg(){const e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;const r=this.readValue();return[e.getText(),r]}readTopLevelTokens(e=wt){const r=[];for(;this.p<this.N;){const n=this.readTopLevelToken(e);r.push(n)}return Ud(r,e),r}readTopLevelToken(e){const{tagDelimiterLeft:r,outputDelimiterLeft:n}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(r)?this.readTagToken(e):this.match(n)?this.readOutputToken(e):this.readHTMLToken([r,n])}readHTMLToken(e){const r=this.p;for(;this.p<this.N&&!e.some(n=>this.match(n));)++this.p;return new zs(this.input,r,this.p,this.file)}readTagToken(e=wt){const{file:r,input:n}=this,i=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.mkError(`tag ${this.snapshot(i)} not closed`,i);const s=new Qs(n,i,this.p,e,r);return s.name==="raw"&&(this.rawBeginAt=i),s}readToDelimiter(e){for(;this.p<this.N;){if(this.peekType()&Fs){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=wt){const{file:r,input:n}=this,{outputDelimiterRight:i}=e,s=this.p;if(this.readToDelimiter(i)===-1)throw this.mkError(`output ${this.snapshot(s)} not closed`,s);return new td(n,s,this.p,e,r)}readEndrawOrRawContent(e){const{tagDelimiterLeft:r,tagDelimiterRight:n}=e,i=this.p;let s=this.readTo(r)-r.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){s=this.readTo(r)-r.length;continue}for(;this.p<=this.N;){if(this.rmatch(n)){const a=this.p;return i===s?(this.rawBeginAt=-1,new Qs(this.input,i,a,e,this.file)):(this.p=s,new zs(this.input,i,s,this.file))}if(this.rmatch(r))break;this.p++}}throw this.mkError(`raw ${this.snapshot(this.rawBeginAt)} not closed`,i)}readLiquidTagTokens(e=wt){const r=[];for(;this.p<this.N;){const n=this.readLiquidTagToken(e);n.name&&r.push(n)}return r}readLiquidTagToken(e){const{file:r,input:n}=this,i=this.p;let s=this.N;return this.readToDelimiter(`
|
|
112
112
|
`)!==-1&&(s=this.p),new cd(n,i,s,e,r)}mkError(e,r){return new On(e,new Mr(this.input,r,this.N,this.file))}snapshot(e=this.p){return JSON.stringify(kc(this.input.slice(e),16))}readWord(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()}readIdentifier(){this.skipBlank();const e=this.p;for(;this.peekType()&_n;)++this.p;return new Mr(this.input,e,this.p,this.file)}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){const r=[];for(;;){const n=this.readHash(e);if(!n)return r;r.push(n)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;const r=this.p,n=this.readIdentifier();if(!n.size())return;let i;this.skipBlank();const s=e?"=":":";return this.peek()===s&&(++this.p,i=this.readValue()),new od(this.input,r,this.p,n,i,this.file)}remaining(){return this.input.slice(this.p)}advance(e=1){this.p+=e}end(){return this.p>=this.N}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){const e=this.readQuoted()||this.readRange();if(e)return e;if(this.peek()==="["){this.p++;const s=this.readQuoted();return!s||this.peek()!=="]"?void 0:(this.p++,new Ks(s,[],this.p))}const r=this.readIdentifier();if(!r.size())return;let n=r.isNumber(!0);const i=[];for(;;)if(this.peek()==="["){n=!1,this.p++;const s=this.readValue()||new Mr(this.input,this.p,this.p,this.file);this.readTo("]"),i.push(s)}else if(this.peek()==="."&&this.peek(1)!=="."){this.p++;const s=this.readIdentifier();if(!s.size())break;s.isNumber()||(n=!1),i.push(s)}else break;return!i.length&&qs.hasOwnProperty(r.content)?new nd(this.input,r.begin,r.end,this.file):n?new rd(r,i[0]):new Ks(r,i,this.p)}readRange(){this.skipBlank();const e=this.p;if(this.peek()!=="(")return;++this.p;const r=this.readValueOrThrow();this.p+=2;const n=this.readValueOrThrow();return++this.p,new ud(this.input,e,this.p,r,n,this.file)}readValueOrThrow(){const e=this.readValue();return pe(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();const e=this.p;if(!(this.peekType()&Fs))return;++this.p;let r=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!r));)r?r=!1:this.input[this.p-1]==="\\"&&(r=!0);return new ld(this.input,e,this.p,this.file)}*readFileNameTemplate(e){const{outputDelimiterLeft:r}=e,n=[","," ",r],i=new Set(n);for(;this.p<this.N&&!i.has(this.peek());)yield this.match(r)?this.readOutputToken(e):this.readHTMLToken(n)}match(e){for(let r=0;r<e.length;r++)if(e[r]!==this.input[this.p+r])return!1;return!0}rmatch(e){for(let r=0;r<e.length;r++)if(e[e.length-1-r]!==this.input[this.p-1-r])return!1;return!0}peekType(e=0){return X[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.input[this.p+e]}skipBlank(){for(;this.peekType()⪻)++this.p}}class Hd{constructor(e,r){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=r}on(e,r){return this.handlers[e]=r,this}trigger(e,r){const n=this.handlers[e];return n?(n.call(this,r),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||Et(e)&&this.trigger(`tag:${e.name}`,e))continue;const r=this.parseToken(e,this.tokens);this.trigger("template",r)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}}class Mn{constructor(e){this.token=e}}class ae extends Mn{constructor(e,r,n){super(e),this.name=e.name,this.liquid=n}}class Pt{constructor(e,r){this.hash={};const n=new me(e,{});for(const i of n.readHashes(r))this.hash[i.name.content]=i.value}*render(e){const r={};for(const n of Object.keys(this.hash))r[n]=this.hash[n]===void 0?!0:yield ve(this.hash[n],e);return r}}function Qd(t){return class extends ae{constructor(e,r,n){super(e,r,n),be(t.parse)&&t.parse.call(this,e,r)}*render(e,r){const n=yield new Pt(this.token.args).render(e);return yield t.render.call(this,e,r,n)}}}function zd(t){return Se(t)}class Js{constructor(e,r,n,i){this.name=e,this.handler=be(r)?r:be(r==null?void 0:r.handler)?r.handler:Ls,this.raw=!be(r)&&!!(r!=null&&r.raw),this.args=n,this.liquid=i}*render(e,r){const n=[];for(const i of this.args)zd(i)?n.push([i[0],yield ve(i[1],r)]):n.push(yield ve(i,r));return this.handler.apply({context:r,liquid:this.liquid},[e,...n])}}class Ze{constructor(e,r){this.filters=[];const n=new me(e,r.options.operators);this.initial=n.readExpression(),this.filters=n.readFilters().map(({name:i,args:s})=>new Js(i,this.getFilter(r,i),s,r))}*value(e,r){r=r||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let n=yield this.initial.evaluate(e,r);for(const i of this.filters)n=yield i.render(n,e);return n}getFilter(e,r){const n=e.filters[r];return pe(n||!e.options.strictFilters,()=>`undefined filter: ${r}`),n}}class Wd extends Mn{constructor(e,r){var n;super(e),this.value=new Ze(e.content,r);const i=this.value.filters,s=r.options.outputEscape;!(!((n=i[i.length-1])===null||n===void 0)&&n.raw)&&s&&i.push(new Js(toString.call(s),s,[],r))}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class Kd extends Mn{constructor(e){super(e),this.str=e.getContent()}*render(e,r){r.write(this.str)}}var Ct;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(Ct||(Ct={}));class Yd{constructor(e){if(this.options=e,e.relativeReference){const r=e.fs.sep;pe(r,"`fs.sep` is required for relative reference");const n=new RegExp(["."+r,".."+r,"./","../"].map(i=>xc(i)).join("|"));this.shouldLoadRelative=i=>n.test(i)}else this.shouldLoadRelative=r=>!1;this.contains=this.options.fs.contains||(()=>!0)}*lookup(e,r,n,i){const{fs:s}=this.options,a=this.options[r];for(const l of this.candidates(e,a,i,r!==Ct.Root))if(n?s.existsSync(l):yield s.exists(l))return l;throw this.lookupError(e,a)}*candidates(e,r,n,i){const{fs:s,extname:a}=this.options;if(this.shouldLoadRelative(e)&&n){const l=s.resolve(this.dirname(n),e,a);for(const o of r)if(!i||this.contains(o,l)){yield l;break}}for(const l of r){const o=s.resolve(l,e,a);(!i||this.contains(l,o))&&(yield o)}if(s.fallback!==void 0){const l=s.fallback(e);l!==void 0&&(yield l)}}dirname(e){const r=this.options.fs;return pe(r.dirname,"`fs.dirname` is required for relative reference"),r.dirname(e)}lookupError(e,r){const n=new Error("ENOENT");return n.message=`ENOENT: Failed to lookup "${e}" in "${r}"`,n.code="ENOENT",n}}class Gd{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Yd(this.liquid.options)}parse(e,r){const i=new me(e,this.liquid.options.operators,r).readTopLevelTokens(this.liquid.options);return this.parseTokens(i)}parseTokens(e){let r;const n=[];for(;r=e.shift();)n.push(this.parseToken(r,e));return n}parseToken(e,r){try{if(Et(e)){const n=this.liquid.tags[e.name];return pe(n,`tag "${e.name}" not found`),new n(e,r,this.liquid)}return Xd(e)?new Wd(e,this.liquid):new Kd(e)}catch(n){throw new Dc(n,e)}}parseStream(e){return new Hd(e,(r,n)=>this.parseToken(r,n))}*_parseFileCached(e,r,n=Ct.Root,i){const s=this.cache,a=this.loader.shouldLoadRelative(e)?i+","+e:n+":"+e,l=yield s.read(a);if(l)return l;const o=this._parseFile(e,r,n,i),u=r?yield o:it(o);s.write(a,u);try{return yield u}catch(c){throw s.remove(a),c}}*_parseFile(e,r,n=Ct.Root,i){const s=yield this.loader.lookup(e,n,r,i);return this.liquid.parse(r?this.fs.readFileSync(s):yield this.fs.readFile(s),s)}}const Zd=/[\da-fA-F]/,Xs=/[0-7]/,ea={b:"\b",f:"\f",n:`
|
|
113
|
-
`,r:"\r",t:" ",v:"\v"};function ta(t){const e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function ra(t){let e="";for(let r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(ea[t[r+1]]!==void 0)e+=ea[t[++r]];else if(t[r+1]==="u"){let n=0,i=r+2;for(;i<=r+5&&Zd.test(t[i]);)n=n*16+ta(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(!Xs.test(t[r+1]))e+=t[++r];else{let n=r+1,i=0;for(;n<=r+3&&Xs.test(t[n]);)i=i*8+ta(t[n++]);r=n-1,e+=String.fromCharCode(i)}}return e}var ee;(function(t){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"})(ee||(ee={}));function Jd(t){return!!(Fe(t)&ee.Delimited)}function na(t){return Fe(t)===ee.Operator}function Nn(t){return Fe(t)===ee.HTML}function Xd(t){return Fe(t)===ee.Output}function Et(t){return Fe(t)===ee.Tag}function ia(t){return Fe(t)===ee.Quoted}function eh(t){return Fe(t)===ee.Literal}function th(t){return Fe(t)===ee.Number}function rh(t){return Fe(t)===ee.PropertyAccess}function nh(t){return Fe(t)===ee.Word}function ih(t){return Fe(t)===ee.Range}function Fe(t){return t?t.kind:-1}class jt{constructor(e={},r=wt,n={}){var i,s;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}getRegister(e){return this.registers[e]=this.registers[e]||{}}setRegister(e,r){return this.registers[e]=r}saveRegister(...e){return e.map(r=>[r,this.getRegister(r)])}restoreRegister(e){return e.forEach(([r,n])=>this.setRegister(r,n))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,r)=>Fr(e,r),{})}get(e){return st(this._get(e))}*_get(e){const r=this.findScope(e[0]);return yield this._getFromScope(r,e)}getFromScope(e,r){return st(this._getFromScope(e,r))}*_getFromScope(e,r){We(r)&&(r=r.split("."));for(let n=0;n<r.length;n++)if(e=yield sh(e,r[n],this.opts.ownPropertyOnly),Ke(e)&&this.strictVariables)throw new Pc(r.slice(0,n+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}findScope(e){for(let r=this.scopes.length-1;r>=0;r--){const n=this.scopes[r];if(e in n)return n}return e in this.environments?this.environments:this.globals}}function sh(t,e,r){if(t=_s(t),Ke(t))return t;if(Se(t)&&e<0)return t[t.length+ +e];const n=ah(t,e,r);return n===void 0&&t instanceof vt?t.liquidMethodMissing(e):be(n)?n.call(t):e==="size"?uh(t):e==="first"?oh(t):e==="last"?lh(t):n}function ah(t,e,r){if(!(r&&!Object.hasOwnProperty.call(t,e)&&!(t instanceof vt)))return t[e]}function oh(t){return Se(t)?t[0]:t.first}function lh(t){return Se(t)?t[t.length-1]:t.last}function uh(t){if(t.hasOwnProperty("size")||t.size!==void 0)return t.size;if(Se(t)||We(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var St;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(St||(St={}));const ch=Oe(Math.abs),dh=Oe(Math.max),hh=Oe(Math.min),fh=Oe(Math.ceil),ph=Oe((t,e,r=!1)=>r?Math.floor(t/e):t/e),mh=Oe(Math.floor),gh=Oe((t,e)=>t-e),yh=Oe((t,e)=>t%e),vh=Oe((t,e)=>t*e);function bh(t,e=0){t=H(t),e=H(e);const r=Math.pow(10,e);return Math.round(t*r)/r}function wh(t,e){return t=H(t),e=H(e),Number(t)+Number(e)}var Ch=Object.freeze({__proto__:null,abs:ch,at_least:dh,at_most:hh,ceil:fh,divided_by:ph,floor:mh,minus:gh,modulo:yh,times:vh,round:bh,plus:wh}),Eh=Object.freeze({__proto__:null,url_decode:t=>B(t).split("+").map(decodeURIComponent).join(" "),url_encode:t=>B(t).split(" ").map(encodeURIComponent).join("+")});const Sh=Oe((t,e)=>Ge(t).join(e===void 0?" ":e)),Rh=Oe(t=>Se(t)?Sn(t):""),xh=Oe(t=>Se(t)?t[0]:""),Oh=Oe(t=>[...Ge(t)].reverse());function*_h(t,e){const r=[];for(const n of Ge(H(t)))r.push([n,e?yield this.context._getFromScope(n,B(e).split(".")):n]);return r.sort((n,i)=>{const s=n[1],a=i[1];return s<a?-1:s>a?1:0}).map(n=>n[0])}function Th(t,e){t=H(t);const r=B(e),n=e===void 0?Ps:(i,s)=>Ps(i[r],s[r]);return[...Ge(t)].sort(n)}const kh=t=>t&&t.length||0;function*Dh(t,e){const r=[];for(const n of Ge(H(t)))r.push(yield this.context._getFromScope(n,B(e).split(".")));return r}function Lh(t){return t=H(t),Ge(t).filter(e=>!Ke(H(e)))}function Ph(t,e=[]){return t=H(t),e=Ge(e).map(r=>H(r)),Ge(t).concat(e)}function jh(t,e,r=1){return t=H(t),Ke(t)?[]:(Se(t)||(t=B(t)),e=e<0?t.length+e:e,t.slice(e,e+r))}function*Fh(t,e,r){const n=[];t=Ge(H(t));for(const i of t)n.push(yield this.context._getFromScope(i,B(e).split(".")));return t.filter((i,s)=>r===void 0?bt(n[s],this.context):_e(r)?r.equals(n[s]):n[s]===r)}function Mh(t){t=H(t);const e={};return(t||[]).filter(r=>Os.call(e,String(r))?!1:(e[String(r)]=!0,!0))}var Nh=Object.freeze({__proto__:null,join:Sh,last:Rh,first:xh,reverse:Oh,sort:_h,sort_natural:Th,size:kh,map:Dh,compact:Lh,concat:Ph,slice:jh,where:Fh,uniq:Mh});const Ah="%A, %B %-e, %Y at %-l:%M %P %z";function qh(t,e,r){const n=this.context.opts;let i;return t=H(t),e=H(e),Ke(e)?e=Ah:e=B(e),t==="now"||t==="today"?i=new Date:kr(t)?i=new Date(t*1e3):We(t)?/^\d+$/.test(t)?i=new Date(+t*1e3):n.preserveTimezones?i=at.createDateFixedToTimezone(t):i=new Date(t):i=t,Ih(i)?(r!==void 0?i=new at(i,sa(i,r)):n.timezoneOffset!==void 0&&(i=new at(i,sa(i,n.timezoneOffset))),Gc(i,e)):t}function Ih(t){return(t instanceof Date||t instanceof at)&&!isNaN(t.getTime())}function sa(t,e){if(kr(e))return e;const r=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),n=new Date(t.toLocaleString("en-US",{timeZone:e}));return(r.getTime()-n.getTime())/6e4}var Vh=Object.freeze({__proto__:null,date:qh});function Uh(t,e){return pe(arguments.length===2,"append expect 2 arguments"),B(t)+B(e)}function $h(t,e){return pe(arguments.length===2,"prepend expect 2 arguments"),B(e)+B(t)}function Bh(t,e){return e?(e=xn(B(e)),B(t).replace(new RegExp(`^[${e}]+`,"g"),"")):B(t).replace(/^\s+/,"")}function Hh(t){return B(t).toLowerCase()}function Qh(t){return B(t).toUpperCase()}function zh(t,e){return B(t).split(String(e)).join("")}function Wh(t,e){return B(t).replace(String(e),"")}function Kh(t,e){const r=B(t),n=String(e),i=r.lastIndexOf(n);return i===-1?r:r.substring(0,i)+r.substring(i+n.length+1)}function Yh(t,e){return e?(e=xn(B(e)),B(t).replace(new RegExp(`[${e}]+$`,"g"),"")):B(t).replace(/\s+$/,"")}function Gh(t,e){const r=B(t).split(String(e));for(;r.length&&r[r.length-1]==="";)r.pop();return r}function Zh(t,e){return e?(e=xn(B(e)),B(t).replace(new RegExp(`^[${e}]+`,"g"),"").replace(new RegExp(`[${e}]+$`,"g"),"")):B(t).trim()}function Jh(t){return B(t).replace(/\n/g,"")}function Xh(t){return t=B(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function ef(t,e,r){return B(t).split(String(e)).join(r)}function tf(t,e,r){return B(t).replace(String(e),r)}function rf(t,e,r){const n=B(t),i=String(e),s=n.lastIndexOf(i);if(s===-1)return n;const a=String(r);return n.substring(0,s)+a+n.substring(s+i.length)}function nf(t,e=50,r="..."){return t=B(t),t.length<=e?t:t.substring(0,e-r.length)+r}function sf(t,e=15,r="..."){const n=B(t).split(/\s+/);e<=0&&(e=1);let i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}var af=Object.freeze({__proto__:null,append:Uh,prepend:$h,lstrip:Bh,downcase:Hh,upcase:Qh,remove:zh,remove_first:Wh,remove_last:Kh,rstrip:Yh,split:Gh,strip:Zh,strip_newlines:Jh,capitalize:Xh,replace:ef,replace_first:tf,replace_last:rf,truncate:nf,truncatewords:sf});const of=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ad),Ch),Eh),Nh),Vh),af),{json:Zs,raw:Dd,default:kd});class lf extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,n.options.operators);this.key=i.readIdentifier().content,i.skipBlank(),pe(i.peek()==="=",()=>`illegal token ${e.getText()}`),i.advance(),this.value=new Ze(i.remaining(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}}const aa=["offset","limit","reversed"];class uf extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators),s=i.readIdentifier(),a=i.readIdentifier(),l=i.readValue();if(!s.size()||a.content!=="in"||!l)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=l,this.hash=new Pt(i.remaining()),this.templates=[],this.elseTemplates=[];let o;const u=this.liquid.parser.parseStream(r).on("start",()=>o=this.templates).on("tag:else",()=>o=this.elseTemplates).on("tag:endfor",()=>u.stop()).on("template",c=>o.push(c)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});u.start()}*render(e,r){const n=this.liquid.renderer;let i=kn(yield ve(this.collection,e));if(!i.length){yield n.renderTemplates(this.elseTemplates,e,r);return}const s="continue-"+this.variable+"-"+this.collection.getText();e.push({continue:e.getRegister(s)});const a=yield this.hash.render(e);e.pop(),i=(this.liquid.options.orderedFilterParameters?Object.keys(a).filter(u=>aa.includes(u)):aa.filter(u=>a[u]!==void 0)).reduce((u,c)=>c==="offset"?df(u,a.offset):c==="limit"?hf(u,a.limit):cf(u),i),e.setRegister(s,(a.offset||0)+i.length);const o={forloop:new Tn(i.length,this.collection.getText(),this.variable)};e.push(o);for(const u of i){if(o[this.variable]=u,yield n.renderTemplates(this.templates,e,r),r.break){r.break=!1;break}r.continue=!1,o.forloop.next()}e.pop()}}function cf(t){return[...t].reverse()}function df(t,e){return t.slice(e)}function hf(t,e){return t.slice(0,e)}class ff extends ae{constructor(e,r,n){super(e,r,n),this.templates=[];const i=new me(e.args,this.liquid.options.operators);for(this.variable=pf(i),pe(this.variable,()=>`${e.args} not valid identifier`);r.length;){const s=r.shift();if(Et(s)&&s.name==="endcapture")return;this.templates.push(n.parser.parseToken(s,r))}throw new Error(`tag ${e.getText()} not closed`)}*render(e){const n=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=n}}function pf(t){const e=t.readIdentifier().content;if(e)return e;const r=t.readQuoted();if(r)return Pn(r)}class mf extends ae{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[],this.value=new Ze(e.args,this.liquid),this.elseTemplates=[];let i=[];const s=this.liquid.parser.parseStream(r).on("tag:when",a=>{i=[];const l=new me(a.args,this.liquid.options.operators),o=[];for(;!l.end();)o.push(l.readValueOrThrow()),l.readTo(",");this.branches.push({values:o,templates:i})}).on("tag:else",()=>i=this.elseTemplates).on("tag:endcase",()=>s.stop()).on("template",a=>i.push(a)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});s.start()}*render(e,r){const n=this.liquid.renderer,i=H(yield this.value.value(e,e.opts.lenientIf));let s=!1;for(const a of this.branches)for(const l of a.values){const o=yield ve(l,e,e.opts.lenientIf);if(i===o){yield n.renderTemplates(a.templates,e,r),s=!0;break}}s||(yield n.renderTemplates(this.elseTemplates,e,r))}}class gf extends ae{constructor(e,r,n){for(super(e,r,n);r.length;){const i=r.shift();if(Et(i)&&i.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}}class yf extends ae{constructor(e,r,n){super(e,r,n);const i=e.args,s=new me(i,this.liquid.options.operators);for(this.file=An(s,this.liquid),this.currentFile=e.file;!s.end();){s.skipBlank();const a=s.p,l=s.readIdentifier();if((l.content==="with"||l.content==="for")&&(s.skipBlank(),s.peek()!==":")){const o=s.readValue();if(o){const u=s.p,c=s.readIdentifier();let f;c.content==="as"?f=s.readIdentifier():s.p=u,this[l.content]={value:o,alias:f&&f.content},s.skipBlank(),s.peek()===","&&s.advance();continue}}s.p=a;break}this.hash=new Pt(s.remaining())}*render(e,r){const{liquid:n,hash:i}=this,s=yield qn(this.file,e,n);pe(s,()=>`illegal filename "${s}"`);const a=new jt({},e.opts,{sync:e.sync,globals:e.globals,strictVariables:e.strictVariables}),l=a.bottom();if(Fr(l,yield i.render(e)),this.with){const{value:o,alias:u}=this.with;l[u||s]=yield ve(o,e)}if(this.for){const{value:o,alias:u}=this.for,c=kn(yield ve(o,e));l.forloop=new Tn(c.length,o.getText(),u);for(const f of c){l[u]=f;const d=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(d,a,r),l.forloop.next()}}else{const o=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(o,a,r)}}}function An(t,e){if(e.options.dynamicPartials){const i=t.readValue();if(i===void 0)throw new TypeError(`illegal argument "${t.input}"`);if(i.getText()==="none")return;if(ia(i)){const s=e.parse(Pn(i));return oa(s)}return i}const r=[...t.readFileNameTemplate(e.options)],n=oa(e.parser.parseTokens(r));return n==="none"?void 0:n}function oa(t){return t.length===1&&Nn(t[0].token)?t[0].token.getContent():t}function*qn(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):yield ve(t,e)}class vf extends ae{constructor(e,r,n){super(e,r,n);const i=e.args,s=new me(i,this.liquid.options.operators);this.file=An(s,this.liquid),this.currentFile=e.file;const a=s.p;s.readIdentifier().content==="with"?(s.skipBlank(),s.peek()!==":"?this.withVar=s.readValue():s.p=a):s.p=a,this.hash=new Pt(s.remaining(),this.liquid.options.jekyllInclude)}*render(e,r){const{liquid:n,hash:i,withVar:s}=this,{renderer:a}=n,l=yield qn(this.file,e,n);pe(l,()=>`illegal filename "${l}"`);const o=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",St.OUTPUT);const u=yield i.render(e);s&&(u[l]=yield ve(s,e));const c=yield n._parsePartialFile(l,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?{include:u}:u),yield a.renderTemplates(c,e,r),e.pop(),e.restoreRegister(o)}}class bf extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;kr(n[this.variable])||(n[this.variable]=0),r.write(B(--n[this.variable]))}}class wf extends ae{constructor(e,r,n){super(e,r,n),this.candidates=[];const i=new me(e.args,this.liquid.options.operators),s=i.readValue();for(i.skipBlank(),s&&(i.peek()===":"?(this.group=s,i.advance()):this.candidates.push(s));!i.end();){const a=i.readValue();a&&this.candidates.push(a),i.readTo(",")}pe(this.candidates.length,()=>`empty candidates: ${e.getText()}`)}*render(e,r){const i=`cycle:${yield ve(this.group,e)}:`+this.candidates.join(","),s=e.getRegister("cycle");let a=s[i];a===void 0&&(a=s[i]=0);const l=this.candidates[a];return a=(a+1)%this.candidates.length,s[i]=a,yield ve(l,e)}}class Cf extends ae{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;n.parser.parseStream(r).on("start",()=>this.branches.push({value:new Ze(e.args,this.liquid),templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new Ze(s.args,this.liquid),templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endif",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,templates:s}of this.branches){const a=yield i.value(e,e.opts.lenientIf);if(bt(a,e)){yield n.renderTemplates(s,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class Ef extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;kr(n[this.variable])||(n[this.variable]=0);const i=n[this.variable];n[this.variable]++,r.write(B(i))}}class Sf extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.file=An(i,this.liquid),this.currentFile=e.file,this.args=new Pt(i.remaining()),this.templates=this.liquid.parser.parseTokens(r)}*render(e,r){const{liquid:n,args:i,file:s}=this,{renderer:a}=n;if(s===void 0){e.setRegister("blockMode",St.OUTPUT),yield a.renderTemplates(this.templates,e,r);return}const l=yield qn(this.file,e,n);pe(l,()=>`illegal filename "${l}"`);const o=yield n._parseLayoutFile(l,e.sync,this.currentFile);e.setRegister("blockMode",St.STORE);const u=yield a.renderTemplates(this.templates,e),c=e.getRegister("blocks");c[""]===void 0&&(c[""]=(f,d)=>d.write(u)),e.setRegister("blockMode",St.OUTPUT),e.push(yield i.render(e)),yield a.renderTemplates(o,e,r),e.pop()}}class Rf extends ae{constructor(e,r,n){super(e,r,n),this.templates=[];const i=/\w+/.exec(e.args);for(this.block=i?i[0]:"";r.length;){const s=r.shift();if(Et(s)&&s.name==="endblock")return;const a=n.parser.parseToken(s,r);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,r){const n=this.getBlockRender(e);e.getRegister("blockMode")===St.STORE?e.getRegister("blocks")[this.block]=n:yield n(new Ns,r)}getBlockRender(e){const{liquid:r,templates:n}=this,i=e.getRegister("blocks")[this.block],s=function*(a,l){e.push({block:a}),yield r.renderer.renderTemplates(n,e,l),e.pop()};return i?(a,l)=>i(new Ns(()=>s(a,l)),l):s}}class xf extends ae{constructor(e,r,n){for(super(e,r,n),this.tokens=[];r.length;){const i=r.shift();if(Et(i)&&i.name==="endraw")return;this.tokens.push(i)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}}class Of extends Tn{constructor(e,r,n,i){super(e,n,i),this.length=e,this.cols=r}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}}class _f extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators),s=i.readIdentifier();i.skipBlank();const a=i.readIdentifier(),l=i.readValue();if(a.content!=="in"||!l)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=l,this.args=new Pt(i.remaining()),this.templates=[];let o;const u=this.liquid.parser.parseStream(r).on("start",()=>o=this.templates).on("tag:endtablerow",()=>u.stop()).on("template",c=>o.push(c)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});u.start()}*render(e,r){let n=kn(yield ve(this.collection,e));const i=yield this.args.render(e),s=i.offset||0,a=i.limit===void 0?n.length:i.limit;n=n.slice(s,s+a);const l=i.cols||n.length,o=this.liquid.renderer,u=new Of(n.length,l,this.collection.getText(),this.variable),c={tablerowloop:u};e.push(c);for(let f=0;f<n.length;f++,u.next())c[this.variable]=n[f],u.col0()===0&&(u.row()!==1&&r.write("</tr>"),r.write(`<tr class="row${u.row()}">`)),r.write(`<td class="col${u.col()}">`),yield o.renderTemplates(this.templates,e,r),r.write("</td>");n.length&&r.write("</tr>"),e.pop()}}class Tf extends ae{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;this.liquid.parser.parseStream(r).on("start",()=>this.branches.push({value:new Ze(e.args,this.liquid),test:Nr,templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new Ze(s.args,this.liquid),test:bt,templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endunless",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,test:s,templates:a}of this.branches){const l=yield i.value(e,e.opts.lenientIf);if(s(l,e)){yield n.renderTemplates(a,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class kf extends ae{render(e,r){r.break=!0}}class Df extends ae{render(e,r){r.continue=!0}}class Lf extends ae{constructor(e,r,n){super(e,r,n),this.value=new Ze(e.args,this.liquid)}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class Pf extends ae{constructor(e,r,n){super(e,r,n);const s=new me(e.args,this.liquid.options.operators).readLiquidTagTokens(this.liquid.options);this.templates=this.liquid.parser.parseTokens(s)}*render(e,r){yield this.liquid.renderer.renderTemplates(this.templates,e,r)}}class jf extends ae{constructor(e,r,n){if(super(e,r,n),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}}const Ff={assign:lf,for:uf,capture:ff,case:mf,comment:gf,include:vf,render:yf,decrement:bf,increment:Ef,cycle:wf,if:Cf,layout:Sf,block:Rf,raw:xf,tablerow:_f,unless:Tf,break:kf,continue:Df,echo:Lf,liquid:Pf,"#":jf};class In{constructor(e={}){this.renderer=new pd,this.filters={},this.tags={},this.options=qd(e),this.parser=new Gd(this),Ts(Ff,(r,n)=>this.registerTag(n,r)),Ts(of,(r,n)=>this.registerFilter(n,r))}parse(e,r){return this.parser.parse(e,r)}_render(e,r,n){const i=r instanceof jt?r:new jt(r,this.options,n);return this.renderer.renderTemplates(e,i)}render(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._render(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderSync(e,r,n){return st(this._render(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderToNodeStream(e,r,n={}){const i=new jt(r,this.options,n);return this.renderer.renderTemplatesToNodeStream(e,i)}_parseAndRender(e,r,n){const i=this.parse(e);return this._render(i,r,n)}parseAndRender(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}parseAndRenderSync(e,r,n){return st(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!0})))}_parsePartialFile(e,r,n){return this.parser.parseFile(e,r,Ct.Partials,n)}_parseLayoutFile(e,r,n){return this.parser.parseFile(e,r,Ct.Layouts,n)}_parseFile(e,r,n,i){return this.parser.parseFile(e,r,n,i)}parseFile(e,r){return Ye(this,void 0,void 0,function*(){return it(this.parser.parseFile(e,!1,r))})}parseFileSync(e,r){return st(this.parser.parseFile(e,!0,r))}*_renderFile(e,r,n){const i=yield this._parseFile(e,n.sync,n.lookupType);return yield this._render(i,r,n)}renderFile(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderFileSync(e,r,n){return st(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderFileToNodeStream(e,r,n){return Ye(this,void 0,void 0,function*(){const i=yield this.parseFile(e);return this.renderToNodeStream(i,r,n)})}_evalValue(e,r){const n=new Ze(e,this),i=r instanceof jt?r:new jt(r,this.options);return n.value(i)}evalValue(e,r){return Ye(this,void 0,void 0,function*(){return it(this._evalValue(e,r))})}evalValueSync(e,r){return st(this._evalValue(e,r))}registerFilter(e,r){this.filters[e]=r}registerTag(e,r){this.tags[e]=be(r)?r:Qd(r)}plugin(e){return e.call(this,In)}express(){const e=this;let r=!0;return function(n,i,s){if(r){r=!1;const a=Ar(this.root);e.options.root.unshift(...a),e.options.layouts.unshift(...a),e.options.partials.unshift(...a)}e.renderFile(n,i).then(a=>s(null,a),s)}}}const Rt=new In;function Mf(t,e){return M.useMemo(()=>Nf(t,e),[t,e])}function Nf(t,e){return t.map(r=>{const n=e||r.transform;return n?Object.keys(n).reduce((i,s)=>s==="details"?(i[s]=n[s].map(a=>Array.isArray(a)?a.map(l=>({label:l.label,value:Rt.parseAndRenderSync(l.value,r),html:l.html})):{label:a.label,value:Rt.parseAndRenderSync(a.value,r),html:a.html}),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]=Rt.parseAndRenderSync(a[o][c],r),u),{}):l[o]=Rt.parseAndRenderSync(a[o],r),l),{})),i):(i[s]=Rt.parseAndRenderSync(n[s],r),i),{}):r})}function la({path:t,placeholderText:e,dynamicOptions:r}){var te;let{asyncUrl:n,method:i,payload:s,transform:a,clientSideFilter:l,rootData:o,includeHeaders:u}=r,c=Po();const f=Re(),{activeIndex:d,search:m,setActions:v,navigateTo:w}=M.useContext(rt),E=xu(m,500),O=u&&f.headers?f.headers:{},k={method:i||"get",credentials:"include",headers:O};s&&k.method!=="get"&&(k.body=Rt.parseAndRenderSync(s,{...c,query:E}));const{isLoading:C,error:S,data:A=[]}=Ru({queryKey:[t,l?"":E],enabled:!!n,queryFn:()=>fetch(Rt.parseAndRenderSync(n,{...c,query:E}),k).then(Q=>Q.json())}),_=o?Ec(A,o,[]):A,F=M.useMemo(()=>Array.isArray(_)?_:[_],[_]);let j=Mf(F,a);l&&(j=j.filter(Q=>Q.title.toLowerCase().includes(m.toLowerCase())));const q=j[d];return M.useEffect(()=>{q&&q.actions?v(q.actions):v([])},[q,m,d,v]),C?y.jsx(er,{children:y.jsx("div",{className:"qikbar-item-empty",children:"loading..."})}):j.length===0?y.jsxs(er,{children:[y.jsx(wr,{placeholder:e}),y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})]}):y.jsxs(y.Fragment,{children:[y.jsx(wr,{placeholder:e}),y.jsxs(er,{children:[y.jsx(Ui,{children:j.map(Q=>y.jsx(cn,{item:Q},Q.id))}),q&&((te=q==null?void 0:q.details)==null?void 0:te.length)>0&&y.jsx(Hi,{fields:q.details})]})]})}class Af extends M.Component{constructor(){super(...arguments);pa(this,"state",{hasError:!1})}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,n){}render(){return this.state.hasError?y.jsx("div",{className:"qikbar-command-wrapper",children:"Something went wrong."}):this.props.children}}function ua(){let t=Li();return y.jsx("div",{className:"qikbar-command-wrapper",children:y.jsxs("div",{className:"qikbar-command-bar",children:[y.jsx("div",{className:"qikbar-command-content",children:y.jsxs("div",{className:"qikbar-command-error",children:["It looks like there maybe a problem. If you continue to see this please contact @"," ",y.jsx("a",{href:`mailto:support@qikbar.com?subject=Issues with running qikbar on my site.&body=The current error is: ${t}`,children:"support@qikbar.com"})]})}),y.jsx("div",{className:"qikbar-command-footer",children:y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})})})]})})}const Re=Da(t=>({commands:[],router:null,headers:null,id:null,theme:null,addRouter:e=>{t(r=>({router:e}))},addHeaders:e=>{t(()=>({headers:e}))},setId:e=>{t(()=>({id:e}))},setTheme:e=>{t(()=>({theme:e}))},addCommand:e=>{t(r=>({commands:[...r.commands,e]}))},addCommands:e=>{t(r=>({commands:e}))},updateCommand:e=>{t(r=>({commands:r.commands.map(n=>n.id===e.id?e:n)}))},removeCommand:e=>{t(r=>({commands:r.commands.filter(n=>n.id!==e.id)}))}})),ca=new su;function qf({path:t,commands:e,theme:r}){const n=Ni([{path:"/",element:y.jsx(Vi,{demo:!0,defaultOpen:!0,wrapperClass:"qikbar-command-demo-wrapper"}),errorElement:y.jsx(ua,{}),children:e.map(i=>({path:i.path,element:i.type==="STATIC"?y.jsx(Qi,{...i}):y.jsx(la,{...i})}))}],{initialEntries:[t||"/"]});return y.jsx("div",{id:"qikbar",className:`qikbar-demo qikbar-light qikbar-${r}`,children:y.jsx(ds,{client:ca,children:y.jsx(ji,{router:n})})})}function If(){const t=Re(n=>n.commands),e=Re(n=>n.theme),r=Ni([{path:"/",element:y.jsx(Vi,{}),errorElement:y.jsx(ua,{}),children:t.map(n=>({path:n.path,element:n.type==="STATIC"?y.jsx(Qi,{...n}):y.jsx(la,{...n})}))}]);return y.jsx("div",{id:"qikbar",className:`qikbar-light qikbar-${e}`,children:y.jsx(ji,{router:r})})}const da=async t=>fetch(`http://localhost:3000/api/site/${t}`).then(r=>r.json()).then(r=>{r!=null&&r.routes&&Re.getState().addCommands(r.routes),r!=null&&r.theme&&Re.getState().setTheme(r.theme),r!=null&&r.id&&Re.getState().setId(r.id)}).catch(r=>{console.error(r)});function Vf({id:t}){return da(t),{id:t,boot:({elementId:r})=>{Ht.createRoot(document.getElementById(r)).render(y.jsx(M.StrictMode,{children:y.jsx(Af,{children:y.jsx(ds,{client:ca,children:y.jsx(If,{})})})})),window.Qikbar.booted=!0},setTheme:r=>Re.getState().setTheme(r),reloadSite:()=>da(t),addCommand:r=>Re.getState().addCommand(r),updateCommand:r=>Re.getState().updateCommand(r),removeCommand:r=>Re.getState().removeCommand(r),addRouter:r=>Re.getState().addRouter(r),addHeaders:r=>Re.getState().addHeaders(r)}}function ha(t){return window.Qikbar=Vf({id:t}),window.addEventListener("message",function(e){var r;(r=e==null?void 0:e.data)!=null&&r.reloadSite&&window.Qikbar.reloadSite()}),window.Qikbar}function Uf({elementId:t,router:e,siteId:r}){return M.useEffect(()=>{if(window.Qikbar)return;const n=ha(r);n.boot({elementId:t||"qikbar"}),e&&n.addRouter(e)},[e,t,r]),t?null:y.jsx("div",{id:"qikbar"})}const fp="";ye.DemoBar=qf,ye.Qikbar=Uf,ye.init=ha,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});
|
|
113
|
+
`,r:"\r",t:" ",v:"\v"};function ta(t){const e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function ra(t){let e="";for(let r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(ea[t[r+1]]!==void 0)e+=ea[t[++r]];else if(t[r+1]==="u"){let n=0,i=r+2;for(;i<=r+5&&Zd.test(t[i]);)n=n*16+ta(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(!Xs.test(t[r+1]))e+=t[++r];else{let n=r+1,i=0;for(;n<=r+3&&Xs.test(t[n]);)i=i*8+ta(t[n++]);r=n-1,e+=String.fromCharCode(i)}}return e}var ee;(function(t){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"})(ee||(ee={}));function Jd(t){return!!(Fe(t)&ee.Delimited)}function na(t){return Fe(t)===ee.Operator}function Nn(t){return Fe(t)===ee.HTML}function Xd(t){return Fe(t)===ee.Output}function Et(t){return Fe(t)===ee.Tag}function ia(t){return Fe(t)===ee.Quoted}function eh(t){return Fe(t)===ee.Literal}function th(t){return Fe(t)===ee.Number}function rh(t){return Fe(t)===ee.PropertyAccess}function nh(t){return Fe(t)===ee.Word}function ih(t){return Fe(t)===ee.Range}function Fe(t){return t?t.kind:-1}class jt{constructor(e={},r=wt,n={}){var i,s;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}getRegister(e){return this.registers[e]=this.registers[e]||{}}setRegister(e,r){return this.registers[e]=r}saveRegister(...e){return e.map(r=>[r,this.getRegister(r)])}restoreRegister(e){return e.forEach(([r,n])=>this.setRegister(r,n))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,r)=>Fr(e,r),{})}get(e){return st(this._get(e))}*_get(e){const r=this.findScope(e[0]);return yield this._getFromScope(r,e)}getFromScope(e,r){return st(this._getFromScope(e,r))}*_getFromScope(e,r){We(r)&&(r=r.split("."));for(let n=0;n<r.length;n++)if(e=yield sh(e,r[n],this.opts.ownPropertyOnly),Ke(e)&&this.strictVariables)throw new Pc(r.slice(0,n+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}findScope(e){for(let r=this.scopes.length-1;r>=0;r--){const n=this.scopes[r];if(e in n)return n}return e in this.environments?this.environments:this.globals}}function sh(t,e,r){if(t=_s(t),Ke(t))return t;if(Se(t)&&e<0)return t[t.length+ +e];const n=ah(t,e,r);return n===void 0&&t instanceof vt?t.liquidMethodMissing(e):be(n)?n.call(t):e==="size"?uh(t):e==="first"?oh(t):e==="last"?lh(t):n}function ah(t,e,r){if(!(r&&!Object.hasOwnProperty.call(t,e)&&!(t instanceof vt)))return t[e]}function oh(t){return Se(t)?t[0]:t.first}function lh(t){return Se(t)?t[t.length-1]:t.last}function uh(t){if(t.hasOwnProperty("size")||t.size!==void 0)return t.size;if(Se(t)||We(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var St;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(St||(St={}));const ch=Oe(Math.abs),dh=Oe(Math.max),hh=Oe(Math.min),fh=Oe(Math.ceil),ph=Oe((t,e,r=!1)=>r?Math.floor(t/e):t/e),mh=Oe(Math.floor),gh=Oe((t,e)=>t-e),yh=Oe((t,e)=>t%e),vh=Oe((t,e)=>t*e);function bh(t,e=0){t=H(t),e=H(e);const r=Math.pow(10,e);return Math.round(t*r)/r}function wh(t,e){return t=H(t),e=H(e),Number(t)+Number(e)}var Ch=Object.freeze({__proto__:null,abs:ch,at_least:dh,at_most:hh,ceil:fh,divided_by:ph,floor:mh,minus:gh,modulo:yh,times:vh,round:bh,plus:wh}),Eh=Object.freeze({__proto__:null,url_decode:t=>B(t).split("+").map(decodeURIComponent).join(" "),url_encode:t=>B(t).split(" ").map(encodeURIComponent).join("+")});const Sh=Oe((t,e)=>Ge(t).join(e===void 0?" ":e)),Rh=Oe(t=>Se(t)?Sn(t):""),xh=Oe(t=>Se(t)?t[0]:""),Oh=Oe(t=>[...Ge(t)].reverse());function*_h(t,e){const r=[];for(const n of Ge(H(t)))r.push([n,e?yield this.context._getFromScope(n,B(e).split(".")):n]);return r.sort((n,i)=>{const s=n[1],a=i[1];return s<a?-1:s>a?1:0}).map(n=>n[0])}function Th(t,e){t=H(t);const r=B(e),n=e===void 0?Ps:(i,s)=>Ps(i[r],s[r]);return[...Ge(t)].sort(n)}const kh=t=>t&&t.length||0;function*Dh(t,e){const r=[];for(const n of Ge(H(t)))r.push(yield this.context._getFromScope(n,B(e).split(".")));return r}function Lh(t){return t=H(t),Ge(t).filter(e=>!Ke(H(e)))}function Ph(t,e=[]){return t=H(t),e=Ge(e).map(r=>H(r)),Ge(t).concat(e)}function jh(t,e,r=1){return t=H(t),Ke(t)?[]:(Se(t)||(t=B(t)),e=e<0?t.length+e:e,t.slice(e,e+r))}function*Fh(t,e,r){const n=[];t=Ge(H(t));for(const i of t)n.push(yield this.context._getFromScope(i,B(e).split(".")));return t.filter((i,s)=>r===void 0?bt(n[s],this.context):_e(r)?r.equals(n[s]):n[s]===r)}function Mh(t){t=H(t);const e={};return(t||[]).filter(r=>Os.call(e,String(r))?!1:(e[String(r)]=!0,!0))}var Nh=Object.freeze({__proto__:null,join:Sh,last:Rh,first:xh,reverse:Oh,sort:_h,sort_natural:Th,size:kh,map:Dh,compact:Lh,concat:Ph,slice:jh,where:Fh,uniq:Mh});const Ah="%A, %B %-e, %Y at %-l:%M %P %z";function qh(t,e,r){const n=this.context.opts;let i;return t=H(t),e=H(e),Ke(e)?e=Ah:e=B(e),t==="now"||t==="today"?i=new Date:kr(t)?i=new Date(t*1e3):We(t)?/^\d+$/.test(t)?i=new Date(+t*1e3):n.preserveTimezones?i=at.createDateFixedToTimezone(t):i=new Date(t):i=t,Ih(i)?(r!==void 0?i=new at(i,sa(i,r)):n.timezoneOffset!==void 0&&(i=new at(i,sa(i,n.timezoneOffset))),Gc(i,e)):t}function Ih(t){return(t instanceof Date||t instanceof at)&&!isNaN(t.getTime())}function sa(t,e){if(kr(e))return e;const r=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),n=new Date(t.toLocaleString("en-US",{timeZone:e}));return(r.getTime()-n.getTime())/6e4}var Vh=Object.freeze({__proto__:null,date:qh});function Uh(t,e){return pe(arguments.length===2,"append expect 2 arguments"),B(t)+B(e)}function $h(t,e){return pe(arguments.length===2,"prepend expect 2 arguments"),B(e)+B(t)}function Bh(t,e){return e?(e=xn(B(e)),B(t).replace(new RegExp(`^[${e}]+`,"g"),"")):B(t).replace(/^\s+/,"")}function Hh(t){return B(t).toLowerCase()}function Qh(t){return B(t).toUpperCase()}function zh(t,e){return B(t).split(String(e)).join("")}function Wh(t,e){return B(t).replace(String(e),"")}function Kh(t,e){const r=B(t),n=String(e),i=r.lastIndexOf(n);return i===-1?r:r.substring(0,i)+r.substring(i+n.length+1)}function Yh(t,e){return e?(e=xn(B(e)),B(t).replace(new RegExp(`[${e}]+$`,"g"),"")):B(t).replace(/\s+$/,"")}function Gh(t,e){const r=B(t).split(String(e));for(;r.length&&r[r.length-1]==="";)r.pop();return r}function Zh(t,e){return e?(e=xn(B(e)),B(t).replace(new RegExp(`^[${e}]+`,"g"),"").replace(new RegExp(`[${e}]+$`,"g"),"")):B(t).trim()}function Jh(t){return B(t).replace(/\n/g,"")}function Xh(t){return t=B(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function ef(t,e,r){return B(t).split(String(e)).join(r)}function tf(t,e,r){return B(t).replace(String(e),r)}function rf(t,e,r){const n=B(t),i=String(e),s=n.lastIndexOf(i);if(s===-1)return n;const a=String(r);return n.substring(0,s)+a+n.substring(s+i.length)}function nf(t,e=50,r="..."){return t=B(t),t.length<=e?t:t.substring(0,e-r.length)+r}function sf(t,e=15,r="..."){const n=B(t).split(/\s+/);e<=0&&(e=1);let i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}var af=Object.freeze({__proto__:null,append:Uh,prepend:$h,lstrip:Bh,downcase:Hh,upcase:Qh,remove:zh,remove_first:Wh,remove_last:Kh,rstrip:Yh,split:Gh,strip:Zh,strip_newlines:Jh,capitalize:Xh,replace:ef,replace_first:tf,replace_last:rf,truncate:nf,truncatewords:sf});const of=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ad),Ch),Eh),Nh),Vh),af),{json:Zs,raw:Dd,default:kd});class lf extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,n.options.operators);this.key=i.readIdentifier().content,i.skipBlank(),pe(i.peek()==="=",()=>`illegal token ${e.getText()}`),i.advance(),this.value=new Ze(i.remaining(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}}const aa=["offset","limit","reversed"];class uf extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators),s=i.readIdentifier(),a=i.readIdentifier(),l=i.readValue();if(!s.size()||a.content!=="in"||!l)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=l,this.hash=new Pt(i.remaining()),this.templates=[],this.elseTemplates=[];let o;const u=this.liquid.parser.parseStream(r).on("start",()=>o=this.templates).on("tag:else",()=>o=this.elseTemplates).on("tag:endfor",()=>u.stop()).on("template",c=>o.push(c)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});u.start()}*render(e,r){const n=this.liquid.renderer;let i=kn(yield ve(this.collection,e));if(!i.length){yield n.renderTemplates(this.elseTemplates,e,r);return}const s="continue-"+this.variable+"-"+this.collection.getText();e.push({continue:e.getRegister(s)});const a=yield this.hash.render(e);e.pop(),i=(this.liquid.options.orderedFilterParameters?Object.keys(a).filter(u=>aa.includes(u)):aa.filter(u=>a[u]!==void 0)).reduce((u,c)=>c==="offset"?df(u,a.offset):c==="limit"?hf(u,a.limit):cf(u),i),e.setRegister(s,(a.offset||0)+i.length);const o={forloop:new Tn(i.length,this.collection.getText(),this.variable)};e.push(o);for(const u of i){if(o[this.variable]=u,yield n.renderTemplates(this.templates,e,r),r.break){r.break=!1;break}r.continue=!1,o.forloop.next()}e.pop()}}function cf(t){return[...t].reverse()}function df(t,e){return t.slice(e)}function hf(t,e){return t.slice(0,e)}class ff extends ae{constructor(e,r,n){super(e,r,n),this.templates=[];const i=new me(e.args,this.liquid.options.operators);for(this.variable=pf(i),pe(this.variable,()=>`${e.args} not valid identifier`);r.length;){const s=r.shift();if(Et(s)&&s.name==="endcapture")return;this.templates.push(n.parser.parseToken(s,r))}throw new Error(`tag ${e.getText()} not closed`)}*render(e){const n=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=n}}function pf(t){const e=t.readIdentifier().content;if(e)return e;const r=t.readQuoted();if(r)return Pn(r)}class mf extends ae{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[],this.value=new Ze(e.args,this.liquid),this.elseTemplates=[];let i=[];const s=this.liquid.parser.parseStream(r).on("tag:when",a=>{i=[];const l=new me(a.args,this.liquid.options.operators),o=[];for(;!l.end();)o.push(l.readValueOrThrow()),l.readTo(",");this.branches.push({values:o,templates:i})}).on("tag:else",()=>i=this.elseTemplates).on("tag:endcase",()=>s.stop()).on("template",a=>i.push(a)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});s.start()}*render(e,r){const n=this.liquid.renderer,i=H(yield this.value.value(e,e.opts.lenientIf));let s=!1;for(const a of this.branches)for(const l of a.values){const o=yield ve(l,e,e.opts.lenientIf);if(i===o){yield n.renderTemplates(a.templates,e,r),s=!0;break}}s||(yield n.renderTemplates(this.elseTemplates,e,r))}}class gf extends ae{constructor(e,r,n){for(super(e,r,n);r.length;){const i=r.shift();if(Et(i)&&i.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}}class yf extends ae{constructor(e,r,n){super(e,r,n);const i=e.args,s=new me(i,this.liquid.options.operators);for(this.file=An(s,this.liquid),this.currentFile=e.file;!s.end();){s.skipBlank();const a=s.p,l=s.readIdentifier();if((l.content==="with"||l.content==="for")&&(s.skipBlank(),s.peek()!==":")){const o=s.readValue();if(o){const u=s.p,c=s.readIdentifier();let f;c.content==="as"?f=s.readIdentifier():s.p=u,this[l.content]={value:o,alias:f&&f.content},s.skipBlank(),s.peek()===","&&s.advance();continue}}s.p=a;break}this.hash=new Pt(s.remaining())}*render(e,r){const{liquid:n,hash:i}=this,s=yield qn(this.file,e,n);pe(s,()=>`illegal filename "${s}"`);const a=new jt({},e.opts,{sync:e.sync,globals:e.globals,strictVariables:e.strictVariables}),l=a.bottom();if(Fr(l,yield i.render(e)),this.with){const{value:o,alias:u}=this.with;l[u||s]=yield ve(o,e)}if(this.for){const{value:o,alias:u}=this.for,c=kn(yield ve(o,e));l.forloop=new Tn(c.length,o.getText(),u);for(const f of c){l[u]=f;const d=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(d,a,r),l.forloop.next()}}else{const o=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(o,a,r)}}}function An(t,e){if(e.options.dynamicPartials){const i=t.readValue();if(i===void 0)throw new TypeError(`illegal argument "${t.input}"`);if(i.getText()==="none")return;if(ia(i)){const s=e.parse(Pn(i));return oa(s)}return i}const r=[...t.readFileNameTemplate(e.options)],n=oa(e.parser.parseTokens(r));return n==="none"?void 0:n}function oa(t){return t.length===1&&Nn(t[0].token)?t[0].token.getContent():t}function*qn(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):yield ve(t,e)}class vf extends ae{constructor(e,r,n){super(e,r,n);const i=e.args,s=new me(i,this.liquid.options.operators);this.file=An(s,this.liquid),this.currentFile=e.file;const a=s.p;s.readIdentifier().content==="with"?(s.skipBlank(),s.peek()!==":"?this.withVar=s.readValue():s.p=a):s.p=a,this.hash=new Pt(s.remaining(),this.liquid.options.jekyllInclude)}*render(e,r){const{liquid:n,hash:i,withVar:s}=this,{renderer:a}=n,l=yield qn(this.file,e,n);pe(l,()=>`illegal filename "${l}"`);const o=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",St.OUTPUT);const u=yield i.render(e);s&&(u[l]=yield ve(s,e));const c=yield n._parsePartialFile(l,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?{include:u}:u),yield a.renderTemplates(c,e,r),e.pop(),e.restoreRegister(o)}}class bf extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;kr(n[this.variable])||(n[this.variable]=0),r.write(B(--n[this.variable]))}}class wf extends ae{constructor(e,r,n){super(e,r,n),this.candidates=[];const i=new me(e.args,this.liquid.options.operators),s=i.readValue();for(i.skipBlank(),s&&(i.peek()===":"?(this.group=s,i.advance()):this.candidates.push(s));!i.end();){const a=i.readValue();a&&this.candidates.push(a),i.readTo(",")}pe(this.candidates.length,()=>`empty candidates: ${e.getText()}`)}*render(e,r){const i=`cycle:${yield ve(this.group,e)}:`+this.candidates.join(","),s=e.getRegister("cycle");let a=s[i];a===void 0&&(a=s[i]=0);const l=this.candidates[a];return a=(a+1)%this.candidates.length,s[i]=a,yield ve(l,e)}}class Cf extends ae{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;n.parser.parseStream(r).on("start",()=>this.branches.push({value:new Ze(e.args,this.liquid),templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new Ze(s.args,this.liquid),templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endif",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,templates:s}of this.branches){const a=yield i.value(e,e.opts.lenientIf);if(bt(a,e)){yield n.renderTemplates(s,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class Ef extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;kr(n[this.variable])||(n[this.variable]=0);const i=n[this.variable];n[this.variable]++,r.write(B(i))}}class Sf extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.file=An(i,this.liquid),this.currentFile=e.file,this.args=new Pt(i.remaining()),this.templates=this.liquid.parser.parseTokens(r)}*render(e,r){const{liquid:n,args:i,file:s}=this,{renderer:a}=n;if(s===void 0){e.setRegister("blockMode",St.OUTPUT),yield a.renderTemplates(this.templates,e,r);return}const l=yield qn(this.file,e,n);pe(l,()=>`illegal filename "${l}"`);const o=yield n._parseLayoutFile(l,e.sync,this.currentFile);e.setRegister("blockMode",St.STORE);const u=yield a.renderTemplates(this.templates,e),c=e.getRegister("blocks");c[""]===void 0&&(c[""]=(f,d)=>d.write(u)),e.setRegister("blockMode",St.OUTPUT),e.push(yield i.render(e)),yield a.renderTemplates(o,e,r),e.pop()}}class Rf extends ae{constructor(e,r,n){super(e,r,n),this.templates=[];const i=/\w+/.exec(e.args);for(this.block=i?i[0]:"";r.length;){const s=r.shift();if(Et(s)&&s.name==="endblock")return;const a=n.parser.parseToken(s,r);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,r){const n=this.getBlockRender(e);e.getRegister("blockMode")===St.STORE?e.getRegister("blocks")[this.block]=n:yield n(new Ns,r)}getBlockRender(e){const{liquid:r,templates:n}=this,i=e.getRegister("blocks")[this.block],s=function*(a,l){e.push({block:a}),yield r.renderer.renderTemplates(n,e,l),e.pop()};return i?(a,l)=>i(new Ns(()=>s(a,l)),l):s}}class xf extends ae{constructor(e,r,n){for(super(e,r,n),this.tokens=[];r.length;){const i=r.shift();if(Et(i)&&i.name==="endraw")return;this.tokens.push(i)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}}class Of extends Tn{constructor(e,r,n,i){super(e,n,i),this.length=e,this.cols=r}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}}class _f extends ae{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators),s=i.readIdentifier();i.skipBlank();const a=i.readIdentifier(),l=i.readValue();if(a.content!=="in"||!l)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=l,this.args=new Pt(i.remaining()),this.templates=[];let o;const u=this.liquid.parser.parseStream(r).on("start",()=>o=this.templates).on("tag:endtablerow",()=>u.stop()).on("template",c=>o.push(c)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});u.start()}*render(e,r){let n=kn(yield ve(this.collection,e));const i=yield this.args.render(e),s=i.offset||0,a=i.limit===void 0?n.length:i.limit;n=n.slice(s,s+a);const l=i.cols||n.length,o=this.liquid.renderer,u=new Of(n.length,l,this.collection.getText(),this.variable),c={tablerowloop:u};e.push(c);for(let f=0;f<n.length;f++,u.next())c[this.variable]=n[f],u.col0()===0&&(u.row()!==1&&r.write("</tr>"),r.write(`<tr class="row${u.row()}">`)),r.write(`<td class="col${u.col()}">`),yield o.renderTemplates(this.templates,e,r),r.write("</td>");n.length&&r.write("</tr>"),e.pop()}}class Tf extends ae{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;this.liquid.parser.parseStream(r).on("start",()=>this.branches.push({value:new Ze(e.args,this.liquid),test:Nr,templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new Ze(s.args,this.liquid),test:bt,templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endunless",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,test:s,templates:a}of this.branches){const l=yield i.value(e,e.opts.lenientIf);if(s(l,e)){yield n.renderTemplates(a,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class kf extends ae{render(e,r){r.break=!0}}class Df extends ae{render(e,r){r.continue=!0}}class Lf extends ae{constructor(e,r,n){super(e,r,n),this.value=new Ze(e.args,this.liquid)}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class Pf extends ae{constructor(e,r,n){super(e,r,n);const s=new me(e.args,this.liquid.options.operators).readLiquidTagTokens(this.liquid.options);this.templates=this.liquid.parser.parseTokens(s)}*render(e,r){yield this.liquid.renderer.renderTemplates(this.templates,e,r)}}class jf extends ae{constructor(e,r,n){if(super(e,r,n),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}}const Ff={assign:lf,for:uf,capture:ff,case:mf,comment:gf,include:vf,render:yf,decrement:bf,increment:Ef,cycle:wf,if:Cf,layout:Sf,block:Rf,raw:xf,tablerow:_f,unless:Tf,break:kf,continue:Df,echo:Lf,liquid:Pf,"#":jf};class In{constructor(e={}){this.renderer=new pd,this.filters={},this.tags={},this.options=qd(e),this.parser=new Gd(this),Ts(Ff,(r,n)=>this.registerTag(n,r)),Ts(of,(r,n)=>this.registerFilter(n,r))}parse(e,r){return this.parser.parse(e,r)}_render(e,r,n){const i=r instanceof jt?r:new jt(r,this.options,n);return this.renderer.renderTemplates(e,i)}render(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._render(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderSync(e,r,n){return st(this._render(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderToNodeStream(e,r,n={}){const i=new jt(r,this.options,n);return this.renderer.renderTemplatesToNodeStream(e,i)}_parseAndRender(e,r,n){const i=this.parse(e);return this._render(i,r,n)}parseAndRender(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}parseAndRenderSync(e,r,n){return st(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!0})))}_parsePartialFile(e,r,n){return this.parser.parseFile(e,r,Ct.Partials,n)}_parseLayoutFile(e,r,n){return this.parser.parseFile(e,r,Ct.Layouts,n)}_parseFile(e,r,n,i){return this.parser.parseFile(e,r,n,i)}parseFile(e,r){return Ye(this,void 0,void 0,function*(){return it(this.parser.parseFile(e,!1,r))})}parseFileSync(e,r){return st(this.parser.parseFile(e,!0,r))}*_renderFile(e,r,n){const i=yield this._parseFile(e,n.sync,n.lookupType);return yield this._render(i,r,n)}renderFile(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderFileSync(e,r,n){return st(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderFileToNodeStream(e,r,n){return Ye(this,void 0,void 0,function*(){const i=yield this.parseFile(e);return this.renderToNodeStream(i,r,n)})}_evalValue(e,r){const n=new Ze(e,this),i=r instanceof jt?r:new jt(r,this.options);return n.value(i)}evalValue(e,r){return Ye(this,void 0,void 0,function*(){return it(this._evalValue(e,r))})}evalValueSync(e,r){return st(this._evalValue(e,r))}registerFilter(e,r){this.filters[e]=r}registerTag(e,r){this.tags[e]=be(r)?r:Qd(r)}plugin(e){return e.call(this,In)}express(){const e=this;let r=!0;return function(n,i,s){if(r){r=!1;const a=Ar(this.root);e.options.root.unshift(...a),e.options.layouts.unshift(...a),e.options.partials.unshift(...a)}e.renderFile(n,i).then(a=>s(null,a),s)}}}const Rt=new In;function Mf(t,e){return M.useMemo(()=>Nf(t,e),[t,e])}function Nf(t,e){return t.map(r=>{const n=e||r.transform;return n?Object.keys(n).reduce((i,s)=>s==="details"?(i[s]=n[s].map(a=>Array.isArray(a)?a.map(l=>({label:l.label,value:Rt.parseAndRenderSync(l.value,r),html:l.html})):{label:a.label,value:Rt.parseAndRenderSync(a.value,r),html:a.html}),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]=Rt.parseAndRenderSync(a[o][c],r),u),{}):l[o]=Rt.parseAndRenderSync(a[o],r),l),{})),i):(i[s]=Rt.parseAndRenderSync(n[s],r),i),{}):r})}function la({path:t,placeholderText:e,dynamicOptions:r}){var te;let{asyncUrl:n,method:i,payload:s,transform:a,clientSideFilter:l,rootData:o,includeHeaders:u}=r,c=Po();const f=Re(),{activeIndex:d,search:m,setActions:v,navigateTo:w}=M.useContext(rt),E=xu(m,500),O=u&&f.headers?f.headers:{},k={method:i||"get",credentials:"include",headers:O};s&&k.method!=="get"&&(k.body=Rt.parseAndRenderSync(s,{...c,query:E}));const{isLoading:C,error:S,data:A=[]}=Ru({queryKey:[t,l?"":E],enabled:!!n,queryFn:()=>fetch(Rt.parseAndRenderSync(n,{...c,query:E}),k).then(Q=>Q.json())}),_=o?Ec(A,o,[]):A,F=M.useMemo(()=>Array.isArray(_)?_:[_],[_]);let j=Mf(F,a);l&&(j=j.filter(Q=>Q.title.toLowerCase().includes(m.toLowerCase())));const q=j[d];return M.useEffect(()=>{q&&q.actions?v(q.actions):v([])},[q,m,d,v]),C?y.jsx(er,{children:y.jsx("div",{className:"qikbar-item-empty",children:"loading..."})}):j.length===0?y.jsxs(er,{children:[y.jsx(wr,{placeholder:e}),y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})]}):y.jsxs(y.Fragment,{children:[y.jsx(wr,{placeholder:e}),y.jsxs(er,{children:[y.jsx(Ui,{children:j.map(Q=>y.jsx(cn,{item:Q},Q.id))}),q&&((te=q==null?void 0:q.details)==null?void 0:te.length)>0&&y.jsx(Hi,{fields:q.details})]})]})}class Af extends M.Component{constructor(){super(...arguments);pa(this,"state",{hasError:!1})}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,n){}render(){return this.state.hasError?y.jsx("div",{className:"qikbar-command-wrapper",children:"Something went wrong."}):this.props.children}}function ua(){let t=Li();return y.jsx("div",{className:"qikbar-command-wrapper",children:y.jsxs("div",{className:"qikbar-command-bar",children:[y.jsx("div",{className:"qikbar-command-content",children:y.jsxs("div",{className:"qikbar-command-error",children:["It looks like there maybe a problem. If you continue to see this please contact @"," ",y.jsx("a",{href:`mailto:support@qikbar.com?subject=Issues with running qikbar on my site.&body=The current error is: ${t}`,children:"support@qikbar.com"})]})}),y.jsx("div",{className:"qikbar-command-footer",children:y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})})})]})})}const Re=Da(t=>({commands:[],router:null,headers:null,id:null,theme:null,addRouter:e=>{t(r=>({router:e}))},addHeaders:e=>{t(()=>({headers:e}))},setId:e=>{t(()=>({id:e}))},setTheme:e=>{t(()=>({theme:e}))},addCommand:e=>{t(r=>({commands:[...r.commands,e]}))},addCommands:e=>{t(r=>({commands:e}))},updateCommand:e=>{t(r=>({commands:r.commands.map(n=>n.id===e.id?e:n)}))},removeCommand:e=>{t(r=>({commands:r.commands.filter(n=>n.id!==e.id)}))}})),ca=new su;function qf({path:t,commands:e,theme:r}){const n=Ni([{path:"/",element:y.jsx(Vi,{demo:!0,defaultOpen:!0,wrapperClass:"qikbar-command-demo-wrapper"}),errorElement:y.jsx(ua,{}),children:e.map(i=>({path:i.path,element:i.type==="STATIC"?y.jsx(Qi,{...i}):y.jsx(la,{...i})}))}],{initialEntries:[t||"/"]});return y.jsx("div",{id:"qikbar",className:`qikbar-demo qikbar-light qikbar-${r}`,children:y.jsx(ds,{client:ca,children:y.jsx(ji,{router:n})})})}function If(){const t=Re(n=>n.commands),e=Re(n=>n.theme),r=Ni([{path:"/",element:y.jsx(Vi,{}),errorElement:y.jsx(ua,{}),children:t.map(n=>({path:n.path,element:n.type==="STATIC"?y.jsx(Qi,{...n}):y.jsx(la,{...n})}))}]);return y.jsx("div",{id:"qikbar",className:`qikbar-light qikbar-${e}`,children:y.jsx(ji,{router:r})})}const da=async t=>fetch(`https://app.qikbar.com/api/site/${t}`).then(r=>r.json()).then(r=>{r!=null&&r.routes&&Re.getState().addCommands(r.routes),r!=null&&r.theme&&Re.getState().setTheme(r.theme),r!=null&&r.id&&Re.getState().setId(r.id)}).catch(r=>{console.error(r)});function Vf({id:t}){return da(t),{id:t,boot:({elementId:r})=>{Ht.createRoot(document.getElementById(r)).render(y.jsx(M.StrictMode,{children:y.jsx(Af,{children:y.jsx(ds,{client:ca,children:y.jsx(If,{})})})})),window.Qikbar.booted=!0},setTheme:r=>Re.getState().setTheme(r),reloadSite:()=>da(t),addCommand:r=>Re.getState().addCommand(r),updateCommand:r=>Re.getState().updateCommand(r),removeCommand:r=>Re.getState().removeCommand(r),addRouter:r=>Re.getState().addRouter(r),addHeaders:r=>Re.getState().addHeaders(r)}}function ha(t){return window.Qikbar=Vf({id:t}),window.addEventListener("message",function(e){var r;(r=e==null?void 0:e.data)!=null&&r.reloadSite&&window.Qikbar.reloadSite()}),window.Qikbar}function Uf({elementId:t,router:e,siteId:r}){return M.useEffect(()=>{if(window.Qikbar)return;const n=ha(r);n.boot({elementId:t||"qikbar"}),e&&n.addRouter(e)},[e,t,r]),t?null:y.jsx("div",{id:"qikbar"})}const fp="";ye.DemoBar=qf,ye.Qikbar=Uf,ye.init=ha,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});
|