(self.webpackChunk=self.webpackChunk||[]).push([[0],{7645:(e,t,n)=>{"use strict";n.r(t);var r=n(33286),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),l=s.next();!l.done;l=s.next()){var u=l.value;a[u]=e[u]}}catch(d){r={error:d}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var c=JSON.parse(f(a,n));return f(i(i({},e),c))}function p(e,t){e.machine,e.configuration,e.history;var n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=k(u,r,l),f=r,h={},p=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e||{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(null==n)return{};const u=S(r),c={x:i,y:o},d=E(a),f=w(d),h=await l.getDimensions(n),p="y"===d?"top":"left",v="y"===d?"bottom":"right",m=s.reference[f]+s.reference[d]-c[d]-s.floating[f],g=c[d]-s.reference[d],y=await(null==l.getOffsetParent?void 0:l.getOffsetParent(n));let b=y?"y"===d?y.clientHeight||0:y.clientWidth||0:0;0===b&&(b=s.floating[f]);const _=m/2-g/2,k=u[p],N=b-h[f]-u[v],P=b/2-h[f]/2+_,C=D(k,P,N),T=null!=x(a)&&P!=C&&s.reference[f]/2-(Pe.concat(t,t+"-start",t+"-end")),[]),{left:"right",right:"left",bottom:"top",top:"bottom"});function R(e){return e.replace(/left|right|bottom|top/g,(e=>M[e]))}function I(e,t,n){void 0===n&&(n=!1);const r=x(e),i=E(e),o=w(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=R(a)),{main:a,cross:R(a)}}const L={start:"end",end:"start"};function B(e){return e.replace(/start|end/g,(e=>L[e]))}const F=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...v}=e,m=_(r),g=_(a)===a,y=await(null==s.isRTL?void 0:s.isRTL(l.floating)),b=d||(g||!p?[R(a)]:function(e){const t=R(e);return[B(e),t,B(t)]}(a));d||"none"===h||b.push(...function(e,t,n,r){const i=x(e);let o=function(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}(_(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(B)))),o}(a,p,h,y));const w=[a,...b],E=await C(t,v),k=[];let N=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&k.push(E[m]),c){const{main:e,cross:t}=I(r,o,y);k.push(E[e],E[t])}if(N=[...N,{placement:r,overflows:k}],!k.every((e=>e<=0))){var S,P;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(P=N.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!n)switch(f){case"bestFit":{var T;const e=null==(T=N.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const z=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=_(n),s=x(n),l="x"===E(n),u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function V(e){return"x"===e?"y":"x"}const G=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=e,u={x:n,y:r},c=await C(t,l),d=E(_(i)),f=V(d);let h=u[d],p=u[f];if(o){const e="y"===d?"bottom":"right";h=D(h+c["y"===d?"top":"left"],h,h-c[e])}if(a){const e="y"===f?"bottom":"right";p=D(p+c["y"===f?"top":"left"],p,p-c[e])}const v=s.fn({...t,[d]:h,[f]:p});return{...v,data:{x:v.x-n,y:v.y-r}}}}};function U(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function W(e){return U(e).getComputedStyle(e)}const q=Math.min,H=Math.max,Y=Math.round;function X(e){const t=W(e);let n=parseFloat(t.width),r=parseFloat(t.height);const i=e.offsetWidth,o=e.offsetHeight,a=Y(n)!==i||Y(r)!==o;return a&&(n=i,r=o),{width:n,height:r,fallback:a}}function $(e){return ee(e)?(e.nodeName||"").toLowerCase():""}let K;function Z(){if(K)return K;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(K=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),K):navigator.userAgent}function Q(e){return e instanceof U(e).HTMLElement}function J(e){return e instanceof U(e).Element}function ee(e){return e instanceof U(e).Node}function te(e){return"undefined"!=typeof ShadowRoot&&(e instanceof U(e).ShadowRoot||e instanceof ShadowRoot)}function ne(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function re(e){return["table","td","th"].includes($(e))}function ie(e){const t=/firefox/i.test(Z()),n=W(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function oe(){return/^((?!chrome|android).)*safari/i.test(Z())}function ae(e){return["html","body","#document"].includes($(e))}function se(e){return J(e)?e:e.contextElement}const le={x:1,y:1};function ue(e){const t=se(e);if(!Q(t))return le;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=X(t);let a=(o?Y(n.width):n.width)/r,s=(o?Y(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function ce(e,t,n,r){var i,o;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),s=se(e);let l=le;t&&(r?J(r)&&(l=ue(r)):l=ue(e));const u=s?U(s):window,c=oe()&&n;let d=(a.left+(c&&(null==(i=u.visualViewport)?void 0:i.offsetLeft)||0))/l.x,f=(a.top+(c&&(null==(o=u.visualViewport)?void 0:o.offsetTop)||0))/l.y,h=a.width/l.x,p=a.height/l.y;if(s){const e=U(s),t=r&&J(r)?U(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=ue(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,d*=e.x,f*=e.y,h*=e.x,p*=e.y,d+=t.x,f+=t.y,n=U(n).frameElement}}return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function de(e){return((ee(e)?e.ownerDocument:e.document)||window.document).documentElement}function fe(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function he(e){return ce(de(e)).left+fe(e).scrollLeft}function pe(e){if("html"===$(e))return e;const t=e.assignedSlot||e.parentNode||te(e)&&e.host||de(e);return te(t)?t.host:t}function ve(e){const t=pe(e);return ae(t)?t.ownerDocument.body:Q(t)&&ne(t)?t:ve(t)}function me(e,t){var n;void 0===t&&(t=[]);const r=ve(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=U(r);return i?t.concat(o,o.visualViewport||[],ne(r)?r:[]):t.concat(r,me(r))}function ge(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=U(e),r=de(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const e=oe();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=de(e),n=fe(e),r=e.ownerDocument.body,i=H(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=H(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+he(e);const s=-n.scrollTop;return"rtl"===W(r).direction&&(a+=H(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}(de(e));else if(J(t))r=function(e,t){const n=ce(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Q(e)?ue(e):{x:1,y:1};return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n={...t};if(oe()){var i,o;const t=U(e);n.x-=(null==(i=t.visualViewport)?void 0:i.offsetLeft)||0,n.y-=(null==(o=t.visualViewport)?void 0:o.offsetTop)||0}r=n}return P(r)}function ye(e,t){return Q(e)&&"fixed"!==W(e).position?t?t(e):e.offsetParent:null}function be(e,t){const n=U(e);let r=ye(e,t);for(;r&&re(r)&&"static"===W(r).position;)r=ye(r,t);return r&&("html"===$(r)||"body"===$(r)&&"static"===W(r).position&&!ie(r))?n:r||function(e){let t=pe(e);for(;Q(t)&&!ae(t);){if(ie(t))return t;t=pe(t)}return null}(e)||n}function xe(e,t,n){const r=Q(t),i=de(t),o=ce(e,!0,"fixed"===n,t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==$(t)||ne(i))&&(a=fe(t)),Q(t)){const e=ce(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=he(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}const we={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=me(e).filter((e=>J(e)&&"body"!==$(e))),i=null;const o="fixed"===W(e).position;let a=o?pe(e):e;for(;J(a)&&!ae(a);){const e=W(a),t=ie(a);"fixed"===e.position?i=null:(o?t||i:t||"static"!==e.position||!i||!["absolute","fixed"].includes(i.position))?i=e:r=r.filter((e=>e!==a)),a=pe(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...o,r],s=a[0],l=a.reduce(((e,n)=>{const r=ge(t,n,i);return e.top=H(r.top,e.top),e.right=q(r.right,e.right),e.bottom=q(r.bottom,e.bottom),e.left=H(r.left,e.left),e}),ge(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Q(n),o=de(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((i||!i&&"fixed"!==r)&&(("body"!==$(n)||ne(o))&&(a=fe(n)),Q(n))){const e=ce(n);s=ue(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:J,getDimensions:function(e){return Q(e)?X(e):e.getBoundingClientRect()},getOffsetParent:be,getDocumentElement:de,getScale:ue,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||be,o=this.getDimensions;return{reference:xe(t,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===W(e).direction};function _e(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=l||o?[...J(e)?me(e):e.contextElement?me(e.contextElement):[],...me(t)]:[];u.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));let c,d=null;if(a){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),J(e)&&!s&&d.observe(e),J(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t)}let f=s?ce(e):null;return s&&function t(){const r=ce(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,c=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{l&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,s&&cancelAnimationFrame(c)}}const Ee=(e,t,n)=>{const r=new Map,i={platform:we,...n},o={...i.platform,_c:r};return N(e,t,{...i,platform:o})},ke=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn(e){return r=t,Object.prototype.hasOwnProperty.call(r,"current")?null!=t.current?O({element:t.current,padding:n}).fn(e):{}:t?O({element:t,padding:n}).fn(e):{};var r}}};var Ne="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function Se(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!Se(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!Se(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Pe(e){const t=r.useRef(e);return Ne((()=>{t.current=e})),t}var Ce="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;let Te=!1,je=0;const De=()=>"floating-ui-"+je++;const Oe=r["useId".toString()]||function(){const[e,t]=r.useState((()=>Te?De():void 0));return Ce((()=>{null==e&&t(De())}),[]),r.useEffect((()=>{Te||(Te=!0)}),[]),e};function Ae(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter((e=>e!==n)))}}}const Me=r.createContext(null),Re=r.createContext(null),Ie=()=>{var e;return(null==(e=r.useContext(Me))?void 0:e.id)||null},Le=()=>r.useContext(Re);function Be(e){return(null==e?void 0:e.ownerDocument)||document}function Fe(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function ze(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function Ve(e){return Be(e).defaultView||window}function Ge(e){return!!e&&e instanceof Ve(e).Element}function Ue(e){return!!e&&e instanceof Ve(e).HTMLElement}function We(e){if(0===e.mozInputSource&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Fe())||t.test(ze()))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}function qe(e){return 0===e.width&&0===e.height||1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"!==e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail}function He(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Ye(e){const t=(0,r.useRef)(e);return Ce((()=>{t.current=e})),t}const Xe="data-floating-ui-safe-polygon";function $e(e,t,n){return n&&!He(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}const Ke=function(e,t){let{enabled:n=!0,delay:i=0,handleClose:o=null,mouseOnly:a=!1,restMs:s=0,move:l=!0}=void 0===t?{}:t;const{open:u,onOpenChange:c,dataRef:d,events:f,elements:{domReference:h,floating:p},refs:v}=e,m=Le(),g=Ie(),y=Ye(o),b=Ye(i),x=r.useRef(),w=r.useRef(),_=r.useRef(),E=r.useRef(),k=r.useRef(!0),N=r.useRef(!1),S=r.useRef((()=>{})),P=r.useCallback((()=>{var e;const t=null==(e=d.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[d]);r.useEffect((()=>{if(n)return f.on("dismiss",e),()=>{f.off("dismiss",e)};function e(){clearTimeout(w.current),clearTimeout(E.current),k.current=!0}}),[n,f]),r.useEffect((()=>{if(!n||!y.current||!u)return;function e(){P()&&c(!1)}const t=Be(p).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[p,u,c,n,y,d,P]);const C=r.useCallback((function(e){void 0===e&&(e=!0);const t=$e(b.current,"close",x.current);t&&!_.current?(clearTimeout(w.current),w.current=setTimeout((()=>c(!1)),t)):e&&(clearTimeout(w.current),c(!1))}),[b,c]),T=r.useCallback((()=>{S.current(),_.current=void 0}),[]),j=r.useCallback((()=>{if(N.current){const e=Be(v.floating.current).body;e.style.pointerEvents="",e.removeAttribute(Xe),N.current=!1}}),[v]);return r.useEffect((()=>{if(n&&Ge(h)){const e=h;return u&&e.addEventListener("mouseleave",o),null==p||p.addEventListener("mouseleave",o),l&&e.addEventListener("mousemove",r,{once:!0}),e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",i),()=>{u&&e.removeEventListener("mouseleave",o),null==p||p.removeEventListener("mouseleave",o),l&&e.removeEventListener("mousemove",r),e.removeEventListener("mouseenter",r),e.removeEventListener("mouseleave",i)}}function t(){return!!d.current.openEvent&&["click","mousedown"].includes(d.current.openEvent.type)}function r(e){if(clearTimeout(w.current),k.current=!1,a&&!He(x.current)||s>0&&0===$e(b.current,"open"))return;d.current.openEvent=e;const t=$e(b.current,"open",x.current);t?w.current=setTimeout((()=>{c(!0)}),t):c(!0)}function i(n){if(t())return;S.current();const r=Be(p);if(clearTimeout(E.current),y.current){u||clearTimeout(w.current),_.current=y.current({...e,tree:m,x:n.clientX,y:n.clientY,onClose(){j(),T(),C()}});const t=_.current;return r.addEventListener("mousemove",t),void(S.current=()=>{r.removeEventListener("mousemove",t)})}C()}function o(n){t()||null==y.current||y.current({...e,tree:m,x:n.clientX,y:n.clientY,onClose(){j(),T(),C()}})(n)}}),[h,p,n,e,a,s,l,C,T,j,c,u,m,b,y,d]),Ce((()=>{var e;if(n&&u&&null!=(e=y.current)&&e.__options.blockPointerEvents&&P()){const e=Be(p).body;if(e.setAttribute(Xe,""),e.style.pointerEvents="none",N.current=!0,Ge(h)&&p){var t,r;const e=h,n=null==m||null==(t=m.nodesRef.current.find((e=>e.id===g)))||null==(r=t.context)?void 0:r.elements.floating;return n&&(n.style.pointerEvents=""),e.style.pointerEvents="auto",p.style.pointerEvents="auto",()=>{e.style.pointerEvents="",p.style.pointerEvents=""}}}}),[n,u,g,p,h,m,y,d,P]),Ce((()=>{u||(x.current=void 0,T(),j())}),[u,T,j]),r.useEffect((()=>()=>{T(),clearTimeout(w.current),clearTimeout(E.current),j()}),[n,T,j]),r.useMemo((()=>{if(!n)return{};function e(e){x.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(){u||0===s||(clearTimeout(E.current),E.current=setTimeout((()=>{k.current||c(!0)}),s))}},floating:{onMouseEnter(){clearTimeout(w.current)},onMouseLeave(){f.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),C(!1)}}}}),[f,n,s,u,c,C])};function Ze(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}))||[],r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))}))||[],n=n.concat(r);return n}function Qe(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Je="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function et(e){return Ue(e)&&e.matches(Je)}const tt=r["useInsertionEffect".toString()]||(e=>e());function nt(e){const t=r.useRef((()=>{throw new Error("Cannot call an event handler while rendering.")}));return tt((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;rs?{reference:{onPointerDown(e){f.current=e.pointerType},onMouseDown(e){0===e.button&&(He(f.current,!0)&&c||"click"!==l&&(n?!u||o.current.openEvent&&"mousedown"!==o.current.openEvent.type||i(!1):(e.preventDefault(),i(!0)),o.current.openEvent=e.nativeEvent))},onClick(e){o.current.__syncReturnFocus||("mousedown"===l&&f.current?f.current=void 0:He(f.current,!0)&&c||(n?!u||o.current.openEvent&&"click"!==o.current.openEvent.type||i(!1):i(!0),o.current.openEvent=e.nativeEvent))},onKeyDown(e){f.current=void 0,d&&(rt(e)||(" "!==e.key||it(a)||e.preventDefault(),"Enter"===e.key&&(n?u&&i(!1):i(!0))))},onKeyUp(e){d&&(rt(e)||it(a)||" "===e.key&&(n?u&&i(!1):i(!0)))}}}:{}),[s,o,l,c,d,a,u,n,i])};function at(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}const st={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},lt={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ut=function(e,t){let{open:n,onOpenChange:i,events:o,nodeId:a,elements:{reference:s,domReference:l,floating:u},dataRef:c}=e,{enabled:d=!0,escapeKey:f=!0,outsidePress:h=!0,outsidePressEvent:p="pointerdown",referencePress:v=!1,referencePressEvent:m="pointerdown",ancestorScroll:g=!1,bubbles:y=!0}=void 0===t?{}:t;const b=Le(),x=null!=Ie(),w=nt("function"==typeof h?h:()=>!1),_="function"==typeof h?w:h,E=r.useRef(!1),{escapeKeyBubbles:k,outsidePressBubbles:N}=function(e){var t,n;return void 0===e&&(e=!0),{escapeKeyBubbles:"boolean"==typeof e?e:null==(t=e.escapeKey)||t,outsidePressBubbles:"boolean"==typeof e?e:null==(n=e.outsidePress)||n}}(y);return r.useEffect((()=>{if(!n||!d)return;function e(e){if("Escape"===e.key){const e=b?Ze(b.nodesRef.current,a):[];if(e.length>0){let t=!0;if(e.forEach((e=>{var n;null==(n=e.context)||!n.open||e.context.dataRef.current.__escapeKeyBubbles||(t=!1)})),!t)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),i(!1)}}function t(e){const t=E.current;if(E.current=!1,t)return;if("function"==typeof _&&!_(e))return;const n=Qe(e);if(Ue(n)&&u){const t=u.ownerDocument.defaultView||window,r=n.scrollWidth>n.clientWidth,i=n.scrollHeight>n.clientHeight;let o=i&&e.offsetX>n.clientWidth;if(i){"rtl"===t.getComputedStyle(n).direction&&(o=e.offsetX<=n.offsetWidth-n.clientWidth)}if(o||r&&e.offsetY>n.clientHeight)return}const r=b&&Ze(b.nodesRef.current,a).some((t=>{var n;return at(e,null==(n=t.context)?void 0:n.elements.floating)}));if(at(e,u)||at(e,l)||r)return;const s=b?Ze(b.nodesRef.current,a):[];if(s.length>0){let e=!0;if(s.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:x?{preventScroll:!0}:We(e)||qe(e)}}),i(!1)}function r(){i(!1)}c.current.__escapeKeyBubbles=k,c.current.__outsidePressBubbles=N;const h=Be(u);f&&h.addEventListener("keydown",e),_&&h.addEventListener(p,t);let v=[];return g&&(Ge(l)&&(v=me(l)),Ge(u)&&(v=v.concat(me(u))),!Ge(s)&&s&&s.contextElement&&(v=v.concat(me(s.contextElement)))),v=v.filter((e=>{var t;return e!==(null==(t=h.defaultView)?void 0:t.visualViewport)})),v.forEach((e=>{e.addEventListener("scroll",r,{passive:!0})})),()=>{f&&h.removeEventListener("keydown",e),_&&h.removeEventListener(p,t),v.forEach((e=>{e.removeEventListener("scroll",r)}))}}),[c,u,l,s,f,_,p,o,b,a,n,i,g,d,k,N,x]),r.useEffect((()=>{E.current=!1}),[_,p]),r.useMemo((()=>d?{reference:{[st[m]]:()=>{v&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),i(!1))}},floating:{[lt[p]]:()=>{E.current=!0}}}:{}),[d,o,v,p,m,i])};const ct=function(e,t){let{open:n}=e,{enabled:i=!0,role:o="dialog"}=void 0===t?{}:t;const a=Oe(),s=Oe();return r.useMemo((()=>{const e={id:a,role:o};return i?"tooltip"===o?{reference:{"aria-describedby":n?a:void 0},floating:e}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===o?"dialog":o,"aria-controls":n?a:void 0,..."listbox"===o&&{role:"combobox"},..."menu"===o&&{id:s}},floating:{...e,..."menu"===o&&{"aria-labelledby":s}}}:{}}),[i,o,n,a,s])};function dt(e){void 0===e&&(e={});const{open:t=!1,onOpenChange:n,nodeId:i}=e,o=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,whileElementsMounted:a,open:s}=e,[l,u]=r.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[c,d]=r.useState(i);Se(c,i)||d(i);const f=r.useRef(null),h=r.useRef(null),p=r.useRef(l),v=Pe(a),m=Pe(o),[g,y]=r.useState(null),[b,x]=r.useState(null),w=r.useCallback((e=>{f.current!==e&&(f.current=e,y(e))}),[]),_=r.useCallback((e=>{h.current!==e&&(h.current=e,x(e))}),[]),E=r.useCallback((()=>{if(!f.current||!h.current)return;const e={placement:t,strategy:n,middleware:c};m.current&&(e.platform=m.current),Ee(f.current,h.current,e).then((e=>{const t={...e,isPositioned:!0};k.current&&!Se(p.current,t)&&(p.current=t,r.flushSync((()=>{u(t)})))}))}),[c,t,n,m]);Ne((()=>{!1===s&&p.current.isPositioned&&(p.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[s]);const k=r.useRef(!1);Ne((()=>(k.current=!0,()=>{k.current=!1})),[]),Ne((()=>{if(g&&b){if(v.current)return v.current(g,b,E);E()}}),[g,b,E,v]);const N=r.useMemo((()=>({reference:f,floating:h,setReference:w,setFloating:_})),[w,_]),S=r.useMemo((()=>({reference:g,floating:b})),[g,b]);return r.useMemo((()=>({...l,update:E,refs:N,elements:S,reference:w,floating:_})),[l,E,N,S,w,_])}(e),a=Le(),s=r.useRef(null),l=r.useRef({}),u=r.useState((()=>Ae()))[0],[c,d]=r.useState(null),f=r.useCallback((e=>{const t=Ge(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;o.refs.setReference(t)}),[o.refs]),h=r.useCallback((e=>{(Ge(e)||null===e)&&(s.current=e,d(e)),(Ge(o.refs.reference.current)||null===o.refs.reference.current||null!==e&&!Ge(e))&&o.refs.setReference(e)}),[o.refs]),p=r.useMemo((()=>({...o.refs,setReference:h,setPositionReference:f,domReference:s})),[o.refs,h,f]),v=r.useMemo((()=>({...o.elements,domReference:c})),[o.elements,c]),m=nt(n),g=r.useMemo((()=>({...o,refs:p,elements:v,dataRef:l,nodeId:i,events:u,open:t,onOpenChange:m})),[o,i,u,t,m,p,v]);return Ce((()=>{const e=null==a?void 0:a.nodesRef.current.find((e=>e.id===i));e&&(e.context=g)})),r.useMemo((()=>({...o,context:g,refs:p,reference:h,positionReference:f})),[o,p,g,h,f])}function ft(e,t,n){const r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map((e=>e?e[n]:null)).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var o;0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(o=r.get(n))||o.push(i),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;oe(...i)))})):e[n]=i})),e):e),{})}}const ht=function(e){void 0===e&&(e=[]);const t=e,n=r.useCallback((t=>ft(t,e,"reference")),t),i=r.useCallback((t=>ft(t,e,"floating")),t),o=r.useCallback((t=>ft(t,e,"item")),e.map((e=>null==e?void 0:e.item)));return r.useMemo((()=>({getReferenceProps:n,getFloatingProps:i,getItemProps:o})),[n,i,o])};var pt=n(75644),vt=0;function mt(e,t,n,r,i){var o,a,s={};for(a in t)"ref"==a?o=t[a]:s[a]=t[a];var l={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--vt,__source:r,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(a in o)void 0===s[a]&&(s[a]=o[a]);return pt.options.vnode&&pt.options.vnode(l),l}var gt="/Users/distiller/repo/graph/ui-tooltips/src/lib/tooltip.tsx";function yt({children:e,open:t=!1,content:n,placement:i="top",reference:o,openAction:a="click",strategy:s="absolute"}){const[l,u]=(0,r.useState)(t),c=(0,r.useRef)(null),{x:d,y:f,refs:h,strategy:p,placement:v,middlewareData:{arrow:{x:m,y:g}={}},context:y}=dt({placement:i,whileElementsMounted:"fixed"===s?_e:void 0,open:l,onOpenChange:u,strategy:s,middleware:[z(6),F(),G({padding:6}),ke({element:c})]}),b={top:"bottom",right:"left",bottom:"top",left:"right"}[v.split("-")[0]]||"bottom";(0,r.useLayoutEffect)((()=>{o&&h.setReference(o)}),[h,o]);const x=ot(y,{enabled:"click"===a}),w=ut(y,{enabled:"click"===a,referencePress:!1,outsidePress:!0,outsidePressEvent:"mousedown"}),_=Ke(y,{enabled:"hover"===a}),E=ct(y,{role:"tooltip"}),{getReferenceProps:k,getFloatingProps:N}=ht([x,_,w,E]),S={ref:h.setReference,...k()};return mt(pt.Fragment,{children:[!o&&e?(0,r.cloneElement)(e,S):e,l?mt("div",{ref:h.setFloating,style:{position:p,top:f??0,left:d??0,width:"max-content"},className:"z-10 min-w-[250px] rounded-md border border-slate-500",...N(),children:[mt("div",{style:{left:null!=m?`${m}px`:"",top:null!=g?`${g}px`:"",right:"",bottom:"",[b]:"-4px"},className:"absolute -z-10 h-4 w-4 rotate-45 bg-slate-500",ref:c},void 0,!1,{fileName:gt,lineNumber:127,columnNumber:11}),mt("div",{className:"select-text rounded-md bg-white p-3 dark:bg-slate-900 dark:text-slate-400",children:n},void 0,!1,{fileName:gt,lineNumber:138,columnNumber:11})]},void 0,!0,{fileName:gt,lineNumber:116,columnNumber:9}):null]},void 0,!0)}const bt=r.forwardRef((function({title:e,titleId:t,...n},i){return r.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:i,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"}))}));const xt=r.forwardRef((function({title:e,titleId:t,...n},i){return r.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:i,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9.75L14.25 12m0 0l2.25 2.25M14.25 12l2.25-2.25M14.25 12L12 14.25m-2.58 4.92l-6.375-6.375a1.125 1.125 0 010-1.59L9.42 4.83c.211-.211.498-.33.796-.33H19.5a2.25 2.25 0 012.25 2.25v10.5a2.25 2.25 0 01-2.25 2.25h-9.284c-.298 0-.585-.119-.796-.33z"}))}));var wt="/Users/distiller/repo/graph/ui-components/src/lib/debounced-text-input.tsx";function _t({initialText:e,placeholderText:t,resetTextFilter:n,updateTextFilter:i}){const[o,a]=(0,r.useState)(e??""),[s,l]=function(e,t){const[n,i]=(0,r.useState)(e);return(0,r.useEffect)((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),[n,i]}(o,500);function u(e){""===e?(a(""),l(""),n()):a(e)}return(0,r.useEffect)((()=>{""!==s&&i(s)}),[s,i]),mt("form",{className:"group relative flex rounded-md shadow-sm",onSubmit:e=>e.preventDefault(),children:[mt("span",{className:"inline-flex items-center rounded-l-md border border-r-0 border-slate-300 bg-slate-50 p-2 dark:border-slate-900 dark:bg-slate-800",children:mt(bt,{className:"h-4 w-4"},void 0,!1,{fileName:wt,lineNumber:61,columnNumber:9})},void 0,!1,{fileName:wt,lineNumber:60,columnNumber:7}),mt("input",{type:"text",className:"block w-full flex-1 rounded-none rounded-r-md border border-slate-300 bg-white p-1.5 font-light text-slate-400 placeholder:font-light placeholder:text-slate-400 dark:border-slate-900 dark:bg-slate-800 dark:text-white dark:hover:bg-slate-700",placeholder:t,"data-cy":"textFilterInput",name:"filter",value:o,onKeyUp:function(e){"Enter"===e.key&&u(e.currentTarget.value)},onChange:e=>u(e.currentTarget.value)},void 0,!1,{fileName:wt,lineNumber:63,columnNumber:7}),o.length>0?mt("button",{"data-cy":"textFilterReset",type:"reset",onClick:function(){a(""),l(""),n()},className:"absolute top-1 right-1 inline-block rounded-md bg-slate-50 p-1 text-slate-400 dark:bg-slate-800",children:mt(xt,{className:"h-5 w-5"},void 0,!1,{fileName:wt,lineNumber:80,columnNumber:11})},void 0,!1,{fileName:wt,lineNumber:74,columnNumber:9}):null]},void 0,!0,{fileName:wt,lineNumber:56,columnNumber:5})}var Et="/Users/distiller/repo/graph/ui-components/src/lib/tag.tsx";function kt({className:e,children:t,...n}){return mt("span",{className:`${e} inline-block rounded-md bg-slate-300 p-2 font-sans text-xs font-semibold uppercase leading-4 tracking-wide text-slate-700`,...n,children:t},void 0,!1,{fileName:Et,lineNumber:12,columnNumber:5})}var Nt="/Users/distiller/repo/graph/ui-components/src/lib/dropdown.tsx";function St(e){const{className:t,children:n,...r}=e;return mt("select",{className:`form-select flex items-center rounded-md rounded-md border border-slate-300 bg-white pl-4 pr-8 py-2 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 hover:dark:bg-slate-700 ${t}`,...r,children:n},void 0,!1,{fileName:Nt,lineNumber:11,columnNumber:5})}var Pt="/Users/distiller/repo/graph/ui-tooltips/src/lib/project-edge-tooltip.tsx";function Ct({type:e,source:t,target:n,fileDependencies:r,description:i,fileClickCallback:o}){return mt("div",{className:"text-sm text-slate-700 dark:text-slate-400",children:[mt("h4",{className:"implicit"!==e?"mb-3":"",children:[mt(kt,{className:"mr-3",children:e??"unknown"},void 0,!1,{fileName:Pt,lineNumber:23,columnNumber:9}),mt("span",{className:"font-mono",children:[t," \u2192 ",n]},void 0,!0,{fileName:Pt,lineNumber:24,columnNumber:9})]},void 0,!0,{fileName:Pt,lineNumber:22,columnNumber:7}),i?mt("p",{children:i},void 0,!1,{fileName:Pt,lineNumber:28,columnNumber:22}):null,"implicit"!==e&&r?.length>0?mt("div",{className:"overflow-hidden rounded-md border border-slate-200 dark:border-slate-800",children:[mt("div",{className:"bg-slate-50 px-4 py-2 text-xs font-medium uppercase text-slate-500 dark:bg-slate-800 dark:text-slate-400",children:mt("span",{children:"Files"},void 0,!1,{fileName:Pt,lineNumber:32,columnNumber:13})},void 0,!1,{fileName:Pt,lineNumber:31,columnNumber:11}),mt("ul",{className:"max-h-[300px] divide-y divide-slate-200 overflow-auto dark:divide-slate-800",children:r.map((e=>mt("li",{className:"whitespace-nowrap px-4 py-2 text-sm font-medium text-slate-800 dark:text-slate-300 "+(void 0!==o?"hover:underline hover:cursor-pointer":""),onClick:void 0!==o?()=>o(e.fileName):()=>{},children:mt("span",{className:"block truncate font-normal",children:e.fileName},void 0,!1,{fileName:Pt,lineNumber:49,columnNumber:17})},e.fileName,!1,{fileName:Pt,lineNumber:36,columnNumber:15})))},void 0,!1,{fileName:Pt,lineNumber:34,columnNumber:11})]},void 0,!0,{fileName:Pt,lineNumber:30,columnNumber:9}):null]},void 0,!0,{fileName:Pt,lineNumber:21,columnNumber:5})}const Tt=r.forwardRef((function({title:e,titleId:t,...n},i){return r.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:i,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"}))}));var jt="/Users/distiller/repo/graph/ui-tooltips/src/lib/project-node-tooltip.tsx";function Dt({type:e,id:t,tags:n,children:r,description:i,openConfigCallback:o}){return mt("div",{className:"text-sm text-slate-700 dark:text-slate-400",children:[mt("h4",{className:"flex justify-between items-center gap-4",children:[mt("div",{className:"flex items-center",children:[mt(kt,{className:"mr-3",children:e},void 0,!1,{fileName:jt,lineNumber:27,columnNumber:11}),mt("span",{className:"font-mono",children:t},void 0,!1,{fileName:jt,lineNumber:28,columnNumber:11})]},void 0,!0,{fileName:jt,lineNumber:26,columnNumber:9}),o?mt("button",{className:" flex items-center rounded-md border-slate-300 bg-white p-1 font-medium text-slate-500 shadow-sm ring-1 transition hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-400 dark:ring-slate-600 hover:dark:bg-slate-700",title:"Edit project.json in editor",onClick:o,children:mt(Tt,{className:"h-5 w-5"},void 0,!1,{fileName:jt,lineNumber:36,columnNumber:13})},void 0,!1,{fileName:jt,lineNumber:31,columnNumber:11}):void 0]},void 0,!0,{fileName:jt,lineNumber:25,columnNumber:7}),n.length>0?mt("p",{className:"my-2",children:[mt("strong",{children:"tags"},void 0,!1,{fileName:jt,lineNumber:42,columnNumber:11}),mt("br",{},void 0,!1,{fileName:jt,lineNumber:43,columnNumber:11}),n.join(", ")]},void 0,!0,{fileName:jt,lineNumber:41,columnNumber:9}):null,i?mt("p",{className:"mt-4",children:i},void 0,!1,{fileName:jt,lineNumber:47,columnNumber:22}):null,r]},void 0,!0,{fileName:jt,lineNumber:24,columnNumber:5})}const Ot=r.forwardRef((function({title:e,titleId:t,...n},i){return r.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:i,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z"}))}));var At,Mt="/Users/distiller/repo/graph/ui-tooltips/src/lib/task-node-tooltip.tsx";function Rt({id:e,executor:t,description:n,runTaskCallback:r,children:i}){return mt("div",{className:"text-sm text-slate-700 dark:text-slate-400",children:[mt("h4",{className:"flex justify-between items-center gap-4 mb-3",children:[mt("div",{className:"flex items-center",children:[mt(kt,{className:"mr-3",children:t},void 0,!1,{fileName:Mt,lineNumber:26,columnNumber:11}),mt("span",{className:"font-mono",children:e},void 0,!1,{fileName:Mt,lineNumber:27,columnNumber:11})]},void 0,!0,{fileName:Mt,lineNumber:25,columnNumber:9}),r?mt("button",{className:" flex items-center rounded-md border-slate-300 bg-white p-1 font-medium text-slate-500 shadow-sm ring-1 transition hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-400 dark:ring-slate-600 hover:dark:bg-slate-700",title:"Run Task",onClick:r,children:mt(Ot,{className:"h-5 w-5"},void 0,!1,{fileName:Mt,lineNumber:35,columnNumber:13})},void 0,!1,{fileName:Mt,lineNumber:30,columnNumber:11}):void 0]},void 0,!0,{fileName:Mt,lineNumber:24,columnNumber:7}),n?mt("p",{className:"mt-4",children:n},void 0,!1,{fileName:Mt,lineNumber:39,columnNumber:22}):null,i]},void 0,!0,{fileName:Mt,lineNumber:23,columnNumber:5})}function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ht(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=At.Pop,l=null,u=c();function c(){return(a.state||{idx:null}).idx}function d(){s=At.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:h.location,delta:t})}function f(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:Wt(e);return zt(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,a.replaceState(It({},a.state,{idx:u}),""));let h={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Lt,d),l=e,()=>{i.removeEventListener(Lt,d),l=null}},createHref:e=>t(i,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=At.Push;let r=Ut(h.location,e,t);n&&n(r,e),u=c()+1;let d=Gt(r,u),f=h.createHref(r);try{a.pushState(d,"",f)}catch(p){i.location.assign(f)}o&&l&&l({action:s,location:h.location,delta:1})},replace:function(e,t){s=At.Replace;let r=Ut(h.location,e,t);n&&n(r,e),u=c();let i=Gt(r,u),d=h.createHref(r);a.replaceState(i,"",d),o&&l&&l({action:s,location:h.location,delta:0})},go:e=>a.go(e)};return h}var Yt;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Yt||(Yt={}));const Xt=new Set(["lazy","caseSensitive","path","id","index","children"]);function $t(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map(((e,i)=>{let o=[...n,i],a="string"==typeof e.id?e.id:o.join("-");if(zt(!0!==e.index||!e.children,"Cannot specify children on an index route"),zt(!r[a],'Found a route id collision on id "'+a+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=It({},e,t(e),{id:a});return r[a]=n,n}{let n=It({},e,t(e),{id:a,children:void 0});return r[a]=n,e.children&&(n.children=$t(e.children,t,o,r)),n}}))}function Kt(e,t,n){void 0===n&&(n="/");let r=dn(("string"==typeof t?qt(t):t).pathname||"/",n);if(null==r)return null;let i=Zt(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let o=null;for(let a=0;null==o&&a{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(zt(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=vn([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(zt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Zt(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:sn(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Qt(e.path))i(e,t,r);else i(e,t)})),t}function Qt(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=Qt(r.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const Jt=/^:\w+$/,en=3,tn=2,nn=1,rn=10,on=-2,an=e=>"*"===e;function sn(e,t){let n=e.split("/"),r=n.length;return n.some(an)&&(r+=on),t&&(r+=tn),n.filter((e=>!an(e))).reduce(((e,t)=>e+(Jt.test(t)?en:""===t?nn:rn)),r)}function ln(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;a(r.push(t),"/([^\\/]+)")));e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1),l=r.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return Vt(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(s[n]||"",t),e}),{});return{params:l,pathname:o,pathnameBase:a,pattern:e}}function cn(e){try{return decodeURI(e)}catch(t){return Vt(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function dn(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function fn(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function hn(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function pn(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=qt(e):(i=It({},e),zt(!i.pathname||!i.pathname.includes("?"),fn("?","pathname","search",i)),zt(!i.pathname||!i.pathname.includes("#"),fn("#","pathname","hash",i)),zt(!i.search||!i.search.includes("#"),fn("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(r||null==s)o=n;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?qt(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:gn(r),hash:yn(i)}}(i,o),u=s&&"/"!==s&&s.endsWith("/"),c=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const vn=e=>e.join("/").replace(/\/\/+/g,"/"),mn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gn=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",yn=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const bn=function(e,t){void 0===t&&(t=302);let n=t;"number"==typeof n?n={status:n}:void 0===n.status&&(n.status=302);let r=new Headers(n.headers);return r.set("Location",e),new Response(null,It({},n,{headers:r}))};class ErrorResponse{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function xn(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const wn=["post","put","patch","delete"],_n=new Set(wn),En=["get",...wn],kn=new Set(En),Nn=new Set([301,302,303,307,308]),Sn=new Set([307,308]),Pn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Cn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Tn={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,On=!Dn,An=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});function Mn(e){let t;if(zt(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let n=e.detectErrorBoundary;t=e=>({hasErrorBoundary:n(e)})}else t=An;let n,r={},i=$t(e.routes,t,void 0,r),o=e.basename||"/",a=It({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),s=null,l=new Set,u=null,c=null,d=null,f=null!=e.hydrationData,h=Kt(i,e.history.location,o),p=null;if(null==h){let t=Kn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=$n(i);h=n,p={[r.id]:t}}let v,m,g=!(h.some((e=>e.route.lazy))||h.some((e=>e.route.loader))&&null==e.hydrationData),y={historyAction:e.history.action,location:e.history.location,matches:h,initialized:g,navigation:Pn,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||p,fetchers:new Map,blockers:new Map},b=At.Pop,x=!1,w=!1,_=!1,E=[],k=[],N=new Map,S=0,P=-1,C=new Map,T=new Set,j=new Map,D=new Map,O=new Map,A=!1;function M(e){y=It({},y,e),l.forEach((e=>e(y)))}function R(t,r){var o,a;let s,l=null!=y.actionData&&null!=y.navigation.formMethod&&ir(y.navigation.formMethod)&&"loading"===y.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);s=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:l?y.actionData:null;let u=r.loaderData?Yn(y.loaderData,r.loaderData,r.matches||[],r.errors):y.loaderData;for(let[e]of O)Y(e);let c=!0===x||null!=y.navigation.formMethod&&ir(y.navigation.formMethod)&&!0!==(null==(a=t.state)?void 0:a._isRedirect);n&&(i=n,n=void 0),M(It({},r,{actionData:s,loaderData:u,historyAction:b,location:t,initialized:!0,navigation:Pn,revalidation:"idle",restoreScrollPosition:Z(t,r.matches||y.matches),preventScrollReset:c,blockers:new Map(y.blockers)})),w||b===At.Pop||(b===At.Push?e.history.push(t,t.state):b===At.Replace&&e.history.replace(t,t.state)),b=At.Pop,x=!1,w=!1,_=!1,E=[],k=[]}async function I(a,s,l){m&&m.abort(),m=null,b=a,w=!0===(l&&l.startUninterruptedRevalidation),function(e,t){if(u&&c&&d){let n=t.map((e=>lr(e,y.loaderData))),r=c(e,n)||e.key;u[r]=d()}}(y.location,y.matches),x=!0===(l&&l.preventScrollReset);let f=n||i,h=l&&l.overrideNavigation,p=Kt(f,s,o);if(!p){let e=Kn(404,{pathname:s.pathname}),{matches:t,route:n}=$n(f);return K(),void R(s,{matches:t,loaderData:{},errors:{[n.id]:e}})}if(y.initialized&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(y.location,s)&&!(l&&l.submission&&ir(l.submission.formMethod)))return void R(s,{matches:p});m=new AbortController;let v,g,C=Un(e.history,s,m.signal,l&&l.submission);if(l&&l.pendingError)g={[Xn(p).route.id]:l.pendingError};else if(l&&l.submission&&ir(l.submission.formMethod)){let e=await async function(e,n,i,a,s){z();let l,u=It({state:"submitting",location:n},i);M({navigation:u});let c=ur(a,n);if(c.route.action||c.route.lazy){if(l=await Gn("action",e,c,a,r,t,o),e.signal.aborted)return{shortCircuited:!0}}else l={type:Yt.error,error:Kn(405,{method:e.method,pathname:n.pathname,routeId:c.route.id})};if(tr(l)){let e;return e=s&&null!=s.replace?s.replace:l.location===y.location.pathname+y.location.search,await B(y,l,{submission:i,replace:e}),{shortCircuited:!0}}if(er(l)){let e=Xn(a,c.route.id);return!0!==(s&&s.replace)&&(b=At.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:l.error}}}if(Jn(l))throw Kn(400,{type:"defer-action"});return{pendingActionData:{[c.route.id]:l.data}}}(C,s,l.submission,p,{replace:l.replace});if(e.shortCircuited)return;v=e.pendingActionData,g=e.pendingActionError,h=It({state:"loading",location:s},l.submission),C=new Request(C.url,{signal:C.signal})}let{shortCircuited:T,loaderData:O,errors:A}=await async function(t,r,a,s,l,u,c,d,f){let h=s;if(!h){h=It({state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},l)}let p=l||u?l||u:h.formMethod&&h.formAction&&h.formData&&h.formEncType?{formMethod:h.formMethod,formAction:h.formAction,formData:h.formData,formEncType:h.formEncType}:void 0,v=n||i,[g,b]=Bn(e.history,y,a,p,r,_,E,k,j,v,o,d,f);if(K((e=>!(a&&a.some((t=>t.route.id===e)))||g&&g.some((t=>t.route.id===e)))),0===g.length&&0===b.length){let e=q();return R(r,It({matches:a,loaderData:{},errors:f||null},d?{actionData:d}:{},e?{fetchers:new Map(y.fetchers)}:{})),{shortCircuited:!0}}if(!w){b.forEach((e=>{let t=y.fetchers.get(e.key),n={state:"loading",data:t&&t.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};y.fetchers.set(e.key,n)}));let e=d||y.actionData;M(It({navigation:h},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},b.length>0?{fetchers:new Map(y.fetchers)}:{}))}P=++S,b.forEach((e=>{e.controller&&N.set(e.key,e.controller)}));let x=()=>b.forEach((e=>U(e.key)));m&&m.signal.addEventListener("abort",x);let{results:C,loaderResults:T,fetcherResults:O}=await F(y.matches,a,g,b,t);if(t.signal.aborted)return{shortCircuited:!0};m&&m.signal.removeEventListener("abort",x);b.forEach((e=>N.delete(e.key)));let A=Zn(C);if(A)return await B(y,A,{replace:c}),{shortCircuited:!0};let{loaderData:I,errors:L}=Hn(y,a,g,T,f,b,O,D);D.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&D.delete(t)}))}));let z=q(),V=H(P),G=z||V||b.length>0;return It({loaderData:I,errors:L},G?{fetchers:new Map(y.fetchers)}:{})}(C,s,p,h,l&&l.submission,l&&l.fetcherSubmission,l&&l.replace,v,g);T||(m=null,R(s,It({matches:p},v?{actionData:v}:{},{loaderData:O,errors:A})))}function L(e){return y.fetchers.get(e)||Cn}async function B(t,n,r){var i;let{submission:a,replace:s,isFetchActionRedirect:l}=void 0===r?{}:r;n.revalidate&&(_=!0);let u=Ut(t.location,n.location,It({_isRedirect:!0},l?{_isFetchActionRedirect:!0}:{}));if(zt(u,"Expected a location on the redirect navigation"),jn.test(n.location)&&Dn&&void 0!==(null==(i=window)?void 0:i.location)){let t=e.history.createURL(n.location),r=null==dn(t.pathname,o);if(window.location.origin!==t.origin||r)return void(s?window.location.replace(n.location):window.location.assign(n.location))}m=null;let c=!0===s?At.Replace:At.Push,{formMethod:d,formAction:f,formEncType:h,formData:p}=t.navigation;!a&&d&&f&&p&&h&&(a={formMethod:d,formAction:f,formEncType:h,formData:p}),Sn.has(n.status)&&a&&ir(a.formMethod)?await I(c,u,{submission:It({},a,{formAction:n.location}),preventScrollReset:x}):l?await I(c,u,{overrideNavigation:{state:"loading",location:u,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},fetcherSubmission:a,preventScrollReset:x}):await I(c,u,{overrideNavigation:{state:"loading",location:u,formMethod:a?a.formMethod:void 0,formAction:a?a.formAction:void 0,formEncType:a?a.formEncType:void 0,formData:a?a.formData:void 0},preventScrollReset:x})}async function F(n,i,a,s,l){let u=await Promise.all([...a.map((e=>Gn("loader",l,e,i,r,t,o))),...s.map((n=>{if(n.matches&&n.match&&n.controller)return Gn("loader",Un(e.history,n.path,n.controller.signal),n.match,n.matches,r,t,o);return{type:Yt.error,error:Kn(404,{pathname:n.path})}}))]),c=u.slice(0,a.length),d=u.slice(a.length);return await Promise.all([or(n,a,c,c.map((()=>l.signal)),!1,y.loaderData),or(n,s.map((e=>e.match)),d,s.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:u,loaderResults:c,fetcherResults:d}}function z(){_=!0,E.push(...K()),j.forEach(((e,t)=>{N.has(t)&&(k.push(t),U(t))}))}function V(e,t,n){let r=Xn(y.matches,t);G(e),M({errors:{[r.route.id]:n},fetchers:new Map(y.fetchers)})}function G(e){N.has(e)&&U(e),j.delete(e),C.delete(e),T.delete(e),y.fetchers.delete(e)}function U(e){let t=N.get(e);zt(t,"Expected fetch controller: "+e),t.abort(),N.delete(e)}function W(e){for(let t of e){let e={state:"idle",data:L(t).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};y.fetchers.set(t,e)}}function q(){let e=[],t=!1;for(let n of T){let r=y.fetchers.get(n);zt(r,"Expected fetcher: "+n),"loading"===r.state&&(T.delete(n),e.push(n),t=!0)}return W(e),t}function H(e){let t=[];for(let[n,r]of C)if(r0}function Y(e){y.blockers.delete(e),O.delete(e)}function X(e,t){let n=y.blockers.get(e)||Tn;zt("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state),y.blockers.set(e,t),M({blockers:new Map(y.blockers)})}function $(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===O.size)return;O.size>1&&Vt(!1,"A router only supports one blocker at a time");let i=Array.from(O.entries()),[o,a]=i[i.length-1],s=y.blockers.get(o);return s&&"proceeding"===s.state?void 0:a({currentLocation:t,nextLocation:n,historyAction:r})?o:void 0}function K(e){let t=[];return D.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),D.delete(r))})),t}function Z(e,t){if(u&&c&&d){let n=t.map((e=>lr(e,y.loaderData))),r=c(e,n)||e.key,i=u[r];if("number"==typeof i)return i}return null}return v={get basename(){return o},get state(){return y},get routes(){return i},initialize:function(){return s=e.history.listen((t=>{let{action:n,location:r,delta:i}=t;if(A)return void(A=!1);Vt(0===O.size||null!=i,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=$({currentLocation:y.location,nextLocation:r,historyAction:n});return o&&null!=i?(A=!0,e.history.go(-1*i),void X(o,{state:"blocked",location:r,proceed(){X(o,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(i)},reset(){Y(o),M({blockers:new Map(v.state.blockers)})}})):I(n,r)})),y.initialized||I(At.Pop,y.location),v},subscribe:function(e){return l.add(e),()=>l.delete(e)},enableScrollRestoration:function(e,t,n){if(u=e,d=t,c=n||(e=>e.key),!f&&y.navigation===Pn){f=!0;let e=Z(y.location,y.matches);null!=e&&M({restoreScrollPosition:e})}return()=>{u=null,d=null,c=null}},navigate:async function t(n,r){if("number"==typeof n)return void e.history.go(n);let i=Rn(y.location,y.matches,o,a.v7_prependBasename,n,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:s,submission:l,error:u}=In(a.v7_normalizeFormMethod,!1,i,r),c=y.location,d=Ut(y.location,s,r&&r.state);d=It({},d,e.history.encodeLocation(d));let f=r&&null!=r.replace?r.replace:void 0,h=At.Push;!0===f?h=At.Replace:!1===f||null!=l&&ir(l.formMethod)&&l.formAction===y.location.pathname+y.location.search&&(h=At.Replace);let p=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,v=$({currentLocation:c,nextLocation:d,historyAction:h});if(!v)return await I(h,d,{submission:l,pendingError:u,preventScrollReset:p,replace:r&&r.replace});X(v,{state:"blocked",location:d,proceed(){X(v,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(n,r)},reset(){Y(v),M({blockers:new Map(y.blockers)})}})},fetch:function(s,l,u,c){if(On)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");N.has(s)&&U(s);let d=n||i,f=Rn(y.location,y.matches,o,a.v7_prependBasename,u,l,null==c?void 0:c.relative),h=Kt(d,f,o);if(!h)return void V(s,l,Kn(404,{pathname:f}));let{path:p,submission:v}=In(a.v7_normalizeFormMethod,!0,f,c),g=ur(h,p);x=!0===(c&&c.preventScrollReset),v&&ir(v.formMethod)?async function(a,s,l,u,c,d){if(z(),j.delete(a),!u.route.action&&!u.route.lazy){let e=Kn(405,{method:d.formMethod,pathname:l,routeId:s});return void V(a,s,e)}let f=y.fetchers.get(a),h=It({state:"submitting"},d,{data:f&&f.data," _hasFetcherDoneAnything ":!0});y.fetchers.set(a,h),M({fetchers:new Map(y.fetchers)});let p=new AbortController,v=Un(e.history,l,p.signal,d);N.set(a,p);let g=await Gn("action",v,u,c,r,t,o);if(v.signal.aborted)return void(N.get(a)===p&&N.delete(a));if(tr(g)){N.delete(a),T.add(a);let e=It({state:"loading"},d,{data:void 0," _hasFetcherDoneAnything ":!0});return y.fetchers.set(a,e),M({fetchers:new Map(y.fetchers)}),B(y,g,{submission:d,isFetchActionRedirect:!0})}if(er(g))return void V(a,s,g.error);if(Jn(g))throw Kn(400,{type:"defer-action"});let x=y.navigation.location||y.location,w=Un(e.history,x,p.signal),O=n||i,A="idle"!==y.navigation.state?Kt(O,y.navigation.location,o):y.matches;zt(A,"Didn't find any matches after fetcher action");let I=++S;C.set(a,I);let L=It({state:"loading",data:g.data},d,{" _hasFetcherDoneAnything ":!0});y.fetchers.set(a,L);let[G,W]=Bn(e.history,y,A,d,x,_,E,k,j,O,o,{[u.route.id]:g.data},void 0);W.filter((e=>e.key!==a)).forEach((e=>{let t=e.key,n=y.fetchers.get(t),r={state:"loading",data:n&&n.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};y.fetchers.set(t,r),e.controller&&N.set(t,e.controller)})),M({fetchers:new Map(y.fetchers)});let q=()=>W.forEach((e=>U(e.key)));p.signal.addEventListener("abort",q);let{results:Y,loaderResults:X,fetcherResults:$}=await F(y.matches,A,G,W,w);if(p.signal.aborted)return;p.signal.removeEventListener("abort",q),C.delete(a),N.delete(a),W.forEach((e=>N.delete(e.key)));let K=Zn(Y);if(K)return B(y,K);let{loaderData:Z,errors:Q}=Hn(y,y.matches,G,X,void 0,W,$,D),J={state:"idle",data:g.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};y.fetchers.set(a,J);let ee=H(I);"loading"===y.navigation.state&&I>P?(zt(b,"Expected pending action"),m&&m.abort(),R(y.navigation.location,{matches:A,loaderData:Z,errors:Q,fetchers:new Map(y.fetchers)})):(M(It({errors:Q,loaderData:Yn(y.loaderData,Z,A,Q)},ee?{fetchers:new Map(y.fetchers)}:{})),_=!1)}(s,l,p,g,h,v):(j.set(s,{routeId:l,path:p}),async function(n,i,a,s,l,u){let c=y.fetchers.get(n),d=It({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},u,{data:c&&c.data," _hasFetcherDoneAnything ":!0});y.fetchers.set(n,d),M({fetchers:new Map(y.fetchers)});let f=new AbortController,h=Un(e.history,a,f.signal);N.set(n,f);let p=await Gn("loader",h,s,l,r,t,o);Jn(p)&&(p=await ar(p,h.signal,!0)||p);N.get(n)===f&&N.delete(n);if(h.signal.aborted)return;if(tr(p))return T.add(n),void(await B(y,p));if(er(p)){let e=Xn(y.matches,i);return y.fetchers.delete(n),void M({fetchers:new Map(y.fetchers),errors:{[e.route.id]:p.error}})}zt(!Jn(p),"Unhandled fetcher deferred data");let v={state:"idle",data:p.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};y.fetchers.set(n,v),M({fetchers:new Map(y.fetchers)})}(s,l,p,g,h,v))},revalidate:function(){z(),M({revalidation:"loading"}),"submitting"!==y.navigation.state&&("idle"!==y.navigation.state?I(b||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation}):I(y.historyAction,y.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:L,deleteFetcher:G,dispose:function(){s&&s(),l.clear(),m&&m.abort(),y.fetchers.forEach(((e,t)=>G(t))),y.blockers.forEach(((e,t)=>Y(t)))},getBlocker:function(e,t){let n=y.blockers.get(e)||Tn;return O.get(e)!==t&&O.set(e,t),n},deleteBlocker:Y,_internalFetchControllers:N,_internalActiveDeferreds:D,_internalSetRoutes:function(e){r={},n=$t(e,t,void 0,r)}},v}Symbol("deferred");function Rn(e,t,n,r,i,o,a){let s,l;if(null!=o&&"path"!==a){s=[];for(let e of t)if(s.push(e),e.route.id===o){l=e;break}}else s=t,l=t[t.length-1];let u=pn(i||".",hn(s).map((e=>e.pathnameBase)),dn(e.pathname,n)||e.pathname,"path"===a);return null==i&&(u.search=e.search,u.hash=e.hash),null!=i&&""!==i&&"."!==i||!l||!l.route.index||sr(u.search)||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&"/"!==n&&(u.pathname="/"===u.pathname?n:vn([n,u.pathname])),Wt(u)}function In(e,t,n,r){if(!r||!function(e){return null!=e&&"formData"in e}(r))return{path:n};if(r.formMethod&&!rr(r.formMethod))return{path:n,error:Kn(405,{method:r.formMethod})};let i;if(r.formData){let t=r.formMethod||"get";if(i={formMethod:e?t.toUpperCase():t.toLowerCase(),formAction:Qn(n),formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:r.formData},ir(i.formMethod))return{path:n,submission:i}}let o=qt(n),a=Wn(r.formData);return t&&o.search&&sr(o.search)&&a.append("index",""),o.search="?"+a,{path:Wt(o),submission:i}}function Ln(e,t){let n=e;if(t){let r=e.findIndex((e=>e.route.id===t));r>=0&&(n=e.slice(0,r))}return n}function Bn(e,t,n,r,i,o,a,s,l,u,c,d,f){let h=f?Object.values(f)[0]:d?Object.values(d)[0]:void 0,p=e.createURL(t.location),v=e.createURL(i),m=f?Object.keys(f)[0]:void 0,g=Ln(n,m).filter(((e,n)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,n){let r=!t||n.route.id!==t.route.id,i=void 0===e[n.route.id];return r||i}(t.loaderData,t.matches[n],e)||a.some((t=>t===e.route.id)))return!0;let i=t.matches[n],s=e;return zn(e,It({currentUrl:p,currentParams:i.params,nextUrl:v,nextParams:s.params},r,{actionResult:h,defaultShouldRevalidate:o||p.pathname+p.search===v.pathname+v.search||p.search!==v.search||Fn(i,s)}))})),y=[];return l.forEach(((e,i)=>{if(!n.some((t=>t.route.id===e.routeId)))return;let a=Kt(u,e.path,c);if(!a)return void y.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let l=ur(a,e.path);(s.includes(i)||zn(l,It({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:h,defaultShouldRevalidate:o})))&&y.push({key:i,routeId:e.routeId,path:e.path,matches:a,match:l,controller:new AbortController})})),[g,y]}function Fn(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function zn(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}async function Vn(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];zt(i,"No route found in manifest");let o={};for(let a in r){let e=void 0!==i[a]&&"hasErrorBoundary"!==a;Vt(!e,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+a+'" will be ignored.'),e||Xt.has(a)||(o[a]=r[a])}Object.assign(i,o),Object.assign(i,It({},t(i),{lazy:void 0}))}async function Gn(e,t,n,r,i,o,a,s,l,u){let c,d,f;void 0===s&&(s=!1),void 0===l&&(l=!1);let h=e=>{let r,i=new Promise(((e,t)=>r=t));return f=()=>r(),t.signal.addEventListener("abort",f),Promise.race([e({request:t,params:n.params,context:u}),i])};try{let r=n.route[e];if(n.route.lazy)if(r){d=(await Promise.all([h(r),Vn(n.route,o,i)]))[0]}else{if(await Vn(n.route,o,i),r=n.route[e],!r){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw Kn(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:Yt.data,data:void 0}}d=await h(r)}else{if(!r){let e=new URL(t.url);throw Kn(404,{pathname:e.pathname+e.search})}d=await h(r)}zt(void 0!==d,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(w){c=Yt.error,d=w}finally{f&&t.signal.removeEventListener("abort",f)}if(nr(d)){let e,i=d.status;if(Nn.has(i)){let e=d.headers.get("Location");if(zt(e,"Redirects returned/thrown from loaders/actions must have a Location header"),jn.test(e)){if(!s){let n=new URL(t.url),r=e.startsWith("//")?new URL(n.protocol+e):new URL(e),i=null!=dn(r.pathname,a);r.origin===n.origin&&i&&(e=r.pathname+r.search+r.hash)}}else e=Rn(new URL(t.url),r.slice(0,r.indexOf(n)+1),a,!0,e);if(s)throw d.headers.set("Location",e),d;return{type:Yt.redirect,status:i,location:e,revalidate:null!==d.headers.get("X-Remix-Revalidate")}}if(l)throw{type:c||Yt.data,response:d};let o=d.headers.get("Content-Type");return e=o&&/\bapplication\/json\b/.test(o)?await d.json():await d.text(),c===Yt.error?{type:c,error:new ErrorResponse(i,d.statusText,e),headers:d.headers}:{type:Yt.data,data:e,statusCode:d.status,headers:d.headers}}return c===Yt.error?{type:c,error:d}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(d)?{type:Yt.deferred,deferredData:d,statusCode:null==(p=d.init)?void 0:p.status,headers:(null==(v=d.init)?void 0:v.headers)&&new Headers(d.init.headers)}:{type:Yt.data,data:d};var p,v}function Un(e,t,n,r){let i=e.createURL(Qn(t)).toString(),o={signal:n};if(r&&ir(r.formMethod)){let{formMethod:e,formEncType:t,formData:n}=r;o.method=e.toUpperCase(),o.body="application/x-www-form-urlencoded"===t?Wn(n):n}return new Request(i,o)}function Wn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,r instanceof File?r.name:r);return t}function qn(e,t,n,r,i){let o,a={},s=null,l=!1,u={};return n.forEach(((n,c)=>{let d=t[c].route.id;if(zt(!tr(n),"Cannot handle redirect results in processLoaderData"),er(n)){let t=Xn(e,d),i=n.error;r&&(i=Object.values(r)[0],r=void 0),s=s||{},null==s[t.route.id]&&(s[t.route.id]=i),a[d]=void 0,l||(l=!0,o=xn(n.error)?n.error.status:500),n.headers&&(u[d]=n.headers)}else Jn(n)?(i.set(d,n.deferredData),a[d]=n.deferredData.data):a[d]=n.data,null==n.statusCode||200===n.statusCode||l||(o=n.statusCode),n.headers&&(u[d]=n.headers)})),r&&(s=r,a[Object.keys(r)[0]]=void 0),{loaderData:a,errors:s,statusCode:o||200,loaderHeaders:u}}function Hn(e,t,n,r,i,o,a,s){let{loaderData:l,errors:u}=qn(t,n,r,i,s);for(let c=0;ce.route.id===t))+1):[...e];return n.reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function $n(e){let t=e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Kn(e,t){let{pathname:n,routeId:r,method:i,type:o}=void 0===t?{}:t,a="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(a="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===o&&(s="defer() is not supported in actions")):403===e?(a="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):404===e?(a="Not Found",s='No route matches URL "'+n+'"'):405===e&&(a="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new ErrorResponse(e||500,a,new Error(s),!0)}function Zn(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(tr(n))return n}}function Qn(e){return Wt(It({},"string"==typeof e?qt(e):e,{hash:""}))}function Jn(e){return e.type===Yt.deferred}function er(e){return e.type===Yt.error}function tr(e){return(e&&e.type)===Yt.redirect}function nr(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function rr(e){return kn.has(e.toLowerCase())}function ir(e){return _n.has(e.toLowerCase())}async function or(e,t,n,r,i,o){for(let a=0;ae.route.id===l.route.id)),c=null!=u&&!Fn(u,l)&&void 0!==(o&&o[l.route.id]);if(Jn(s)&&(i||c)){let e=r[a];zt(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await ar(s,e,i).then((e=>{e&&(n[a]=e||n[a])}))}}}async function ar(e,t,n){if(void 0===n&&(n=!1),!(await e.deferredData.resolveData(t))){if(n)try{return{type:Yt.data,data:e.deferredData.unwrappedData}}catch(w){return{type:Yt.error,error:w}}return{type:Yt.data,data:e.deferredData.data}}}function sr(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function lr(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function ur(e,t){let n="string"==typeof t?qt(t).search:t.search;if(e[e.length-1].route.index&&sr(n||""))return e[e.length-1];let r=hn(e);return r[r.length-1]}function cr(){return cr=Object.assign?Object.assign.bind():function(e){for(var t=1;t component."),r.useContext(vr).location}gr.displayName="RouteError";const xr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wr(e){r.useContext(pr).static||r.useLayoutEffect(e)}function _r(){let{isDataRoute:e}=r.useContext(mr);return e?function(){let{router:e}=Mr(Dr.UseNavigateStable),t=Ir(Or.UseNavigateStable),n=r.useRef(!1);wr((()=>{n.current=!0}));let i=r.useCallback((function(r,i){void 0===i&&(i={}),Vt(n.current,xr),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,cr({fromRouteId:t},i)))}),[e,t]);return i}():function(){yr()||zt(!1,"useNavigate() may be used only in the context of a component.");let e=r.useContext(dr),{basename:t,navigator:n}=r.useContext(pr),{matches:i}=r.useContext(mr),{pathname:o}=br(),a=JSON.stringify(hn(i).map((e=>e.pathnameBase))),s=r.useRef(!1);return wr((()=>{s.current=!0})),r.useCallback((function(r,i){if(void 0===i&&(i={}),Vt(s.current,xr),!s.current)return;if("number"==typeof r)return void n.go(r);let l=pn(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:vn([t,l.pathname])),(i.replace?n.replace:n.push)(l,i.state,i)}),[t,n,a,o,e])}()}const Er=r.createContext(null);function kr(){let{matches:e}=r.useContext(mr),t=e[e.length-1];return t?t.params:{}}function Nr(e,t){let{relative:n}=void 0===t?{}:t,{matches:i}=r.useContext(mr),{pathname:o}=br(),a=JSON.stringify(hn(i).map((e=>e.pathnameBase)));return r.useMemo((()=>pn(e,JSON.parse(a),o,"path"===n)),[e,a,o,n])}function Sr(e,t,n){yr()||zt(!1,"useRoutes() may be used only in the context of a component.");let{navigator:i}=r.useContext(pr),{matches:o}=r.useContext(mr),a=o[o.length-1],s=a?a.params:{},l=a?a.pathname:"/",u=a?a.pathnameBase:"/",c=a&&a.route;{let e=c&&c.path||"";d=l,f=!c||e.endsWith("*"),h='You rendered descendant (or called `useRoutes()`) at "'+l+'" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent to .',f||Fr[d]||(Fr[d]=!0,Vt(!1,h))}var d,f,h;let p,v=br();if(t){var m;let e="string"==typeof t?qt(t):t;"/"===u||(null==(m=e.pathname)?void 0:m.startsWith(u))||zt(!1,'When overriding the location using `` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'+u+'" but pathname "'+e.pathname+'" was given in the `location` prop.'),p=e}else p=v;let g=p.pathname||"/",y=Kt(e,{pathname:"/"===u?g:g.slice(u.length)||"/"});Vt(c||null!=y,'No routes matched location "'+p.pathname+p.search+p.hash+'" '),Vt(null==y||void 0!==y[y.length-1].route.element||void 0!==y[y.length-1].route.Component,'Matched leaf route at location "'+p.pathname+p.search+p.hash+'" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.');let b=jr(y&&y.map((e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:vn([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:vn([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n);return t&&b?r.createElement(vr.Provider,{value:{location:cr({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:At.Pop}},b):b}function Pr(){let e=Br(),t=xn(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=r.createElement(r.Fragment,null,r.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:a},"ErrorBoundary")," or"," ",r.createElement("code",{style:a},"errorElement")," prop on your route.")),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:o},n):null,s)}const Cr=r.createElement(Pr,null);class RenderErrorBoundary extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?r.createElement(mr.Provider,{value:this.props.routeContext},r.createElement(gr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Tr(e){let{routeContext:t,match:n,children:i}=e,o=r.useContext(dr);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(mr.Provider,{value:t},i)}function jr(e,t,n){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var o;if(null==(o=n)||!o.errors)return null;e=n.matches}let a=e,s=null==(i=n)?void 0:i.errors;if(null!=s){let e=a.findIndex((e=>e.route.id&&(null==s?void 0:s[e.route.id])));e>=0||zt(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(s).join(",")),a=a.slice(0,Math.min(a.length,e+1))}return a.reduceRight(((e,i,o)=>{let l=i.route.id?null==s?void 0:s[i.route.id]:null,u=null;n&&(u=i.route.errorElement||Cr);let c=t.concat(a.slice(0,o+1)),d=()=>{let t;return t=l?u:i.route.Component?r.createElement(i.route.Component,null):i.route.element?i.route.element:e,r.createElement(Tr,{match:i,routeContext:{outlet:e,matches:c,isDataRoute:null!=n},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?r.createElement(RenderErrorBoundary,{location:n.location,revalidation:n.revalidation,component:u,error:l,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()}),null)}var Dr,Or;function Ar(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Mr(e){let t=r.useContext(dr);return t||zt(!1,Ar(e)),t}function Rr(e){let t=r.useContext(fr);return t||zt(!1,Ar(e)),t}function Ir(e){let t=function(e){let t=r.useContext(mr);return t||zt(!1,Ar(e)),t}(e),n=t.matches[t.matches.length-1];return n.route.id||zt(!1,e+' can only be used on routes that contain a unique "id"'),n.route.id}function Lr(e){return Rr(Or.UseRouteLoaderData).loaderData[e]}function Br(){var e;let t=r.useContext(gr),n=Rr(Or.UseRouteError),i=Ir(Or.UseRouteError);return t||(null==(e=n.errors)?void 0:e[i])}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(Dr||(Dr={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(Or||(Or={}));const Fr={};function zr(e){let{fallbackElement:t,router:n}=e,[i,o]=r.useState(n.state);r.useLayoutEffect((()=>n.subscribe(o)),[n,o]);let a=r.useMemo((()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})})),[n]),s=n.basename||"/",l=r.useMemo((()=>({router:n,navigator:a,static:!1,basename:s})),[n,a,s]);return r.createElement(r.Fragment,null,r.createElement(dr.Provider,{value:l},r.createElement(fr.Provider,{value:i},r.createElement(Ur,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:a},n.state.initialized?r.createElement(Vr,{routes:n.routes,state:i}):t))),null)}function Vr(e){let{routes:t,state:n}=e;return Sr(t,void 0,n)}function Gr(e){return function(e){let t=r.useContext(mr).outlet;return t?r.createElement(Er.Provider,{value:e},t):t}(e.context)}function Ur(e){let{basename:t="/",children:n=null,location:i,navigationType:o=At.Pop,navigator:a,static:s=!1}=e;yr()&&zt(!1,"You cannot render a inside another . You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),u=r.useMemo((()=>({basename:l,navigator:a,static:s})),[l,a,s]);"string"==typeof i&&(i=qt(i));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default"}=i,v=r.useMemo((()=>{let e=dn(c,l);return null==e?null:{location:{pathname:e,search:d,hash:f,state:h,key:p},navigationType:o}}),[l,c,d,f,h,p,o]);return Vt(null!=v,' is not able to match the URL "'+c+d+f+"\" because it does not start with the basename, so the won't render anything."),null==v?null:r.createElement(pr.Provider,{value:u},r.createElement(vr.Provider,{children:n,value:v}))}var Wr;!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Wr||(Wr={}));new Promise((()=>{}));r.Component;function qr(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&Vt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:r.createElement(e.Component),Component:void 0})),e.ErrorBoundary&&(e.errorElement&&Vt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:r.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}const Xr="get",$r="application/x-www-form-urlencoded";function Kr(e){return null!=e&&"string"==typeof e.tagName}function Zr(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}function Qr(e,t,n){let r,i,o,a=null;if(Kr(s=e)&&"form"===s.tagName.toLowerCase()){let s=t.submissionTrigger;if(t.action)a=t.action;else{let t=e.getAttribute("action");a=t?dn(t,n):null}r=t.method||e.getAttribute("method")||Xr,i=t.encType||e.getAttribute("enctype")||$r,o=new FormData(e),s&&s.name&&o.append(s.name,s.value)}else if(function(e){return Kr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Kr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let s=e.form;if(null==s)throw new Error('Cannot submit a