@getontime/cli
Version:
Time keeping for live events
2 lines • 82.4 kB
JavaScript
System.register(["./jsx-runtime-legacy-DMkDNnVj.js","./useSocket-legacy-C772wu7w.js","./Button-legacy-DpgzgT04.js","./constants-legacy-CvecvM28.js","./useMutation-legacy-CHaWRMnS.js"],function(e,t){var n,r,o,i,a,l,s,c,u,f,d,h,m,p,g,y,v,w,x,b,E,R,S,C,T,k,P,L,M,O,A,$,D,F,I,N,W,B,H,_,j,U,V,z,Y,J,K,X,q,Q,Z,G,ee,te,ne,re,oe,ie,ae,le,se,ce,ue,fe,de,he,me,pe,ge,ye,ve,we,xe,be,Ee,Re,Se,Ce,Te,ke,Pe,Le,Me,Oe,Ae,$e,De,Fe,Ie,Ne,We,Be,He,_e,je,Ue,Ve,ze,Ye,Je,Ke,Xe,qe,Qe,Ze,Ge,et,tt,nt,rt,ot,it,at,lt,st,ct,ut,ft,dt,ht,mt,pt,gt,yt,vt,wt,xt,bt,Et,Rt,St,Ct,Tt,kt,Pt,Lt,Mt,Ot,At,$t,Dt,Ft,It,Nt,Wt,Bt,Ht,_t,jt,Ut,Vt,zt,Yt,Jt,Kt,Xt,qt,Qt,Zt,Gt,en,tn,nn,rn,on,an,ln,sn,cn;function un(e,t,n){const r=function(e,t){return null==t||J(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:r?.[t]}function fn(e){return"function"==typeof e?e():e}function dn(e,t){return t||"click"===e||"mousedown"===e}function hn(e,t,n){let{reference:r,floating:o}=e;const i=N(t),a=s(t),l=g(a),c=x(t),u="y"===i,f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(ge(t)){case"start":m[a]-=h*(n&&u?-1:1);break;case"end":m[a]+=h*(n&&u?-1:1)}return m}async function mn(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=R(t,e),m=le(h),p=l[d?"floating"===f?"reference":"floating":f],g=k(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(p)))||n?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===f?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=k(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:s}):y);return{top:(g.top-x.top+m.top)/w.y,bottom:(x.bottom-g.bottom+m.bottom)/w.y,left:(g.left-x.left+m.left)/w.x,right:(x.right-g.right+m.right)/w.x}}function pn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gn(e){return K.some(t=>e[t]>=0)}function yn(e){const t=w(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=j(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=l(n)!==i||l(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function vn(e){return Q(e)?e:e.contextElement}function wn(e){const t=vn(e);if(!j(t))return v(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=yn(t);let a=(i?l(n.width):n.width)/r,s=(i?l(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function xn(e){const t=oe(e);return he()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ae}function bn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=vn(e);let a=v(1);t&&(r?Q(r)&&(a=wn(r)):a=wn(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==oe(e))&&t}(i,n,r)?xn(i):v(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const e=oe(i),t=r&&Q(r)?oe(r):r;let n=e,o=B(n);for(;o&&r&&t!==n;){const e=wn(o),t=o.getBoundingClientRect(),r=w(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,f*=e.y,s+=i,c+=a,n=oe(o),o=B(n)}}return k({width:u,height:f,x:s,y:c})}function En(e,t){const n=a(e).scrollLeft;return t?t.left+n:bn(D(e)).left+n}function Rn(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-En(e,n),y:n.top+t.scrollTop}}function Sn(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=D(r),s=!!t&&te(t.floating);if(r===l||s&&i)return n;let c={scrollLeft:0,scrollTop:0},u=v(1);const f=v(0),d=j(r);if((d||!d&&!i)&&(("body"!==T(r)||ue(l))&&(c=a(r)),d)){const e=bn(r);u=wn(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}const h=!l||d||i?v(0):Rn(l,c);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-c.scrollTop*u.y+f.y+h.y}}function Cn(e){return Array.from(e.getClientRects())}function Tn(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=oe(e),r=D(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=he();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=En(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=$e&&(i-=a)}else c<=$e&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=D(e),n=a(e),r=e.ownerDocument.body,o=F(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=F(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+En(e);const s=-n.scrollTop;return"rtl"===w(r).direction&&(l+=F(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(D(e));else if(Q(t))r=function(e,t){const n=bn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=j(e)?wn(e):v(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=xn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return k(r)}function kn(e,t){const n=fe(e);return!(n===t||!Q(n)||ae(n))&&("fixed"===w(n).position||kn(n,t))}function Pn(e,t){const n=t.get(e);if(n)return n;let r=X(e,[],!1).filter(e=>Q(e)&&"body"!==T(e)),o=null;const i="fixed"===w(e).position;let a=i?fe(e):e;for(;Q(a)&&!ae(a);){const t=w(a),n=se(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||ue(a)&&!n&&kn(e,a))?r=r.filter(e=>e!==a):o=t,a=fe(a)}return t.set(e,r),r}function Ln(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?te(t)?[]:Pn(t,this._c):[].concat(n),r],a=Tn(t,i[0],o);let l=a.top,s=a.right,c=a.bottom,u=a.left;for(let f=1;f<i.length;f++){const e=Tn(t,i[f],o);l=F(e.top,l),s=H(e.right,s),c=H(e.bottom,c),u=F(e.left,u)}return{width:s-u,height:c-l,x:u,y:l}}function Mn(e){const{width:t,height:n}=yn(e);return{width:t,height:n}}function On(e,t,n){const r=j(t),o=D(t),i="fixed"===n,l=bn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=v(0);function u(){c.x=En(o)}if(r||!r&&!i)if(("body"!==T(t)||ue(o))&&(s=a(t)),r){const e=bn(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const f=!o||r||i?v(0):Rn(o,s);return{x:l.left+s.scrollLeft-c.x-f.x,y:l.top+s.scrollTop-c.y-f.y,width:l.width,height:l.height}}function An(e){return"static"===w(e).position}function $n(e,t){if(!j(e)||"fixed"===w(e).position)return null;if(t)return t(e);let n=e.offsetParent;return D(e)===n&&(n=n.ownerDocument.body),n}function Dn(e,t){const n=oe(e);if(te(e))return n;if(!j(e)){let t=fe(e);for(;t&&!ae(t);){if(Q(t)&&!An(t))return t;t=fe(t)}return n}let r=$n(e,t);for(;r&&V(r)&&An(r);)r=$n(r,t);return r&&ae(r)&&An(r)&&!se(r)?n:r||I(e)||n}function Fn(e){return"rtl"===w(e).direction}function In(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Nn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=vn(e),u=o||i?[...c?X(c):[],...t?X(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=c&&l?function(e,t){let n,r=null;const o=D(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(l||t(),!d||!h)return;const m={rootMargin:-P(f)+"px "+-P(o.clientWidth-(u+d))+"px "+-P(o.clientHeight-(f+h))+"px "+-P(u)+"px",threshold:F(0,H(1,s))||1};let p=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!p)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||In(c,e.getBoundingClientRect())||a(),p=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(y){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let d,h=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!s&&m.observe(c),t&&m.observe(t));let p=s?bn(e):null;return s&&function t(){const r=bn(e);p&&!In(p,r)&&n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),f?.(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(d)}}function Wn(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,o;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(!Wn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Wn(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Bn(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hn(e,t){const n=Bn(e);return Math.round(t*n)/n}function _n(e){const t=je.useRef(e);return Ve(()=>{t.current=e}),t}function jn(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=U(),i=null!=z(),a=G(()=>new W({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new S,floatingId:o,syncOnly:!1,nested:i})).current;return d(()=>{const e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=Q(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,o,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=i,a}function Un(e={}){const{nodeId:t,externalTree:n}=e,r=jn(e),o=e.rootContext||r,i=o.useState("referenceElement"),a=o.useState("floatingElement"),l=o.useState("domReferenceElement"),s=o.useState("open"),c=o.useState("floatingId"),[u,f]=je.useState(null),[h,m]=je.useState(void 0),[p,g]=je.useState(void 0),y=je.useRef(null),v=ne(n),w=je.useMemo(()=>({reference:i,floating:a,domReference:l}),[i,a,l]),x=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[u,f]=je.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=je.useState(r);Wn(d,r)||h(r);const[m,p]=je.useState(null),[g,y]=je.useState(null),v=je.useCallback(e=>{e!==E.current&&(E.current=e,p(e))},[]),w=je.useCallback(e=>{e!==R.current&&(R.current=e,y(e))},[]),x=i||m,b=a||g,E=je.useRef(null),R=je.useRef(null),S=je.useRef(u),C=null!=s,T=_n(s),k=_n(o),P=_n(c),L=je.useCallback(()=>{if(!E.current||!R.current)return;const e={placement:t,strategy:n,middleware:d};k.current&&(e.platform=k.current),_e(E.current,R.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};M.current&&!Wn(S.current,t)&&(S.current=t,Ue.flushSync(()=>{f(t)}))})},[d,t,n,k,P]);Ve(()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);const M=je.useRef(!1);Ve(()=>(M.current=!0,()=>{M.current=!1}),[]),Ve(()=>{if(x&&(E.current=x),b&&(R.current=b),x&&b){if(T.current)return T.current(x,b,L);L()}},[x,b,L,T,C]);const O=je.useMemo(()=>({reference:E,floating:R,setReference:v,setFloating:w}),[v,w]),A=je.useMemo(()=>({reference:x,floating:b}),[x,b]),$=je.useMemo(()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=Hn(A.floating,u.x),r=Hn(A.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Bn(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,A.floating,u.x,u.y]);return je.useMemo(()=>({...u,update:L,refs:O,elements:A,floatingStyles:$}),[u,L,O,A,$])}({...e,elements:{...w,...u&&{reference:u}}}),b=Q(h)?h:null,E=void 0===p?o.state.floatingElement:p;o.useSyncedValue("referenceElement",h??null),o.useSyncedValue("domReferenceElement",void 0===h?l:b),o.useSyncedValue("floatingElement",E);const R=je.useCallback(e=>{const t=Q(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;f(t),x.refs.setReference(t)},[x.refs]),S=je.useCallback(e=>{(Q(e)||null===e)&&(y.current=e,m(e)),(Q(x.refs.reference.current)||null===x.refs.reference.current||null!==e&&!Q(e))&&x.refs.setReference(e)},[x.refs,m]),C=je.useCallback(e=>{g(e),x.refs.setFloating(e)},[x.refs]),T=je.useMemo(()=>({...x.refs,setReference:S,setFloating:C,setPositionReference:R,domReference:y}),[x.refs,S,C,R]),k=je.useMemo(()=>({...x.elements,domReference:l}),[x.elements,l]),P=je.useMemo(()=>({...x,dataRef:o.context.dataRef,open:s,onOpenChange:o.setOpen,events:o.context.events,floatingId:c,refs:T,elements:k,nodeId:t,rootStore:o}),[x,T,k,t,o,s,c]);return d(()=>{l&&(y.current=l)},[l]),d(()=>{o.context.dataRef.current.floatingContext=P;const e=v?.nodesRef.current.find(e=>e.id===t);e&&(e.context=P)}),je.useMemo(()=>({...x,context:P,refs:T,elements:k,rootStore:o}),[x,T,k,P,o])}function Vn(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Ze.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Ze.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function zn(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t,i=Ze.get(n);i&&i!==e&&Vn(i),Vn(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,Ze.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function Yn(e){const t=e.context.dataRef.current,n=G(()=>t.hoverInteractionState??Qe.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),me(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Jn(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function Kn(e,t,n,r,o,i,a,l,s,c){let u=!1;return Jn(e,t,n,r,o,i)&&(u=!u),Jn(e,t,o,i,a,l)&&(u=!u),Jn(e,t,a,l,s,c)&&(u=!u),Jn(e,t,s,c,n,r)&&(u=!u),u}function Xn(e,t,n,r,o,i){return e>=Math.min(n,o)&&e<=Math.max(n,o)&&t>=Math.min(r,i)&&t<=Math.max(r,i)}function qn(){return je.useContext(nt)?.direction??"ltr"}function Qn(e,t,n){const r="inline-start"===e||"inline-end"===e;return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Zn(e,t,n){const{rects:r,placement:o}=e;return{side:Qn(t,x(o),n),align:ge(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Gn(e){return null!=e&&"current"in e}function er(e){return"starting"===e?re:C}function tr(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function nr(e={}){return function(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l="POP",s=null,c=u();function u(){return(a.state||{idx:null}).idx}function f(){l="POP";let e=u(),t=null==e?null:e-c;c=e,s&&s({action:l,location:p.location,delta:t})}function d(e,t){l="PUSH";let r=tr(e)?e:ar(p.location,e,t);n&&n(r,e),c=u()+1;let f=ir(r,c),d=p.createHref(r.mask||r);try{a.pushState(f,"",d)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;o.location.assign(d)}i&&s&&s({action:l,location:p.location,delta:1})}function h(e,t){l="REPLACE";let r=tr(e)?e:ar(p.location,e,t);n&&n(r,e),c=u();let o=ir(r,c),f=p.createHref(r.mask||r);a.replaceState(o,"",f),i&&s&&s({action:l,location:p.location,delta:0})}function m(e){return function(e,t,n=!1){let r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href),rr(r,"No window.location.(origin|href) available to create URL");let o="string"==typeof t?t:lr(t);return o=o.replace(/ $/,"%20"),!n&&ut.test(o)&&(o=r+o),new URL(o,r)}(o,e)}null==c&&(c=0,a.replaceState({...a.state,idx:c},""));let p={get action(){return l},get location(){return e(o,a)},listen(e){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(ft,f),s=e,()=>{o.removeEventListener(ft,f),s=null}},createHref:e=>t(o,e),createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:d,replace:h,go:e=>a.go(e)};return p}(function(e,t){let n=t.state?.masked,{pathname:r,search:o,hash:i}=n||e.location;return ar("",{pathname:r,search:o,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:lr(t)},null,e)}function rr(e,t){if(!1===e||null==e)throw new Error(t)}function or(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function ir(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ar(e,t,n=null,r,o){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?sr(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:o}}function lr({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function sr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function cr(e,t,n="/"){return function(e,t,n,r,o){let i=vr(("string"==typeof t?sr(t):t).pathname||"/",n);if(null==i)return null;let a=o??ur(e),l=null,s=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return or(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(i);for(let c=0;null==l&&c<a.length;++c)l=mr(a[c],s,r);return l}(e,t,n,!1)}function ur(e){let t=fr(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}function fr(e,t=[],n=[],r="",o=!1){let i=(e,i,a=o,l)=>{let s={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&a)return;rr(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let c=xt([r,s.relativePath]),u=n.concat(s);e.children&&e.children.length>0&&(rr(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),fr(e.children,t,u,c,a)),(null!=e.path||e.index)&&t.push({path:c,score:hr(c,e.index),routesMeta:u.map((e,t)=>{let[n,r]=yr(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of dr(e.path))i(e,t,!0,n);else i(e,t)}),t}function dr(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=dr(r.join("/")),l=[];return l.push(...a.map(e=>""===e?i:[i,e].join("/"))),o&&l.push(...a),l.map(t=>e.startsWith("/")&&""===t?"/":t)}function hr(e,t){let n=e.split("/"),r=n.length;return n.some(vt)&&(r+=yt),t&&(r+=mt),n.filter(e=>!vt(e)).reduce((e,t)=>e+(dt.test(t)?ht:""===t?pt:gt),r)}function mr(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l<r.length;++l){let e=r[l],s=l===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u={path:e.relativePath,caseSensitive:e.caseSensitive,end:s},f=e.matcher&&e.compiledParams?gr(u,c,e.matcher,e.compiledParams):pr(u,c),d=e.route;if(!f&&s&&n&&!r[r.length-1].route.index&&(f=pr({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!f)return null;Object.assign(o,f.params),a.push({params:o,pathname:xt([i,f.pathname]),pathnameBase:Et(xt([i,f.pathnameBase])),route:d}),"/"!==f.pathnameBase&&(i=xt([i,f.pathnameBase]))}return a}function pr(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=yr(e.path,e.caseSensitive,e.end);return gr(e,t,n,r)}function gr(e,t,n,r){let o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e},{}),pathname:i,pathnameBase:a,pattern:e}}function yr(e,t=!1,n=!0){or("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,o,i)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=i.charAt(o+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function vr(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 wr(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?sr(e):e;return r?(r=wt(r),n=r.startsWith("/")?xr(r.substring(1),"/"):xr(r,t)):n=t,{pathname:n,search:Rt(o),hash:St(i)}}function xr(e,t){let n=bt(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function br(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 <Link to="..."> and the router will parse it for you.`}function Er(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Rr(e,t,n,r=!1){let o;"string"==typeof e?o=sr(e):(o={...e},rr(!o.pathname||!o.pathname.includes("?"),br("?","pathname","search",o)),rr(!o.pathname||!o.pathname.includes("#"),br("#","pathname","hash",o)),rr(!o.search||!o.search.includes("#"),br("#","search","hash",o)));let i,a=""===e||""===o.pathname,l=a?"/":o.pathname;if(null==l)i=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let s=wr(o,i),c=l&&"/"!==l&&l.endsWith("/"),u=(a||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}function Sr(e){return xt(e.map(e=>e.route.path).filter(Boolean))||"/"}function Cr(e,t){let n=e;if("string"!=typeof n||!ct.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Tt)try{let e=new URL(window.location.href),r=ut.test(n)?new URL((i=n,e.protocol+i.replace(/\\/g,"/"))):new URL(n),a=vr(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:o=!0}catch(a){or(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}var i;return{absoluteURL:r,isExternal:o,to:n}}function Tr(){return null!=je.useContext(Ft)}function kr(){return rr(Tr(),"useLocation() may be used only in the context of a <Router> component."),je.useContext(Ft).location}function Pr(){let{isDataRoute:e}=je.useContext(It);return e?function(){let{router:e}=function(e){let t=je.useContext(Mt);return rr(t,Dr(e)),t}("useNavigate"),t=Ir("useNavigate"),n=je.useRef(!1);return je.useLayoutEffect(()=>{n.current=!0}),je.useCallback(async(r,o={})=>{or(n.current,jt),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))},[e,t])}():function(){rr(Tr(),"useNavigate() may be used only in the context of a <Router> component.");let e=je.useContext(Mt),{basename:t,navigator:n}=je.useContext(Dt),{matches:r}=je.useContext(It),{pathname:o}=kr(),i=JSON.stringify(Er(r)),a=je.useRef(!1);return je.useLayoutEffect(()=>{a.current=!0}),je.useCallback((r,l={})=>{if(or(a.current,jt),!a.current)return;if("number"==typeof r)return void n.go(r);let s=Rr(r,JSON.parse(i),o,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:xt([t,s.pathname])),(l.replace?n.replace:n.push)(s,l.state,l)},[t,n,i,o,e])}()}function Lr(e,{relative:t}={}){let{matches:n}=je.useContext(It),{pathname:r}=kr(),o=JSON.stringify(Er(n));return je.useMemo(()=>Rr(e,JSON.parse(o),r,"path"===t),[e,o,r,t])}function Mr(e,t,n){rr(Tr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=je.useContext(Dt),{matches:o}=je.useContext(It),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let s,c=kr();if(t){let e="string"==typeof t?sr(t):t;rr("/"===l||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),s=e}else s=c;let u=s.pathname||"/",f=u;if("/"!==l){let e=l.replace(/^\//,"").split("/");f="/"+u.replace(/^\//,"").split("/").slice(e.length).join("/")}let d=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):cr(e,{pathname:f}),h=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,i=r?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);rr(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let a=!1,l=-1;if(n&&r){a=r.renderFallback;for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:i}=r,s=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!i||void 0===i[t.route.id]);if(t.route.lazy||s){n.isStatic&&(a=!0),o=l>=0?o.slice(0,l+1):[o[0]];break}}}}let s=n?.onError,c=r&&s?(e,t)=>{s(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Sr(r.matches),errorInfo:t})}:void 0;return o.reduceRight((e,n,s)=>{let u,f=!1,d=null,h=null;var m,p;r&&(u=i&&n.route.id?i[n.route.id]:void 0,d=n.route.errorElement||Ut,a&&(l<0&&0===s?(p="No `HydrateFallback` element provided to render during initial hydration",Yt[m="route-fallback"]||(Yt[m]=!0,or(!1,p)),f=!0,h=null):l===s&&(f=!0,h=n.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,s+1)),y=()=>{let t;return t=u?d:f?h:n.route.Component?je.createElement(n.route.Component,null):n.route.element?n.route.element:e,je.createElement($r,{match:n,routeContext:{outlet:e,matches:g,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===s)?je.createElement(Vt,{location:r.location,revalidation:r.revalidation,component:d,error:u,children:y(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):y()},null)}(d&&d.map(e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:xt([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:xt([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,n);return t&&h?je.createElement(Ft.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...s},navigationType:"POP"}},h):h}function Or(){let e=function(){let e=je.useContext(Nt),t=Fr("useRouteError"),n=Ir("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return je.createElement(je.Fragment,null,je.createElement("h2",null,"Unexpected Application Error!"),je.createElement("h3",{style:{fontStyle:"italic"}},t),n?je.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},n):null,null)}function Ar({children:e,error:t}){let{basename:n}=je.useContext(Dt);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Wt}:${Bt}:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=zt.get(t);if(r)throw r;let o=Cr(e.location,n),i=o.absoluteURL||o.to;if(function(e){try{return Lt.includes(new URL(e).protocol)}catch{return!1}}(i))throw new Error("Invalid redirect location");if(Tt&&!zt.get(t)){if(!o.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace}));throw zt.set(t,n),n}window.location.href=i}return je.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function $r({routeContext:e,match:t,children:n}){let r=je.useContext(Mt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),je.createElement(It.Provider,{value:e},n)}function Dr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fr(e){let t=je.useContext(Ot);return rr(t,Dr(e)),t}function Ir(e){let t=function(e){let t=je.useContext(It);return rr(t,Dr(e)),t}(e),n=t.matches[t.matches.length-1];return rr(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Nr(){let{matches:e,loaderData:t}=Fr("useMatches");return je.useMemo(()=>e.map(e=>function(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,loaderData:t[n.id],handle:n.handle}}(e,t)),[e,t])}function Wr({routes:e,manifest:t,future:n,state:r,isStatic:o,onError:i}){return Mr(e,void 0,{manifest:t,state:r,isStatic:o,onError:i,future:n})}function Br(e){rr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Hr({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,useTransitions:a}){rr(!Tr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=je.useMemo(()=>({basename:l,navigator:o,static:i,useTransitions:a,future:{}}),[l,o,i,a]);"string"==typeof n&&(n=sr(n));let{pathname:c="/",search:u="",hash:f="",state:d=null,key:h="default",mask:m}=n,p=je.useMemo(()=>{let e=vr(c,l);return null==e?null:{location:{pathname:e,search:u,hash:f,state:d,key:h,mask:m},navigationType:r}},[l,c,u,f,d,h,r,m]);return or(null!=p,`<Router basename="${l}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),null==p?null:je.createElement(Dt.Provider,{value:s},je.createElement(Ft.Provider,{children:t,value:p}))}function _r(e,t=[]){let n=[];return je.Children.forEach(e,(e,r)=>{if(!je.isValidElement(e))return;let o=[...t,r];if(e.type===je.Fragment)return void n.push.apply(n,_r(e.props.children,o));rr(e.type===Br,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let i=e.props;rr(!i.index||!i.children,"An index route cannot have child routes.");let a={id:i.id||o.join("-"),caseSensitive:i.caseSensitive,element:i.element,Component:i.Component,index:i.index,path:i.path,middleware:i.middleware,loader:i.loader,action:i.action,hydrateFallbackElement:i.hydrateFallbackElement,HydrateFallback:i.HydrateFallback,errorElement:i.errorElement,ErrorBoundary:i.ErrorBoundary,shouldRevalidate:i.shouldRevalidate,handle:i.handle,lazy:i.lazy};i.children&&(a.children=_r(i.children,o)),n.push(a)}),n}function jr(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Ur(e=""){return 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 Vr(e){return null==e||Xt.has(e)?e:(or(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jt}"`),null)}function zr(e,t){let n,r,o,i,a;if(jr(l=e)&&"form"===l.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?vr(a,t):null,n=e.getAttribute("method")||"get",o=Vr(e.getAttribute("enctype"))||Jt,i=new FormData(e)}else if(function(e){return jr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return jr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?vr(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||"get",o=Vr(e.getAttribute("formenctype"))||Vr(a.getAttribute("enctype"))||Jt,i=new FormData(a,e),!function(){if(null===Kt)try{new FormData(document.createElement("form"),0),Kt=!1}catch(e){Kt=!0}return Kt}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";i.append(`${e}x`,"0"),i.append(`${e}y`,"0")}else t&&i.append(t,r)}}else{if(jr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n="get",r=null,o=Jt,a=e}var l;return i&&"text/plain"===o&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}function Yr(e,t){if(!1===e||null==e)throw new Error(t)}function Jr(e){return e.replace(Qt,e=>qt[e])}function Kr(e,t){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}function Xr(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function qr(e,n,r){return function(e,t){let n=new Set,r=new Set(t);return e.reduce((e,o)=>{if(t&&(null==(i=o)||"string"!=typeof i.page)&&"script"===o.as&&o.href&&r.has(o.href))return e;var i;let a=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(a)||(n.add(a),e.push({key:a,link:o})),e},[])}((await Promise.all(e.map(async e=>{let o=n.routes[e.route.id];if(o){let e=await async function(e,n){if(e.id in n)return n[e.id];try{let r=await st(()=>{return n=e.module,new Promise(e=>e(t.import(`${n}`)));var n},void 0,t.meta.url);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(o,r);return e.links?e.links():[]}return[]}))).flat(1).filter(Xr).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function Qr(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,l=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter((e,t)=>a(e,t)||l(e,t)):"data"===i?t.filter((t,i)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(a(t,i)||l(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Zr(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o}).flat(1),[...new Set(r)];var r}function Gr(){let e=je.useContext(Zt);return Yr(e,"You must render this element inside a <HydratedRouter> element"),e}function eo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function to({page:e,...t}){let n=je.useContext(At),{nonce:r}=Gr(),{router:o}=function(){let e=je.useContext(Mt);return Yr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}(),i=je.useMemo(()=>cr(o.routes,e,o.basename),[o.routes,e,o.basename]);return i?(null==t.nonce&&r&&(t={...t,nonce:r}),n?je.createElement(no,{page:e,matches:i,...t}):je.createElement(ro,{page:e,matches:i,...t})):null}function no({page:e,matches:t,...n}){let r=kr(),o=je.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Kr(e,"rsc"),o=!1,i=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?o=!0:i.push(e.route.id);return o&&i.length>0&&n.searchParams.set("_routes",i.join(",")),[n.pathname+n.search]},[e,r,t]);return je.createElement(je.Fragment,null,o.map(e=>je.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})))}function ro({page:e,matches:t,...n}){let r=kr(),{manifest:o,routeModules:i}=Gr(),{loaderData:a,matches:l}=function(){let e=je.useContext(Ot);return Yr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),s=je.useMemo(()=>Qr(e,t,l,o,r,"data"),[e,t,l,o,r]),c=je.useMemo(()=>Qr(e,t,l,o,r,"assets"),[e,t,l,o,r]),u=je.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!s.some(t=>t.route.id===e.route.id)&&e.route.id in a&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),0===n.size)return[];let c=Kr(e,"data");return l&&n.size>0&&c.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[a,r,o,s,t,e,i]),f=je.useMemo(()=>Zr(c,o),[c,o]),d=function(e){let{manifest:t,routeModules:n}=Gr(),[r,o]=je.useState([]);return je.useEffect(()=>{let r=!1;return qr(e,t,n).then(e=>{r||o(e)}),()=>{r=!0}},[e,t,n]),r}(c);return je.createElement(je.Fragment,null,u.map(e=>je.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),f.map(e=>je.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),d.map(({key:e,link:t})=>je.createElement("link",{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function oo(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function io({basename:e,children:t,history:n,useTransitions:r}){let[o,i]=je.useState({action:n.action,location:n.location}),a=je.useCallback(e=>{!1===r?i(e):je.startTransition(()=>i(e))},[r]);return je.useLayoutEffect(()=>n.listen(a),[n,a]),je.createElement(Hr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:n,useTransitions:r})}function ao({getKey:e,storageKey:t,...n}){let r=je.useContext(Zt),{basename:o}=je.useContext(Dt),i=kr(),a=Nr();!function({getKey:e,storageKey:t}={}){let{router:n}=so("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:o}=function(e){let t=je.useContext(Ot);return rr(t,lo(e)),t}("useScrollRestoration"),{basename:i}=je.useContext(Dt),a=kr(),l=Nr(),s=function(){let e=Fr("useNavigation");return je.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}();je.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),function(e,t){let{capture:n}=t||{};je.useEffect(()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}},[e,n])}(je.useCallback(()=>{if("idle"===s.state){let t=uo(a,l,i,e);on[t]=window.scrollY}try{sessionStorage.setItem(t||rn,JSON.stringify(on))}catch(n){or(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${n}).`)}window.history.scrollRestoration="auto"},[s.state,e,i,a,l,t])),"undefined"!=typeof document&&(je.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||rn);e&&(on=JSON.parse(e))}catch(e){}},[t]),je.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(on,()=>window.scrollY,e?(t,n)=>uo(t,n,i,e):void 0);return()=>t&&t()},[n,i,e]),je.useLayoutEffect(()=>{if(!1!==r)if("number"!=typeof r){try{if(a.hash){let e=document.getElementById(decodeURIComponent(a.hash.slice(1)));if(e)return void e.scrollIntoView()}}catch{or(!1,`"${a.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}!0!==o&&window.scrollTo(0,0)}else window.scrollTo(0,r)},[a,r,o]))}({getKey:e,storageKey:t});let l=je.useMemo(()=>{if(!r||!e)return null;let t=uo(i,a,o,e);return t!==i.key?t:null},[]);if(!r||r.isSpaMode)return null;let s=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},"")}try{let n=JSON.parse(sessionStorage.getItem(e)||"{}")[t||window.history.state.key];"number"==typeof n&&window.scrollTo(0,n)}catch(n){console.error(n),sessionStorage.removeItem(e)}}).toString();return null==n.nonce&&r?.nonce&&(n.nonce=r.nonce),je.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${Jr(JSON.stringify(t||rn))}, ${Jr(JSON.stringify(l))})`}})}function lo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function so(e){let t=je.useContext(Mt);return rr(t,lo(e)),t}function co(){let{router:e}=so("useSubmit"),{basename:t}=je.useContext(Dt),n=Ir("useRouteId"),r=e.fetch,o=e.navigate;return je.useCallback(async(e,i={})=>{let{action:a,method:l,encType:s,formData:c,body:u}=zr(e,t);!1===i.navigate?await r(i.fetcherKey||nn(),n,i.action||a,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:u,formMethod:i.method||l,formEncType:i.encType||s,flushSync:i.flushSync}):await o(i.action||a,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:u,formMethod:i.method||l,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,o,t,n])}function uo(e,t,n,r){let o=null;return r&&(o=r("/"!==n?{...e,pathname:vr(e.pathname,n)||e.pathname}:e,t)),null==o&&(o=e.key),o}function fo(e,t,n){(0,je.useEffect)(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function ho(){const[e,t]=(0,je.useState)({width:0,height:0}),n=(0,je.useCallback)(()=>{t({width:window.innerWidth||0,height:window.innerHeight||0})},[]);return fo("resize",n,an),fo("orientationchange",n,an),(0,je.useEffect)(n,[]),e}async function mo(e){return(await ye.post(cn,e)).data}async function po(e){return(await ye.delete(`${cn}/${e}`)).data}function go({skip:e=!1}={}){const{data:t,status:n,isError:r,refetch:o}=Ee({queryKey:be,queryFn:({signal:e})=>async function(e){return(await ye.get(cn,{signal:e?.signal})).data}({signal:e}),placeholderData:(e,t)=>e,refetchInterval:sn,enabled:!e});return{data:t??[],status:n,isError:r,refetch:o}}return e({B:jn,C:_r,D:function(){let{matches:e}=je.useContext(It);return e[e.length-1]?.params??{}},E:function(){return je.useContext(Ft).navigationType},F:qn,H:un,I:function(e={}){const{blockPointerEvents:t=!1}=e,n=new pe,r=({x:e,y:t,placement:r,elements:o,onClose:i,nodeId:a,tree:l})=>{const s=r?.split("-")[0];let c=!1,f=null,d=null,h="undefined"!=typeof performance?performance.now():0;return function(r){n.clear();const m=o.domReference,g=o.floating;if(!m||!g||null==s||null==e||null==t)return;const{clientX:y,clientY:v}=r,w=M(r),x="mouseleave"===r.type,b=p(g,w),E=p(m,w);if(b&&(c=!0,!x))return;if(E&&(c=!1,!x))return void(c=!0);if(x&&Q(r.relatedTarget)&&p(g,r.relatedTarget))return;function R(){return Boolean(l&&u(l.nodesRef.current,a).length>0)}function S(){R()||(n.clear(),i())}if(R())return;const C=m.getBoundingClientRect(),T=g.getBoundingClientRect(),k=e>T.right-T.width/2,P=t>T.bottom-T.height/2,L=T.width>C.width,O=T.height>C.height,A=(L?C:T).left,$=(L?C:T).right,D=(O?C:T).top,F=(O?C:T).bottom;if("top"===s&&t>=C.bottom-1||"bottom"===s&&t<=C.top+1||"left"===s&&e>=C.right-1||"right"===s&&e<=C.left+1)return void S();let I=!1;switch(s){case"top":I=Xn(y,v,A,C.top+1,$,T.bottom-1);break;case"bottom":I=Xn(y,v,A,T.top+1,$,C.bottom-1);break;case"left":I=Xn(y,v,T.right-1,F,C.left+1,D);break;case"right":I=Xn(y,v,C.right-1,F,T.left+1,D)}if(I)return;if(c&&!function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}(y,v,C))return void S();if(!x&&function(e,t){const n=performance.now(),r=n-h;if(null===f||null===d||0===r)return f=e,d=t,h=n,!1;const o=e-f,i=t-d;return f=e,d=t,h=n,o*o+i*i<r*r*et}(y,v))return void S();let N=!1;switch(s){case"top":{const n=L?tt/2:4*tt,r=L||k?e+n:e-n,o=L?e-n:k?e+n:e-n,i=t+tt+1,a=k||L?T.bottom-tt:T.top,l=k?L?T.bottom-tt:T.top:T.bottom-tt;N=Kn(y,v,r,i,o,i,T.left,a,T.right,l);break}case"bottom":{const n=L?tt/2:4*tt,r=L||k?e+n:e-n,o=L?e-n:k?e+n:e-n,i=t-tt,a=k||L?T.top+tt:T.bottom,l=k?L?T.top+tt:T.bottom:T.top+tt;N=Kn(y,v,r,i,o,i,T.left,a,T.right,l);break}case"left":{const n=O?tt/2:4*tt,r=O||P?t+n:t-n,o=O?t-n:P?t+n:t-n,i=e+tt+1,a=P||O?T.right-tt:T.left,l=P?O?T.right-tt:T.left:T.right-tt;N=Kn(y,v,a,T.top,l,T.bottom,i,r,i,o);break}case"right":{const n=O?tt/2:4*tt,r=O||P?t+n:t-n,o=O?t-n:P?t+n:t-n,i=e-tt,a=P||O?T.left+tt:T.right,l=P?O?T.left+tt:T.right:T.left+tt;N=Kn(y,v,i,r,i,o,a,T.top,l,T.bottom);break}}N?c||n.start(40,S):S()}};return r.__options={...e,blockPointerEvents:t},r},L:function(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:i=!1,restMs:a=0,move:l=!0,triggerElementRef:s=Ge,externalTree:c,isActiveTrigger:u=!0,getHandleCloseContext:f,isClosing:d,shouldOpen:h}=t,m="rootStore"in e?e.rootStore:e,{dataRef:g,events:y}=m.context,v=ne(c),w=Yn(m),x=je.useRef(!1),b=ce(o),R=ce(r),S=ce(a),C=ce(n),T=ce(h),k=ce(d),P=ie(()=>dn(g.current.openEvent?.type,w.interactedInside)),L=ie(()=>!1!==T.current?.()),O=ie((e,t,n)=>{const r=m.context.triggerElements;if(r.hasElement(t))return!e||!p(e,t);if(!Q(n))return!1;const o=n;return r.hasMatchingElement(e=>p(e,o))&&(!e||!p(e,o))}),A=ie(()=>{w.handler&&(q(m.select("domReferenceElement")).removeEventListener("mousemove",w.handler),w.handler=void 0)}),$=ie(()=>{Vn(w)});return u&&(w.handleCloseOptions=b.current?.__options),je.useEffect(()=>A,[A]),je.useEffect(()=>{if(n)return y.on("openchange",e),()=>{y.off("openchange",e)};function e(e){e.open?x.current=!1:(x.current=e.reason===Z,A(),w.openChangeTimeout.clear(),w.restTimeout.clear(),w.blockMouseMove=!0,w.restTimeoutPending=!1)}},[n,y,w,A]),je.useEffect(()=>{if(!n)return;function e(e,t=!0){const n=un(R.current,"close",w.pointerType);n?w.openChangeTimeout.start(n,()=>{m.setOpen(!1,Y(Z,e)),v?.events.emit("floating.closed",e)}):t&&(w.openChangeTimeout.clear(),m.setOpen(!1,Y(Z,e)),v?.events.emit("floating.closed",e))}const t=s.current??(u?m.select("domReferenceElement"):null);if(Q(t))return l?ee(de(t,"mousemove",r,{once:!0}),de(t,"mouseenter",r),de(t,"mouseleave",o)):ee(de(t,"mouseenter",r),de(t,"mouseleave",o));function r(e){if(w.openChangeTimeout.clear(),w.blockMouseMove=!1,i&&!J(w.pointerType))return;const t=fn(S.current),n=un(R.current,"open",w.pointerType),r=M(e),o=e.currentTarget??null,a=m.select("domReferenceElement");let l=o;if(Q(r)&&!m.context.triggerElements.hasElement(r))for(const i of m.context.triggerElements.elements())if(p(i,r)){l=i;break}Q(o)&&Q(a)&&!m.context.triggerElements.hasElement(o)&&p(o,a)&&(l=a);const s=null!=l&&O(a,l,r),c=m.select("open"),u=k.current?.()??"ending"===m.select("transitionStatus"),f=!c&&u&&x.current,d=!s&&Q(l)&&Q(a)&&p(a,l)&&f,h=t>0&&!n,g=!c||s;s&&(c||f)||d?L()&&m.setOpen(!0,Y(Z,e,l)):h||(n?w.openChangeTimeout.start(n,()=>{g&&L()&&m.setOpen(!0,Y(Z,e,l))}):g&&L()&&m.setOpen(!0,Y(Z,e,l)))}function o(t){if(P())return void $();A();const n=q(m.select("domReferenceElement"));w.restTimeout.clear(),w.restTimeoutPending=!1;const r=g.current.floatingContext??f?.();if(!E(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select("open")||w.openChangeTimeout.clear();const o=s.current;return w.handler=b.current({...r,tree:v,x:t.clientX,y:t.clientY,onClose(){$(),A(),C.current&&!P()&&o===m.select("domReferenceElement")&&e(t,!0)}}),n.addEventListener("mousemove",w.handler),void w.handler(t)}"touch"===w.pointerType&&p(m.select("floatingElement"),t.relatedTarget)||e(t)}}},[A,$,g,R,m,n,b,w,u,O,P,i,l,S,s,v,C,f,k,L]),je.useMemo(()=>{if(n)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e,n=e.currentTarget,r=m.select("domReferenceElement"),o=m.select("open"),a=O(r,n,e.target);if(i&&!J(w.pointerType))return;if(o&&a&&w.handleCloseOptions?.blockPointerEvents){const e=m.select("floatingElement");e&&zn(w,{scopeElement:w.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}const l=fn(S.current);function s(){if(w.restTimeoutPending=!1,P())return;const e=m.select("open");w.blockMouseMove||e&&!a||!L()||m.setOpen(!0,Y(Z,t,n))}o&&!a||0===l||!a&&w.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(w.restTimeout.clear(),"touch"===w.pointerType?Ue.flushSync(()=>{s()}):a&&o?s():(w.restTimeoutPending=!0,w.restTimeout.start(l,s)))}};function e(e){w.pointerType=e.pointerType}},[n,w,P,O,i,m,S,L])},M:er,N:function(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:s=5,sticky:c=!1,arrowPadding:u=5,disableAnchorTracking:f=!1,inline:h,keepMounted:m=!1,floatingRootContext:p,mounted:g,collisionAvoidance:y,shiftCrossAxis:v=!1,nodeId:w,adaptiveOrigin:b,lazyFlip:E=!1,externalTree:R}=e,[S,C]=je.useState(null);g||null===S||C(null);const T=y.side||"flip",k=y.align||"flip",P=y.fallbackAxisSide||"end",L="function"==typeof t?t:void 0,M=ie(L),O=L?M:t,A=ce(t),$=ce(g),D="rtl"===qn(),F=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":D?"left":"right","inline-start":D?"right":"left"}[r],I="center"===i?F:`${F}-${i}`;let W=s;const B="bottom"===r?1:0,H="top"===r?1:0,_="right"===r?1:0,j="left"===r?1:0;"number"==typeof W?W={top:W+B,right:W+j,bottom:W+H,left:W+_}:W&&(W={top:(W.top||0)+B,right:(W.right||0)+j,bottom:(W.bottom||0)+H,left:(W.left||0)+_});const U={boundary:"clipping-ancestors"===l?"clippingAncestors":l,padding:W},V=je.useRef(null),z=ce(o),Y=ce(a),J="function"!=typeof o?o:0,K="function"!=typeof a?a:0,X=[];h&&X.push(h),X.push(ze(e=>{const t=Zn(e,r,D),n="function"==typeof z.current?z.current(t):z.current,o="function"==typeof Y.current?Y.current(t):Y.current;return{mainAxis:n,crossAxis:o,alignmentAxis:o}},[J,K,D,r]));const Q="none"===k&&"shift"!==T,Z=!Q&&(c||v||"shift"===T),G="none"===T?null:Ke({...U,padding:{top:W.top+1,right:W.right+1,bottom:W.bottom+1,left:W.left+1},mainAxis:!v&&"flip"===T,crossAxis:"flip"===k&&"alignment",fallbackAxisSideDirection:P}),ee=Q?null:Ye(e=>{const t=q(e.elements.floating).documentElement;return{...U,rootBoundary:v?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==k,crossAxis:Z,limiter:c||v?void 0:Je(e=>{if(!V.current)return{};const{width:t,height:n}=V.current.getBoundingClientRect(),r=N(x(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?W.left+W.right:W.top+W.bottom)/2}})}},[U,c,v,W,k]);"shift"===T||"shift"===k||"center"===i?X.push(ee,G):X.push(G,ee),X.push(Xe({...U,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!$.current)return;const o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${n}px`);const i=oe(e).devicePixelRatio||1,{x:a,y:l,width:s,height:c}=r.reference,u=(Math.round((a+s)*i)-Math.round(a*i))/i,f=(Math.round((l+c)*i)-Math.round(l*i))/i;o.setProperty("--anchor-width",`${u}px`),o.setProperty("--anchor-height",`${f}px`)}}),ot(e=>({element:V.current||q(e.elements.floating).createElement("div"),padding:u,offsetParent:"floating"}),[u]),{name:"transformOrigin",fn(e){const{elements:t,middlewareData:n,placement:i,rects:a,y:l}=e,s=x(i),c=N(s),u=V.current,f=n.arrow?.x||0,d=n.arrow?.y||0,h=f+(u?.clientWidth||0)/2,m=d+(u?.clientHeight||0)/2,p=Math.abs(n.shift?.y||0),g=a.reference.height/2,y="function"==typeof o?o(Zn(e,r,D)):o,v=p>y,w={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${m}px`,right:`${-y}px ${m}px`}[s],b=`${h}px ${a.reference.y+g-l}px`;return t.floating.style.setProperty("--transform-origin",Z&&"y"===c&&v?b:w),{}}},at,b),d(()=>{!g&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,p]);const te=je.useMemo(()=>({elementResize:!f&&"undefined"!=typeof ResizeObserver,layoutShift:!f&&"undefined"!=typeof IntersectionObserver}),[f]),{refs:ne,elements:re,x:ae,y:le,middlewareData:se,update:ue,placement:fe,context:de,isPositioned:he,floatingStyles:me}=Un({rootContext:p,open:m?g:void 0,placement:I,middleware:X,strategy:n,whileElementsMounted:m?void 0:(...e)=>Nn(...e,te),nodeId:w,externalTree:R}),{sideX:pe,sideY:ye}=se.adaptiveOrigin||lt,ve=he?n:"fixed",we=je.useMemo(()=>{const e=b?{position:ve,[pe]:ae,[ye]:le}:{position:ve,...me};return he||(e.opacity=0),e},[b,ve,pe,ae,ye,le,me,he]),xe=je.useRef(null);d(()=>{if(!g)return;const e=A.current,t="function"==typeof e?e():e,n=(Gn(t)?t.current:t)||null;n!==xe.current&&(ne.setPositionReference(n),xe.current=n)},[g,ne,O,A]),je.useEffect(()=>{if(!g)return;const e=A.current;"function"!=typeof e&&Gn(e)&&e.current!==xe.current&&(ne.setPositionReference(e.current),xe.current=e.current)},[g,ne,O,A]),je.useEffect(()=>{if(m&&g&&re.reference&&re.floating)return Nn(re.reference,re.floating,ue,te)},[m,g,re,ue,te]);const be=x(fe),Ee=Qn(r,be,D),Re=ge(fe)||"center",Se=Boolean(se.hide?.referenceHidden);d(()=>{E&&g&&he&&C(be)},[E,g,he,be]);const Ce=je.useMemo(()=>({position:"absolute",top:se.arrow?.y,left:se.arrow?.x}),[se.arrow]),Te=0!==se.arrow?.centerOffset;return je.useMemo(()=>({positionerStyles:we,arrowStyles:Ce,arrowRef:V,arrowUncentered:Te,side:Ee,align:Re,physicalSide:be,anchorHidden:Se,refs:ne,context:de,isPositioned:he,update:ue}),[we,Ce,V,Te,Ee,Re,be,Se,ne,de,he,ue])},O:cr,R:function(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:o}=t,i="rootStore"in e?e.rootStore:e,a=i.useState("open"),l=i.useState("floatingElement"),s=i.useState("domReferenceElement"),{dataRef:c}=i.context,f=ne(),h=z(),m=Yn(i),g=L(),v=ie(()=>dn(c.current.openEvent?.type,m.interactedInside)),w=ie(()=>{return e=c.current.openEvent?.type,e?.includes("mouse")&&"mousedown"!==e;var e}),x=ie(()=>{Vn(m)});d(()=>{a||(m.pointerType=void 0,m.restTimeoutPending=!1,m.interactedInside=!1,x())},[a,m,x]),je.useEffect(()=>x,[x]),d(()=>{if(n&&a&&m.handleCloseOptions?.blockPointerEvents&&w()&&Q(s)&&l){const e=s,t=l,n=q(l),r=f?.nodesRef.current.find(e=>e.id===h)?.context?.elements.floating;r&&(r.style.pointerEvents="");const o=m.pointerEventsScopeElement!==t?m.pointerEventsScopeElement:null,i=r!==t?r:null;return zn(m,{scopeElement:m.handleCloseOptions?.getScope?.()??o??i??e.closest("[data-rootownerid]")??n.body,referenceElement:e,floatingElement:t}),()=>{x()}}},[n,a,s,l,m,w,f,h,x]),je.useEffect(()=>{if(!n)return;function e(){return!!(f&&h&&u(f.nodesRef.current,h).length>0)}function t(n){f&&h&&!e()&&g.start(0,()=>{f.events.off("floating.closed",t),i.setOpen(!1,Y(Z,n)),f.events.emit("floating.closed",n)})}const a=l;return ee(a&&de(a,"mouseenter",function(){m.openChangeTimeout.clear(),g.clear(),f?.events.off("floating.closed",t),x()}),a&&de(a,"mouseleave",function(n){if(e()&&f)return void f.events.on("floating.closed",t);if(E(n.relatedTarget,i.context.triggerElements))return;const a=c.current.floatingContext?.nodeId??o,l=n.relatedTarget;f&&a&&Q(l)&&u(f.nodesRef.current,a,!1).some(e=>p(e.context?.elements.floating,l))||(m.handler?m.handler(n):(x(),w()&&!v()&&function(e){const t=un(r,"close",m.pointerType),n=()=>{i.setOpen(!1,Y(Z,e)),f?.events.emit("floating.closed",e)};t?m.openChangeTimeout.start(t,n):(m.openChangeTimeout.clear(),n())}(n)))}),a&&de(a,"pointerdown",function(e){const t=M(e);y(t)?m.interactedInside=null!=t?.closest("[aria-haspopup]"):m.interactedInside=!1},!0),()=>{f?.events.off("floating.closed",t)})},[n,l,i,c,r,o,w,v,x,m,f,h,g])},S:function({children:e,location:t}){return Mr(_r(e),t)},T:Pr,_:fo,b:function({to:e,replace:t,state:n,relative:r}){rr(Tr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=je.useContext(Dt);or(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=je.useContext(It),{pathname:a}=kr(),l=Pr(),s=Rr(e,Er(i),a,"path"===r),c=JSON.stringify(s);return je.useEffect(()=>{l(JSON.parse(c),{replace:t,state:n,relative:r})},[l,c,r,t,n]),null},c:function(e){return xe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 17V3"},child:[]},{tag:"path",attr:{d:"m6 11 6 6 6-6"},child:[]},{tag:"path",attr:{d:"M19 21H5"},child:[]}]})(e)},d:function(e){return xe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"7",height:"9",x:"3",y:"3",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"5",x:"14",y:"3",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"9",x:"14",y:"12",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"5",x:"3",y:"16",rx:"1"},child:[]}]})(e)},f:function(e){for(const t of e.keys())if(!ln.has(t))return!0;return!1},g:ho,i:function(e){const{data:t}=go();return{viewPresets:(0,je.useMemo)(()=>t.filter(t=>t.target===e),[t,e])}},j:function(e,t,{styles:n,transitionStatus:r,props:o,refs:i,hidden:a,inert:l=!1}){const s={...n};return l&&(s.pointerEvents="none"),_("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:a,style:s},er(r),o],stateAttributesMapping:f})},k:wr,l:function(e){return xe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m7 15 5 5 5-5"},child:[]},{tag:"path",attr:{d:"m7 9 5-5 5 5"},child:[]}]})(e)},m:function(e){const t=new URLSearchParams(e);return ln.forEach(e=>t.delete(e)),t.toString()},n:function(){const e=we(),t=Re({mutationFn:mo,onSuccess:t=>{e.setQueryData(be,t)}}),n=Re({mutationFn:({alias:e,data:t})=>async function(e,t){return(await ye.put(`${cn}/${e}`,t)).data}(e,t),onSuccess:t=>{e.setQueryData(be,t)}}),r=Re({mutationFn:po,onSuccess:t=>{e.setQueryData(be,t)}});return{addPreset:t.mutateAsync,updatePreset:(e,t)=>n.mutateAsync({alias:e,data:t}),deletePreset:r.mutateAsync,isMutating:t.isPending||n.isPending||r.isPending,isMutationError:t.isError||n.isError||r.isError}},r:go,t:function(){const{width:e}=ho();return(0,je.useMemo)(()=>e<1300,[e])},u:function(e){return xe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 2v2"},child:[]},{tag:"path",attr:{d:"M14 2v2"},child:[]},{tag:"path",attr:{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1"},child:[]},{tag:"path",attr:{d:"M6 2v2"},child:[]}]})(e)},v:function({basename:e,children:t,useTransitions:n,window:r}){let o=je.useRef(null);null==o.current&&(o.current=nr({window:r,v5Compat:!0}));let i=o.current,[a,l]=je.useState({action:i.action,location:i.location}),s=je.useCallback(e=>{!1===n?l(e):je.startTransition(()=>l(e))},[n]);return je.useLayoutEffect(()=>i.listen(s),[i,s]),je.createElement(Hr,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:i,useTransitions:n})},w:kr,x:Br,y:function(e){or("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=je.useRef(Ur(e)),n=je.useRef(!1),r=kr(),o=je.useMemo(()=>function(e,t){let n=Ur(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),i=Pr();return[o,je.useCallback((e,t)=>{const r=Ur("function"==typeof e?e(new URLSearchParams(o)):e);n.current=!0,i("?"+r,t)},[i,o])]},z:Yn}),{setters:[function(e){n=e.a,r=e.n},function(e){o=e.Dt,i=e.en},function(e){a=e.$n,l=e.$t,s=e.Bt,c=e.Cr,u=e.Ct,f=e.D,d=e.Er,h=e.Ft,m=e.Gt,p=e.Hn,g=e.Ht,y=e.In,v=e.It,w=e.Jn,x=e.Jt,b=e.Kt,E=e.Ln,R=e.Lt,S=e.N,C=e.Nn,T=e.Qn,k=e.Qt,P=e.Rt,L=e.Sr,M=e.Un,O=e.Ut,A=e.Vt,$=e.Wt,D=e.Xn,F=e.Xt,I=e.Yn,N=e.Yt,W=e.Z,B=e.Zn,H=e.Zt,_=e._t,j=e.ar,U=e.bt,V=e.cr,z=e.ct,Y=e.dn,J=e.dr,K=e.en,X=e.er,q=e.in,Q=e.ir,Z=e.kn,G=e.kr,ee=e.ln,te=e.lr,ne=e.lt,re=e.mt,oe=e.nr,ie=e.on,ae=e.or,le=e.qt,se=e.rr,ce=e.sn,ue=e.sr,fe=e.tr,de=e.un,he=e.ur,me=e.wr,pe=e.xr,ge=e.zt},function(e){e.Bn,e.Hn,ye=e._n,ve=e.b,we=e.bn,xe=e.gn,be=e.v,Ee=e.vn,e.zn},function(e){Re=e.t}],execute:function(){!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"f14ad0099eab1969fdd065b56af5fdd3cf530de6"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b1cf6545-e452-4c3f-9680-c86566d501b4",e._sentryDebugIdIdentifier="sentry-dbid-b1cf6545-e452-4c3f-9680-c86566d501b4")}catch(e){}}(),Se=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:mn},s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=hn(c,r,s),d=r,h=0;const m={};for(let p=0;p<i.length;p++){const n=i[p];if(!n)continue;const{name:g,fn:y}=n,{x:v,y:w,data:x,reset:b}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=v?v:u,f=null!=w?w:f,m[g]={...m[g],...x},b&&h<50&&(h++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=hn(c,d,s))),p=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}},Ce=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=R(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=x(o),w=N(l),E=x(l)===l,S=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=d||(E||!g?[b(l)]:O(l)),T="none"!==p;!d&&T&&C.push(...m(l,g,p,S));const k=[l,...C],P=await s.detectOverflow(t,y),L=[];let M=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&L.push(P[v]),f){const e=A(o,a,S);L.push(P[e[0]],P[e[1]])}if(M=[...M,{placement:o,overflows:L}],!L.every(e=>e<=0)){var $,D;const e=((null==($=i.flip)?void 0:$.index)||0)+1,t=k[e];if(t&&("alignment"!==f||w===N(t)||M.every(e=>N(e.placement)!==w||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}};let n=null==(D=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:D.placement;if(!n)switch(h){case"bestFit":{var F;const e=null==(F=M.filter(e=>{if(T){const t=N(e.placement);return t===w||"y"===t}return!0}).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:F[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Te=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=R(e,t);switch(o){case"referenceHidden":{const e=pn(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:gn(e)}}}case"escaped":{const e=pn(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:gn(e)}}}default:return{}}}}},ke=new Set(["left","top"]),Pe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=x(n),l=ge(n),s="y"===N(n),c=ke.has(a)?-1:1,u=i&&s?-1:1,f=R(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof m&&(h="end"===l?-1*m:m),s?{x:h*u,y:d*c}:{x:d*c,y:h*u}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Le=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=R(e,t),u={x:n,y:r},f=await i.detectOverflow(t,c),d=N(x(o)),m=$(d);let p=u[m],g=u[d];if(a){const e="y"===m?"bottom":"right",t=p+f["y"===m?"top":"left"],n=p-f[e];p=h(t,p,n)}if(l){const e="y"===d?"bottom":"right",t=g+f["y"===d?"top":"left"],n=g-f[e];g=h(t,g,n)}const y=s.fn({...t,[m]:p,[d]:g});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[m]:a,[d]:l}}}}}},Me=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=R(e,t),u={x:n,y:r},f=N(o),d=$(f);let h=u[d],m=u[f];const p=R(l,t),g="number"==typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(s){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var y,v;const e="y"===d?"width":"height",t=ke.has(x(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[f])||0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[f])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:h,[f]:m}}}},Oe=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=R(e,t),u=await a.detectOverflow(t,c),f=x(o),d=ge(o),h="y"===N(o),{width:m,height:p}=i.floating;let g,y;"top"===f||"bottom"===f?(g=f,y=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,g="end"===d?"top":"bottom");const v=p-u.top-u.bottom,w=m-u.left-u.right,b=H(p-u[g],v),E=H(m-u[y],w),S=!t.middlewareData.shift;let C=b,T=E;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(T=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(C=v),S&&!d){const e=F(u.left,0),t=F(u.right,0),n=F(u.top,0),r=F(u.bottom,0);h?T=m-2*(0!==e||0!==t?e+t:F(u.left,u.right)):C=p-2*(0!==n||0!==r?n+r:F(u.top,u.bottom))}await s({...t,availableWidth:T,availableHeight:C});const k=await a.getDimensions(l.floating);return m!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}},Ae=v(0),$e=25,e("V",De={convertOffsetParentRelativeRectToViewportRelativeRect:Sn,getDocumentElement:D,getClippingRect:Ln,getOffsetParent:Dn,getElementRects:async function(e){const t=this.getOffsetParent||Dn,n=this.getDimensions,r=await n(e.floating);return{reference:On(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:Cn,getDimensions:Mn,getScale:wn,isElement:Q,isRTL:Fn}),Fe=Pe,Ie=Le,Ne=Ce,We=Oe,Be=Te,He=Me,_e=(e,t,n)=>{const r=new Map,o={platform:De,...n},i={...o.platform,_c:r};return Se(e,t,{...o,platform:i})},je=n(r(),1),Ue=n(i(),1),Ve="undefined"!=typeof document?je.useLayoutEffect:function(){},ze=(e,t)=>{const n=Fe(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ye=(e,t)=>{const n=Ie(e);return{name:n.name,fn:n.fn,options:[e,t]}},Je=(e,t)=>({fn:He(e).fn,options:[e,t]}),Ke=(e,t)=>{const n=Ne(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xe=(e,t)=>{const n=We(e);return{name:n.name,fn:n.fn,options:[e,t]}},qe=(e,t)=>{const n=Be(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qe=class e{constructor(){c(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()}),c(this,"disposeEffect",()=>this.dispose),this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new pe,this.restTimeout=new pe,this.handleCloseOptions=void 0}static create(){return new e}},Ze=new WeakMap,Ge={current:null},et=.1*.1,tt=.5,nt=je.createContext(void 0),rt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:f=0,offsetParent:d="real"}=R(e,t)||{};if(null==u)return{};const m=le(f),p={x:n,y:r},y=s(o),v=g(y),w=await a.getDimensions(u),x="y"===y,b=x?"top":"left",E=x?"bottom":"right",S=x?"clientHeight":"clientWidth",C=i.reference[v]+i.reference[y]-p[y]-i.floating[v],T=p[y]-i.reference[y],k="real"===d?await(a.getOffsetParent?.(u)):l.floating;let P=l.floating[S]||i.floating[v];P&&await(a.isElement?.(k))||(P=l.floating[S]||i.floating[v]);const L=C/2-T/2,M=P/2-w[v]/2-1,O=Math.min(m[b],M),A=Math.min(m[E],M),$=O,D=P-w[v]-A,F=P/2-w[v]/2+L,I=h($,F,D),N=!c.arrow&&null!=ge(o)&&F!==I&&i.reference[v]/2-(F<$?O:A)-w[v]/2<0,W=N?F<$?F-$:F-D:0;return{[y]:p[y]+W,data:{[y]:I,centerOffset:F-I-W,...N&&{alignmentOffset:W}},reset:N}}}),ot=(e,t)=>({...rt(e),options:[e,t]}),it=qe().fn,at={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=0===t&&0===n&&0===r&&0===o;return{data:{referenceHidden:(await it(e)).data?.referenceHidden||i}}}},lt={sideX:"left",sideY:"top"},e("P",{name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:l}=e,s=oe(o),c=s.getComputedStyle(o);if("0s"===c.transitionDuration||""===c.transitionDuration)return{x:t,y:n,data:lt};const u=await(i.getOffsetParent?.(o));let f={width:0,height:0};if("fixed"===a&&s?.visualViewport)f={width:s.visualViewport.width,height:s.visualViewport.height};else if(u===s){const e=q(o);f={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(i.isElement?.(u))&&(f=await i.getDimensions(u));const d=x(l);let h=t,m=n;return"left"===d&&(h=f.width-(t+r.width)),"top"===d&&(m=f.height-(n+r.height)),{x:h,y:m,data:{sideX:"left"===d?"right":lt.sideX,sideY:"top"===d?"bottom":lt.sideY}}}}),e("A",st=function(e,t,n){let r=Promise.resolve();function o(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&o(e.reason);return e().catch(o)})}),ct=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ut=/^[\\/]{2}/,ft="popstate",dt=/^:[\w-]+$/,ht=3,mt=2,pt=1,gt=10,yt=-2,vt=e=>"*"===e,wt=e=>e.replace(/[\\/]{2,}/g,"/"),xt=e=>wt(e.join("/")),bt=e=>e.replace(/\/+$/,""),Et=e=>bt(e).replace(/^\/*/,"/"),Rt=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",St=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",Ct=class{constructor(e,t,n,r=!1){c(this,"status",void 0),c(this,"statusText",void 0),c(this,"data",void 0),c(this,"error",void 0),c(this,"internal",void 0),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}},Tt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,kt=["POST","PUT","PATCH","DELETE"],new Set(kt),Pt=["GET",...kt],new Set(Pt),Lt=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"],(Mt=je.createContext(null)).displayName="DataRouter",(Ot=je.createContext(null)).displayName="DataRouterState",At=je.createContext(!1),($t=je.createContext({isTransitioning:!1})).displayName="ViewTransition",je.createContext(new Map).displayName="Fetchers",je.createContext(null).displayName="Await",(Dt=je.createContext(null)).displayName="Navigation",(Ft=je.createContext(null)).displayName="Location",(It=je.createContext({outlet:null,matches:[],isDataRoute:!1})).displayName="Route",(Nt=je.createContext(null)).displayName="RouteError",Wt="REACT_ROUTER_ERROR",Bt="REDIRECT",Ht="ROUTE_ERROR_RESPONSE",jt="You should call navigate() in a React.useEffect(), not when your component is first rendered.",je.createContext(null),Ut=je.createElement(Or,null),_t=class extends je.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:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Wt}:${Ht}:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new Ct(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?je.createElement(It.Provider,{value:this.props.routeContext},je.createElement(Nt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?je.createElement(Ar,{error:e},t):t}},c(_t,"contextType",At),Vt=_t,zt=new WeakMap,Yt={},je.memo(Wr),Jt="application/x-www-form-urlencoded",Kt=null,Xt=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]),qt={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Qt=/[&><\u2028\u2029]/g,(Zt=je.createContext(void 0)).displayName="FrameworkContext",Gt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Gt&&(window.__reactRouterVersion="8.0.1")}catch(t){}io.displayName="unstable_HistoryRouter",(en=je.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:o,replace:i,mask:a,state:l,target:s,to:c,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:d,...h},m){let{basename:p,navigator:g,useTransitions:y}=je.useContext(Dt),v="string"==typeof c&&ct.test(c),w=Cr(c,p),x=function(e,{relative:t}={}){rr(Tr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=je.useContext(Dt),{hash:o,pathname:i,search:a}=Lr(e,{relative:t}),l=i;return"/"!==n&&(l="/"===i?n:xt([n,i])),r.createHref({pathname:l,search:a,hash:o})}(c=w.to,{relative:r}),b=kr(),E=null;if(a){let e=Rr(a,[],b.mask?b.mask.pathname:"/",!0);"/"!==p&&(e.pathname="/"===e.pathname?p:xt([p,e.pathname])),E=g.createHref(e)}let[R,S,C]=function(e,t){let n=je.useContext(Zt),[r,o]=je.useState(!1),[i,a]=je.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=t,d=je.useRef(null);je.useEffect(()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{a(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[e]),je.useEffect(()=>{if(r){let e=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(e)}}},[r]);let h=()=>{o(!0)},m=()=>{o(!1),a(!1)};return n?"intent"!==e?[i,d,{}]:[i,d,{onFocus:eo(l,h),onBlur:eo(s,m),onMouseEnter:eo(c,h),onMouseLeave:eo(u,m),onTouchStart:eo(f,h)}]:[!1,d,{}]}(n,h),T=function(e,{target:t,replace:n,mask:r,state:o,preventScrollReset:i,relative:a,viewTransition:l,defaultShouldRevalidate:s,useTransitions:c}={}){let u=Pr(),f=kr(),d=Lr(e,{relative:a});return je.useCallback(h=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(h,t)){h.preventDefault();let t=void 0!==n?n:lr(f)===lr(d),m=()=>u(e,{replace:t,mask:r,state:o,preventScrollReset:i,relative:a,viewTransition:l,defaultShouldRevalidate:s});c?je.startTransition(()=>m()):m()}},[f,u,d,n,r,o,t,e,i,a,l,s,c])}(c,{replace:i,mask:a,state:l,target:s,preventScrollReset:u,relative:r,viewTransition:f,defaultShouldRevalidate:d,useTransitions:y}),k=!(w.isExternal||o),P=je.createElement("a",{...h,...C,href:(k?E:void 0)||w.absoluteURL||x,onClick:k?function(t){e&&e(t),t.defaultPrevented||T(t)}:e,ref:oo(m,S),target:s,"data-discover":v||"render"!==t?void 0:"true"});return R&&!v?je.createElement(je.Fragment,null,P,je.createElement(to,{page:x})):P})).displayName="Link",je.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:i,viewTransition:a,children:l,...s},c){let u=Lr(i,{relative:s.relative}),f=kr(),d=je.useContext(Ot),{navigator:h,basename:m}=je.useContext(Dt),p=null!=d&&function(e,{relative:t}={}){let n=je.useContext($t);rr(null!=n,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=so("useViewTransitionState"),o=Lr(e,{relative:t});if(!n.isTransitioning)return!1;let i=vr(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=vr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=pr(o.pathname,a)||null!=pr(o.pathname,i)}(u)&&!0===a,g=h.encodeLocation?h.encodeLocation(u).pathname:u.pathname,y=f.pathname,v=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;t||(y=y.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=vr(v,m)||v);const w="/"!==g&&g.endsWith("/")?g.length-1:g.length;let x,b=y===g||!r&&y.startsWith(g)&&"/"===y.charAt(w),E=null!=v&&(v===g||!r&&v.startsWith(g)&&"/"===v.charAt(g.length)),R={isActive:b,isPending:E,isTransitioning:p},S=b?e:void 0;x="function"==typeof n?n(R):[n,b?"active":null,E?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof o?o(R):o;return je.createElement(en,{...s,"aria-current":S,className:x,ref:c,style:C,to:i,viewTransition:a},"function"==typeof l?l(R):l)}).displayName="NavLink",je.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:a="get",action:l,onSubmit:s,relative:c,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:d,...h},m)=>{let{useTransitions:p}=je.useContext(Dt),g=co(),y=function(e,{relative:t}={}){let{basename:n}=je.useContext(Dt),r=je.useContext(It);rr(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...Lr(e||".",{relative:t})},a=kr();if(null==e){i.search=a.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();i.search=n?`?${n}`:""}}return e&&"."!==e||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:xt([n,i.pathname])),lr(i)}(l,{relative:c}),v="get"===a.toLowerCase()?"get":"post",w="string"==typeof l&&ct.test(l);return je.createElement("form",{ref:m,method:v,action:y,onSubmit:r?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,l=r?.getAttribute("formmethod")||a,h=()=>g(r||e.currentTarget,{fetcherKey:t,method:l,navigate:n,replace:o,state:i,relative:c,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:d});p&&!1!==n?je.startTransition(()=>h()):h()},...h,"data-discover":w||"render"!==e?void 0:"true"})}).displayName="Form",ao.displayName="ScrollRestoration",tn=0,nn=()=>`__${String(++tn)}__`,rn="react-router-scroll-positions",on={},an={passive:!0},e("p",ln=new Set(["token","n","alias"])),e("h",o(e=>({params:{},save:(t,n)=>e(e=>{if(!t)return e;const r={...e.params};return n?r[t]=n:delete r[t],{params:r}}),clear:t=>e(e=>{if(!e.params[t])return e;const n={...e.params};return delete n[t],{params:n}}),clearAll:()=>e({params:{}})}))),e("o",sn=12e4),e("s",{cuesheetMode:"cuesheet-mode",editorMode:"editor-mode"}),e("a",function(e){return e.Run="run",e.Edit="edit",e}({})),cn=`${ve}/url-presets`}}});
//# sourceMappingURL=useIsSmallScreen-legacy-DavgXfPB.js.map