better-review 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,113 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/css-DgaLhXQH.js","assets/css-BGIxQoYs.js","assets/scss-8bKmll0B.js","assets/html-BHZv6uqE.js","assets/javascript-BzbQS41l.js","assets/javascript-CpIGwZ_Y.js"])))=>i.map(i=>d[i]);
2
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function l(e){return Object.keys(e)}function u(e){return e&&typeof e==`object`&&!Array.isArray(e)}function d(e,t){let n={...e},r=t;return u(e)&&u(t)&&Object.keys(t).forEach(t=>{u(r[t])&&t in e?n[t]=d(n[t],r[t]):n[t]=r[t]}),n}function f(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function p(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function m(e){let t=p(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function h(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function g(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?h(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?h(n):n}}return r}return n}var _=g(`rem`,{shouldScale:!0}),v=g(`em`);function y(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function b(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var x=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function L(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function R(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else L(R.bind(null,e))}var te={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=te,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=R,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=L,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),S=o(((e,t)=>{t.exports=x()})),C=c(S(),1);function w(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==C.Fragment}function T(e){let t=(0,C.createContext)(null);return[t,()=>{let n=(0,C.use)(t);if(n===null)throw Error(e);return n}]}function E(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function D(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function O(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function k(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}function A(e,t,n){return D(e,n)===D(t,n)}function j({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:a=`rtl`,orientation:o}){return s=>{n?.(s);let c=Array.from(D(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>A(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=k(l,c,r),d=O(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[k(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[O(c.length,c,!1)]?.focus()}}}var M={app:100,modal:200,popover:300,overlay:400,max:9999};function N(e){return M[e]}var ee=()=>{};function P(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||ee:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function F(e,t=`size`,n=!0){if(e!==void 0)return b(e)?n?_(e):e:`var(--${t}-${e})`}function I(e){return F(e,`mantine-spacing`)}function L(e){return e===void 0?`var(--mantine-radius-default)`:F(e,`mantine-radius`)}function R(e){return F(e,`mantine-font-size`)}function te(e){return F(e,`mantine-line-height`,!1)}function ne(e){if(e)return F(e,`mantine-shadow`,!1)}function re(e,t){return n=>{e?.(n),t?.(n)}}function ie(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):Math.min(t===void 0&&n!==void 0?e:Math.max(e,t),n)}function ae(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function oe(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1){let r=n[i];if(!(r in t)||e[r]!==t[r]&&!(Number.isNaN(e[r])&&Number.isNaN(t[r])))return!1}return!0}function se(e){let t=(0,C.useRef)(e);return(0,C.useEffect)(()=>{t.current=e}),(0,C.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function ce(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=se(e),s=(0,C.useRef)(0),c=(0,C.useRef)(0),l=(0,C.useRef)(null),u=(0,C.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(c.current=0,s.current!==0&&e._hasPendingCallback){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&u()},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,C.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}var le=[`mousedown`,`touchstart`];function z(e,t,n,r=!0,i=!1){let a=(0,C.useRef)(null),o=t||le,s=(0,C.useEffectEvent)(t=>{let{target:r}=t??{};if(!document.body.contains(r)&&r?.tagName!==`HTML`)return;let i=t.composedPath();Array.isArray(n)?n.every(e=>!!e&&!i.includes(e))&&e(t):a.current&&!i.includes(a.current)&&e(t)}),c=o.join(`,`);return(0,C.useEffect)(()=>{if(!r)return;let e=c.split(`,`);return e.forEach(e=>document.addEventListener(e,s,i)),()=>{e.forEach(e=>document.removeEventListener(e,s,i))}},[c,r,i]),a}function B(e={}){let t=e.timeout??2e3,[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),o=(0,C.useRef)(null);(0,C.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}function V(e,t){if(typeof t==`boolean`)return t;if(typeof window<`u`&&`matchMedia`in window)try{return window.matchMedia(e).matches}catch{return!1}return!1}function ue(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,C.useState)(n?t:V(e));return(0,C.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var H=typeof document<`u`?C.useLayoutEffect:C.useEffect;function de(e,t){return e.length!==t.length||t.some((t,n)=>!Object.is(t,e[n]))}function fe(e,t){let n=(0,C.useRef)(!1),r=(0,C.useRef)(null),i=(0,C.useRef)(void 0),a={};(0,C.useEffect)(()=>{let o=r.current===a,s=i.current;if(r.current=a,i.current=t,!n.current)n.current=!0;else if(!o&&!(t&&s&&!de(s,t)))return e()},t)}function pe({opened:e,shouldReturnFocus:t=!0}){let n=(0,C.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return fe(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};if(document.addEventListener(`keydown`,a),e)n.current=document.activeElement;else if(t){let e=document.activeElement;i=window.setTimeout(()=>{let t=document.activeElement;(t===null||t===document.body||t===e)&&r()},10)}return()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var me=/input|select|textarea|button|object|summary|iframe/,he=`a, input, select, textarea, button, object, summary, iframe, audio[controls], video[controls], [contenteditable], [tabindex]`;function ge(e){let t=e.getAttribute(`contenteditable`);return t!==null&&t!==`false`}function _e(e){let t=e.nodeName.toLowerCase();return(t===`audio`||t===`video`)&&e.hasAttribute(`controls`)}function ve(e){return e.style.display===`none`}function ye(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&t!==document.body&&t.nodeType!==11;){if(ve(t))return!1;t=t.parentNode}return!0}function U(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function be(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(U(e));return(me.test(t)&&!e.disabled||ge(e)||_e(e)||e instanceof HTMLAnchorElement&&e.href||n)&&ye(e)}function xe(e){let t=U(e);return(Number.isNaN(t)||t>=0)&&be(e)}function Se(e){let t=Array.from(e.querySelectorAll(he)).filter(xe),n=t.filter(e=>U(e)>0).sort((e,t)=>U(e)-U(t)),r=t.filter(e=>!(U(e)>0));return[...n,...r]}var Ce=[`date`,`time`,`datetime-local`,`month`,`week`],we=[`audio`,`video`,`iframe`,`object`,`embed`];function Te(e){return!!e&&e.tagName===`INPUT`&&e.type===`radio`}function Ee(e,t){return e.name!==``&&e.name===t.name&&e.form===t.form}function De(e){let t=e.nodeName.toLowerCase();return t===`input`?Ce.includes(e.type):we.includes(t)}function Oe(e,t){let n=Se(e);return n.filter(e=>e===t||!Te(e)?!0:Te(t)&&Ee(e,t)?!1:e.checked?!0:!n.some(t=>Te(t)&&t.checked&&Ee(t,e)))}function ke(e,t,n,r){let i=e.indexOf(t);if(i!==-1)return i+1;if(t===n)return 0;let a=r?Node.DOCUMENT_POSITION_PRECEDING:Node.DOCUMENT_POSITION_FOLLOWING,o=e.findIndex(e=>(t.compareDocumentPosition(e)&a)!==0);return o===-1?0:o}function Ae(e,t,n){let r=Oe(e,t);n&&r.reverse();let i=ke(r,t,e,n);return[...r.slice(i),...r.slice(0,i)].filter(e=>e!==t)}function je(e,t){for(let n of e)if(n.focus(),t.activeElement===n)return}function Me(e,t){let n=e.getRootNode(),r=n.activeElement;if(!r||r!==e&&!e.contains(r))return;let i=Ae(e,r,t.shiftKey);De(r)?setTimeout(()=>{let t=n.activeElement;e.isConnected&&t!==r&&t!==i[0]&&je([...i,r],n)}):(t.preventDefault(),je(i,n))}var Ne=new Set;function Pe(e,t){let n=t.getRootNode().activeElement;if(!n)return!1;for(let r of Ne){let i=r.current;if(r!==e&&i&&i!==t&&t.contains(i)&&i.contains(n))return!0}return!1}function Fe(e=!0){let t=(0,C.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(he));t=n.find(xe)||n.find(be)||null,!t&&be(e)&&(t=e)}t?t.focus({preventScroll:!0}):console.warn(`[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node`,e)},r=(0,C.useCallback)(r=>{e&&(r===null?t.current=null:t.current!==r&&(setTimeout(()=>{r.getRootNode()?n(r):console.warn(`[@mantine/hooks/use-focus-trap] Ref node is not part of the dom`,r)}),t.current=r))},[e]);return(0,C.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>{t.current&&n(t.current)});let r=e=>{e.key!==`Tab`||e.defaultPrevented||!t.current||Pe(t,t.current)||Me(t.current,e)};return Ne.add(t),document.addEventListener(`keydown`,r),()=>{Ne.delete(t),document.removeEventListener(`keydown`,r)}},[e]),r}var Ie=e=>(e+1)%1e6;function Le(){let[,e]=(0,C.useReducer)(Ie,0);return e}function Re(e){let t=(0,C.useId)(),[n,r]=(0,C.useState)(`mantine-${t.replace(/:/g,``)}`),i=(0,C.useRef)(!1);return H(()=>{i.current||(i.current=!0,r(ae()))},[]),typeof e==`string`?e:n}function ze(e,t,n){let r=(0,C.useEffectEvent)(t);(0,C.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}function Be(e,t=`use-local-storage`){try{return JSON.stringify(e)}catch{throw Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function Ve(e){try{return e&&JSON.parse(e)}catch{return e}}function He(e){return{getItem:t=>{try{return window[e].getItem(t)}catch{return console.warn(`use-local-storage: Failed to get value from storage, localStorage is blocked`),null}},setItem:(t,n)=>{try{window[e].setItem(t,n)}catch{console.warn(`use-local-storage: Failed to set value to storage, localStorage is blocked`)}},removeItem:t=>{try{window[e].removeItem(t)}catch{console.warn(`use-local-storage: Failed to remove value from storage, localStorage is blocked`)}}}}function Ue(e,t){let n=e===`localStorage`?`mantine-local-storage`:`mantine-session-storage`,{getItem:r,setItem:i,removeItem:a}=He(e);return function({key:o,defaultValue:s,getInitialValueInEffect:c=!0,sync:l=!0,deserialize:u=Ve,serialize:d=e=>Be(e,t)}){let f=(0,C.useCallback)(t=>{let n;try{n=typeof window>`u`||!(e in window)||window[e]===null||!!t}catch{n=!0}if(n)return s;let i=r(o);return i===null?s:u(i)},[o,s]),[p,m]=(0,C.useState)(f(c)),h=(0,C.useCallback)(e=>{e instanceof Function?m(t=>{let r=e(t);return i(o,d(r)),queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(n,{detail:{key:o,value:r}}))}),r}):(i(o,d(e)),window.dispatchEvent(new CustomEvent(n,{detail:{key:o,value:e}})),m(e))},[o]),g=(0,C.useCallback)(()=>{a(o),m(s),window.dispatchEvent(new CustomEvent(n,{detail:{key:o,value:s}}))},[o,s]);return ze(`storage`,t=>{l&&t.storageArea===window[e]&&t.key===o&&m(u(t.newValue??void 0))}),ze(n,e=>{l&&e.detail.key===o&&m(e.detail.value)}),(0,C.useEffect)(()=>{s!==void 0&&p===void 0&&h(s)},[s,p,h]),(0,C.useEffect)(()=>{let e=f();e!==void 0&&h(e)},[o]),[p===void 0?s:p,h,g]}}function We(e){let{getItem:t}=He(e);return function({key:n,defaultValue:r,deserialize:i=Ve}){let a;try{a=typeof window>`u`||!(e in window)||window[e]===null}catch{a=!0}if(a)return r;let o=t(n);return o===null?r:i(o)}}function Ge(e){return Ue(`localStorage`,`use-local-storage`)(e)}We(`localStorage`);function Ke(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function qe(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=Ke(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():Ke(e,null)}),t.clear()}}}function Je(...e){return(0,C.useCallback)(qe(...e),e)}function Ye({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,C.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function Xe(e,t){return ue(`(prefers-reduced-motion: reduce)`,e,t)}var Ze={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function Qe(e){let t=(0,C.useRef)(0),[n,r]=(0,C.useState)(Ze),i=(0,C.useRef)(null);return[(0,C.useCallback)(n=>{i.current&&=(i.current.disconnect(),null),t.current&&cancelAnimationFrame(t.current),n&&(i.current=new ResizeObserver(e=>{let n=e[0];n&&(cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{let e=n.borderBoxSize?.[0]||n.contentBoxSize?.[0];if(e){let t=e.inlineSize,i=e.blockSize;r({width:t,height:i,x:n.contentRect.x,y:n.contentRect.y,top:n.contentRect.top,left:n.contentRect.left,bottom:n.contentRect.bottom,right:n.contentRect.right})}else r(n.contentRect)}))}),i.current.observe(n,e))},[e]),n]}function $e(e){let[t,{width:n,height:r}]=Qe(e);return{ref:t,width:n,height:r}}function et(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!oe(e[n],t[n]))return!1;return!0}function tt(e){let t=(0,C.useRef)([]),n=(0,C.useRef)(0);return et(t.current,e)||(t.current=e,n.current+=1),[n.current]}function nt(e,t){(0,C.useEffect)(e,tt(t))}var rt={" ":`space`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,Escape:`escape`,Esc:`escape`,esc:`escape`,Enter:`enter`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,"+":`plus`,"-":`minus`,"*":`asterisk`,"/":`slash`};function it(e){let t=e.replace(`Key`,``).toLowerCase();return rt[e]||t}function at(e){let t=e.toLowerCase().split(`+`).map(e=>e.trim()),n={alt:t.includes(`alt`),ctrl:t.includes(`ctrl`),meta:t.includes(`meta`),mod:t.includes(`mod`),shift:t.includes(`shift`)},r=[`alt`,`ctrl`,`meta`,`shift`,`mod`],i=t.find(e=>!r.includes(e));return{...n,key:i===`[plus]`?`+`:i}}function ot(e,t,n){let{alt:r,ctrl:i,meta:a,mod:o,shift:s,key:c}=e,{altKey:l,ctrlKey:u,metaKey:d,shiftKey:f,key:p,code:m}=t;if(r!==l)return!1;if(o){if(!u&&!d)return!1}else if(i!==u||a!==d)return!1;return s===f&&!!(c&&(n?it(m)===it(c):it(p??m)===it(c)))}function st(e,t){return n=>ot(at(e),n,t)}function ct(e,t,n=!1){return e.target instanceof HTMLElement?(n||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function lt(e,t=[`INPUT`,`TEXTAREA`,`SELECT`],n=!1){let r=(0,C.useEffectEvent)(r=>{e.forEach(([e,i,a])=>{let{preventDefault:o=!0,usePhysicalKeys:s=!1}=a||{};st(e,s)(r)&&ct(r,t,n)&&(o&&r.preventDefault(),i(r))})});(0,C.useEffect)(()=>(document.documentElement.addEventListener(`keydown`,r),()=>document.documentElement.removeEventListener(`keydown`,r)),[])}function ut(e,t,n={autoInvoke:!1}){let r=(0,C.useRef)(null),i=se(e),a=(0,C.useCallback)((...e)=>{r.current||=window.setTimeout(()=>{i(...e),r.current=null},t)},[t]),o=(0,C.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,C.useEffect)(()=>(n.autoInvoke&&a(),o),[o,a]),{start:a,clear:o}}function dt(e){let t=(0,C.useRef)(void 0);return(0,C.useEffect)(()=>{t.current=e},[e]),t.current}function ft(e,t,n){let r=(0,C.useRef)(null);(0,C.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function pt(){let[e,t]=(0,C.useState)(!1);return(0,C.useEffect)(()=>t(!0),[]),e}var mt=[`mouse`,`touch`],ht=10;function gt(e,t={}){let{threshold:n=400,events:r=mt,cancelOnMove:i=!1,onStart:a,onFinish:o,onCancel:s}=t,c=(0,C.useRef)(!1),l=(0,C.useRef)(!1),u=(0,C.useRef)(-1),d=(0,C.useRef)(null);(0,C.useEffect)(()=>()=>window.clearTimeout(u.current),[]);let f=r.join(`,`);return(0,C.useMemo)(()=>{if(typeof e!=`function`)return{};let t=i!==!1,f=i===!0?ht:i===!1?0:i,p=t=>{(yt(t)||vt(t))&&(a&&a(t),d.current=_t(t),l.current=!0,u.current=window.setTimeout(()=>{e(t),c.current=!0},n))},m=e=>{(yt(e)||vt(e))&&(c.current?o&&o(e):l.current&&s&&s(e),c.current=!1,l.current=!1,d.current=null,u.current!==-1&&(window.clearTimeout(u.current),u.current=-1))},h=e=>{if(!t||!l.current||c.current)return;let n=_t(e);if(!n||!d.current)return;let r=n.x-d.current.x,i=n.y-d.current.y;Math.sqrt(r*r+i*i)>f&&m(e)},g={};return r.includes(`mouse`)&&(g.onMouseDown=p,g.onMouseUp=m,g.onMouseLeave=m,t&&(g.onMouseMove=h)),r.includes(`touch`)&&(g.onTouchStart=p,g.onTouchEnd=m,g.onTouchCancel=m,t&&(g.onTouchMove=h)),g},[e,n,s,o,a,i,f])}function _t(e){if(vt(e)){let t=e.touches[0]??e.changedTouches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function vt(e){return window.TouchEvent?e.nativeEvent instanceof TouchEvent:`touches`in e.nativeEvent}function yt(e){return e.nativeEvent instanceof MouseEvent}var bt=o((e=>{var t=S();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),xt=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=bt()})),St=100;function Ct(e){return e>0?1:e<0?-1:0}function wt(e){let t=e??0;return typeof t==`number`?[t,t]:t}function Tt(){return{isActive:!1,pointerId:-1,startXY:[0,0],prevXY:[0,0],startTimestamp:0,prevTimestamp:0,thresholdMet:!1,firstFired:!1,lockedAxis:null,canceled:!1,lastVelocity:[0,0]}}function Et(e,t={}){let[n,r]=(0,C.useState)(!1),i=(0,C.useRef)(e);i.current=e;let a=(0,C.useRef)(t);a.current=t;let o=(0,C.useRef)(Tt()),s=(0,C.useRef)(null);return{ref:(0,C.useCallback)(e=>{if(!e)return;let t=new AbortController,n=e=>{let t=a.current,n=o.current;if(t.axis===`x`)return[e[0],0];if(t.axis===`y`)return[0,e[1]];if(t.axis===`lock`){if(n.lockedAxis===null){let r=t.axisThreshold??1;(Math.abs(e[0])>r||Math.abs(e[1])>r)&&(n.lockedAxis=Math.abs(e[0])>=Math.abs(e[1])?`x`:`y`)}if(n.lockedAxis===`x`)return[e[0],0];if(n.lockedAxis===`y`)return[0,e[1]]}return e},c=()=>{let e=o.current;e.isActive=!1,e.pointerId=-1,e.thresholdMet=!1,e.firstFired=!1,e.lockedAxis=null,e.canceled=!1,r(!1),document.body.style.userSelect=``,document.body.style.webkitUserSelect=``,s.current?.abort(),s.current=null},l=()=>{o.current.isActive&&(o.current.canceled=!0,c())},u=()=>{r(!0),document.body.style.userSelect=`none`,document.body.style.webkitUserSelect=`none`},d=e=>{if(a.current.enabled===!1||e.button!==0||o.current.isActive)return;let t=o.current;t.isActive=!0,t.pointerId=e.pointerId,t.startXY=[e.clientX,e.clientY],t.prevXY=[e.clientX,e.clientY],t.startTimestamp=e.timeStamp,t.prevTimestamp=e.timeStamp,t.thresholdMet=!1,t.firstFired=!1,t.lockedAxis=null,t.canceled=!1,t.lastVelocity=[0,0];let[n,r]=wt(a.current.threshold);n===0&&r===0&&(t.thresholdMet=!0,t.firstFired=!0,u(),i.current({xy:[e.clientX,e.clientY],initial:[e.clientX,e.clientY],movement:[0,0],delta:[0,0],distance:[0,0],direction:[0,0],velocity:[0,0],elapsedTime:0,first:!0,last:!1,active:!0,tap:!1,canceled:!1,cancel:l,event:e})),s.current?.abort(),s.current=new AbortController;let c=s.current.signal;document.addEventListener(`pointermove`,f,{signal:c}),document.addEventListener(`pointerup`,p,{signal:c}),document.addEventListener(`pointercancel`,m,{signal:c})},f=e=>{let t=o.current;if(!t.isActive||e.pointerId!==t.pointerId)return;let r=[e.clientX-t.startXY[0],e.clientY-t.startXY[1]];if(!t.thresholdMet){let[n,i]=wt(a.current.threshold);if(Math.abs(r[0])<n&&Math.abs(r[1])<i){t.prevXY=[e.clientX,e.clientY],t.prevTimestamp=e.timeStamp;return}t.thresholdMet=!0,u()}let s=n(r),c=[e.clientX-t.prevXY[0],e.clientY-t.prevXY[1]],d=n(c),f=e.timeStamp-t.prevTimestamp,p=f>0?[Math.abs(d[0])/f,Math.abs(d[1])/f]:t.lastVelocity;t.lastVelocity=p;let m=!t.firstFired;t.firstFired=!0,t.prevXY=[e.clientX,e.clientY],t.prevTimestamp=e.timeStamp,i.current({xy:[e.clientX,e.clientY],initial:[...t.startXY],movement:s,delta:d,distance:[Math.abs(s[0]),Math.abs(s[1])],direction:[Ct(d[0]),Ct(d[1])],velocity:p,elapsedTime:e.timeStamp-t.startTimestamp,first:m,last:!1,active:!0,tap:!1,canceled:!1,cancel:l,event:e})},p=e=>{let t=o.current;if(!t.isActive||e.pointerId!==t.pointerId)return;let r=a.current;if(!t.thresholdMet){if(r.filterTaps){let a=[e.clientX-t.startXY[0],e.clientY-t.startXY[1]],o=n(a),s=[Math.abs(o[0]),Math.abs(o[1])],c=Math.max(s[0],s[1])<(r.tapThreshold??3);i.current({xy:[e.clientX,e.clientY],initial:[...t.startXY],movement:o,delta:o,distance:s,direction:[Ct(o[0]),Ct(o[1])],velocity:[0,0],elapsedTime:e.timeStamp-t.startTimestamp,first:!0,last:!0,active:!1,tap:c,canceled:!1,cancel:l,event:e})}c();return}let s=[e.clientX-t.startXY[0],e.clientY-t.startXY[1]],u=n(s),d=[Math.abs(u[0]),Math.abs(u[1])],f=[e.clientX-t.prevXY[0],e.clientY-t.prevXY[1]],p=n(f),m=e.timeStamp-t.prevTimestamp>St?[0,0]:t.lastVelocity,h=Math.max(d[0],d[1]),g=r.filterTaps===!0&&h<(r.tapThreshold??3);i.current({xy:[e.clientX,e.clientY],initial:[...t.startXY],movement:u,delta:p,distance:d,direction:[Ct(p[0]),Ct(p[1])],velocity:m,elapsedTime:e.timeStamp-t.startTimestamp,first:!t.firstFired,last:!0,active:!1,tap:g,canceled:!1,cancel:l,event:e}),c()},m=e=>{let t=o.current;if(!t.isActive||e.pointerId!==t.pointerId)return;let r=[e.clientX-t.startXY[0],e.clientY-t.startXY[1]],a=n(r);i.current({xy:[e.clientX,e.clientY],initial:[...t.startXY],movement:a,delta:[0,0],distance:[Math.abs(a[0]),Math.abs(a[1])],direction:[0,0],velocity:[0,0],elapsedTime:e.timeStamp-t.startTimestamp,first:!t.firstFired,last:!0,active:!1,tap:!1,canceled:!0,cancel:l,event:e}),c()};return e.addEventListener(`pointerdown`,d,{signal:t.signal}),()=>{t.abort(),s.current?.abort(),s.current=null,o.current.isActive&&(o.current.isActive=!1,r(!1),document.body.style.userSelect=``,document.body.style.webkitUserSelect=``)}},[]),active:n}}function Dt(){return`development`}function Ot(e){return e?.props?.ref}function kt(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function At(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=At(e,n.shadowRoot);if(t)return t}}return null}function jt(e,t=document){let n=[],r=t.querySelectorAll(e);n.push(...Array.from(r));let i=t.querySelectorAll(`*`);for(let t=0;t<i.length;t+=1){let r=i[t];if(r.shadowRoot){let t=jt(e,r.shadowRoot);n.push(...t)}}return n}function Mt(e){if(!e)return document;let t=e.getRootNode(),n=t.nodeType===Node.DOCUMENT_NODE,r=t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in t;return n||r?t:document}function Nt(e){let t=C.Children.toArray(e);return t.length!==1||!w(t[0])?null:t[0]}function W(e){return e}function Pt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Pt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Ft(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pt(e))&&(r&&(r+=` `),r+=t);return r}var It={};function Lt(e){let t={};return e.forEach(e=>{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=Ft(t[e],n):t[e]=n})}),t}function Rt({theme:e,classNames:t,props:n,stylesCtx:r}){return Lt((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||It))}function zt({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function Bt(e){return e===`auto`||e===`dark`||e===`light`}function Vt({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return Bt(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&Bt(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function Ht(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function Ut(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Wt(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function Gt(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function Kt(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function qt(e){return Ut(e)?Wt(e):e.startsWith(`rgb`)?Gt(e):e.startsWith(`hsl`)?Kt(e):{r:0,g:0,b:0,a:1}}function Jt(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Yt(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function Xt(e){if(e.startsWith(`oklch(`))return(Yt(e)||0)/100;let{r:t,g:n,b:r}=qt(e),i=t/255,a=n/255,o=r/255,s=Jt(i),c=Jt(a),l=Jt(o);return .2126*s+.7152*c+.0722*l}function Zt(e,t=.179){return!e.startsWith(`var(`)&&Xt(e)>t}function Qt({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Zt(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Zt(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Zt(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][Ht(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:Zt(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Zt(e,t.luminanceThreshold),shade:a,variable:void 0}}function $t(e,t){let n=Qt({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function en(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function tn(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=qt(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function nn(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=$t(n.from,t),i=$t(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function rn(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=qt(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var an=rn,on=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=Qt({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&en(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${_(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${_(1)} solid transparent`}:{background:e,hover:tn(e,.1),color:r,border:`${_(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${_(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:tn(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${_(1)} solid transparent`}}return{background:rn(e,.1),hover:rn(e,.12),color:e,border:`${_(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${_(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:rn(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${_(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:rn(e,.05),color:e,border:`${_(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${_(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:rn(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${_(1)} solid transparent`}}return{background:`transparent`,hover:rn(e,.12),color:e,border:`${_(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${_(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${_(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${_(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:tn(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${_(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:tn(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${_(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:tn(t.white,.01),color:e,border:`${_(1)} solid transparent`}:n===`gradient`?{background:nn(r,t),hover:nn(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${_(1)} solid var(--mantine-color-default-border)`}:{}};function sn({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&Qt({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function cn(e,t,n){return sn({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function ln(e,t){let n=e.colors[e.primaryColor];return en(n)?e.autoContrast?cn(n,e,t):`var(--mantine-color-white)`:sn({color:n[Ht(e,t)],theme:e,autoContrast:null})}function un(e,t){return typeof e==`boolean`?e:t.autoContrast}var dn=(0,C.createContext)(null);function fn(){let e=(0,C.use)(dn);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function pn(){return fn().cssVariablesResolver}function mn(){return fn().classNamesPrefix}function hn(){return fn().getStyleNonce}function gn(){return fn().withStaticClasses}function _n(){return fn().headless}function vn(){return fn().stylesTransform?.sx}function yn(){return fn().stylesTransform?.styles}function bn(){return fn().env||`default`}function xn(){return fn().deduplicateInlineStyles}function Sn(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function Cn({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,C.useRef)(null),[a,o]=(0,C.useState)(()=>e.get(t)),s=r||a,c=(0,C.useCallback)(t=>{r||(Sn(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,C.useCallback)(()=>{o(t),Sn(t,n),e.clear()},[e.clear,t]);return(0,C.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),H(()=>{Sn(e.get(t),n)},[]),(0,C.useEffect)(()=>{if(r)return Sn(r,n),()=>{};r===void 0&&Sn(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&Sn(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var wn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Tn=o(((e,t)=>{t.exports=wn()})),En={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},Dn=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,On={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:En,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:on,autoContrast:!1,luminanceThreshold:.3,fontFamily:Dn,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:Dn,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:_(34),lineHeight:`1.3`},h2:{fontSize:_(26),lineHeight:`1.35`},h3:{fontSize:_(22),lineHeight:`1.4`},h4:{fontSize:_(18),lineHeight:`1.45`},h5:{fontSize:_(16),lineHeight:`1.5`},h6:{fontSize:_(14),lineHeight:`1.5`}}},fontSizes:{xs:_(12),sm:_(14),md:_(16),lg:_(18),xl:_(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:_(2),sm:_(4),md:_(8),lg:_(16),xl:_(32)},spacing:{xs:_(10),sm:_(12),md:_(16),lg:_(20),xl:_(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), 0 ${_(1)} ${_(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${_(10)} ${_(15)} ${_(-5)}, rgba(0, 0, 0, 0.04) 0 ${_(7)} ${_(7)} ${_(-5)}`,md:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${_(20)} ${_(25)} ${_(-5)}, rgba(0, 0, 0, 0.04) 0 ${_(10)} ${_(10)} ${_(-5)}`,lg:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${_(28)} ${_(23)} ${_(-7)}, rgba(0, 0, 0, 0.04) 0 ${_(12)} ${_(12)} ${_(-7)}`,xl:`0 ${_(1)} ${_(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${_(36)} ${_(28)} ${_(-7)}, rgba(0, 0, 0, 0.04) 0 ${_(17)} ${_(17)} ${_(-7)}`},other:{},components:{}},kn=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,An=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function jn(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function Mn(e){if(!(e.primaryColor in e.colors))throw Error(kn);if(typeof e.primaryShade==`object`&&(!jn(e.primaryShade.dark)||!jn(e.primaryShade.light))||typeof e.primaryShade==`number`&&!jn(e.primaryShade))throw Error(An)}function Nn(e,t){if(!t)return Mn(e),e;let n=d(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),Mn(n),n}var G=Tn(),Pn=(0,C.createContext)(null),Fn=()=>(0,C.use)(Pn)||On;function In(){let e=(0,C.use)(Pn);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function Ln({theme:e,children:t,inherit:n=!0}){let r=Fn(),i=(0,C.useMemo)(()=>Nn(n?r:On,e),[e,r,n]);return(0,G.jsx)(Pn,{value:i,children:t})}Ln.displayName=`@mantine/core/MantineThemeProvider`;function Rn(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function zn(e,t){let n=t?[t]:[`:root`,`:host`],r=Rn(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=Rn(e.dark),o=Rn(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function Bn({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=Ht(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:an(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=Ht(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:tn(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:tn(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:an(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function Vn(e,t,n){l(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var Hn=e=>{let t=Ht(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:_(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":ln(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":ln(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};Vn(r.variables,e.breakpoints,`breakpoint`),Vn(r.variables,e.spacing,`spacing`),Vn(r.variables,e.fontSizes,`font-size`),Vn(r.variables,e.lineHeights,`line-height`),Vn(r.variables,e.shadows,`shadow`),Vn(r.variables,e.radius,`radius`),Vn(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),l(e.colors).forEach(t=>{let n=e.colors[t];en(n)?(Object.assign(r.light,Bn({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,Bn({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=cn(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=cn(n,e,`dark`)):(n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,Bn({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,Bn({theme:e,color:t,colorScheme:`dark`,withColorValues:!1})))});let i=e.headings.sizes;return l(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function Un(){let e=In(),t=hn(),n=l(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=m(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:v(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:v(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function Wn({theme:e,generator:t}){let n=Hn(e),r=t?.(e);return r?d(n,r):n}var Gn=Hn(On);function Kn(e){let t={variables:{},light:{},dark:{}};return l(e.variables).forEach(n=>{Gn.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),l(e.light).forEach(n=>{Gn.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),l(e.dark).forEach(n=>{Gn.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function qn(e){return zn({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Jn({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=In(),r=hn(),i=Wn({theme:n,generator:pn()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=zn(a?Kn(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:qn(e)}`}}):null}Jn.displayName=`@mantine/CssVariables`;function Yn({respectReducedMotion:e,getRootElement:t}){H(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function Xn({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=Vt(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=Cn({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return Yn({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)(dn,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(Ln,{theme:e,children:[o&&(0,G.jsx)(Jn,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(Un,{}),t]})})}Xn.displayName=`@mantine/core/MantineProvider`;function K(e,t,n){let r=In(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...y(n)}}function Zn(e){return e}function Qn({classNames:e,styles:t,props:n,stylesCtx:r}){let i=In();return{resolvedClassNames:e===void 0?void 0:Rt({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:t===void 0?void 0:zt({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var $n={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function er({theme:e,options:t,unstyled:n}){return Ft(t?.focusable&&!n&&(e.focusClassName||$n[e.focusRing]),t?.active&&!n&&e.activeClassName)}function tr(e,t,n=1){if(Object.is(e,t))return!0;if(n===0||typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(!tr(e[r],t[r],n-1))return!1;return!0}let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let i of r)if(!Object.hasOwn(t,i)||!tr(e[i],t[i],n-1))return!1;return!0}function nr({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return Rt({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function rr({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return Rt({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function ir({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function ar({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function or({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function sr({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function cr({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return Ft(er({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),sr({options:t,classes:s,selector:r,unstyled:c||m}),a[r],rr({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),nr({selector:r,stylesCtx:f,options:t,props:d,theme:e}),ir({rootSelector:u,selector:r,className:l}),ar({selector:r,classes:s,unstyled:c||m}),p&&!m&&or({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function lr({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...lr({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function ur({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&zt({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...lr({style:n?.style,theme:e})}}function dr(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...y(t[n])}}),e),{})}function fr({props:e,stylesCtx:t,themeName:n,theme:r}){let i=yn()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function q({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f,stable:p}){let m=In(),h=mn(),g=gn(),_=_n(),v=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:y,getTransformedStyles:b}=fr({props:n,stylesCtx:r,themeName:v,theme:m}),x=Rt({theme:m,classNames:c,props:n,stylesCtx:r}),S=v.map(e=>Rt({theme:m,classNames:m.components[e]?.classNames,props:n,stylesCtx:r})),C=y?{}:zt({theme:m,styles:l,props:n,stylesCtx:r}),w={};if(!y)for(let e of v){let t=zt({theme:m,styles:m.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))w[e]={...w[e],...t[e]}}let T=dr([_?{}:d?.(m,n,r),...v.map(e=>m.components?.[e]?.vars?.(m,n,r)),u?.(m,n,r)]),E=lr({style:a,theme:m});return pr((e,a)=>({...f?.[e],className:cr({theme:m,options:a,themeName:v,selector:e,classNamesPrefix:h,resolvedClassNames:x,resolvedThemeClassNames:S,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:g,headless:_,transformedStyles:b([a?.styles,l])}),style:ur({theme:m,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:y,resolvedStyles:C,resolvedThemeStyles:w,resolvedVars:T,resolvedRootStyle:E})}),!!p,[m,h,g,_,y?n:null,t,s,i,o,f,r,x,S,C,w,T,E])}function pr(e,t,n){let r=(0,C.useRef)(null);return t?((!r.current||!tr(r.current.deps,n,3))&&(r.current={deps:n,getStyles:e}),r.current.getStyles):e}function mr(e){return l(e).reduce((t,n)=>e[n]===void 0?t:`${t}${f(n)}:${e[n]};`,``).trim()}function hr({selector:e,styles:t,media:n,container:r}){let i=t?mr(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${mr(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${mr(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function gr(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function _r({deduplicate:e,...t}){let n=hn(),r=hr(t);return e?(0,G.jsx)(`style`,{href:`mantine-${gr(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function vr(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function yr(e,t){return`__mdi__-${vr(`${e?mr(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${mr(e.styles)}`).join(`|`):``}`)}`}function br(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:b,ps:x,pis:S,pie:C,bd:w,bdrs:T,bg:E,c:D,opacity:O,ff:k,fz:A,fw:j,lts:M,ta:N,lh:ee,fs:P,tt:F,td:I,w:L,miw:R,maw:te,h:ne,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:z,left:B,bottom:V,right:ue,inset:H,display:de,flex:fe,hiddenFrom:pe,visibleFrom:me,lightHidden:he,darkHidden:ge,sx:_e,...ve}=e;return{styleProps:y({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:S,pie:C,pe:b,ps:x,bd:w,bg:E,c:D,opacity:O,ff:k,fz:A,fw:j,lts:M,ta:N,lh:ee,fs:P,tt:F,td:I,w:L,miw:R,maw:te,h:ne,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:se,bga:ce,pos:le,top:z,left:B,bottom:V,right:ue,inset:H,display:de,flex:fe,bdrs:T,hiddenFrom:pe,visibleFrom:me,lightHidden:he,darkHidden:ge,sx:_e}),rest:ve}}var xr={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function Sr(e,t){let n=Qt({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function Cr(e,t){let n=Qt({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:Sr(e,t)}function wr(e,t){if(typeof e==`number`)return _(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${_(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${Sr(i.join(` `),t)}`),a.trim()}return e}var Tr={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function Er(e){return typeof e==`string`&&e in Tr?Tr[e]:e}var Dr=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Or(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&Dr.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?_(e):e}function kr(e){return e}var Ar=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function jr(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&Ar.includes(e)?`var(--mantine-${e}-line-height)`:e}function Mr(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?_(e):e}function Nr(e){return typeof e==`number`?_(e):e}function Pr(e,t){if(typeof e==`number`)return _(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return _(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var Fr={color:Sr,textColor:Cr,fontSize:Or,spacing:Pr,radius:Mr,identity:kr,size:Nr,lineHeight:jr,fontFamily:Er,border:wr};function Ir(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function Lr({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(Ir(e))-Number(Ir(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function Rr(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function zr(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Br(e){return typeof e==`object`&&e?l(e).filter(e=>e!==`base`):[]}function Vr(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Hr({styleProps:e,data:t,theme:n}){return Lr(l(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=zr(e[i]);if(!Rr(e[i]))return o.forEach(e=>{r.inlineStyles[e]=Fr[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Br(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=Fr[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:Fr[a.type](Vr(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Ur(){return`__m__-${(0,C.useId)().replace(/[:«»]/g,``)}`}function Wr(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Wr(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Gr(e){return e}var Kr=Gr;function qr(e){return e}function J(e){let t=e;return t.extend=qr,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Jr(e){return J(e)}function Yr(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=qr,t}function Xr(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Zr(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Xr(n)]=e[n]),t},{})}function Qr(e){return e?typeof e==`string`?{[Xr(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Qr(t)}),{}):Zr(e):null}function $r(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...$r(n,t)}),{}):typeof e==`function`?e(t):e??{}}function ei({theme:e,style:t,vars:n,styleProps:r}){let i=$r(t,e),a=$r(n,e);return{...i,...a,...r}}function ti({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=In(),g=e||`div`,{styleProps:_,rest:v}=br(m),y=vn()?.()?.(_.sx),x=Ur(),S=Hr({styleProps:_,theme:h,data:xr}),C=xn(),w=C&&S.hasResponsiveStyles?yr(S.styles,S.media):x,T={ref:p,style:ei({theme:h,style:t,vars:n,styleProps:S.inlineStyles}),className:Ft(r,y,{[w]:S.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":b(o)?void 0:o||void 0,size:f,...Qr(a),...v};return(0,G.jsxs)(G.Fragment,{children:[S.hasResponsiveStyles&&(0,G.jsx)(_r,{selector:`.${w}`,styles:S.styles,media:S.media,deduplicate:C}),typeof d==`function`?d(T):(0,G.jsx)(g,{...T})]})}ti.displayName=`@mantine/core/Box`;var Y=Kr(ti),ni=(0,C.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function ri(){return(0,C.use)(ni)}var[ii,ai]=T(`ScrollArea.Root component was not found in tree`);function oi(e,t){let n=(0,C.useEffectEvent)(t);H(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function si(e){let{style:t,...n}=e,r=ai(),[i,a]=(0,C.useState)(0),[o,s]=(0,C.useState)(0),c=!!(i&&o);return oi(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),oi(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function ci(e){let t=ai(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(si,{...e}):null}var li={scrollHideDelay:1e3,type:`hover`};function ui(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=K(`ScrollAreaRoot`,li,e),[s,c]=(0,C.useState)(null),[l,u]=(0,C.useState)(null),[d,f]=(0,C.useState)(null),[p,m]=(0,C.useState)(null),[h,g]=(0,C.useState)(null),[_,v]=(0,C.useState)(0),[y,b]=(0,C.useState)(0),[x,S]=(0,C.useState)(!1),[w,T]=(0,C.useState)(!1),E=Je(a,c);return(0,G.jsx)(ii,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(Y,{...o,ref:E,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}ui.displayName=`@mantine/core/ScrollAreaRoot`;function di(e,t){let n=e/t;return Number.isNaN(n)?0:n}function fi(e){let t=di(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function pi(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function mi(e,[t,n]){return Math.min(n,Math.max(t,e))}function hi(e,t,n=`ltr`){let r=fi(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=mi(e,n===`ltr`?[0,o]:[o*-1,0]);return pi([0,o],[0,s])(c)}function gi(e,t,n,r=`ltr`){let i=fi(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return pi([c,l],d)(e)}function _i(e,t){return e>0&&e<t}function vi(e){return e?parseInt(e,10):0}function yi(e,t,{checkForDefaultPrevented:n=!0}={}){return r=>{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[bi,xi]=T(`ScrollAreaScrollbar was not found in tree`);function Si(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=ai(),[p,m]=(0,C.useState)(null),h=Je(u,m),g=(0,C.useRef)(null),_=(0,C.useRef)(``),v=t.content-t.viewport,y=(0,C.useEffectEvent)(e=>c(e,v)),b=se(o),x=ce(l,10),S=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,C.useEffect)(()=>{if(!p)return;let e=e=>y(e);return p.addEventListener(`wheel`,e,{passive:!1}),()=>p.removeEventListener(`wheel`,e)},[p]),(0,C.useEffect)(b,[t,b]),oi(p,x),oi(f.content,x),(0,G.jsx)(bi,{value:{scrollbar:p,hasThumb:n,onThumbChange:se(r),onThumbPointerUp:se(i),onThumbPositionChange:b,onThumbPointerDown:se(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:yi(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,S(e))}),onPointerMove:yi(e.onPointerMove,S),onPointerUp:yi(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var Ci=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=ai(),[s,c]=(0,C.useState)(),l=(0,C.useRef)(null),u=Je(i,l,o.onScrollbarXChange);return(0,C.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(Si,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${fi(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),_i(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:vi(s.paddingLeft),paddingEnd:vi(s.paddingRight)}})}})};Ci.displayName=`@mantine/core/ScrollAreaScrollbarX`;function wi(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=ai(),[s,c]=(0,C.useState)(),l=(0,C.useRef)(null),u=Je(i,l,o.onScrollbarYChange);return(0,C.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(Si,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${fi(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),_i(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:vi(s.paddingTop),paddingEnd:vi(s.paddingBottom)}})}})}wi.displayName=`@mantine/core/ScrollAreaScrollbarY`;function Ti(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=ri(),i=ai(),a=(0,C.useRef)(null),o=(0,C.useRef)(0),[s,c]=(0,C.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=di(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>gi(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(Ci,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=hi(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(wi,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=hi(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}Ti.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function Ei(e){let t=ai(),{forceMount:n,...r}=e,[i,a]=(0,C.useState)(!1),o=e.orientation===`horizontal`,s=ce(()=>{if(t.viewport){let e=t.viewport.offsetWidth<t.viewport.scrollWidth,n=t.viewport.offsetHeight<t.viewport.scrollHeight;a(o?e:n)}},10);return oi(t.viewport,s),oi(t.content,s),n||i?(0,G.jsx)(Ti,{"data-state":i?`visible`:`hidden`,...r}):null}Ei.displayName=`@mantine/core/ScrollAreaScrollbarAuto`;function Di(e){let{forceMount:t,...n}=e,r=ai(),[i,a]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(Ei,{"data-state":i?`visible`:`hidden`,...n}):null}Di.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function Oi(e){let{forceMount:t,...n}=e,r=ai(),i=e.orientation===`horizontal`,[a,o]=(0,C.useState)(`hidden`),s=ce(()=>o(`idle`),100);return(0,C.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,C.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(Ti,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:yi(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:yi(e.onPointerLeave,()=>o(`idle`))}):null}function ki(e){let{forceMount:t,...n}=e,r=ai(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,C.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(Di,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(Oi,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(Ei,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(Ti,{...n}):null}ki.displayName=`@mantine/core/ScrollAreaScrollbar`;function Ai(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function ji(e){let{style:t,ref:n,...r}=e,i=ai(),a=xi(),{onThumbPositionChange:o}=a,s=Je(n,a.onThumbChange),c=(0,C.useRef)(void 0),l=ce(()=>{c.current&&=(c.current(),void 0)},100);return(0,C.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=Ai(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:yi(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:yi(e.onPointerUp,a.onThumbPointerUp)})}ji.displayName=`@mantine/core/ScrollAreaThumb`;function Mi(e){let{forceMount:t,...n}=e,r=xi();return t||r.hasThumb?(0,G.jsx)(ji,{...n}):null}Mi.displayName=`@mantine/core/ScrollAreaThumb`;function Ni({children:e,style:t,ref:n,onWheel:r,...i}){let a=ai(),o=Je(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(Y,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}Ni.displayName=`@mantine/core/ScrollAreaViewport`;var Pi={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function Fi(){return typeof window<`u`}function Ii(e){return zi(e)?(e.nodeName||``).toLowerCase():`#document`}function Li(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ri(e){return((zi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function zi(e){return Fi()?e instanceof Node||e instanceof Li(e).Node:!1}function Bi(e){return Fi()?e instanceof Element||e instanceof Li(e).Element:!1}function Vi(e){return Fi()?e instanceof HTMLElement||e instanceof Li(e).HTMLElement:!1}function Hi(e){return!Fi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Li(e).ShadowRoot}function Ui(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ea(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Wi(e){return/^(table|td|th)$/.test(Ii(e))}function Gi(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ki=/transform|translate|scale|rotate|perspective|filter/,qi=/paint|layout|strict|content/,Ji=e=>!!e&&e!==`none`,Yi;function Xi(e){let t=Bi(e)?ea(e):e;return Ji(t.transform)||Ji(t.translate)||Ji(t.scale)||Ji(t.rotate)||Ji(t.perspective)||!Qi()&&(Ji(t.backdropFilter)||Ji(t.filter))||Ki.test(t.willChange||``)||qi.test(t.contain||``)}function Zi(e){let t=na(e);for(;Vi(t)&&!$i(t);){if(Xi(t))return t;if(Gi(t))return null;t=na(t)}return null}function Qi(){return Yi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Yi}function $i(e){return/^(html|body|#document)$/.test(Ii(e))}function ea(e){return Li(e).getComputedStyle(e)}function ta(e){return Bi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function na(e){if(Ii(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Hi(e)&&e.host||Ri(e);return Hi(t)?t.host:t}function ra(e){let t=na(e);return $i(t)?(e.ownerDocument||e).body:Vi(t)&&Ui(t)?t:ra(t)}function ia(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ra(e),i=r===e.ownerDocument?.body,a=Li(r);if(i){let e=aa(a);return t.concat(a,a.visualViewport||[],Ui(r)?r:[],e&&n?ia(e):[])}return t.concat(r,ia(r,[],n))}function aa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var oa=[`top`,`right`,`bottom`,`left`],sa=Math.min,ca=Math.max,la=Math.round,ua=Math.floor,da=e=>({x:e,y:e}),fa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function pa(e,t,n){return ca(e,sa(t,n))}function ma(e,t){return typeof e==`function`?e(t):e}function ha(e){return e.split(`-`)[0]}function ga(e){return e.split(`-`)[1]}function _a(e){return e===`x`?`y`:`x`}function va(e){return e===`y`?`height`:`width`}function ya(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ba(e){return _a(ya(e))}function xa(e,t,n){n===void 0&&(n=!1);let r=ga(e),i=ba(e),a=va(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Aa(o)),[o,Aa(o)]}function Sa(e){let t=Aa(e);return[Ca(e),t,Ca(t)]}function Ca(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var wa=[`left`,`right`],Ta=[`right`,`left`],Ea=[`top`,`bottom`],Da=[`bottom`,`top`];function Oa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ta:wa:t?wa:Ta;case`left`:case`right`:return t?Ea:Da;default:return[]}}function ka(e,t,n,r){let i=ga(e),a=Oa(ha(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ca)))),a}function Aa(e){let t=ha(e);return fa[t]+e.slice(t.length)}function ja(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ma(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ja(e)}function Na(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Pa(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Fa(){let 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 Ia(){return/apple/i.test(navigator.vendor)}function La(){return Pa().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function Ra(){return Fa().includes(`jsdom/`)}var za=`data-floating-ui-focusable`,Ba=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function Va(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ha(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Hi(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ua(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Wa(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ga(e){return e.matches(`html,body`)}function Ka(e){return e?.ownerDocument||document}function qa(e){return Vi(e)&&e.matches(Ba)}function Ja(e){if(!e||Ra())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ya(e){return e?e.hasAttribute(za)?e:e.querySelector(`[`+za+`]`)||e:null}function Xa(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Xa(e,t.id,n)])}function Za(e){return`nativeEvent`in e}function Qa(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var $a=typeof document<`u`?C.useLayoutEffect:function(){},eo={...C};function to(e){let t=C.useRef(e);return $a(()=>{t.current=e}),t}var no=eo.useInsertionEffect||(e=>e());function ro(e){let t=C.useRef(()=>{});return no(()=>{t.current=e}),C.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function io(e,t,n){let{reference:r,floating:i}=e,a=ya(t),o=ba(t),s=va(o),c=ha(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=ga(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ao(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ma(t,e),p=Ma(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Na(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var oo=50,so=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ao},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=io(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<oo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=io(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},co=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ma(e,t)||{};if(l==null)return{};let d=Ma(u),f={x:n,y:r},p=ba(i),m=va(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=sa(d[_],T),D=sa(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=pa(E,k,O),j=!c.arrow&&ga(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),lo=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ma(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ha(r),_=ya(o),v=ha(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Aa(o)]:Sa(o)),x=p!==`none`;!d&&x&&b.push(...ka(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=xa(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ya(t)||T.every(e=>ya(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ya(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function uo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fo(e){return oa.some(t=>e[t]>=0)}var po=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=ma(e,t);switch(i){case`referenceHidden`:{let e=uo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:fo(e)}}}case`escaped`:{let e=uo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:fo(e)}}}default:return{}}}}};function mo(e){let t=sa(...e.map(e=>e.left)),n=sa(...e.map(e=>e.top)),r=ca(...e.map(e=>e.right)),i=ca(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function ho(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>Na(mo(e)))}var go=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=ma(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=ho(u),f=Na(mo(u)),p=Ma(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(ya(n)===`y`){let e=d[0],t=d[d.length-1],r=ha(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return Na({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=ha(n)===`left`,t=ca(...d.map(e=>e.right)),r=sa(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return Na({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},_o=new Set([`left`,`top`]);async function vo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ha(n),s=ga(n),c=ya(n)===`y`,l=_o.has(o)?-1:1,u=a&&c?-1:1,d=ma(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var yo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await vo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},bo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ma(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ya(i),p=_a(f),m=u[p],h=u[f],g=(e,t)=>pa(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},xo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ma(e,t),u={x:n,y:r},d=ya(i),f=_a(d),p=u[f],m=u[d],h=ma(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=_o.has(ha(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},So=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ma(e,t),c=await i.detectOverflow(t,s),l=ha(n),u=ga(n),d=ya(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=sa(p-c[m],g),y=sa(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ca(c.left,c.right):S=p-2*ca(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Co(e){let t=ea(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Vi(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=la(n)!==a||la(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function wo(e){return Bi(e)?e:e.contextElement}function To(e){let t=wo(e);if(!Vi(t))return da(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Co(t),o=(a?la(n.width):n.width)/r,s=(a?la(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Eo=da(0);function Do(e){let t=Li(e);return!Qi()||!t.visualViewport?Eo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Oo(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Li(e)}function ko(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=wo(e),o=da(1);t&&(r?Bi(r)&&(o=To(r)):o=To(e));let s=Oo(a,n,r)?Do(a):da(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Li(a),t=Bi(r)?Li(r):r,n=e,i=aa(n);for(;i&&t!==n;){let e=To(i),t=i.getBoundingClientRect(),r=ea(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Li(i),i=aa(n)}}return Na({width:u,height:d,x:c,y:l})}function Ao(e,t){let n=ta(e).scrollLeft;return t?t.left+n:ko(Ri(e)).left+n}function jo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ao(e,n),y:n.top+t.scrollTop}}function Mo(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ri(r),s=t?Gi(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=da(1),u=da(0),d=Vi(r);if((d||!a)&&((Ii(r)!==`body`||Ui(o))&&(c=ta(r)),d)){let e=ko(r);l=To(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?jo(o,c):da(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function No(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Po(e){let t=ta(e),n=e.ownerDocument.body,r=ca(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ca(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ao(e),o=-t.scrollTop;return ea(n).direction===`rtl`&&(a+=ca(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Fo=25;function Io(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Li(e),a=Ri(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Qi()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ao(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Fo&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Lo(e,t){let n=ko(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=To(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ro(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Io(e,n,t);else if(t===`document`)r=Po(Ri(e));else if(Bi(t))r=Lo(t,n);else{let n=Do(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Na(r)}function zo(e,t){let n=t.get(e);if(n)return n;let r=ia(e,[],!1).filter(e=>Bi(e)&&Ii(e)!==`body`),i=null,a=ea(e).position===`fixed`,o=a?na(e):e;for(;Bi(o)&&!$i(o);){let e=ea(o),t=Xi(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=na(o)}return t.set(e,r),r}function Bo(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Gi(t)?[]:zo(t,this._c):[].concat(n),r],o=Ro(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ro(t,a[e],i);s=ca(n.top,s),c=sa(n.right,c),l=sa(n.bottom,l),u=ca(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Vo(e){let{width:t,height:n}=Co(e);return{width:t,height:n}}function Ho(e,t,n){let r=Vi(t),i=Ri(t),a=n===`fixed`,o=ko(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=da(0);if((r||!a)&&((Ii(t)!==`body`||Ui(i))&&(s=ta(t)),r)){let e=ko(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ao(i));let l=i&&!r&&!a?jo(i,s):da(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Uo(e){return ea(e).position===`static`}function Wo(e,t){if(!Vi(e)||ea(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Ri(e)===n&&(n=n.ownerDocument.body),n}function Go(e,t){let n=Li(e);if(Gi(e))return n;if(!Vi(e)){let t=na(e);for(;t&&!$i(t);){if(Bi(t)&&!Uo(t))return t;t=na(t)}return n}let r=Wo(e,t);for(;r&&Wi(r)&&Uo(r);)r=Wo(r,t);return r&&$i(r)&&Uo(r)&&!Xi(r)?n:r||Zi(e)||n}var Ko=async function(e){let t=this.getOffsetParent||Go,n=this.getDimensions,r=await n(e.floating);return{reference:Ho(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qo(e){return ea(e).direction===`rtl`}var Jo={convertOffsetParentRelativeRectToViewportRelativeRect:Mo,getDocumentElement:Ri,getClippingRect:Bo,getOffsetParent:Go,getElementRects:Ko,getClientRects:No,getDimensions:Vo,getScale:To,isElement:Bi,isRTL:qo};function Yo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xo(e,t,n){let r=null,i,a=Ri(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ua(d),h=ua(a.clientWidth-(u+f)),g=ua(a.clientHeight-(d+p)),_=ua(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ca(0,sa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Yo(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Li(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Zo(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=wo(e),u=i||a?[...l?ia(l):[],...t?ia(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Xo(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ko(e):null;c&&g();function g(){let t=ko(e);h&&!Yo(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Qo=yo,$o=bo,es=lo,ts=So,ns=po,rs=co,is=go,as=xo,os=(e,t,n)=>{let r=new Map,i=n??{},a={...Jo,...i.platform,_c:r};return so(e,t,{...i,platform:a})},ss=c(xt(),1),cs=typeof document<`u`?C.useLayoutEffect:function(){};function ls(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ls(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;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ls(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function us(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ds(e,t){let n=us(e);return Math.round(t*n)/n}function fs(e){let t=C.useRef(e);return cs(()=>{t.current=e}),t}function ps(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);ls(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=fs(c),O=fs(i),k=fs(l),A=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),os(S.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ls(T.current,t)&&(T.current=t,ss.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);cs(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=C.useRef(!1);cs(()=>(j.current=!0,()=>{j.current=!1}),[]),cs(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),N=C.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=ds(N.floating,u.x),r=ds(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...us(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var ms=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:rs({element:r.current,padding:i}).fn(n):r?rs({element:r,padding:i}).fn(n):{}}}},hs=(e,t)=>{let n=Qo(e);return{name:n.name,fn:n.fn,options:[e,t]}},gs=(e,t)=>{let n=$o(e);return{name:n.name,fn:n.fn,options:[e,t]}},_s=(e,t)=>({fn:as(e).fn,options:[e,t]}),vs=(e,t)=>{let n=es(e);return{name:n.name,fn:n.fn,options:[e,t]}},ys=(e,t)=>{let n=ts(e);return{name:n.name,fn:n.fn,options:[e,t]}},bs=(e,t)=>{let n=ns(e);return{name:n.name,fn:n.fn,options:[e,t]}},xs=(e,t)=>{let n=is(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ss=(e,t)=>{let n=ms(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Cs(e){let t=C.useRef(void 0),n=C.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return C.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var ws=`data-floating-ui-focusable`,Ts=`active`,Es=`selected`,Ds=`ArrowLeft`,Os=`ArrowRight`,ks=`ArrowUp`,As=`ArrowDown`,js=[Ds,Os],Ms=[ks,As];[...js,...Ms];var Ns={...C},Ps=!1,Fs=0,Is=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+Fs++;function Ls(){let[e,t]=C.useState(()=>Ps?Is():void 0);return $a(()=>{e??t(Is())},[]),C.useEffect(()=>{Ps=!0},[]),e}var Rs=Ns.useId||Ls;function zs(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Bs=C.createContext(null),Vs=C.createContext(null),Hs=()=>C.useContext(Bs)?.id||null,Us=()=>C.useContext(Vs);function Ws(e){return`data-floating-ui-`+e}function Gs(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Ks=Ws(`safe-polygon`);function qs(e,t,n){if(n&&!Qa(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Js(e){return typeof e==`function`?e():e}function Ys(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Us(),m=Hs(),h=to(l),g=to(c),_=to(n),v=to(d),y=C.useRef(),b=C.useRef(-1),x=C.useRef(),S=C.useRef(-1),w=C.useRef(!0),T=C.useRef(!1),E=C.useRef(()=>{}),D=C.useRef(!1),O=ro(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});C.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Gs(b),Gs(S),w.current=!0,D.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),C.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){O()&&r(!1,e,`hover`)}let t=Ka(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,O]);let k=C.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=qs(g.current,`close`,y.current);i&&!x.current?(Gs(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Gs(b),r(!1,e,n))},[g,r]),A=ro(()=>{E.current(),x.current=void 0}),j=ro(()=>{if(T.current){let e=Ka(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Ks),T.current=!1}}),M=ro(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);C.useEffect(()=>{if(!s)return;function e(e){if(Gs(b),w.current=!1,u&&!Qa(y.current)||Js(v.current)>0&&!qs(g.current,`open`))return;let t=qs(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(M()){j();return}E.current();let t=Ka(o.floating);if(Gs(S),D.current=!1,h.current&&i.current.floatingContext){n||Gs(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)}}else(y.current!==`touch`||!Ha(o.floating,e.relatedTarget))&&k(e)}function a(e){M()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function c(){Gs(b)}function l(e){M()||k(e,!1)}if(Bi(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,k,A,j,r,n,_,p,g,h,i,M,v]),$a(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=o.floating;if(Bi(o.domReference)&&e){var t;let n=Ka(o.floating).body;n.setAttribute(Ks,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,O]),$a(()=>{n||(y.current=void 0,D.current=!1,A(),j())},[n,A,j]),C.useEffect(()=>()=>{A(),Gs(b),Gs(S),j()},[s,o.domReference,A,j]);let N=C.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!w.current&&!_.current&&r(!0,t,`hover`)}(!u||Qa(y.current))&&(n||Js(v.current)===0||D.current&&e.movementX**2+e.movementY**2<2||(Gs(S),y.current===`touch`?i():(D.current=!0,S.current=window.setTimeout(i,Js(v.current)))))}}},[u,r,n,_,v]);return C.useMemo(()=>s?{reference:N}:{},[s,N])}var Xs=()=>{},Zs=C.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Xs,setState:Xs,isInstantPhase:!1}),Qs=()=>C.useContext(Zs);function $s(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=C.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=C.useRef(null),s=C.useCallback(e=>{a({currentId:e})},[]);return $a(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(Zs.Provider,{value:C.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function ec(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=Qs(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return $a(()=>{o&&l&&(f({delay:{open:1,close:qs(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),$a(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),$a(()=>{o&&u!==Xs&&n&&u(s)},[o,n,u,s]),c}function tc(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Hi(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nc(e){return`composedPath`in e?e.composedPath()[0]:e.target}var rc={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},ic={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},ac=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function oc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Us(),g=ro(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=C.useRef(!1),{escapeKey:y,outsidePress:b}=ac(p),{escapeKey:x,outsidePress:S}=ac(m),w=C.useRef(!1),T=ro(e=>{if(!n||!o||!s||e.key!==`Escape`||w.current)return;let t=a.current.floatingContext?.nodeId,i=h?Xa(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}r(!1,Za(e)?e.nativeEvent:e,`escape-key`)}),E=ro(e=>{var t;let n=()=>{var t;T(e),(t=Ua(e))==null||t.removeEventListener(`keydown`,n)};(t=Ua(e))==null||t.addEventListener(`keydown`,n)}),D=ro(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=Ua(e),s=`[`+Ws(`inert`)+`]`,c=Ka(i.floating).querySelectorAll(s),u=Bi(o)?o:null;for(;u&&!$i(u);){let e=na(u);if($i(e)||!Bi(e))break;u=e}if(c.length&&Bi(o)&&!Ga(o)&&!Ha(o,i.floating)&&Array.from(c).every(e=>!Ha(u,e)))return;if(Vi(o)&&A){let t=$i(o),n=ea(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&Xa(h.nodesRef.current,d).some(t=>Wa(e,t.context?.elements.floating));if(Wa(e,i.floating)||Wa(e,i.domReference)||f)return;let p=h?Xa(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r(!1,e,`outside-press`)}),O=ro(e=>{var t;let n=()=>{var t;D(e),(t=Ua(e))==null||t.removeEventListener(l,n)};(t=Ua(e))==null||t.addEventListener(l,n)});C.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),w.current=!0}function u(){e=window.setTimeout(()=>{w.current=!1},Qi()?5:0)}let d=Ka(i.floating);s&&(d.addEventListener(`keydown`,x?E:T,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?O:D,S);let p=[];return f&&(Bi(i.domReference)&&(p=ia(i.domReference)),Bi(i.floating)&&(p=p.concat(ia(i.floating))),!Bi(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(ia(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?E:T,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?O:D,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,T,x,E,D,S,O]),C.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let k=C.useMemo(()=>({onKeyDown:T,...u&&{[rc[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[T,r,u,d]),A=C.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[ic[l]]:()=>{a.current.insideReactTree=!0}}},[T,l,a]);return C.useMemo(()=>o?{reference:k,floating:A}:{},[o,k,A])}function sc(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Rs(),a=C.useRef({}),[o]=C.useState(()=>zs()),s=Hs()!=null,[c,l]=C.useState(r.reference),u=ro((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=C.useMemo(()=>({setPositionReference:l}),[]),f=C.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return C.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function cc(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=sc({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=C.useState(null),[l,u]=C.useState(null),d=o?.domReference||s,f=C.useRef(null),p=Us();$a(()=>{d&&(f.current=d)},[d]);let m=ps({...n,elements:{...o,...l&&{reference:l}}}),h=C.useCallback(e=>{let t=Bi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=C.useCallback(e=>{(Bi(e)||e===null)&&(f.current=e,c(e)),(Bi(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!Bi(e))&&m.refs.setReference(e)},[m.refs]),_=C.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=C.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=C.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return $a(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),C.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function lc(){return La()&&Ia()}function uc(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=C.useRef(!1),u=C.useRef(-1),d=C.useRef(!0);C.useEffect(()=>{if(!s)return;let e=Li(o.domReference);function t(){!n&&Vi(o.domReference)&&o.domReference===Va(Ka(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),lc()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),lc()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),C.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),C.useEffect(()=>()=>{Gs(u)},[]);let f=C.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=Ua(e.nativeEvent);if(c&&Bi(t)){if(lc()&&!e.relatedTarget){if(!d.current&&!qa(t))return}else if(!Ja(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=Bi(t)&&t.hasAttribute(Ws(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=Va(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(Ha(a.current.floatingContext?.refs.floating.current,e)||Ha(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return C.useMemo(()=>s?{reference:f}:{},[s,f])}function dc(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Ts]:t,[Es]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[ws]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Ts,Es].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function fc(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=C.useCallback(t=>dc(t,e,`reference`),t),a=C.useCallback(t=>dc(t,e,`floating`),n),o=C.useCallback(t=>dc(t,e,`item`),r);return C.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var pc=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function mc(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=Rs(),c=r.domReference?.id||s,l=C.useMemo(()=>Ya(r.floating)?.id||i,[r.floating,i]),u=pc.get(o)??o,d=Hs()!=null,f=C.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=C.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=C.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return C.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function hc(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...hc(e,t.id,n)])}function gc(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function _c(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function vc(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){Gs(i),u()}if(Gs(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=nc(e),v=e.type===`mouseleave`,y=tc(c.floating,_),b=tc(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=_c(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&Bi(e.relatedTarget)&&tc(c.floating,e.relatedTarget)||f&&hc(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function ee(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!gc([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}gc([m,h],ee([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var yc={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},bc=W((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":_(t),"--scrollarea-over-scroll-behavior":i,"--scrollarea-offset-size":void 0}}}),xc=J(e=>{let t=K(`ScrollArea`,yc,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:w,attributes:T,...E}=t,[D,O]=(0,C.useState)(!1),[k,A]=(0,C.useState)(!1),[j,M]=(0,C.useState)(!1),N=(0,C.useRef)(!0),ee=(0,C.useRef)(!1),P=(0,C.useRef)(!0),F=(0,C.useRef)(!1),I=q({name:`ScrollArea`,props:t,classes:Pi,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,vars:c,varsResolver:bc}),L=(0,C.useRef)(null),[R,te]=(0,C.useState)(null),ne=Cs([f,L,(0,C.useCallback)(e=>{te(t=>t===e?t:e)},[])]);return oi(h===`present`?R:null,()=>{let e=L.current;e&&(A(e.scrollHeight>e.clientHeight),M(e.scrollWidth>e.clientWidth))}),H(()=>{S&&L.current&&L.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(ui,{getStyles:I,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...I(`root`),...E,children:[(0,G.jsx)(Ni,{...d,...I(`viewport`,{style:d?.style}),ref:ne,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":w||void 0,"data-horizontal-hidden":h===`present`&&!j?`true`:void 0,"data-vertical-hidden":h===`present`&&!k?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!ee.current&&_?.(),c&&!N.current&&v?.(),ee.current=s,N.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!F.current&&b?.(),u&&!P.current&&y?.(),F.current=l,P.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)(ki,{...I(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":w||void 0,"data-hidden":l===`never`||h===`present`&&!j||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:(0,G.jsx)(Mi,{...I(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)(ki,{...I(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":w||void 0,"data-hidden":l===`never`||h===`present`&&!k||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:(0,G.jsx)(Mi,{...I(`thumb`)})}),(0,G.jsx)(ci,{...I(`corner`),"data-vertical-scrollbar-position":w||void 0,"data-hovered":D||void 0,"data-hidden":l===`never`||void 0})]})});xc.displayName=`@mantine/core/ScrollArea`;var Sc=J(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...w}=K(`ScrollAreaAutosize`,yc,e),T=(0,C.useRef)(null),[E,D]=(0,C.useState)(null),O=Cs([u,T,(0,C.useCallback)(e=>{D(t=>t===e?t:e)},[])]),k=(0,C.useRef)(!1),A=(0,C.useRef)(!1),j=(0,C.useEffectEvent)(()=>{let e=T.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==k.current&&(A.current?S(t):(A.current=!0,t&&S(!0)),k.current=t)});return oi(S?E:null,j),(0,G.jsx)(Y,{...w,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(Y,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(xc,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:O,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});xc.classes=Pi,xc.varsResolver=bc,Sc.displayName=`@mantine/core/ScrollAreaAutosize`,Sc.classes=Pi,xc.Autosize=Sc;var Cc={root:`m_87cf2631`},wc={__staticSelector:`UnstyledButton`},Tc=Yr(e=>{let t=K(`UnstyledButton`,wc,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t,d=q({name:i,props:t,classes:Cc,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l});return(0,G.jsx)(Y,{...d(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});Tc.classes=Cc,Tc.displayName=`@mantine/core/UnstyledButton`;var Ec={root:`m_515a97f8`},Dc=J(e=>{let t=K(`VisuallyHidden`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t,u=q({name:`VisuallyHidden`,classes:Ec,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c});return(0,G.jsx)(Y,{component:`span`,...u(`root`),...l})});Dc.classes=Ec,Dc.displayName=`@mantine/core/VisuallyHidden`;var Oc={root:`m_1b7284a3`},kc=W((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:L(t),"--paper-shadow":ne(n)}})),Ac=Yr(e=>{let t=K(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=q({name:`Paper`,props:t,classes:Oc,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:kc});return(0,G.jsx)(Y,{mod:[{withBorder:s},f],...h(`root`),variant:d,...m})});Ac.classes=Oc,Ac.varsResolver=kc,Ac.displayName=`@mantine/core/Paper`;function jc(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function Mc(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var Nc={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function Pc({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function Fc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=Pc({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[Nc[c]]:r},d=-t/2;return c===`left`?{...u,...jc(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...jc(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...Mc(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...Mc(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function Ic({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function Lc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=ri();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...Fc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}Lc.displayName=`@mantine/core/FloatingArrow`;function Rc(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}var zc={root:`m_9814e45f`},Bc={zIndex:N(`modal`)},Vc=W((e,{gradient:t,color:n,backgroundOpacity:r,blur:i,radius:a,zIndex:o})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&rn(n||`#000`,r??.6)||void 0,"--overlay-filter":i?`blur(${_(i)})`:void 0,"--overlay-radius":a===void 0?void 0:L(a),"--overlay-z-index":o?.toString()}})),Hc=Yr(e=>{let t=K(`Overlay`,Bc,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fixed:c,center:l,children:u,radius:d,zIndex:f,gradient:p,blur:m,color:h,backgroundOpacity:g,mod:_,attributes:v,...y}=t,b=q({name:`Overlay`,props:t,classes:zc,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Vc});return(0,G.jsx)(Y,{...b(`root`),mod:[{center:l,fixed:c},_],...y,children:u})});Hc.classes=zc,Hc.varsResolver=Vc,Hc.displayName=`@mantine/core/Overlay`;function Uc(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}var Wc=null;function Gc({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||Uc(n):e;if(t){if(Wc){if(document.body.contains(Wc))return Wc;Wc=null}let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return Wc=e,e;let t=Uc(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),Wc=t,t}return Uc(n)}var Kc={reuseTargetNode:!0},qc=J(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=K(`Portal`,Kc,e),[o,s]=(0,C.useState)(!1),c=(0,C.useRef)(null);return H(()=>(s(!0),c.current=Gc({target:n,reuseTargetNode:r,...a}),Ke(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,ss.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});qc.displayName=`@mantine/core/Portal`;var Jc=J(({withinPortal:e=!0,children:t,...n})=>bn()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(qc,{...n,children:t}));Jc.displayName=`@mantine/core/OptionalPortal`;var Yc=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),Xc={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...Yc(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...Yc(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...Yc(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...Yc(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...Yc(`top`),common:{transformOrigin:`top right`}}},Zc={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function Qc({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in Xc?{transitionProperty:Xc[e].transitionProperty,...i,...Xc[e].common,...Xc[e][Zc[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[Zc[t]]}}function $c({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=In(),d=Xe(),f=u.respectReducedMotion?d:!1,[p,m]=(0,C.useState)(f?0:e),[h,g]=(0,C.useState)(r?`entered`:`exited`),_=(0,C.useRef)(-1),v=(0,C.useRef)(-1),y=(0,C.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current),y.current=-1}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;if(m(l),l===0)typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`);else{let e=requestAnimationFrame(()=>{ss.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current===e&&(y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)}))});y.current=e}},S=e=>{b(),typeof(e?c:l)==`number`?v.current=window.setTimeout(()=>{x(e)},e?c:l):x(e)};return fe(()=>{S(r)},[r]),(0,C.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function el({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=bn(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=$c({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(C.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:Qc({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(C.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(Qc({transition:n,duration:h,state:g,timingFunction:_}))})}el.displayName=`@mantine/core/Transition`;var tl={duration:100,transition:`fade`};function nl(e,t){return{...tl,...t,...e}}var[rl,il]=T(`Popover component was not found in the tree`);function al({childProps:e,disabled:t,opened:n,longPressDelay:r=500,setReference:i,open:a}){let o=(0,C.useRef)(!1),s=(0,C.useRef)(!1),c=(0,C.useRef)(null),l=(0,C.useRef)(t);l.current=t;let u=(e,t,n)=>{i({getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t,toJSON:()=>void 0}),contextElement:n}),a()},d=re(e.onMouseDown,e=>{t||e.button===2&&e.stopPropagation()}),f=re(e.onContextMenu,e=>{t||e.defaultPrevented||(e.preventDefault(),!s.current&&(u(e.clientX,e.clientY,e.currentTarget),o.current&&(s.current=!0)))}),p=gt(e=>{if(l.current||s.current)return;let t=e,n=t.touches[0]??t.changedTouches[0];n&&(u(n.clientX,n.clientY,c.current),s.current=!0)},{threshold:r,events:[`touch`],cancelOnMove:!0,onStart:e=>{o.current=!0,s.current=!1,c.current=e.currentTarget},onFinish:e=>{o.current=!1,s.current=!1,l.current||e.preventDefault()},onCancel:()=>{o.current=!1,s.current=!1}});return{onContextMenu:f,onMouseDown:d,onTouchStart:re(e.onTouchStart,p.onTouchStart),onTouchEnd:re(e.onTouchEnd,p.onTouchEnd),onTouchCancel:re(e.onTouchCancel,p.onTouchCancel),onTouchMove:re(e.onTouchMove,p.onTouchMove),style:t?e.style:{...e.style,WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`},"data-expanded":n?!0:void 0}}function ol(e){let{children:t,disabled:n,longPressDelay:r}=K(`PopoverContextMenu`,null,e),i=Nt(t);if(!i)throw Error(`Popover.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=il(),o=al({childProps:i.props,disabled:n||a.disabled,opened:a.opened,longPressDelay:r,setReference:a.reference,open:()=>{a.opened||a.onToggle()}});return(0,C.cloneElement)(i,o)}ol.displayName=`@mantine/core/PopoverContextMenu`;function sl({children:e,active:t=!0,refProp:n=`ref`,innerRef:r}){let i=Je(Fe(t),r),a=Nt(e);return a?(0,C.cloneElement)(a,{[n]:i}):e}function cl(e){return(0,G.jsx)(Dc,{tabIndex:-1,"data-autofocus":!0,...e})}sl.displayName=`@mantine/core/FocusTrap`,cl.displayName=`@mantine/core/FocusTrapInitialFocus`,sl.InitialFocus=cl;var ll={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},ul=J(e=>{let t=K(`PopoverDropdown`,null,e),{className:n,style:r,vars:i,children:a,onKeyDownCapture:o,variant:s,classNames:c,styles:l,ref:u,...d}=t,f=il(),{dir:p}=ri(),m=f.arrowPosition===`merge`&&f.withArrow?Ic({position:f.placement,dir:p}):void 0,h=pe({opened:f.opened,shouldReturnFocus:f.returnFocus}),g=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:`dialog`,tabIndex:-1}:{},v=Je(u,f.floating);return f.disabled?null:(0,G.jsx)(Jc,{...f.portalProps,withinPortal:f.withinPortal,children:(0,G.jsx)(el,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||`fade`,duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,keepMountedMode:f.keepMountedMode,exitDuration:typeof f.transitionProps?.exitDuration==`number`?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,G.jsx)(sl,{active:f.trapFocus&&f.opened,innerRef:v,children:(0,G.jsxs)(Y,{...g,...d,variant:s,onKeyDownCapture:P(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:h,onKeyDown:o}),"data-position":f.placement,"data-fixed":f.floatingStrategy===`fixed`||void 0,...f.getStyles(`dropdown`,{className:n,props:t,classNames:c,styles:l,style:[{...e,...m,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width===`target`?void 0:_(f.width),...f.referenceHidden?{display:`none`}:null},f.resolvedStyles?.dropdown,l?.dropdown,r]}),children:[a,(0,G.jsx)(Lc,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles(`arrow`,{props:t,classNames:c,styles:l})})]})})})})});ul.classes=ll,ul.displayName=`@mantine/core/PopoverDropdown`;var dl={refProp:`ref`,popupType:`dialog`},fl=J(e=>{let{children:t,refProp:n,popupType:r,ref:i,...a}=K(`PopoverTarget`,dl,e),o=Nt(t);if(!o)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let s=a,c=il(),l=Je(c.reference,Ot(o),i),u=c.withRoles?{"aria-haspopup":r,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return(0,C.cloneElement)(o,{...s,...u,...c.targetProps,className:Ft(c.targetProps.className,s.className,d.className),[n]:l,...c.controlled?null:{onClick:e=>{c.onToggle(),d.onClick?.(e)}}})});fl.displayName=`@mantine/core/PopoverTarget`;function pl(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function ml(e,t,n,r){let i=pl(e.middlewares),a=[hs(e.offset),bs()];if(i.flip&&!n){let e=typeof i.flip==`boolean`?{}:i.flip,t=r?{fallbackStrategy:`initialPlacement`,...e}:e;a.push(vs(t))}if(i.shift){let t=typeof i.shift==`boolean`?{}:i.shift;a.push(gs(n=>{let r=n.placement.startsWith(`top`)||n.placement.startsWith(`bottom`);return{limiter:_s(),padding:5,...e.width===`target`&&r?{mainAxis:!1}:null,...t}}))}return i.inline&&a.push(typeof i.inline==`boolean`?xs():xs(i.inline)),a.push(Ss({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width===`target`)&&a.push(ys({...typeof i.size==`boolean`?{}:i.size,apply({rects:n,availableWidth:r,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};i.size&&(typeof i.size==`object`&&i.size.apply?i.size.apply({rects:n,availableWidth:r,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${r}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),a}function hl(e){let[t,n]=Ye({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,C.useRef)(t),i=(0,C.useRef)(!1),[a,o]=(0,C.useState)(null),s=e.preventPositionChangeWhenVisible!==!1,c=(0,C.useRef)(t);t!==c.current&&(c.current=t,t&&a!==null&&o(null));let l=(0,C.useRef)(e.position);e.position!==l.current&&(l.current=e.position,i.current=!1,a!==null&&o(null));let u=(0,C.useCallback)(()=>o(null),[]),d=()=>{t&&!e.disabled&&n(!1)},f=()=>{e.disabled||n(!t)},p=cc({open:t,strategy:e.strategy,placement:s?a??e.position:e.position,middleware:ml(e,()=>p,s&&a!==null,s),whileElementsMounted:e.keepMounted?void 0:Zo});(0,C.useEffect)(()=>{if(!e.keepMounted)return;let n=p.refs.reference.current,r=p.refs.floating.current;if(t&&n&&r)return Zo(n,r,p.update)},[e.keepMounted,t,p.update,p.elements.reference,p.elements.floating]),H(()=>{if(!t){i.current=!1;return}if(!s||a!==null)return;let e=p.refs.floating.current;e&&e.offsetHeight!==0&&e.offsetWidth!==0&&(i.current?p.isPositioned&&o(p.placement):(i.current=!0,p.update()))},[s,t,p.isPositioned,p.placement,a,p.update]);let m=(0,C.useRef)(p.placement);return H(()=>{m.current!==p.placement&&(m.current=p.placement,e.onPositionChange?.(p.placement))},[p.placement]),fe(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:p,controlled:typeof e.opened==`boolean`,opened:t,onClose:d,onToggle:f,resetLockedPlacement:u}}var gl={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,preventPositionChangeWhenVisible:!0,clickOutsideEvents:[`mousedown`,`touchstart`],clickOutsideCapture:!1,zIndex:N(`popover`),__staticSelector:`Popover`,width:`max-content`},_l=W((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:L(t),"--popover-shadow":ne(n)}}));function vl(e){let t=K(`Popover`,gl,e),{children:n,position:r,offset:i,onPositionChange:a,opened:o,transitionProps:s,onExitTransitionEnd:c,onEnterTransitionEnd:l,width:u,middlewares:d,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,unstyled:_,classNames:v,styles:y,closeOnClickOutside:b,withinPortal:x,portalProps:S,closeOnEscape:w,clickOutsideEvents:T,clickOutsideCapture:E,trapFocus:D,onClose:O,onDismiss:k,onOpen:A,onChange:j,zIndex:M,radius:N,shadow:ee,id:P,defaultOpened:F,__staticSelector:I,withRoles:L,disabled:R,returnFocus:te,variant:ne,keepMounted:re,keepMountedMode:ie,vars:ae,floatingStrategy:oe,withOverlay:se,overlayProps:ce,hideDetached:le,attributes:B,preventPositionChangeWhenVisible:V,...ue}=t,H=q({name:I,props:t,classes:ll,classNames:v,styles:y,unstyled:_,attributes:B,rootSelector:`dropdown`,vars:ae,varsResolver:_l}),{resolvedStyles:de}=Qn({classNames:v,styles:y,props:t}),fe=(0,C.useRef)(null),[pe,me]=(0,C.useState)(null),[he,ge]=(0,C.useState)(null),{dir:_e}=ri(),ve=bn(),ye=Re(P),U=hl({middlewares:d,width:u,position:Rc(_e,r),offset:typeof i==`number`?i+(f?p/2:0):i,arrowRef:fe,arrowOffset:m,onPositionChange:a,opened:o,defaultOpened:F,onChange:j,onOpen:A,onClose:O,onDismiss:k,strategy:oe,disabled:R,preventPositionChangeWhenVisible:V,keepMounted:re});z(()=>{b&&(U.onClose(),k?.())},T,[pe,he],!0,E);let be=(0,C.useCallback)(e=>{me(e),U.floating.refs.setReference(e)},[U.floating.refs.setReference]),xe=(0,C.useCallback)(e=>{ge(e),U.floating.refs.setFloating(e)},[U.floating.refs.setFloating]),Se=(0,C.useCallback)(()=>{s?.onExited?.(),c?.(),U.resetLockedPlacement()},[s?.onExited,c,U.resetLockedPlacement]),Ce=(0,C.useCallback)(()=>{s?.onEntered?.(),l?.()},[s?.onEntered,l]);return(0,G.jsxs)(rl,{value:{returnFocus:te,disabled:R,controlled:U.controlled,reference:be,floating:xe,x:U.floating.x,y:U.floating.y,arrowX:U.floating?.middlewareData?.arrow?.x,arrowY:U.floating?.middlewareData?.arrow?.y,opened:U.opened,arrowRef:fe,transitionProps:{...s,onExited:Se,onEntered:Ce},width:u,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,placement:U.floating.placement,trapFocus:D,withinPortal:x,portalProps:S,zIndex:M,radius:N,shadow:ee,closeOnEscape:w,onDismiss:k,onClose:U.onClose,onToggle:U.onToggle,getTargetId:()=>ye,getDropdownId:()=>`${ye}-dropdown`,withRoles:L,targetProps:ue,__staticSelector:I,classNames:v,styles:y,unstyled:_,variant:ne,keepMounted:re,keepMountedMode:ie,getStyles:H,resolvedStyles:de,floatingStrategy:oe,referenceHidden:le&&ve!==`test`?U.floating.middlewareData.hide?.referenceHidden:!1},children:[n,se&&(0,G.jsx)(el,{transition:`fade`,mounted:U.opened,duration:s?.duration||250,exitDuration:s?.exitDuration||250,children:e=>(0,G.jsx)(Jc,{withinPortal:x,children:(0,G.jsx)(Hc,{...ce,...H(`overlay`,{className:ce?.className,style:[e,ce?.style]})})})})]})}vl.Target=fl,vl.Dropdown=ul,vl.ContextMenu=ol,vl.varsResolver=_l,vl.displayName=`@mantine/core/Popover`,vl.extend=e=>e,vl.withProps=e=>{let t=t=>(0,G.jsx)(vl,{...e,...t});return t.extend=vl.extend,t.displayName=`WithProps(${vl.displayName})`,t};var yl={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},bl=({className:e,...t})=>(0,G.jsxs)(Y,{component:`span`,className:Ft(yl.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:yl.bar}),(0,G.jsx)(`span`,{className:yl.bar}),(0,G.jsx)(`span`,{className:yl.bar})]});bl.displayName=`@mantine/core/Bars`;var xl=({className:e,...t})=>(0,G.jsxs)(Y,{component:`span`,className:Ft(yl.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:yl.dot}),(0,G.jsx)(`span`,{className:yl.dot}),(0,G.jsx)(`span`,{className:yl.dot})]});xl.displayName=`@mantine/core/Dots`;var Sl=({className:e,...t})=>(0,G.jsx)(Y,{component:`span`,className:Ft(yl.ovalLoader,e),...t});Sl.displayName=`@mantine/core/Oval`;var Cl={bars:bl,oval:Sl,dots:xl},wl={loaders:Cl,type:`oval`},Tl=W((e,{size:t,color:n})=>({root:{"--loader-size":F(t,`loader-size`),"--loader-color":n?$t(n,e):void 0}})),El=J(e=>{let t=K(`Loader`,wl,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=q({name:`Loader`,props:t,classes:yl,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:Tl});return p?(0,G.jsx)(Y,{...g(`root`),...h,children:p}):(0,G.jsx)(Y,{...g(`root`),component:d[i],variant:f,size:n,...h})});El.defaultLoaders=Cl,El.classes=yl,El.varsResolver=Tl,El.displayName=`@mantine/core/Loader`;var Dl={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},Ol={orientation:`horizontal`},kl=W((e,{borderWidth:t})=>({group:{"--ai-border-width":_(t)}})),Al=J(e=>{let t=K(`ActionIconGroup`,Ol,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t,m=q({name:`ActionIconGroup`,props:t,classes:Dl,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:kl,rootSelector:`group`});return(0,G.jsx)(Y,{...m(`group`),variant:u,mod:[{orientation:s},d],role:`group`,...p})});Al.classes=Dl,Al.varsResolver=kl,Al.displayName=`@mantine/core/ActionIconGroup`;var jl=W((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":F(o,`section-height`),"--section-padding-x":F(o,`section-padding-x`),"--section-fz":R(o),"--section-radius":t===void 0?void 0:L(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),Ml=J(e=>{let t=K(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t,m=q({name:`ActionIconGroupSection`,props:t,classes:Dl,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:jl,rootSelector:`groupSection`});return(0,G.jsx)(Y,{...m(`groupSection`),variant:c,...p})});Ml.classes=Dl,Ml.varsResolver=jl,Ml.displayName=`@mantine/core/ActionIconGroupSection`;var Nl=W((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":F(t,`ai-size`),"--ai-radius":n===void 0?void 0:L(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),Pl=Yr(e=>{let t=K(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=q({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:Dl,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:Nl});return(0,G.jsxs)(Tc,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(el,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(Y,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(El,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(Y,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});Pl.classes=Dl,Pl.varsResolver=Nl,Pl.displayName=`@mantine/core/ActionIcon`,Pl.Group=Al,Pl.GroupSection=Ml;function Fl({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Fl.displayName=`@mantine/core/CloseIcon`;var Il={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},Ll={variant:`subtle`},Rl=W((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":F(t,`cb-size`),"--cb-radius":n===void 0?void 0:L(n),"--cb-icon-size":_(r)}})),zl=Yr(e=>{let t=K(`CloseButton`,Ll,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=q({name:_||`CloseButton`,props:t,className:o,style:c,classes:Il,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:Rl});return(0,G.jsxs)(Tc,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(Fl,{}),r]})});zl.classes=Il,zl.varsResolver=Rl,zl.displayName=`@mantine/core/CloseButton`;function Bl(e){return C.Children.toArray(e).filter(Boolean)}var Vl={root:`m_4081bf90`},Hl={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},Ul=W((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":I(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),X=J(e=>{let t=K(`Group`,Hl,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=Bl(s),x=b.length,S=I(c??`md`),C=q({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:Vl,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:Ul});return(0,G.jsx)(Y,{...C(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});X.classes=Vl,X.varsResolver=Ul,X.displayName=`@mantine/core/Group`;var[Wl,Gl]=T(`ModalBase component was not found in tree`);function Kl({opened:e,transitionDuration:t}){let[n,r]=(0,C.useState)(e),i=(0,C.useRef)(-1),a=Xe()?0:t;return(0,C.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function ql({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o,handledEscapeEvents:s}){let c=Re(e),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1),p=Kl({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return ze(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&!s?.has(e)&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&(s?.add(e),a())},{capture:!0}),pe({opened:n,shouldReturnFocus:r&&o}),{_id:c,titleMounted:l,bodyMounted:d,shouldLockScroll:p,setTitleMounted:u,setBodyMounted:f}}var Jl=function(){return Jl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Jl.apply(this,arguments)};function Yl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Xl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Zl=`right-scroll-bar-position`,Ql=`width-before-scroll-bar`,$l=`with-scroll-bars-hidden`,eu=`--removed-body-scroll-bar-size`;function tu(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function nu(e,t){var n=(0,C.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ru=typeof window<`u`?C.useLayoutEffect:C.useEffect,iu=new WeakMap;function au(e,t){var n=nu(t||null,function(t){return e.forEach(function(e){return tu(e,t)})});return ru(function(){var t=iu.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||tu(e,null)}),i.forEach(function(e){r.has(e)||tu(e,a)})}iu.set(n,e)},[e]),n}function ou(e){return e}function su(e,t){t===void 0&&(t=ou);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function cu(e){e===void 0&&(e={});var t=su(null);return t.options=Jl({async:!0,ssr:!1},e),t}var lu=function(e){var t=e.sideCar,n=Yl(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return C.createElement(r,Jl({},n))};lu.isSideCarExport=!0;function uu(e,t){return e.useMedium(t),lu}var du=cu(),fu=function(){},pu=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:fu,onWheelCapture:fu,onTouchMoveCapture:fu}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Yl(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=au([n,t]),w=Jl(Jl({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:du,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),Jl(Jl({},w),{ref:S})):C.createElement(v,Jl({},w,{className:c,ref:S}),s))});pu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},pu.classNames={fullWidth:Ql,zeroRight:Zl};var mu=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function hu(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mu();return t&&e.setAttribute(`nonce`,t),e}function gu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _u(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vu=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hu())&&(gu(t,n),_u(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yu=function(){var e=vu();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bu=function(){var e=yu();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xu={left:0,top:0,right:0,gap:0},Su=function(e){return parseInt(e||``,10)||0},Cu=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Su(n),Su(r),Su(i)]},wu=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xu;var t=Cu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tu=bu(),Eu=`data-scroll-locked`,Du=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
3
+ .${$l} {
4
+ overflow: hidden ${r};
5
+ padding-right: ${s}px ${r};
6
+ }
7
+ body[${Eu}] {
8
+ overflow: hidden ${r};
9
+ overscroll-behavior: contain;
10
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
11
+ padding-left: ${i}px;
12
+ padding-top: ${a}px;
13
+ padding-right: ${o}px;
14
+ margin-left:0;
15
+ margin-top:0;
16
+ margin-right: ${s}px ${r};
17
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
18
+ }
19
+
20
+ .${Zl} {
21
+ right: ${s}px ${r};
22
+ }
23
+
24
+ .${Ql} {
25
+ margin-right: ${s}px ${r};
26
+ }
27
+
28
+ .${Zl} .${Zl} {
29
+ right: 0 ${r};
30
+ }
31
+
32
+ .${Ql} .${Ql} {
33
+ margin-right: 0 ${r};
34
+ }
35
+
36
+ body[${Eu}] {
37
+ ${eu}: ${s}px;
38
+ }
39
+ `},Ou=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ku=function(){C.useEffect(function(){return document.body.setAttribute(Eu,(Ou()+1).toString()),function(){var e=Ou()-1;e<=0?document.body.removeAttribute(Eu):document.body.setAttribute(Eu,e.toString())}},[])},Au=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ku();var a=C.useMemo(function(){return wu(i)},[i]);return C.createElement(Tu,{styles:Du(a,!t,i,n?``:`!important`)})},ju=!1;if(typeof window<`u`)try{var Mu=Object.defineProperty({},"passive",{get:function(){return ju=!0,!0}});window.addEventListener(`test`,Mu,Mu),window.removeEventListener(`test`,Mu,Mu)}catch{ju=!1}var Nu=ju?{passive:!1}:!1,Pu=function(e){return e.tagName===`TEXTAREA`},Fu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Pu(e)&&n[t]===`visible`)},Iu=function(e){return Fu(e,`overflowY`)},Lu=function(e){return Fu(e,`overflowX`)},Ru=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Vu(e,r)){var i=Hu(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zu=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Bu=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Vu=function(e,t){return e===`v`?Iu(t):Lu(t)},Hu=function(e,t){return e===`v`?zu(t):Bu(t)},Uu=function(e,t){return e===`h`&&t===`rtl`?-1:1},Wu=function(e,t,n,r,i){var a=Uu(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Hu(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Vu(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Gu=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ku=function(e){return[e.deltaX,e.deltaY]},qu=function(e){return e&&`current`in e?e.current:e},Ju=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yu=function(e){return`
40
+ .block-interactivity-${e} {pointer-events: none;}
41
+ .allow-interactivity-${e} {pointer-events: all;}
42
+ `},Xu=0,Zu=[];function Qu(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(Xu++)[0],a=C.useState(bu)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Xl([e.lockRef.current],(e.shards||[]).map(qu),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Gu(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ru(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ru(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Wu(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(Zu.length&&Zu[Zu.length-1]===a){var r=`deltaY`in n?Ku(n):Gu(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ju(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(qu).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:$u(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=Gu(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,Ku(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,Gu(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return Zu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Nu),document.addEventListener(`touchmove`,c,Nu),document.addEventListener(`touchstart`,u,Nu),function(){Zu=Zu.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Nu),document.removeEventListener(`touchmove`,c,Nu),document.removeEventListener(`touchstart`,u,Nu)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:Yu(i)}):null,p?C.createElement(Au,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $u(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ed=uu(du,Qu),td=C.forwardRef(function(e,t){return C.createElement(pu,Jl({},e,{ref:t,sideCar:ed}))});td.classNames=pu.classNames;function nd({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:l,returnFocus:u,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:h,zIndex:g,shadow:_,padding:v,__vars:y,unstyled:b,removeScrollProps:x,__handledEscapeEvents:S,...C}){let{_id:w,titleMounted:T,bodyMounted:E,shouldLockScroll:D,setTitleMounted:O,setBodyMounted:k}=ql({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:l,onClose:r,returnFocus:u,handledEscapeEvents:S}),{key:A,...j}=x||{};return(0,G.jsx)(Jc,{...p,withinPortal:f,children:(0,G.jsx)(Wl,{value:{opened:n,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${w}-title`,getBodyId:()=>`${w}-body`,titleMounted:T,bodyMounted:E,setTitleMounted:O,setBodyMounted:k,trapFocus:c,closeOnEscape:l,zIndex:g,unstyled:b},children:(0,G.jsx)(td,{enabled:D&&m,...j,children:(0,G.jsx)(Y,{...C,id:w,__vars:{...y,"--mb-z-index":(g||N(`modal`)).toString(),"--mb-shadow":ne(_),"--mb-padding":I(v)},children:h})},A)})})}nd.displayName=`@mantine/core/ModalBase`;function rd(){let e=Gl();return(0,C.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var id={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function ad({className:e,...t}){let n=rd(),r=Gl();return(0,G.jsx)(Y,{id:n,className:Ft({[id.body]:!r.unstyled},e),...t})}ad.displayName=`@mantine/core/ModalBaseBody`;function od({className:e,onClick:t,...n}){let r=Gl();return(0,G.jsx)(zl,{...n,onClick:e=>{r.onClose(),t?.(e)},className:Ft({[id.close]:!r.unstyled},e),unstyled:r.unstyled})}od.displayName=`@mantine/core/ModalBaseCloseButton`;function sd({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=Gl();return(0,G.jsx)(el,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,G.jsx)(`div`,{...n,className:Ft({[id.inner]:!s.unstyled},n.className),children:(0,G.jsx)(sl,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,G.jsx)(Ac,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:Ft({[id.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}sd.displayName=`@mantine/core/ModalBaseContent`;function cd({className:e,...t}){let n=Gl();return(0,G.jsx)(Y,{component:`header`,className:Ft({[id.header]:!n.unstyled},e),...t})}cd.displayName=`@mantine/core/ModalBaseHeader`;var ld={duration:200,timingFunction:`ease`,transition:`fade`};function ud(e){let t=Gl();return{...ld,...t.transitionProps,...e}}function dd({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=Gl(),o=ud(t);return(0,G.jsx)(el,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,G.jsx)(Hc,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}dd.displayName=`@mantine/core/ModalBaseOverlay`;function fd(){let e=Gl();return(0,C.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function pd({className:e,...t}){let n=fd(),r=Gl();return(0,G.jsx)(Y,{component:`h2`,className:Ft({[id.title]:!r.unstyled},e),id:n,...t})}pd.displayName=`@mantine/core/ModalBaseTitle`;function md({children:e}){return(0,G.jsx)(G.Fragment,{children:e})}var hd=(0,C.createContext)({size:`sm`}),gd=J(e=>{let t=K(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,C.use)(hd),{resolvedClassNames:l,resolvedStyles:u}=Qn({classNames:a,styles:o,props:t});return(0,G.jsx)(zl,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});gd.displayName=`@mantine/core/InputClearButton`;var _d={xs:7,sm:8,md:10,lg:12,xl:15};function vd({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,G.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:_d[i]},children:[o,n||r]}):n===null?null:n||o||r}var yd=(0,C.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),bd={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},xd=W((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`}})),Sd=J(e=>{let t=K(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=K(`InputDescription`,null,t),f=(0,C.use)(yd),p=q({name:[`InputWrapper`,c],props:t,classes:bd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:xd}),m=l&&f?.getStyles||p;return(0,G.jsx)(Y,{component:`p`,...m(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});Sd.classes=bd,Sd.varsResolver=xd,Sd.displayName=`@mantine/core/InputDescription`;var Cd=W((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`}})),wd=J(e=>{let t=K(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=q({name:[`InputWrapper`,l],props:t,classes:bd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:Cd}),p=(0,C.use)(yd),m=u&&p?.getStyles||f;return(0,G.jsx)(Y,{component:`p`,...m(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});wd.classes=bd,wd.varsResolver=Cd,wd.displayName=`@mantine/core/InputError`;var Td={labelElement:`label`},Ed=W((e,{size:t})=>({label:{"--input-label-size":R(t),"--input-asterisk-color":void 0}})),Dd=J(e=>{let t=K(`InputLabel`,Td,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=q({name:[`InputWrapper`,p],props:t,classes:bd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:Ed}),v=(0,C.use)(yd),y=v?.getStyles||_,b=g.component||c,x=typeof b!=`string`||b===`label`;return(0,G.jsxs)(Y,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:x?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,G.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});Dd.classes=bd,Dd.varsResolver=Ed,Dd.displayName=`@mantine/core/InputLabel`;var Od=J(e=>{let t=K(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t,p=q({name:[`InputPlaceholder`,c],props:t,classes:bd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`});return(0,G.jsx)(Y,{...p(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});Od.classes=bd,Od.displayName=`@mantine/core/InputPlaceholder`;var kd=W((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`}})),Ad=J(e=>{let t=K(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=q({name:[`InputWrapper`,l],props:t,classes:bd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:kd}),p=(0,C.use)(yd),m=u&&p?.getStyles||f;return(0,G.jsx)(Y,{component:`p`,...m(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});Ad.classes=bd,Ad.varsResolver=kd,Ad.displayName=`@mantine/core/InputSuccess`;function jd(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var Md={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},Nd=W((e,{size:t})=>({label:{"--input-label-size":R(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${R(t)} - ${_(2)})`}})),Pd=J(e=>{let t=K(`InputWrapper`,Md,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,successProps:b,labelElement:x,children:S,withAsterisk:w,id:T,required:E,__stylesApiProps:D,mod:O,attributes:k,...A}=t,j=q({name:[`InputWrapper`,u],props:D||t,classes:bd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:Nd}),M={size:c,variant:l,__staticSelector:u},N=Re(T),ee=typeof w==`boolean`?w:E,P=y?.id||`${N}-error`,F=b?.id||`${N}-success`,I=v?.id||`${N}-description`,L=N,R=!!m&&typeof m!=`boolean`,te=!!h&&typeof h!=`boolean`&&!m,ne=!!g,re=R&&f.includes(`error`),ie=te&&f.includes(`error`),ae=ne&&f.includes(`description`),oe=`${re?P:``} ${ie?F:``} ${ae?I:``}`,se=oe.trim().length>0?oe.trim():void 0,ce=_?.id||`${N}-label`,le=p&&(0,G.jsx)(Dd,{labelElement:x,id:ce,htmlFor:L,required:ee,...M,..._,children:p},`label`),z=ne&&(0,G.jsx)(Sd,{...v,...M,size:v?.size||M.size,id:v?.id||I,children:g},`description`),B=(0,G.jsx)(C.Fragment,{children:d(S)},`input`),V=R&&(0,C.createElement)(wd,{...y,...M,size:y?.size||M.size,key:`error`,id:y?.id||P},m),ue=te&&(0,C.createElement)(Ad,{...b,...M,size:b?.size||M.size,key:`success`,id:b?.id||F},h),H=f.map(e=>{switch(e){case`label`:return le;case`input`:return B;case`description`:return z;case`error`:return V||ue;default:return null}});return(0,G.jsx)(yd,{value:{getStyles:j,describedBy:se,inputId:L,labelId:le&&f.includes(`label`)?ce:void 0,...jd(f,{hasDescription:ne,hasError:R||te})},children:(0,G.jsx)(Y,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},O],id:x===`label`?void 0:T,...j(`root`),...A,children:H})})});Pd.classes=bd,Pd.varsResolver=Nd,Pd.displayName=`@mantine/core/InputWrapper`;var Fd={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},Id=W((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":F(t.size,`input-height`),"--input-fz":R(t.size),"--input-radius":t.radius===void 0?void 0:L(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:_(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:_(t.rightSectionWidth),"--input-padding-y":t.multiline?F(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),Ld=Yr(e=>{let t=K(`Input`,Fd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:w,vars:T,pointer:E,multiline:D,radius:O,id:k,withAria:A,withErrorStyles:j,withSuccessStyles:M,mod:N,inputSize:ee,attributes:P,__clearSection:F,__clearable:I,__clearSectionMode:L,__defaultRightSection:R,loading:te,loadingPosition:ne,__bottomSection:re,__bottomSectionProps:ie,rootRef:ae,dir:oe,...se}=t,{styleProps:ce,rest:le}=br(se),z=(0,C.use)(yd),B={offsetBottom:z?.offsetBottom,offsetTop:z?.offsetTop},V=q({name:[`Input`,c],props:l||t,classes:bd,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,stylesCtx:B,rootSelector:`wrapper`,vars:T,varsResolver:Id}),ue=A?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":z?.describedBy,id:z?.inputId||k}:{},H=te?(0,G.jsx)(El,{size:ne===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,de=te&&ne===`left`?H:h,fe=vd({__clearable:I,__clearSection:F,rightSection:te&&ne===`right`?H:v,__defaultRightSection:R,size:u,__clearSectionMode:L});return(0,G.jsx)(hd,{value:{size:u||`sm`},children:(0,G.jsxs)(Y,{ref:ae,dir:oe,...V(`wrapper`),...ce,...d,mod:[{error:!!f&&j,success:!!p&&!f&&M,pointer:E,disabled:m,multiline:D,withRightSection:!!fe,withLeftSection:!!de,withBottomSection:!!re},N],variant:w,size:u,children:[de&&(0,G.jsx)(`div`,{...g,"data-position":`left`,...V(`section`,{className:g?.className,style:g?.style}),children:de}),(0,G.jsx)(Y,{component:`input`,...le,...ue,required:s,mod:{disabled:m,error:!!f&&j,success:!!p&&!f&&M},variant:w,__size:ee,...V(`input`)}),re&&(0,G.jsx)(`div`,{...ie,...V(`bottomSection`,{className:ie?.className,style:ie?.style}),children:re}),fe&&(0,G.jsx)(`div`,{...y,"data-position":`right`,...V(`section`,{className:y?.className,style:y?.style}),children:fe})]})})});Ld.classes=bd,Ld.varsResolver=Id,Ld.Wrapper=Pd,Ld.Label=Dd,Ld.Error=wd,Ld.Success=Ad,Ld.Description=Sd,Ld.Placeholder=Od,Ld.ClearButton=gd,Ld.displayName=`@mantine/core/Input`;function Rd(e,t,n){let r=K([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:M}=br(A),N={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...M,classNames:l,styles:u,unstyled:f,wrapperProps:{...N,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var zd={__staticSelector:`InputBase`,withAria:!0,size:`sm`},Bd=Yr(e=>{let{inputProps:t,wrapperProps:n,...r}=Rd(`InputBase`,zd,e);return(0,G.jsx)(Ld.Wrapper,{...n,children:(0,G.jsx)(Ld,{...t,...r})})});Bd.classes={...Ld.classes,...Ld.Wrapper.classes},Bd.displayName=`@mantine/core/InputBase`;function Vd(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function Hd({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,C.useRef)(-1),s=(0,C.useRef)(e),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(typeof r==`boolean`&&r),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=vi(s.borderTopWidth)+vi(c.borderTopWidth),u=vi(s.borderLeftWidth)+vi(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,C.useRef)(null),h=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,C.useEffect)(()=>{if(t){let e=e=>{Vd(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,C.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),ut(()=>{Dt()!==`test`&&l(!0)},20,{autoInvoke:!0}),ft(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var Ud={root:`m_96b553a6`},Wd=W((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),Gd=J(e=>{let t=K(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=q({name:`FloatingIndicator`,classes:Ud,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Wd,stylesCtx:{shouldReduceMotion:Xe()}}),y=(0,C.useRef)(null),{initialized:b,hidden:x}=Hd({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=Je(g,y);return!c||!l?null:(0,G.jsx)(Y,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});Gd.displayName=`@mantine/core/FloatingIndicator`,Gd.classes=Ud,Gd.varsResolver=Wd;var Kd={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},qd=W((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:L(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),Jd=J(e=>{let t=K(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=q({name:`Alert`,classes:Kd,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:qd}),C=Re(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(Y,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(zl,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});Jd.classes=Kd,Jd.varsResolver=qd,Jd.displayName=`@mantine/core/Alert`;var Yd={root:`m_b6d8b162`};function Xd(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var Zd={inherit:!1},Qd=W((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":R(i),"--text-lh":te(i),"--text-gradient":t===`gradient`?nn(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),Z=Yr(e=>{let t=K(`Text`,Zd,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t,x=q({name:[`Text`,l],props:t,classes:Yd,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:Qd});return(0,G.jsx)(Y,{...x(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{truncate:Xd(r),lineClamp:typeof n==`number`,inline:i,inherit:a},_],size:v,...b})});Z.classes=Yd,Z.varsResolver=Qd,Z.displayName=`@mantine/core/Text`;var $d={root:`m_849cf0da`},ef={underline:`hover`},tf=Yr(e=>{let{underline:t,className:n,unstyled:r,mod:i,...a}=K(`Anchor`,ef,e);return(0,G.jsx)(Z,{component:`a`,className:Ft({[$d.root]:!r},n),...a,mod:[{underline:t},i],__staticSelector:`Anchor`,unstyled:r})});tf.classes=$d,tf.displayName=`@mantine/core/Anchor`;function nf(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>nf(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function rf(e){return e?e.map(e=>nf(e)):[]}function af(e){return e.reduce((e,t)=>`group`in t?{...e,...af(t.items)}:(e[`${t.value}`]=t,e),{})}var of={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},sf={error:null},cf=W((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":F(t,`combobox-chevron-size`),"--combobox-chevron-color":n?$t(n,e):void 0}})),lf=J(e=>{let t=K(`ComboboxChevron`,sf,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=q({name:`ComboboxChevron`,classes:of,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:cf,attributes:u,rootSelector:`chevron`});return(0,G.jsx)(Y,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,G.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});lf.classes=of,lf.varsResolver=cf,lf.displayName=`@mantine/core/ComboboxChevron`;var[uf,df]=T(`Combobox component was not found in tree`);function ff({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,G.jsx)(Ld.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}ff.displayName=`@mantine/core/ComboboxClearButton`;var pf=J(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=K(`ComboboxDropdown`,null,e),s=df();return(0,G.jsx)(vl.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});pf.classes=of,pf.displayName=`@mantine/core/ComboboxDropdown`;var mf={refProp:`ref`},hf=J(e=>{let{children:t,refProp:n,ref:r}=K(`ComboboxDropdownTarget`,mf,e);if(df(),!w(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,G.jsx)(vl.Target,{ref:r,refProp:n,children:t})});hf.displayName=`@mantine/core/ComboboxDropdownTarget`;var gf=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxEmpty`,null,e),s=df();return(0,G.jsx)(Y,{...s.getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});gf.classes=of,gf.displayName=`@mantine/core/ComboboxEmpty`;function _f({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=df(),[c,l]=(0,C.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var vf={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},yf=J(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=K(`ComboboxEventsTarget`,vf,e),u=Nt(t);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=df(),f=_f({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s});return(0,C.cloneElement)(u,{...f,...l,[n]:Je(c,d.store.targetRef,Ot(u))})});yf.displayName=`@mantine/core/ComboboxEventsTarget`;var bf=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxFooter`,null,e),s=df();return(0,G.jsx)(Y,{...s.getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});bf.classes=of,bf.displayName=`@mantine/core/ComboboxFooter`;var xf=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=K(`ComboboxGroup`,null,e),u=df(),d=Re(c),f=s!=null&&s!==!1&&s!==``;return(0,G.jsxs)(Y,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,G.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});xf.classes=of,xf.displayName=`@mantine/core/ComboboxGroup`;var Sf=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxHeader`,null,e),s=df();return(0,G.jsx)(Y,{...s.getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Sf.classes=of,Sf.displayName=`@mantine/core/ComboboxHeader`;function Cf({value:e,valuesDivider:t=`,`,...n}){return(0,G.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}Cf.displayName=`@mantine/core/ComboboxHiddenInput`;var wf=J(e=>{let t=K(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=df(),_=(0,C.useId)(),v=c||_;return(0,G.jsx)(Y,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),"aria-disabled":f||void 0,...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});wf.classes=of,wf.displayName=`@mantine/core/ComboboxOption`;var Tf=J(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=K(`ComboboxOptions`,null,e),l=df(),u=Re(a);return(0,C.useEffect)(()=>{l.store.setListId(u)},[u]),(0,G.jsx)(Y,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});Tf.classes=of,Tf.displayName=`@mantine/core/ComboboxOptions`;var Ef={withAriaAttributes:!0,withKeyboardNavigation:!0},Df=J(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=K(`ComboboxSearch`,Ef,e),f=df(),p=f.getStyles(`search`),m=_f({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,G.jsx)(Ld,{ref:Je(u,f.store.searchRef),classNames:[{input:p.className},t],styles:[{input:p.style},n],size:l||f.size,...m,...d,__staticSelector:`Combobox`})});Df.classes=of,Df.displayName=`@mantine/core/ComboboxSearch`;var Of={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},kf=J(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=K(`ComboboxTarget`,Of,e),u=Nt(t);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=df(),f=_f({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),p=(0,C.cloneElement)(u,{...f,...l});return(0,G.jsx)(vl.Target,{refProp:n,ref:Je(c,d.store.targetRef),children:p})});kf.displayName=`@mantine/core/ComboboxTarget`;function Af(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function jf(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Mf(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function Nf({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=Ye({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,C.useRef)(null),u=(0,C.useRef)(-1),d=(0,C.useRef)(null),f=(0,C.useRef)(null),p=(0,C.useRef)(-1),m=(0,C.useRef)(-1),h=(0,C.useRef)(-1),g=(0,C.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,C.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,C.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,C.useCallback)(()=>{let e=Mt(f.current);At(`#${l.current} [data-combobox-selected]`,e)?.removeAttribute(`data-combobox-selected`)},[]),b=(0,C.useCallback)(e=>{let t=Mt(f.current),n=At(`#${l.current}`,t),r=n?jt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,C.useCallback)(()=>{let e=Mt(f.current),t=At(`#${l.current} [data-combobox-active]`,e);if(t){let n=jt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,C.useCallback)(()=>{let e=Mt(f.current),t=jt(`#${l.current} [data-combobox-option]`,e);return b(jf(u.current,t,a))},[b,a]),w=(0,C.useCallback)(()=>{let e=Mt(f.current),t=jt(`#${l.current} [data-combobox-option]`,e);return b(Af(u.current,t,a))},[b,a]),T=(0,C.useCallback)(()=>{let e=Mt(f.current),t=jt(`#${l.current} [data-combobox-option]`,e);return b(Mf(t))},[b]),E=(0,C.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=Mt(f.current),r=jt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o})}else h.current=window.setTimeout(()=>{let n=Mt(f.current),r=jt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),D=(0,C.useCallback)(()=>{u.current=-1,y()},[y]),O=(0,C.useCallback)(()=>{let e=Mt(f.current);(jt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),k=(0,C.useCallback)(e=>{l.current=e},[]),A=(0,C.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),j=(0,C.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),M=(0,C.useCallback)(()=>u.current,[]);return(0,C.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:M,selectOption:b,selectFirstOption:T,selectActiveOption:x,selectNextOption:S,selectPreviousOption:w,resetSelectedOption:D,updateSelectedOptionIndex:E,listId:l.current,setListId:k,clickSelectedOption:O,searchRef:d,focusSearchInput:A,targetRef:f,focusTarget:j}}var Pf={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Ff=W((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":R(t),"--combobox-option-padding":F(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:_(n),"--combobox-option-fz":R(t),"--combobox-option-padding":F(t,`combobox-option-padding`)}})),If=e=>{let t=K(`Combobox`,Pf,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=Nf(),x=o||b,S=q({name:p||`Combobox`,classes:of,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Ff}),C=()=>{l?.(),x.closeDropdown()};return(0,G.jsx)(uf,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,G.jsx)(vl,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};If.extend=e=>e,If.classes=of,If.varsResolver=Ff,If.displayName=`@mantine/core/Combobox`,If.Target=kf,If.Dropdown=pf,If.Options=Tf,If.Option=wf,If.Search=Df,If.Empty=gf,If.Chevron=lf,If.Footer=bf,If.Header=Sf,If.EventsTarget=yf,If.DropdownTarget=hf,If.Group=xf,If.ClearButton=ff,If.HiddenInput=Cf;function Lf({children:e,role:t}){let n=(0,C.use)(yd);return n?(0,G.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,G.jsx)(G.Fragment,{children:e})}var Rf=(0,C.createContext)(null),zf={hiddenInputValuesSeparator:`,`},Bf=Jr((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=K(`CheckboxGroup`,zf,e),[m,h]=Ye({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=typeof e==`string`?e:e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,G.jsx)(Rf,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,G.jsxs)(Ld.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`CheckboxGroup`,children:[(0,G.jsx)(Lf,{role:`group`,children:o}),(0,G.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));Bf.classes=Ld.Wrapper.classes,Bf.displayName=`@mantine/core/CheckboxGroup`;var Vf={card:`m_26775b0a`},Hf=(0,C.createContext)(null),Uf={withBorder:!0},Wf=W((e,{radius:t})=>({card:{"--card-radius":L(t)}})),Gf=J(e=>{let t=K(`CheckboxCard`,Uf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,checked:c,mod:l,withBorder:u,value:d,onClick:f,defaultChecked:p,onChange:m,indeterminate:h,attributes:g,..._}=t,v=q({name:`CheckboxCard`,classes:Vf,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s,varsResolver:Wf,rootSelector:`card`}),y=(0,C.use)(Rf),[b,x]=Ye({value:typeof c==`boolean`?c:y?y.value.includes(d||``):void 0,defaultValue:p,finalValue:!1,onChange:m});return(0,G.jsx)(Hf,{value:{checked:b,indeterminate:h},children:(0,G.jsx)(Tc,{mod:[{"with-border":u,checked:b,indeterminate:h},l],...v(`card`),..._,role:`checkbox`,"aria-checked":h?`mixed`:b,onClick:e=>{f?.(e),y?.onChange(d||``),x(!b)}})})});Gf.displayName=`@mantine/core/CheckboxCard`,Gf.classes=Vf,Gf.varsResolver=Wf;function Kf({size:e,style:t,...n}){let r=e===void 0?t:{width:_(e),height:_(e),...t};return(0,G.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:r,"aria-hidden":!0,...n,children:(0,G.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function qf({indeterminate:e,...t}){return e?(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,G.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,G.jsx)(Kf,{...t})}var Jf={indicator:`m_5e5256ee`,icon:`m_1b1c543a`,"indicator--light":`m_193e54c8`,"indicator--outline":`m_76e20374`},Yf={icon:qf,variant:`filled`,radius:`sm`},Xf=W((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=Qt({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:$t(n,e);return{indicator:{"--checkbox-size":F(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:L(t),"--checkbox-color":u,"--checkbox-bg":l?.background,"--checkbox-icon-color":i?$t(i,e):l?l.color:un(o,e)?sn({color:n,theme:e,autoContrast:o}):void 0}}}),Zf=J(e=>{let t=K(`CheckboxIndicator`,Yf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,icon:c,indeterminate:l,radius:u,color:d,iconColor:f,autoContrast:p,checked:m,mod:h,variant:g,disabled:_,attributes:v,...y}=t,b=q({name:`CheckboxIndicator`,classes:Jf,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Xf,rootSelector:`indicator`}),x=(0,C.use)(Hf),S=typeof l==`boolean`?l:x?.indeterminate,w=typeof m==`boolean`||typeof l==`boolean`?m||l:x?.checked||x?.indeterminate||!1;return(0,G.jsx)(Y,{...b(`indicator`,{variant:g}),variant:g,mod:[{checked:w,disabled:_},h],...y,children:(0,G.jsx)(c,{indeterminate:S,...b(`icon`)})})});Zf.displayName=`@mantine/core/CheckboxIndicator`,Zf.classes=Jf,Zf.varsResolver=Xf;var Qf={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},$f=Qf;function ep({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=q({name:e,props:t,className:n,style:_,classes:Qf,classNames:r,styles:i,unstyled:a,attributes:b}),C=c?`${l}-description`:void 0,w=d&&typeof d!=`boolean`?`${l}-error`:void 0;return(0,G.jsx)(Y,{...S(`root`),__vars:{"--label-fz":R(f),"--label-lh":F(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,G.jsxs)(Y,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,G.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,G.jsx)(Y,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,G.jsx)(Ld.Description,{id:C,size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,G.jsx)(Ld.Error,{id:w,size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}ep.displayName=`@mantine/core/InlineInput`;var tp={root:`m_bf2d988c`,inner:`m_26062bec`,input:`m_26063560`,icon:`m_bf295423`,"input--light":`m_595ab216`,"input--outline":`m_215c4542`},np={labelPosition:`right`,icon:qf,withErrorStyles:!0,variant:`filled`,radius:`sm`},rp=W((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=Qt({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:$t(n,e);return{root:{"--checkbox-size":F(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:L(t),"--checkbox-color":u,"--checkbox-bg":l?.background,"--checkbox-icon-color":i?$t(i,e):l?l.color:un(o,e)?sn({color:n,theme:e,autoContrast:o}):void 0}}}),ip=J(e=>{let t=K(`Checkbox`,np,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,id:u,size:d,radius:f,wrapperProps:p,checked:m,labelPosition:h,description:g,error:_,disabled:v,variant:y,indeterminate:b,icon:x,rootRef:S,iconColor:w,onChange:T,autoContrast:E,mod:D,attributes:O,readOnly:k,onClick:A,withErrorStyles:j,ref:M,...N}=t,ee=(0,C.useRef)(null),P=(0,C.use)(Rf),F=d||P?.size,I=q({name:`Checkbox`,props:t,classes:tp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:rp}),{styleProps:L,rest:R}=br(N),te=Re(u),ne=[g?`${te}-description`:void 0,_&&typeof _!=`boolean`?`${te}-error`:void 0,R[`aria-describedby`]].filter(Boolean).join(` `)||void 0,re={checked:P?.value.includes(R.value)??m,onChange:e=>{k||(P?.onChange(e),T?.(e))}},ie=P?.isDisabled?.(R.value)??!1,ae=v||ie;return(0,C.useEffect)(()=>{ee.current&&(ee.current.indeterminate=b||!1,b?ee.current.setAttribute(`data-indeterminate`,`true`):ee.current.removeAttribute(`data-indeterminate`))},[b]),(0,G.jsx)(ep,{...I(`root`),__staticSelector:`Checkbox`,__stylesApiProps:t,id:te,size:F,labelPosition:h,label:l,description:g,error:_,disabled:ae,classNames:n,styles:a,unstyled:o,"data-checked":re.checked||m||void 0,variant:y,ref:S,mod:D,attributes:O,inert:R.inert,...L,...p,children:(0,G.jsxs)(Y,{...I(`inner`),mod:{labelPosition:h},children:[(0,G.jsx)(Y,{component:`input`,id:te,ref:Je(ee,M),mod:{error:!!_,"with-error-styles":j},...I(`input`,{focusable:!0,variant:y}),...R,...re,"aria-describedby":ne,disabled:ae,inert:R.inert,type:`checkbox`,onClick:e=>{k&&re.checked===void 0&&e.preventDefault(),A?.(e)}}),(0,G.jsx)(x,{indeterminate:b,...I(`icon`)})]})})});ip.classes={...tp,...$f},ip.varsResolver=rp,ip.displayName=`@mantine/core/Checkbox`,ip.Group=Bf,ip.Indicator=Zf,ip.Card=Gf;function ap(e){return`group`in e}function op({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;ap(o)&&i.push({group:o.group,items:op({options:o.items,search:t,limit:n-i.length})}),ap(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function sp(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function cp(e,t=new Set){if(Array.isArray(e))for(let n of e)if(ap(n))cp(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function lp(e,t){return Array.isArray(e)?e.includes(t):e===t}function up({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!ap(e)){let s=lp(r,e.value),c=t&&(s?(0,G.jsx)(Kf,{className:of.optionsDropdownCheckIcon}):n?(0,G.jsx)(`div`,{className:of.optionsDropdownCheckPlaceholder}):null),l=(0,G.jsxs)(G.Fragment,{children:[i===`left`&&c,(0,G.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,G.jsx)(If.Option,{value:e.value,disabled:e.disabled,className:Ft({[of.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,G.jsx)(up,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,G.jsx)(If.Group,{label:e.group,children:s})}function dp({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=df();cp(e);let x=typeof i==`string`?(r||op)({options:e,search:l?i:``,limit:a??1/0}):e,S=sp(x),C=x.map((e,t)=>(0,G.jsx)(up,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},ap(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,G.jsx)(If.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,G.jsxs)(If.Options,{labelledBy:g,"aria-label":y,children:[c?(0,G.jsx)(xc.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,G.jsx)(If.Empty,{children:m})]})})}function fp({id:e,label:t,labelProps:n,inputWrapperOrder:r}){if(t&&(!r||r.includes(`label`)))return n?.id||`${e}-label`}var pp={group:`m_11def92b`,root:`m_f85678b6`,image:`m_11f8ac07`,placeholder:`m_104cd71f`},mp=(0,C.createContext)({withinGroup:!1}),hp=W((e,{spacing:t})=>({group:{"--ag-spacing":I(t)}})),gp=J(e=>{let t=K(`AvatarGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,spacing:c,attributes:l,...u}=t,d=q({name:`AvatarGroup`,classes:pp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:hp,rootSelector:`group`});return(0,G.jsx)(mp,{value:{withinGroup:!0},children:(0,G.jsx)(Y,{...d(`group`),...u})})});gp.classes=pp,gp.varsResolver=hp,gp.displayName=`@mantine/core/AvatarGroup`;function _p(e){return(0,G.jsx)(`svg`,{...e,"data-avatar-placeholder-icon":!0,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,G.jsx)(`path`,{d:`M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function vp(e){let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t}var yp=[`blue`,`cyan`,`grape`,`green`,`indigo`,`lime`,`orange`,`pink`,`red`,`teal`,`violet`];function bp(e,t=yp){let n=vp(e);return t[Math.abs(n)%t.length]}function xp(e,t=2){let n=e.split(` `);return n.length===1?e.slice(0,t).toUpperCase():n.map(e=>e[0]).slice(0,t).join(``).toUpperCase()}var Sp=W((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o,name:s,allowedInitialsColors:c})=>{let l=a===`initials`&&typeof s==`string`?bp(s,c):a,u=e.variantColorResolver({color:l||`gray`,theme:e,gradient:i,variant:r||`light`,autoContrast:o});return{root:{"--avatar-size":F(t,`avatar-size`),"--avatar-radius":n===void 0?void 0:L(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}}),Cp=Yr(e=>{let t=K(`Avatar`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,src:c,alt:l,radius:u,color:d,gradient:f,imageProps:p,children:m,autoContrast:h,mod:g,name:_,allowedInitialsColors:v,attributes:y,...b}=t,x=(0,C.use)(mp),[S,w]=(0,C.useState)(!c),T=q({name:`Avatar`,props:t,classes:pp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:Sp});return(0,C.useEffect)(()=>w(!c),[c]),(0,G.jsx)(Y,{...T(`root`),mod:[{"within-group":x.withinGroup},g],...b,children:S||!c?(0,G.jsx)(`span`,{...T(`placeholder`),title:l,children:m||typeof _==`string`&&xp(_)||(0,G.jsx)(_p,{})}):(0,G.jsx)(`img`,{...p,...T(`image`),src:c,alt:l,onError:e=>{w(!0),p?.onError?.(e)}})})});Cp.classes=pp,Cp.varsResolver=Sp,Cp.displayName=`@mantine/core/Avatar`,Cp.Group=gp;var wp={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},Tp=W((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":F(a,`badge-height`),"--badge-padding-x":F(a,`badge-padding-x`),"--badge-fz":F(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:L(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?$t(n,e):void 0}}}),Ep=Yr(e=>{let t=K(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=q({name:`Badge`,props:t,classes:wp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:Tp});return(0,G.jsxs)(Y,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});Ep.classes=wp,Ep.varsResolver=Tp,Ep.displayName=`@mantine/core/Badge`;var Dp={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},Op={orientation:`horizontal`},kp=W((e,{borderWidth:t})=>({group:{"--button-border-width":_(t)}})),Ap=J(e=>{let t=K(`ButtonGroup`,Op,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=K(`ButtonGroup`,Op,e),p=q({name:`ButtonGroup`,props:t,classes:Dp,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:kp,rootSelector:`group`});return(0,G.jsx)(Y,{...p(`group`),mod:[{orientation:s},u],role:`group`,...f})});Ap.classes=Dp,Ap.varsResolver=kp,Ap.displayName=`@mantine/core/ButtonGroup`;var jp=W((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":F(o,`section-height`),"--section-padding-x":F(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?R(o.replace(`compact-`,``)):R(o),"--section-radius":t===void 0?void 0:L(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),Mp=J(e=>{let t=K(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t,p=q({name:`ButtonGroupSection`,props:t,classes:Dp,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:jp,rootSelector:`groupSection`});return(0,G.jsx)(Y,{...p(`groupSection`),...f})});Mp.classes=Dp,Mp.varsResolver=jp,Mp.displayName=`@mantine/core/ButtonGroupSection`;var Np={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${_(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},Pp=W((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":F(a,`button-height`),"--button-padding-x":F(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?R(a.replace(`compact-`,``)):R(a),"--button-radius":t===void 0?void 0:L(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),Fp=Yr(e=>{let t=K(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=q({name:`Button`,props:t,classes:Dp,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:Pp}),T=!!c,E=!!l;return(0,G.jsxs)(Tc,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(el,{mounted:p,transition:Np,duration:150,children:e=>(0,G.jsx)(Y,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(El,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(Y,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(Y,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(Y,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});Fp.classes=Dp,Fp.varsResolver=Pp,Fp.displayName=`@mantine/core/Button`,Fp.Group=Ap,Fp.GroupSection=Mp;function Ip(e){let t=e.currentTarget;return Mt(t).activeElement!==t}var Lp={root:`m_4451eb3a`},Rp=Yr(e=>{let t=K(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=q({name:`Center`,props:t,classes:Lp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(Y,{mod:[{inline:c},l],...f(`root`),...d})});Rp.classes=Lp,Rp.displayName=`@mantine/core/Center`;var zp=Jr(e=>{let{value:t,defaultValue:n,onChange:r,multiple:i,children:a}=K(`ChipGroup`,null,e),[o,s]=Ye({value:t,defaultValue:n,finalValue:i?[]:null,onChange:r});return(0,G.jsx)(Bp,{value:{isChipSelected:e=>Array.isArray(o)?o.includes(e):e===o,onChange:e=>{let t=e.currentTarget.value;s(Array.isArray(o)?o.includes(t)?o.filter(e=>e!==t):[...o,t]:t)},multiple:i},children:a})});zp.displayName=`@mantine/core/ChipGroup`;var Bp=(0,C.createContext)(null),Vp={root:`m_f59ffda3`,label:`m_be049a53`,"label--outline":`m_3904c1af`,"label--filled":`m_fa109255`,"label--light":`m_f7e165c3`,iconWrapper:`m_9ac86df9`,checkIcon:`m_d6d72580`,input:`m_bde07329`},Hp={type:`checkbox`},Up=W((e,{size:t,radius:n,variant:r,color:i,autoContrast:a})=>{let o=e.variantColorResolver({color:i||e.primaryColor,theme:e,variant:r||`filled`,autoContrast:a});return{root:{"--chip-fz":R(t),"--chip-size":F(t,`chip-size`),"--chip-radius":n===void 0?void 0:L(n),"--chip-checked-padding":F(t,`chip-checked-padding`),"--chip-padding":F(t,`chip-padding`),"--chip-icon-size":F(t,`chip-icon-size`),"--chip-bg":i||r?o.background:void 0,"--chip-hover":i||r?o.hover:void 0,"--chip-color":i||r?o.color:void 0,"--chip-bd":i||r?o.border:void 0,"--chip-spacing":F(t,`chip-spacing`)}}}),Wp=J(e=>{let t=K(`Chip`,Hp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,id:c,checked:l,defaultChecked:u,onChange:d,value:f,wrapperProps:p,type:m,disabled:h,children:g,size:_,variant:v,icon:y,rootRef:b,autoContrast:x,mod:S,attributes:w,readOnly:T,...E}=t,D=q({name:`Chip`,classes:Vp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,varsResolver:Up}),O=(0,C.use)(Bp),k=Re(c),{styleProps:A,rest:j}=br(E),[M,N]=Ye({value:l,defaultValue:u,finalValue:!1,onChange:d}),ee=O?{checked:O.isChipSelected(f),onChange:e=>{T||(O.onChange(e),d?.(e.currentTarget.checked))},type:O.multiple?`checkbox`:`radio`}:{},P=ee.checked||M;return(0,G.jsxs)(Y,{size:_,variant:v,ref:b,mod:S,...D(`root`),...A,...p,children:[(0,G.jsx)(`input`,{type:m,...D(`input`),checked:P,onChange:e=>!T&&N(e.currentTarget.checked),id:k,disabled:h,readOnly:T,value:f,...ee,...j}),(0,G.jsxs)(Y,{component:`label`,htmlFor:k,mod:{checked:P,disabled:h},...D(`label`,{variant:v||`filled`}),children:[P&&y!==null&&y!==!1&&(0,G.jsx)(`span`,{...D(`iconWrapper`),children:y===void 0?(0,G.jsx)(Kf,{...D(`checkIcon`)}):y}),(0,G.jsx)(`span`,{children:g})]})]})});Wp.classes=Vp,Wp.varsResolver=Up,Wp.displayName=`@mantine/core/Chip`,Wp.Group=zp;var Gp={root:`m_b183c0a2`},Kp=W((e,{color:t})=>({root:{"--code-bg":t?$t(t,e):void 0}})),qp=J(e=>{let t=K(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:d,...f}=t,p=q({name:`Code`,props:t,classes:Gp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:Kp});return(0,G.jsx)(Y,{component:l?`pre`:`code`,mod:[{block:l},u],...p(`root`),...f,dir:`ltr`})});qp.classes=Gp,qp.varsResolver=Kp,qp.displayName=`@mantine/core/Code`;var Jp={root:`m_7485cace`},Yp={strategy:`block`},Xp=W((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:F(t,`container-size`)}})),Zp=J(e=>{let t=K(`Container`,Yp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=q({name:`Container`,classes:Jp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Xp});return(0,G.jsx)(Y,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});Zp.classes=Jp,Zp.varsResolver=Xp,Zp.displayName=`@mantine/core/Container`;var Qp={timeout:1e3};function $p(e){let{children:t,timeout:n,value:r,...i}=K(`CopyButton`,Qp,e),a=B({timeout:n});return(0,G.jsx)(G.Fragment,{children:t({copy:()=>a.copy(r),copied:a.copied,...i})})}$p.displayName=`@mantine/core/CopyButton`;var em={root:`m_3eebeb36`,label:`m_9e365f20`},tm={orientation:`horizontal`},nm=W((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?$t(t,e):void 0,"--divider-border-style":n,"--divider-size":F(r,`divider-size`)}})),rm=J(e=>{let t=K(`Divider`,tm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,orientation:l,label:u,labelPosition:d,mod:f,attributes:p,...m}=t,h=q({name:`Divider`,classes:em,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:nm});return(0,G.jsx)(Y,{mod:[{orientation:l,withLabel:!!u},f],role:`separator`,"aria-orientation":l,...h(`root`),...m,children:u&&(0,G.jsx)(Y,{component:`span`,mod:{position:d},...h(`label`),children:u})})});rm.classes=em,rm.varsResolver=nm,rm.displayName=`@mantine/core/Divider`;function im({color:e,theme:t,defaultShade:n}){let r=Qt({color:e,theme:t});return r.isThemeColor?r.shade===void 0?`var(--mantine-color-${r.color}-${n})`:`var(${r.variable})`:e}var am={root:`m_bcb3f3c2`},om={color:`yellow`},sm=W((e,{color:t})=>({root:{"--mark-bg-dark":im({color:t,theme:e,defaultShade:5}),"--mark-bg-light":im({color:t,theme:e,defaultShade:2})}})),cm=J(e=>{let t=K(`Mark`,om,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,variant:l,attributes:u,...d}=t,f=q({name:`Mark`,props:t,className:r,style:i,classes:am,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:sm});return(0,G.jsx)(Y,{component:`mark`,variant:l,...f(`root`),...d})});cm.classes=am,cm.varsResolver=sm,cm.displayName=`@mantine/core/Mark`;function lm(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`)}function um(e){return e.normalize(`NFD`).replace(/\p{M}/gu,``)}function dm(e){let t=``,n=[],r=0;for(;r<e.length;){let i=e.codePointAt(r),a=String.fromCodePoint(i),o=um(a);for(let e=0;e<o.length;e+=1)n.push(r);t+=o,r+=a.length}return n.push(e.length),{folded:t,map:n}}function fm(e,t){let{folded:n,map:r}=dm(e),i=[],a=0,o;for(;(o=t.exec(n))!==null;){let n=o.index,s=n+o[0].length,c=r[n],l=r[s];c>a&&i.push({chunk:e.slice(a,c),highlighted:!1}),i.push({chunk:e.slice(c,l),highlighted:!0}),a=l,o[0].length===0&&(t.lastIndex+=1)}return a<e.length&&i.push({chunk:e.slice(a),highlighted:!1}),i.filter(({chunk:e})=>e)}function pm(e,t,n={}){if(t==null)return[{chunk:e,highlighted:!1}];let{wholeWord:r=!1,caseInsensitive:i=!0,accentInsensitive:a=!0}=n,o=e=>a?um(lm(e)):lm(e),s=Array.isArray(t)?t.map(o):o(t);if(!(Array.isArray(s)?s.filter(e=>e.trim().length>0).length>0:s.trim()!==``))return[{chunk:e,highlighted:!1}];let c=typeof s==`string`?s.trim():s.filter(e=>e.trim().length!==0).map(e=>e.trim()).sort((e,t)=>t.length-e.length).join(`|`),l=r?`(?<![\\p{L}\\p{N}_])(${c})(?![\\p{L}\\p{N}_])`:`(${c})`,u=[`g`,i?`i`:``,r?`u`:``].join(``),d=new RegExp(l,u);return a?fm(e,d):e.split(d).map((e,t)=>({chunk:e,highlighted:t%2==1})).filter(({chunk:e})=>e)}var mm={color:`yellow`,wholeWord:!1,caseInsensitive:!0,accentInsensitive:!0},hm=Yr(e=>{let{unstyled:t,children:n,highlight:r,highlightStyles:i,color:a,wholeWord:o,caseInsensitive:s,accentInsensitive:c,...l}=K(`Highlight`,mm,e),u=Array.isArray(r)&&typeof r[0]==`object`,d=new Map,f=e=>{let t=e;return s&&(t=t.toLowerCase()),c&&(t=um(t)),t},p;p=u?r.map(e=>(e.color&&d.set(f(e.text),e.color),e.text)):Array.isArray(r)?r:[r];let m=pm(n,p,{wholeWord:o,caseInsensitive:s,accentInsensitive:c});return(0,G.jsx)(Z,{unstyled:t,...l,__staticSelector:`Highlight`,children:m.map(({chunk:e,highlighted:n},r)=>n?(0,G.jsx)(cm,{unstyled:t,color:d.get(f(e))||a,style:i,"data-highlight":e,children:e},r):(0,G.jsx)(`span`,{children:e},r))})});hm.classes=Z.classes,hm.displayName=`@mantine/core/Highlight`;var gm=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],_m={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function vm(e){Object.keys(_m).forEach(t=>{e.style.setProperty(t,_m[t],`important`)})}function ym(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of gm)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var bm=null;function xm(e,t,n=1,r=1/0){bm||(bm=document.createElement(`textarea`),bm.setAttribute(`tabindex`,`-1`),bm.setAttribute(`aria-hidden`,`true`),bm.setAttribute(`aria-label`,`autosize measurement`),vm(bm)),bm.parentNode===null&&document.body.appendChild(bm);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{bm.style[e]=o[e]}),vm(bm),bm.value=t;let c=s===`border-box`?bm.scrollHeight+a:bm.scrollHeight-i;bm.value=t,c=s===`border-box`?bm.scrollHeight+a:bm.scrollHeight-i,bm.value=`x`;let l=bm.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function Sm({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,C.useRef)(null),s=Je(o,r),c=(0,C.useRef)(0),l=(0,C.useRef)(0),u=()=>{let n=o.current;if(!n)return;let r=ym(n);if(!r)return;let[i]=xm(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},d=(0,C.useEffectEvent)(u),f=e=>{a||u(),n?.(e)};return(0,C.useLayoutEffect)(u),(0,C.useEffect)(()=>{let e=()=>u();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,C.useEffect)(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;l.current=e.offsetWidth;let t=0,n=new ResizeObserver(()=>{o.current&&o.current.offsetWidth!==l.current&&(l.current=o.current.offsetWidth,cancelAnimationFrame(t),t=requestAnimationFrame(d))});return n.observe(e),()=>{cancelAnimationFrame(t),n.disconnect()}},[]),(0,C.useEffect)(()=>{let e=()=>u();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,C.useEffect)(()=>{let e=e=>{if(o.current?.form===e.target&&!a){let e=o.current.value;requestAnimationFrame(()=>{o.current&&e!==o.current.value&&u()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[a]),(0,G.jsx)(`textarea`,{rows:t,...i,onChange:f,ref:s})}var Cm=J(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=K([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&Dt()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,G.jsx)(Bd,{component:l?Sm:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});Cm.classes=Bd.classes,Cm.displayName=`@mantine/core/Textarea`;var wm={root:`m_dc6f14e2`},Tm=W((e,{size:t})=>({root:{"--kbd-fz":F(t,`kbd-fz`)}})),Em=J(e=>{let t=K(`Kbd`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t,u=q({name:`Kbd`,classes:wm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:Tm});return(0,G.jsx)(Y,{component:`kbd`,...u(`root`),...l})});Em.classes=wm,Em.varsResolver=Tm,Em.displayName=`@mantine/core/Kbd`;var[Dm,Om]=T(`List component was not found in tree`),km={root:`m_abbac491`,item:`m_abb6bec2`,itemWrapper:`m_75cd9f71`,itemIcon:`m_60f83e5b`},Am=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,children:s,mod:c,...l}=K(`ListItem`,null,e),u=Om(),d=o||u.icon,f={classNames:t,styles:i};return(0,G.jsx)(Y,{...u.getStyles(`item`,{...f,className:n,style:r}),component:`li`,mod:[{"with-icon":!!d,centered:u.center},c],...l,children:(0,G.jsxs)(`div`,{...u.getStyles(`itemWrapper`,f),children:[d&&(0,G.jsx)(`span`,{...u.getStyles(`itemIcon`,f),children:d}),(0,G.jsx)(`span`,{...u.getStyles(`itemLabel`,f),children:s})]})})});Am.classes=km,Am.displayName=`@mantine/core/ListItem`;var jm={type:`unordered`},Mm=W((e,{size:t,spacing:n})=>({root:{"--list-fz":R(t),"--list-lh":te(t),"--list-spacing":I(n)}})),Nm=J(e=>{let t=K(`List`,jm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,type:l,withPadding:u,icon:d,spacing:f,center:p,listStyleType:m,mod:h,attributes:g,..._}=t,v=q({name:`List`,classes:km,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s,varsResolver:Mm});return(0,G.jsx)(Dm,{value:{center:p,icon:d,getStyles:v},children:(0,G.jsx)(Y,{...v(`root`,{style:{listStyleType:m}}),component:l===`unordered`?`ul`:`ol`,mod:[{"with-padding":u,type:d?`none`:m},h],..._,children:c})})});Nm.classes=km,Nm.varsResolver=Mm,Nm.displayName=`@mantine/core/List`,Nm.Item=Am;function Pm({size:e,style:t,...n}){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:_(e),height:_(e),...t},"aria-hidden":!0,...n,children:(0,G.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var[Fm,Im]=T(`Modal component was not found in tree`),Lm={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},Rm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalBody`,null,e),s=Im();return(0,G.jsx)(ad,{...s.getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Rm.classes=Lm,Rm.displayName=`@mantine/core/ModalBody`;var zm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalCloseButton`,null,e),s=Im();return(0,G.jsx)(od,{...s.getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});zm.classes=Lm,zm.displayName=`@mantine/core/ModalCloseButton`;var Bm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=K(`ModalContent`,null,e),l=Im(),u=l.scrollAreaComponent||md;return(0,G.jsx)(sd,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,G.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${_(l.yOffset)} * 2))`},children:o})})});Bm.classes=Lm,Bm.displayName=`@mantine/core/ModalContent`;var Vm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalHeader`,null,e),s=Im();return(0,G.jsx)(cd,{...s.getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Vm.classes=Lm,Vm.displayName=`@mantine/core/ModalHeader`;var Hm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalOverlay`,null,e),s=Im();return(0,G.jsx)(dd,{...s.getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});Hm.classes=Lm,Hm.displayName=`@mantine/core/ModalOverlay`;var Um={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:N(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},Wm=W((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:L(t),"--modal-size":F(n,`modal-size`),"--modal-y-offset":_(r),"--modal-x-offset":_(i)}})),Gm=J(e=>{let t=K(`ModalRoot`,Um,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=q({name:m,classes:Lm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Wm});return(0,G.jsx)(Fm,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,G.jsx)(nd,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===xc.Autosize||void 0,unstyled:o,...g})})});Gm.classes=Lm,Gm.varsResolver=Wm,Gm.displayName=`@mantine/core/ModalRoot`;var Km=(0,C.createContext)(null);function qm({children:e}){let[t,n]=(0,C.useState)([]),[r,i]=(0,C.useState)(N(`modal`)),[a]=(0,C.useState)(()=>new WeakSet);return(0,G.jsx)(Km,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r,handledEscapeEvents:a},children:e})}qm.displayName=`@mantine/core/ModalStack`;var Jm=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalTitle`,null,e),s=Im();return(0,G.jsx)(pd,{...s.getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});Jm.classes=Lm,Jm.displayName=`@mantine/core/ModalTitle`;var Ym={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:N(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},Xm=J(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=K(`Modal`,Ym,e),f=(0,C.use)(Km),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l),__handledEscapeEvents:f.handledEscapeEvents}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,C.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||N(`modal`)):f.removeModal(l))},[c,l,u]),(0,G.jsxs)(Gm,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,G.jsx)(Hm,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,G.jsxs)(Bm,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,G.jsxs)(Vm,{children:[t&&(0,G.jsx)(Jm,{children:t}),i&&(0,G.jsx)(zm,{...a})]}),(0,G.jsx)(Rm,{children:o})]})]})});Xm.classes=Lm,Xm.displayName=`@mantine/core/Modal`,Xm.Root=Gm,Xm.Overlay=Hm,Xm.Content=Bm,Xm.Body=Rm,Xm.Header=Vm,Xm.Title=Jm,Xm.CloseButton=zm,Xm.Stack=qm;function Zm(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}var Qm={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},$m={withCloseButton:!0},eh=W((e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:L(t),"--notification-color":n?$t(n,e):void 0}})),th=J(e=>{let t=K(`Notification`,$m,e),{className:n,color:r,radius:i,loading:a,withCloseButton:o,withBorder:s,title:c,icon:l,children:u,onClose:d,closeButtonProps:f,classNames:p,style:m,styles:h,unstyled:g,vars:_,mod:v,loaderProps:y,role:b,attributes:x,...S}=t,C=q({name:`Notification`,classes:Qm,props:t,className:n,style:m,classNames:p,styles:h,unstyled:g,attributes:x,vars:_,varsResolver:eh});return(0,G.jsxs)(Y,{...C(`root`),mod:[{withIcon:!!l||a,withBorder:s},v],role:b||`alert`,...S,children:[l&&!a&&(0,G.jsx)(`div`,{...C(`icon`),children:l}),a&&(0,G.jsx)(El,{size:28,color:r,...C(`loader`),...y}),(0,G.jsxs)(`div`,{...C(`body`),children:[c&&(0,G.jsx)(`div`,{...C(`title`),children:c}),(0,G.jsx)(Y,{...C(`description`),mod:{withTitle:!!c},children:u})]}),o&&(0,G.jsx)(zl,{iconSize:16,color:`gray`,...f,unstyled:g,onClick:e=>{f?.onClick?.(e),d?.()},...C(`closeButton`)})]})});th.classes=Qm,th.varsResolver=eh,th.displayName=`@mantine/core/Notification`;function nh({reveal:e}){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,style:{width:`var(--psi-icon-size)`,height:`var(--psi-icon-size)`},children:e?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),(0,G.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53`}),(0,G.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6`})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),(0,G.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`,d:`M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z`}),(0,G.jsx)(`circle`,{cx:`128`,cy:`128`,r:`40`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`16`})]})})}var rh={root:`m_f61ca620`,input:`m_ccf8da4c`,innerInput:`m_f2d85dd2`,visibilityToggle:`m_b1072d44`},ih={visibilityToggleIcon:nh,visibilityToggleFocusable:!1,size:`sm`},ah=W((e,{size:t})=>({root:{"--psi-icon-size":F(t,`psi-icon-size`),"--psi-button-size":F(t,`psi-button-size`)}}));function oh(e){let t=(0,C.use)(yd);return(0,G.jsx)(`input`,{...e,"aria-describedby":t?.describedBy})}var sh=J(e=>{let t=K([`Input`,`InputWrapper`,`PasswordInput`],ih,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,required:c,error:l,success:u,leftSection:d,disabled:f,id:p,variant:m,inputContainer:h,description:g,label:_,size:v,errorProps:y,successProps:b,descriptionProps:x,labelProps:S,withAsterisk:C,inputWrapperOrder:w,wrapperProps:T,radius:E,rightSection:D,rightSectionWidth:O,rightSectionPointerEvents:k,leftSectionWidth:A,visible:j,defaultVisible:M,onVisibilityChange:N,visibilityToggleIcon:ee,visibilityToggleButtonProps:P,visibilityToggleFocusable:F,rightSectionProps:I,leftSectionProps:L,leftSectionPointerEvents:R,withErrorStyles:te,withSuccessStyles:ne,mod:re,attributes:ie,dir:ae,...oe}=t,se=Re(p),[ce,le]=Ye({value:j,defaultValue:M,finalValue:!1,onChange:N}),z=()=>le(!ce),B=q({name:`PasswordInput`,classes:rh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ie,vars:s,varsResolver:ah}),{resolvedClassNames:V,resolvedStyles:ue}=Qn({classNames:n,styles:a,props:t}),{styleProps:H,rest:de}=br(oe),fe=y?.id||`${se}-error`,pe=b?.id||`${se}-success`,me=x?.id||`${se}-description`,he=(0,G.jsx)(Pl,{...B(`visibilityToggle`),disabled:f,radius:E,"aria-pressed":ce,tabIndex:F?0:-1,"aria-label":`Toggle password visibility`,...P,variant:P?.variant??`subtle`,color:`gray`,unstyled:o,onTouchEnd:e=>{e.preventDefault(),P?.onTouchEnd?.(e),z()},onMouseDown:e=>{e.preventDefault(),P?.onMouseDown?.(e),z()},onKeyDown:e=>{P?.onKeyDown?.(e),(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),z())},children:(0,G.jsx)(ee,{reveal:ce})});return(0,G.jsx)(Ld.Wrapper,{required:c,id:se,label:_,error:l,success:u,description:g,size:v,classNames:V,styles:ue,__staticSelector:`PasswordInput`,__stylesApiProps:t,unstyled:o,withAsterisk:C,inputWrapperOrder:w,inputContainer:h,variant:m,labelProps:{...S,htmlFor:se},descriptionProps:{...x,id:me},errorProps:{...y,id:fe},successProps:{...b,id:pe},mod:re,attributes:ie,...B(`root`),...H,...T,children:(0,G.jsx)(Ld,{component:`div`,dir:ae,error:l,success:u,leftSection:d,size:v,classNames:{...V,input:Ft(rh.input,V?.input)},styles:ue,radius:E,disabled:f,__staticSelector:`PasswordInput`,__stylesApiProps:t,rightSectionWidth:O,rightSection:D??he,variant:m,unstyled:o,leftSectionWidth:A,rightSectionPointerEvents:k||`all`,rightSectionProps:I,leftSectionProps:L,leftSectionPointerEvents:R,withAria:!1,withErrorStyles:te,withSuccessStyles:ne,attributes:ie,children:(0,G.jsx)(oh,{required:c,"data-invalid":!!l||void 0,"data-with-left-section":!!d||void 0,...B(`innerInput`),disabled:f,id:se,dir:ae,...de,autoComplete:de.autoComplete||`off`,type:ce?`text`:`password`})})})});sh.classes={...Bd.classes,...rh},sh.varsResolver=ah,sh.displayName=`@mantine/core/PasswordInput`;var[ch,lh]=T(`Progress.Root component was not found in tree`),uh={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},dh=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ProgressLabel`,null,e),s=lh();return(0,G.jsx)(Y,{...s.getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...o})});dh.classes=uh,dh.displayName=`@mantine/core/ProgressLabel`;var fh=W((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":F(t,`progress-size`),"--progress-radius":n===void 0?void 0:L(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),ph=J(e=>{let t=K(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,transitionDuration:l,orientation:u,attributes:d,mod:f,...p}=t,m=q({name:`Progress`,classes:uh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:fh});return(0,G.jsx)(ch,{value:{getStyles:m,autoContrast:c},children:(0,G.jsx)(Y,{mod:[{orientation:u},f],...m(`root`),...p})})});ph.classes=uh,ph.varsResolver=fh,ph.displayName=`@mantine/core/ProgressRoot`;var mh={withAria:!0},hh=J(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,value:o,withAria:s,color:c,striped:l,animated:u,mod:d,...f}=K(`ProgressSection`,mh,e),p=lh(),m=In(),h=s?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":o,"aria-valuetext":`${o}%`}:{};return(0,G.jsx)(Y,{...p.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...f,...h,mod:[{striped:l||u,animated:u},d],__vars:{"--progress-section-size":`${o}%`,"--progress-section-color":$t(c,m),"--progress-label-color":un(p.autoContrast,m)?sn({color:c,theme:m,autoContrast:p.autoContrast}):void 0}})});hh.classes=uh,hh.displayName=`@mantine/core/ProgressSection`;var gh=J(e=>{let t=K(`Progress`,null,e),{value:n,classNames:r,styles:i,vars:a,color:o,striped:s,animated:c,"aria-label":l,...u}=t,{resolvedClassNames:d,resolvedStyles:f}=Qn({classNames:r,styles:i,props:t});return(0,G.jsx)(ph,{classNames:d,styles:f,vars:a,...u,children:(0,G.jsx)(hh,{value:n,color:o,striped:s,animated:c,"aria-label":l})})});gh.classes=uh,gh.displayName=`@mantine/core/Progress`,gh.Section=hh,gh.Root=ph,gh.Label=dh;var _h=(0,C.createContext)(null),vh=Jr((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,name:s,readOnly:c,disabled:l,...u}=K(`RadioGroup`,null,e),d=Re(s),[f,p]=Ye({value:t,defaultValue:n,finalValue:``,onChange:r});return(0,G.jsx)(_h,{value:{value:f,onChange:e=>!c&&p(typeof e==`string`?e:e.currentTarget.value),size:i,name:d,disabled:l},children:(0,G.jsx)(Ld.Wrapper,{size:i,...a,...u,labelElement:`div`,__staticSelector:`RadioGroup`,children:(0,G.jsx)(Lf,{role:`radiogroup`,children:o})})})}));vh.classes=Ld.Wrapper.classes,vh.displayName=`@mantine/core/RadioGroup`;var yh={card:`m_9dc8ae12`},bh=(0,C.createContext)(null),xh={withBorder:!0},Sh=W((e,{radius:t})=>({card:{"--card-radius":L(t)}})),Ch=J(e=>{let t=K(`RadioCard`,xh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,checked:c,mod:l,withBorder:u,value:d,onClick:f,name:p,onKeyDown:m,attributes:h,...g}=t,_=q({name:`RadioCard`,classes:yh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Sh,rootSelector:`card`}),{dir:v}=ri(),y=(0,C.use)(_h),b=typeof c==`boolean`?c:y?.value===d||!1,x=p||y?.name,S=e=>{if(m?.(e),x&&[`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`].includes(e.nativeEvent.code)){e.preventDefault();let t=Array.from(document.querySelectorAll(`[role="radio"][name="${x}"]`)),n=t.findIndex(t=>t===e.target),r=n+1>=t.length?0:n+1,i=n-1<0?t.length-1:n-1;e.nativeEvent.code===`ArrowDown`&&(t[r].focus(),t[r].click()),e.nativeEvent.code===`ArrowUp`&&(t[i].focus(),t[i].click()),e.nativeEvent.code===`ArrowLeft`&&(t[v===`ltr`?i:r].focus(),t[v===`ltr`?i:r].click()),e.nativeEvent.code===`ArrowRight`&&(t[v===`ltr`?r:i].focus(),t[v===`ltr`?r:i].click())}};return(0,G.jsx)(bh,{value:{checked:b},children:(0,G.jsx)(Tc,{mod:[{"with-border":u,checked:b},l],..._(`card`),...g,role:`radio`,"aria-checked":b,name:x,onClick:e=>{f?.(e),y?.onChange(d||``)},onKeyDown:S})})});Ch.displayName=`@mantine/core/RadioCard`,Ch.classes=yh,Ch.varsResolver=Sh;var wh={indicator:`m_717d7ff6`,icon:`m_3e4da632`,"indicator--light":`m_7eec72c0`,"indicator--outline":`m_2980836c`},Th={icon:Pm},Eh=W((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=Qt({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:$t(n,e);return{indicator:{"--radio-size":F(r,`radio-size`),"--radio-radius":t===void 0?void 0:L(t),"--radio-color":u,"--radio-bg":l?.background,"--radio-icon-size":typeof r==`number`?`calc(${F(r,`radio-size`)} * 0.4)`:F(r,`radio-icon-size`),"--radio-icon-color":i?$t(i,e):l?l.color:un(o,e)?sn({color:n,theme:e,autoContrast:o}):void 0}}}),Dh=J(e=>{let t=K(`RadioIndicator`,Th,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,icon:c,radius:l,color:u,iconColor:d,autoContrast:f,checked:p,mod:m,variant:h,disabled:g,attributes:_,...v}=t,y=q({name:`RadioIndicator`,classes:wh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:Eh,rootSelector:`indicator`}),b=(0,C.use)(bh),x=typeof p==`boolean`?p:b?.checked||!1;return(0,G.jsx)(Y,{...y(`indicator`,{variant:h}),variant:h,mod:[{checked:x,disabled:g},m],...v,children:(0,G.jsx)(c,{...y(`icon`)})})});Dh.displayName=`@mantine/core/RadioIndicator`,Dh.classes=wh,Dh.varsResolver=Eh;var Oh={root:`m_f3f1af94`,inner:`m_89c4f5e4`,icon:`m_f3ed6b2b`,radio:`m_8a3dbb89`,"radio--light":`m_99d09bcd`,"radio--outline":`m_1bfe9d39`},kh={labelPosition:`right`,withErrorStyles:!0},Ah=W((e,{size:t,radius:n,color:r,iconColor:i,variant:a,autoContrast:o})=>{let s=Qt({color:r||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:$t(r,e);return{root:{"--radio-size":F(t,`radio-size`),"--radio-radius":n===void 0?void 0:L(n),"--radio-color":u,"--radio-bg":l?.background,"--radio-icon-color":i?$t(i,e):l?l.color:un(o,e)?sn({color:r,theme:e,autoContrast:o}):void 0,"--radio-icon-size":F(t,`radio-icon-size`)}}}),jh=J(e=>{let t=K(`Radio`,kh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,id:c,size:l,label:u,labelPosition:d,description:f,error:p,radius:m,color:h,variant:g,disabled:_,wrapperProps:v,icon:y=Pm,rootRef:b,iconColor:x,onChange:S,mod:w,attributes:T,withErrorStyles:E,checked:D,readOnly:O,onClick:k,...A}=t,j=q({name:`Radio`,classes:Oh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,vars:s,varsResolver:Ah}),M=(0,C.use)(_h),N=M?.size??l,ee=t.size?l:N,{styleProps:P,rest:F}=br(A),I=Re(c),L=[f?`${I}-description`:void 0,p&&typeof p!=`boolean`?`${I}-error`:void 0,F[`aria-describedby`]].filter(Boolean).join(` `)||void 0,R=M?M.value===F.value:void 0,te={checked:R??D,name:F.name??M?.name,onChange:e=>{O||(M?.onChange(e),S?.(e))},disabled:M?.disabled??_};return(0,G.jsx)(ep,{...j(`root`),__staticSelector:`Radio`,__stylesApiProps:t,id:I,size:ee,labelPosition:d,label:u,description:f,error:p,disabled:te.disabled,classNames:n,styles:a,unstyled:o,"data-checked":(R??D)||void 0,variant:g,ref:b,mod:w,attributes:T,...P,...v,children:(0,G.jsxs)(Y,{...j(`inner`),mod:{"label-position":d},children:[(0,G.jsx)(Y,{...j(`radio`,{focusable:!0,variant:g}),...F,...te,component:`input`,mod:{error:!!p,"with-error-styles":E},id:I,type:`radio`,readOnly:O,"aria-describedby":L,onClick:e=>{O&&te.checked===void 0&&e.preventDefault(),k?.(e)}}),(0,G.jsx)(y,{...j(`icon`),"aria-hidden":!0})]})})});jh.classes=Oh,jh.varsResolver=Ah,jh.displayName=`@mantine/core/Radio`,jh.Group=vh,jh.Card=Ch,jh.Indicator=Dh;function Mh({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,C.useState)(n),a=(0,C.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=cc({placement:t,middleware:[gs({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,C.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,C.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=ia(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var Nh={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},Ph={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:N(`popover`)},Fh=W((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:L(t),"--tooltip-bg":n?$t(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),Ih=J(e=>{let t=K(`TooltipFloating`,Ph,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:w,...T}=t,E=In(),D=q({name:`TooltipFloating`,props:t,classes:Nh,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:Fh}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:M,floating:N,setOpened:ee}=Mh({offset:p,position:m,defaultOpened:v}),P=Nt(n);if(!P)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let F=Je(M,Ot(P),w),I=P.props,L=e=>{I.onMouseEnter?.(e),O(e),ee(!0)},R=e=>{I.onMouseLeave?.(e),ee(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Jc,{...x,withinPortal:i,children:(0,G.jsx)(Y,{...T,...D(`tooltip`,{style:{...Wr(a,E),zIndex:g,display:!_&&j?`block`:`none`,top:Number.isFinite(A)?Math.round(A):``,left:Number.isFinite(k)?Math.round(k):``}}),variant:y,ref:N,mod:{multiline:h},children:f})}),(0,C.cloneElement)(P,{...I,[r]:F,onMouseEnter:L,onMouseLeave:R})]})});Ih.classes=Nh,Ih.varsResolver=Fh,Ih.displayName=`@mantine/core/TooltipFloating`;var Lh=(0,C.createContext)({withinGroup:!1}),Rh={openDelay:0,closeDelay:0};function zh(e){let{openDelay:t,closeDelay:n,children:r}=K(`TooltipGroup`,Rh,e);return(0,G.jsx)(Lh,{value:{withinGroup:!0},children:(0,G.jsx)($s,{delay:{open:t,close:n},children:r})})}zh.displayName=`@mantine/core/TooltipGroup`,zh.extend=e=>e;function Bh(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Vh(e){let t=Bh(e.middlewares),n=[hs(e.offset),bs()];return t.shift&&n.push(gs(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?vs():vs(t.flip)),n.push(Ss({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?xs():xs(t.inline)):e.inline&&n.push(xs()),n}function Hh(e){let[t,n]=(0,C.useState)(e.defaultOpened),r=typeof e.opened==`boolean`,i=!e.disabled&&(r?e.opened:t);(0,C.useEffect)(()=>{e.disabled&&n(!1)},[e.disabled]);let a=(0,C.use)(Lh).withinGroup,o=Re(),s=bn(),c=(0,C.useCallback)(e=>{n(e),e&&y(o)},[o]),{x:l,y:u,context:d,refs:f,placement:p,middlewareData:{arrow:{x:m,y:h}={},hide:g}}=cc({strategy:e.strategy,placement:e.position,open:i,onOpenChange:c,middleware:Vh(e),whileElementsMounted:Zo}),{delay:_,currentId:v,setCurrentId:y}=ec(d,{id:o}),{getReferenceProps:b,getFloatingProps:x}=fc([Ys(d,{enabled:!e.disabled&&e.events?.hover,delay:a?_:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?vc():null}),uc(d,{enabled:!e.disabled&&e.events?.focus,visibleOnly:!0}),mc(d,{role:`tooltip`}),oc(d,{enabled:e.opened===void 0})]),S=(0,C.useRef)(p);H(()=>{S.current!==p&&(S.current=p,e.onPositionChange?.(p))},[p]);let w=i&&v&&v!==o;return{x:l,y:u,arrowX:m,arrowY:h,reference:f.setReference,floating:f.setFloating,getFloatingProps:x,getReferenceProps:b,isGroupPhase:w,opened:i,placement:p,referenceHidden:e.hideDetached&&s!==`test`?g?.referenceHidden:!1}}var Uh={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:N(`popover`),middlewares:{flip:!0,shift:!0,inline:!1},hideDetached:!0},Wh=W((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:L(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),Gh=J(e=>{let t=K(`Tooltip`,Uh,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,offset:T,transitionProps:E,multiline:D,events:O,interactive:k,zIndex:A,disabled:j,onClick:M,onMouseEnter:N,onMouseLeave:ee,inline:P,variant:F,keepMounted:I,vars:L,portalProps:R,mod:te,floatingStrategy:ne,middlewares:re,autoContrast:ie,attributes:ae,target:oe,hideDetached:se,ref:ce,...le}=t,{dir:z}=ri(),B=(0,C.useRef)(null),V=Hh({position:Rc(z,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,disabled:j,events:O,interactive:k,arrowRef:B,arrowOffset:x,offset:typeof T==`number`?T+(y?b/2:0):T,inline:P,strategy:ne,middlewares:re,hideDetached:se});(0,C.useEffect)(()=>{let e=oe instanceof HTMLElement?oe:typeof oe==`string`?document.querySelector(oe):oe?.current||null;e&&V.reference(e)},[oe,V]);let ue=q({name:`Tooltip`,props:t,classes:Nh,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ae,rootSelector:`tooltip`,vars:L,varsResolver:Wh}),H=Nt(n);if(!oe&&!H)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let de=ue(`tooltip`),fe=k&&!j&&!!V.opened,pe=w===`merge`&&y?Ic({position:V.placement,dir:z}):void 0;if(oe){let e=nl(E,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(Jc,{...R,withinPortal:d,children:(0,G.jsx)(el,{...e,keepMounted:I,mounted:!j&&!!V.opened,duration:V.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(Y,{...le,"data-fixed":ne===`fixed`||void 0,variant:F,mod:[{multiline:D,interactive:fe},te],...de,...V.getFloatingProps({ref:V.floating,className:de.className,style:{...de.style,...e,...pe,zIndex:A,top:V.y??0,left:V.x??0,...V.referenceHidden?{display:`none`}:null}}),children:[a,(0,G.jsx)(Lc,{ref:B,arrowX:V.arrowX,arrowY:V.arrowY,visible:y,position:V.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,...ue(`arrow`)})]})})})})}let me=H.props,he=Je(V.reference,Ot(H),ce),ge=nl(E,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Jc,{...R,withinPortal:d,children:(0,G.jsx)(el,{...ge,keepMounted:I,mounted:!j&&!!V.opened,duration:V.isGroupPhase?10:ge.duration,children:e=>(0,G.jsxs)(Y,{...le,"data-fixed":ne===`fixed`||void 0,variant:F,mod:[{multiline:D,interactive:fe},te],...V.getFloatingProps({ref:V.floating,className:ue(`tooltip`).className,style:{...ue(`tooltip`).style,...e,...pe,zIndex:A,top:V.y??0,left:V.x??0,...V.referenceHidden?{display:`none`}:null}}),children:[a,(0,G.jsx)(Lc,{ref:B,arrowX:V.arrowX,arrowY:V.arrowY,visible:y,position:V.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,...ue(`arrow`)})]})})}),(0,C.cloneElement)(H,V.getReferenceProps({onClick:M,onMouseEnter:N,onMouseLeave:ee,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...me,className:Ft(v,me.className),[i]:he}))]})});Gh.classes=Nh,Gh.varsResolver=Wh,Gh.displayName=`@mantine/core/Tooltip`,Gh.Floating=Ih,Gh.Group=zh;var Kh={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},qh={withItemsBorders:!0},Jh=W((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:L(t),"--sc-color":n?$t(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":F(i,`sc-padding`),"--sc-font-size":R(i)}})),Yh=Jr(e=>{let t=K(`SegmentedControl`,qh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:w,withItemsBorders:T,mod:E,attributes:D,ref:O,...k}=t,A=q({name:`SegmentedControl`,props:t,classes:Kh,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:Jh}),j=In(),M=c.map(e=>kt(e)?{label:`${e}`,value:e}:e),N=pt(),[ee,P]=(0,C.useState)(0),[F,I]=(0,C.useState)(null),[L,R]=(0,C.useState)({}),te=(e,t)=>{e!==null&&L[t]!==e&&(L[t]=e,R({...L}))},[ne,re]=Ye({value:l,defaultValue:u,finalValue:Array.isArray(c)?M.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ie=Re(p),ae=M.map(e=>`${e.value}`),oe=M.map(e=>(0,C.createElement)(Y,{...A(`control`),mod:{active:ne===e.value,orientation:_},key:`${e.value}`},(0,C.createElement)(`input`,{...A(`input`),disabled:m||e.disabled,type:`radio`,name:ie,value:`${e.value}`,id:`${ie}-${e.value}`,checked:ne===e.value,onChange:()=>!h&&re(e.value),"data-focus-ring":j.focusRing,key:`${e.value}-input`}),(0,C.createElement)(Y,{component:`label`,...A(`label`),mod:{active:ne===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ie}-${e.value}`,ref:t=>te(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:sn({color:y,theme:j,autoContrast:w})},key:`${e.value}-label`},(0,G.jsx)(`span`,{...A(`innerLabel`),children:e.label})))),se=Je(O,I);return nt(()=>{P(e=>e+1)},[c.length]),nt(()=>{R(e=>{let t={};return ae.forEach(n=>{n in e&&(t[n]=e[n])}),Object.keys(t).length===Object.keys(e).length?e:t})},[ae]),c.length===0?null:(0,G.jsxs)(Y,{...A(`root`),variant:S,size:f,ref:se,mod:[{"full-width":g,orientation:_,initialized:N,"with-items-borders":T},E],...k,role:`radiogroup`,"data-disabled":m,children:[ne!==void 0&&(0,G.jsx)(Gd,{target:L[`${ne}`],parent:F,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...A(`indicator`)},ee),oe]})});Yh.classes=Kh,Yh.varsResolver=Jh,Yh.displayName=`@mantine/core/SegmentedControl`;var Xh={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},Zh=Jr(e=>{let t=K([`Input`,`InputWrapper`,`Select`],Xh,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,searchable:A,rightSection:j,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:ee,nothingFoundMessage:P,name:F,form:I,searchValue:L,defaultSearchValue:R,onSearchChange:te,allowDeselect:ne,error:re,rightSectionPointerEvents:ie,id:ae,clearable:oe,clearSectionMode:se,clearButtonProps:ce,hiddenInputProps:le,renderOption:z,onClear:B,autoComplete:V,scrollAreaProps:ue,__defaultRightSection:H,__clearSection:de,__clearable:fe,chevronColor:pe,autoSelectOnBlur:me,openOnFocus:he,attributes:ge,..._e}=t,ve=(0,C.useMemo)(()=>rf(m),[m]),ye=(0,C.useRef)({}),U=(0,C.useMemo)(()=>af(ve),[ve]),be=Re(ae),xe=fp({id:be,label:_e.label,labelProps:_e.labelProps,inputWrapperOrder:_e.inputWrapperOrder}),[Se,Ce,we]=Ye({value:h,defaultValue:g,finalValue:null,onChange:p}),Te=Se==null?void 0:`${Se}`in U?U[`${Se}`]:ye.current[`${Se}`],Ee=dt(Te),[De,Oe,ke]=Ye({value:L,defaultValue:R,finalValue:Te?Te.label:``,onChange:te}),Ae=Nf({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?Ae.selectFirstOption():Ae.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(Ae.resetSelectedOption,0)}}),je=e=>{Oe(e),Ae.resetSelectedOption()},{resolvedClassNames:Me,resolvedStyles:Ne}=Qn({props:t,styles:r,classNames:n});(0,C.useEffect)(()=>{_&&Ae.selectFirstOption()},[_,De]),(0,C.useEffect)(()=>{h===null&&je(``),h!=null&&Te&&(Ee?.value!==Te.value||Ee?.label!==Te.label)&&je(Te.label)},[h,Te]),(0,C.useEffect)(()=>{!we&&!ke&&je(Se==null?``:`${Se}`in U?U[`${Se}`]?.label:ye.current[`${Se}`]?.label||``)},[U,Se]),(0,C.useEffect)(()=>{Se&&`${Se}`in U&&(ye.current[`${Se}`]=U[`${Se}`])},[U,Se]);let Pe=(0,G.jsx)(If.ClearButton,{...ce,onClear:()=>{Ce(null,null),je(``),B?.()}}),Fe=oe&&Se!=null&&!S&&!x;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(If,{store:Ae,__staticSelector:`Select`,classNames:Me,styles:Ne,unstyled:i,readOnly:x,size:k,attributes:ge,floatingHeight:O,keepMounted:me,onOptionSubmit:e=>{y?.(e);let t=ne&&`${U[e].value}`==`${Se}`?null:U[e],n=t?t.value:null;n!==Se&&Ce(n,t),!we&&je(n==null?``:t?.label||``),Ae.closeDropdown()},...b,children:[(0,G.jsx)(If.Target,{targetType:A?`input`:`button`,autoComplete:V,withExpandedAttribute:!0,children:(0,G.jsx)(Bd,{id:be,__defaultRightSection:(0,G.jsx)(If.Chevron,{size:k,error:re,unstyled:i,color:pe}),__clearSection:Pe,__clearable:Fe,__clearSectionMode:se,rightSection:j,rightSectionPointerEvents:ie||`none`,..._e,size:k,__staticSelector:`Select`,disabled:S,readOnly:x||!A,value:De,onChange:e=>{if(Ip(e)){if(!x){let t=Zm(U,e.currentTarget.value);t&&`${t.value}`!=`${Se}`&&(Ce(t.value,t),!we&&je(t.label))}}else je(e.currentTarget.value),Ae.openDropdown(),_&&Ae.selectFirstOption()},onFocus:e=>{he&&A&&Ae.openDropdown(),u?.(e)},onBlur:e=>{me&&Ae.clickSelectedOption(),Ae.closeDropdown();let t=Se!=null&&(`${Se}`in U?U[`${Se}`]:ye.current[`${Se}`]);je(t&&t.label||``),d?.(e)},onClick:e=>{A?Ae.openDropdown():Ae.toggleDropdown(),f?.(e)},classNames:Me,styles:Ne,unstyled:i,pointer:!A,error:re,attributes:ge})}),(0,G.jsx)(dp,{data:ve,hidden:x||S,filter:w,search:De,limit:T,hiddenWhenEmpty:!P,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!A&&Te?.label!==De,value:Se,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:ee,nothingFoundMessage:P,unstyled:i,labelId:xe,"aria-label":xe?void 0:_e[`aria-label`],renderOption:z,scrollAreaProps:ue})]}),(0,G.jsx)(If.HiddenInput,{value:Se,name:F,form:I,disabled:S,...le})]})});Zh.classes={...Bd.classes,...If.classes},Zh.displayName=`@mantine/core/Select`;var Qh={root:`m_6d731127`},$h={gap:`md`,align:`stretch`,justify:`flex-start`},eg=W((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":I(t),"--stack-align":n,"--stack-justify":r}})),tg=J(e=>{let t=K(`Stack`,$h,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t,m=q({name:`Stack`,props:t,classes:Qh,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:eg});return(0,G.jsx)(Y,{...m(`root`),variant:d,...p})});tg.classes=Qh,tg.varsResolver=eg,tg.displayName=`@mantine/core/Stack`;var[ng,rg]=T(`Table component was not found in the tree`),ig={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function ag(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function og(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=J(r=>{let i=K(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=rg();return(0,G.jsx)(Y,{component:e,...ag(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=ig,r}var sg=og(`th`,{columnBorder:!0}),cg=og(`td`,{columnBorder:!0}),lg=og(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),ug=og(`thead`,{stickyHeader:!0}),dg=og(`tbody`),fg=og(`tfoot`),pg=og(`caption`,{captionSide:!0}),mg={type:`scrollarea`},hg=W((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":_(t),"--table-max-height":_(n),"--table-overflow":r===`native`?`auto`:void 0}})),gg=J(e=>{let t=K(`TableScrollContainer`,mg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=q({name:`TableScrollContainer`,classes:ig,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:hg,rootSelector:`scrollContainer`});return(0,G.jsx)(Y,{component:d===`scrollarea`?xc:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});gg.classes=ig,gg.varsResolver=hg,gg.displayName=`@mantine/core/TableScrollContainer`;function _g({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(pg,{children:e.caption}),e.head&&(0,G.jsx)(ug,{children:(0,G.jsx)(lg,{children:e.head.map((e,t)=>(0,G.jsx)(sg,{children:e},t))})}),e.body&&(0,G.jsx)(dg,{children:e.body.map((e,t)=>(0,G.jsx)(lg,{children:e.map((e,t)=>(0,G.jsx)(cg,{children:e},t))},t))}),e.foot&&(0,G.jsx)(fg,{children:(0,G.jsx)(lg,{children:e.foot.map((e,t)=>(0,G.jsx)(sg,{children:e},t))})})]})}_g.displayName=`@mantine/core/TableDataRenderer`;var vg={withRowBorders:!0,verticalSpacing:7},yg=W((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":I(r),"--table-vertical-spacing":I(i),"--table-border-color":a?$t(a,e):void 0,"--table-striped-color":c&&o?$t(o,e):void 0,"--table-highlight-on-hover-color":l&&s?$t(s,e):void 0,"--table-sticky-header-offset":d?_(u):void 0}})),bg=J(e=>{let t=K(`Table`,vg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:w,mod:T,tabularNums:E,attributes:D,...O}=t,k=q({name:`Table`,props:t,className:r,style:i,classes:ig,classNames:n,styles:a,unstyled:o,attributes:D,rootSelector:`table`,vars:s,varsResolver:yg,stable:!0}),A=p===!0?`odd`:p||void 0,j=u||`bottom`,M=(0,C.useMemo)(()=>({getStyles:k,stickyHeader:S,striped:A,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:j}),[k,S,A,m,h,g,j]);return(0,G.jsx)(ng,{value:M,children:(0,G.jsx)(Y,{component:`table`,mod:[{withTableBorder:_,tabularNums:E},T],...k(`table`),...O,children:x||!!b&&(0,G.jsx)(_g,{data:b})})})});bg.classes=ig,bg.varsResolver=yg,bg.displayName=`@mantine/core/Table`,bg.Td=cg,bg.Th=sg,bg.Tr=lg,bg.Thead=ug,bg.Tbody=dg,bg.Tfoot=fg,bg.Caption=pg,bg.ScrollContainer=gg,bg.DataRenderer=_g;var[xg,Sg]=T(`Tabs component was not found in the tree`),Cg={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},wg=J(e=>{let t=K(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=Sg();return(0,G.jsx)(Y,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});wg.classes=Cg,wg.displayName=`@mantine/core/TabsList`;var Tg=J(e=>{let t=K(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=bn(),f=Sg();(0,C.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,G.jsx)(C.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,G.jsx)(Y,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});Tg.classes=Cg,Tg.displayName=`@mantine/core/TabsPanel`;var Eg=J(e=>{let t=K(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=In(),{dir:y}=ri(),b=Sg(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,G.jsxs)(Tc,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?$t(u,v):void 0},onKeyDown:j({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,G.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});Eg.classes=Cg,Eg.displayName=`@mantine/core/TabsTab`;var Dg=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,Og={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},kg=W((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":L(t),"--tabs-color":$t(n,e),"--tabs-text-color":un(r,e)?sn({color:n,theme:e,autoContrast:r}):void 0}})),Ag=J(e=>{let t=K(`Tabs`,Og,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:w,autoContrast:T,mod:D,attributes:O,...k}=t,A=Re(c),j=(0,C.useRef)(new Set),M=Le(),N=(0,C.useCallback)((e,t)=>{let n=j.current;t&&!n.has(e)?(n.add(e),M()):!t&&n.has(e)&&(n.delete(e),M())},[]),[ee,P]=Ye({value:r,defaultValue:n,finalValue:null,onChange:i}),F=q({name:`Tabs`,props:t,classes:Cg,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:O,vars:w,varsResolver:kg});return(0,G.jsx)(xg,{value:{placement:h,value:ee,orientation:a,id:A,loop:s,activateTabWithKeyboard:l,getTabId:E(`${A}-tab`,Dg),getPanelId:E(`${A}-panel`,Dg),onChange:P,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:F,mountedPanels:j,setMountedPanel:N},children:(0,G.jsx)(Y,{id:A,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},D],...F(`root`),...k,children:o})})});Ag.classes=Cg,Ag.varsResolver=kg,Ag.displayName=`@mantine/core/Tabs`,Ag.Tab=Eg,Ag.Panel=Tg,Ag.List=wg;var jg=J(e=>{let t=K([`Input`,`InputWrapper`,`TextInput`],null,e);return(0,G.jsx)(Bd,{component:`input`,...t,__staticSelector:`TextInput`})});jg.classes=Bd.classes,jg.displayName=`@mantine/core/TextInput`;var Mg=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Ng=[`xs`,`sm`,`md`,`lg`,`xl`];function Pg(e,t){let n=t===void 0?`h${e}`:t;return Mg.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:Ng.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:_(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var Fg={root:`m_8a5d1357`},Ig={order:1},Lg=W((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=Pg(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),Rg=J(e=>{let t=K(`Title`,Ig,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=q({name:`Title`,props:t,classes:Fg,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:Lg});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(Y,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,lineClamp:typeof d==`number`},p],size:l,...h}):null});Rg.classes=Fg,Rg.varsResolver=Lg,Rg.displayName=`@mantine/core/Title`;function zg(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function Bg(e){return(0,C.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}var Vg=0;function Hg(e,t,n){let r=[],i=[],a=new Map;for(let n of e){let e=n.position||t,r=a.get(e);r?r.push(n):a.set(e,[n])}for(let e of a.values())e.sort((e,t)=>(t.priority??0)-(e.priority??0)||(e.__sequence??0)-(t.__sequence??0)),e.forEach((e,t)=>{t<n?i.push(e):r.push(e)});return{notifications:i,queue:r}}var Ug=zg({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),Wg=(e=Ug)=>Bg(e);function Gg(e,t){let n=e.getState(),r=t([...n.notifications,...n.queue]);for(let e of r)e.__sequence===void 0&&(e.__sequence=Vg,Vg+=1);let i=Hg(r,n.defaultPosition,n.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function Kg(e,t=Ug){let n=e.id||ae();return Gg(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function qg(e,t=Ug){return Gg(t,t=>t.filter(t=>t.id!==e||(t.onClose?.(t),!1))),e}function Jg(e,t=Ug){return Gg(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function Yg(e,t){return typeof e==`function`?e(t):e}function Xg(e,t){let n=t.getState();return[...n.notifications,...n.queue].some(t=>t.id===e.id)?Jg(e,t):Kg(e,t)}var Zg=new WeakMap;function Qg(e,t,n=Ug){let r=t.id||ae(),i=Zg.get(n)||new Map,a={};Zg.set(n,i),i.set(r,a),Xg({loading:!0,autoClose:!1,...t.loading,id:r},n);let o=e=>{i.get(r)===a&&(i.delete(r),Xg({...t.loading,loading:!1,autoClose:void 0,...e,id:r},n))};return e.then(e=>o({color:`teal`,...Yg(t.success,e)}),e=>o({color:`red`,...Yg(t.error,e)})),e}function $g(e=Ug){Gg(e,()=>[])}function e_(e=Ug){let{defaultPosition:t,limit:n}=e.getState();Gg(e,e=>Hg(e,t,n).notifications)}var t_={show:Kg,hide:qg,update:Jg,promise:Qg,clean:$g,cleanQueue:e_,updateState:Gg},n_=[`bottom-center`,`bottom-left`,`bottom-right`,`top-center`,`top-left`,`top-right`];function r_(e,t){return e.reduce((e,n)=>(e[n.position||t].push(n),e),n_.reduce((e,t)=>(e[t]=[],e),{}))}var i_={left:`translateX(-100%)`,right:`translateX(100%)`,"top-center":`translateY(-100%)`,"bottom-center":`translateY(100%)`},a_={left:`translateX(0)`,right:`translateX(0)`,"top-center":`translateY(0)`,"bottom-center":`translateY(0)`};function o_({state:e,maxHeight:t,position:n,transitionDuration:r}){let[i,a]=n.split(`-`),o=a===`center`?`${i}-center`:a,s={opacity:0,maxHeight:t,transform:i_[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear`,transitionProperty:`opacity, transform, max-height`},c={opacity:1,transform:a_[o]},l={opacity:0,maxHeight:0,transform:i_[o]},u={entering:c,entered:c,exiting:l,exited:l};return{...s,...u[e]}}function s_(e,t){return typeof t==`number`?t:t===!1||e===!1?!1:e}var c_=120,l_=4,u_=new Set([`classNames`,`styles`,`unstyled`,`vars`,`attributes`,`variant`,`color`,`radius`,`icon`,`title`,`loading`,`withBorder`,`withCloseButton`,`closeButtonProps`,`className`,`style`,`role`,`ref`,`children`,`mod`]);function d_(e){let{rest:t}=br(e);return Object.fromEntries(Object.entries(t).filter(([e,t])=>!u_.has(e)&&t!==void 0))}function f_({data:e,onHide:t,autoClose:n,transitionDuration:r,allowDragDismiss:i,allowScrollDismiss:a,paused:o,withAutoCloseProgress:s,progressProps:c,onHoverStart:l,onHoverEnd:u,onExpandRequest:d,ref:f,style:p,renderNotification:m,layout:h,stackIndex:g,stackSize:_,stackPosition:v,stackExpanded:y,stackExpandedOffset:b,transitionState:x,...S}){let[w,T]=(0,C.useState)(0),[E,D]=(0,C.useState)(!1),[O,k]=(0,C.useState)(1),[A,j]=(0,C.useState)(!1),M=In(),{autoClose:N,message:ee,allowClose:P,position:F,style:I,withCloseButton:L,renderNotification:R,onOpen:te,priority:ne,withAutoCloseProgress:re,__sequence:ie,...ae}=e,oe=s_(n,e.autoClose),[se,ce]=(0,C.useState)({running:!1,cycle:0}),le=(e.withAutoCloseProgress??s)&&typeof oe==`number`,z=(0,C.useRef)(-1),B=(0,C.useRef)(-1),V=(0,C.useRef)(-1),ue=(0,C.useRef)(null),H=(0,C.useRef)(!1),de=(0,C.useRef)(!1),pe=(0,C.useRef)(!1),me=(0,C.useRef)(0),he=P===!1,ge=()=>{let e=H.current||de.current;e&&!pe.current?(pe.current=!0,l?.()):!e&&pe.current&&(pe.current=!1,u?.())},_e=(0,C.useEffectEvent)(()=>{pe.current&&(pe.current=!1,u?.())});(0,C.useEffect)(()=>()=>_e(),[]);let ve=()=>{window.clearTimeout(z.current),ce(e=>e.running?{...e,running:!1}:e)},ye=()=>window.clearTimeout(B.current),U=()=>window.clearTimeout(V.current),be=e=>{me.current=e,T(e)},xe=()=>{t(e.id),ve(),ye(),U()},Se=(0,C.useRef)(o);(0,C.useEffect)(()=>{Se.current=o});let Ce=()=>{E||Ae||H.current||de.current||Se.current||typeof oe!=`number`||(ve(),z.current=window.setTimeout(xe,oe),ce(e=>({running:!0,cycle:e.cycle+1})))},we=e=>e*((ue.current?.offsetWidth??440)+40),Te=(e,t)=>{let n=ue.current?.offsetWidth??440;return Math.abs(e)>n*.35||t>.5},Ee=()=>{U(),j(!1),be(0)},De=e=>{k(e),D(!0),j(!1),be(we(e)),ve(),ye(),U(),B.current=window.setTimeout(xe,r)},Oe=()=>{U(),V.current=window.setTimeout(()=>{j(!1),be(0),Ce()},c_)},{ref:ke,active:Ae}=Et(e=>{if(!E){if(e.first&&ve(),e.last){if(e.tap||e.canceled){be(0),Ce();return}let t=e.movement[0],n=t===0?e.direction[0]===-1?-1:1:t>0?1:-1;Te(t,e.velocity[0])?De(n):(be(0),Ce())}else be(e.movement[0])}},{axis:`x`,threshold:5,filterTaps:!0,enabled:i&&!he&&!E}),je=Je(f,ue,ke),Me=Wr(p,M),Ne=Wr(I,M),Pe={...Me,...Ne},Fe=typeof Pe.opacity==`number`?Pe.opacity:1,Ie=E?0:1-Math.min(Math.abs(w)/200,1)*.6,Le=Pe.transitionDuration??`${r}ms, ${r}ms, ${r}ms`,Re=h===`stacked`,ze=Re&&g!==void 0&&g>0,Be=ze&&!y,Ve=x===`exiting`||x===`exited`,He=v?.startsWith(`top`)?1:-1,Ue=Math.min(g??0,l_),We=Be?Ue*10*He:0,Ge=Re?(g||0)*30:0,Ke=Ae||A,qe=()=>Re?Ve?`translateY(${y?b||0:We}px) var(--notifications-state-transform) translate3d(var(--notifications-swipe-offset), 0, 0)`:y?`translateY(${b||0}px) translate3d(var(--notifications-swipe-offset), 0, 0)`:ze?`scale(${1-Ue*.03}) translateY(${We}px)`:`var(--notifications-state-transform) translate3d(var(--notifications-swipe-offset), 0, 0)`:`var(--notifications-state-transform) translate3d(var(--notifications-swipe-offset), 0, 0)`,Ye={...Pe,...Re?{maxHeight:void 0}:{},"--notifications-state-transform":typeof Pe.transform==`string`?Pe.transform:`translateX(0)`,"--notifications-state-opacity":String(Fe),"--notifications-swipe-offset":`${w}px`,"--notifications-swipe-opacity":String(Ie),transform:qe(),opacity:`calc(var(--notifications-state-opacity) * var(--notifications-swipe-opacity))`,transitionDuration:Ke?`0ms, 0ms, 0ms`:Le,cursor:`default`,touchAction:`pan-y`,...Re?{gridArea:`1 / 1`,zIndex:(_||5)-(g??0),pointerEvents:Be?`none`:void 0,alignSelf:He===1?`start`:`end`,transitionProperty:Ke?`none`:`transform, opacity`,transitionDuration:`${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), ease`,transitionDelay:Ke||Ve?`0ms`:`${Ge}ms`}:{}},Xe=()=>{H.current=!0,ve(),ge()},Ze=()=>{H.current=!1,A||(Ee(),Ce()),ge()},Qe=Re?()=>{de.current=!0,ve(),ge()}:void 0,$e=Re?()=>{de.current=!1,A||Ce(),ge()}:void 0,et=e=>{Re&&(e.pointerType===`touch`||e.pointerType===`pen`)&&d?.()},tt=(0,C.useEffectEvent)(e=>{if(E||Ae)return;let t=e.currentTarget===document;if(!t&&!H.current)return;let{deltaX:n,deltaY:r}=e;if(Math.abs(n)<=Math.abs(r)||n===0||!a||he)return;t||(e.preventDefault(),e.stopPropagation()),ve(),j(!0);let i=me.current-n,o=i>0?1:-1;Te(i,0)?De(o):(be(i),Oe())});(0,C.useEffect)(()=>{if(A)return document.addEventListener(`wheel`,tt,{passive:!1}),()=>document.removeEventListener(`wheel`,tt,{passive:!1})},[A]),(0,C.useEffect)(()=>{let e=()=>{E&&be(we(O))};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[O,E]),(0,C.useEffect)(()=>{let e=ue.current;if(e)return e.addEventListener(`wheel`,tt,{passive:!1}),()=>e.removeEventListener(`wheel`,tt,{passive:!1})},[]),(0,C.useEffect)(()=>()=>{ye(),U()},[]),(0,C.useEffect)(()=>{e.onOpen?.(e)},[]);let nt=(0,C.useRef)(x);(0,C.useEffect)(()=>{let t=nt.current===`exiting`;nt.current=x,x===`entering`&&t&&(ye(),E?(D(!1),j(!1),be(0)):Ce(),e.onOpen?.(e))},[x]),(0,C.useEffect)(()=>(Ce(),ve),[oe,Ae,E]),fe(()=>{le&&Ce()},[le]),(0,C.useEffect)(()=>(o?ve():Ce(),ve),[o]);let rt={...S,...ae},it={style:Ye,inert:Be,onMouseEnter:e=>{rt.onMouseEnter?.(e),Xe()},onMouseLeave:e=>{rt.onMouseLeave?.(e),Ze()},onFocusCapture:e=>{rt.onFocusCapture?.(e),Qe?.()},onBlurCapture:e=>{rt.onBlurCapture?.(e),$e?.()},onPointerDownCapture:e=>{rt.onPointerDownCapture?.(e),et(e)}};if(m){let t=[S.className,ae.className].filter(Boolean).join(` `);return(0,G.jsx)(`div`,{ref:je,role:ae.role||S.role||`alert`,...d_(rt),className:t||void 0,...it,children:m(e)})}return(0,G.jsxs)(th,{ref:je,...S,...ae,...it,withCloseButton:!he&&L,onClose:xe,children:[ee,le&&(0,G.jsx)(`div`,{"aria-hidden":!0,...c,"data-paused":!se.running||void 0,style:{...c.style,"--notifications-progress-duration":`${oe}ms`}},se.cycle)]})}f_.displayName=`@mantine/notifications/NotificationContainer`;var p_={root:`m_b37d9ac7`,notification:`m_5ed0edd0`,progress:`m_836192`,"notifications-progress":`m_5f780017`,"notifications-progress-fade-in":`m_bb245a60`};function m_(){return m_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m_.apply(null,arguments)}function h_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function g_(e,t){return g_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g_(e,t)}function __(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,g_(e,t)}var v_={disabled:!1},y_=C.createContext(null),b_=function(e){return e.scrollTop},x_=`unmounted`,S_=`exited`,C_=`entering`,w_=`entered`,T_=`exiting`,E_=function(e){__(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=S_,r.appearStatus=C_):o=w_:o=t.unmountOnExit||t.mountOnEnter?x_:S_,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:S_}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=C_):(n===`entering`||n===`entered`)&&(t=T_)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ss.default.findDOMNode(this);n&&b_(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:x_})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[ss.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;!e&&!n||v_.disabled?this.safeSetState({status:w_},function(){t.props.onEntered(a)}):(this.props.onEnter(a,o),this.safeSetState({status:C_},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:w_},function(){t.props.onEntered(a,o)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ss.default.findDOMNode(this);!t||v_.disabled?this.safeSetState({status:S_},function(){e.props.onExited(r)}):(this.props.onExit(r),this.safeSetState({status:T_},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:S_},function(){e.props.onExited(r)})})}))},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ss.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r)setTimeout(this.nextCallback,0);else{if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)}},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=h_(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return C.createElement(y_.Provider,{value:null},typeof n==`function`?n(e,r):C.cloneElement(C.Children.only(n),r))},t}(C.Component);E_.contextType=y_,E_.propTypes={};function D_(){}E_.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:D_,onEntering:D_,onEntered:D_,onExit:D_,onExiting:D_,onExited:D_},E_.UNMOUNTED=x_,E_.EXITED=S_,E_.ENTERING=C_,E_.ENTERED=w_,E_.EXITING=T_;function O_(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function k_(e,t){var n=function(e){return t&&(0,C.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&C.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function A_(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function j_(e,t,n){return n[t]==null?e.props[t]:n[t]}function M_(e,t){return k_(e.children,function(n){return(0,C.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:j_(n,`appear`,e),enter:j_(n,`enter`,e),exit:j_(n,`exit`,e)})})}function N_(e,t,n){var r=k_(e.children),i=A_(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,C.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,C.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,C.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:j_(o,`exit`,e),enter:j_(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,C.cloneElement)(o,{in:!1}):c&&s&&(0,C.isValidElement)(l)&&(i[a]=(0,C.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:j_(o,`exit`,e),enter:j_(o,`enter`,e)}))}}),i}var P_=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},F_={component:`div`,childFactory:function(e){return e}},I_=function(e){__(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(O_(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?M_(e,r):N_(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=k_(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=m_({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=h_(e,[`component`,`childFactory`]),i=this.state.contextValue,a=P_(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?C.createElement(y_.Provider,{value:i},a):C.createElement(y_.Provider,{value:i},C.createElement(t,r,a))},t}(C.Component);I_.propTypes={},I_.defaultProps=F_;var L_=E_,R_=16,z_=80,B_={position:`bottom-right`,autoClose:4e3,transitionDuration:250,allowDragDismiss:!0,allowScrollDismiss:!0,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:N(`overlay`),store:Ug,withinPortal:!0,pauseResetOnHover:`all`,layout:`default`,withAutoCloseProgress:!1},V_=W((e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":_(n)}})),H_=J(e=>{let t=K(`Notifications`,B_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,position:l,autoClose:u,transitionDuration:d,allowDragDismiss:f,allowScrollDismiss:p,containerWidth:m,notificationMaxHeight:h,limit:g,zIndex:_,store:v,portalProps:y,withinPortal:b,pauseResetOnHover:x,renderNotification:S,layout:w,withAutoCloseProgress:T,...E}=t,D=In(),O=Wg(v),k=Le(),A=Xe(),j=(0,C.useRef)({}),M=(0,C.useRef)(0),[N,ee]=(0,C.useState)({}),[P,F]=(0,C.useState)({}),[I,L]=(0,C.useState)({}),[R,te]=(0,C.useState)(null),ne=(0,C.useRef)({}),re=Object.values(N).reduce((e,t)=>e+(t??0),0)+Object.values(I).filter(Boolean).length,ie=(0,C.useCallback)(e=>ee(t=>({...t,[e]:(t[e]??0)+1})),[]),ae=(0,C.useCallback)(e=>ee(t=>({...t,[e]:Math.max(0,(t[e]??0)-1)})),[]),oe=(0,C.useCallback)(e=>w===`stacked`?{onMouseEnter:()=>L(t=>({...t,[e]:!0})),onMouseLeave:()=>L(t=>({...t,[e]:!1}))}:{},[w]),se=(0,C.useCallback)(e=>te(e),[]);(0,C.useEffect)(()=>{if(w!==`stacked`)return;let e=ne.current;return n_.forEach(t=>{(N[t]??0)>0||I[t]||R===t?(window.clearTimeout(e[t]),F(e=>e[t]?e:{...e,[t]:!0})):e[t]=window.setTimeout(()=>{F(e=>e[t]?{...e,[t]:!1}:e)},200)}),()=>n_.forEach(t=>window.clearTimeout(e[t]))},[N,I,R,w]),(0,C.useEffect)(()=>{if(!R)return;let e=e=>{let t=e.target;t!==null&&Object.values(j.current).some(e=>e?.contains(t))||te(null)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[R]);let ce=r_(O.notifications,l),le=R?ce[R].length:0;(0,C.useEffect)(()=>{(w!==`stacked`||R!==null&&le===0)&&te(null)},[le,R,w]),(0,C.useEffect)(()=>{w!==`stacked`&&L(e=>Object.values(e).some(Boolean)?{}:e)},[w]);let z=(0,C.useRef)(null),B=(0,C.useRef)({}),V=(0,C.useRef)(new WeakMap),ue=(0,C.useCallback)((e,t)=>{let n=t.offsetHeight;return B.current[e]!==n&&(B.current[e]=n,!0)},[]);(0,C.useEffect)(()=>{if(w!==`stacked`||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(e=>{let t=!1;e.forEach(e=>{let n=V.current.get(e.target);n&&ue(n,e.target)&&(t=!0)}),t&&k()});return z.current=e,Object.values(j.current).forEach(t=>t&&e.observe(t)),()=>{e.disconnect(),z.current=null}},[w,k,ue]);let H=(0,C.useRef)({}),de=(0,C.useCallback)(e=>(H.current[e]||(H.current[e]=t=>{let n=j.current[e];n&&n!==t&&(z.current?.unobserve(n),V.current.delete(n)),t?(j.current[e]=t,V.current.set(t,e),ue(e,t),z.current?.observe(t)):(delete j.current[e],delete H.current[e],delete B.current[e])}),H.current[e]),[ue]),pe=D.respectReducedMotion&&A?1:d,me=q({name:`Notifications`,classes:p_,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:V_});(0,C.useEffect)(()=>{v?.updateState(e=>({...e,limit:g||5,defaultPosition:l}))},[g,l]),fe(()=>{O.notifications.length>M.current&&setTimeout(()=>k(),0),M.current=O.notifications.length},[O.notifications]);let he=n_.reduce((e,t)=>{let n=ce[t].length,r=Array(n).fill(0),i=w===`stacked`&&!!P[t],a=w===`stacked`?[...ce[t]].sort((e,t)=>(t.priority??0)-(e.priority??0)||(t.__sequence??0)-(e.__sequence??0)):ce[t];if(i&&n>0){let e=t.startsWith(`top`)?1:-1,i=0;for(let t=0;t<n;t+=1)r[t]=i*e,i+=(B.current[a[t].id]||z_)+R_}return e[t]=a.map((e,a)=>{let{style:o,...s}=e;return(0,G.jsx)(L_,{timeout:pe,onEnter:()=>j.current[s.id].offsetHeight,nodeRef:{current:j.current[s.id]},children:e=>(0,G.jsx)(f_,{ref:de(s.id),data:s,onHide:e=>qg(e,v),autoClose:u,transitionDuration:pe,allowDragDismiss:f,allowScrollDismiss:p,paused:x===`all`&&re>0||w===`stacked`&&!i&&a>0,onHoverStart:()=>ie(t),onHoverEnd:()=>ae(t),onExpandRequest:()=>se(t),renderNotification:`renderNotification`in s?s.renderNotification:S,layout:w,withAutoCloseProgress:T,progressProps:me(`progress`),stackIndex:a,stackSize:n,stackPosition:t,stackExpanded:i,stackExpandedOffset:r[a],transitionState:e,...me(`notification`,{style:{...o_({state:e,position:t,transitionDuration:pe,maxHeight:h}),...o}})})},s.id)}),e},{});return(0,G.jsxs)(Jc,{withinPortal:b,...y,children:[(0,G.jsx)(Y,{...me(`root`),"data-position":`top-center`,"data-layout":w,...E,children:(0,G.jsx)(I_,{...oe(`top-center`),children:he[`top-center`]})}),(0,G.jsx)(Y,{...me(`root`),"data-position":`top-left`,"data-layout":w,...E,children:(0,G.jsx)(I_,{...oe(`top-left`),children:he[`top-left`]})}),(0,G.jsx)(Y,{...me(`root`,{className:td.classNames.fullWidth}),"data-position":`top-right`,"data-layout":w,...E,children:(0,G.jsx)(I_,{...oe(`top-right`),children:he[`top-right`]})}),(0,G.jsx)(Y,{...me(`root`,{className:td.classNames.fullWidth}),"data-position":`bottom-right`,"data-layout":w,...E,children:(0,G.jsx)(I_,{...oe(`bottom-right`),children:he[`bottom-right`]})}),(0,G.jsx)(Y,{...me(`root`),"data-position":`bottom-left`,"data-layout":w,...E,children:(0,G.jsx)(I_,{...oe(`bottom-left`),children:he[`bottom-left`]})}),(0,G.jsx)(Y,{...me(`root`),"data-position":`bottom-center`,"data-layout":w,...E,children:(0,G.jsx)(I_,{...oe(`bottom-center`),children:he[`bottom-center`]})})]})});H_.classes=p_,H_.varsResolver=V_,H_.displayName=`@mantine/notifications/Notifications`,H_.show=t_.show,H_.hide=t_.hide,H_.update=t_.update,H_.promise=t_.promise,H_.clean=t_.clean,H_.cleanQueue=t_.cleanQueue,H_.updateState=t_.updateState;var U_=C.createContext(void 0),W_=e=>{let t=C.useContext(U_);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},G_=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(U_.Provider,{value:e,children:t})),K_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},q_=new class{#e=K_;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function J_(e){setTimeout(e,0)}var Y_=typeof window>`u`||`Deno`in globalThis;function X_(){}function Z_(e,t){return typeof e==`function`?e(t):e}function Q_(e){return typeof e==`number`&&e>=0&&e!==1/0}function $_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ev(e,t){return typeof e==`function`?e(t):e}function tv(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==rv(o,t.options))return!1}else if(!av(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function nv(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(iv(t.options.mutationKey)!==iv(a))return!1}else if(!av(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function rv(e,t){return(t?.queryKeyHashFn||iv)(e)}function iv(e){return JSON.stringify(e,(e,t)=>uv(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function av(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!av(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!av(e[r],t[r]))return!1;return!0}return!1}var ov=Object.prototype.hasOwnProperty;function sv(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=lv(e)&&lv(t);if(!r&&!(uv(e)&&uv(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ov.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=sv(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function cv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function lv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function uv(e){if(!dv(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!dv(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function dv(e){return Object.prototype.toString.call(e)===`[object Object]`}function fv(e){return new Promise(t=>{q_.setTimeout(t,e)})}function pv(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:sv(e,t)}function mv(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function hv(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var gv=Symbol();function _v(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===gv?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vv(e,t){return typeof e==`function`?e(...t):!!e}function yv(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var bv=()=>Y_,xv=()=>bv(),Sv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cv=new class extends Sv{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},wv=J_;function Tv(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=wv,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Ev=Tv(),Dv=new class extends Sv{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Ov(e){return Math.min(1e3*2**e,3e4)}function kv(e){return(e??`online`)!==`online`||Dv.isOnline()}var Av=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function jv(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(X_);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Av(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Cv.isFocused()&&(e.networkMode===`always`||Dv.isOnline())&&e.canRun(),p=()=>kv(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(xv()?0:3),a=e.retryDelay??Ov,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),fv(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var Mv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Q_(this.gcTime)&&(this.#e=q_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xv()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(q_.clearTimeout(this.#e),this.#e=void 0)}};function Nv(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{yv(e,()=>t.signal,()=>n=!0)},u=_v(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?hv:mv;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Fv:Pv,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:Pv(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Pv(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Fv(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Iv=class extends Mv{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=zv(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=zv(this.options);e.data!==void 0&&(this.setState(Rv(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=pv(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(X_).catch(X_):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>ev(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===gv||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>ev(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!$_(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=_v(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Nv(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=jv({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Av&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Av){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Lv(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Rv(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Ev.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Lv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kv(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Rv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function zv(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Bv=class extends Sv{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Hv(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Uv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Uv(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ev(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!cv(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Wv(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||ev(this.options.enabled,this.#t)!==ev(t.enabled,this.#t)||ev(this.options.staleTime,this.#t)!==ev(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ev(this.options.enabled,this.#t)!==ev(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return cv(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(X_)),t}#h(e){return!xv()&&ev(this.options.enabled,this.#t)!==!1&&Q_(e)}#g(){this.#b();let e=ev(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=$_(this.#r.dataUpdatedAt,e)+1;this.#u=q_.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return ev(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=q_.setInterval(()=>{(this.options.refetchIntervalInBackground||Cv.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(q_.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(q_.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Hv(e,t),o=i&&Wv(e,n,t,r);(a||o)&&(l={...l,...Lv(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=pv(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=pv(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Gv(e,t),refetch:this.refetch,isEnabled:ev(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),cv(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Ev.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Vv(e,t){return ev(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||ev(t.retryOnMount,e)!==!1)}function Hv(e,t){return Vv(e,t)||e.state.data!==void 0&&Uv(e,t,t.refetchOnMount)}function Uv(e,t,n){if(ev(t.enabled,e)!==!1&&ev(t.staleTime,e)!==`static`){let r=ev(n,e);return r===`always`||r!==!1&&Gv(e,t)}return!1}function Wv(e,t,n,r){return(e!==t||ev(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Gv(e,n)}function Gv(e,t){return ev(t.enabled,e)!==!1&&e.isStaleByTime(ev(t.staleTime,e))}var Kv=class extends Mv{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||qv(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=jv({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Ev.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function qv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Jv=class extends Sv{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Kv({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Yv(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Yv(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Yv(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Yv(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Ev.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>nv(t,e))}findAll(e={}){return this.getAll().filter(t=>nv(e,t))}notify(e){Ev.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Ev.batch(()=>Promise.all(e.map(e=>e.continue().catch(X_))))}};function Yv(e){return e.options.scope?.id}var Xv=class extends Sv{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),cv(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&iv(t.mutationKey)!==iv(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??qv();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Ev.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Zv=class extends Sv{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??rv(r,t),a=this.get(i);return a||(a=new Iv({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Ev.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>tv(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>tv(e,t)):t}notify(e){Ev.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ev.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ev.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Qv=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Zv,this.#t=e.mutationCache||new Jv,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Cv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Dv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ev(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Z_(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ev.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Ev.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Ev.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Ev.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(X_).catch(X_)}invalidateQueries(e,t={}){return Ev.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ev.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(X_)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(X_)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(ev(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(ev(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(X_).catch(X_)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(X_).catch(X_)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Dv.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(iv(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{av(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(iv(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{av(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=rv(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===gv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},$v=C.createContext(!1),ey=()=>C.useContext($v);$v.Provider;function ty(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ny=C.createContext(ty()),ry=()=>C.useContext(ny),iy=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?vv(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},ay=e=>{C.useEffect(()=>{e.clearReset()},[e])},oy=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||vv(n,[e.error,r])),sy=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},cy=(e,t)=>e?.suspense&&t.isPending,ly=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function uy(e,t,n){let r=ey(),i=ry(),a=W_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,sy(o),iy(o,i,s),ay(i);let[l]=C.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(C.useSyncExternalStore(C.useCallback(e=>{let t=d?l.subscribe(Ev.batchCalls(e)):X_;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),C.useEffect(()=>{l.setOptions(o)},[o,l]),cy(o,u))throw ly(o,l,i);if(oy({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function dy(e,t){return uy(e,Bv,t)}function fy(e){return e}function py(e){return e}function my(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function hy(e={},t){let n=W_(t).getMutationCache(),r=C.useRef(e),i=C.useRef(null);return i.current===null&&(i.current=my(n,e)),C.useEffect(()=>{r.current=e}),C.useSyncExternalStore(C.useCallback(e=>n.subscribe(()=>{let t=sv(i.current,my(n,r.current));i.current!==t&&(i.current=t,Ev.schedule(e))}),[n]),()=>i.current,()=>i.current)}function gy(e,t){let n=W_(t),[r]=C.useState(()=>new Xv(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);let i=C.useSyncExternalStore(C.useCallback(e=>r.subscribe(Ev.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=C.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(X_)},[r]);if(i.error&&vv(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var _y=C.useLayoutEffect;function vy(e){return e[e.length-1]}function yy(e,t){return typeof e==`function`?e(t):e}var by=Object.prototype.hasOwnProperty;function xy(e){for(let t in e)if(by.call(e,t))return!0;return!1}var Sy=()=>Object.create(null),Cy=(e,t)=>wy(e,t,!0);function wy(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(Ty(e)&&Ty(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&vy(a)!==`${o-1}`||c&&vy(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?wy(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?wy(d,o,n,r):o,i&&=u===d&&(a[l]===f||by.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?Sy():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?wy(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function Ty(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function Ey(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!Ey(a,o,n,r))return!1}return!0}if(Ty(e)&&Ty(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!Ey(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!Ey(e[a],t[a],n,r)))return!1;return i===0}return!1}var Dy=/[\x00-\x1f\x7f"<>`{}]/g;function Oy(e){return e.replace(Dy,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function ky(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Oy(t)}var Ay=[`http:`,`https:`,`mailto:`,`tel:`];function jy(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var My=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Ny(e,t){if(!e)return!1;if(My.test(e))return!0;let n=jy(e);return n?!t.has(n):!1}function Py(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=ky(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=ky(r?e.slice(r):e)}return t}function Fy(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Iy(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ly(){throw Error(`Invariant failed`)}function Ry(e){return e.replace(/\/{2,}/g,`/`)}function zy(e){return e===`/`?e:e.replace(/^\/+/,``)}function By(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function Vy(e){return By(zy(e))}function Hy(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Uy(e,t,n=`never`,r){if(t.includes(`//`)&&(t=Ry(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=Ry(e)),o=e.split(`/`);o.length>1&&vy(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(vy(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Ry(s):s)||`/`;return a&&r&&r.set(a,c),c}function Wy(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function Gy(e){return e==null||e===``}function Ky(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function qy(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&Gy(f)){if(c===`/`&&!d)continue;f=``}o+=c+Ky(s,f,r)+(d||``)}}return o+a||`/`}function Jy(e){return e?.isNotFound===!0}function Yy(){try{return sessionStorage}catch{return}}var Xy=`tsr-scroll-restoration-v1_3`,Zy=Yy();function Qy(){try{return JSON.parse(Zy?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var $y=Qy(),eb=`data-scroll-restoration-id`,tb=e=>e.state.__TSR_key||e.href;function nb(e){let t=e.getAttribute(eb);if(t)return`[${eb}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var rb=!1,ib=`window`;function ab(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function ob(e){let t=new Set;for(let n of e){if(n===ib)continue;let e=ab(n);e&&t.add(e)}return t}function sb(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||tb,a=new Set,o=e=>{let t=$y[e]||={};for(let e of a)e===document?t[ib]={scrollX,scrollY}:e.isConnected&&(t[nb(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,rb=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{rb||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{Zy?.setItem(Xy,JSON.stringify($y))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=$y[d];if(e){let t=$y[u];for(let n in e){if(n===ib){if(s)continue}else{let e=ab(n);if(!e||s&&o&&(l??=ob(o),l.has(e)))continue}t||=$y[u]={},t[n]??=e[n]}}}rb=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=ob(o));let t=e&&i&&c,s=r.e?$y[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===ib){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=ab(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{rb=!1}}))}function cb(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function lb(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function ub(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=lb(r):Array.isArray(t)?t.push(lb(r)):n[e]=[t,lb(r)]}return n}var db=/^(?:\s|["[{\d-]|fa|nu|tr)/,fb=mb(JSON.parse),pb=hb(JSON.stringify,JSON.parse);function mb(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=ub(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!db.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function hb(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!db.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=cb(e,r);return t?`?${t}`:``}}var gb=`__root__`;function _b(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function vb(e){return e instanceof Response&&!!e.options}function yb(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var bb=4,xb=5;function Sb(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function Cb(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function wb(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=vy(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=Cb(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=Eb(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.slice(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=Eb(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.slice(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=Eb(r,xb);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=Eb(r,bb);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function Tb(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Eb(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Db(e,t){let n=Eb(),r=[];function i(e,t,n,a){let[o,s,c]=wb(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Tb);t.masksTree=n,t.flatCache=yb(1e3)}function Ob(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Mb(e,t.masksTree);return t.flatCache.set(e,r),r}function kb(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Eb(),wb(t,{from:e},1,o),i.singleCache.set(a,o)),Mb(r,o,n)}function Ab(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Mb(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Pb(a.route)),t.matchCache.set(r,a),a}function jb(e,t=!1){let n=Eb(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&Ly(),i[e.id]=e,o!==0&&e.path){let t=By(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=wb(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(Tb);return{processedTree:{segmentTree:n,singleCache:yb(1e3),matchCache:yb(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Mb(e,t,n=!1){let r=e.split(`/`),i=Ib(e,r,t,n);if(!i)return null;let[a]=Nb(e,r,i);return{route:i.node.route,rawParams:a}}function Nb(e,t,n){let r=Fb(n.node),i=n.node.data&&Sb(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===bb)break;if(u.kind===xb){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function Pb(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Fb(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ib(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!vy(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Bb(l,n))continue;if(i.parse){if(!zb(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==bb&&Bb(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===bb||i.kind===2)&&Bb(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(zb(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Rb(f,o))return n;Bb(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Lb(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Lb(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Lb(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Lb(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Lb(e,t){return 2**(e-t-1)}function Rb(e,t){return e===2**(t-1)-1}function zb(e,t,n){let r,i;try{[r,i]=Nb(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Bb(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===bb)>(e.node.kind===bb)||t.node.kind===bb==(e.node.kind===bb)&&t.node.depth>e.node.depth)))}function Vb(e,t,n){let r=Vy(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=Ry(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Hb(n,s.input({url:e})),output:({url:e})=>s.output({url:Ub(n,e)})}:s}function Hb(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ub(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Wb(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{Iy(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var Gb=`__TSR_index`,Kb=`popstate`,qb=`beforeunload`,Jb=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Yb(e){let t=Jb.exec(e);return t?`/`+e.slice(t[0].length):e}function Xb(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
43
+ \r`.includes(e)?``:encodeURIComponent(e))),Yb(e)}function Zb(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=ex(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Gb];i=Qb(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Gb];i=Qb(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Gb]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Qb(e,t){let n=tx();return{...t,key:n,__TSR_key:n,[Gb]:e}}function $b(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>Xb(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>ex(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=tx();t.history.replaceState({[Gb]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=ex(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[Gb]-l.state[Gb],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Zb({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(qb,x,{capture:!0}),t.removeEventListener(Kb,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(qb,x,{capture:!0}),t.addEventListener(Kb,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function ex(e,t){let n=Xb(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=tx();t={[Gb]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function tx(){return(Math.random()+1).toString(36).slice(7)}function nx(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function rx(e){return e.pathname+e.search+e.hash}function ix(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function ax(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function ox({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function sx(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function cx(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var lx=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:$b()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&Vy(n)?Vb(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Wb(this.latestLocation,e),sb(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=jb(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Db(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:yb(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:Py(e),external:!1,searchStr:o,search:Cy(t?.search,i),hash:Py(r.slice(1)),state:wy(t?.state,a)}}let o=Hb(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:Py(Yb(o.pathname)),external:!!this.rewrite&&nx(o,this.origin),searchStr:c,search:Cy(t?.search,s),hash:Py(o.hash.slice(1)),state:wy(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Ab(By(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=ex(n.href,{});n={...n,to:Hb(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=Uy(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[By(c)],u=c.includes(`$`),d;if(l)d=l._branch??=Pb(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??wb(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=mx(n.params,e),!xy(p))break;p===e&&(p=Object.assign(Sy(),p));try{Object.assign(p,t(p))}catch{}}}p??=mx(n.params,hx(n.params,f)?o()[3]:gx);let m=e.leaveParams?c:Yb(Py(f?qy(c,f,p,this.pathParamsDecoder):c)),h=_x(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,px(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?vx(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||gx,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:gx,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Ub(this.rewrite,e);C=rx(e),nx(n,t)?(w=n.href,T=!0):w=Yb(rx(n))}else C=Fy(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Ob(r.pathname,this.processedTree);if(t){let i=Object.assign(Sy(),t.rawParams),{from:a,params:o,...s}=t.route,c=mx(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return ux(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=By(this.latestLocation.href)===By(n.href)&&Ey(ox(n.state),ox(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?jy(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return ux(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await dS(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(ax(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&ix(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(My.test(n)||(r=jy(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:nx(e,this.origin)||(n=rx(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=Cx,this.preloadRoute=e=>fS(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?Uy(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=kb(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!Ey(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?Ey(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Wy(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??pb,parseSearch:e.parseSearch??fb,protocolAllowlist:e.protocolAllowlist??Ay}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=wb(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:By(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?yx(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=px(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof dx||(r=new dx(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=Sy(),_=i._interpolation?qy(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{bx(i,d)}catch(e){if(x=Jy(e)||vb(e)?e:new fx(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:Cy(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=ix(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?Cy(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?wy(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?Cy(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=vy(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=vy(a),c={...e.search};for(let e of a)try{Object.assign(c,px(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{bx(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function ux(e,t,{replace:n,ignoreBlocker:r}){if(!Ny(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var dx=class extends Error{},fx=class extends Error{};function px(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new dx(`Async validation not supported`);if(n.issues)throw new dx(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function mx(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function hx(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!by.call(e,t[1]))}var gx=Object.freeze({});function _x(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=px(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function vx(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=yy(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function yx(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return gb}function bx(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function xx(e,t){return e.options[t]?.preload?.()}function Sx(e,t){let n=xx(e,`component`),r=xx(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Cx(e,t,n){let r=()=>t===!1?void 0:t?xx(e,t):Sx(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function wx(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function Tx(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var Ex=0,Dx=1,Ox=2,kx=3,Ax=[4];function jx(e){return typeof e[0]==`number`}function Mx(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function Nx(e,t){return e.routesById[t.routeId]}function Px(e,t,n){return vb(e)?[kx,e]:Jy(e)?(e.routeId||=n,[Ox,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Dx,e]):[Ex,e]}function Fx(e,t){let n=Px(t,!0,e.id);if(n[0]!==Dx)return n;try{e.options.onError?.(n[1])}catch(t){n=Px(t,!0,e.id)}return n}function Ix(e,t,n,r,i){return i[0].signal.aborted?Ax:Qx(e,t,n,Fx(n,r),i)}async function Lx(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=Nx(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return zx(e,r),[i,Ix(e,t,u,a,n)]}if(c.aborted)return[i,Ax];let p=r.paramsError??r.searchError;if(p!==void 0)return zx(e,r),[i,Ix(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Hx(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Mx(a,c):a);if(c.aborted)return[i,Ax];let s=Qx(e,t,u,Px(o,!1,u.id),n);if(s[0]!==Ex)return zx(e,r),[i,s];r.context={...r.context,...o}}catch(a){return zx(e,r),[i,Ix(e,t,u,a,n)]}finally{r.status=h,Hx(e,r,!1,n[0])}}i()}function Rx(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function zx(e,t){let n=t._flight;t._flight=void 0,Rx(e,t,n)?.abort()}function Bx(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Rx(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Vx(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Hx(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Ux(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Wx(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Ax;if(!i)return[Ex,void 0];let l=n._flight;Hx(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Ux(e,t,n,r,s,a,!!o[3]))).then(e=>Px(e,!1,r.id),e=>Px(e,!0,r.id)).then(t=>(t[0]!==Ex&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Dx&&l[2]?Fx(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Qx(e,t,r,await Mx(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return zx(e,n),Ax}finally{Hx(e,n,!1,s)}}function Gx(e,t,n){t[0]!==kx&&(e.status=`success`,e.error=void 0,t[0]===Ex?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Kx(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&zx(e,r)}function qx(e,t){return t[0]===Dx||t[0]===Ox?{...e,status:t[0]===Dx?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Jx(e,t,n,r,i,a,o){let s=t[1][n],c=Nx(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Ux(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Ax)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,zx(e,s),p=Ix(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Rx(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Wx(e,t,s,c,g,i,a).then(t=>(Gx(s,t,l),t[0]===Ex&&(m&&!a[0].signal.aborted&&Kx(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[Ex,s.loaderData]),T=(async()=>{try{let e=Cx(c,void 0,C);e&&await Mx(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Ix(e,t,c,r,a)]}let r=await w;x&&r[0]===Ex&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>qx(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=Wx(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Gx(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>qx(E,e))}async function Yx(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Nx(e,t[n]);try{let e=Cx(i,!1);e&&await Mx(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Xx(e,t){t[2]&&=(Bx(e,t[2].map(e=>e[3])),void 0)}async function Zx(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=kx)throw[a,t];!i&&t[0]!==Ex&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===kx)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Qx(e,t,n,r,i,a){for(;r[0]===kx;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[kx,t]:[kx,t,a]}return[kx,o,n]}catch(e){r=a?[Dx,e]:Fx(n,e),a=!0}}return r}async function $x(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Ox?Yx(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=kx)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Ex&&t[0]<kx&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=kx){let n=s[1];if(n[0]!==kx||n[1].options.reloadDocument||n[2])return Xx(e,t),n;c=!0,s=[0,[Dx,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Dx?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Nx(e,u);try{await Mx(i?Promise.resolve().then(()=>Cx(m,l===Dx?`errorComponent`:`notFoundComponent`)):Promise.all([Cx(m),Cx(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Xx(e,t),Ax}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Xx(e,t),Bx(e,o),p()):u.status=`success`}return t}async function eS(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Nx(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await Mx(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function tS(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Yx(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Jx(e,i,t,u,f,r,l)},m=await Lx(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Ox){let t=await Yx(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=kx&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=$x(e,i,u,r[0],Zx(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Zx(i[2],void 0,void 0,h.then(e=>jx(e)?0:wx(n).length,()=>0))),o=await h}catch(t){if(Xx(e,i),t===a&&a.aborted)return Ax;throw t}return jx(o)?o:eS(e,o,a,r[6]===n.length?r[6]:0)}function nS(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=Nx(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>nS(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function rS(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function iS(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!wx(t[3]).some(e=>e.id===n[1]))return;let i;try{await Mx(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function aS(e,t){e._committed=t,e.stores.setMatches(t)}function oS(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=wx(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=Nx(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=sx(n);aS(e,n),Bx(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),cx(e,i,n,a,l,t)}async function sS(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function cS(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function lS(e,t,n,r,i){let a=n.map(e=>({...e}));Vx(a);for(let t of r)zx(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await $x(e,o,r,t[0],i)}catch(t){throw Bx(e,a),t}if(jx(s))Bx(e,a),s[0]===kx&&e._tx===t&&e._committed===n&&await cS(e,t,s);else if(await eS(e,s,t[0].signal),e._tx!==t||e._committed!==n)Bx(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),zx(e,n))}aS(e,a),Bx(e,n,a)}}async function uS(e,t,n,r,i,a){let o=await tS(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(jx(o)){let n=o[0]===kx&&e._tx===t;if((!n||o[1].options.reloadDocument)&&rS(e,t),Bx(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){rS(e,t);return}await cS(e,t,o);return}let s=o[1];if(e._tx===t&&await iS(e,t),e._tx!==t){rS(e,t),Bx(e,s),Xx(e,o);return}let c=t[2],l=ax(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await iS(e,t),e._tx!==t){rS(e,t),Bx(e,s),Xx(e,o);return}let n=await e.startTransition(()=>{rS(e,t),oS(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&lS(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):Xx(e,o)})}async function dS(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=ax(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await sS(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Vx(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Bx(e,m),await sS(e,n);return}e._preflight=void 0;let g,_=()=>uS(e,y,f,()=>nS(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>sS(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Hx(e,t,!1)}n[0].abort(),Bx(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&nS(e,y),g?.(_()),await y[5]):(Bx(e,y[3]),y[3]=[],g?.(),await sS(e,y))}async function fS(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Vx(a),o=(e._preloads??=new Map).set(i,a),s=await tS(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Bx(e,a)),i.abort()}if(!jx(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Jy(e)||console.error(e);return}}}var pS=`Error preloading route! ☝️`,mS=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=gb:this.parentRoute||Ly();let r=n?gb:t?.path;r&&r!==`/`&&(r=zy(r));let i=t?.id||r,a=n?gb:Ry((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:Ry(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=By(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>_b({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},hS=class extends mS{constructor(e){super(e)}},gS=class extends C.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?C.createElement(this.props.errorComponent??_S,{error:e[0],reset:this.reset}):this.props.children}};function _S({error:e}){let[t,n]=C.useState(!1);return(0,G.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,G.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,G.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,G.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,G.jsx)(`div`,{children:(0,G.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,G.jsx)(`code`,{children:e.message}):null})}):null]})}var vS=()=>!0,yS=()=>!1;function bS({children:e,fallback:t=null}){return(0,G.jsx)(C.Fragment,{children:xS()?e:t})}function xS(e=!0){return C.useSyncExternalStore(SS,vS,e?yS:vS)}function SS(){return()=>{}}var CS=C.createContext(null);function wS(e){return C.useContext(CS)}function TS(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{Tx(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var ES=C.createContext(void 0),DS=C.createContext(void 0);function OS({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function kS(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var AS=[],jS=0,{link:MS,unlink:NS,propagate:PS,checkDirty:FS,shallowPropagate:IS}=OS({update(e){return e._update()},notify(e){AS[RS++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,HS(e))}}),LS=0,RS=0,zS,BS=0;function VS(e){try{++BS,e()}finally{--BS||US()}}function HS(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=NS(n,e)}function US(){if(!(BS>0)){for(;LS<RS;){let e=AS[LS];AS[LS++]=void 0,e.notify()}LS=0,RS=0}}function WS(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return zS!==void 0&&MS(i,zS,jS),i._snapshot},subscribe(e){let t=kS(e),n={current:!1},r=GS(()=>{i.get(),n.current?(zS=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=zS,o=t?.compare??Object.is;if(n)zS=i,++jS,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{zS=a,n&&(i.flags&=-5),HS(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&FS(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&IS(e)}}else e&32&&(i.flags=e&-33);return zS!==void 0&&MS(i,zS,jS),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(PS(e),IS(e),US())}},i}function GS(e){let t=()=>{let t=zS;zS=n,++jS,n.depsTail=void 0,n.flags=6;try{return e()}finally{zS=t,n.flags&=-5,HS(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&FS(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,HS(this)}};return t(),n}var KS=o((e=>{var t=S();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),qS=o(((e,t)=>{t.exports=KS()})),JS=o((e=>{var t=S(),n=qS();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),YS=o(((e,t)=>{t.exports=JS()}))();function XS(e,t){return e===t}function ZS(e,t=e=>e,n){let r=n?.compare??XS,i=(0,C.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,C.useCallback)(()=>e.get(),[e]);return(0,YS.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var QS={};function $S(e,t){let n=C.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=wy(n.current,i):i}}function eC(e){let t=wS(),n=C.useContext(e.from?DS:ES),r=e.from??n,i=t.stores.getMatchStore(r),a=$S(e,t),o=ZS(i,e=>e?a(e):QS);if(o!==QS)return o;(e.shouldThrow??!0)&&Ly()}function tC(e){return eC({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function nC(e){let{select:t,...n}=e;return eC({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function rC(e){return eC({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function iC(e){return eC({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function aC(e){let t=wS();return C.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function oC(e){return eC({...e,select:t=>e.select?e.select(t.context):t.context})}function sC(...e){let t=C.useRef(e),n=t.current;return e.forEach((e,t)=>{Ey(n[t],e,!1,!0)||(n[t]=e)}),t.current}function cC(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(pS)})}function lC(e,t){let n=typeof e==`string`&&jy(e);if(n)return t.has(n)?e:null}function uC(e,t,n,r){let i=Hy(e.pathname,r),a=Hy(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!Ey(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function dC(e,t,n){let r=wS(),i=C.useRef(null),a=C.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:_}=e,[v,y,b]=sC(e.search,e.params,o),x=C.useContext(ES),S=(r.stores._linkScopes??={})[x]??=TS(r,x),[w,T,E]=C.useMemo(()=>{let t=lC(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=S[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=yC(t,r,u),s=u||o&&!jy(o)?uC(e,t,b,r.basepath):void 0;(!a||a[0]!==o||a[1]!==s)&&(a=[o,s]),i=e}return a};return[n,c,b?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,S,e.from,e.hash,e.href,s,v,y,e.state,e.mask,e.unsafeRelative,b,u]),[D,O]=C.useSyncExternalStore(S[1],T,E||T),k=O===void 0&&D,A=u||D===void 0,j=C.useRef(!1),M=e.reloadDocument||k||A?!1:c??r.options.defaultPreload,N=l??r.options.defaultPreloadDelay??0,ee=C.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?i.t??=setTimeout(()=>{i.t=void 0,cC(r,w)},N):cC(r,w):t===!1&&_C(i)},[r,w,i,M,N]);C.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,cC(r,w));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&ee(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),_C(i)}},[r,w,M,ee,i]);let P=hC(e,n);if(P.ref=t?a:i,k)return P.href=k,P;let F=t=>{let n=d??t.currentTarget.getAttribute(`target`);!A&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(!n||n===`_self`)&&t.button===0&&(t.preventDefault(),_C(i),r.navigate({...e,_fromLocation:w._fromLocation}))},I=()=>{M===`intent`&&cC(r,w)},L=()=>{M===`intent`&&_C(i)};return P.onClick=vC(f,F),P.onBlur=vC(p,L),P.onFocus=vC(m,ee),P.onMouseEnter=vC(h,ee),P.onMouseLeave=vC(g,L),P.onTouchStart=vC(_,I),gC(P,e,O,D,A,n)}var fC={},pC={className:`active`},mC=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function hC(e,t){let n={};for(let r in e)mC.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function gC(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=yy(n?o:s,{})??(n?pC:fC);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var _C=e=>{clearTimeout(e.t),e.t=void 0},vC=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function yC(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!Ny(i,t.protocolAllowlist))return i}var bC=C.memo(C.forwardRef((e,t)=>{let n=e._asChild||`a`,r=dC(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return C.createElement(n,r,i)}),xC);function xC(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!mC.has(r)||!Ey(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var SC=class extends mS{constructor(e){super(e),this.useMatch=e=>eC({...e,from:this.id}),this.useRouteContext=e=>oC({...e,from:this.id}),this.useSearch=e=>iC({...e,from:this.id}),this.useParams=e=>rC({...e,from:this.id}),this.useLoaderDeps=e=>nC({...e,from:this.id}),this.useLoaderData=e=>tC({...e,from:this.id}),this.useNavigate=()=>aC({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,G.jsx)(bC,{ref:t,from:this.fullPath,...e}))}};function CC(e){return new SC(e)}var wC=class extends hS{constructor(e){super(e),this.useMatch=e=>eC({...e,from:this.id}),this.useRouteContext=e=>oC({...e,from:this.id}),this.useSearch=e=>iC({...e,from:this.id}),this.useParams=e=>rC({...e,from:this.id}),this.useLoaderDeps=e=>nC({...e,from:this.id}),this.useLoaderData=e=>tC({...e,from:this.id}),this.useNavigate=()=>aC({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,G.jsx)(bC,{ref:t,from:this.fullPath,...e}))}};function TC(e){return new wC(e)}function EC(e){let t=wS(),n=`not-found-${ZS(t.stores.location,e=>e.pathname)}-${ZS(t.stores.status)}`;return(0,G.jsx)(gS,{getResetKey:()=>n,onCatch:(t,n)=>{if(Jy(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Jy(t))return e.fallback?.(t);throw t},children:e.children})}function DC(){return(0,G.jsx)(`p`,{children:`Not Found`})}function OC(e,t,n){return t.options.notFoundComponent?(0,G.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,G.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,G.jsx)(DC,{})}function kC(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,G.jsx)(n,{}):null}var AC=(e,t)=>e[0]===t[0]&&e[1]===t[1],jC=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,MC=C.memo(function({routeId:e}){let t=wS();return NC(t,ZS(t.stores.getMatchStore(e)))});function NC(e,t){let n=e.routesById[t.routeId],r=kC(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=jC(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,G.jsx)(PC,{match:t});s&&(l=(0,G.jsx)(bS,{fallback:r,children:l})),o&&(l=(0,G.jsx)(EC,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return C.createElement(o,e)},children:l})),i&&(l=(0,G.jsx)(gS,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Jy(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,G.jsx)(C.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,G.jsx)(ES.Provider,{value:t.routeId,children:(0,G.jsxs)(u,{children:[l,null]})}):(0,G.jsxs)(ES.Provider,{value:t.routeId,children:[l,null]})}var PC=C.memo(function({match:e}){let t=wS(),n=e.routeId,r=t.routesById[n],i=C.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=C.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,G.jsx)(e,{},i):(0,G.jsx)(FC,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!jC(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return kC(t,r)}if(e.status===`notFound`)return OC(t,r,e.error);if(e.status===`error`)throw e.error;return a}),FC=C.memo(function(){let e=wS(),t=C.useContext(ES),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=ZS(a,e=>[!!e._notFound,e.error],{compare:AC}),i=ZS(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return OC(e,e.routesById[t],r);if(!i)return null;let a=(0,G.jsx)(MC,{routeId:i});return t===`__root__`?(0,G.jsx)(C.Suspense,{fallback:kC(e),children:a}):a});function IC(e,t){let n=e[1];e.length=0,n?.(t)}function LC({t:e}){let t=wS(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{IC(n,!1),n.push(i,a),e(t),C.startTransition(r)}),_y(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(By(r.publicHref)!==By(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...ax(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function RC(){let e=wS(),t=e.routesById[gb],n=kC(e,t),r=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(LC,{t:C.useState()[1]}),e.ssr?(0,G.jsx)(zC,{}):(0,G.jsx)(C.Suspense,{fallback:n,children:(0,G.jsx)(zC,{})})]});return e.options.InnerWrap?(0,G.jsx)(e.options.InnerWrap,{children:r}):r}function zC(){let e=wS(),t=e._rendered,n=ZS(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;_y(()=>{t[0]===n&&IC(t,!0)},[t,n]);let a=i?(0,G.jsx)(MC,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,G.jsx)(gS,{getResetKey:()=>r,onCatch:void 0,children:a})}var BC=e=>({createMutableStore:WS,createReadonlyStore:WS,batch:VS}),VC=e=>new HC(e),HC=class extends lx{constructor(e){super(e,BC)}};function UC({router:e,children:t,...n}){xy(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,G.jsx)(CS.Provider,{value:e,children:t});return e.options.Wrap?(0,G.jsx)(e.options.Wrap,{children:r}):r}function WC({router:e,...t}){return(0,G.jsx)(UC,{router:e,...t,children:(0,G.jsx)(RC,{})})}var GC=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),KC=o(((e,t)=>{t.exports=GC()})),qC=o((e=>{var t=KC(),n=S(),r=xt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var v=null,y=null;function b(e,t,n){return e===n||e===t&&(v=e,!0)}function x(e,t,n){return e===n?(y=e,!1):e===t&&(y!==null&&(v=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),M=Symbol.for(`react.consumer`),N=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),P=Symbol.for(`react.suspense`),F=Symbol.for(`react.suspense_list`),I=Symbol.for(`react.memo`),L=Symbol.for(`react.lazy`),R=Symbol.for(`react.activity`),te=Symbol.for(`react.legacy_hidden`),ne=Symbol.for(`react.memo_cache_sentinel`),re=Symbol.for(`react.view_transition`),ie=Symbol.for(`react.recoverable`),ae=Symbol.iterator;function oe(e){return typeof e!=`object`||!e?null:(e=ae&&e[ae]||e[`@@iterator`],typeof e==`function`?e:null)}var se=Symbol.for(`react.client.reference`);function ce(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case P:return`Suspense`;case F:return`SuspenseList`;case R:return`Activity`;case re:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case N:return e.displayName||`Context`;case M:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case I:return t=e.displayName||null,t===null?ce(e.type)||`Memo`:t;case L:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var le=Array.isArray,z=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},ue=[],H=-1;function de(e){return{current:e}}function fe(e){0>H||(e.current=ue[H],ue[H]=null,H--)}function pe(e,t){H++,ue[H]=e.current,e.current=t}var me=de(null),he=de(null),ge=de(null),_e=de(null);function ve(e,t){switch(pe(ge,t),pe(he,e),pe(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dp(t),e=fp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(me),pe(me,e)}function ye(){fe(me),fe(he),fe(ge)}function U(e){var t=e.memoizedState;t!==null&&(ch._currentValue=t.memoizedState,pe(_e,e)),t=me.current;var n=fp(t,e.type);t!==n&&(pe(he,e),pe(me,n))}function be(e){he.current===e&&(fe(me),fe(he)),_e.current===e&&(fe(_e),ch._currentValue=V)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
44
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
45
+ `+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
46
+ `),l=s.split(`
47
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
48
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);case 30:return Ce(`ViewTransition`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
49
+ Error generating stack: `+e.message+`
50
+ `+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ge(n),i=1<<r;t|=e[r],n&=~i}return t}function nt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function it(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function at(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ot(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ge(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&st(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function st(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ct(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function lt(e,t){var n=t&-t;return n=n&42?1:ut(n),(n&(e.suspendedLanes|t))===0?n:0}function ut(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function dt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ft(){var e=B.p;return e===0?(e=window.event,e===void 0?32:wh(e.type)):e}function pt(e,t){var n=B.p;try{return B.p=e,t()}finally{B.p=n}}var mt=Math.random().toString(36).slice(2),ht=`__reactFiber$`+mt,gt=`__reactProps$`+mt,_t=`__reactContainer$`+mt,vt=`__reactEvents$`+mt,yt=`__reactListeners$`+mt,bt=`__reactHandles$`+mt,St=`__reactResources$`+mt,Ct=`__reactMarker$`+mt,wt=`__reactLoad$`+mt;function Tt(e){delete e[ht],delete e[gt],delete e[yt],delete e[bt]}function Et(e){var t;if(t=e[ht])return t;for(var n=e.parentNode;n;){if(t=n[_t]||n[ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pm(e);e!==null;){if(n=e[ht])return n;e=pm(e)}return t}e=n,n=e.parentNode}return null}function Dt(e){if(e=e[ht]||e[_t]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function kt(e){var t=e[St];return t||=e[St]={hoistableStyles:new Map,hoistableScripts:new Map},t}function At(e){e[Ct]=!0}function jt(e){e[wt]=void 0}var Mt=new Set,Nt={};function W(e,t){Pt(e,t),Pt(e+`Capture`,t)}function Pt(e,t){for(Nt[e]=t,e=0;e<t.length;e++)Mt.add(t[e])}var Ft=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),It={},Lt={};function Rt(e){return Oe.call(Lt,e)?!0:Oe.call(It,e)?!1:Ft.test(e)?Lt[e]=!0:(It[e]=!0,!1)}var zt=!1;function Bt(){var e=zt;return zt=!1,e}function Vt(e,t,n){if(Rt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Yt=/[\n"\\]/g;function Xt(e){return e.replace(Yt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Zt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):$t(e,Wt(n)):o===`number`&&e.value==t?$t(e,Wt(e.value)):$t(e,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function Qt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function $t(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function en(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function tn(e,t,n){t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Wt(n)}function nn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(le(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function rn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var an=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function on(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||an.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function sn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,zt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(on(e,a,r),zt=!0)}else for(var o in t)t.hasOwnProperty(o)&&on(e,o,t[o])}function cn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var ln=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),un=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function dn(e){return un.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function fn(){}var pn=null;function mn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hn=null,gn=null;function _n(e){var t=Dt(e);if(t&&(e=t.stateNode)){var n=e[gt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Zt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Xt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[gt]||null;if(!a)throw Error(i(90));Zt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:tn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&en(e,!!n.multiple,t,!1)}}}var vn=!1;function yn(e,t,n){if(vn)return e(t,n);vn=!0;try{return e(t)}finally{if(vn=!1,(hn!==null||gn!==null)&&(Rd(),hn&&(t=hn,e=gn,gn=hn=null,_n(t),e)))for(t=0;t<e.length;t++)_n(e[t])}}function bn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[gt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var xn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Sn=!1;if(xn)try{var Cn={};Object.defineProperty(Cn,"passive",{get:function(){Sn=!0}}),window.addEventListener(`test`,Cn,Cn),window.removeEventListener(`test`,Cn,Cn)}catch{Sn=!1}var wn=null,Tn=null,En=null;function Dn(){if(En)return En;var e,t=Tn,n=t.length,r,i=`value`in wn?wn.value:wn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return En=i.slice(e,1<r?1-r:void 0)}function On(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function kn(){return!0}function An(){return!1}function jn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?kn:An,this.isPropagationStopped=An,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=kn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=kn)},persist:function(){},isPersistent:kn}),t}var Mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nn=jn(Mn),G=T({},Mn,{view:0,detail:0}),Pn=jn(G),Fn,In,Ln,Rn=T({},G,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Ln&&(Ln&&e.type===`mousemove`?(Fn=e.screenX-Ln.screenX,In=e.screenY-Ln.screenY):In=Fn=0,Ln=e),Fn)},movementY:function(e){return`movementY`in e?e.movementY:In}}),zn=jn(Rn),Bn=jn(T({},Rn,{dataTransfer:0})),Vn=jn(T({},G,{relatedTarget:0})),Hn=jn(T({},Mn,{animationName:0,elapsedTime:0,pseudoElement:0})),Un=jn(T({},Mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Wn=jn(T({},Mn,{data:0})),Gn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Kn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qn[e])?!!t[e]:!1}function Yn(){return Jn}var Xn=jn(T({},G,{key:function(e){if(e.key){var t=Gn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=On(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Kn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yn,charCode:function(e){return e.type===`keypress`?On(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?On(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),K=jn(T({},Rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Zn=jn(T({},Mn,{submitter:0})),Qn=jn(T({},G,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yn})),$n=jn(T({},Mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),er=jn(T({},Rn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),tr=jn(T({},Mn,{newState:0,oldState:0,source:0})),nr=[9,13,27,32],rr=xn&&`CompositionEvent`in window,ir=null;xn&&`documentMode`in document&&(ir=document.documentMode);var ar=xn&&`TextEvent`in window&&!ir,or=xn&&(!rr||ir&&8<ir&&11>=ir),sr=` `,cr=!1;function lr(e,t){switch(e){case`keyup`:return nr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ur(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var dr=!1;function fr(e,t){switch(e){case`compositionend`:return ur(t);case`keypress`:return t.which===32?(cr=!0,sr):null;case`textInput`:return e=t.data,e===sr&&cr?null:e;default:return null}}function q(e,t){if(dr)return e===`compositionend`||!rr&&lr(e,t)?(e=Dn(),En=Tn=wn=null,dr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return or&&t.locale!==`ko`?null:t.data;default:return null}}var pr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!pr[e.type]:t===`textarea`}function hr(e,t,n,r){hn?gn?gn.push(r):gn=[r]:hn=r,t=Jf(t,`onChange`),0<t.length&&(n=new Nn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var gr=null,_r=null;function vr(e){Bf(e,0)}function yr(e){if(Jt(Ot(e)))return e}function br(e,t){if(e===`change`)return t}var xr=!1;if(xn){var Sr;if(xn){var Cr=`oninput`in document;if(!Cr){var wr=document.createElement(`div`);wr.setAttribute(`oninput`,`return;`),Cr=typeof wr.oninput==`function`}Sr=Cr}else Sr=!1;xr=Sr&&(!document.documentMode||9<document.documentMode)}function Tr(){gr&&(gr.detachEvent(`onpropertychange`,Er),_r=gr=null)}function Er(e){if(e.propertyName===`value`&&yr(_r)){var t=[];hr(t,_r,e,mn(e)),yn(vr,t)}}function Dr(e,t,n){e===`focusin`?(Tr(),gr=t,_r=n,gr.attachEvent(`onpropertychange`,Er)):e===`focusout`&&Tr()}function Or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return yr(_r)}function kr(e,t){if(e===`click`)return yr(t)}function Ar(e,t){if(e===`input`||e===`change`)return yr(t)}function jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Mr=typeof Object.is==`function`?Object.is:jr;function Nr(e,t){if(Mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Oe.call(t,i)||!Mr(e[i],t[i]))return!1}return!0}function Pr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ir(e,t){var n=Fr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Fr(n)}}function Lr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pr(e.document)}return t}function zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Br=xn&&`documentMode`in document&&11>=document.documentMode,Vr=null,Hr=null,Ur=null,Wr=!1;function Gr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wr||Vr==null||Vr!==Pr(r)||(r=Vr,`selectionStart`in r&&zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ur&&Nr(Ur,r)||(Ur=r,r=Jf(Hr,`onSelect`),0<r.length&&(t=new Nn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Vr)))}function Kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var qr={animationend:Kr(`Animation`,`AnimationEnd`),animationiteration:Kr(`Animation`,`AnimationIteration`),animationstart:Kr(`Animation`,`AnimationStart`),transitionrun:Kr(`Transition`,`TransitionRun`),transitionstart:Kr(`Transition`,`TransitionStart`),transitioncancel:Kr(`Transition`,`TransitionCancel`),transitionend:Kr(`Transition`,`TransitionEnd`)},J={},Jr={};xn&&(Jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),`TransitionEvent`in window||delete qr.transitionend.transition);function Yr(e){if(J[e])return J[e];if(!qr[e])return e;var t=qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jr)return J[e]=t[n];return e}var Xr=Yr(`animationend`),Zr=Yr(`animationiteration`),Qr=Yr(`animationstart`),$r=Yr(`transitionrun`),ei=Yr(`transitionstart`),ti=Yr(`transitioncancel`),Y=Yr(`transitionend`),ni=new Map,ri=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ri.push(`scrollEnd`);function ii(e,t){ni.set(e,t),W(t,[e])}var ai=0;function oi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=yd.identifierPrefix;var n=ai++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function si(e){if(e==null||typeof e==`string`)return e;var t=null,n=Dd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function ci(e,t){return e=si(e),t=si(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var li=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<Od)throw Od=0,kd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Si(r)&&(s=1);else if(typeof r==`string`)s=Jm(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case R:return e=xi(31,n,t,a),e.elementType=R,e.lanes=o,e;case k:return Ei(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=xi(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case P:return e=xi(13,n,t,a),e.elementType=P,e.lanes=o,e;case F:return e=xi(19,n,t,a),e.elementType=F,e.lanes=o,e;case te:case re:return e=a|32,e=xi(30,n,t,e),e.elementType=re,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case N:s=10;break a;case M:s=9;break a;case ee:s=11;break a;case I:s=14;break a;case L:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:De(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:De(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-Ge(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ht]=e,t[gt]=r,n){case`dialog`:Vf(`cancel`,t),Vf(`close`,t);break;case`iframe`:case`object`:case`embed`:Vf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Rf.length;n++)Vf(Rf[n],t);break;case`source`:Vf(`error`,t);break;case`img`:case`image`:case`link`:Vf(`error`,t),Vf(`load`,t);break;case`details`:Vf(`toggle`,t);break;case`input`:Vf(`invalid`,t),Qt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Vf(`invalid`,t);break;case`textarea`:Vf(`invalid`,t),nn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||ep(t.textContent,n)?(r.popover!=null&&(Vf(`beforetoggle`,t),Vf(`toggle`,t)),r.onScroll!=null&&Vf(`scroll`,t),r.onScrollEnd!=null&&Vf(`scrollend`,t),r.onClick!=null&&(t.onclick=fn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||mp(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=fm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=fm(e)}else t===27?(t=qi,Cp(e.type)?(e=dm,dm=null,qi=e):qi=t):qi=Ki?um(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=de(null),oa=null,sa=null;function ca(e,t,n){pe(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,fe(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ua(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ch]:e.push(ch))}a=a.return}return e!==null&&da(t,e,n,r),t.flags|=262144,e!==null}function pa(e){for(e=e.firstContext;e!==null;){if(!Mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}function wa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ta=null;function Ea(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Da=null,Oa=0,ka=0,Aa=null;function ja(e,t){if(Da===null){var n=Da=[];Oa=0,ka=Nf(),Aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Oa++,t.then(Ma,Ma),t}function Ma(){if(--Oa===0&&(Ta=null,Da!==null)){Aa!==null&&(Aa.status=`fulfilled`);var e=Da;Da=null,ka=0,Aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Na(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Pa=z.S;z.S=function(e,t){if(md=Ne(),typeof t==`object`&&t&&typeof t.then==`function`&&ja(e,t),Ta!==null)for(var n=yf;n!==null;)wa(n,Ta),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)wa(r,n),r=r.next;if(ka!==0){r=Ta,r===null&&(r=Ta=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Pa!==null&&Pa(e,t)};var Fa=de(null);function Ia(){var e=Fa.current;return e===null?Yu.pooledCache:e}function La(e,t){t===null?pe(Fa,Fa.current):pe(Fa,t.pool)}function Ra(){var e=Ia();return e===null?null:{parent:xa._currentValue,pool:e}}var za=Error(i(460)),Ba=Error(i(474)),Va=Error(i(542)),Ha={then:function(){}};function Ua(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(fn,fn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(fn,fn);else{if(e=Yu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e}throw Ka=t,za}}function Ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ka=e,za):e}}var Ka=null;function qa(){if(Ka===null)throw Error(i(459));var e=Ka;return Ka=null,e}function Ja(e){if(e===za||e===Va)throw Error(i(483))}var Ya=null,Xa=0;function Za(e){var t=Xa;return Xa+=1,Ya===null&&(Ya=[]),Wa(Ya,e,t)}function Qa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function $a(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function eo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),Qa(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===L&&Ga(i)===t.type)?(t=a(t,n.props),Qa(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Qa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Qa(n,t),n.return=e,n;case O:return t=ki(t,e.mode,n),t.return=e,t;case L:return t=Ga(t),f(e,t,n)}if(le(t)||oe(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Za(t),n);if(t.$$typeof===N)return f(e,ga(e,t),n);$a(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case L:return n=Ga(n),p(e,t,n,r)}if(le(n)||oe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Za(n),r);if(n.$$typeof===N)return p(e,t,ga(e,n),r);$a(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case L:return r=Ga(r),m(e,t,n,r,i)}if(le(r)||oe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Za(r),i);if(r.$$typeof===N)return m(e,t,n,ga(t,r),i);$a(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Vi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),Qa(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===L&&Ga(l)===r.type){n(e,r.sibling),c=a(r,o.props),Qa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Ei(o.props.children,e.mode,c,o.key),Qa(c,o),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Qa(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case L:return o=Ga(o),_(e,r,o,c)}if(le(o))return h(e,r,o,c);if(oe(o)){if(l=oe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,Za(o),c);if(o.$$typeof===N)return _(e,r,ga(e,o),c);$a(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Xa=0;var i=_(e,t,n,r);return Ya=null,i}catch(t){if(t===za||t===Va)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var to=eo(!0),no=eo(!1),ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function oo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ju&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var uo=!1;function fo(){if(uo){var e=Aa;if(e!==null)throw e}}function po(e,t,n,r){uo=!1;var i=e.updateQueue;ro=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Zu&f)===f:(r&f)===f){f!==0&&f===ka&&(uo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:ro=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ad|=o,e.lanes=o,e.memoizedState=d}}function mo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)mo(n[e],t)}var go=de(null),_o=de(0);function vo(e,t){e=rd,pe(_o,e),pe(go,t),rd=e|t.baseLanes}function yo(){pe(_o,rd),pe(go,go.current)}function bo(){rd=_o.current,fe(go),fe(_o)}var xo=de(null),So=null;function Co(e){var t=e.alternate;pe(Oo,Oo.current&1),pe(xo,e),So===null&&(t===null||go.current!==null||t.memoizedState!==null)&&(So=e)}function wo(e){pe(Oo,Oo.current),pe(xo,e),So===null&&(So=e)}function To(e){e.tag===22?(pe(Oo,Oo.current),pe(xo,e),So===null&&(So=e)):Eo()}function Eo(){pe(Oo,Oo.current),pe(xo,xo.current)}function Do(e){fe(xo),So===e&&(So=null),fe(Oo)}var Oo=de(0);function ko(e,t){pe(xo,xo.current),pe(Oo,t)}function Ao(e){fe(Oo),fe(xo),So===e&&(So=null)}function jo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sm(n)||cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mo=0,No=null,Po=null,Fo=null,Io=!1,Lo=!1,Ro=!1,zo=0,Bo=0,Vo=null,Ho=0;function Uo(){throw Error(i(321))}function Wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mr(e[n],t[n]))return!1;return!0}function Go(e,t,n,r,i,a){return Mo=a,No=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?cc:lc,Ro=!1,a=n(r,i),Ro=!1,Lo&&(a=qo(t,n,r,i)),Ko(e),a}function Ko(e){z.H=sc;var t=Po!==null&&Po.next!==null;if(Mo=0,Fo=Po=No=null,Io=!1,Bo=0,Vo=null,t)throw Error(i(300));e===null||Ec||(e=e.dependencies,e!==null&&pa(e)&&(Ec=!0))}function qo(e,t,n,r){No=e;var a=0;do{if(Lo&&(Vo=null),Bo=0,Lo=!1,25<=a)throw Error(i(301));if(a+=1,Fo=Po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}z.H=uc,o=t(n,r)}while(Lo);return o}function Jo(){var e=z.H,t=e.useState()[0];return t=typeof t.then==`function`?ts(t):t,e=e.useState()[0],(Po===null?null:Po.memoizedState)!==e&&(No.flags|=1024),t}function Yo(){var e=zo!==0;return zo=0,e}function Xo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Zo(e){if(Io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Io=!1}Mo=0,Fo=Po=No=null,Lo=!1,Bo=zo=0,Vo=null}function Qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e,Fo}function $o(){if(Po===null){var e=No.alternate;e=e===null?null:e.memoizedState}else e=Po.next;var t=Fo===null?No.memoizedState:Fo.next;if(t!==null)Fo=t,Po=e;else{if(e===null)throw No.alternate===null?Error(i(467)):Error(i(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e}return Fo}function es(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=Bo;return Bo+=1,Vo===null&&(Vo=[]),e=Wa(Vo,e,t),t=No,(Fo===null?t.memoizedState:Fo.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?cc:lc),e}function ns(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ts(e);if(e.$$typeof===ie)return;if(e.$$typeof===N)return ha(e)}throw Error(i(438,String(e)))}function rs(e){var t=null,n=No.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=No.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=es(),No.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ne;return t.index++,n}function is(e,t){return typeof t==`function`?t(e):t}function as(e){return os($o(),Po,e)}function os(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Mo&f)===f:(Zu&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ka&&(d=!0);else if((Mo&p)===p){u=u.next,p===ka&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,No.lanes|=p,ad|=p;f=u.action,Ro&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,No.lanes|=f,ad|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Mr(o,e.memoizedState)&&(Ec=!0,d&&(n=Aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ss(e){var t=$o(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Mr(o,t.memoizedState)||(Ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function cs(e,t,n){var r=No,a=$o(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Mr((Po||a).memoizedState,n);if(s&&(a.memoizedState=n,Ec=!0),a=a.queue,Ns(ds.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Fo!==null&&!!(Fo.memoizedState.tag&1),Os(e?9:8,{destroy:void 0},us.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Yu===null)throw Error(i(349));o||Mo&127||ls(r,t,n)}return n}function ls(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=No.updateQueue,t===null?(t=es(),No.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function us(e,t,n,r){t.value=n,t.getSnapshot=r,fs(t)&&ps(e)}function ds(e,t,n){return n(function(){fs(t)&&ps(e)})}function fs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mr(e,n)}catch{return!0}}function ps(e){var t=gi(e,2);t!==null&&Nd(t,e,2)}function ms(e){var t=Qo();if(typeof e==`function`){var n=e;if(e=n(),Ro){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:e},t}function hs(e,t,n,r){return e.baseState=n,os(e,Po,typeof r==`function`?r:is)}function gs(e,t,n,r,a){if(ic(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};z.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,_s(t,o)):(o.next=n.next,t.pending=n.next=o)}}function _s(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=z.T,o={};o.types=a===null?null:a.types,z.T=o;try{var s=n(i,r),c=z.S;c!==null&&c(o,s),vs(e,t,s)}catch(n){bs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),z.T=a}}else try{a=n(i,r),vs(e,t,a)}catch(n){bs(e,t,n)}}function vs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ys(e,t,n)},function(n){return bs(e,t,n)}):ys(e,t,n)}function ys(e,t,n){t.status=`fulfilled`,t.value=n,xs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_s(e,n)))}function bs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,xs(t),t=t.next;while(t!==r)}e.action=null}function xs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ss(e,t){return t}function Cs(e,t){if(Ji){var n=Yu.formState;if(n!==null){a:{var r=No;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;)if(!a||(i=um(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=um(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Qo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:t},n.queue=r,n=tc.bind(null,No,r),r.dispatch=n,r=ms(!1),a=rc.bind(null,No,!1,r.queue),r=Qo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=gs.bind(null,No,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ws(e){return Ts($o(),Po,e)}function Ts(e,t,n){if(t=os(e,t,Ss)[0],e=as(is)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ts(t)}catch(e){throw e===za?Va:e}else r=t;t=$o();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(No.flags|=2048,Os(9,{destroy:void 0},Es.bind(null,i,n),null)),[r,a,e]}function Es(e,t){e.action=t}function Ds(e){var t=$o(),n=Po;if(n!==null)return Ts(t,n,e);$o(),t=t.memoizedState,n=$o();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=No.updateQueue,t===null&&(t=es(),No.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ks(){return $o().memoizedState}function As(e,t,n,r){var i=Qo();No.flags|=e,i.memoizedState=Os(1|t,{destroy:void 0},n,r===void 0?null:r)}function js(e,t,n,r){var i=$o();r=r===void 0?null:r;var a=i.memoizedState.inst;Po!==null&&r!==null&&Wo(r,Po.memoizedState.deps)?i.memoizedState=Os(t,a,n,r):(No.flags|=e,i.memoizedState=Os(1|t,a,n,r))}function Ms(e,t){As(8390656,8,e,t)}function Ns(e,t){js(2048,8,e,t)}function Ps(e){No.flags|=4;var t=No.updateQueue;if(t===null)t=es(),No.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Fs(e){var t=$o().memoizedState;return Ps({ref:t,nextImpl:e}),function(){if(Ju&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Is(e,t){return js(4,2,e,t)}function Ls(e,t){return js(4,4,e,t)}function Rs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zs(e,t,n){n=n==null?null:n.concat([e]),js(4,4,Rs.bind(null,t,e),n)}function Bs(){}function Vs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Wo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Hs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Wo(t,r[1]))return r[0];if(r=e(),Ro){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function Us(e,t,n){return n===void 0||Mo&1073741824&&!(Zu&261930)?e.memoizedState=t:(e.memoizedState=n,e=jd(),No.lanes|=e,ad|=e,n)}function Ws(e,t,n,r){return Mr(n,t)?n:go.current===null?!(Mo&106)||Mo&1073741824&&!(Zu&261930)?(Ec=!0,e.memoizedState=n):(e=jd(),No.lanes|=e,ad|=e,t):(e=Us(e,n,r),Mr(e,t)||(Ec=!0),e)}function Gs(e,t,n,r,i){var a=B.p;B.p=a!==0&&8>a?a:8;var o=z.T,s={};s.types=o===null?null:o.types,z.T=s,rc(e,!1,t,n);try{var c=i(),l=z.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?nc(e,t,Na(c,r),Ad(e)):nc(e,t,r,Ad(e))}catch(n){nc(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{B.p=a,o!==null&&s.types!==null&&(o.types=s.types),z.T=o}}function Ks(){}function qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Js(e).queue;Gs(e,a,t,V,n===null?Ks:function(){return Ys(e),n(r)})}function Js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:V},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ys(e){var t=Js(e);t.next===null&&(t=e.alternate.memoizedState),nc(e,t.next.queue,{},Ad())}function Xs(){return ha(ch)}function Zs(){return $o().memoizedState}function Qs(){return $o().memoizedState}function $s(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=oo(n);var r=so(t,e,n);r!==null&&(Nd(r,t,n),co(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function ec(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)?ac(t,n):(n=hi(e,t,n,r),n!==null&&(Nd(n,e,r),oc(n,t,r)))}function tc(e,t,n){nc(e,t,n,Ad())}function nc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ac(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Mr(s,o))return mi(e,t,i,0),Yu===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Nd(n,e,r),oc(n,t,r),!0}return!1}function rc(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(i(479))}else t=hi(e,n,r,2),t!==null&&Nd(t,e,2)}function ic(e){var t=e.alternate;return e===No||t!==null&&t===No}function ac(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}var sc={readContext:ha,use:ns,useCallback:Uo,useContext:Uo,useEffect:Uo,useImperativeHandle:Uo,useLayoutEffect:Uo,useInsertionEffect:Uo,useMemo:Uo,useReducer:Uo,useRef:Uo,useState:Uo,useDebugValue:Uo,useDeferredValue:Uo,useTransition:Uo,useSyncExternalStore:Uo,useId:Uo,useHostTransitionStatus:Uo,useFormState:Uo,useActionState:Uo,useOptimistic:Uo,useMemoCache:Uo,useCacheRefresh:Uo,useEffectEvent:Uo},cc={readContext:ha,use:ns,useCallback:function(e,t){return Qo().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),As(4194308,4,Rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){As(4,2,e,t)},useMemo:function(e,t){var n=Qo();t=t===void 0?null:t;var r=e();if(Ro){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Qo();if(n!==void 0){var i=n(t);if(Ro){We(!0);try{n(t)}finally{We(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ec.bind(null,No,e),[r.memoizedState,e]},useRef:function(e){var t=Qo();return e={current:e},t.memoizedState=e},useState:function(e){e=ms(e);var t=e.queue,n=tc.bind(null,No,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Bs,useDeferredValue:function(e,t){return Us(Qo(),e,t)},useTransition:function(){var e=ms(!1);return e=Gs.bind(null,No,e.queue,!0,!1),Qo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=No,a=Qo();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yu===null)throw Error(i(349));Zu&127||ls(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ms(ds.bind(null,r,o,e),[e]),r.flags|=2048,Os(9,{destroy:void 0},us.bind(null,r,o,n,t),null),n},useId:function(){var e=Qo(),t=Yu.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=zo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Xs,useFormState:Cs,useActionState:Cs,useOptimistic:function(e){var t=Qo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=rc.bind(null,No,!0,n),n.dispatch=t,[e,t]},useMemoCache:rs,useCacheRefresh:function(){return Qo().memoizedState=$s.bind(null,No)},useEffectEvent:function(e){var t=Qo(),n={impl:e};return t.memoizedState=n,function(){if(Ju&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},lc={readContext:ha,use:ns,useCallback:Vs,useContext:ha,useEffect:Ns,useImperativeHandle:zs,useInsertionEffect:Is,useLayoutEffect:Ls,useMemo:Hs,useReducer:as,useRef:ks,useState:function(){return as(is)},useDebugValue:Bs,useDeferredValue:function(e,t){return Ws($o(),Po.memoizedState,e,t)},useTransition:function(){var e=as(is)[0],t=$o().memoizedState;return[typeof e==`boolean`?e:ts(e),t]},useSyncExternalStore:cs,useId:Zs,useHostTransitionStatus:Xs,useFormState:ws,useActionState:ws,useOptimistic:function(e,t){return hs($o(),Po,e,t)},useMemoCache:rs,useCacheRefresh:Qs,useEffectEvent:Fs},uc={readContext:ha,use:ns,useCallback:Vs,useContext:ha,useEffect:Ns,useImperativeHandle:zs,useInsertionEffect:Is,useLayoutEffect:Ls,useMemo:Hs,useReducer:ss,useRef:ks,useState:function(){return ss(is)},useDebugValue:Bs,useDeferredValue:function(e,t){var n=$o();return Po===null?Us(n,e,t):Ws(n,Po.memoizedState,e,t)},useTransition:function(){var e=ss(is)[0],t=$o().memoizedState;return[typeof e==`boolean`?e:ts(e),t]},useSyncExternalStore:cs,useId:Zs,useHostTransitionStatus:Xs,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){var n=$o();return Po===null?(n.baseState=e,[e,n.queue.dispatch]):hs(n,Po,e,t)},useMemoCache:rs,useCacheRefresh:Qs,useEffectEvent:Fs};function dc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=oo(r);i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Nd(t,e,r),co(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=oo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Nd(t,e,r),co(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=oo(n);r.tag=2,t!=null&&(r.callback=t),t=so(e,r,n),t!==null&&(Nd(t,e,n),co(t,e,n))}};function pc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Nr(n,r)||!Nr(i,a):!0}function mc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fc.enqueueReplaceState(t,t.state,null)}function hc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function gc(e){li(e)}function _c(e){console.error(e)}function vc(e){li(e)}function yc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function bc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function xc(e,t,n){return n=oo(n),n.tag=3,n.payload={element:null},n.callback=function(){yc(e,t)},n}function Sc(e){return e=oo(e),e.tag=3,e}function Cc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){bc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){bc(t,n,r),typeof i!=`function`&&(_d===null?_d=new Set([this]):_d.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function wc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=xo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return So===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),pf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),pf(e,r,a)),!1}throw Error(i(435,n.tag))}return pf(e,r,a),Gd(),!1}if(Ji)return t=xo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ji(r,n),a=xc(e.stateNode,r,a),lo(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ji(o,n),ud===null?ud=[o]:ud.push(o),id!==4&&(id=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=xc(n.stateNode,r,e),lo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(_d===null||!_d.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Sc(a),Cc(a,e,n,r),lo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Tc=Error(i(461)),Ec=!1;function Dc(e,t,n,r){t.child=e===null?no(t,null,n,r):to(t,e.child,n,r)}function Oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=Go(e,t,n,o,a,i),s=Yo(),e!==null&&!Ec?(Xo(e,t,i),nl(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,Dc(e,t,r,i),t.child)}function kc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Ac(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!rl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Nr:n,n(o,r)&&e.ref===t.ref)return nl(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Nr(a,r)&&e.ref===t.ref){if(Ec=!1,t.pendingProps=r=a,rl(e,i))e.flags&131072&&(Ec=!0);else return t.lanes=e.lanes,nl(e,t,i)}}return Rc(e,t,n,r,i)}function jc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Nc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&La(t,a===null?null:a.cachePool),a===null?yo():vo(t,a),To(t);else return r=t.lanes=536870912,Nc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&La(t,null),yo(),Eo()):(La(t,a.cachePool),vo(t,a),Eo(),t.memoizedState=null);return Dc(e,t,i,n),t.child}function Mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Nc(e,t,n,r,i){var a=Ia();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&La(t,null),yo(),To(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Pc(e,t){return t=qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fc(e,t,n){return to(t,e.child,null,n),e=Pc(t,t.pendingProps),e.flags|=2,Do(t),t.memoizedState=null,e}function Ic(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Pc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Mc(null,e);if(wo(t),(e=qi)?(e=om(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(wo(t),a){if(t.flags&256)t.flags&=-257,t=Fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ec||fa(e,t,n,!1),a=(n&e.childLanes)!==0,Ec||a){if(go.current===null){if(r=Yu,r!==null&&(s=lt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Nd(r,e,s),Tc;Gd()}t=Fc(e,t,n)}else e=o.treeContext,qi=um(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Pc(t,r),t.flags|=134221824;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Rc(e,t,n,r,i){return ma(t),n=Go(e,t,n,r,void 0,i),r=Yo(),e!==null&&!Ec?(Xo(e,t,i),nl(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,Dc(e,t,n,i),t.child)}function zc(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=qo(t,r,n,i),Ko(e),r=Yo(),e!==null&&!Ec?(Xo(e,t,a),nl(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,Dc(e,t,n,a),t.child)}function Bc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=fc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},io(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(dc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&fc.enqueueReplaceState(a,a.state,null),po(t,r,a,i),fo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=hc(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&mc(t,a,r,o),ro=!1;var f=t.memoizedState;a.state=f,po(t,r,a,i),fo(),l=t.memoizedState,s||f!==l||ro?(typeof d==`function`&&(dc(t,n,d,r),l=t.memoizedState),(c=ro||pc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ao(e,t),o=t.memoizedProps,u=hc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&mc(t,a,r,c),ro=!1,f=t.memoizedState,a.state=f,po(t,r,a,i),fo();var p=t.memoizedState;o!==d||f!==p||ro||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(dc(t,n,s,r),p=t.memoizedState),(u=ro||pc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Lc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=to(t,e.child,null,i),t.child=to(t,null,n,i)):Dc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=nl(e,t,i),e}function Vc(e,t,n,r){return na(),t.flags|=256,Dc(e,t,n,r),t.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uc(e){return{baseLanes:e,cachePool:Ra()}}function Wc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cd),e}function Gc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Oo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(Ji){if(i?Co(t):Eo(),(e=qi)?(e=om(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Eo(),i=t.mode,a=qc({mode:`hidden`,children:a},i),r=Ei(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Uc(n),r.childLanes=Wc(e,o,n),t.memoizedState=Hc,Mc(null,r)):(Co(t),Kc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Yc(e,t,a,o,r,c,s,n)}return i?(Eo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ci(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ei(i,a,n,null),i.flags|=2):i=Ci(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Mc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Uc(n):(a=i.cachePool,a===null?a=Ra():(s=xa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Wc(e,o,n),t.memoizedState=Hc,Mc(e.child,r)):(Co(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Kc(e,t){return t=qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function qc(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Jc(e,t,n){return to(t,e.child,null,n),e=Kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Co(t),t.flags&=-257,Jc(e,t,c)):t.memoizedState===null?(Eo(),o=a.fallback,s=t.mode,a=qc({mode:`visible`,children:a.children},s),o=Ei(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,to(t,e.child,null,c),a=t.child,a.memoizedState=Uc(c),a.childLanes=Wc(e,r,c),t.memoizedState=Hc,Mc(null,a)):(Eo(),t.child=e.child,t.flags|=128,null);if(Co(t),cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ia({value:a,source:null,stack:null})),Jc(e,t,c)}if(Ec||fa(e,t,c,!1),r=(c&e.childLanes)!==0,Ec||r){if(go.current!==null)return Jc(e,t,c);if(r=Yu,r!==null&&(a=lt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,gi(e,a),Nd(r,e,a),Tc;return sm(o)||Gd(),Jc(e,t,c)}return sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,qi=um(o.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Kc(t,a.children),t.flags|=134221824,t)}function Xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Zc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&jo(n)===null&&(t=e),e=e.sibling}return t}function Qc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function $c(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function el(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Oo.current;if(t.flags&128)return ko(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,ko(t,o),i===`backwards`&&e!==null?($c(e),Dc(e,t,r,n),$c(e)):Dc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xc(e,n,t);else if(e.tag===19)Xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Zc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,$c(t)),Qc(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&jo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qc(t,!0,n,null,a,r);break;case`together`:Qc(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Zc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qc(t,!1,i,n,a,r)}return t.child}function tl(e,t,n){var r=t.pendingProps;return ca(t,t.type,r.value),Dc(e,t,r.children,n),t.child}function nl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ad|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&pa(e)))}function il(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:U(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,wo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Co(t),t.flags|=128,null;r=fa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Gc(e,t,n):(Co(t),e=nl(e,t,n),e===null?null:e.sibling)}Co(t);break;case 19:if(t.flags&128)return el(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return el(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ko(t,Oo.current),r)break;return null;case 22:return t.lanes=0,jc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return nl(e,t,n)}function al(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ec=!0;else{if(!rl(e,n)&&!(t.flags&128))return Ec=!1,il(e,t,n);Ec=!!(e.flags&131072)}}else Ec=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ga(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=hc(e,r),t.tag=1,t=Bc(null,t,e,r,n)):(t.tag=0,t=Rc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=Oc(null,t,e,r,n);break a}if(a===I){t.tag=14,t=kc(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=tl(null,t,n);break a}}throw t=ce(e)||e,Error(i(306,t,``))}}return t;case 0:return Rc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=hc(r,t.pendingProps),Bc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ao(e,t),po(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),fo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Vc(e,t,r,n);break a}if(r!==a){a=ji(Error(i(424)),t),ia(a),t=Vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=um(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=no(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(na(),r===a){t=nl(e,t,n);break a}Dc(e,t,r,n)}t=t.child}return t;case 26:return Lc(e,t),e===null?(n=Pm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(t.stateNode=pp(t.type,t.pendingProps,ge.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return U(t),e===null&&Ji&&(r=t.stateNode=gm(t.type,t.pendingProps,ge.current),Ki=t,Xi=!0,a=qi,Cp(t.type)?(dm=a,qi=um(r.firstChild)):qi=a),Dc(e,t,t.pendingProps.children,n),Lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=im(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,Ki=t,qi=um(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),U(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,mp(a,o)?r=null:s!==null&&mp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Go(e,t,Jo,null,null,n),ch._currentValue=a),Lc(e,t),Dc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=am(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Gc(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=to(t,null,r,n):Dc(e,t,r,n),t.child;case 11:return Oc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Lc(e,t),Dc(e,t,r,n),t.child;case 8:return Dc(e,t,t.pendingProps.children,n),t.child;case 12:return Dc(e,t,t.pendingProps.children,n),t.child;case 10:return tl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,Dc(e,t,r,n),t.child;case 14:return kc(e,t,t.type,t.pendingProps,n);case 15:return Ac(e,t,t.type,t.pendingProps,n);case 19:return el(e,t,n);case 31:return Ic(e,t,n);case 22:return jc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Ia(),a===null&&(a=Yu,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},io(t),ca(t,xa,a)):((e.lanes&n)!==0&&(ao(e,t),po(t,null,null,n),fo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),Dc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:Ji&&Ui(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Lc(e,t),Dc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ol(e){e.flags|=4}function sl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Ym(t,r):Ym(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw Ka=Ha,Ba}}else e.flags&=-16777217}function cl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xm(t)){if(Hd())e.flags|=8192;else throw Ka=Ha,Ba}}function ll(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:rt(),e.lanes|=t,ld|=t)}function ul(e,t){if(!Ji)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function dl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function fl(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dl(t),null;case 1:return dl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?ol(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),dl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ol(t),o===null?(dl(t),sl(t,a,null,r,n)):(dl(t),cl(t,o))):o?o===e.memoizedState?(dl(t),t.flags&=-16777217):(ol(t),dl(t),cl(t,o)):(e=e.memoizedProps,e!==r&&ol(t),dl(t),sl(t,a,e,r,n)),null;case 27:if(be(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dl(t),t.subtreeFlags&=-33554433,null}e=me.current,ta(t)?$i(t,e):(e=gm(a,r,n),t.stateNode=e,ol(t))}return dl(t),t.subtreeFlags&=-33554433,null;case 5:if(be(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dl(t),t.subtreeFlags&=-33554433,null}if(o=me.current,ta(t))$i(t,o);else{var s=up(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ht]=t,o[gt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(rp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ol(t)}}return dl(t),t.subtreeFlags&=-33554433,sl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ht]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||Qi(t,!0)}else e=up(e).createTextNode(r),e[ht]=t,t.stateNode=e}return dl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ht]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Do(t),t):(Do(t),null);if(t.flags&128)throw Error(i(558))}return dl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ht]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Do(t),t):(Do(t),null)}return Do(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ll(t,t.updateQueue),dl(t),null);case 4:return ye(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,dl(t),null;case 10:return la(t.type),dl(t),null;case 19:if(Ao(t),r=t.memoizedState,r===null)return dl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ul(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jo(e),o!==null){for(t.flags|=128,ul(r,!1),e=o.updateQueue,t.updateQueue=e,ll(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return ko(t,Oo.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>hd&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}}else{if(!a){if(e=jo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ll(t,e),ul(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!Ji)return dl(t),null}else 2*Ne()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,o=Oo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||Ji?ko(t,o):(n=o,pe(xo,t),pe(Oo,n),So===null&&(So=t)),Ji&&Vi(t,r.treeForkCount),e}return dl(t),null;case 22:case 23:return Do(t),bo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(dl(t),t.subtreeFlags&6&&(t.flags|=8192)):dl(t),n=t.updateQueue,n!==null&&ll(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&fe(Fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),dl(t),null;case 25:return null;case 30:return t.flags|=33554432,dl(t),null}throw Error(i(156,t.tag))}function pl(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(Do(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Do(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ao(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ye(),null;case 10:return la(t.type),null;case 22:case 23:return Do(t),bo(),e!==null&&fe(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function ml(e,t){switch(Wi(t),t.tag){case 3:la(xa),ye();break;case 26:case 27:case 5:be(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&Do(t);break;case 13:Do(t);break;case 19:Ao(t);break;case 10:la(t.type);break;case 22:case 23:Do(t),bo(),e!==null&&fe(Fa);break;case 24:la(xa)}}function hl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ff(t,t.return,e)}}function gl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ff(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ff(t,t.return,e)}}function _l(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ho(t,n)}catch(t){ff(e,e.return,t)}}}function vl(e,t,n){n.props=hc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ff(e,t,n)}}function yl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=oi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Fp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Ip(e);f(e.child,!1,$p,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ff(e,t,n)}}function bl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ff(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ff(e,t,n)}else n.current=null}}function xl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)tm(e.stateNode,t[n])}function Sl(e){for(var t=e.return;t!==null&&(Tl(t)&&tm(e.stateNode,t.stateNode),!wl(t));)t=t.return}function Cl(e){for(var t=e.return;t!==null&&(Tl(t)&&nm(e.stateNode,t.stateNode),!wl(t));)t=t.return}function wl(e){return e.tag===5||e.tag===3||e.tag===27}function Tl(e){return e&&e.tag===7&&e.stateNode!==null}function El(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ff(e,e.return,t)}}function Dl(e,t,n){try{var r=e.stateNode;ap(r,e.type,n,t),r[gt]=t}catch(t){ff(e,e.return,t)}}function Ol(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cp(e.type)||e.tag===4}function kl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Cp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Al(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fn)),xl(e,r),zt=!0;else if(i!==4&&(i===27&&(xl(e,r),r=null,Cp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Al(e,t,n,r),e=e.sibling;e!==null;)Al(e,t,n,r),e=e.sibling}function jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),xl(e,r),zt=!0;else if(i!==4&&(i===27&&(xl(e,r),r=null,Cp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(jl(e,t,n,r),e=e.sibling;e!==null;)jl(e,t,n,r),e=e.sibling}function Ml(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);rp(t,r,n),t[ht]=e,t[gt]=n}catch(t){ff(e,e.return,t)}}var Nl=!1,Pl=null;function Fl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Nl=!0)}var Il=null;function Ll(){var e=Il;return Il=null,e}var Rl=0;function zl(e,t,n,r,i){return Rl=0,Bl(e.child,t,n,r,i)}function Bl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=kp(o);r.push(s),s.view&&(a=!0)}else a||kp(o).view&&(a=!0);Nl=!0,Ep(o,Rl===0?t:t+`_`+Rl,n),Rl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Bl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Vl(e,t){for(;e!==null;)e.tag===5?Dp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Vl(e.child,t)),e=e.sibling}function Hl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Hl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=ci(t.default,t.share),t!==`none`&&(zl(e,n,t,null,!1)||Vl(e.child,!1))}e=e.sibling}}function Ul(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=oi(r,n),a=ci(r.default,n.paired?r.share:r.enter);a===`none`?Hl(e):zl(e,i,a,null,!1)?(Hl(e),n.paired||t||Md(e,r.onEnter)):Vl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ul(e,t),e=e.sibling;else Hl(e)}function X(e){if(Pl!==null&&Pl.size!==0){var t=Pl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=ci(n.default,n.share);if(a!==`none`&&(zl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Md(e,n.onShare)):Vl(e.child,!1)),t.delete(r),t.size===0)break}}}X(e)}e=e.sibling}}}function Wl(e){if(e.tag===30){var t=e.memoizedProps,n=oi(t,e.stateNode),r=Pl===null?void 0:Pl.get(n),i=ci(t.default,r===void 0?t.exit:t.share);i!==`none`&&(zl(e,n,i,null,!1)?r===void 0?Md(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Pl.delete(n),Md(e,t.onShare)):Vl(e.child,!1)),Pl!==null&&X(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Wl(e),e=e.sibling;else Pl!==null&&X(e)}function Gl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=oi(t,e.stateNode);t=ci(t.default,t.update),e.flags&=-5,t!==`none`&&zl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Gl(e);e=e.sibling}}function Kl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Vl(e.child,!1))}Kl(e)}e=e.sibling}}function ql(e){if(e.tag===30)e.stateNode.paired=null,Vl(e.child,!1),Kl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e),e=e.sibling;else Kl(e)}function Jl(e){for(e=e.child;e!==null;)e.tag===30?Vl(e.child,!1):e.subtreeFlags&33554432&&Jl(e),e=e.sibling}function Yl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Rl<a.length){var l=a[Rl],u=kp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Ep(c,Rl===0?n:n+`_`+Rl,i),s&&e.flags&4||(Il===null&&(Il=[]),Il.push(c,Rl===0?r:r+`_`+Rl,t.memoizedProps)),Rl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Yl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Xl(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=oi(n,r),a=ci(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Ap)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Rl=0,i=Yl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Md(e,n.onUpdate))}else e.subtreeFlags&33554432&&Xl(e,t);e=e.sibling}}var Zl=!1,Ql=!1,$l=!1,eu=!1,tu=typeof WeakSet==`function`?WeakSet:Set,nu=null,ru=!1,iu=!1,au=!1,ou=!1;function su(e,t,n){if(e=e.containerInfo,cp=_h,e=Rr(e),zr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(lp={focusedElem:e,selectionRange:r},_h=!1,n=(n&335544064)===n,nu=t,t=n?9270:1024;nu!==null;){if(e=nu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Wl(r[a]);if(e.alternate===null&&e.flags&2)n&&Fl(e),cu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Wl(r),cu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Fl(e),cu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,nu=r):(n&&Gl(e),cu(n))}}Pl=null}function cu(e){for(;nu!==null;){var t=nu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=hc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){ff(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)rm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:rm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=oi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=ci(a.default,a.update),a!==`none`&&zl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,nu=r;break}nu=t.return}}function lu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ku(e,n),r&4&&hl(5,n);break;case 1:if(ku(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ff(n,n.return,e)}else{var i=hc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ff(n,n.return,e)}}}r&64&&_l(n),r&512&&yl(n,n.return);break;case 3:if(ku(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ho(e,t)}catch(e){ff(n,n.return,e)}}break;case 27:t===null&&r&4&&Ml(n);case 26:case 5:ku(e,n),t===null&&r&4&&El(n),r&512&&yl(n,n.return);break;case 12:ku(e,n);break;case 31:ku(e,n),r&4&&vu(e,n);break;case 13:ku(e,n),r&4&&yu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gf.bind(null,n),lm(e,n))));break;case 22:if(r=n.memoizedState!==null||Zl,!r){var a=t!==null&&t.memoizedState!==null||Ql;t=Zl,i=Ql,Zl=r,(Ql=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),ju(e,n,r)):ku(e,n),Zl=t,Ql=i}break;case 30:ku(e,n),r&512&&yl(n,n.return);break;case 7:r&512&&yl(n,n.return);default:ku(e,n)}}function uu(e,t){for(e=e.child;e!==null;)du(e,t),e=e.sibling}function du(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){ff(e,e.return,t)}fu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,zt=!0}catch(t){ff(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Tp(s,!0):Tp(e.stateNode,!1)}catch(t){ff(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&uu(e,t);break;default:uu(e,t)}}function fu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:du(n,r);break a;case 22:n.memoizedState===null&&fu(n,r);break a;default:fu(n,r)}}e=e.sibling}}function pu(e){var t=e.alternate;t!==null&&(e.alternate=null,pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mu=null,hu=!1;function gu(e,t,n){for(n=n.child;n!==null;)_u(e,t,n),n=n.sibling}function _u(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:Ql||bl(n,t),gu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Ql&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ql||bl(n,t),Cl(n);var r=mu,i=hu;Cp(n.type)&&(mu=n.stateNode,hu=!1),gu(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),mu=r,hu=i;break;case 5:Ql||bl(n,t),Cl(n);case 6:if(n.tag===6&&Cl(n),r=mu,i=hu,mu=null,gu(e,t,n),mu=r,hu=i,mu!==null){if(hu)try{(mu.nodeType===9?mu.body:mu.nodeName===`HTML`?mu.ownerDocument.body:mu).removeChild(n.stateNode),zt=!0}catch(e){ff(n,t,e)}else try{mu.removeChild(n.stateNode),zt=!0}catch(e){ff(n,t,e)}}break;case 18:mu!==null&&(hu?(e=mu,wp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Uh(e)):wp(mu,n.stateNode));break;case 4:r=mu,i=hu,mu=n.stateNode.containerInfo,hu=!0,gu(e,t,n),mu=r,hu=i;break;case 0:case 11:case 14:case 15:gl(2,n,t),Ql||gl(4,n,t),gu(e,t,n);break;case 1:Ql||(bl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&vl(n,t,r)),gu(e,t,n);break;case 21:gu(e,t,n);break;case 22:Ql=(r=Ql)||n.memoizedState!==null,gu(e,t,n),Ql=r;break;case 30:bl(n,t),gu(e,t,n);break;case 7:Ql||bl(n,t),gu(e,t,n);break;default:gu(e,t,n)}}function vu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Uh(e)}catch(e){ff(t,t.return,e)}}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Uh(e)}catch(e){ff(t,t.return,e)}}function bu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tu),t;default:throw Error(i(435,e.tag))}}function xu(e,t){var n=bu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function Su(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Cp(l.type)){mu=l.stateNode,hu=!1;break a}break;case 5:mu=l.stateNode,hu=!1;break a;case 3:case 4:mu=l.stateNode.containerInfo,hu=!0;break a}l=l.return}if(mu===null)throw Error(i(160));_u(s,c,o),mu=null,hu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wu(t,e,n),t=t.sibling}var Cu=null;function wu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Su(t,e,n),Tu(e),a&4&&(gl(3,e,e.return),hl(3,e),gl(5,e,e.return));break;case 1:Su(t,e,n),Tu(e),a&512&&(Ql||r===null||bl(r,r.return)),a&64&&Zl&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Cu,Su(t,e,n),Tu(e),a&512&&(Ql||r===null||bl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Zl)e.stateNode=pp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ct]||r[ht]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),rp(r,t,n),r[ht]=e,At(r),t=r;break a;case`link`:if(o=Km(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Km(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[ht]=e,At(r),t=r}e.stateNode=t}}else Zl||qm(o,e.type,e.stateNode)}else e.stateNode=Vm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Dl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||Ql||t.parentNode.removeChild(t)):a.count--,n===null?Zl||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:Su(t,e,n),Tu(e),a&512&&(Ql||r===null||bl(r,r.return)),r!==null&&a&4&&Dl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=$l,$l=!1,Su(t,e,n),$l=o,Tu(e),a&512&&(Ql||r===null||bl(r,r.return)),e.flags&32){t=e.stateNode;try{rn(t,``),zt=!0}catch(t){ff(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Dl(e,t,r===null?t:r.memoizedProps)),a&1024&&(eu=!0);break;case 6:if(Su(t,e,n),Tu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,zt=!0}catch(t){ff(e,e.return,t)}}break;case 3:if(zt=!1,Gm=null,o=Cu,Cu=xm(t.containerInfo),Su(t,e,n),Cu=o,Tu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Uh(t.containerInfo)}catch(t){ff(e,e.return,t)}eu&&(eu=!1,Eu(e)),zt=!1;break;case 4:a=$l,$l=Zl,r=Bt(),o=Cu,Cu=xm(e.stateNode.containerInfo),Su(t,e,n),Tu(e),Cu=o,zt&&iu&&(au=!0),zt=r,$l=a;break;case 12:Su(t,e,n),Tu(e);break;case 31:Su(t,e,n),Tu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 13:Su(t,e,n),Tu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(pd=Ne()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=Zl,l=Ql,u=$l;Zl=c||o,$l=u||o,Ql=l||s,Su(t,e,n),Ql=l,$l=u,Zl=c,Tu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||Zl||Ql||(t=s||Ql,n=Zl,r=Ql,Zl=o||Zl,Ql=t,Au(e,2),Zl=n,Ql=r),!o&&$l||uu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,xu(e,n))));break;case 19:Su(t,e,n),Tu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 30:a&512&&(Ql||r===null||bl(r,r.return)),a=Bt(),o=iu,s=(n&335544064)===n,c=e.memoizedProps,iu=s&&ci(c.default,c.update)!==`none`,Su(t,e,n),Tu(e),s&&r!==null&&zt&&(e.flags|=4),iu=o,zt=a;break;case 21:break;case 7:a&512&&(Ql||r===null||bl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Su(t,e,n),Tu(e)}}function Tu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ol(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Tl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(wl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;jl(e,kl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(rn(l,``),n.flags&=-33),jl(e,kl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Al(e,kl(e),u,s);break;default:throw Error(i(161))}}catch(t){ff(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,_h=!0,t.reset(),_h=!1),e=e.sibling}}function Du(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ou(t,e),t=t.sibling;else Xl(t,!1)}function Ou(e,t){var n=e.alternate;if(n===null)Ul(e,!1);else switch(e.tag){case 3:if(ou=ru=!1,Ll(),Du(t,e),!ru&&!au){if(e=Il,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Dp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),ou=!0}Il=null;break;case 5:Du(t,e);break;case 4:r=ru,ru=!1,Du(t,e),ru&&(au=!0),ru=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Du(t,e):Ul(e,!1));break;case 30:r=ru,i=Ll(),ru=!1,Du(t,e),ru&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=oi(a,o),o=oi(n.memoizedProps,o);var s=ci(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Rl=0,t=Yl(e,n,t,o,s,a,!0),Rl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Md(e,e.memoizedProps.onUpdate),Il=i):i!==null&&(i.push.apply(i,Il),Il=i),ru=e.flags&32?!0:r;break;default:Du(t,e)}}function ku(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)lu(e,t.alternate,t),t=t.sibling}function Au(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:gl(4,n,n.return),Au(n,r);break;case 1:bl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&vl(n,n.return,i),Au(n,r);break;case 27:r&2&&_m(n.stateNode,n.type,n.memoizedProps);case 5:bl(n,n.return),n.tag!==5&&n.tag!==27||Cl(n),Au(n,r);break;case 6:Cl(n);break;case 26:bl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||Ql||i.parentNode.removeChild(i),Au(n,r);break;case 22:n.memoizedState===null&&Au(n,r);break;case 30:bl(n,n.return),Au(n,r);break;case 7:bl(n,n.return);default:Au(n,r)}e=e.sibling}}function ju(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:ju(i,a,n),hl(4,a);break;case 1:if(ju(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ff(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)mo(l[i],c)}catch(e){ff(r,r.return,e)}}s&&o&64&&_l(a),yl(a,a.return);break;case 27:n&2&&Ml(a);case 5:a.tag!==5&&a.tag!==27||Sl(a),ju(i,a,n),s&&r===null&&o&4&&El(a),yl(a,a.return);break;case 6:Sl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Zl||qm(xm(c.ownerDocument),a.type,c),ju(i,a,n),s&&r===null&&o&4&&El(a),yl(a,a.return);break;case 12:ju(i,a,n);break;case 31:ju(i,a,n),s&&o&4&&vu(i,a);break;case 13:ju(i,a,n),s&&o&4&&yu(i,a);break;case 22:a.memoizedState===null&&ju(i,a,n),yl(a,a.return);break;case 30:ju(i,a,n),yl(a,a.return);break;case 7:yl(a,a.return);default:ju(i,a,n)}t=t.sibling}}function Mu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function Nu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Pu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Fu(e,t,n,r),t=t.sibling;else i&&Jl(t)}function Fu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&ql(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Pu(e,t,n,r),a&2048&&hl(9,t);break;case 1:Pu(e,t,n,r);break;case 3:Pu(e,t,n,r),i&&ou&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ca(a)));break;case 12:if(a&2048){Pu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){ff(t,t.return,e)}}else Pu(e,t,n,r);break;case 31:Pu(e,t,n,r);break;case 13:Pu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&ql(t),o._visibility&2?Pu(e,t,n,r):(o._visibility|=2,Iu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&ql(s),o._visibility&2?Pu(e,t,n,r):Lu(e,t)),a&2048&&Mu(s,t);break;case 24:Pu(e,t,n,r),a&2048&&Nu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Vl(a.child,!0),Vl(t.child,!0))),Pu(e,t,n,r);break;default:Pu(e,t,n,r)}}function Iu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Iu(a,o,s,c,i),hl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Iu(a,o,s,c,i)):u._visibility&2?Iu(a,o,s,c,i):Lu(a,o),i&&l&2048&&Mu(o.alternate,o);break;case 24:Iu(a,o,s,c,i),i&&l&2048&&Nu(o.alternate,o);break;default:Iu(a,o,s,c,i)}t=t.sibling}}function Lu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Lu(n,r),i&2048&&Mu(r.alternate,r);break;case 24:Lu(n,r),i&2048&&Nu(r.alternate,r);break;default:Lu(n,r)}t=t.sibling}}var Ru=8192;function zu(e,t,n){if(e.subtreeFlags&Ru)for(e=e.child;e!==null;)Bu(e,t,n),e=e.sibling}function Bu(e,t,n){switch(e.tag){case 26:zu(e,t,n),e.flags&Ru&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Qm(n,e)):$m(n,Cu,e.memoizedState,e.memoizedProps));break;case 5:zu(e,t,n),e.flags&Ru&&(e=e.stateNode,(t&335544128)===t&&Qm(n,e));break;case 3:case 4:var r=Cu;Cu=xm(e.stateNode.containerInfo),zu(e,t,n),Cu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ru,Ru=16777216,zu(e,t,n),Ru=r):zu(e,t,n));break;case 30:if((e.flags&Ru)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Pl===null&&(Pl=new Map),Pl.set(r,i)}zu(e,t,n);break;default:zu(e,t,n)}}function Vu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nu=r,Gu(r,e)}Vu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Uu(e),e=e.sibling}function Uu(e){switch(e.tag){case 0:case 11:case 15:Hu(e),e.flags&2048&&gl(9,e,e.return);break;case 3:Hu(e);break;case 12:Hu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wu(e)):Hu(e);break;default:Hu(e)}}function Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nu=r,Gu(r,e)}Vu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gl(8,t,t.return),Wu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wu(t));break;default:Wu(t)}e=e.sibling}}function Gu(e,t){for(;nu!==null;){var n=nu;switch(n.tag){case 0:case 11:case 15:gl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nu=r;else a:for(n=e;nu!==null;){r=nu;var i=r.sibling,a=r.return;if(pu(r),r===n){nu=null;break a}if(i!==null){i.return=a,nu=i;break a}nu=a}}}var Ku={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},qu=typeof WeakMap==`function`?WeakMap:Map,Ju=0,Yu=null,Xu=null,Zu=0,Qu=0,$u=null,ed=!1,td=!1,nd=!1,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=null,dd=null,fd=!1,pd=0,md=0,hd=1/0,gd=null,_d=null,vd=0,yd=null,bd=null,xd=0,Sd=0,Cd=null,wd=null,Td=null,Ed=null,Dd=null,Od=0,kd=null;function Ad(){return Ju&2&&Zu!==0?Zu&-Zu:z.T===null?ft():Nf()}function jd(){if(cd===0){if(!(Zu&536870912)||Ji){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),cd=e}else cd=536870912}return e=xo.current,e!==null&&(e.flags|=32),cd}function Md(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Fp(oi(e.memoizedProps,n))),Ed===null&&(Ed=[]),Ed.push(t.bind(null,r))}}function Nd(e,t,n){(e===Yu&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)&&(Bd(e,0),Ld(e,Zu,cd,!1)),at(e,n),(!(Ju&2)||e!==Yu)&&(e===Yu&&(!(Ju&2)&&(od|=n),id===4&&Ld(e,Zu,cd,!1)),Tf(e))}function Pd(e,t,n){if(Ju&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||et(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){td&&!r&&Ld(e,t,0,!1);break}if(n=e.current.alternate,o&&!Id(n))a=Kd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ud;var l=c.current.memoizedState.isDehydrated;if(l&&(Bd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(nd&&!l){c.errorRecoveryDisabledLanes|=o,od|=o,a=4;break a}o=dd,dd=a,o!==null&&(dd===null?dd=o:dd.push.apply(dd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Bd(e,0),Ld(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ld(r,t,cd,!ed);break a;case 2:dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pd+300-Ne(),10<a)){if(Ld(r,t,cd,!ed),$e(r,0,!0)!==0)break a;xd=t,r.timeoutHandle=_p(Fd.bind(null,r,n,dd,gd,fd,t,cd,od,ld,ed,o,`Throttled`,-0,0),a);break a}Fd(r,n,dd,gd,fd,t,cd,od,ld,ed,o,null,-0,0)}break}}while(1);Tf(e)}function Fd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fn},Pl=null,Bu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=rh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?pd-Ne():(a&4194048)===a?md-Ne():0,m=th(d,m),m!==null)?(xd=a,e.cancelPendingCommit=m(ef.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ld(e,a,o,!l)):ef(e,t,a,n,r,i,o,s,c,l,u,d)}function Id(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ld(e,t,n,r){t=tt(e,t),t&=~sd,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&st(e,n,t)}function Rd(){return Ju&6?!0:(Ef(0,!1),!1)}function zd(){if(Xu!==null){if(Qu===0)var e=Xu.return;else e=Xu,sa=oa=null,Zo(e),Ya=null,Xa=0,e=Xu;for(;e!==null;)ml(e.alternate,e),e=e.return;Xu=null}}function Bd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,vp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xd=0,zd(),Yu=e,Xu=n=Ci(e.current,null),Zu=t,Qu=0,$u=null,ed=!1,td=et(e,t),nd=!1,ld=cd=sd=od=ad=id=0,dd=ud=null,fd=!1,rd=tt(e,t),pi(),n}function Vd(e,t){No=null,z.H=sc,t===za||t===Va?(t=qa(),Qu=3):t===Ba?(t=qa(),Qu=4):Qu=t===Tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Xu===null&&(id=1,yc(e,ji(t,e.current)))}function Hd(){var e=xo.current;return e===null?!0:(Zu&4194048)===Zu?So===null:(Zu&62914560)===Zu||Zu&536870912?e===So:!1}function Ud(){var e=z.H;return z.H=sc,e===null?sc:e}function Wd(){var e=z.A;return z.A=Ku,e}function Gd(){id=4,ed||(Zu&4194048)!==Zu&&xo.current!==null||(td=!0),!(ad&134217727)&&!(od&134217727)||Yu===null||Ld(Yu,Zu,cd,!1)}function Kd(e,t,n){var r=Ju;Ju|=2;var i=Ud(),a=Wd();(Yu!==e||Zu!==t)&&(gd=null,Bd(e,t)),t=!1;var o=id;a:do try{if(Qu!==0&&Xu!==null){var s=Xu,c=$u;switch(Qu){case 8:zd(),o=6;break a;case 3:case 2:case 9:case 6:xo.current===null&&(t=!0);var l=Qu;if(Qu=0,$u=null,Qd(e,s,c,l),n&&td){o=0;break a}break;default:l=Qu,Qu=0,$u=null,Qd(e,s,c,l)}}qd(),o=id;break}catch(t){Vd(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Ju=r,z.H=i,z.A=a,Xu===null&&(Yu=null,Zu=0,pi()),o}function qd(){for(;Xu!==null;)Xd(Xu)}function Jd(e,t){var n=Ju;Ju|=2;var r=Ud(),a=Wd();Yu!==e||Zu!==t?(gd=null,hd=Ne()+500,Bd(e,t)):td=et(e,t);a:do try{if(Qu!==0&&Xu!==null){t=Xu;var o=$u;b:switch(Qu){case 1:Qu=0,$u=null,Qd(e,t,o,1);break;case 2:case 9:if(Ua(o)){Qu=0,$u=null,Zd(t);break}t=function(){Qu!==2&&Qu!==9||Yu!==e||(Qu=7),Tf(e)},o.then(t,t);break a;case 3:Qu=7;break a;case 4:Qu=5;break a;case 7:Ua(o)?(Qu=0,$u=null,Zd(t)):(Qu=0,$u=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Xu.tag){case 26:s=Xu.memoizedState;case 5:case 27:var c=Xu;if(s?Xm(s):c.stateNode.complete){Qu=0,$u=null;var l=c.sibling;if(l!==null)Xu=l;else{var u=c.return;u===null?Xu=null:(Xu=u,Z(u))}break b}}Qu=0,$u=null,Qd(e,t,o,5);break;case 6:Qu=0,$u=null,Qd(e,t,o,6);break;case 8:zd(),id=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Vd(e,t)}while(1);return sa=oa=null,z.H=r,z.A=a,Ju=n,Xu===null?(Yu=null,Zu=0,pi(),id):0}function Yd(){for(;Xu!==null&&!je();)Xd(Xu)}function Xd(e){var t=al(e.alternate,e,rd);e.memoizedProps=e.pendingProps,t===null?Z(e):Xu=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=zc(n,t,t.pendingProps,t.type,void 0,Zu);break;case 11:t=zc(n,t,t.pendingProps,t.type.render,t.ref,Zu);break;case 5:Zo(t);var r=t;r===Ki&&(Ji?(ea(r),r.tag===5&&r.stateNode!=null&&(qi=r.stateNode)):(ea(r),Ji=!0));default:ml(n,t),t=Xu=wi(t,rd),t=al(n,t,rd)}e.memoizedProps=e.pendingProps,t===null?Z(e):Xu=t}function Qd(e,t,n,r){sa=oa=null,Zo(t),Ya=null,Xa=0;var i=t.return;try{if(wc(e,i,t,n,Zu)){id=1,yc(e,ji(n,e.current)),Xu=null;return}}catch(t){if(i!==null)throw Xu=i,t;id=1,yc(e,ji(n,e.current)),Xu=null;return}t.flags&32768?(Ji||r===1?e=!0:td||Zu&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=xo.current,r!==null&&r.tag===13&&(r.flags|=16384))),$d(t,e)):Z(t)}function Z(e){var t=e;do{if(t.flags&32768){$d(t,ed);return}e=t.return;var n=fl(t.alternate,t,rd);if(n!==null){Xu=n;return}if(t=t.sibling,t!==null){Xu=t;return}Xu=t=e}while(t!==null);id===0&&(id=5)}function $d(e,t){do{var n=pl(e.alternate,e);if(n!==null){n.flags&=32767,Xu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Xu=e;return}Xu=e=n}while(e!==null);id=6,Xu=null}function ef(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do lf();while(vd!==0);if(Ju&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Yu&&(Xu=Yu=null,Zu=0),bd=t,yd=e,xd=n,Cd=a,wd=r,tf(e,t,n,s,c,l,f)}}function tf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Sd=s,s|=fi,ot(e,n,s,r,i,a),Ed=null,(n&335544064)===n?(Dd=Ea(e),r=10262):(Dd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,vf(Le,function(){return uf(),null})):(e.callbackNode=null,e.callbackPriority=0),Nl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=z.T,z.T=null,i=B.p,B.p=2,a=Ju,Ju|=4;try{su(e,t,n)}finally{Ju=a,B.p=i,z.T=r}}vd=1,Nl?Td=Np(o,e.containerInfo,Dd,af,of,rf,sf,uf,nf,null,null):(af(),of(),sf())}function nf(e){if(vd!==0){var t=yd.onRecoverableError;t(e,{componentStack:null})}}function rf(){vd===3&&(vd=0,Ou(bd,yd),vd=4)}function af(){if(vd===1){vd=0;var e=yd,t=bd,n=xd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=z.T,z.T=null;var i=B.p;B.p=2;var a=Ju;Ju|=4;try{iu=au=!1,wu(t,e,n),n=lp;var o=Rr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Lr(s.ownerDocument.documentElement,s)){if(c!==null&&zr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Ir(s,h),v=Ir(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}_h=!!cp,lp=cp=null}finally{Ju=a,B.p=i,z.T=r}}e.current=t,vd=2}}function of(){if(vd===2){vd=0;var e=yd,t=bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=z.T,z.T=null;var r=B.p;B.p=2;var i=Ju;Ju|=4;try{lu(e,t.alternate,t)}finally{Ju=i,B.p=r,z.T=n}}vd=3}}function sf(){if(vd===4||vd===3){vd=0;var e=Td;Td=null,Me();var t=yd,n=bd,r=xd,i=wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?vd=5:(vd=0,bd=yd=null,cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(_d=null),dt(r),n=n.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=z.T,a=B.p,B.p=2,z.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{z.T=n,B.p=a}}if(i=Ed,o=Dd,Dd=null,i!==null&&(Ed=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);xd&3&&lf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===kd?Od++:(Od=0,kd=t):(Od=0,kd=null),Ef(0,!1)}}function cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function lf(){return Td!==null&&(Td.skipTransition(),Td=null),af(),of(),sf(),uf()}function uf(){if(vd!==5)return!1;var e=yd,t=Sd;Sd=0;var n=dt(xd),r=z.T,a=B.p;try{B.p=32>n?32:n,z.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,Ju&6)throw Error(i(331));var c=Ju;if(Ju|=4,Uu(o.current),Fu(o,o.current,s,n),Ju=c,Ef(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{B.p=a,z.T=r,cf(e,t)}}function df(e,t,n){t=ji(n,t),t=xc(e.stateNode,t,2),e=so(e,t,2),e!==null&&(at(e,2),Tf(e))}function ff(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=ji(n,e),n=Sc(2),r=so(t,n,2),r!==null&&(Cc(n,r,t,e),at(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(nd=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yu===e&&(Zu&n)===n&&(id===4||id===3&&(Zu&62914560)===Zu&&300>Ne()-pd?Ju&2?sd|=n:Bd(e,0):sd|=n,ld===Zu&&(ld=0)),Tf(e)}function hf(e,t){t===0&&(t=rt()),e=gi(e,t),e!==null&&(at(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),hf(e,n)}function vf(e,t){return ke(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=Zu,a=$e(r,r===Yu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&gp()&&(e=wf);for(var t=Ne(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}vd!==0&&vd!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=nt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Yu,n=Zu,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),dt(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=Af.bind(null,e),n=ke(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function Af(e,t){if(vd!==0&&vd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lf()&&e.callbackNode!==n)return null;var r=Zu;return r=$e(e,e===Yu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Pd(e,r,t),kf(e,Ne()),e.callbackNode!=null&&e.callbackNode===n?Af.bind(null,e):null)}function jf(e,t){if(lf())return null;Pd(e,t,!0)}function Mf(){xp(function(){Ju&6?ke(Fe,Df):Of()})}function Nf(){if(wf===0){var e=ka;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),wf=e}return wf}function Pf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:dn(e)}function Ff(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Pf((i[gt]||null).action),o=r.submitter;o&&(t=(t=o[gt]||null)?Pf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Nn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(wf!==0){var e=new FormData(i,o);qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var If=0;If<ri.length;If++){var Lf=ri[If];ii(Lf.toLowerCase(),`on`+(Lf[0].toUpperCase()+Lf.slice(1)))}ii(Xr,`onAnimationEnd`),ii(Zr,`onAnimationIteration`),ii(Qr,`onAnimationStart`),ii(`dblclick`,`onDoubleClick`),ii(`focusin`,`onFocus`),ii(`focusout`,`onBlur`),ii($r,`onTransitionRun`),ii(ei,`onTransitionStart`),ii(ti,`onTransitionCancel`),ii(Y,`onTransitionEnd`),Pt(`onMouseEnter`,[`mouseout`,`mouseover`]),Pt(`onMouseLeave`,[`mouseout`,`mouseover`]),Pt(`onPointerEnter`,[`pointerout`,`pointerover`]),Pt(`onPointerLeave`,[`pointerout`,`pointerover`]),W(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),W(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),W(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),W(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),W(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),W(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Rf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),zf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Rf));function Bf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function Vf(e,t){var n=t[vt];n===void 0&&(n=t[vt]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,Mt.forEach(function(t){t!==`selectionchange`&&(zf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(wh(t)){case 2:var i=vh;break;case 8:i=yh;break;default:i=bh}n=i.bind(null,t,n,e),i=void 0,!Sn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Kf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Et(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}yn(function(){var r=a,i=mn(n),s=[];a:{var c=ni.get(e);if(c!==void 0){var l=Nn,u=e;switch(e){case`keypress`:if(On(n)===0)break a;case`keydown`:case`keyup`:l=Xn;break;case`focusin`:u=`focus`,l=Vn;break;case`focusout`:u=`blur`,l=Vn;break;case`beforeblur`:case`afterblur`:l=Vn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=zn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Bn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Qn;break;case Xr:case Zr:case Qr:l=Hn;break;case Y:l=$n;break;case`scroll`:case`scrollend`:l=Pn;break;case`wheel`:l=er;break;case`copy`:case`cut`:case`paste`:l=Un;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=K;break;case`submit`:l=Zn;break;case`toggle`:case`beforetoggle`:l=tr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=bn(m,p),g!=null&&d.push(qf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==pn&&(u=n.relatedTarget||n.fromElement)&&(Et(u)||u[_t]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Et(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=zn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=K,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ot(c),h=l==null?u:Ot(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Et(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,Yf):null,c!==null&&Xf(s,u,c,d,!1),l!==null&&f!==null&&Xf(s,f,l,d,!0)))}a:{if(c=r?Ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=br;else if(mr(c)){if(xr)_=Ar;else{_=Or;var v=Dr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&cn(r.elementType)&&(_=br):_=kr;if(_&&=_(e,r)){hr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ot(r):window,e){case`focusin`:(mr(v)||v.contentEditable===`true`)&&(Vr=v,Hr=r,Ur=null);break;case`focusout`:Ur=Hr=Vr=null;break;case`mousedown`:Wr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Wr=!1,Gr(s,n,i);break;case`selectionchange`:if(Br)break;case`keydown`:case`keyup`:Gr(s,n,i)}var y;if(rr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else dr?lr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(or&&n.locale!==`ko`&&(dr||b!==`onCompositionStart`?b===`onCompositionEnd`&&dr&&(y=Dn()):(wn=i,Tn=`value`in wn?wn.value:wn.textContent,dr=!0)),v=Jf(r,b),0<v.length&&(b=new Wn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=ur(n),y!==null&&(b.data=y)))),(y=ar?fr(e,n):q(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new Wn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Ff(s,e,r,n,i)}Bf(s,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=bn(e,n),i!=null&&r.unshift(qf(e,i,a)),i=bn(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=bn(n,a),l!=null&&o.unshift(qf(n,l,c))):i||(l=bn(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
51
+ `).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function tp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||rn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&rn(e,``+r);else return;break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:sn(e,r,o);return;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=dn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&tp(e,t,`name`,a.name,a,null),tp(e,t,`formEncType`,a.formEncType,a,null),tp(e,t,`formMethod`,a.formMethod,a,null),tp(e,t,`formTarget`,a.formTarget,a,null)):(tp(e,t,`encType`,a.encType,a,null),tp(e,t,`method`,a.method,a,null),tp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=dn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=fn);return;case`onScroll`:r!=null&&Vf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Vf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=dn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Vf(`beforetoggle`,e),Vf(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=ln.get(n)||n,Vt(e,n,r);else return}zt=!0}function np(e,t,n,r,a,o){switch(n){case`style`:sn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)rn(e,r);else if(typeof r==`number`||typeof r==`bigint`)rn(e,``+r);else return;break;case`onScroll`:r!=null&&Vf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Vf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=fn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Nt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[gt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}zt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}return}zt=!0}function rp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Vf(`error`,e),Vf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:tp(e,t,o,s,n,null)}}a&&tp(e,t,`srcSet`,n.srcSet,n,null),r&&tp(e,t,`src`,n.src,n,null);return;case`input`:Vf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:tp(e,t,r,d,n,null)}}Qt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Vf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:tp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&en(e,!!r,n,!0):en(e,!!r,t,!1);return;case`textarea`:for(s in Vf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:tp(e,t,s,c,n,null)}nn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:tp(e,t,l,r,n,null)}return;case`dialog`:Vf(`beforetoggle`,e),Vf(`toggle`,e),Vf(`cancel`,e),Vf(`close`,e);break;case`iframe`:case`object`:Vf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)Vf(Rf[r],e);break;case`image`:Vf(`error`,e),Vf(`load`,e);break;case`details`:Vf(`toggle`,e);break;case`embed`:case`source`:case`link`:Vf(`error`,e),Vf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:tp(e,t,u,r,n,null)}return;default:if(cn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&np(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&tp(e,t,c,r,n,null))}var ip={};function ap(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||tp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(zt=!0),o=m;break;case`name`:m!==f&&(zt=!0),a=m;break;case`checked`:m!==f&&(zt=!0),u=m;break;case`defaultChecked`:m!==f&&(zt=!0),d=m;break;case`value`:m!==f&&(zt=!0),s=m;break;case`defaultValue`:m!==f&&(zt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&tp(e,t,p,m,r,f)}}Zt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||tp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(zt=!0),p=o;break;case`defaultValue`:o!==l&&(zt=!0),c=o;break;case`multiple`:o!==l&&(zt=!0),s=o;default:o!==l&&tp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?en(e,!!n,n?[]:``,!1):en(e,!!n,t,!0)):en(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:tp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(zt=!0),p=a;break;case`defaultValue`:a!==o&&(zt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&tp(e,t,s,a,r,o)}tn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:tp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(zt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:tp(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&tp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:tp(e,t,u,p,r,m)}return;default:if(cn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&np(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||np(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&tp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||tp(e,t,f,p,r,m)}function op(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function sp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&op(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&op(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var cp=null,lp=null;function up(e){return e.nodeType===9?e:e.ownerDocument}function dp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function fp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function pp(e,t,n,r){return n=up(n).createElement(e),n[ht]=r,n[gt]=t,rp(n,e,t),At(n),n}function mp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var hp=null;function gp(){var e=window.event;return e&&e.type===`popstate`?e!==hp&&(hp=e,!0):(hp=null,!1)}var _p=typeof setTimeout==`function`?setTimeout:void 0,vp=typeof clearTimeout==`function`?clearTimeout:void 0,yp=typeof Promise==`function`?Promise:void 0,bp=typeof requestAnimationFrame==`function`?requestAnimationFrame:_p,xp=typeof queueMicrotask==`function`?queueMicrotask:yp===void 0?_p:function(e){return yp.resolve(null).then(e).catch(Sp)};function Sp(e){setTimeout(function(){throw e})}function Cp(e){return e===`head`}function wp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Uh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vm(e.ownerDocument.body)}n=i}while(n);Uh(t)}function Tp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Ep(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Dp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Op(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function kp(e){return Op(e.getBoundingClientRect(),getComputedStyle(e),e)}function Ap(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Op(t,n,e)}function jp(e){return e.documentElement.clientHeight}function Mp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Np(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(jp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Zm(f),u>eh){s.length=o;break}f=new Promise(Mp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Pp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Pp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Pp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Fp(e){return{name:e,group:new Pp(`group`,e),imagePair:new Pp(`image-pair`,e),old:new Pp(`old`,e),new:new Pp(`new`,e)}}function Ip(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Ip.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Vp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=zp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Lp,e,s,r)}this._eventListeners=a}};function Lp(e,t,n,r){return _(e).addEventListener(t,n,r),!1}Ip.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Vp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=zp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Rp,e,n,i),r.splice(t,1),a!==null&&a()}};function Rp(e,t,n,r){return _(e).removeEventListener(t,n,r),!1}function zp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Vp(e,t,n,r){if(e.length===0)return-1;r=Bp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Bp(a.optionsOrUseCapture)===r)return i}return-1}Ip.prototype.dispatchEvent=function(e){var t=p(this._fragmentFiber);if(t===null)return!0;t=_(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Ip.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Hp,e,void 0,void 0)};function Hp(e,t){return e.tag!==6&&(e=_(e),mm(e,t))}Ip.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Up,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Hp(t[n],e);n--);};function Up(e,t){return t.push(e),!1}Ip.prototype.blur=function(){var e=p(this._fragmentFiber);e!==null&&(e=_(e),e=up(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Wp,e,void 0,void 0))};function Wp(e,t){return e.tag!==6&&(e=_(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Ip.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag===6||(e=_(e),t.observe(e)),!1}Ip.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,Kp,e,void 0,void 0);for(var n=t=0;n<qp.length;n++){var r=qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):qp[t++]=r}qp.length=t}};function Kp(e,t){return e.tag===6||(e=_(e),t.unobserve(e)),!1}var qp=[],Jp=!1;function Yp(e,t,n){qp.push({fragmentInstance:e,observer:t,instance:n}),Jp||(Jp=!0,hm(function(){Jp=!1;var e=qp;qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Ip.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,Xp,e,void 0,void 0),e};function Xp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=_(e),t.push.apply(t,e.getClientRects());return!1}Ip.prototype.getRootNode=function(e){var t=p(this._fragmentFiber);return t===null?this:_(t).getRootNode(e)},Ip.prototype.compareDocumentPosition=function(e){var t=p(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Up,n,void 0,void 0);var r=_(t);if(n.length===0){if(n=r,m(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=h(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=_(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=_(n[0]),i=_(n[n.length-1]);var a=m(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Zp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Zp(e,t,n,r,i){var a=Et(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=p(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(f(t,!0,b,a,n),a=v,v=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(f(t,!0,x,a,r),a=v,y=v=null,t=a!==null)),t):!1}function Qp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Ip.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Up,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=h(this._fragmentFiber);if(r=n?r[1]||r[0]||p(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=_(r),Qp(e,n);return}if(r=_(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=_(a),Qp(a,n)):_(a).scrollIntoView(e),r+=n?-1:1}};function $p(e,t){return e=_(e),em(e,t),!1}function em(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<qp.length;i++){var a=qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(qp[r++]=a)}qp.length=r,n.observe(e)}),em(e,t))}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Yp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function rm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rm(n),Tt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function im(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ct])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=um(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=um(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=um(e.nextSibling),e===null))return null;return e}function sm(e){return e.data===`$?`||e.data===`$~`}function cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function um(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var dm=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return um(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function hm(e){bp(function(){bp(function(t){return e(t)})})}function gm(e,t,n){switch(t=up(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function _m(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&tp(e,t,r,null,ip,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===fn&&(e.onclick=null),Tt(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tt(e)}var ym=new Map,bm=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=B.d;B.d={f:Cm,r:wm,D:Dm,C:Om,L:km,m:Am,X:Mm,S:jm,M:Nm};function Cm(){var e=Sm.f(),t=Rd();return e||t}function wm(e){var t=Dt(e);t!==null&&t.tag===5&&t.type===`form`?Ys(t):Sm.r(e)}var Tm=typeof document>`u`?null:document;function Em(e,t,n){var r=Tm;if(r&&typeof t==`string`&&t){var i=Xt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),rp(t,`link`,e),At(t),r.head.appendChild(t)))}}function Dm(e){Sm.D(e),Em(`dns-prefetch`,e,null)}function Om(e,t){Sm.C(e,t),Em(`preconnect`,e,t)}function km(e,t,n){Sm.L(e,t,n);var r=Tm;if(r&&e&&t){var i=`link[rel="preload"][as="`+Xt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Xt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Xt(n.imageSizes)+`"]`)):i+=`[href="`+Xt(e)+`"]`;var a=i;switch(t){case`style`:a=Fm(e);break;case`script`:a=zm(e)}if(!(ym.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Im(a))||t===`script`&&r.querySelector(Bm(a))))){var o=r.createElement(`link`);rp(o,`link`,e),t===`style`&&(o[wt]=!0,o.onload=o.onerror=function(){jt(o)}),At(o),r.head.appendChild(o)}}}function Am(e,t){Sm.m(e,t);var n=Tm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Xt(r)+`"][href="`+Xt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zm(e)}if(!ym.has(a)&&(e=T({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bm(a)))return}r=n.createElement(`link`),rp(r,`link`,e),At(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=kt(r).hoistableStyles,a=Fm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Im(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Um(e,n);var c=o=r.createElement(`link`);At(c),rp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mm(e,t){Sm.X(e,t);var n=Tm;if(n&&e){var r=kt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=T({src:e,async:!0},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),At(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t){Sm.M(e,t);var n=Tm;if(n&&e){var r=kt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),At(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t,n,r){var a=(a=ge.current)?xm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Fm(n.href),t=kt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Fm(n.href);var o=kt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Im(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Rm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=zm(n),t=kt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Fm(e){return`href="`+Xt(e)+`"`}function Im(e){return`link[rel="stylesheet"][`+e+`]`}function Lm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Rm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[wt]){r.loading=1;return}}else t=e.createElement(`link`),t[wt]=!0,t.onload=t.onerror=jt.bind(null,t),rp(t,`link`,n),At(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function zm(e){return`[src="`+Xt(e)+`"]`}function Bm(e){return`script[async]`+e}function Vm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Xt(n.href)+`"]`);if(r)return t.instance=r,At(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),At(r),rp(r,`style`,a),Hm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Fm(n.href);var o=e.querySelector(Im(a));if(o)return t.state.loading|=4,t.instance=o,At(o),o;r=Lm(n),(a=ym.get(a))&&Um(r,a),o=(e.ownerDocument||e).createElement(`link`),At(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),rp(o,`link`,r),t.state.loading|=4,Hm(o,n.precedence,e),t.instance=o;case`script`:return o=zm(n.src),(a=e.querySelector(Bm(o)))?(t.instance=a,At(a),a):(r=n,(a=ym.get(o))&&(r=T({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),At(a),rp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hm(r,n.precedence,e));return t.instance}function Hm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gm=null;function Km(e,t,n){if(Gm===null){var r=new Map,i=Gm=new Map;i.set(n,r)}else i=Gm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ct]||a[ht]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Ym(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Xm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Qm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Zm(t),e.suspenseyImages.push(t)),e=ih.bind(e),t.decode().then(e,e))}function $m(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Fm(r.href),a=t.querySelector(Im(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,At(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),At(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),rp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var eh=0;function th(e,t){return e.stylesheets&&e.count===0&&oh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&eh===0&&(eh=62500*sp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>eh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function nh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)oh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function rh(){this.count--,nh(this)}function ih(){this.imgCount--,nh(this)}var ah=null;function oh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ah=new Map,t.forEach(sh,e),ah=null,rh.call(e))}function sh(e,t){if(!(t.state.loading&4)){var n=ah.get(e);if(n)var r=n.get(null);else{n=new Map,ah.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=rh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ch={$$typeof:N,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function lh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=it(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=it(0),this.hiddenUpdates=it(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function uh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new lh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},io(a),e}function dh(e){return e?(e=yi,e):yi}function fh(e,t,n,r,i,a){i=dh(i),r.context===null?r.context=i:r.pendingContext=i,r=oo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=so(e,r,t),n!==null&&(Nd(n,e,t),co(n,e,t))}function ph(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mh(e,t){ph(e,t),(e=e.alternate)&&ph(e,t)}function hh(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Nd(t,e,67108864),mh(e,67108864)}}function gh(e){if(e.tag===13||e.tag===31){var t=Ad();t=ut(t);var n=gi(e,t);n!==null&&Nd(n,e,t),mh(e,t)}}var _h=!0;function vh(e,t,n,r){var i=z.T;z.T=null;var a=B.p;try{B.p=2,bh(e,t,n,r)}finally{B.p=a,z.T=i}}function yh(e,t,n,r){var i=z.T;z.T=null;var a=B.p;try{B.p=8,bh(e,t,n,r)}finally{B.p=a,z.T=i}}function bh(e,t,n,r){if(_h){var i=xh(r);if(i===null)Kf(e,t,r,Sh,n),Nh(e,r);else if(Fh(i,e,t,n,r))r.stopPropagation();else if(Nh(e,r),t&4&&-1<Mh.indexOf(e)){for(;i!==null;){var a=Dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(Ju&6)&&(hd=Ne()+500,Ef(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Nd(s,a,2),Rd(),mh(a,2)}if(a=xh(r),a===null&&Kf(e,t,r,Sh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function xh(e){return e=mn(e),Ch(e)}var Sh=null;function Ch(e){if(Sh=null,e=Et(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sh=e,null}function wh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var Th=!1,Eh=null,Dh=null,Oh=null,kh=new Map,Ah=new Map,jh=[],Mh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Nh(e,t){switch(e){case`focusin`:case`focusout`:Eh=null;break;case`dragenter`:case`dragleave`:Dh=null;break;case`mouseover`:case`mouseout`:Oh=null;break;case`pointerover`:case`pointerout`:kh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ah.delete(t.pointerId)}}function Ph(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Dt(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fh(e,t,n,r,i){switch(t){case`focusin`:return Eh=Ph(Eh,e,t,n,r,i),!0;case`dragenter`:return Dh=Ph(Dh,e,t,n,r,i),!0;case`mouseover`:return Oh=Ph(Oh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return kh.set(a,Ph(kh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ah.set(a,Ph(Ah.get(a)||null,e,t,n,r,i)),!0}return!1}function Ih(e){var t=Et(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,pt(e.priority,function(){gh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,pt(e.priority,function(){gh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Lh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pn=r,n.target.dispatchEvent(r),pn=null}else return t=Dt(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Rh(e,t,n){Lh(e)&&n.delete(t)}function zh(){Th=!1,Eh!==null&&Lh(Eh)&&(Eh=null),Dh!==null&&Lh(Dh)&&(Dh=null),Oh!==null&&Lh(Oh)&&(Oh=null),kh.forEach(Rh),Ah.forEach(Rh)}function Bh(e,n){e.blockedOn===n&&(e.blockedOn=null,Th||(Th=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zh)))}var Vh=null;function Hh(e){Vh!==e&&(Vh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vh===e&&(Vh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Ch(r||n)===null)continue;break}var a=Dt(n);a!==null&&(e.splice(t,3),t-=3,qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Uh(e){function t(t){return Bh(t,e)}Eh!==null&&Bh(Eh,e),Dh!==null&&Bh(Dh,e),Oh!==null&&Bh(Oh,e),kh.forEach(t),Ah.forEach(t);for(var n=0;n<jh.length;n++){var r=jh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jh.length&&(n=jh[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&jh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[gt]||null;if(typeof a==`function`)o||Hh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[gt]||null)s=o.formAction;else if(Ch(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Hh(n)}}}function Wh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Gh(e){this._internalRoot=e}Kh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fh(n,Ad(),e,t,null,null)},Kh.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fh(e.current,2,null,e,null,null),Rd(),t[_t]=null}};function Kh(e){this._internalRoot=e}Kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=ft();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jh.length&&t!==0&&t<jh[n].priority;n++);jh.splice(n,0,e),n===0&&Ih(e)}};var qh=n.version;if(qh!==`19.3.1`)throw Error(i(527,qh,`19.3.1`));B.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Jh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:z,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yh.isDisabled&&Yh.supportsFiber)try{He=Yh.inject(Jh),Ue=Yh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=gc,s=_c,c=vc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=uh(e,1,!1,null,null,n,r,null,o,s,c,Wh),e[_t]=t.current,Wf(e),new Gh(t)}})),JC=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=qC()})),YC=()=>zg({opened:!1,empty:!1,selected:-1,listId:``,query:``,registeredActions:new Set}),XC=e=>Bg(e);function ZC(e,t){let n=t.getState();t.setState({...n,...e(t.getState())})}function QC(e){ZC(()=>({opened:!0,selected:-1}),e)}function $C(e){ZC(()=>({opened:!1}),e)}function ew(e){ZC(e=>({opened:!e.opened,selected:e.opened?e.selected:-1}),e)}function tw(e,t){t.updateState(t=>({...t,selected:e}))}function nw(e,t){t.updateState(t=>({...t,listId:e}))}function rw(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t instanceof ShadowRoot?t.host.children:t.children;for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=rw(e,n.shadowRoot);if(t)return t}let i=rw(e,n);if(i)return i}return null}function iw(e,t){let n=t.getState(),r=n.listId?rw(`#${n.listId}`):null,i=r?.querySelector(`[data-selected]`),a=r?.querySelectorAll(`[data-action]`)??[],o=ie(e===-1?a.length-1:e===a.length?0:e,0,a.length-1);return i?.removeAttribute(`data-selected`),a[o]?.scrollIntoView({block:`nearest`}),a[o]?.setAttribute(`data-selected`,`true`),tw(o,t),o}function aw(e){return iw(e.getState().selected+1,e)}function ow(e){return iw(e.getState().selected-1,e)}function sw(e){let t=e.getState();(t.listId?rw(`#${t.listId} [data-selected]`):null)?.click()}function cw(e,t){let n=t.getState();return n.registeredActions.add(e),()=>{n.registeredActions.delete(e)}}function lw(e,t){ZC(()=>({query:e}),t),Promise.resolve().then(()=>{iw(0,t),ZC(e=>({empty:e.query.trim().length>0&&e.registeredActions.size===0||!1}),t)})}function uw({clearQuery:e},t){t.updateState(t=>({...t,selected:-1,query:e?``:t.query,empty:!e&&t.empty}))}var dw={open:QC,close:$C,toggle:ew,updateState:ZC,setSelectedAction:tw,setListId:nw,selectAction:iw,selectNextAction:aw,selectPreviousAction:ow,triggerSelectedAction:sw,registerAction:cw,setQuery:lw,clearSpotlightState:uw};function fw(){let e=YC();return[e,{open:()=>QC(e),close:()=>$C(e),toggle:()=>ew(e)}]}var[pw,mw]=fw(),{open:hw,close:gw,toggle:_w}=mw;function vw(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}var[yw,bw]=T(`Spotlight component was not found in tree`),xw={root:`m_d2b315db`,content:`m_3cd250e0`,body:`m_d2abce9b`,search:`m_f366a061`,actionsList:`m_6e463822`,action:`m_d49bb8ef`,actionBody:`m_3d475731`,actionSection:`m_832642f6`,actionLabel:`m_6c2a1345`,actionDescription:`m_a6d9d78d`,empty:`m_82f78f74`,footer:`m_ddcaf054`,actionsGroup:`m_5a3e5f7b`},Sw={dimmedSections:!0,highlightQuery:!1},Cw=J(e=>{let{className:t,style:n,classNames:r,styles:i,id:a,description:o,label:s,leftSection:c,rightSection:l,children:u,dimmedSections:d,highlightQuery:f,highlightColor:p,closeSpotlightOnTrigger:m,onClick:h,onMouseDown:g,keywords:_,vars:v,...y}=K(`SpotlightAction`,Sw,e),b=bw(),x={classNames:r,styles:i},S=f&&typeof s==`string`?(0,G.jsx)(hm,{component:`span`,highlight:b.query,color:p,...b.getStyles(`actionLabel`,x),children:s}):(0,G.jsx)(`span`,{...b.getStyles(`actionLabel`,x),children:s});return(0,G.jsx)(Tc,{"data-action":!0,...b.getStyles(`action`,{className:t,style:n,...x}),...y,onMouseDown:e=>{e.preventDefault(),g?.(e)},onClick:e=>{h?.(e),(m??b.closeOnActionTrigger)&&dw.close(b.store)},tabIndex:-1,children:u||(0,G.jsxs)(G.Fragment,{children:[c&&(0,G.jsx)(Y,{component:`span`,mod:{position:`left`,dimmed:d},...b.getStyles(`actionSection`,x),children:c}),(0,G.jsxs)(`span`,{...b.getStyles(`actionBody`,x),children:[S,(0,G.jsx)(`span`,{...b.getStyles(`actionDescription`,x),children:o})]}),l&&(0,G.jsx)(Y,{component:`span`,mod:{position:`right`,dimmed:d},...b.getStyles(`actionSection`,x),children:l})]})})});Cw.classes=xw,Cw.displayName=`@mantine/spotlight/SpotlightAction`;var ww=J(e=>{let{className:t,style:n,styles:r,classNames:i,label:a,children:o,...s}=K(`SpotlightActionsGroup`,null,e),c=bw();return(0,G.jsx)(Y,{...c.getStyles(`actionsGroup`,{className:t,style:n,classNames:i,styles:r}),...s,__vars:{"--spotlight-label":`'${a?.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`)}'`},children:o})});ww.classes=xw,ww.displayName=`@mantine/core/SpotlightActionsGroup`;var Tw=J(e=>{let{className:t,style:n,id:r,children:i,vars:a,classNames:o,styles:s,...c}=K(`SpotlightActionsList`,null,e),l=bw(),u=`mantine-${(0,C.useId)().replace(/:/g,``)}`,d=r||u;return(0,C.useEffect)(()=>(dw.setListId(d,l.store),()=>dw.setListId(``,l.store)),[]),(0,G.jsx)(xc.Autosize,{...l.getStyles(`actionsList`,{className:t,style:n,classNames:o,styles:s}),type:`scroll`,scrollbarSize:`var(--spotlight-actions-list-padding)`,offsetScrollbars:`y`,id:d,...c,children:i})});Tw.classes=xw,Tw.displayName=`@mantine/spotlight/SpotlightActionsList`;var Ew=J(e=>{let{className:t,style:n,classNames:r,styles:i,...a}=K(`SpotlightEmpty`,null,e),o=bw();return(0,G.jsx)(Y,{...o.getStyles(`empty`,{classNames:r,styles:i,className:t,style:n}),...a})});Ew.classes=xw,Ew.displayName=`@mantine/spotlight/SpotlightEmpty`;var Dw=J(e=>{let{className:t,style:n,classNames:r,styles:i,...a}=K(`SpotlightFooter`,null,e),o=bw();return(0,G.jsx)(Y,{...o.getStyles(`footer`,{className:t,classNames:r,style:n,styles:i}),...a})});Dw.classes=xw,Dw.displayName=`@mantine/spotlight/SpotlightFooter`;function Ow(e,t){if(!e)return[];let n=()=>dw.open(t);return Array.isArray(e)?e.map(e=>[e,n]):[[e,n]]}var kw={size:600,yOffset:80,zIndex:N(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:pw,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`,maxHeight:400},Aw=J(e=>{let t=K(`SpotlightRoot`,kw,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,store:c,children:l,query:u,onQueryChange:d,transitionProps:f,clearQueryOnClose:p,shortcut:m,tagsToIgnore:h,triggerOnContentEditable:g,disabled:v,onSpotlightOpen:y,onSpotlightClose:b,forceOpened:x,closeOnActionTrigger:S,maxHeight:C,scrollable:w,attributes:T,...E}=t,{opened:D,query:O}=XC(c),k=typeof u==`string`?u:O,A=e=>{d?.(e),dw.setQuery(e,c)},j=q({name:`Spotlight`,classes:xw,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T}),{resolvedClassNames:M,resolvedStyles:N}=Qn({classNames:n,styles:a,props:t});return lt(Ow(m,c),h,g),fe(()=>{D?y?.():b?.()},[D]),v?null:(0,G.jsx)(yw,{value:{getStyles:j,query:k,setQuery:A,store:c,closeOnActionTrigger:S},children:(0,G.jsx)(Xm,{...E,withCloseButton:!1,opened:D||!!x,padding:0,onClose:()=>dw.close(c),className:r,style:i,classNames:M,styles:N,attributes:T,transitionProps:{...f,onExited:()=>{p&&A(``),dw.clearSpotlightState({clearQuery:p},c),f?.onExited?.()}},__vars:{"--spotlight-max-height":w?_(C):void 0},__staticSelector:`Spotlight`,"data-scrollable":w||void 0,children:l})})});Aw.classes=xw,Aw.displayName=`@mantine/spotlight/SpotlightRoot`;var jw={size:`lg`},Mw=J(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,vars:a,value:o,attributes:s,...c}=K(`SpotlightSearch`,jw,e),l=bw(),u=l.getStyles(`search`),[d,f]=(0,C.useState)(!1),p=e=>{r?.(e),!d&&(e.nativeEvent.code===`ArrowDown`&&(e.preventDefault(),dw.selectNextAction(l.store)),e.nativeEvent.code===`ArrowUp`&&(e.preventDefault(),dw.selectPreviousAction(l.store)),(e.nativeEvent.code===`Enter`||e.nativeEvent.code===`NumpadEnter`)&&(e.preventDefault(),dw.triggerSelectedAction(l.store)))};return(0,G.jsx)(Ld,{...u,classNames:[{input:u.className},t],styles:[{input:u.style},n],...c,value:o??l.query,onChange:e=>{l.setQuery(e.currentTarget.value),i?.(e)},onKeyDown:p,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});Mw.classes=xw,Mw.displayName=`@mantine/spotlight/SpotlightSearch`;function Nw(e){return Array.isArray(e)?e.map(e=>e.trim()).join(`,`).toLowerCase().trim():typeof e==`string`?e.toLowerCase().trim():``}function Pw(e){return e.reduce((e,t)=>`actions`in t?[...e,...t.actions.map(e=>({...e,group:t.group}))]:[...e,t],[])}function Fw(e){let t={},n=[];return e.forEach(e=>{e.group?(t[e.group]||(t[e.group]={pushed:!1,data:{group:e.group,actions:[]}}),t[e.group].data.actions.push(e),t[e.group].pushed||(t[e.group].pushed=!0,n.push(t[e.group].data))):n.push(e)}),n}var Iw=(e,t)=>{let n=e.trim().toLowerCase(),r=[[],[]];return Pw(t).forEach(e=>{e.label?.toLowerCase().includes(n)?r[0].push(e):(e.description?.toLowerCase().includes(n)||Nw(e.keywords).includes(n))&&r[1].push(e)}),Fw(r.flat())};function Lw(e,t){if(!Array.isArray(e))return[];let n=0;return e.reduce((e,r)=>{if(n>=t)return e;if(vw(r)){let i=Lw(r.actions,t-n);e.push({group:r.group,actions:i}),n+=i.length}else e.push(r),n+=1;return e},[])}var Rw={size:600,yOffset:80,limit:1/0,zIndex:N(`max`),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:`pop`},store:pw,filter:Iw,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:`mod + K`},zw=J(e=>{let{searchProps:t,filter:n,query:r,onQueryChange:i,actions:a,nothingFound:o,highlightQuery:s,limit:c,scrollAreaProps:l,...u}=K(`Spotlight`,Rw,e),[d,f]=Ye({value:r,defaultValue:``,finalValue:``,onChange:i}),p=Lw(n(d,a),c).map(e=>{if(vw(e)){let t=e.actions.map(({id:e,...t})=>(0,G.jsx)(Cw,{highlightQuery:s,...t},e));return(0,G.jsx)(ww,{label:e.group,children:t},e.group)}return(0,G.jsx)(Cw,{highlightQuery:s,...e},e.id)});return(0,G.jsxs)(Aw,{...u,query:d,onQueryChange:f,children:[(0,G.jsx)(Mw,{...t}),p.length>0&&(0,G.jsx)(Tw,{...l,children:p}),p.length===0&&o&&(0,G.jsx)(Ew,{children:o})]})});zw.classes=xw,zw.displayName=`@mantine/spotlight/Spotlight`,zw.Search=Mw,zw.ActionsList=Tw,zw.Action=Cw,zw.Empty=Ew,zw.ActionsGroup=ww,zw.Footer=Dw,zw.Root=Aw,zw.open=mw.open,zw.close=mw.close,zw.toggle=mw.toggle;function Bw(e){let t={subscribe(t){let n=null,r=!1,i=!1,a=!1;function o(){n===null?a=!0:i||(i=!0,typeof n==`function`?n():n&&n.unsubscribe())}return n=e({next(e){var n;r||(n=t.next)==null||n.call(t,e)},error(e){var n;r||(r=!0,(n=t.error)==null||n.call(t,e),o())},complete(){var e;r||(r=!0,(e=t.complete)==null||e.call(t),o())}}),a&&o(),{unsubscribe:o}},pipe(...e){return e.reduce(Vw,t)}};return t}function Vw(e,t){return t(e)}function Hw(e){let t=new AbortController;return new Promise((n,r)=>{let i=!1;function a(){i||(i=!0,o.unsubscribe())}t.signal.addEventListener(`abort`,()=>{r(t.signal.reason)});let o=e.subscribe({next(e){i=!0,n(e),a()},error(e){r(e)},complete(){t.abort(),a()}})})}function Uw(e){return e=>{let t=0,n=null,r=[];function i(){n||=e.subscribe({next(e){for(let n of r){var t;(t=n.next)==null||t.call(n,e)}},error(e){for(let n of r){var t;(t=n.error)==null||t.call(n,e)}},complete(){for(let t of r){var e;(e=t.complete)==null||e.call(t)}}})}function a(){if(t===0&&n){let e=n;n=null,e.unsubscribe()}}return Bw(e=>(t++,r.push(e),i(),{unsubscribe(){t--,a();let n=r.findIndex(t=>t===e);n>-1&&r.splice(n,1)}}))}}function Ww(e){let t=e,n=[],r=e=>{t!==void 0&&e.next(t),n.push(e)},i=e=>{n.splice(n.indexOf(e),1)},a=Bw(e=>(r(e),()=>{i(e)}));return a.next=e=>{if(t!==e){t=e;for(let t of n)t.next(e)}},a.get=()=>t,a}var Gw=JC();function Kw(e){return Bw(t=>{function n(t=0,r=e.op){let i=e.links[t];if(!i)throw Error(`No more links to execute - did you forget to add an ending link?`);return i({op:r,next(e){return n(t+1,e)}})}return n().subscribe(t)})}function qw(e){return Array.isArray(e)?e:[e]}function Jw(e){return t=>{let n=qw(e.true).map(e=>e(t)),r=qw(e.false).map(e=>e(t));return t=>Bw(i=>{let a=e.condition(t.op)?n:r;return Kw({op:t.op,links:a}).subscribe(i)})}}function Yw(e){"@babel/helpers - typeof";return Yw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Yw(e)}function Xw(e,t){if(Yw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Yw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zw(e){var t=Xw(e,`string`);return Yw(t)==`symbol`?t:t+``}function Qw(e,t,n){return(t=Zw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$w(Object(n),!0).forEach(function(t){Qw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tT(e){return!!e&&!Array.isArray(e)&&typeof e==`object`}function nT(e){return typeof e==`function`}function rT(){return Object.create(null)}var iT=typeof Symbol==`function`&&!!Symbol.asyncIterator;function aT(e){return iT&&tT(e)&&Symbol.asyncIterator in e}var oT=e=>e(),sT={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099},cT=[sT.BAD_GATEWAY,sT.SERVICE_UNAVAILABLE,sT.GATEWAY_TIMEOUT,sT.INTERNAL_SERVER_ERROR],lT=()=>{},uT=e=>{Object.freeze&&Object.freeze(e)};function dT(e,t,n){let r=t.join(`.`);return n[r]??(n[r]=new Proxy(lT,{get(r,i){if(typeof i==`string`&&i!==`then`)return dT(e,[...t,i],n)},apply(n,r,i){let a=t[t.length-1];if(a===`valueOf`||a===`toString`||a===`toJSON`)return`tRPC.proxy(${t.slice(0,-1).join(`.`)})`;let o={args:i,path:t};return a===`call`?o={args:i.length>=2?[i[1]]:[],path:t.slice(0,-1)}:a===`apply`&&(o={args:i.length>=2?i[1]:[],path:t.slice(0,-1)}),uT(o.args),uT(o.path),e(o)}})),n[r]}var fT=e=>dT(e,[],rT()),pT=e=>new Proxy(lT,{get(t,n){if(n!==`then`)return e(n)}});function mT(e){"@babel/helpers - typeof";return mT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},mT(e)}function hT(e,t){if(mT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(mT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gT(e){var t=hT(e,`string`);return mT(t)==`symbol`?t:t+``}function _T(e,t,n){return(t=gT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vT=class extends Error{constructor(e){super(yT(e)),Object.assign(this,e)}};function yT(e){if(`message`in e)return String(e.message)}function bT(e){if(e instanceof Error)return e;let t=typeof e;if(t!==`undefined`&&t!==`function`&&e!==null){if(t!==`object`)return Error(String(e));if(tT(e))return new vT(e)}}var xT=class extends Error{constructor(e){let t=bT(e.cause),n=e.message??t?.message??e.code;super(n,{cause:t}),_T(this,`cause`,void 0),_T(this,`code`,void 0),this.code=e.code,this.name=`TRPCError`,this.cause??=t}};function ST(e){return typeof e==`function`}async function CT(e,t){let{_def:n}=e,r=n.procedures[t];for(;!r;){let e=Object.keys(n.lazy).find(e=>t===e||t.startsWith(e+`.`));if(!e)return null;await n.lazy[e].load(),r=n.procedures[t]}return r}async function wT(e){let{type:t,path:n}=e,r=await CT(e.router,n);if(!r||!ST(r)||r._def.type!==t&&!e.allowMethodOverride)throw new xT({code:`NOT_FOUND`,message:`No "${t}"-procedure on path "${n}"`});if(r._def.type!==t&&e.allowMethodOverride&&r._def.type===`subscription`)throw new xT({code:`METHOD_NOT_SUPPORTED`,message:`Method override is not supported for subscriptions`});return r(e)}var TT,ET=new WeakMap,DT=()=>{};TT=Symbol.toStringTag;var OT=class e{constructor(e){_T(this,`promise`,void 0),_T(this,`subscribers`,[]),_T(this,`settlement`,null),_T(this,TT,`Unpromise`),this.promise=typeof e==`function`?new Promise(e):e;let t=this.promise.then(e=>{let{subscribers:t}=this;this.subscribers=null,this.settlement={status:`fulfilled`,value:e},t?.forEach(({resolve:t})=>{t(e)})});`catch`in t&&t.catch(e=>{let{subscribers:t}=this;this.subscribers=null,this.settlement={status:`rejected`,reason:e},t?.forEach(({reject:t})=>{t(e)})})}subscribe(){let e,t,{settlement:n}=this;if(n===null){if(this.subscribers===null)throw Error(`Unpromise settled but still has subscribers`);let n=AT();this.subscribers=jT(this.subscribers,n),e=n.promise,t=()=>{this.subscribers!==null&&(this.subscribers=NT(this.subscribers,n))}}else{let{status:r}=n;e=r===`fulfilled`?Promise.resolve(n.value):Promise.reject(n.reason),t=DT}return Object.assign(e,{unsubscribe:t})}then(e,t){let n=this.subscribe(),{unsubscribe:r}=n;return Object.assign(n.then(e,t),{unsubscribe:r})}catch(e){let t=this.subscribe(),{unsubscribe:n}=t;return Object.assign(t.catch(e),{unsubscribe:n})}finally(e){let t=this.subscribe(),{unsubscribe:n}=t;return Object.assign(t.finally(e),{unsubscribe:n})}static proxy(t){let n=e.getSubscribablePromise(t);return n===void 0?e.createSubscribablePromise(t):n}static createSubscribablePromise(t){let n=new e(t);return ET.set(t,n),ET.set(n,n),n}static getSubscribablePromise(e){return ET.get(e)}static resolve(t){let n=typeof t==`object`&&t&&`then`in t&&typeof t.then==`function`?t:Promise.resolve(t);return e.proxy(n).subscribe()}static async any(t){let n=(Array.isArray(t)?t:[...t]).map(e.resolve);try{return await Promise.any(n)}finally{n.forEach(({unsubscribe:e})=>{e()})}}static async race(t){let n=(Array.isArray(t)?t:[...t]).map(e.resolve);try{return await Promise.race(n)}finally{n.forEach(({unsubscribe:e})=>{e()})}}static async raceReferences(e){let t=e.map(kT);try{return await Promise.race(t)}finally{for(let e of t)e.unsubscribe()}}};function kT(e){return OT.proxy(e).then(()=>[e])}function AT(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function jT(e,t){return[...e,t]}function MT(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function NT(e,t){let n=e.indexOf(t);return n===-1?e:MT(e,n)}var PT,FT;(PT=Symbol).dispose??(PT.dispose=Symbol()),(FT=Symbol).asyncDispose??(FT.asyncDispose=Symbol());function IT(e,t){let n=e,r=n[Symbol.dispose];return n[Symbol.dispose]=()=>{t(),r?.call(n)},n}function LT(e,t){let n=e,r=n[Symbol.asyncDispose];return n[Symbol.asyncDispose]=async()=>{await t(),await r?.call(n)},n}var RT=Symbol();function zT(e){let t=null;return IT({start(){if(t)throw Error(`Timer already started`);return new Promise(n=>{t=setTimeout(()=>n(RT),e)})}},()=>{t&&clearTimeout(t)})}function BT(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}function VT(e,t){this.v=e,this.k=t}function HT(e){return new VT(e,0)}function UT(e){return function(){return new WT(e.apply(this,arguments))}}function WT(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof VT;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`?`return`:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(a.done?`return`:`normal`,n)},function(e){r(`throw`,e)})}catch(e){i(`throw`,e)}}function i(e,i){switch(e){case`return`:t.resolve({value:i,done:!0});break;case`throw`:t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}WT.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},WT.prototype.next=function(e){return this._invoke(`next`,e)},WT.prototype.throw=function(e){return this._invoke(`throw`,e)},WT.prototype.return=function(e){return this._invoke(`return`,e)};function GT(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var KT=0,qT=1,JT=0,YT=1,XT=0,ZT=1,QT=2,$T=class extends Error{constructor(e){super(`Received error from server`),this.data=e}},eE=e=>({getReader(){return new ReadableStream({start(t){e.on(`data`,e=>{t.enqueue(e)}),e.on(`end`,()=>{t.close()}),e.on(`error`,e=>{t.error(e)})}}).getReader()}});function tE(e){let t=`getReader`in e?e.getReader():eE(e).getReader(),n=``;return new ReadableStream({async pull(e){let{done:n,value:r}=await t.read();n?e.close():e.enqueue(r)},cancel(){return t.cancel()}}).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform(e,t){n+=e;let r=n.split(`
52
+ `);n=r.pop()??``;for(let e of r)t.enqueue(e)}}))}function nE(e){let t=tE(e),n=!1;return t.pipeThrough(new TransformStream({transform(e,t){if(n){let n=JSON.parse(e);t.enqueue(n)}else{let r=JSON.parse(e);t.enqueue(r),n=!0}}}))}function rE(e){let t=new Map;function n(){return Array.from(t.values()).every(e=>e.closed)}function r(){let t,r=new ReadableStream({start(e){t=e}}),i={enqueue:e=>t.enqueue(e),close:()=>{t.close(),a(),n()&&e.abort()},closed:!1,getReaderResource:()=>{let e=r.getReader();return IT(e,()=>{i.close(),e.releaseLock()})},error:e=>{t.error(e),a()}};function a(){Object.assign(i,{closed:!0,close:()=>{},enqueue:()=>{},getReaderResource:null,error:()=>{}})}return i}function i(e){let n=t.get(e);return n||(n=r(),t.set(e,n)),n}function a(e){for(let n of t.values())n.error(e)}function o(){for(let e of t.values())e.close()}return{getOrCreate:i,cancelAll:a,closeAll:o}}async function iE(e){let{deserialize:t=e=>e}=e,n=nE(e.from);t&&(n=n.pipeThrough(new TransformStream({transform(e,n){n.enqueue(t(e))}})));let r=GT(),i=rE(e.abortController);function a(t){let[n,r,a]=t,s=i.getOrCreate(a);switch(r){case KT:return oT(async()=>{try{var t=BT();let{value:n}=await t.u(s.getReaderResource()).read(),[r,i,a]=n;switch(i){case JT:return o(a);case YT:throw e.formatError?.call(e,{error:a})??new $T(a)}}catch(e){t.e=e}finally{t.d()}});case qT:return oT(UT(function*(){try{var t=BT();let n=t.u(s.getReaderResource());for(;;){let{value:t}=yield HT(n.read()),[r,i,a]=t;switch(i){case ZT:yield o(a);break;case XT:return o(a);case QT:throw e.formatError?.call(e,{error:a})??new $T(a)}}}catch(e){t.e=e}finally{t.d()}}))}}function o(e){let[[t],...n]=e;for(let e of n){let[n]=e,r=a(e);if(n===null)return r;t[n]=r}return t}let s=()=>{r&&=(r.reject(Error(`Stream closed before head was received`)),null),i.closeAll()},c=e=>{r?.reject(e),r=null,i.cancelAll(e)};return n.pipeTo(new WritableStream({write(e){if(r){let t=e;for(let[n,r]of Object.entries(e))t[n]=o(r);r.resolve(t),r=null;return}let t=e,[n]=t;i.getOrCreate(n).enqueue(t)},close:s,abort:c})).catch(t=>{var n;(n=e.onError)==null||n.call(e,{error:t}),c(t)}),[await r.promise]}var aE=`ping`,oE=`serialized-error`,sE=`connected`,cE=`return`;async function lE(e){try{var t=BT();let n=t.u(zT(e.timeoutMs)),r=await OT.race([e.promise,n.start()]);return r===RT?await e.onTimeout():r}catch(e){t.e=e}finally{t.d()}}function uE(e){let{deserialize:t=e=>e}=e,n=rT(),r=e.signal,i=null,a=()=>new ReadableStream({async start(a){let[o,s]=await Promise.all([e.url(),e.init()]),c=i=new e.EventSource(o,s);a.enqueue({type:`connecting`,eventSource:i,event:null}),c.addEventListener(sE,e=>{let t=JSON.parse(e.data);n=t,a.enqueue({type:`connected`,options:t,eventSource:c})}),c.addEventListener(oE,e=>{let n=e;a.enqueue({type:`serialized-error`,error:t(JSON.parse(n.data)),eventSource:c})}),c.addEventListener(aE,()=>{a.enqueue({type:`ping`,eventSource:c})}),c.addEventListener(cE,()=>{c.close(),a.close(),i=null}),c.addEventListener(`error`,e=>{c.readyState===c.CLOSED?a.error(e):a.enqueue({type:`connecting`,eventSource:c,event:e})}),c.addEventListener(`message`,e=>{let n=e,r={data:t(JSON.parse(n.data))};n.lastEventId&&(r.id=n.lastEventId),a.enqueue({type:`data`,data:r,eventSource:c})});let l=()=>{try{c.close(),a.close()}catch{}};r.aborted?l():r.addEventListener(`abort`,l)},cancel(){i?.close()}}),o=()=>{let e=a(),t=e.getReader();async function n(){await t.cancel(),i=null}return LT({read(){return t.read()},async recreate(){await n(),e=a(),t=e.getReader()}},n)};return oT(UT(function*(){try{var e=BT();let t=e.a(o());for(;;){let e=t.read(),r=n.reconnectAfterInactivityMs;r&&(e=lE({promise:e,timeoutMs:r,onTimeout:async()=>{let e={value:{type:`timeout`,ms:r,eventSource:i},done:!1};return await t.recreate(),e}}));let a=yield HT(e);if(a.done)return a.value;yield a.value}}catch(t){e.e=t}finally{yield HT(e.d())}}))}function dE(e){return e instanceof mE}function fE(e){return tT(e)&&tT(e.error)&&typeof e.error.code==`number`&&typeof e.error.message==`string`}function pE(e,t){return typeof e==`string`?e:tT(e)&&typeof e.message==`string`?e.message:t}var mE=class e extends Error{constructor(t,n){var r,i;let a=n?.cause;super(t,{cause:a}),Qw(this,`cause`,void 0),Qw(this,`shape`,void 0),Qw(this,`data`,void 0),Qw(this,`meta`,void 0),this.meta=n?.meta,this.cause=a,this.shape=n==null||(r=n.result)==null?void 0:r.error,this.data=n==null||(i=n.result)==null?void 0:i.error.data,this.name=`TRPCClientError`,Object.setPrototypeOf(this,e.prototype)}static from(t,n={}){let r=t;return dE(r)?(n.meta&&(r.meta=eT(eT({},r.meta),n.meta)),r):fE(r)?new e(r.error.message,eT(eT({},n),{},{result:r,cause:n.cause})):new e(pE(r,`Unknown error`),eT(eT({},n),{},{cause:r}))}};function hE(e){let t=e;return t?`input`in t?t:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}var gE=e=>typeof e==`function`;function _E(e){if(e)return e;if(typeof window<`u`&&gE(window.fetch))return window.fetch.bind(window);if(typeof globalThis<`u`&&gE(globalThis.fetch))return globalThis.fetch;throw Error(`No fetch implementation found`)}function vE(...e){let t=new AbortController,n=e.length,r=0,i=()=>{++r===n&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener(`abort`,i,{once:!0});return t.signal}function yE(...e){let t=new AbortController;for(let n of e)n?.aborted?t.abort():n?.addEventListener(`abort`,()=>t.abort(),{once:!0});return t.signal}function bE(e){return{url:e.url.toString(),fetch:e.fetch,transformer:hE(e.transformer),methodOverride:e.methodOverride}}function xE(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];t[n]=r}return t}var SE={query:`GET`,mutation:`POST`,subscription:`PATCH`};function CE(e){return`input`in e?e.transformer.input.serialize(e.input):xE(e.inputs.map(t=>e.transformer.input.serialize(t)))}var wE=e=>{let t=e.url.split(`?`),n=t[0].replace(/\/$/,``)+`/`+e.path,r=[];if(t[1]&&r.push(t[1]),`inputs`in e&&r.push(`batch=1`),e.type===`query`||e.type===`subscription`){let t=CE(e);t!==void 0&&e.methodOverride!==`POST`&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(n+=`?`+r.join(`&`)),n},TE=e=>{if(e.type===`query`&&e.methodOverride!==`POST`)return;let t=CE(e);return t===void 0?void 0:JSON.stringify(t)},EE=class extends Error{constructor(){let e=`AbortError`;super(e),this.name=e,this.message=e}},DE=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<`u`?new DOMException(`AbortError`,`AbortError`):new EE};async function OE(e){DE(e.signal);let t=e.getUrl(e),n=e.getBody(e),r=e.methodOverride??SE[e.type],i=await(async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),a=eT(eT(eT({},e.contentTypeHeader&&r!==`GET`?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{[e.trpcAcceptHeaderKey??`trpc-accept`]:e.trpcAcceptHeader}:void 0),i);return _E(e.fetch)(t,{method:r,signal:e.signal,body:n,headers:a})}var kE=()=>{throw Error(`Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new`)};function AE(e){let t=null,n=null,r=()=>{clearTimeout(n),n=null,t=null};function i(t){let n=[[]],r=0;for(;;){let o=t[r];if(!o)break;let s=n[n.length-1];if(o.aborted){var i;(i=o.reject)==null||i.call(o,Error(`Aborted`)),r++}else if(e.validate(s.concat(o).map(e=>e.key)))s.push(o),r++;else if(s.length===0){var a;(a=o.reject)==null||a.call(o,Error(`Input is too big for a single dispatch`)),r++}else n.push([])}return n}function a(){let n=i(t);r();for(let t of n){if(!t.length)continue;let n={items:t};for(let e of t)e.batch=n;e.fetch(n.items.map(e=>e.key)).then(async e=>{await Promise.all(e.map(async(e,t)=>{let r=n.items[t];try{var i;let t=await Promise.resolve(e);(i=r.resolve)==null||i.call(r,t)}catch(e){var a;(a=r.reject)==null||a.call(r,e)}r.batch=null,r.reject=null,r.resolve=null}));for(let e of n.items){var t;(t=e.reject)==null||t.call(e,Error(`Missing result`)),e.batch=null}}).catch(e=>{for(let r of n.items){var t;(t=r.reject)==null||t.call(r,e),r.batch=null}})}}function o(e){let r={aborted:!1,key:e,batch:null,resolve:kE,reject:kE},i=new Promise((e,n)=>{r.reject=n,r.resolve=e,t??=[],t.push(r)});return n??=setTimeout(a),i}return{load:o}}var jE=(e,...t)=>typeof e==`function`?e(...t):e;function ME(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function NE(e){let t=await jE(e.url);return e.connectionParams?t+`${t.includes(`?`)?`&`:`?`}connectionParams=1`:t}async function PE(e,t){let n={method:`connectionParams`,data:await jE(e)};return t.encode(n)}function FE(e){let{promise:t,resolve:n,reject:r}=ME();return e.addEventListener(`open`,()=>{e.removeEventListener(`error`,r),n()}),e.addEventListener(`error`,r),t}function IE(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function a(){r=setTimeout(()=>{e.send(`PING`),i=setTimeout(()=>{e.close()},n)},t)}function o(){clearTimeout(r),a()}function s(){clearTimeout(i),o()}e.addEventListener(`open`,a),e.addEventListener(`message`,({data:e})=>{clearTimeout(r),a(),e===`PONG`&&s()}),e.addEventListener(`close`,()=>{clearTimeout(r),clearTimeout(i)})}Qw(class e{constructor(t){if(Qw(this,`id`,++e.connectCount),Qw(this,`WebSocketPonyfill`,void 0),Qw(this,`urlOptions`,void 0),Qw(this,`keepAliveOpts`,void 0),Qw(this,`encoder`,void 0),Qw(this,`wsObservable`,Ww(null)),Qw(this,`openPromise`,null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive,this.encoder=t.encoder}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){if(this.openPromise)return this.openPromise;this.id=++e.connectCount;let t=NE(this.urlOptions).then(e=>new this.WebSocketPonyfill(e));this.openPromise=t.then(async e=>{this.ws=e,e.binaryType=`arraybuffer`,e.addEventListener(`message`,function({data:e}){e===`PING`&&this.send(`PONG`)}),this.keepAliveOpts.enabled&&IE(e,this.keepAliveOpts),e.addEventListener(`close`,()=>{this.ws===e&&(this.ws=null)}),await FE(e),this.urlOptions.connectionParams&&e.send(await PE(this.urlOptions.connectionParams,this.encoder))});try{await this.openPromise}finally{this.openPromise=null}}async close(){try{await this.openPromise}finally{var e;(e=this.ws)==null||e.close()}}},`connectCount`,0);var LE=class{constructor(e){Qw(this,`links`,void 0),Qw(this,`runtime`,void 0),Qw(this,`requestId`,void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){return Kw({links:this.links,op:eT(eT({},e),{},{context:e.context??{},id:++this.requestId})}).pipe(Uw())}async requestAsPromise(e){try{return(await Hw(this.$request(e))).result.data}catch(e){throw mE.from(e)}}query(e,t,n){return this.requestAsPromise({type:`query`,path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:`mutation`,path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:`subscription`,path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(e){switch(e.result.type){case`state`:var t;(t=n.onConnectionStateChange)==null||t.call(n,e.result);break;case`started`:var r;(r=n.onStarted)==null||r.call(n,{context:e.context});break;case`stopped`:var i;(i=n.onStopped)==null||i.call(n);break;case`data`:case void 0:var a;(a=n.onData)==null||a.call(n,e.result.data)}},error(e){var t;(t=n.onError)==null||t.call(n,e)},complete(){var e;(e=n.onComplete)==null||e.call(n)}})}},RE=Symbol.for(`trpc_untypedClient`),zE={query:`query`,mutate:`mutation`,subscribe:`subscription`},BE=e=>zE[e];function VE(e){let t=fT(({path:t,args:n})=>{let r=[...t],i=BE(r.pop()),a=r.join(`.`);return e[i](a,...n)});return pT(n=>n===RE?e:t[n])}function HE(e){return VE(new LE(e))}function UE(e){return e[RE]}function WE(e){let t=bE(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{let i=i=>({validate(e){if(n===1/0&&r===1/0)return!0;if(e.length>r)return!1;let a=e.map(e=>e.path).join(`,`),o=e.map(e=>e.input);return wE(eT(eT({},t),{},{type:i,path:a,inputs:o,signal:null})).length<=n},async fetch(n){let r=n.map(e=>e.path).join(`,`),a=n.map(e=>e.input),o=vE(...n.map(e=>e.signal)),s=new AbortController,c=await OE(eT(eT({},t),{},{signal:yE(o,s.signal),type:i,contentTypeHeader:`application/json`,trpcAcceptHeader:`application/jsonl`,trpcAcceptHeaderKey:e.streamHeader??`trpc-accept`,getUrl:wE,getBody:TE,inputs:a,path:r,headers(){return e.headers?typeof e.headers==`function`?e.headers({opList:n}):e.headers:{}}}));if(!c.ok){let e=await c.json();return`error`in e&&(e.error=t.transformer.output.deserialize(e.error)),n.map(()=>Promise.resolve({json:e,meta:{response:c}}))}let[l]=await iE({from:c.body,deserialize:e=>t.transformer.output.deserialize(e),formatError(e){let t=e.error;return mE.from({error:t})},abortController:s});return Object.keys(n).map(async e=>{let t=await Promise.resolve(l[e]);if(`result`in t){let e=await Promise.resolve(t.result);t={result:{data:await Promise.resolve(e.data)}}}return{json:t,meta:{response:c}}})}}),a={query:AE(i(`query`)),mutation:AE(i(`mutation`))};return({op:e})=>Bw(t=>{if(e.type===`subscription`)throw Error("Subscriptions are unsupported by `httpBatchStreamLink` - use `httpSubscriptionLink` or `wsLink`");let n=new AbortController,r=a[e.type].load(eT(eT({},e),{},{signal:yE(e.signal,n.signal)})),i=!1,o;return r.then(e=>{i=!0,o=e,`error`in e.json?t.error(mE.from(e.json,{meta:e.meta})):(`result`in e.json&&t.next({context:e.meta,result:e.json.result}),t.complete())}).catch(e=>{i=!0,t.error(mE.from(e,{meta:o?.meta}))}),()=>{i||n.abort()}})}}function GE(e,t){return!t||e!=null&&typeof e!=`object`?e:eT(eT({},e??{}),{},{lastEventId:t})}function KE(e){var t,n,r,i=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&(t=e[n])!=null)return t.call(e);if(r&&(t=e[r])!=null)return new qE(t.call(e));n=`@@asyncIterator`,r=`@@iterator`}throw TypeError(`Object is not async iterable`)}function qE(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return qE=function(e){this.s=e,this.n=e.next},qE.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new qE(e)}async function JE(e){let t=await jE(e.url);if(e.connectionParams){let n=await jE(e.connectionParams),r=t.includes(`?`)?`&`:`?`;t+=r+`connectionParams=`+encodeURIComponent(JSON.stringify(n))}return t}function YE(e){let t=hE(e.transformer);return()=>({op:n})=>Bw(r=>{let{type:i,path:a,input:o}=n;if(i!==`subscription`)throw Error(`httpSubscriptionLink only supports subscriptions`);let s,c=new AbortController,l=uE({url:async()=>wE({transformer:t,url:await JE(e),input:GE(o,s),path:a,type:i,signal:null}),init:()=>jE(e.eventSourceOptions,{op:n}),signal:yE(n.signal,c.signal),deserialize:e=>t.output.deserialize(e),EventSource:e.EventSource??globalThis.EventSource}),u=Ww({type:`state`,state:`connecting`,error:null}),d=u.subscribe({next(e){r.next({result:e})}});return oT(async()=>{var e=!1,t=!1,n;try{for(var i=KE(l),a;e=!(a=await i.next()).done;e=!1){let e=a.value;switch(e.type){case`ping`:break;case`data`:let t=e.data,n;t.id?(s=t.id,n={id:t.id,data:t}):n={data:t.data},r.next({result:n,context:{eventSource:e.eventSource}});break;case`connected`:r.next({result:{type:`started`},context:{eventSource:e.eventSource}}),u.next({type:`state`,state:`pending`,error:null});break;case`serialized-error`:{let t=mE.from({error:e.error});if(cT.includes(e.error.code)){u.next({type:`state`,state:`connecting`,error:t});break}throw t}case`connecting`:{let t=u.get(),n=e.event&&mE.from(e.event);if(!n&&t.state===`connecting`)break;u.next({type:`state`,state:`connecting`,error:n});break}case`timeout`:u.next({type:`state`,state:`connecting`,error:new mE(`Timeout of ${e.ms}ms reached while waiting for a response`)})}}}catch(e){t=!0,n=e}finally{try{e&&i.return!=null&&await i.return()}finally{if(t)throw n}}r.next({result:{type:`stopped`}}),u.next({type:`state`,state:`idle`,error:null}),r.complete()}).catch(e=>{r.error(mE.from(e))}),()=>{r.complete(),c.abort(),d.unsubscribe()}})}function XE(e,t){this.v=e,this.k=t}function ZE(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof XE;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`?`return`:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(a.done?`return`:`normal`,n)},function(e){r(`throw`,e)})}catch(e){i(`throw`,e)}}function i(e,i){switch(e){case`return`:t.resolve({value:i,done:!0});break;case`throw`:t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}ZE.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},ZE.prototype.next=function(e){return this._invoke(`next`,e)},ZE.prototype.throw=function(e){return this._invoke(`throw`,e)},ZE.prototype.return=function(e){return this._invoke(`return`,e)};function QE(e){"@babel/helpers - typeof";return QE=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},QE(e)}function $E(e,t){if(QE(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(QE(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function eD(e){var t=$E(e,`string`);return QE(t)==`symbol`?t:t+``}function tD(e,t,n){return(t=eD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nD(Object(n),!0).forEach(function(t){tD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iD(e){var t,n,r,i=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&(t=e[n])!=null)return t.call(e);if(r&&(t=e[r])!=null)return new aD(t.call(e));n=`@@asyncIterator`,r=`@@iterator`}throw TypeError(`Object is not async iterable`)}function aD(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return aD=function(e){this.s=e,this.n=e.next},aD.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new aD(e)}function oD(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function sD(e,t){if(e==null)return{};var n,r,i=oD(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var cD=[`cursor`,`direction`];function lD(e){return{path:e.path.join(`.`)}}function uD(e){return e.length>=3}function dD(e){return uD(e)?{type:`prefixed`,prefix:e[0],path:e[1],args:e[2]}:{type:`unprefixed`,prefix:void 0,path:e[0],args:e[1]}}function fD(e,t,n){let r=dD(e),i=r.args?.input;return n&&(i=rD(rD(rD({},r.args?.input??{}),n.pageParam===void 0?{}:{cursor:n.pageParam}),{},{direction:n.direction})),[r.path.join(`.`),i,t?.trpc]}async function pD(e,t,n){let r=t.getQueryCache().build(t,{queryKey:n});r.setState({data:[],status:`success`});let i=[];var a=!1,o=!1,s;try{for(var c=iD(e),l;a=!(l=await c.next()).done;a=!1){let e=l.value;i.push(e),r.setState({data:[...i]})}}catch(e){o=!0,s=e}finally{try{a&&c.return!=null&&await c.return()}finally{if(o)throw s}}return i}function mD(e){let t=oT(()=>{let{input:t,type:n}=e,r=e.path.flatMap(e=>e.split(`.`));if(!t&&n===`any`)return r.length?[r]:[];if(n===`infinite`&&tT(t)&&(`direction`in t||`cursor`in t)){let{cursor:e,direction:n}=t;return[r,{input:sD(t,cD),type:`infinite`}]}return[r,rD(rD({},t!==void 0&&t!==gv&&{input:t}),n&&n!==`any`&&{type:n})]});return e.prefix&&t.unshift([e.prefix]),t}function hD(e){let t=[e.path.flatMap(e=>e.split(`.`))];return e.prefix&&t.unshift([e.prefix]),t}function gD(e){return nT(e)?e():e}function _D(e){let{input:t,query:n,path:r,queryKey:i,opts:a}=e,o=t===gv;return Object.assign(py(rD(rD({},a??{}),{},{queryKey:i,queryFn:o?gv:async e=>{var t;let r=rD(rD({},a),{},{trpc:rD(rD({},a?.trpc),a!=null&&(t=a.trpc)!=null&&t.abortOnUnmount?{signal:e.signal}:{signal:null})});return await n(...fD(i,r,{direction:e.direction,pageParam:e.pageParam}))},initialPageParam:a?.initialCursor??t?.cursor})),{trpc:lD({path:r})})}function vD(e){let{mutate:t,path:n,prefix:r,opts:i,overrides:a}=e,o=gD(e.queryClient),s=hD({path:n,prefix:i?.keyPrefix??r}),c=o.defaultMutationOptions(o.getMutationDefaults(s)),l=a?.onSuccess??(e=>e.originalFn());return rD(rD({},i),{},{mutationKey:s,mutationFn:async e=>await t(...fD([...s,{input:e}],i)),onSuccess(...e){return l({originalFn:()=>{var t,n;return(i==null||(t=i.onSuccess)==null?void 0:t.call(i,...e))??(c==null||(n=c.onSuccess)==null?void 0:n.call(c,...e))},queryClient:o,meta:i?.meta??c?.meta??{}})},trpc:lD({path:n})})}function yD(e){let{input:t,query:n,path:r,queryKey:i,opts:a}=e,o=gD(e.queryClient),s=t===gv;return Object.assign(fy(rD(rD({},a),{},{queryKey:i,queryFn:s?gv:async e=>{var t;let r=rD(rD({},a),{},{trpc:rD(rD({},a?.trpc),a!=null&&(t=a.trpc)!=null&&t.abortOnUnmount?{signal:e.signal}:{signal:null})}),i=e.queryKey,s=await n(...fD(i,r));return aT(s)?pD(s,o,i):s}})),{trpc:lD({path:r})})}var bD=e=>{let{subscribe:t,path:n,queryKey:r,input:i,opts:a={}}=e,o=`enabled`in a?!!a.enabled:i!==gv;return rD(rD({},a),{},{enabled:o,subscribe:e=>t(n.join(`.`),i===gv?void 0:i,e),queryKey:r,trpc:lD({path:n})})};function xD(e){let t=C.useRef(e);t.current=e;let n=C.useRef(new Set([])),r=C.useCallback(e=>{n.current.add(e)},[]),i=C.useRef(()=>{}),a=C.useCallback(()=>{var n;if((n=i.current)==null||n.call(i),u(o),!e.enabled)return;let r=e.subscribe({onStarted:()=>{var e,n;(e=(n=t.current).onStarted)==null||e.call(n),u(e=>rD(rD({},e),{},{status:`pending`,error:null}))},onData:e=>{var n,r;(n=(r=t.current).onData)==null||n.call(r,e),u(t=>rD(rD({},t),{},{status:`pending`,data:e,error:null}))},onError:e=>{var n,r;(n=(r=t.current).onError)==null||n.call(r,e),u(t=>rD(rD({},t),{},{status:`error`,error:e}))},onConnectionStateChange:e=>{var n,r;(n=(r=t.current).onConnectionStateChange)==null||n.call(r,e),u(t=>{switch(e.state){case`connecting`:return rD(rD({},t),{},{status:`connecting`,error:e.error});case`pending`:return t;case`idle`:return rD(rD({},t),{},{status:`idle`,data:void 0,error:null})}})}});i.current=()=>{r.unsubscribe()}},[iv(e.queryKey),e.enabled]),o=C.useCallback(()=>e.enabled?{data:void 0,error:null,status:`connecting`,reset:a}:{data:void 0,error:null,status:`idle`,reset:a},[e.enabled,a]),s=C.useRef(o()),[c,l]=C.useState(SD(s,r));c.reset=a;let u=C.useCallback(e=>{let t=s.current,i=s.current=e(t),a=!1;for(let e of n.current)if(t[e]!==i[e]){a=!0;break}a&&l(SD(s,r))},[r]);return C.useEffect(()=>{if(e.enabled)return a(),()=>{var e;(e=i.current)==null||e.call(i)}},[a,e.enabled]),c}function SD(e,t){return new Proxy(e.current,{get(n,r){return t(r),e.current[r]}})}function CD(e){let t=e.keyPrefix,n=t=>(n,r,i)=>`router`in e?Promise.resolve(gD(e.ctx)).then(i=>wT({router:e.router,path:n,getRawInput:async()=>r,ctx:i,type:t,signal:void 0,batchIndex:0})):(e.client instanceof LE?e.client:UE(e.client))[t](n,r,i);return fT(({args:r,path:i})=>{let a=[...i],o=a.pop(),[s,c]=r;return{"~types":void 0,pathKey:()=>mD({path:a,type:`any`,prefix:t}),pathFilter:()=>rD(rD({},s),{},{queryKey:mD({path:a,type:`any`,prefix:t})}),queryOptions:()=>yD({input:s,opts:c,path:a,queryClient:e.queryClient,queryKey:mD({path:a,input:s,type:`query`,prefix:t}),query:n(`query`)}),queryKey:()=>mD({path:a,input:s,type:`query`,prefix:t}),queryFilter:()=>rD(rD({},c),{},{queryKey:mD({path:a,input:s,type:`query`,prefix:t})}),infiniteQueryOptions:()=>_D({input:s,opts:c,path:a,queryClient:e.queryClient,queryKey:mD({path:a,input:s,type:`infinite`,prefix:t}),query:n(`query`)}),infiniteQueryKey:()=>mD({path:a,input:s,type:`infinite`,prefix:t}),infiniteQueryFilter:()=>rD(rD({},c),{},{queryKey:mD({path:a,input:s,type:`infinite`,prefix:t})}),mutationOptions:()=>vD({opts:s,path:a,prefix:t,queryClient:e.queryClient,mutate:n(`mutation`),overrides:e.overrides?.mutations}),mutationKey:()=>hD({path:a,prefix:t}),subscriptionOptions:()=>bD({opts:c,path:a,input:s,queryKey:mD({path:a,input:s,type:`any`,prefix:t}),subscribe:n(`subscription`)})}[o]()})}function wD(){let e=C.createContext(null),t=C.createContext(null),n=n=>{let r=C.useMemo(()=>CD({client:n.trpcClient,queryClient:n.queryClient,keyPrefix:n.keyPrefix}),[n.trpcClient,n.queryClient,n.keyPrefix]);return C.createElement(e.Provider,{value:n.trpcClient},C.createElement(t.Provider,{value:r},n.children))};n.displayName=`TRPCProvider`;function r(){let e=C.useContext(t);if(!e)throw Error(`useTRPC() can only be used inside of a <TRPCProvider>`);return e}function i(){let t=C.useContext(e);if(!t)throw Error(`useTRPCClient() can only be used inside of a <TRPCProvider>`);return t}return{TRPCProvider:n,useTRPC:r,useTRPCClient:i}}var{TRPCProvider:TD,useTRPC:ED,useTRPCClient:DD}=wD(),OD=new Qv({defaultOptions:{queries:{staleTime:3e5,gcTime:18e5,refetchOnWindowFocus:!1,retry:(e,t)=>e<2&&!/NOT_FOUND|UNAUTHORIZED|FORBIDDEN/.test(String(t))}}}),kD=HE({links:[Jw({condition:e=>e.type===`subscription`,true:YE({url:`/trpc`}),false:WE({url:`/trpc`,maxURLLength:4e3})})]}),AD={style:`currency`,currency:`USD`,currencyDisplay:`narrowSymbol`},jD=new Intl.NumberFormat(`fr`,{...AD,minimumFractionDigits:2}),MD=new Intl.NumberFormat(`fr`,{...AD,maximumFractionDigits:4}),ND=new Intl.NumberFormat(`fr`,{notation:`compact`,maximumFractionDigits:1}),PD=new Intl.NumberFormat(`fr`),FD=e=>e>0&&e<.01?`< ${jD.format(.01)}`:jD.format(e),ID=e=>`${PD.format(e)} appel${e>1?`s`:``}`,LD={graphql:`GraphQL`,core:`REST`,search:`Recherche`};function RD(){let e=ED(),t=dy({...e.rateLimit.queryOptions(),refetchInterval:3e4}),n=dy({...e.ai.usage.queryOptions(),refetchInterval:3e4}),r=t.data?.find(e=>e.resource===`graphql`),i=r&&r.limit>0?Math.round(r.remaining/r.limit*100):null,a=i===null?`gray`:i<10?`red`:i<30?`yellow`:`teal`;return(0,G.jsxs)(X,{gap:`md`,wrap:`nowrap`,children:[i!==null&&(0,G.jsx)(Gh,{label:(0,G.jsxs)(tg,{gap:2,children:[(0,G.jsx)(Z,{size:`xs`,fw:600,children:`Quota API GitHub restant`}),t.data?.map(e=>(0,G.jsxs)(Z,{size:`xs`,children:[LD[e.resource]??e.resource,` : `,PD.format(e.remaining),` /`,` `,PD.format(e.limit),` · réinitialisé à`,` `,new Date(e.resetAt).toLocaleTimeString(`fr`,{hour:`2-digit`,minute:`2-digit`})]},e.resource))]}),children:(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`GitHub`}),(0,G.jsx)(gh,{value:i,color:a,size:4,w:36,"aria-label":`Quota GitHub restant`}),(0,G.jsxs)(Z,{size:`xs`,c:i<30?a:`dimmed`,children:[i,` %`]})]})}),n.data&&n.data.total.calls>0&&(0,G.jsx)(Gh,{label:(0,G.jsxs)(tg,{gap:2,children:[(0,G.jsx)(Z,{size:`xs`,fw:600,children:`Coût de Claude (vue Intention)`}),(0,G.jsxs)(Z,{size:`xs`,children:[`Aujourd’hui : `,MD.format(n.data.today.costUsd),` · `,ID(n.data.today.calls)]}),(0,G.jsxs)(Z,{size:`xs`,children:[`Ce mois-ci : `,MD.format(n.data.month.costUsd),` · `,ID(n.data.month.calls),` ·`,` `,ND.format(n.data.month.inputTokens),` tokens lus,`,` `,ND.format(n.data.month.outputTokens),` écrits`]}),(0,G.jsxs)(Z,{size:`xs`,children:[`Depuis le début : `,MD.format(n.data.total.costUsd)]}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`Modèle local : gratuit, non compté`})]}),children:(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[`IA`,` `,(0,G.jsx)(Z,{span:!0,inherit:!0,c:`gray.4`,children:FD(n.data.month.costUsd)}),` `,`ce mois`]})})]})}function zD(){return(0,G.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,G.jsx)(`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}),(0,G.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}function BD(){let e=ED(),t=aC(),n=dy({...e.viewer.queryOptions(),staleTime:1/0,retry:!1}),r=dy({...e.inbox.get.queryOptions(),enabled:n.isSuccess}),i=(0,C.useMemo)(()=>{let e=[{id:`inbox`,label:`Inbox`,description:`Retour à la liste`,onClick:()=>void t({to:`/`})},{id:`settings`,label:`Paramètres`,description:`Repos et orgs suivis, modèle de la vue Intention`,onClick:()=>void t({to:`/settings`})}];for(let n of r.data?.prs??[])e.push({id:n.id,label:n.title,description:`${n.owner}/${n.repo}#${n.number} · ${n.author?.login??`ghost`}`,onClick:()=>void t({to:`/$owner/$repo/pull/$number`,params:{owner:n.owner,repo:n.repo,number:String(n.number)}})});return e},[r.data,t]);if(n.isPending)return(0,G.jsx)(Rp,{h:`100vh`,children:(0,G.jsx)(El,{})});if(n.isError){let e=n.error instanceof mE&&n.error.data==null;return(0,G.jsx)(Rp,{h:`100vh`,children:(0,G.jsxs)(tg,{align:`center`,maw:560,children:[(0,G.jsx)(Rg,{order:3,children:e?`Session absente`:`Erreur`}),e?(0,G.jsxs)(Z,{c:`dimmed`,ta:`center`,children:[`Ouvrez l’URL `,(0,G.jsx)(qp,{children:`/auth?token=…`}),` affichée dans le terminal au démarrage du serveur.`]}):(0,G.jsx)(Z,{c:`red`,children:n.error.message})]})})}return(0,G.jsxs)(`div`,{className:`app`,children:[(0,G.jsxs)(`header`,{className:`topbar`,children:[(0,G.jsxs)(tf,{component:bC,to:`/`,underline:`never`,c:`gray.3`,fw:700,children:[`better`,(0,G.jsx)(Z,{span:!0,c:`blue.4`,inherit:!0,children:`·`}),`review`]}),(0,G.jsxs)(Tc,{className:`topbar-search`,onClick:mw.open,children:[(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:`Aller à une PR…`}),(0,G.jsx)(Em,{size:`xs`,children:`Ctrl K`})]}),(0,G.jsx)(`div`,{style:{flex:1}}),(0,G.jsxs)(X,{gap:`md`,children:[(0,G.jsx)(tf,{component:bC,to:`/settings`,size:`sm`,c:`dimmed`,children:(0,G.jsxs)(X,{gap:5,wrap:`nowrap`,children:[(0,G.jsx)(zD,{}),`Paramètres`]})}),(0,G.jsx)(RD,{}),(0,G.jsx)(Gh,{label:n.data.login,children:(0,G.jsx)(Cp,{src:n.data.avatarUrl,size:26})})]})]}),(0,G.jsx)(zw,{actions:i,nothingFound:`Aucun résultat`,highlightQuery:!0,limit:30,searchProps:{placeholder:`PR, repo, auteur…`},shortcut:[`mod + K`]}),(0,G.jsx)(FC,{})]})}var VD=new Intl.RelativeTimeFormat(`fr`,{numeric:`auto`,style:`short`}),HD=[[`year`,31536e6],[`month`,2592e6],[`week`,6048e5],[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function UD(e,t=Date.now()){let n=(typeof e==`number`?e:Date.parse(e))-t;for(let[e,t]of HD)if(Math.abs(n)>=t)return VD.format(Math.round(n/t),e);return`à l’instant`}function WD(e,t=Date.now()){let n=t-Date.parse(e);return n>=864e5?`${Math.floor(n/864e5)} j`:n>=36e5?`${Math.floor(n/36e5)} h`:`${Math.max(1,Math.floor(n/6e4))} min`}var GD={APPROVED:{label:`approuvé`,color:`green`},CHANGES_REQUESTED:{label:`changements demandés`,color:`red`},COMMENTED:{label:`commenté`,color:`gray`},DISMISSED:{label:`rejeté`,color:`gray`},PENDING:{label:`en attente`,color:`yellow`},REQUESTED:{label:`demandé`,color:`yellow`}},KD={SUCCESS:{label:`CI ok`,color:`green`},FAILURE:{label:`CI en échec`,color:`red`},ERROR:{label:`CI en erreur`,color:`red`},PENDING:{label:`CI en cours`,color:`yellow`},EXPECTED:{label:`CI attendue`,color:`yellow`}},qD=[{stage:`draft`,title:`Brouillon`,hint:`pas encore prêtes à relire`},{stage:`waiting`,title:`En attente de review`,hint:`aucune review pour l’instant`},{stage:`review`,title:`En review`,hint:`commentaires, changements demandés`},{stage:`approved`,title:`Approuvée`,hint:`reste la CI ou des threads ouverts`},{stage:`ready`,title:`Prête à merger`,hint:`approuvée, CI ok, aucun thread ouvert`},{stage:`queued`,title:`Merge queue`,hint:`en file d’attente de merge`},{stage:`merged`,title:`Mergée`,hint:`ces dernières 24 h`}],JD={requested:{label:`review demandée`,color:`orange`,action:!0},rereview:{label:`à re-relire`,color:`orange`,action:!0},todo:{label:`retours à traiter`,color:`orange`,action:!0},mine:{label:`ma PR`,color:`blue`},involved:{label:`je participe`,color:`gray`},stale:{label:`stagnante`,color:`yellow`},unreviewed:{label:`sans reviewer`,color:`yellow`}},YD=[{value:`all`,label:`Toutes`,tags:null},{value:`reviewer`,label:`Reviewer`,tags:[`requested`,`rereview`,`involved`]},{value:`author`,label:`Auteur`,tags:[`mine`]},{value:`lead`,label:`Lead`,tags:[`stale`,`unreviewed`]}],XD=3e5,ZD=e=>e.tags.some(e=>JD[e].action),QD=e=>`${e.owner}/${e.repo}`,$D=(e,t)=>t===null||e.tags.some(e=>t.includes(e));function eO(e){let[t,n]=(0,C.useState)(()=>Date.now());return(0,C.useEffect)(()=>{let t=setInterval(()=>n(Date.now()),e);return()=>clearInterval(t)},[e]),t}function tO(){let e=ED(),t=W_(),n=aC(),[r,i]=Ge({key:`br:boardGroup`,defaultValue:`all`,getInitialValueInEffect:!1}),a=YD.find(e=>e.value===r)??YD[0],[o,s]=Ge({key:`br:boardRepo`,defaultValue:null,getInitialValueInEffect:!1}),[c,l]=Ge({key:`br:boardFilter`,defaultValue:`all`,getInitialValueInEffect:!1}),u=c===`unread`||c===`unviewed`?c:`all`,d=dy({...e.inbox.get.queryOptions(),staleTime:3e4,refetchOnWindowFocus:!0,refetchInterval:XD}),[f,p]=(0,C.useState)(0),m=eO(3e4);xD(e.inbox.onChange.subscriptionOptions(void 0,{onData:()=>void t.invalidateQueries({queryKey:e.inbox.get.queryKey()})}));let h=d.data?.prs,g=a.tags,_=(0,C.useMemo)(()=>{let e=(h??[]).filter(e=>$D(e,g)&&(o===null||QD(e)===o)&&(u===`all`||(u===`unread`?e.unread:e.files!==void 0&&e.files.viewed<e.files.total)));return qD.map(t=>({...t,prs:e.filter(e=>e.stage===t.stage)}))},[h,g,o,u]),v=(0,C.useMemo)(()=>{let e=(h??[]).filter(e=>o===null||QD(e)===o);return Object.fromEntries(YD.map(t=>[t.value,e.filter(e=>$D(e,t.tags)).length]))},[h,o]),y=(0,C.useMemo)(()=>{let e=new Map;for(let t of h??[])e.set(QD(t),(e.get(QD(t))??0)+ +!!$D(t,g));return o!==null&&!e.has(o)&&e.set(o,0),[...e].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>({value:e,label:e,count:t}))},[h,g,o]),b=new Map(y.map(e=>[e.value,e.count])),x=(0,C.useMemo)(()=>_.flatMap(e=>e.prs),[_]),S=e=>e&&void n({to:`/$owner/$repo/pull/$number`,params:{owner:e.owner,repo:e.repo,number:String(e.number)}});return lt([[`j`,()=>p(e=>Math.min(e+1,x.length-1))],[`k`,()=>p(e=>Math.max(e-1,0))],[`Enter`,()=>S(x[f])],[`o`,()=>x[f]&&window.open(x[f].url,`_blank`)]]),(0,G.jsxs)(`div`,{className:`board`,children:[(0,G.jsxs)(X,{gap:`sm`,mb:`sm`,wrap:`nowrap`,children:[(0,G.jsx)(Yh,{size:`xs`,value:a.value,onChange:i,data:YD.map(e=>({value:e.value,label:`${e.label} ${v[e.value]??0}`}))}),(0,G.jsx)(Zh,{size:`xs`,w:260,placeholder:`Tous les repos`,"aria-label":`Filtrer par repo`,searchable:!0,clearable:!0,value:o,data:y,onChange:s,renderOption:({option:e})=>(0,G.jsxs)(X,{gap:`xs`,justify:`space-between`,wrap:`nowrap`,w:`100%`,children:[(0,G.jsx)(Z,{size:`xs`,truncate:!0,children:e.label}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:b.get(e.value)??0})]}),comboboxProps:{width:`max-content`,position:`bottom-start`},nothingFoundMessage:`Aucun repo`}),(0,G.jsx)(Yh,{size:`xs`,value:u,onChange:l,data:[{value:`all`,label:`Toutes`},{value:`unread`,label:`Non lues`},{value:`unviewed`,label:`Non vues à 100 %`}]}),(0,G.jsx)(`div`,{style:{flex:1}}),d.data&&(0,G.jsx)(Gh,{label:new Date(d.data.fetchedAt).toLocaleString(`fr`),children:(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[`synchro `,UD(d.data.fetchedAt,m)]})}),(0,G.jsx)(Fp,{size:`compact-xs`,variant:`default`,loading:d.isFetching,onClick:()=>void d.refetch(),children:`Actualiser`}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[(0,G.jsx)(Em,{size:`xs`,children:`j`}),`/`,(0,G.jsx)(Em,{size:`xs`,children:`k`}),` naviguer · `,(0,G.jsx)(Em,{size:`xs`,children:`↵`}),` ouvrir ·`,` `,(0,G.jsx)(Em,{size:`xs`,children:`o`}),` GitHub`]})]}),d.isPending&&(0,G.jsx)(El,{}),d.isError&&(0,G.jsx)(Jd,{color:`red`,title:`Impossible de charger les PR`,children:d.error.message}),d.data&&!d.data.configured&&(0,G.jsxs)(Jd,{title:`Aucun repo suivi`,color:`blue`,mb:`sm`,children:[`Le tableau ne montre que les repos et orgs de votre liste.`,` `,(0,G.jsx)(tf,{component:bC,to:`/settings`,children:`Ajouter des repos`})]}),d.data?.truncated&&(0,G.jsx)(Jd,{color:`yellow`,variant:`light`,mb:`sm`,py:6,children:`Plus de 1000 PR ouvertes dans un repo / une org suivi : seules les 1000 plus récemment mises à jour sont affichées (limite de la recherche GitHub).`}),d.data&&(0,G.jsx)(`div`,{className:`board-columns`,children:_.map(e=>(0,G.jsxs)(`section`,{className:`board-column`,"data-stage":e.stage,children:[(0,G.jsxs)(X,{gap:6,className:`board-column-head`,children:[(0,G.jsx)(Z,{fw:600,size:`sm`,children:e.title}),(0,G.jsx)(Ep,{size:`sm`,variant:`light`,color:`gray`,children:e.prs.length}),e.prs.some(ZD)&&(0,G.jsx)(Gh,{label:`PR qui attendent une action de ma part`,children:(0,G.jsxs)(Ep,{size:`sm`,variant:`light`,color:`orange`,children:[e.prs.filter(ZD).length,` pour moi`]})})]}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,px:10,pb:6,children:e.hint}),(0,G.jsx)(`div`,{className:`board-cards`,children:e.prs.length===0?(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,ta:`center`,py:`md`,children:`Rien ici.`}):e.prs.map(e=>(0,G.jsx)(nO,{pr:e,selected:x[f]===e,now:m},e.id))})]},e.stage))})]})}function nO({pr:e,selected:t,now:n}){let r=(0,C.useRef)(null);(0,C.useEffect)(()=>{t&&r.current?.scrollIntoView({block:`nearest`})},[t]);let i=e.ci===void 0?void 0:e.ci===null?null:KD[e.ci];return(0,G.jsxs)(bC,{ref:r,to:`/$owner/$repo/pull/$number`,params:{owner:e.owner,repo:e.repo,number:String(e.number)},className:`pr-card`,"data-selected":t||void 0,"data-unread":e.unread||void 0,"data-action":ZD(e)||void 0,children:[(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,justify:`space-between`,children:[(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,truncate:!0,children:[e.owner,`/`,e.repo,` #`,e.number]}),(0,G.jsx)(Fp,{size:`compact-xs`,variant:`subtle`,color:`gray`,"aria-label":`Ouvrir sur GitHub`,onClick:t=>{t.preventDefault(),t.stopPropagation(),window.open(e.url,`_blank`,`noopener`)},children:`↗`})]}),(0,G.jsx)(Z,{fw:600,size:`sm`,className:`clamp2`,children:e.title}),(0,G.jsxs)(X,{gap:6,mt:4,wrap:`nowrap`,children:[(0,G.jsx)(Cp,{src:e.author?.avatarUrl,size:18}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,truncate:!0,children:[e.author?.login??`ghost`,` ·`,` `,e.mergedAt?`mergée ${UD(e.mergedAt,n)}`:`${UD(e.updatedAt,n)} · ouverte depuis ${WD(e.createdAt,n)}`]})]}),e.tags.length>0&&(0,G.jsx)(X,{gap:4,mt:6,children:e.tags.map(e=>(0,G.jsx)(Ep,{size:`xs`,variant:JD[e].action?`filled`:`light`,color:JD[e].color,children:JD[e].label},e))}),(e.ci!==void 0||e.threads||e.additions!==void 0||e.files)&&(0,G.jsxs)(X,{gap:8,mt:6,wrap:`wrap`,children:[i!==void 0&&(0,G.jsx)(Z,{size:`xs`,c:i?.color?`${i.color}.4`:`dimmed`,children:i?.label??`pas de CI`}),e.threads&&e.threads.total>0&&(0,G.jsxs)(Z,{size:`xs`,c:e.threads.open>0?`yellow.4`:`dimmed`,children:[(0,G.jsx)(`i`,{className:`ico-c`}),e.threads.open,`/`,e.threads.total,e.tags.includes(`mine`)&&e.threads.awaitingMyReply>0?` · ${e.threads.awaitingMyReply} attendent ma réponse`:``]}),e.additions!==void 0&&(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[(0,G.jsxs)(Z,{span:!0,c:`green.4`,inherit:!0,children:[`+`,e.additions]}),` `,(0,G.jsxs)(Z,{span:!0,c:`red.4`,inherit:!0,children:[`−`,e.deletions]})]}),e.files&&(0,G.jsx)(Gh,{label:`${e.files.viewed} / ${e.files.total} fichiers marqués vus`,children:(0,G.jsx)(gh,{value:e.files.total===0?0:e.files.viewed/e.files.total*100,size:`sm`,w:44,color:`green`})})]}),(e.reviews.length>0||e.requested.length>0)&&(0,G.jsxs)(X,{gap:4,mt:6,children:[e.reviews.map(e=>(0,G.jsx)(Gh,{label:`${e.login} : ${GD[e.state]?.label??e.state}`,children:(0,G.jsx)(Ep,{size:`xs`,variant:`outline`,color:GD[e.state]?.color??`gray`,leftSection:(0,G.jsx)(Cp,{src:e.avatarUrl,size:12}),children:e.login})},e.login)),e.requested.map(e=>(0,G.jsx)(Gh,{label:`${e} : review demandée`,children:(0,G.jsxs)(Ep,{size:`xs`,variant:`outline`,color:`gray`,children:[e,` ?`]})},e))]})]})}function rO(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function iO(e,t=`|`){return e.map(e=>kO(e)).join(t)}function aO(e,t){return typeof t==`bigint`?t.toString():t}var oO=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function sO(e){return new oO(e)}function cO(e){return e==null}function lO(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function uO(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function dO(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fO(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function pO(e){return fO(e._zod.def)??e._zod.def.shape}function mO(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return dO(this,t,e),e},enumerable:!0,configurable:!0})}function hO(e,t,n){t in e?dO(e,t,n):e[t]=n}function gO(e,t,n,r){let i=pO(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?mO(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):hO(e,a,r?r(n.value,a):n.value))}}function _O(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?mO(e,n,()=>t[n]):hO(e,n,r.value))}}function vO(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function yO(e){return JSON.stringify(e)}function bO(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var xO=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function SO(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var CO=sO(()=>{if(yk.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function wO(e){if(SO(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return SO(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function TO(e){return wO(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var EO=new Set([`string`,`number`,`symbol`]);function DO(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function OO(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function kO(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function AO(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var jO={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},MO={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function NO(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return gO(i,e,PO(e,t)),OO(e,vO(n,{shape:i,checks:[]}))}function PO(e,t){let n=pO(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function FO(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(PO(e,t)),a={};return gO(a,e,Reflect.ownKeys(pO(e)).filter(e=>!i.has(e))),OO(e,vO(n,{shape:a,checks:[]}))}function IO(e,t){if(!wO(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=pO(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return OO(e,vO(e._zod.def,{shape:LO(e,t)}))}function LO(e,t){let n={};return gO(n,e,Reflect.ownKeys(pO(e))),_O(n,t),n}function RO(e,t){if(!wO(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return OO(e,vO(e._zod.def,{shape:LO(e,t)}))}function zO(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return gO(n,e,Reflect.ownKeys(pO(e))),gO(n,t,Reflect.ownKeys(pO(t))),OO(e,vO(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function BO(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(PO(t,n)):void 0,o={};return gO(o,t,Reflect.ownKeys(pO(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),OO(t,vO(t._zod.def,{shape:o,checks:[]}))}function VO(e,t,n){let r=n?new Set(PO(t,n)):void 0,i={};return gO(i,t,Reflect.ownKeys(pO(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),OO(t,vO(t._zod.def,{shape:i}))}function HO(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function UO(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function WO(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function GO(e){return typeof e==`string`?e:e?.message}function KO(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function qO(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function JO(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:GO(e.inst?._zod.def?.error?.(e))??GO(a?.(e))??GO(t?.error?.(e))??GO(n.customError?.(e))??GO(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var YO=/[\uD800-\uDBFF]/;function XO(e){let t=e.length;if(!YO.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function ZO(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function QO(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function $O(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function ek(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ik(e,n,r.value)}}function tk(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function nk(e,t,n){return tk(e,t,n,!1)}function rk(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return tk(this,n,r(this))},set(e){tk(this,n,e)}})}return t}function ik(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:tk(this,t,n.bind(this))},set(e){tk(this,t,e)}})}function ak(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var ok,sk=!1,ck={configurable:!0,get(){sk=!0}};function lk(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&ok!==e._zod?ok=void 0:(ok=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ck);let e=sk;sk=!1;try{let r=n(this);return sk?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),sk||=e,r}catch(n){throw delete this[t],sk||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function uk(e,t,n,r){let i=ak(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var dk=`~constantCatch`;function fk(e){let t=()=>e;return t[dk]=!0,t}var pk,mk={value:void 0,enumerable:!1},hk=`captureStackTrace`in Error?Error:null;function gk(e){let t=hk;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return hk=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function $(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){mk.value=new a(r);try{Object.defineProperty(n,"_zod",mk)}finally{mk.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ek(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?gk(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var _k=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},vk=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(pk=globalThis).__zod_globalConfig??(pk.__zod_globalConfig={});var yk=globalThis.__zod_globalConfig;function bk(e){return e&&Object.assign(yk,e),yk}function xk(){let e=this._zod;return e.message??=JSON.stringify(e.def,aO,2),e.message}function Sk(e){this._zod.message=e}var Ck={get:xk,set:Sk,enumerable:!0,configurable:!0},wk={value:void 0,enumerable:!1},Tk=new WeakSet([Object.prototype,Error.prototype]),Ek=$(`$ZodError`,(e,t)=>{e.name=`$ZodError`,wk.value=t,Object.defineProperty(e,"issues",wk),wk.value=void 0,Object.defineProperty(e,"message",Ck);let n=Object.getPrototypeOf(e);Tk.has(n)||(Tk.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function Dk(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ok(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Dk(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function kk(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ak(e,t){return{callee:t?.callee??e,Err:t?.Err}}var jk=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new _k;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>JO(e,o,bk())));throw xO(n,a?.callee??t),n}return s.value};return t},Mk=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>JO(e,o,bk())));throw xO(n,a?.callee??t),n}return s.value};return t},Nk=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new _k;return a.issues.length?Pk(e,a.issues,i):{success:!0,data:a.value}};function Pk(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>JO(e,n,bk()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Fk=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Pk(e,a.issues,i):{success:!0,data:a.value}},Ik=Symbol.for(`zod.compile.invalid`),Lk=Symbol.for(`zod.compile.fallback`),Rk=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Ik)return!0;if(r.definite===!0&&n===void 0)return!1}return zk(e,t,n)});function zk(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Lk]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new _k;return a.issues.length===0}var Bk=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Vk=e=>{let t=jk(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Ak(n,a))};return n},Hk=e=>{let t=jk(e),n=(e,r,i,a)=>t(e,r,i,Ak(n,a));return n},Uk=e=>{let t=Mk(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Ak(n,a))};return n},Wk=e=>{let t=Mk(e),n=async(e,r,i,a)=>await t(e,r,i,Ak(n,a));return n},Gk=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Nk(e)(t,n,i)},Kk=e=>(t,n,r)=>Nk(e)(t,n,r),qk=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Fk(e)(t,n,i)},Jk=e=>async(t,n,r)=>Fk(e)(t,n,r),Yk=/^[cC][0-9a-z]{6,}$/,Xk=/^[0-9a-z]+$/,Zk=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Qk=/^[0-9a-vA-V]{20}$/,$k=/^[A-Za-z0-9]{27}$/,eA=/^[a-zA-Z0-9_-]{21}$/;function tA(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var nA=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rA=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,iA=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,aA=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,oA=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function sA(){return new RegExp(oA,`u`)}var cA=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,lA=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,uA=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,dA=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fA=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pA=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,mA=/^https?$/,hA=/^\+[1-9]\d{6,14}$/,gA=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function _A(e){return RegExp(`^${e}$`)}var vA=_A(gA);function yA(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function bA(e){return RegExp(`^${yA(e)}$`)}function xA(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${yA({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${yA({precision:e.precision})}`:n;return RegExp(`^${gA}T(?:${r})$`)}var SA=/^[\s\S]{0,}$/,CA=/^-?\d+(?:\.\d+)?$/,wA=/^[^A-Z]*$/,TA=/^[^a-z]*$/,EA=$(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),DA=e=>{let t=e.value;return!cO(t)&&t.length!==void 0},OA={number:`number`,bigint:`bigint`,object:`date`},kA=$(`$ZodCheckLessThan`,(e,t)=>{EA.init(e,t);let n=OA[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:OA[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),AA=$(`$ZodCheckGreaterThan`,(e,t)=>{EA.init(e,t);let n=OA[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:OA[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jA=$(`$ZodCheckMultipleOf`,(e,t)=>{EA.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):uO(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),MA=$(`$ZodCheckNumberFormat`,(e,t)=>{EA.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=jO[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),NA=$(`$ZodCheckMaxLength`,(e,t)=>{var n;EA.init(e,t),(n=e._zod.def).when??(n.when=DA),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?XO(r):i)<=t.maximum)return;let a=ZO(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),PA=$(`$ZodCheckMinLength`,(e,t)=>{var n;EA.init(e,t),(n=e._zod.def).when??(n.when=DA),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?XO(r):i)>=t.minimum)return;let a=ZO(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),FA=$(`$ZodCheckLengthEquals`,(e,t)=>{var n;EA.init(e,t),(n=e._zod.def).when??(n.when=DA),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?XO(r):i;if(a===t.length)return;let o=ZO(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),IA=$(`$ZodCheckStringFormat`,(e,t)=>{var n,r;EA.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),LA=$(`$ZodCheckRegex`,(e,t)=>{IA.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),RA=$(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=wA,IA.init(e,t)}),zA=$(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=TA,IA.init(e,t)}),BA=$(`$ZodCheckIncludes`,(e,t)=>{EA.init(e,t);let n=DO(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),VA=$(`$ZodCheckStartsWith`,(e,t)=>{EA.init(e,t);let n=RegExp(`^${DO(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),HA=$(`$ZodCheckEndsWith`,(e,t)=>{EA.init(e,t);let n=RegExp(`.*${DO(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),UA=$(`$ZodCheckOverwrite`,(e,t)=>{EA.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),WA=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
53
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
54
+ `)}\n};`)(...Object.values(this.closed))}},GA={major:4,minor:6,patch:7},KA=$(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=GA;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=HO(t),a;for(let o of n){if(o._zod.def.when){if(UO(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new _k;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(qO(t.issues,n,e),i||=HO(t,n))});else{if(t.issues.length===n)continue;qO(t.issues,n,e),i||=HO(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(HO(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new _k;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new _k;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return nk(this,`~standard`,YA(this))},set"~standard"(e){tk(this,`~standard`,e)}}),qA=(e,t)=>e.issues.length?{issues:e.issues.map(e=>JO(e,t,bk()))}:{value:e.value};async function JA(e,t){let n={async:!0};return qA(await e._zod.run({value:t,issues:[]},n),n)}function YA(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return qA(r,n)}catch{}return JA(e,t)},vendor:`zod`,version:1}}var XA=$(`$ZodString`,(e,t)=>{KA.init(e,t),e._zod.pattern=t.pattern??SA,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),ZA=$(`$ZodStringFormat`,(e,t)=>{IA.init(e,t),XA.init(e,t)}),QA=$(`$ZodGUID`,(e,t)=>{t.pattern??=rA,ZA.init(e,t)}),$A=$(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=iA(e)}else t.pattern??=iA();ZA.init(e,t)}),ej=$(`$ZodEmail`,(e,t)=>{t.pattern??=aA,ZA.init(e,t)});function tj(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function nj(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?tj(e)||2:rj(e,t)}function rj(e,t){if(!t.normalize&&t.protocol?.source===mA.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var ij=/[\t\n\r]/g;function aj(e){return e.replace(ij,``)}function oj(e,t){return t.lastIndex=0,t.test(e.hostname)}function sj(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var cj=$(`$ZodURL`,(e,t)=>{ZA.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=nj(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=aj(r);return}t.hostname&&!oj(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!sj(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:aj(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),lj=$(`$ZodEmoji`,(e,t)=>{t.pattern??=sA(),ZA.init(e,t)}),uj=$(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?eA:tA(t.length),ZA.init(e,t)}),dj=$(`$ZodCUID`,(e,t)=>{t.pattern??=Yk,ZA.init(e,t)}),fj=$(`$ZodCUID2`,(e,t)=>{t.pattern??=Xk,ZA.init(e,t)}),pj=$(`$ZodULID`,(e,t)=>{t.pattern??=Zk,ZA.init(e,t)}),mj=$(`$ZodXID`,(e,t)=>{t.pattern??=Qk,ZA.init(e,t)}),hj=$(`$ZodKSUID`,(e,t)=>{t.pattern??=$k,ZA.init(e,t)}),gj=$(`$ZodISODateTime`,(e,t)=>{t.pattern??=xA(t),ZA.init(e,t)}),_j=$(`$ZodISODate`,(e,t)=>{t.pattern??=vA,ZA.init(e,t)}),vj=$(`$ZodISOTime`,(e,t)=>{t.pattern??=bA(t),ZA.init(e,t)}),yj=$(`$ZodISODuration`,(e,t)=>{t.pattern??=nA,ZA.init(e,t)}),bj=$(`$ZodIPv4`,(e,t)=>{t.pattern??=cA,ZA.init(e,t)}),xj=/^[0-9a-fA-F:.]+$/;function Sj(e){return xj.test(e)?tj(`http://[${e}]`):!1}var Cj=$(`$ZodIPv6`,(e,t)=>{t.pattern??=lA,ZA.init(e,t),e._zod.check=n=>{Sj(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),wj=$(`$ZodCIDRv4`,(e,t)=>{t.pattern??=uA,ZA.init(e,t)});function Tj(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Sj(n)}var Ej=$(`$ZodCIDRv6`,(e,t)=>{t.pattern??=dA,ZA.init(e,t),e._zod.check=n=>{Tj(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Dj(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Oj=/^[0-9a-zA-Z+/]*={0,2}$/,kj=$(`$ZodBase64`,(e,t)=>{t.pattern??=Oj,ZA.init(e,t),e._zod.check=n=>{Dj(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Aj=/^[A-Za-z0-9_-]*$/;function jj(e){if(!Aj.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Dj(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Mj=$(`$ZodBase64URL`,(e,t)=>{t.pattern??=Aj,ZA.init(e,t),e._zod.check=n=>{jj(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Nj=$(`$ZodE164`,(e,t)=>{t.pattern??=hA,ZA.init(e,t)});function Pj(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Fj=$(`$ZodJWT`,(e,t)=>{ZA.init(e,t),e._zod.check=n=>{Pj(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Ij=$(`$ZodNumber`,(e,t)=>{KA.init(e,t),e._zod.pattern=CA,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Lj=$(`$ZodNumberFormat`,(e,t)=>{MA.init(e,t),Ij.init(e,t)}),Rj=$(`$ZodUnknown`,(e,t)=>{KA.init(e,t),e._zod.parse=e=>e}),zj=$(`$ZodNever`,(e,t)=>{KA.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Bj(e,t){let n=KO(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of KO(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,qO(n.issues,t,e),n}}return i(n,a)}}var Vj=e=>Array.isArray(e)?e.length:-1;function Hj(e,t,n){e.issues.length&&t.issues.push(...WO(n,e.issues)),t.value[n]=e.value}var Uj=$(`$ZodArray`,(e,t)=>{KA.init(e,t);let n=yk.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Hj(t,r,e)));else if(Hj(c,r,e),s&&c.issues.length!==0&&HO(c))break}return o.length?Promise.all(o).then(()=>r):r},Bj(e,Vj)});function Wj(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...WO(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Gj=[];function Kj(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Gj,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=AO(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function qj(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(HO(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Wj(e,n,i,t,d,f))):Wj(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Jj=$(`$ZodObject`,(e,t)=>{KA.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=sO(()=>Kj(t));lk(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||dO(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=SO,o=t.catchall,s,c=yk.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(HO(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Wj(n,t,e,r,a,o))):Wj(s,t,e,r,a,o)}return o?qj(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Yj=$(`$ZodObjectJIT`,(e,t)=>{Jj.init(e,t);let n=e._zod.parse,r=sO(()=>Kj(t)),i=yk.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new WA([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
55
+ let ${e}_ab = false;
56
+ for (let i = 0; i < ${e}.issues.length; i++) {
57
+ const iss = ${e}.issues[i];
58
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
59
+ payload.issues.push(iss);
60
+ if (iss.continue !== true) ${e}_ab = true;
61
+ }
62
+ if (${e}_ab && ctx && ctx.abortEarly) {
63
+ payload.value = newResult;
64
+ return payload;
65
+ }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:yO(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
66
+ const ${n}_present = ${i};
67
+ if (!${n}.issues.length || ${n}_present) {
68
+ if (${n}.issues.length) {${c(n,r)}
69
+ }
70
+
71
+ if (${e}) {
72
+ newResult[${r}] = ${n}.value;
73
+ }
74
+ }
75
+
76
+ `)}else f?(o.write(`
77
+ if (${n}.issues.length) {${c(n,r)}
78
+ }
79
+ `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
80
+ if (${n}.value !== undefined || ${i}) {
81
+ newResult[${r}] = ${n}.value;
82
+ }
83
+ `)):o.write(`
84
+ const ${n}_present = ${i};
85
+ if (${n}.issues.length) {${c(n,r)}
86
+ }
87
+ if (!${n}_present && !${n}.issues.length) {
88
+ payload.issues.push({
89
+ code: "invalid_type",
90
+ expected: "nonoptional",
91
+ input: undefined,
92
+ path: [${r}]
93
+ });
94
+ if (ctx && ctx.abortEarly) {
95
+ payload.value = newResult;
96
+ return payload;
97
+ }
98
+ }
99
+
100
+ if (${n}_present) {
101
+ newResult[${r}] = ${n}.value;
102
+ }
103
+
104
+ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=SO,c=!yk.jitless,l=c&&CO.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?qj([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Xj(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!HO(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>JO(e,r,bk())))}),t)}var Zj=$(`$ZodUnion`,(e,t)=>{KA.init(e,t),lk(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),lk(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),lk(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),lk(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>lO(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Xj(t,r,e,i)):Xj(o,r,e,i)}});function Qj(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var $j=$(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Zj.init(e,t);let n=e._zod.parse;lk(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||dO(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=fO(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=sO(()=>Qj(t));e._zod.parse=(i,a)=>{let o=i.value;if(!SO(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),eM=$(`$ZodIntersection`,(e,t)=>{KA.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>nM(e,t,n)):nM(e,i,a)}});function tM(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(wO(e)&&wO(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=tM(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=tM(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function nM(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=tM(t.value,n.value);if(!c.valid){if(HO(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var rM=$(`$ZodEnum`,(e,t)=>{KA.init(e,t);let n=rO(t.entries),r=new Set(n);e._zod.values=r,lk(e,`pattern`,e=>{let t=rO(e.def.entries).filter(e=>EO.has(typeof e));return RegExp(t.length?`^(${t.map(e=>DO(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),iM=$(`$ZodLiteral`,(e,t)=>{KA.init(e,t);let n=new Set(t.values);e._zod.values=n,lk(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?DO(e):e?DO(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),aM=$(`$ZodTransform`,(e,t)=>{KA.init(e,t),e._zod.optin=`optional`,yk.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new vk(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new _k;return n.value=i,n}});function oM(e,t){return e.value=t.issues.length?void 0:t.value,e}var sM=$(`$ZodOptional`,(e,t)=>{KA.init(e,t),lk(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,lk(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),lk(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${lO(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>oM(e,t)):oM(e,r)}return t.innerType._zod.run(e,n)}}),cM=$(`$ZodExactOptional`,(e,t)=>{sM.init(e,t),lk(e,`values`,e=>e.def.innerType._zod.values),lk(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),lM=$(`$ZodNullable`,(e,t)=>{KA.init(e,t),lk(e,`optin`,e=>e.def.innerType._zod.optin),lk(e,`optout`,e=>e.def.innerType._zod.optout),lk(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${lO(t.source)}|null)$`):void 0}),lk(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),uM=$(`$ZodDefault`,(e,t)=>{KA.init(e,t),e._zod.optin=`defaulted`,lk(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>dM(e,t)):dM(r,t)}});function dM(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var fM=$(`$ZodPrefault`,(e,t)=>{KA.init(e,t),e._zod.optin=`defaulted`,lk(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),pM=$(`$ZodNonOptional`,(e,t)=>{KA.init(e,t),lk(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>mM(t,e)):mM(i,e)}});function mM(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function hM(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>JO(e,r,bk()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var gM=$(`$ZodCatch`,(e,t)=>{KA.init(e,t),lk(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),lk(e,`optout`,e=>e.def.innerType._zod.optout),lk(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>hM(e,r,t,n)):hM(e,r,t,n)}}),_M=$(`$ZodPipe`,(e,t)=>{KA.init(e,t),lk(e,`values`,e=>e.def.in._zod.values),lk(e,`optin`,e=>e.def.in._zod.optin),lk(e,`optout`,e=>e.def.out._zod.optout),lk(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>vM(e,t.in,n)):vM(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>vM(e,t.out,n)):vM(r,t.out,n)}});function vM(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var yM=$(`$ZodReadonly`,(e,t)=>{KA.init(e,t),lk(e,`propValues`,e=>e.def.innerType._zod.propValues),lk(e,`values`,e=>e.def.innerType._zod.values),lk(e,`optin`,e=>e.def.innerType?._zod?.optin),lk(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(bM):bM(r)}});function bM(e){return e.memo||(e.value=Object.freeze(e.value)),e}var xM=$(`$ZodCustom`,(e,t)=>{EA.init(e,t),KA.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>SM(t,n,r,e));SM(i,n,r,e)}});function SM(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push($O(e))}}var CM=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},wM=`~memo`,TM=[];function EM(e){return typeof e==`object`&&!!e}function DM(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var OM=new WeakMap,kM=0,AM=1,jM=2;function MM(e,t,n){let r=OM.get(e);if(r!==void 0)return r?jM:kM;if(t.has(e))return jM;t.add(e);let i=kM,a=e=>{if(i!==jM&&e?._zod){let r=MM(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=kM;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?AM:o.value?._zod?MM(o.value,t,n):kM;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=fO(c);s(e?o(e,!0):AM),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?MM(r,t,!1):AM);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),NM(e,i)}function NM(e,t){return t!==AM&&OM.set(e,t===jM),t}function PM(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var FM,IM=[],LM={alloc(e,t,n){let r=FM;if(!r)return n;FM=void 0;let i={value:n,issues:null};return r.set(t.value,i),IM.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&zM(n,e.value))throw new CM;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=MM(e,new Set,!1);if(i===kM)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===jM||r?n=!0:r=!0}let l=s.value;if(!EM(l))return t(s,c);let u=c[wM];u||(u={buckets:new WeakMap,backEdges:void 0},c[wM]=u);let d;i===c?d=a:(d=PM(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...DM(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;FM=d;let p=IM.length,m=t(s,c);FM=void 0;let h=IM.length>p?IM.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?DM(e.issues):TM),e)):(h&&(h.issues=m.issues.length?DM(m.issues):TM),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function RM(){return LM}function zM(e,t){let n=e[wM]?.backEdges;return n!==void 0&&EM(t)&&n.has(t)}var BM=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(QO(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${kO(e.values[0])}`:`Invalid option: expected one of ${iO(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${iO(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function VM(){return{localeError:BM()}}var HM,UM=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function WM(){return new UM}(HM=globalThis).__zod_globalRegistry??(HM.__zod_globalRegistry=WM());var GM=globalThis.__zod_globalRegistry;function KM(e){return e.checks&&=[...e.checks],e}function qM(e,t){return new e(KM({type:`string`,...Q(t)}))}function JM(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Q(t)})}function YM(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Q(t)})}function XM(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Q(t)})}function ZM(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Q(t)})}function QM(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Q(t)})}function $M(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Q(t)})}function eN(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Q(t)})}function tN(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Q(t)})}function nN(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Q(t)})}function rN(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Q(t)})}function iN(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Q(t)})}function aN(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Q(t)})}function oN(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Q(t)})}function sN(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Q(t)})}function cN(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Q(t)})}function lN(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Q(t)})}function uN(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Q(t)})}function dN(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Q(t)})}function fN(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Q(t)})}function pN(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Q(t)})}function mN(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Q(t)})}function hN(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Q(t)})}function gN(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Q(t)})}function _N(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Q(t)})}function vN(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Q(t)})}function yN(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Q(t)})}function bN(e,t){return new e(KM({type:`number`,checks:[],...Q(t)}))}function xN(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Q(t)})}function SN(e){return new e({type:`unknown`})}function CN(e,t){return new e({type:`never`,...Q(t)})}function wN(e,t){return new kA({check:`less_than`,...Q(t),value:e,inclusive:!1})}function TN(e,t){return new kA({check:`less_than`,...Q(t),value:e,inclusive:!0})}function EN(e,t){return new AA({check:`greater_than`,...Q(t),value:e,inclusive:!1})}function DN(e,t){return new AA({check:`greater_than`,...Q(t),value:e,inclusive:!0})}function ON(e,t){return new jA({check:`multiple_of`,...Q(t),value:e})}function kN(e,t){return new NA({check:`max_length`,...Q(t),maximum:e})}function AN(e,t){return new PA({check:`min_length`,...Q(t),minimum:e})}function jN(e,t){return new FA({check:`length_equals`,...Q(t),length:e})}function MN(e,t){return new LA({check:`string_format`,format:`regex`,...Q(t),pattern:e})}function NN(e){return new RA({check:`string_format`,format:`lowercase`,...Q(e)})}function PN(e){return new zA({check:`string_format`,format:`uppercase`,...Q(e)})}function FN(e,t){return new BA({check:`string_format`,format:`includes`,...Q(t),includes:e})}function IN(e,t){return new VA({check:`string_format`,format:`starts_with`,...Q(t),prefix:e})}function LN(e,t){return new HA({check:`string_format`,format:`ends_with`,...Q(t),suffix:e})}function RN(e){return new UA({check:`overwrite`,tx:e})}function zN(e){return RN(t=>t.normalize(e))}function BN(){return RN(e=>e.trim())}function VN(){return RN(e=>e.toLowerCase())}function HN(){return RN(e=>e.toUpperCase())}function UN(){return RN(e=>bO(e))}function WN(e,t,n){return new e({type:`array`,element:t,...Q(n)})}function GN(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Q(n)})}function KN(e,t){let n=qN(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push($O(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push($O(r))}},e(t.value,t)),t);return n}function qN(e,t){let n=new EA({check:`custom`,...Q(t)});return n._zod.check=e,n}function JN(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&dO(e,t,n[t]);return e}function YN(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??GM,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function XN(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function ZN(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ZN(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&JN(o.schema,c),t.io===`input`&&sP(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function QN(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function $N(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${QN(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+QN(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
105
+
106
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function eP(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;eP(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var tP=new Set([`type`,`properties`,`required`,`additionalProperties`]),nP=[`oneOf`,`anyOf`];function rP(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function iP(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!tP.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??rP(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}dO(n,r,e.length===1?e[0]:iP(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=rP(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function aP(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of tP)if(t in e)return;let n=t.filter(e=>nP.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=iP(t);else{let e=n[0],i=nP.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>iP([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,JN(e,r))}function oP(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):JN(i,s),JN(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())eP(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])aP(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}JN(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,dO(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:lP(t,`input`,e.processors),output:lP(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function sP(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return sP(r.element,n);if(r.type===`set`)return sP(r.valueType,n);if(r.type===`lazy`)return sP(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return sP(r.innerType,n);if(r.type===`intersection`)return sP(r.left,n)||sP(r.right,n);if(r.type===`record`||r.type===`map`)return sP(r.keyType,n)||sP(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:sP(r.in,n)||sP(r.out,n);if(r.type===`object`){for(let e in r.shape)if(sP(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(sP(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(sP(e,n))return!0;return!!(r.rest&&sP(r.rest,n))}return!1}var cP=(e,t={})=>n=>{let r=YN({...n,processors:t});return ZN(e,r),$N(r,e),oP(r,e)},lP=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=YN({...i??{},target:a,io:t,processors:n});return ZN(e,o),$N(o,e),oP(o,e)},uP=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},dP=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},fP=(e,t)=>{uP(e,`minimum`,t),dP(e,`maximum`,t)},pP=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},mP=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},hP=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},gP=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},_P=(e,t)=>uP(e,`minimum`,t.minimum),vP=(e,t)=>dP(e,`maximum`,t.maximum),yP=e=>(t,n)=>{gP(t,n.format);let[r,i]=e[n.format];uP(t,`minimum`,r),dP(t,`maximum`,i)},bP={greater_than:(e,t)=>uP(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>dP(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>pP(e,t.value),number_format:yP(jO),bigint_format:yP(MO),min_length:_P,max_length:vP,length_equals:(e,t)=>fP(e,t.length),min_size:_P,max_size:vP,size_equals:(e,t)=>fP(e,t.size),string_format:(e,t)=>{gP(e,t.format),t.pattern&&mP(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>hP(e,t.mime)};function xP(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)bP[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&uP(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&uP(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&dP(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&dP(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&pP(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&hP(t,i.mime);for(let e of i.patterns??[])mP(t,e);return t}var SP={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},CP=new Map([[Oj,fA],[Aj,pA]]),wP=e=>CP.get(e)??e,TP=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=xP(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=SP[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(wP);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},EP=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=xP(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):XN(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},DP=(e,t,n,r)=>{n.not={}},OP=(e,t,n,r)=>{let i=e._zod.def,a=rO(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},kP=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(XN(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(XN(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},AP=(e,t,n,r)=>{XN(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},jP=(e,t,n,r)=>{XN(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},MP=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=xP(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ZN(a.element,t,{...r,path:[...r.path,`items`]})};function NP(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?NP(t.out):t.type===`catch`?NP(t.innerType):e._zod.optin}var PP=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&XN(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)dO(i.properties,e,ZN(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?NP(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ZN(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},FP=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ZN(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},IP=(e,t,n,r)=>{let i=e._zod.def,a=ZN(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ZN(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},LP=(e,t,n,r)=>{let i=e._zod.def,a=ZN(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},RP=(e,t,n,r)=>{let i=e._zod.def;ZN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},zP=Symbol();function BP(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(XN(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),zP):JSON.parse(o)}var VP=(e,t,n,r)=>{let i=e._zod.def;ZN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=BP(i.defaultValue,e,t,n,r);o!==zP&&(n.default=o)},HP=(e,t,n,r)=>{let i=e._zod.def;ZN(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=BP(i.defaultValue,e,t,n,r);o!==zP&&(n._prefault=o)},UP=(e,t,n,r)=>{let i=e._zod.def;ZN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{XN(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},WP=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ZN(o,t,r);let s=t.seen.get(e);s.ref=o},GP=(e,t,n,r)=>{let i=e._zod.def;ZN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},KP=(e,t,n,r)=>{let i=e._zod.def;ZN(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},qP=new WeakSet([Object.prototype,Error.prototype]);function JP(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var YP=$(`ZodError`,(e,t)=>{Ek.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);qP.has(n)||(qP.add(n),JP(n,`format`,e=>t=>kk(e,t)),JP(n,`flatten`,e=>t=>Ok(e,t)),JP(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,aO,2)}),JP(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,aO,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),XP=jk(YP),ZP=Mk(YP),QP=Nk(YP),$P=Fk(YP),eF=Vk(YP),tF=Hk(YP),nF=Uk(YP),rF=Wk(YP),iF=Gk(YP),aF=Kk(YP),oF=qk(YP),sF=Jk(YP);function cF(){yk.localeError||bk(VM())}function lF(){yk.memoizer||bk({memoizer:RM()})}var uF=$(`ZodType`,(e,t)=>(cF(),KA.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(vO(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return OO(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(DI(e,t))},superRefine(e,t){return this.check(OI(e,t))},overwrite(e){return this.check(RN(e))},optional(){return lI(this)},exactOptional(){return dI(this)},nullable(){return pI(this)},nullish(){return lI(pI(this))},nonoptional(e){return yI(this,e)},array(){return qF(this)},or(e){return ZF([this,e])},and(e){return tI(this,e)},transform(e){return CI(this,sI(e))},default(e){return hI(this,e)},prefault(e){return _I(this,e)},catch(e){return xI(this,e)},pipe(e){return CI(this,e)},readonly(){return TI(this)},describe(e){let t=this.clone();return GM.add(t,{description:e}),t},meta(...e){if(e.length===0)return GM.get(this);let t=this.clone();return GM.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return nk(this,`~standard`,{...YA(this),jsonSchema:{input:lP(this,`input`),output:lP(this,`output`)}})},set"~standard"(e){tk(this,`~standard`,e)},parse:function e(t,n){return XP(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ZP(this,t,n,{callee:e})},safeParse(e,t){return QP(this,e,t)},async safeParseAsync(e,t){return $P(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){tk(this,`spa`,e)},validate(e,t){return Rk(this,e,t)},validateAsync(e,t){return Bk(this,e,t)},encode:function e(t,n){return eF(this,t,n,{callee:e})},decode:function e(t,n){return tF(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await nF(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await rF(this,t,n,{callee:e})},safeEncode(e,t){return iF(this,e,t)},safeDecode(e,t){return aF(this,e,t)},async safeEncodeAsync(e,t){return oF(this,e,t)},async safeDecodeAsync(e,t){return sF(this,e,t)},toJSONSchema(e){return cP(this,{})(e)},get description(){return GM.get(this)?.description},get _def(){return this._zod.def}}),dF=$(`_ZodString`,(e,t)=>{XA.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TP(e,t,n,r)},rk({format:e=>xP(e).format??null,minLength:e=>xP(e).minimum??null,maxLength:e=>xP(e).maximum??null},{regex(...e){return this.check(MN(...e))},includes(...e){return this.check(FN(...e))},startsWith(...e){return this.check(IN(...e))},endsWith(...e){return this.check(LN(...e))},min(...e){return this.check(AN(...e))},max(...e){return this.check(kN(...e))},length(...e){return this.check(jN(...e))},nonempty(...e){return this.check(AN(1,...e))},lowercase(e){return this.check(NN(e))},uppercase(e){return this.check(PN(e))},trim(){return this.check(BN())},normalize(...e){return this.check(zN(...e))},toLowerCase(){return this.check(VN())},toUpperCase(){return this.check(HN())},slugify(){return this.check(UN())}})),fF=$(`ZodString`,(e,t)=>{XA.init(e,t),dF.init(e,t)},{email(e){return this.check(JM(yF,e))},url(e){return this.check(eN(SF,e))},jwt(e){return this.check(hN(LF,e))},emoji(e){return this.check(tN(CF,e))},guid(e){return this.check(YM(bF,e))},uuid(e){return this.check(XM(xF,e))},uuidv4(e){return this.check(ZM(xF,e))},uuidv6(e){return this.check(QM(xF,e))},uuidv7(e){return this.check($M(xF,e))},nanoid(e){return this.check(nN(wF,e))},cuid(e){return this.check(rN(TF,e))},cuid2(e){return this.check(iN(EF,e))},ulid(e){return this.check(aN(DF,e))},base64(e){return this.check(fN(PF,e))},base64url(e){return this.check(pN(FF,e))},xid(e){return this.check(oN(OF,e))},ksuid(e){return this.check(sN(kF,e))},ipv4(e){return this.check(cN(AF,e))},ipv6(e){return this.check(lN(jF,e))},cidrv4(e){return this.check(uN(MF,e))},cidrv6(e){return this.check(dN(NF,e))},e164(e){return this.check(mN(IF,e))},datetime(e){return this.check(gN(hF,e))},date(e){return this.check(_N(gF,e))},time(e){return this.check(vN(_F,e))},duration(e){return this.check(yN(vF,e))}});function pF(e){return qM(fF,e)}var mF=$(`ZodStringFormat`,(e,t)=>{ZA.init(e,t),dF.init(e,t)}),hF=$(`ZodISODateTime`,(e,t)=>{gj.init(e,t),mF.init(e,t)}),gF=$(`ZodISODate`,(e,t)=>{_j.init(e,t),mF.init(e,t)}),_F=$(`ZodISOTime`,(e,t)=>{vj.init(e,t),mF.init(e,t)}),vF=$(`ZodISODuration`,(e,t)=>{yj.init(e,t),mF.init(e,t)}),yF=$(`ZodEmail`,(e,t)=>{ej.init(e,t),mF.init(e,t)}),bF=$(`ZodGUID`,(e,t)=>{QA.init(e,t),mF.init(e,t)}),xF=$(`ZodUUID`,(e,t)=>{$A.init(e,t),mF.init(e,t)}),SF=$(`ZodURL`,(e,t)=>{cj.init(e,t),mF.init(e,t)}),CF=$(`ZodEmoji`,(e,t)=>{lj.init(e,t),mF.init(e,t)}),wF=$(`ZodNanoID`,(e,t)=>{uj.init(e,t),mF.init(e,t)}),TF=$(`ZodCUID`,(e,t)=>{dj.init(e,t),mF.init(e,t)}),EF=$(`ZodCUID2`,(e,t)=>{fj.init(e,t),mF.init(e,t)}),DF=$(`ZodULID`,(e,t)=>{pj.init(e,t),mF.init(e,t)}),OF=$(`ZodXID`,(e,t)=>{mj.init(e,t),mF.init(e,t)}),kF=$(`ZodKSUID`,(e,t)=>{hj.init(e,t),mF.init(e,t)}),AF=$(`ZodIPv4`,(e,t)=>{bj.init(e,t),mF.init(e,t)}),jF=$(`ZodIPv6`,(e,t)=>{Cj.init(e,t),mF.init(e,t)}),MF=$(`ZodCIDRv4`,(e,t)=>{wj.init(e,t),mF.init(e,t)}),NF=$(`ZodCIDRv6`,(e,t)=>{Ej.init(e,t),mF.init(e,t)}),PF=$(`ZodBase64`,(e,t)=>{kj.init(e,t),mF.init(e,t)}),FF=$(`ZodBase64URL`,(e,t)=>{Mj.init(e,t),mF.init(e,t)}),IF=$(`ZodE164`,(e,t)=>{Nj.init(e,t),mF.init(e,t)}),LF=$(`ZodJWT`,(e,t)=>{Fj.init(e,t),mF.init(e,t)}),RF=$(`ZodNumber`,(e,t)=>{Ij.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EP(e,t,n,r),e.isFinite=!0},rk({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=xP(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=xP(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=xP(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>xP(e).format??null},{gt(e,t){return this.check(EN(e,t))},gte(e,t){return this.check(DN(e,t))},min(e,t){return this.check(DN(e,t))},lt(e,t){return this.check(wN(e,t))},lte(e,t){return this.check(TN(e,t))},max(e,t){return this.check(TN(e,t))},int(e){return this.check(VF(e))},safe(e){return this.check(VF(e))},positive(e){return this.check(EN(0,e))},nonnegative(e){return this.check(DN(0,e))},negative(e){return this.check(wN(0,e))},nonpositive(e){return this.check(TN(0,e))},multipleOf(e,t){return this.check(ON(e,t))},step(e,t){return this.check(ON(e,t))},finite(){return this}}));function zF(e){return bN(RF,e)}var BF=$(`ZodNumberFormat`,(e,t)=>{Lj.init(e,t),RF.init(e,t)});function VF(e){return xN(BF,e)}var HF=$(`ZodUnknown`,(e,t)=>{Rj.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function UF(){return SN(HF)}var WF=$(`ZodNever`,(e,t)=>{zj.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DP(e,t,n,r)});function GF(e){return CN(WF,e)}var KF=$(`ZodArray`,(e,t)=>{lF(),Uj.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MP(e,t,n,r),e.element=t.element},{min(e,t){return this.check(AN(e,t))},nonempty(e){return this.check(AN(1,e))},max(e,t){return this.check(kN(e,t))},length(e,t){return this.check(jN(e,t))},unwrap(){return this.element}});function qF(e,t){return WN(KF,e,t)}var JF=$(`ZodObject`,(e,t)=>{lF(),Yj.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PP(e,t,n,r),uk(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return rI(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(vO(this._zod.def,{catchall:e}))},passthrough(){return this.clone(vO(this._zod.def,{catchall:UF()}))},loose(){return this.clone(vO(this._zod.def,{catchall:UF()}))},strict(){return this.clone(vO(this._zod.def,{catchall:GF()}))},strip(){return this.clone(vO(this._zod.def,{catchall:void 0}))},extend(e){return IO(this,e)},safeExtend(e){return RO(this,e)},merge(e){return zO(this,e)},pick(e){return NO(this,e)},omit(e){return FO(this,e)},partial(...e){return BO(cI,this,e[0])},exactPartial(...e){return BO(uI,this,e[0],`exactPartial`)},required(...e){return VO(vI,this,e[0])}});function YF(e,t){return new JF({type:`object`,shape:e??{},...Q(t)})}var XF=$(`ZodUnion`,(e,t)=>{Zj.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FP(e,t,n,r),e.options=t.options});function ZF(e,t){return new XF({type:`union`,options:e,...Q(t)})}var QF=$(`ZodDiscriminatedUnion`,(e,t)=>{XF.init(e,t),$j.init(e,t)});function $F(e,t,n){return new QF({type:`union`,options:t,discriminator:e,...Q(n)})}var eI=$(`ZodIntersection`,(e,t)=>{eM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IP(e,t,n,r)});function tI(e,t){return new eI({type:`intersection`,left:e,right:t})}var nI=$(`ZodEnum`,(e,t)=>{rM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OP(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new nI({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new nI({...t,checks:[],...Q(r),entries:i})}});function rI(e,t){return new nI({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var iI=$(`ZodLiteral`,(e,t)=>{iM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kP(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function aI(e,t){return new iI({type:`literal`,values:Array.isArray(e)?e:[e],...Q(t)})}var oI=$(`ZodTransform`,(e,t)=>{lF(),aM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jP(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new vk(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push($O(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push($O(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function sI(e){return new oI({type:`transform`,transform:e})}var cI=$(`ZodOptional`,(e,t)=>{sM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KP(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lI(e){return new cI({type:`optional`,innerType:e})}var uI=$(`ZodExactOptional`,(e,t)=>{cM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KP(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dI(e){return new uI({type:`optional`,innerType:e})}var fI=$(`ZodNullable`,(e,t)=>{lM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LP(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function pI(e){return new fI({type:`nullable`,innerType:e})}var mI=$(`ZodDefault`,(e,t)=>{uM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VP(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hI(e,t){return new mI({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():TO(t)}})}var gI=$(`ZodPrefault`,(e,t)=>{fM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HP(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function _I(e,t){return new gI({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():TO(t)}})}var vI=$(`ZodNonOptional`,(e,t)=>{pM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RP(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yI(e,t){return new vI({type:`nonoptional`,innerType:e,...Q(t)})}var bI=$(`ZodCatch`,(e,t)=>{gM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UP(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function xI(e,t){return new bI({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:fk(t)})}var SI=$(`ZodPipe`,(e,t)=>{_M.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WP(e,t,n,r),e.in=t.in,e.out=t.out});function CI(e,t){return new SI({type:`pipe`,in:e,out:t})}var wI=$(`ZodReadonly`,(e,t)=>{yM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GP(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function TI(e){return new wI({type:`readonly`,innerType:e})}var EI=$(`ZodCustom`,(e,t)=>{xM.init(e,t),uF.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AP(e,t,n,r)});function DI(e,t={}){return GN(EI,e,t)}function OI(e,t){return KN(e,t)}var kI=pF().regex(/^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9_])?$/,`Nom de compte GitHub invalide`),AI=pF().regex(/^[A-Za-z0-9._-]+$/,`Nom de repo invalide`),jI=pF().trim().regex(/^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9_])?\/[A-Za-z0-9._-]+$/,`Format attendu : owner/repo`);pF().regex(/^[0-9a-f]{7,40}$/,`SHA invalide`),YF({owner:kI,repo:AI,number:zF().int().positive()});var MI=rI([`local`,`claude`]);YF({repos:qF(jI).default([]),orgs:qF(kI).default([]),staleDays:zF().int().positive().default(5),intentModel:MI.default(`local`)}),ZF([YF({kind:aI(`repo`),name:jI}),YF({kind:aI(`org`),name:kI})]);var NI=rI([`LEFT`,`RIGHT`]);rI([`COMMENT`,`APPROVE`,`REQUEST_CHANGES`]),rI([`THUMBS_UP`,`THUMBS_DOWN`,`LAUGH`,`HOORAY`,`CONFUSED`,`HEART`,`ROCKET`,`EYES`]),$F(`subjectType`,[YF({subjectType:aI(`LINE`),path:pF().min(1),side:NI,line:zF().int().positive(),startLine:zF().int().positive().nullable(),startSide:NI.nullable(),body:pF().trim().min(1)}),YF({subjectType:aI(`FILE`),path:pF().min(1),body:pF().trim().min(1)})]);function PI(e,t){let n=new Set(e),r=new Map,i=new Map;for(let t of e)r.set(t,new Set),i.set(t,new Set);for(let e of t)e.from!==e.to&&n.has(e.from)&&n.has(e.to)&&(r.get(e.from).add(e.to),i.get(e.to).add(e.from));let a=e.filter(e=>r.get(e).size+i.get(e).size>0),o=e.filter(e=>r.get(e).size+i.get(e).size===0).sort(),s=new Map(a.map(e=>[e,r.get(e).size])),c=(e,t)=>i.get(t).size-i.get(e).size||r.get(e).size-r.get(t).size||e.localeCompare(t),l=[];for(;s.size>0;){let e;for(let[t,n]of s)n===0&&(e===void 0||c(t,e)<0)&&(e=t);if(e===void 0)for(let[t,n]of s)(e===void 0||n<s.get(e)||n===s.get(e)&&c(t,e)<0)&&(e=t);let t=e;l.push(t),s.delete(t);for(let e of i.get(t)){let t=s.get(e);t!==void 0&&s.set(e,t-1)}}return[...l,...o]}function FI(e,t,n){let r=new Set,i=[];for(let t of e)for(let e of PI(t.items,n))r.has(e)||(r.add(e),i.push(e));let a=t.filter(e=>!r.has(e));return[...i,...PI(a,n)]}var II=250;function LI(e,t){return e.commits.length>=II||e.commits.some(e=>e.oid===t)}var RI=(0,C.createContext)(null);function zI(){let e=(0,C.useContext)(RI);if(!e)throw Error(`usePrView must be used inside <PrViewContext>`);return e}function BI({html:e}){let t=zI();return(0,G.jsx)(`div`,{className:`md`,onClick:t.onMarkdownClick,dangerouslySetInnerHTML:{__html:e}})}function VI(e){let t=ED(),[n,r]=Ge({key:`br:draft:${e.draftKey}`,defaultValue:``}),[i,a]=(0,C.useState)(`write`),[o,s]=(0,C.useState)(null),c=(0,C.useRef)(null),l=dy({...t.markdown.queryOptions({text:n,context:e.repoContext}),enabled:i===`preview`&&n.trim()!==``,staleTime:1/0}),u=async t=>{let i=e.actions[t];if(i&&!i.disabled&&n.trim()!==``&&o===null){s(t);try{await i.run(n),r(``),e.onCancel?.()}catch{}finally{s(null)}}};return(0,G.jsxs)(Y,{className:`editor`,p:8,children:[(0,G.jsxs)(Ag,{value:i,onChange:a,variant:`outline`,children:[(0,G.jsxs)(Ag.List,{children:[(0,G.jsx)(Ag.Tab,{value:`write`,children:`Écrire`}),(0,G.jsx)(Ag.Tab,{value:`preview`,children:`Aperçu`}),e.suggestionLines&&(0,G.jsx)(Fp,{ml:`auto`,size:`compact-xs`,variant:`subtle`,onClick:()=>{let t="```suggestion\n"+(e.suggestionLines??[]).join(`
107
+ `)+"\n```\n",i=c.current,o=i?.selectionStart??n.length;r(n.slice(0,o)+(o>0&&n[o-1]!==`
108
+ `?`
109
+ `:``)+t+n.slice(o)),a(`write`),requestAnimationFrame(()=>i?.focus())},children:`± suggestion`})]}),(0,G.jsx)(Ag.Panel,{value:`write`,pt:6,children:(0,G.jsx)(Cm,{ref:c,autosize:!0,minRows:3,maxRows:18,autoFocus:e.autoFocus??!0,placeholder:e.placeholder??`Laisser un commentaire (Markdown)…`,value:n,onChange:e=>r(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&(t.ctrlKey||t.metaKey)?(t.preventDefault(),u(e.actions.length-1)):t.key===`Escape`&&(t.preventDefault(),e.onCancel?.())},styles:{input:{fontFamily:`var(--mantine-font-family-monospace)`,fontSize:13}}})}),(0,G.jsx)(Ag.Panel,{value:`preview`,pt:6,children:(0,G.jsxs)(Y,{mih:70,p:6,children:[n.trim()===``&&(0,G.jsx)(Z,{c:`dimmed`,children:`Rien à prévisualiser.`}),l.isFetching&&(0,G.jsx)(El,{size:`xs`}),l.data&&(0,G.jsx)(BI,{html:l.data})]})})]}),(0,G.jsxs)(X,{gap:6,mt:6,justify:`flex-end`,children:[(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,mr:`auto`,children:[`brouillon conservé localement · `,(0,G.jsx)(Em,{size:`xs`,children:`Ctrl ↵`}),` envoyer · `,(0,G.jsx)(Em,{size:`xs`,children:`Esc`}),` `,`fermer`]}),e.onCancel&&(0,G.jsx)(Fp,{size:`compact-sm`,variant:`subtle`,color:`gray`,onClick:e.onCancel,children:`Annuler`}),e.actions.map((t,r)=>(0,G.jsx)(Fp,{size:`compact-sm`,variant:t.variant??(r===e.actions.length-1?`filled`:`default`),color:t.color,disabled:t.disabled||n.trim()===``,loading:o===r,onClick:()=>void u(r),children:t.label},t.label))]})]})}var HI=480/6e4,UI=1e3,WI=1e4;function GI(e){let t=e.split(/\s+/).filter(Boolean).length;return Math.round(Math.min(WI,UI+t/HI))}function KI(e,t,n){return{...e,threads:e.threads.map(e=>{let r=e.id===t?e.comments.findIndex(e=>e.id===n):-1;if(r===-1)return e;let i=e.comments.map((e,t)=>t<=r&&e.unread?{...e,unread:!1}:e);return{...e,comments:i,unread:i.filter(e=>e.unread).length}})}}function qI(e,t){let n=new Set(t);return{...e,timeline:e.timeline.map(e=>n.has(e.id)&&e.unread?{...e,unread:!1}:e)}}var JI=400;function YI({text:e,active:t,onRead:n}){let r=(0,C.useRef)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(()=>document.visibilityState===`visible`),[c,l]=(0,C.useState)(!1),u=(0,C.useEffectEvent)(n);(0,C.useEffect)(()=>{let e=r.current?.closest(`.comment`)??r.current;if(!e)return;let t=new IntersectionObserver(([e])=>{if(!e)return;let t=e.rootBounds?.height??window.innerHeight;a(e.intersectionRatio>=.5||e.intersectionRect.height>=t/2)},{threshold:[0,.25,.5,.75,1]});return t.observe(e),()=>t.disconnect()},[]),(0,C.useEffect)(()=>{let e=()=>s(document.visibilityState===`visible`);return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),(0,C.useEffect)(()=>{if(!c)return;let e=!1,t=()=>{e||(e=!0,u())},n=setTimeout(t,JI);return()=>{clearTimeout(n),t()}},[c]);let d=t&&i&&o&&!c;return(0,G.jsx)(Gh,{label:c?`Lu`:`Se remplit pendant la lecture · clic : lu tout de suite`,openDelay:400,children:(0,G.jsxs)(Tc,{ref:r,className:`read-btn`,"data-done":c||void 0,"data-running":d||void 0,"aria-label":`Marquer comme lu`,onClick:()=>l(!0),children:[(0,G.jsx)(`span`,{className:`read-fill`,style:{animationDuration:`${GI(e)}ms`,animationPlayState:d?`running`:`paused`},onAnimationEnd:()=>l(!0)}),(0,G.jsx)(`span`,{className:`read-label`,children:c?`✓ Lu`:`Nouveau`})]})})}var XI=[{content:`THUMBS_UP`,emoji:`👍`,label:`+1`},{content:`THUMBS_DOWN`,emoji:`👎`,label:`-1`},{content:`LAUGH`,emoji:`😄`,label:`rire`},{content:`HOORAY`,emoji:`🎉`,label:`hourra`},{content:`CONFUSED`,emoji:`😕`,label:`perplexe`},{content:`HEART`,emoji:`❤️`,label:`cœur`},{content:`ROCKET`,emoji:`🚀`,label:`fusée`},{content:`EYES`,emoji:`👀`,label:`yeux`}],ZI=new Map(XI.map((e,t)=>[e.content,t]));function QI(e,t,n){let r=e.find(e=>e.content===t);return(r?.mine??!1)===n?[...e]:r?e.map(e=>e===r?{...e,count:e.count+(n?1:-1),mine:n}:e).filter(e=>e.count>0):[...e,{content:t,count:1,mine:!0}].sort((e,t)=>ZI.get(e.content)-ZI.get(t.content))}function $I(e,t){let n=e.logins.map(e=>e===t?`moi`:e),r=e.total-n.length;if(r>0){let e=`${r} ${n.length>0?`autre`:`personne`}${r>1?`s`:``}`;return n.length>0?`${n.join(`, `)} et ${e}`:e}return n.length<2?n.join(``):`${n.slice(0,-1).join(`, `)} et ${n.at(-1)}`}function eL(e,t,n){return e.pr.id===t?{...e,pr:{...e.pr,reactions:n(e.pr.reactions)}}:e.timeline.some(e=>e.id===t)?{...e,timeline:e.timeline.map(e=>e.id===t?{...e,reactions:n(e.reactions)}:e)}:{...e,threads:e.threads.map(e=>e.comments.some(e=>e.id===t)?{...e,comments:e.comments.map(e=>e.id===t?{...e,reactions:n(e.reactions)}:e)}:e)}}var tL=new Map(XI.map(e=>[e.content,e]));function nL({subjectId:e,reactions:t,onToggle:n}){let r=ED(),i=W_(),{me:a}=zI(),[o,s]=(0,C.useState)(!1),c=new Set(t.filter(e=>e.mine).map(e=>e.content)),l=r.pr.reactors.queryOptions({subjectId:e}),{data:u}=dy({...l,enabled:!1}),d=u!==void 0&&t.every(e=>u.find(t=>t.content===e.content)?.total===e.count),f=()=>{t.length>0&&i.prefetchQuery({...l,staleTime:d?3e4:0})};return(0,G.jsxs)(X,{gap:4,mt:6,className:`reactions`,onMouseEnter:f,onFocus:f,children:[t.map(e=>{let t=u?.find(t=>t.content===e.content);return(0,G.jsx)(Gh,{multiline:!0,maw:320,label:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{children:t?$I(t,a):`…`}),(0,G.jsx)(Z,{size:`xs`,opacity:.7,children:e.mine?`Clic : retirer ma réaction`:`Clic : réagir aussi`})]}),children:(0,G.jsxs)(Tc,{className:`reaction`,"data-mine":e.mine||void 0,"aria-pressed":e.mine,onClick:()=>n(e.content,!e.mine),children:[tL.get(e.content)?.emoji,` `,e.count]})},e.content)}),(0,G.jsxs)(vl,{opened:o,onChange:s,position:`top-start`,shadow:`md`,withinPortal:!0,children:[(0,G.jsx)(vl.Target,{children:(0,G.jsx)(Pl,{className:`reaction-add`,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Ajouter une réaction`,onClick:()=>s(e=>!e),children:`☺`})}),(0,G.jsx)(vl.Dropdown,{p:4,children:(0,G.jsx)(X,{gap:2,children:XI.map(e=>(0,G.jsx)(Tc,{className:`reaction-pick`,"data-mine":c.has(e.content)||void 0,"aria-label":e.label,title:e.label,onClick:()=>{n(e.content,!c.has(e.content)),s(!1)},children:e.emoji},e.content))})})]})]})}function rL(e){return t=>t_.show({color:`red`,title:e,message:t.message})}function iL(e){let t=ED(),n=W_(),r=t.pr.get.queryKey(e),i=e=>n.setQueryData(r,t=>t&&e(t)),a=()=>n.invalidateQueries({queryKey:r}),o=()=>{a(),n.invalidateQueries({queryKey:t.inbox.get.queryKey()})},s=async e=>{await n.cancelQueries({queryKey:r}),i(e),o()},c=(e,t,n)=>({id:t,comments:(e.pendingReview?.id===t?e.pendingReview.comments:0)+n}),l=gy(t.pr.setFileViewed.mutationOptions({onMutate:async({path:e,viewed:t})=>{await n.cancelQueries({queryKey:r}),i(n=>({...n,files:n.files.map(n=>n.path===e?{...n,viewed:t?`VIEWED`:`UNVIEWED`}:n)}))},onError:e=>{rL(`Marquage « vu » impossible`)(e),a()}})),u=gy(t.pr.setHunksSeen.mutationOptions({onMutate:async({hunks:e,seen:t})=>{await n.cancelQueries({queryKey:r}),i(n=>{let r=new Set(n.seenHunks);for(let n of e){let e=`${n.path}\n${n.hash}`;t?r.add(e):r.delete(e)}return{...n,seenHunks:[...r]}})},onError:rL(`Marquage du hunk impossible`)})),d=()=>void n.invalidateQueries({queryKey:t.inbox.get.queryKey(),refetchType:`none`});return{setFileViewed:l,setHunksSeen:u,markThreadsRead:gy(t.pr.markThreadsRead.mutationOptions({onMutate:async e=>{await n.cancelQueries({queryKey:r}),i(t=>e.reduce((e,t)=>KI(e,t.threadId,t.lastCommentId),t))},onSuccess:d,onError:rL(`Marquage comme lu impossible`)})),markEntriesRead:gy(t.pr.markEntriesRead.mutationOptions({onMutate:async e=>{await n.cancelQueries({queryKey:r}),i(t=>qI(t,e))},onSuccess:d,onError:rL(`Marquage comme lu impossible`)})),visit:gy(t.pr.visit.mutationOptions()),reply:gy(t.pr.reply.mutationOptions({onSuccess:(e,{threadId:t,pendingReviewId:n})=>s(r=>({...KI({...r,threads:r.threads.map(n=>n.id===t?{...n,comments:[...n.comments,e]}:n)},t,e.id),pendingReview:e.pending&&n?c(r,n,1):r.pendingReview})),onError:rL(`Réponse non envoyée`)})),setResolved:gy(t.pr.setResolved.mutationOptions({onMutate:({threadId:e,resolved:t})=>i(n=>({...n,threads:n.threads.map(n=>n.id===e?{...n,isResolved:t}:n)})),onSettled:o,onError:rL(`Changement de statut impossible`)})),react:gy(t.pr.react.mutationOptions({onMutate:async({subjectId:e,content:t,on:a})=>{await n.cancelQueries({queryKey:r}),i(n=>eL(n,e,e=>QI(e,t,a)))},onSuccess:(e,{subjectId:r})=>{i(t=>eL(t,r,()=>e));let a=t.pr.reactors.queryOptions({subjectId:r});n.getQueryData(a.queryKey)!==void 0&&n.fetchQuery({...a,staleTime:0})},onError:e=>{rL(`Réaction impossible`)(e),a()}})),addThread:gy(t.pr.addThread.mutationOptions({onSuccess:({thread:e,pendingReviewId:t})=>s(n=>({...n,threads:[...n.threads,e],pendingReview:t?c(n,t,1):n.pendingReview})),onError:rL(`Commentaire non envoyé`)})),submitReview:gy(t.pr.submitReview.mutationOptions({onSuccess:()=>{t_.show({color:`green`,message:`Review envoyée.`}),o()},onError:rL(`Review non envoyée`)})),discardReview:gy(t.pr.discardReview.mutationOptions({onSuccess:o,onError:rL(`Abandon impossible`)})),comment:gy(t.pr.comment.mutationOptions({onSuccess:e=>s(t=>({...t,timeline:[...t.timeline,e]})),onError:rL(`Commentaire non envoyé`)})),deleteComment:gy(t.pr.deleteComment.mutationOptions({onSuccess:o,onError:rL(`Suppression impossible`)})),updateComment:gy(t.pr.updateComment.mutationOptions({onSuccess:o,onError:rL(`Modification impossible`)})),applySuggestion:gy(t.pr.applySuggestion.mutationOptions({onSuccess:e=>{t_.show({color:`green`,message:`Suggestion appliquée (commit ${e.slice(0,7)}).`}),o()},onError:rL(`Suggestion non appliquée`)}))}}function aL(e,t,n){let r=e.comments.at(-1);return e.isResolved||!r||r.author?.login===t?!1:n===t||e.comments.some(e=>e.author?.login===t)}function oL(){let e=zI(),t=iL(e.ref),[n,r]=(0,C.useState)(`open`),i=e.me,a=e.detail.pr.author?.login,o=e.detail.threads,s={open:o.filter(e=>!e.isResolved).length,mine:o.filter(e=>aL(e,i,a)).length,unread:o.filter(e=>e.unread>0).length,all:o.length},c=o.filter(e=>n===`open`?!e.isResolved:n===`mine`?aL(e,i,a):n!==`unread`||e.unread>0);return(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{style:{padding:`10px 12px`,borderBottom:`1px solid var(--br-border)`,position:`sticky`,top:0,background:`var(--br-bg)`,zIndex:1},children:[(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,mb:6,children:[o.length,` threads · `,e.detail.timeline.length,` messages généraux`]}),(0,G.jsx)(Yh,{size:`xs`,fullWidth:!0,value:n,onChange:e=>r(e),data:[{value:`open`,label:`Ouverts ${s.open}`},{value:`mine`,label:`Ma réponse ${s.mine}`},{value:`unread`,label:`Non lus ${s.unread}`},{value:`all`,label:`Tous ${s.all}`}]})]}),c.map(t=>{let n=t.comments.at(-1),r=t.isResolved&&e.focusedThread!==t.id;return(0,G.jsxs)(`div`,{className:`conv-item`,"data-state":t.pending?`pending`:t.isResolved?`resolved`:`open`,"data-current":e.focusedThread===t.id||void 0,onClick:()=>e.scrollToThread(t.id),children:[(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[t.pending?(0,G.jsx)(Ep,{size:`sm`,color:`grape`,variant:`filled`,children:`En attente`}):t.isResolved?(0,G.jsx)(Ep,{size:`sm`,color:`green`,variant:`filled`,children:`✓ Résolu`}):(0,G.jsx)(Ep,{size:`sm`,color:`yellow`,variant:`filled`,autoContrast:!0,children:`● Non résolu`}),(0,G.jsxs)(Z,{size:`xs`,ff:`monospace`,c:`dimmed`,truncate:!0,style:{flex:1},children:[t.path,t.subjectType===`FILE`?` · fichier`:t.line===null?``:`:${t.line}`,t.isOutdated?` · outdated`:``]}),t.unread>0&&(0,G.jsxs)(Ep,{size:`xs`,color:`orange`,variant:`light`,children:[t.unread,` nouveau`,t.unread>1?`x`:``]})]}),n&&!r&&(0,G.jsxs)(Z,{size:`sm`,className:`clamp2`,my:2,children:[(0,G.jsx)(`b`,{children:n.author?.login??`ghost`}),` :`,` `,n.body.replace(/```suggestion[\s\S]*?```/g,`[suggestion]`)]}),(0,G.jsxs)(X,{gap:4,hidden:r,children:[[...new Map(t.comments.map(e=>[e.author?.login,e.author])).values()].map(e=>(0,G.jsx)(Cp,{src:e?.avatarUrl,size:16},e?.login??`ghost`)),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[t.comments.length,` message`,t.comments.length>1?`s`:``,aL(t,i,a)?` · attend ma réponse`:``]})]})]},t.id)}),c.length===0&&(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,p:`md`,children:`Aucun thread pour ce filtre.`}),(0,G.jsx)(Z,{size:`xs`,tt:`uppercase`,fw:600,c:`dimmed`,px:12,pt:`md`,pb:4,children:`Conversation générale`}),(0,G.jsx)(tg,{gap:0,children:e.detail.timeline.map(e=>(0,G.jsxs)(`div`,{className:`comment`,"data-new":e.unread||void 0,children:[(0,G.jsx)(Cp,{src:e.author?.avatarUrl,size:22}),(0,G.jsxs)(`div`,{className:`comment-body`,children:[(0,G.jsxs)(X,{gap:6,mb:2,children:[(0,G.jsx)(Z,{size:`sm`,fw:600,children:e.author?.login??`ghost`}),e.kind===`review`&&(0,G.jsxs)(Ep,{size:`xs`,variant:`light`,color:GD[e.state]?.color??`gray`,children:[`review : `,GD[e.state]?.label??e.state]}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:UD(e.createdAt)}),e.unread&&(0,G.jsx)(YI,{text:e.body,active:!0,onRead:()=>t.markEntriesRead.mutate([e.id])})]}),e.bodyHTML?(0,G.jsx)(BI,{html:e.bodyHTML}):(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:`(sans message)`}),(0,G.jsx)(nL,{subjectId:e.id,reactions:e.reactions,onToggle:(n,r)=>t.react.mutate({subjectId:e.id,content:n,on:r})})]})]},e.id))}),(0,G.jsx)(VI,{draftKey:`general:${e.ref.owner}/${e.ref.repo}#${e.ref.number}`,repoContext:`${e.ref.owner}/${e.ref.repo}`,placeholder:`Commentaire général sur la PR…`,autoFocus:!1,actions:[{label:`Commenter`,run:n=>t.comment.mutateAsync({prId:e.detail.pr.id,body:n})}]})]})}function sL(){let e=zI(),{pr:t}=e.detail,n=iL(e.ref).react;return(0,G.jsxs)(`div`,{className:`panel-body`,children:[(0,G.jsxs)(X,{gap:8,mb:`sm`,children:[(0,G.jsx)(Cp,{src:t.author?.avatarUrl,size:22}),(0,G.jsx)(Z,{size:`sm`,fw:600,children:t.author?.login??`ghost`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:UD(t.createdAt)}),(0,G.jsx)(tf,{href:t.url,target:`_blank`,size:`xs`,c:`dimmed`,ml:`auto`,children:`modifier sur GitHub ↗`})]}),t.bodyHTML?(0,G.jsx)(BI,{html:t.bodyHTML}):(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:`Pas de description.`}),(0,G.jsx)(nL,{subjectId:t.id,reactions:t.reactions,onToggle:(e,r)=>n.mutate({subjectId:t.id,content:e,on:r})})]})}function cL(e){return typeof e==`object`?e.key:e}function lL(e,t){let n=e.length;return new Proxy(e,{get(e,r,i){if(typeof r==`string`){let i=r.charCodeAt(0);if(i>=48&&i<=57){let i=+r;if(Number.isInteger(i)&&i>=0&&i<n){let n=e[i];if(typeof n!=`object`){let r=t[i*2];n=e[i]={index:i,key:n,start:r,size:t[i*2+1],end:r+t[i*2+1],lane:0}}return n}}if(r===`length`)return n}return Reflect.get(e,r,i)}})}function uL(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return(o.length!==r.length||o.some((e,t)=>r[t]!==e))&&(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1),i}return o.updateDeps=e=>{r=e},o}function dL(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var fL=(e,t)=>Math.abs(e-t)<1.01,pL=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})};function mL({offset:e,isScrolling:t,elementMax:n,holdOffset:r,scrollOffset:i,pendingWrite:a,clampedMaxAtWrite:o}){return t&&a===null&&e===i?`spurious`:a!==null&&Math.abs(e-a.target)<1.5?`readBack`:a!==null&&!a.smooth&&n!==null&&a.target>n+r+.5&&Math.abs(e-(n+r))<1.5||a!==null&&!a.smooth&&a.lowMaxes?.some(t=>Math.abs(e-t)<1.5)?`clampedReadBack`:o!==null&&Math.abs(e-o)<1.5?`clampedEcho`:`external`}var hL=e=>e===`smooth`||e===`smoothFinishing`;function gL({kind:e,offset:t,command:n,target:r}){return e!==`spurious`&&e!==`readBack`&&e!==`clampedReadBack`&&n?.index!=null&&n.phase!==`queued`&&!hL(n.phase)&&!fL(t,n.lastTargetOffset)&&!fL(t,r())&&e!==`clampedEcho`}var _L=40;function vL(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<_L;)n--;if(n<0)return!1;let r=e[n],i=n-1;for(;i>=0&&r.t-e[i].t<_L;)i--;if(i<0)return!1;let a=e[i],o=(t.offset-r.offset)/(t.t-r.t),s=(r.offset-a.offset)/(r.t-a.t);return o*s>=0&&Math.abs(o)>=2*Math.abs(s)&&Math.abs(o)-Math.abs(s)>=.8}function yL(e){let t=e[e.length-1];if(t===void 0)return!1;let n=e.length-2;for(;n>=0&&t.t-e[n].t<_L;)n--;if(n<0)return!1;let r=e[n];return Math.abs(t.offset-r.offset)/(t.t-r.t)>=.05}var bL,xL=()=>{if(bL!==void 0)return bL;if(typeof navigator>`u`)return bL=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return bL=!0;let e=navigator.maxTouchPoints;return bL=navigator.platform===`MacIntel`&&e!==void 0&&e>0},SL,CL=()=>SL===void 0?SL=xL()&&typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`overflow-anchor: auto`):SL,wL={capture:!0,passive:!0},TL=class{constructor(e){this.host=e,this._touch=null,this.inMotion=()=>this._touch!==null&&this._touch.phase!==`lateFling`,this.dragging=()=>this._touch?.phase===`down`&&this._touch.moved,this.tail=()=>this._touch?.phase===`tail`?this._touch.moved?`fling`:`tap`:null,this.onScroll=({isScrolling:e,ownReadBack:t,moved:n,external:r})=>(e&&this._touch?.phase===`tail`?this._openTail(this._touch.moved||!t,!1):this._touch?.phase===`lateFling`&&(this.host.now()>this._touch.until?this._touch=null:r&&e&&n&&this._openTail(!0,!1)),!t&&e&&n&&this._touch?.phase===`down`?(this._touch.moved=!0,!0):!1),this.touchStart=()=>{this.end(),this._touch={phase:`down`,moved:!1}},this.touchEnd=()=>{let e=this._touch?.phase===`down`&&this._touch.moved;this.end(),this._openTail(e,e)},this.end=()=>{let e=this.host.getWindow();this._touch?.phase===`tail`&&e!=null&&e.clearTimeout(this._touch.timerId),this._touch=null},this.listen=e=>{let t=()=>this.touchStart(),n=()=>this.touchEnd();return e.addEventListener(`touchstart`,t,wL),e.addEventListener(`touchend`,n,wL),e.addEventListener(`touchcancel`,n,wL),()=>{e.removeEventListener(`touchstart`,t,wL),e.removeEventListener(`touchend`,n,wL),e.removeEventListener(`touchcancel`,n,wL),this.end()}},this._openTail=(e,t)=>{let n=this.host.getWindow();if(!xL()||n==null)return;this.end();let r={phase:`tail`,moved:e,awaitingFling:t,timerId:n.setTimeout(()=>{this.host.tailStillMoving()?this._openTail(r.moved,r.awaitingFling):(this._touch=r.awaitingFling?{phase:`lateFling`,until:this.host.now()+1e3}:null,this.host.onTailClosed())},150)};this._touch=r}}get touch(){return this._touch}},EL=e=>{let{clientWidth:t,clientHeight:n}=e;return{width:t,height:n}},DL=e=>{let t=new Set;return{schedule:n=>{let r=e.requestAnimationFrame(()=>{t.delete(r),n()});t.add(r)},cancel:()=>{t.forEach(t=>e.cancelAnimationFrame(t)),t.clear()}}},OL=e=>e,kL=e=>{let t=e.overscan*Math.max(e.lanes??1,1),n=Math.max(e.startIndex-t,0),r=Math.min(e.endIndex+t,e.count-1)-n+1,i=Array(r);for(let e=0;e<r;e++)i[e]=n+e;return i},AL=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(EL(n)),!r.ResizeObserver)return()=>{};let a=DL(r),o=new r.ResizeObserver(()=>{let t=()=>{i(EL(n))};e.options.useAnimationFrameWithResizeObserver?a.schedule(t):t()});return o.observe(n,{box:`content-box`}),()=>{o.unobserve(n),a.cancel()}},jL={passive:!0},ML=typeof window>`u`||`onscrollend`in window,NL=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&ML,o=0,s=a?null:pL(i,()=>t(n(r),!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,jL),a&&r.addEventListener(`scrollend`,u,jL),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},PL=(e,t)=>NL(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),FL=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},IL=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},LL=(e,t)=>e===`smooth`?t?`smoothLanded`:`smooth`:`instant`,RL=e=>e?.phase===`smooth`||e?.phase===`smoothLanded`;function zL(e,t,n,r){if(t===0)return!1;let i=r(0),a=new Set,o=0;for(;o<e;){let e=n(o);if(e===i)break;a.add(e),o++}let s=e-o;if(s===0||s>=t)return!1;for(let e=0;e<s;e++)if(r(e)!==n(o+e))return!1;for(let e=s;e<t;e++)if(a.has(r(e)))return!1;return!0}var BL=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._iosGesture=new TL({getWindow:()=>this.targetWindow,now:()=>this.now(),tailStillMoving:()=>{let e=this.scrollState;if(e?.phase!==`queued`||this.pendingWrite!==null)return!1;let t=this._readElementOffset();return t===null||this._lastElementOffset===null||Math.abs(t-this._lastElementOffset)<1?!1:(this._lastElementOffset=t,e.samples=[...e.samples??[],{t:this.now(),offset:t}],!0)},onTailClosed:()=>{let e=this.scrollState;e?.phase===`queued`&&yL(e.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=null,n=()=>{if(e)return e;let n=this.targetWindow;if(!n||!n.ResizeObserver)return null;let i=t=DL(n);return e=new n.ResizeObserver(e=>{let t=()=>{let t={sync:!1};this._resizeBatch=t;try{e.forEach(r)}finally{this._resizeBatch=null,t.notify&&(this.notify(t.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment())}};this.options.useAnimationFrameWithResizeObserver?i.schedule(t):t()})},r=e=>{let t=e.target,n=this.indexFromElement(t);if(t.isConnected)this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}}};return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),t?.cancel(),e=null,t=null},observe:e=>n()?.observe(e,{box:`border-box`}),unobserve:e=>n()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:OL,rangeExtractor:kL,onChange:()=>{},measureElement:FL,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=this._singleLaneMeasurements?.items??s,l=e=>cL(c[e]),u=e>0?l(0):null,d=e>0?l(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==u||t.getItemKey(o-1)!==d)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==d)&&(o>e||zL(e,o,l,t.getItemKey))&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=null;if(r&&this.scrollOffset!==null&&!this._awaitingCommandReadBack()){let[e,t]=r,n=this.getMeasurements(),{count:a,getItemKey:s}=this.options,c=0;for(;c<a&&s(c)!==e;)c++;if(c<a){let e=n[c];if(e){let n=Math.max(0,e.start+t);!i&&n!==this.scrollOffset&&(o=n-this.scrollOffset,this.scrollOffset=n)}}}i?this.pendingScrollAnchor={kind:`follow`,behavior:i}:o!==null&&(this._canWriteScroll()?this.pendingScrollAnchor={kind:`anchor`,delta:o}:(this._holdOffset+=o,this._followOffsetTarget(o)))},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=uL(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var e;this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,(e=this._momentumStop)==null||e.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{let n=t?this._elementMaxScrollOffset():null,r=this._reportedOverscroll;this._reportedOverscroll=e<0||n!==null&&e>n+1;let i=e;this._lastElementOffset=i,e=this._toLayoutOffset(e);let a=this._classifyScrollEvent(e,t,n);if(a===`spurious`)return;a===`readBack`?e=this.pendingWrite.target:a===`clampedReadBack`&&this.scrollState?.index!=null&&e<this.getMaxScrollOffset()-1.5?this.scrollState.lastTargetOffset=e:gL({kind:a,offset:e,command:this.scrollState,target:()=>this.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,this._clampedAdjustment!==null&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);let o=this.getScrollOffset(),s=this.scrollDirection;this.scrollDirection=t?o===e?this.scrollDirection:o<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t;let c=this.scrollState;if(c?.phase===`queued`&&a===`external`&&t){if(r||this._reportedOverscroll)c.samples=[];else{let e=this.now();c.samples=[...(c.samples??[]).filter(t=>e-t.t<=200),{t:e,offset:i}],(s!==null&&this.scrollDirection!==s||vL(c.samples))&&(this.scrollState=null)}}this._iosGesture.onScroll({isScrolling:t,ownReadBack:a===`readBack`,moved:e!==o,external:a===`external`&&this.scrollState?.phase!==`smooth`&&this.scrollState?.phase!==`smoothFinishing`})&&this.scrollState?.phase===`queued`&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();let t=this.pendingScrollAnchor;this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled&&(t.kind===`anchor`?this._canWriteScroll()?RL(this.scrollState)&&!fL(this.getScrollOffset()-t.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(t.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=t.delta,this._followOffsetTarget(t.delta),this.notify(!1)):this.scrollToEnd({behavior:t.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(e,t,n)=>mL({offset:e,isScrolling:t,elementMax:n,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:this._clampedAdjustment?.maxAtWrite??null}),this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,n=this.getMaxScrollOffset();n>t+.5&&(this._clampedAdjustment=e>n+.5?{target:e,maxAtWrite:n}:null,this._scrollToOffset(e))},this._writeAwaitingCommand=()=>{let e=this.scrollState;if(e===null||e.phase!==`queued`)return;let{behavior:t}=e;this.getMeasurements();let n=this.getScrollStateTarget(e);e.lastTargetOffset=n,this._clampedAdjustment=null,e.phase=LL(t,e.index!=null&&fL(n,this.getScrollOffset())),this._scrollToOffset(n,{behavior:t}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{let e=this.scrollElement;if(e==null)return null;let{horizontal:t,isRtl:n}=this.options;return typeof e.scrollTop==`number`?t?e.scrollLeft*(n&&-1||1):e.scrollTop:typeof e.scrollY==`number`?t?e.scrollX:e.scrollY:null},this._canWriteScroll=()=>!(xL()&&this._iosGesture.inMotion())&&!this._reportedOverscroll,this._flushHoldIfReady=e=>{if(this._holdOffset===0||!this.scrollElement||!this.options.enabled||!this._canWriteScroll()||this.scrollState?.phase===`smooth`)return;this._holdOffset=0,this.scrollOffset!==null&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(e);let t=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(t),this._scrollToOffset(t)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=uL(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=uL(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._singleLaneMeasurements?.flat;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e}let o=u===0?Array(e):this._singleLaneMeasurements.items.slice(),c;if(u===0)c=t+n;else{let e=u-1;c=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t);o[t]=e;let n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=c,a[t*2+1]=i,c+=i+s}this._singleLaneMeasurements={flat:a,items:o};let d=lL(o,a);return this.measurementsCache=d,d}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=uL(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=UL(e,t,n,r,r===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=uL(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t,this.options.lanes]},(e,t,n,r,i,a)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n,lanes:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!RL(this.scrollState))return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),e.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;if(!this.isIndexInRange(e))return;this._resizeBatch?.sync&&this.getMeasurements();let r,i,a,o=this._singleLaneMeasurements?.flat;if(this.options.lanes===1&&o!=null)a=this.options.getItemKey(e),i=o[e*2],r=o[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;a=t.key,i=t.start,r=t.size}let s=this.itemSizeCache.get(a)??r,c=t-s;if(c!==0){let o=this.options.anchorTo===`end`&&!RL(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,l=o?this._getLayoutTotalSize():0,u=this.getScrollOffset(),d=this.itemSizeCache.has(a)?i+s<=u&&this.scrollDirection!==`backward`:i<u,f=!RL(this.scrollState)&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?d:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:a,start:i,size:r,end:i+r,lane:0},c,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(a,t),this.itemSizeCacheVersion++;let p=!1;if(this._awaitingCommandReadBack()||(o?p=this.applyScrollAdjustment(this._getLayoutTotalSize()-l):f&&(p=this.applyScrollAdjustment(c))),this._resizeBatch){this._resizeBatch.notify=!0,(n=this._resizeBatch).sync||(n.sync=p);return}this.notify(p),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment()}},this.getVirtualItems=uL(()=>[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset],(e,t,n)=>{let r=[];for(let i=0,a=e.length;i<a;i++){let a=t[e[i]];r.push(n===0?a:{...a,start:a.start-n,end:a.end-n})}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._singleLaneMeasurements?.flat,r=this.options.lanes===1&&n!=null;return dL(t[VL(0,t.length-1,r?e=>n[e*2]:e=>dL(t[e]).start,e)])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;let e=this._elementMaxScrollOffset();if(e===null)return;let t=this.pendingWrite,n=Math.max(e,0)+this._holdOffset;if(n>=t.target)return;let r=t.lowMaxes??=[];r[r.length-1]!==n&&r.push(n)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=e=>{let t=e+this._holdOffset;return this.pendingScrollAnchor?.kind===`anchor`&&(t+=this.pendingScrollAnchor.delta),t},this._elementMaxScrollOffset=()=>{let e=this.scrollElement;if(e===null)return null;if(`scrollHeight`in e)return this.options.horizontal?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;if(`document`in e){let t=e.document.documentElement;return this.options.horizontal?t.scrollWidth-e.innerWidth:t.scrollHeight-e.innerHeight}return null},this._momentumStop=null,this._stopMomentum=e=>{let t=this.scrollElement,n=this.targetWindow;if(t===null||n===null)return;let r=`document`in t?t.document.scrollingElement:t;if(!r?.style)return;if(this._momentumStop){this._momentumStop.done=e;return}let{style:i}=r,a=this.options.horizontal?`overflow-x`:`overflow-y`,o=i.getPropertyValue(a),s=i.getPropertyPriority(a);i.setProperty(a,`hidden`,`important`);let c={restore:()=>i.getPropertyValue(a)!==`hidden`||i.getPropertyPriority(a)!==`important`?!1:(i.setProperty(a,o,s),!0),done:e};this._momentumStop=c,n.requestAnimationFrame(()=>n.requestAnimationFrame(()=>{this._momentumStop===c&&(this._momentumStop=null,c.restore()&&c.done())}))},this._clampedBy=e=>{let t=this._elementMaxScrollOffset();if(t===null)return null;let n=t+this._holdOffset;return e>n+.5?{target:e,maxAtWrite:n}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1){let e=this.getMaxScrollOffset(),n=e-this.options.paddingEnd+this.options.scrollPaddingEnd;return[Math.max(Math.min(n,e),0),t]}let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._startScroll({index:null,align:t},this.getOffsetForAlignment(e,t),n,`absolute`)},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r;this._startScroll({index:e,align:a},i,n,`absolute`)},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+e,`start`);this._startScroll({index:null,align:`start`},n,t,`relative`)},this.scrollToEnd=({behavior:e=`auto`}={})=>{this.options.count>0?this._startScroll({index:this.options.count-1,align:`end`,toEnd:!0},Math.max(this.getMaxScrollOffset(),0),e,`absolute`):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.cancelScroll=()=>{this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._singleLaneMeasurements?.flat;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n}={})=>{let r={target:e+(t??0),smooth:n===`smooth`};return this.pendingWrite=r,this.options.scrollToFn(e-this._holdOffset,{behavior:n,adjustments:t},this),r},this.getCommandWrittenOffset=()=>this.scrollState!==null&&this.pendingWrite!==null&&!this.pendingWrite.smooth?this.pendingWrite.target:null,this._awaitingCommandReadBack=()=>{let e=this.getCommandWrittenOffset();return!(xL()&&this._iosGesture.dragging())&&e!==null&&!fL(e,this.getScrollOffset())},this._followOffsetTarget=e=>{this.scrollState!==null&&this.scrollState.index==null&&(this.scrollState.lastTargetOffset+=e)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}get scrollAdjustments(){return 0}applyScrollAdjustment(e,t){if(e===0)return!1;if(this._followOffsetTarget(e),this._canWriteScroll()){let n=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(n+e);let r=this._scrollToOffset(n,{adjustments:e,behavior:t});return this.scrollOffset!==null&&(this.pendingWrite===r&&(this.scrollOffset+=e),this.scrollOffset<0&&(this.scrollOffset=0)),!0}return this._holdOffset+=e,this.scrollOffset!==null&&(this.scrollOffset+=e),!0}scheduleScrollReconcile(){this.targetWindow?this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}):this.scrollState=null}getScrollStateTarget(e){let t=e.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:e.index==null?void 0:this.getOffsetForIndex(e.index,e.align);return t?t[0]:e.lastTargetOffset}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}if(this.scrollState.phase===`queued`){this.scheduleScrollReconcile();return}this.getMeasurements();let e=this.getScrollStateTarget(this.scrollState),t=this.scrollState.index==null?1:this.options.useAnimationFrameWithResizeObserver?3:2,n=e!==this.scrollState.lastTargetOffset;if(!n&&fL(e,this.getScrollOffset())){if(this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothLanded`:this.scrollState.phase===`smoothFinishing`&&(this.scrollState.phase=`instant`),this.scrollState.stableFrames++,this.scrollState.stableFrames>=t){this.getScrollOffset()!==e&&this._scrollToOffset(e,{behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let t=this.getSize()||600,n=Math.abs(e-this.getScrollOffset()),r=RL(this.scrollState)&&n>t;this.scrollState.lastTargetOffset=e,r?this.scrollState.phase=`smooth`:this.scrollState.phase===`smooth`?this.scrollState.phase=`smoothFinishing`:this.scrollState.phase===`smoothLanded`&&(this.scrollState.phase=`instant`),this._scrollToOffset(e,{behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}_startScroll(e,t,n,r){let i=this._iosGesture.tail();if(r===`absolute`&&i!==null){if(i===`fling`&&CL()){this._stopMomentum(()=>{this.scrollState?.phase!==`queued`||this._iosGesture.tail()!==`fling`||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())}),this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,phase:`queued`,behavior:n,samples:[]},this.scheduleScrollReconcile();return}this._iosGesture.end()}this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,behavior:n,phase:LL(n,e.index!=null&&fL(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}},VL=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function HL(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function UL(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=HL(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=VL(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var WL=typeof document<`u`?C.useLayoutEffect:C.useEffect;function GL({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=C.useReducer(e=>e+1,0)[1],a=C.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=C.useRef(!1),s=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},c=(e,t,n)=>{let r=a.current,i=!!e.options.horizontal,o=t.start-e.options.scrollMargin;r.lastPositions.get(n)!==o&&(r.lastPositions.set(n,o),r.mode===`transform`?n.style.transform=i?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:n.style[i?`left`:`top`]=`${o}px`)},l=e=>{let t=a.current;if(t.enabled&&t.container){s(e);for(let t of e.getVirtualItems()){let n=e.elementsCache.get(t.key);n&&c(e,t,n)}}},u={...r,onChange:(t,n)=>{var s;let c=a.current,u=!0;if(c.enabled){l(t);let e=t.range,n=c.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n&&!o.current?(0,ss.flushSync)(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[d]=C.useState(()=>{let e=new BL(u),t=e.measureElement;return e.measureElement=n=>{o.current=!0;try{t(n)}finally{o.current=!1}let r=a.current;if(n!==null&&r.enabled&&r.container){let t=e.measurementsCache[e.indexFromElement(n)];t&&c(e,t,n)}},Object.assign(e,{containerRef:t=>{let n=a.current;n.container=t,n.lastSize=null,t!==null&&l(e)}})});return d.setOptions(u),WL(()=>d._didMount(),[]),WL(()=>(s(d),d._willUpdate())),WL(()=>{l(d)}),d}function KL(e){return GL({observeElementRect:AL,observeElementOffset:PL,scrollToFn:IL,...e})}function qL(e){return e.slice(e.lastIndexOf(`/`)+1)}var JL=class{#e=new Map;#t=new Map;#n=[];constructor(e){let t=new Map;for(let n of e){let{id:e,extensions:r,filenames:i=[]}=n.info;if(this.#e.has(e))throw Error(`Langage déclaré deux fois : ${e}`);this.#e.set(e,n);for(let e of i)YL(this.#t,e.toLowerCase(),n);for(let e of r)YL(t,e.toLowerCase(),n)}this.#n=[...t].sort(([e],[t])=>t.length-e.length)}all(){return[...this.#e.values()]}byId(e){return this.#e.get(e)}detect(e){let t=qL(e).toLowerCase(),n=this.#t.get(t);if(n!==void 0)return n;for(let[e,n]of this.#n)if(t.length>e.length&&t.endsWith(e))return n;return null}};function YL(e,t,n){let r=e.get(t);if(r!==void 0&&r!==n)throw Error(`« ${t} » revendiqué par ${r.info.id} et ${n.info.id}`);e.set(t,n)}var XL={id:`css`,label:`CSS`,extensions:[`.css`]},ZL={id:`scss`,label:`SCSS`,extensions:[`.scss`]},QL={id:`sass`,label:`Sass`,extensions:[`.sass`]},$L={id:`less`,label:`Less`,extensions:[`.less`]},eR=`modulepreload`,tR=function(e){return`/`+e},nR={},rR=function(e){return e.pathname.endsWith(`.css`)},iR=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},aR=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=tR(t,n);let r=s(t),i=rR(r);return iR(nR,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:eR,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},oR={info:XL,grammars:{css:()=>aR(()=>import(`./css-DgaLhXQH.js`),__vite__mapDeps([0,1]))},grammarFor:()=>`css`},sR={info:ZL,grammars:{scss:()=>aR(()=>import(`./scss-8bKmll0B.js`),__vite__mapDeps([2,1]))},grammarFor:()=>`scss`},cR={info:QL,grammars:{sass:()=>aR(()=>import(`./sass-DXrisJhu.js`),[])},grammarFor:()=>`sass`},lR={info:$L,grammars:{less:()=>aR(()=>import(`./less-DVTAwKKz.js`),[])},grammarFor:()=>`less`},uR={info:{id:`html`,label:`HTML`,extensions:[`.html`,`.htm`]},grammars:{html:()=>aR(()=>import(`./html-BHZv6uqE.js`),__vite__mapDeps([3,1,4]))},grammarFor:()=>`html`},dR={id:`json`,label:`JSON`,extensions:[`.json`,`.jsonc`],filenames:[`.babelrc`,`.eslintrc`,`.prettierrc`,`.swcrc`]},fR=new Set([`.babelrc`,`.eslintrc`,`.swcrc`]);function pR(e){let t=qL(e).toLowerCase();return t.endsWith(`.jsonc`)||fR.has(t)||(t.startsWith(`tsconfig.`)||t.startsWith(`jsconfig.`))&&t.endsWith(`.json`)?!0:t.endsWith(`.json`)&&(e.startsWith(`.vscode/`)||e.includes(`/.vscode/`))}var mR={info:dR,grammars:{json:()=>aR(()=>import(`./json-qhed-kSA.js`),[]),jsonc:()=>aR(()=>import(`./jsonc-CYpm1nAK.js`),[])},grammarFor:e=>pR(e)?`jsonc`:`json`},hR={info:{id:`markdown`,label:`MD`,extensions:[`.md`,`.markdown`]},grammars:{markdown:()=>aR(()=>import(`./markdown-BYOwaDjH.js`),[])},grammarFor:()=>`markdown`},gR={info:{id:`text`,label:`TXT`,extensions:[`.txt`]},grammars:{},grammarFor:()=>null},_R={id:`typescript`,label:`TS`,extensions:[`.ts`,`.tsx`,`.mts`,`.cts`]},vR={id:`javascript`,label:`JS`,extensions:[`.js`,`.jsx`,`.mjs`,`.cjs`]},yR=e=>e.toLowerCase(),bR=new JL([{info:_R,grammars:{typescript:()=>aR(()=>import(`./typescript-bsJCZSQ-.js`),[]),tsx:()=>aR(()=>import(`./tsx-udAQXfEw.js`),[])},grammarFor:e=>yR(e).endsWith(`.tsx`)?`tsx`:`typescript`},{info:vR,grammars:{javascript:()=>aR(()=>import(`./javascript-CpIGwZ_Y.js`),__vite__mapDeps([5,4])),jsx:()=>aR(()=>import(`./jsx-Bz0zcwM4.js`),[])},grammarFor:e=>yR(e).endsWith(`.jsx`)?`jsx`:`javascript`},uR,oR,sR,cR,lR,hR,mR,gR]);new Map(bR.all().flatMap(e=>Object.entries(e.grammars)));function xR(e){return bR.detect(e)?.grammarFor(e)??null}function SR(e){return bR.byId(e)?.info.label??e}function CR(e){return typeof e==`object`&&!!e&&`content`in e&&typeof e.content==`string`&&`color`in e&&(e.color===void 0||typeof e.color==`string`)&&`fontStyle`in e&&typeof e.fontStyle==`number`}function wR(e){return Array.isArray(e)&&e.every(e=>Array.isArray(e)&&e.every(CR))}function TR(e){return typeof e!=`object`||!e||!(`id`in e)||typeof e.id!=`number`?!1:`ok`in e&&e.ok===!0?`tokens`in e&&wR(e.tokens):`ok`in e&&e.ok===!1&&`error`in e&&typeof e.error==`string`}var ER=200,DR,OR=!1,kR=!1,AR=0,jR=new Map;function MR(...e){kR||(kR=!0,console.warn(`[highlight]`,...e))}function NR(e){MR(`syntax highlighting disabled:`,e),OR=!0,DR?.terminate(),DR=void 0;let t=Error(`highlight worker unavailable`);for(let e of jR.values())e.reject(t);jR.clear()}function PR(){if(DR)return DR;let e=new Worker(new URL(`/assets/highlight.worker-BOqhB448.js`,``+import.meta.url),{type:`module`});return e.addEventListener(`message`,e=>{let t=e.data;if(!TR(t)){NR(Error(`malformed worker message`));return}let n=jR.get(t.id);n&&(jR.delete(t.id),t.ok?n.resolve(t.tokens):n.reject(Error(t.error)))}),e.addEventListener(`error`,e=>NR(e.message||`worker error`)),e.addEventListener(`messageerror`,()=>NR(Error(`undeserializable worker message`))),DR=e,e}async function FR(e,t){if(OR)throw Error(`highlight worker unavailable`);let n=AR++,r=Promise.withResolvers();return jR.set(n,r),PR().postMessage({id:n,lang:e,lines:t}),r.promise}var IR=new Map,LR=new WeakMap;function RR(e){if(IR.delete(e.key),IR.set(e.key,e),!(IR.size<=ER))for(let[e,t]of IR){if(IR.size<=ER)break;t.listeners.size===0&&t.state!==`pending`&&IR.delete(e)}}function zR(e){e.state=`pending`;let t=t=>{e.tokens=t,e.state=`settled`;for(let t of e.listeners)t()};FR(e.lang,e.lines).then(t,e=>{MR(`highlighting failed:`,e),t(null)})}function BR(e,t,n){let r={key:e,lang:t,lines:n,tokens:null,state:`idle`,listeners:new Set,subscribe:e=>(r.listeners.add(e),RR(r),r.state===`idle`&&zR(r),()=>r.listeners.delete(e)),getSnapshot:()=>r.tokens};return r}function VR(e){let t=3735928559,n=1103547991,r=0;for(let i of e){if(r+=i.length+1,i.length>2e3||r>3e5)return null;for(let e=0;e<i.length;e++){let r=i.charCodeAt(e);t=Math.imul(t^r,2654435761),n=Math.imul(n^r,1597334677)}t=Math.imul(t^10,2654435761),n=Math.imul(n^10,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(4294967296*(2097151&n)+(t>>>0)).toString(36)}function HR(e,t){let n=LR.get(t);n||(n=new Map,LR.set(t,n));let r=n.get(e);if(r!==void 0)return r;let i=xR(e),a=i===null?null:VR(t),o=null;if(i!==null&&a!==null){let n=`${i}\0${e}\0${t.length}\0${a}`;o=IR.get(n)??BR(n,i,t)}return n.set(e,o),o}var UR=()=>()=>{},WR=()=>null;function GR(e,t){let n=t===null?null:HR(e,t);return(0,C.useSyncExternalStore)(n?.subscribe??UR,n?.getSnapshot??WR)}function KR(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(r.type===`context`){t.push({left:r,right:r}),n++;continue}let i=[],a=[];for(;n<e.length&&e[n].type===`del`;)i.push(e[n++]);for(;n<e.length&&e[n].type===`add`;)a.push(e[n++]);for(let e=0;e<Math.max(i.length,a.length);e++)t.push({left:i[e]??null,right:a[e]??null})}return t}function qR(e,t,n){return`${t}:${n}:${e}`}function JR(e){let t=new Map;for(let n of e){let e={LEFT:new Map,RIGHT:new Map};n.hunks.forEach((t,n)=>{for(let r of t.lines)r.oldNo!==null&&e.LEFT.set(r.oldNo,n),r.newNo!==null&&e.RIGHT.set(r.newNo,n)}),t.set(n.path,e)}return t}var YR=(e,t)=>t===0?e+1:e+t,XR=(e,t)=>t===0?e:e-1;function ZR(e,t,n=[]){let r=e.hunks.length;if(r===0)return[];let i=[];for(let a=0;a<=r;a++){let o=e.hunks[a-1],s=e.hunks[a],c=o?YR(o.newStart,o.newLines):1,l=s?XR(s.newStart,s.newLines):t,u=o?YR(o.oldStart,o.oldLines)-c:XR(s.oldStart,s.oldLines)-l,d=Math.max(0,l-c+1),f=n[a],p=a===0?0:Math.min(f?.down??0,d),m=a===r?0:Math.min(f?.up??0,d-p);i.push({start:c,end:l,offset:u,down:p,up:m,hidden:d-p-m})}return i}function QR(e,t,n,r){let i=[...e?.gaps??[]],a=i[n]??{down:0,up:0};return i[n]=r===`all`?n===0?{...a,up:1/0}:{...a,down:1/0}:{...a,[r]:a[r]+20},{lines:t,gaps:i}}function $R(e,t,n,r){let i=[];for(let a=n;a<n+r;a++)i.push({type:`context`,oldNo:a+t.offset,newNo:a,content:e[a-1],noNewline:!1});return i}function ez(e){return e.hunks.length>0&&e.newBlob!==null&&e.status!==`added`}function tz(e){let t=[],n=[],r=[],i=new Map,a=new Map,o=new Map,s=new Map;for(let t of e.threads){let e=s.get(t.path)??[];e.push(t),s.set(t.path,e)}let c=new Set,l=new Set(e.files.map(e=>e.path));for(let t of e.threads)if(t.line!==null&&t.subjectType===`LINE`&&e.anchorable(t.side)){let e=qR(t.path,t.side,t.line);o.set(e,[...o.get(e)??[],t.id])}let u=(e,n,r)=>{let a=n.filter(e=>!c.has(e));if(a.length!==0){for(let e of a)c.add(e),i.set(e,t.length);t.push({kind:`threads`,key:r,fileIdx:e,threadIds:a})}};if(e.files.forEach((l,d)=>{if(e.onlyFile!==null&&l.path!==e.onlyFile||(n[d]=t.length,t.push({kind:`file`,key:`f:${l.path}`,fileIdx:d}),e.collapsed.has(l.path)))return;let f=s.get(l.path)??[],p=f.filter(e=>e.subjectType===`FILE`).map(e=>e.id);u(d,p,`tf:${l.path}`),e.fileComposer===l.path&&t.push({kind:`composer`,key:`cf:${l.path}`,fileIdx:d,target:`file`}),l.binary?t.push({kind:`notice`,key:`n:${l.path}`,fileIdx:d,text:`Fichier binaire.`}):l.truncated?t.push({kind:`notice`,key:`n:${l.path}`,fileIdx:d,text:`Diff trop volumineux pour l’API GitHub : contenu à consulter sur GitHub.`}):l.hunks.length===0&&t.push({kind:`notice`,key:`n:${l.path}`,fileIdx:d,text:l.status===`renamed`?`Renommé sans modification.`:`Aucun changement de contenu (mode / fichier vide).`});let m=(t,n)=>e.composer!==null&&e.composer.path===l.path&&e.composer.side===t&&e.composer.end===n,h=(n,r,i)=>{let s=t.length-1;r?.newNo!=null&&e.anchorable(`RIGHT`)&&a.set(qR(l.path,`RIGHT`,r.newNo),s),n?.oldNo!=null&&e.anchorable(`LEFT`)&&a.set(qR(l.path,`LEFT`,n.oldNo),s);let c=[],f=!1;r?.newNo!=null&&(c.push(...o.get(qR(l.path,`RIGHT`,r.newNo))??[]),f||=m(`RIGHT`,r.newNo)),n?.oldNo!=null&&(c.push(...o.get(qR(l.path,`LEFT`,n.oldNo))??[]),f||=m(`LEFT`,n.oldNo)),u(d,c,`t:${i}`),f&&t.push({kind:`composer`,key:`c:${i}`,fileIdx:d,target:`line`})},g=e.layout===`split`&&l.status!==`added`&&l.status!==`deleted`,_=(e,n,r)=>{let i=`${l.path}:${n?.oldNo??`-`}:${r?.newNo??`-`}`;t.push({kind:`split`,key:`s:${i}`,fileIdx:d,hunkIdx:e,left:n,right:r}),h(n,r,i)},v=(e,n)=>{let r=`${l.path}:${n.oldNo??`-`}:${n.newNo??`-`}`;t.push({kind:`line`,key:`l:${r}`,fileIdx:d,hunkIdx:e,line:n}),h(n.type===`add`?null:n,n.type===`del`?null:n,r)},y=(e,t)=>{for(let n of t)g?_(e,n,n):v(e,n)},b=e.expansions.get(l),x=b?ZR(l,b.lines.length,b.gaps):null,S=(e,t)=>{let n=x?.[e];return!n||!b?[]:t===`down`?$R(b.lines,n,n.start,n.down):$R(b.lines,n,n.end-n.up+1,n.up)};if(l.hunks.forEach((e,n)=>{if(n>0&&y(n-1,S(n,`down`)),r.push({row:t.length,fileIdx:d,hunkIdx:n}),t.push({kind:`hunk`,key:`h:${l.path}:${n}`,fileIdx:d,hunkIdx:n}),y(n,S(n,`up`)),g)for(let t of KR(e.lines))_(n,t.left,t.right);else for(let t of e.lines)v(n,t)}),l.hunks.length>0){let e=l.hunks.length;y(e-1,S(e,`down`)),ez(l)&&(x?.[e]?.hidden??1)>0&&t.push({kind:`expand`,key:`x:${l.path}`,fileIdx:d})}let C=f.filter(e=>!c.has(e.id)).map(e=>e.id);if(C.length>0){for(let e of C)c.add(e),i.set(e,t.length);t.push({kind:`orphans`,key:`o:${l.path}`,fileIdx:d,threadIds:C,title:`Threads outdated ou hors de la plage affichée`})}}),e.onlyFile===null){let n=e.threads.filter(e=>!l.has(e.path)&&!c.has(e.id)).map(e=>e.id);if(n.length>0){for(let e of n)i.set(e,t.length);t.push({kind:`orphans`,key:`o:outside`,fileIdx:null,threadIds:n,title:`Threads sur des fichiers hors de la plage affichée`})}}return{rows:t,fileRow:n,hunkRows:r,threadRow:i,lineRow:a}}function nz(e){let t=[],n=/```suggestion[^\n]*\n([\s\S]*?)```/g;for(let r=n.exec(e);r;r=n.exec(e))t.push(r[1]??``);return t}function rz(e,t){return e.index===null?t-1:e.index.get(t)}function iz(e,t){let n=[],r=new Map;for(let i of e.hunks)for(let e of i.lines){let i=e[t];i!==null&&(r.set(i,n.length),n.push(e.content))}return{lines:n,index:r}}function az(e,t,n){if(n==null)return null;let r=n.split(`
110
+ `);n.endsWith(`
111
+ `)&&r.pop();for(let n of e.hunks)for(let e of n.lines){let n=e[t];if(n!==null&&r[n-1]!==e.content)return null}return r}function oz(e,t,n){if(n===null||n.some(e=>e.length>2e3))return iz(e,t);let r=0;for(let e of n)r+=e.length+1;return r>3e5?iz(e,t):{lines:n,index:null}}function sz({diffHunk:e}){let t=e.split(`
112
+ `).slice(1).slice(-8);return(0,G.jsx)(`div`,{className:`snippet`,children:t.map((e,t)=>(0,G.jsx)(`div`,{className:e.startsWith(`+`)?`c-add`:e.startsWith(`-`)?`c-del`:void 0,children:e||` `},t))})}function cz({thread:e,showPath:t=!1}){let n=zI(),r=iL(n.ref),[i,a]=(0,C.useState)(!1),o=n.focusedThread===e.id,s=e.comments.find(e=>e.unread)?.id,c=n.detail.canWrite&&n.detail.pr.sameRepo&&n.detail.pr.state===`OPEN`&&!e.isOutdated&&e.side===`RIGHT`&&e.line!==null,l=n.pendingReviewId,u=e.subjectType===`FILE`?`commentaire sur le fichier`:e.isOutdated?`ligne ${e.originalLine??`?`} (version d’origine)`:e.startLine!==null&&e.startLine!==e.line?`lignes ${e.startLine}–${e.line}`:`ligne ${e.line}`,d=e.pending?`pending`:e.isResolved?`resolved`:`open`,f=e.isResolved?e.canUnresolve:e.canResolve,[p,m]=(0,C.useState)(null),h=p??(!e.isResolved||o);return(0,G.jsxs)(`div`,{className:`thread`,"data-thread":e.id,"data-state":d,"data-unread":e.unread>0||void 0,"data-collapsed":!h||void 0,"data-focus":o||void 0,onClick:()=>n.setFocusedThread(e.id),children:[(0,G.jsxs)(`div`,{className:`thread-head`,children:[d===`pending`?(0,G.jsx)(Ep,{size:`md`,color:`grape`,variant:`filled`,children:`En attente · review non soumise`}):d===`resolved`?(0,G.jsxs)(Ep,{size:`md`,color:`green`,variant:`filled`,children:[`✓ Résolu`,e.resolvedBy?` par ${e.resolvedBy}`:``]}):(0,G.jsx)(Ep,{size:`md`,color:`yellow`,variant:`filled`,autoContrast:!0,children:`● Non résolu`}),e.isOutdated&&(0,G.jsx)(Ep,{size:`sm`,color:`gray`,variant:`outline`,children:`outdated`}),e.unread>0&&(0,G.jsxs)(Ep,{size:`sm`,color:`orange`,variant:`light`,children:[e.unread,` nouveau`,e.unread>1?`x`:``]}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,truncate:!0,children:[t?`${e.path} · `:``,u,e.subjectType===`LINE`?` · ${e.side===`LEFT`?`ancien code`:`nouveau code`}`:``]}),(0,G.jsx)(`div`,{style:{flex:1}}),e.isResolved&&(0,G.jsx)(Fp,{size:`compact-xs`,variant:`subtle`,color:`gray`,style:{flex:`none`},"aria-expanded":h,onClick:e=>{e.stopPropagation(),m(!h)},children:h?`Replier`:`Afficher ${e.comments.length} message${e.comments.length>1?`s`:``}`}),e.comments[0]&&(0,G.jsx)(tf,{href:e.comments[0].url,target:`_blank`,size:`xs`,c:`dimmed`,style:{whiteSpace:`nowrap`,flex:`none`},children:`GitHub ↗`})]}),h&&(e.isOutdated||e.line===null)&&e.diffHunk&&(0,G.jsx)(sz,{diffHunk:e.diffHunk}),h&&e.comments.map(t=>(0,G.jsxs)(`div`,{className:`comment`,"data-new":t.unread||void 0,children:[(0,G.jsx)(Cp,{src:t.author?.avatarUrl,size:24}),(0,G.jsxs)(`div`,{className:`comment-body`,children:[(0,G.jsxs)(X,{gap:6,mb:2,children:[(0,G.jsx)(Z,{size:`sm`,fw:600,children:t.author?.login??`ghost`}),(0,G.jsx)(Gh,{label:new Date(t.createdAt).toLocaleString(`fr`),children:(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:UD(t.createdAt)})}),t.pending&&(0,G.jsx)(Ep,{size:`xs`,color:`yellow`,variant:`light`,children:`en attente`}),t.pending&&t.canDelete&&(0,G.jsx)(Fp,{size:`compact-xs`,variant:`subtle`,color:`red`,ml:`auto`,onClick:()=>r.deleteComment.mutate({commentId:t.id}),children:`Supprimer`}),t.unread&&(0,G.jsx)(YI,{text:t.body,active:t.id===s,onRead:()=>r.markThreadsRead.mutate([{threadId:e.id,lastCommentId:t.id}])})]}),(0,G.jsx)(BI,{html:t.bodyHTML}),!t.pending&&(0,G.jsx)(nL,{subjectId:t.id,reactions:t.reactions,onToggle:(e,n)=>r.react.mutate({subjectId:t.id,content:e,on:n})}),c&&!t.pending&&nz(t.body).map((i,a)=>(0,G.jsx)(Fp,{mt:6,size:`compact-xs`,color:`green`,variant:`light`,loading:r.applySuggestion.isPending,onClick:()=>r.applySuggestion.mutate({ref:n.ref,branch:n.detail.pr.headRefName,expectedHeadOid:n.detail.pr.headRefOid,path:e.path,side:`RIGHT`,startLine:e.startLine??e.line,endLine:e.line,replacement:i,message:`Apply suggestion from @${t.author?.login??`reviewer`}\n\n${t.url}`}),children:`Appliquer la suggestion (commit)`},a))]})]},t.id)),h?i&&e.canReply?(0,G.jsx)(VI,{draftKey:`reply:${e.id}`,repoContext:`${n.ref.owner}/${n.ref.repo}`,onCancel:()=>a(!1),placeholder:`Répondre…`,actions:[...e.canResolve&&!e.isResolved&&!l?[{label:`Répondre & résoudre`,variant:`default`,run:async t=>{await r.reply.mutateAsync({threadId:e.id,body:t,pendingReviewId:null}),await r.setResolved.mutateAsync({threadId:e.id,resolved:!0})}}]:[],{label:l?`Ajouter à la review`:`Répondre`,run:t=>r.reply.mutateAsync({threadId:e.id,body:t,pendingReviewId:l})}]}):(e.canReply||f)&&(0,G.jsxs)(X,{className:`thread-foot`,p:8,gap:8,children:[e.canReply&&(0,G.jsx)(Fp,{"data-reply":!0,variant:`default`,size:`compact-sm`,style:{flex:1,justifyContent:`flex-start`},styles:{inner:{justifyContent:`flex-start`}},onClick:()=>a(!0),children:(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:`Répondre…`})}),f&&(0,G.jsx)(Fp,{size:`compact-sm`,ml:`auto`,color:e.isResolved?`yellow`:`green`,variant:e.isResolved?`light`:`filled`,onClick:t=>{t.stopPropagation(),r.setResolved.mutate({threadId:e.id,resolved:!e.isResolved})},children:e.isResolved?`Rouvrir la conversation`:`✓ Résoudre la conversation`})]}):null]})}var lz=new WeakMap;function uz(e){let t=zI(),n=ED(),r=[e.oldBlob,e.newBlob].filter(e=>e!==null),i=dy({...n.pr.blobs.queryOptions({ref:t.ref,oids:r}),staleTime:1/0,enabled:r.length>0&&!e.binary});if(i.isPending&&r.length>0&&!e.binary)return{old:null,new:null,newLines:null};let a=lz.get(e);if(a&&a.data===i.data)return a.sources;let o=e=>e===null?null:i.data?.[e],s=az(e,`newNo`,o(e.newBlob)),c={old:oz(e,`oldNo`,az(e,`oldNo`,o(e.oldBlob))),new:oz(e,`newNo`,s),newLines:s};return lz.set(e,{data:i.data,sources:c}),c}var dz={file:52,hunk:28,expand:28,split:20,line:20,threads:160,composer:230,notice:36,orphans:200};function fz(e,t,n){let r=e.hunks.filter(t=>n.has(`${e.path}\n${t.hash}`)).length;return{state:t===`VIEWED`?`viewed`:t===`DISMISSED`?`dismissed`:r>0?`partial`:`none`,seenHunks:r}}function pz(e){let t=zI();return fz(e,t.detail.files.find(t=>t.path===e.path)?.viewed,t.seenHunks)}var mz=40;function hz(){let e=zI(),t=iL(e.ref),n=(e,t)=>t.map(t=>({path:e.path,hash:t.hash}));return{toggleFile:(r,i)=>{t.setFileViewed.mutate({prId:e.detail.pr.id,path:r.path,viewed:i}),r.hunks.length>0&&t.setHunksSeen.mutate({ref:e.ref,hunks:n(r,r.hunks),seen:i})},toggleHunk:(r,i,a)=>{t.setHunksSeen.mutate({ref:e.ref,hunks:n(r,[i]),seen:a});let o=r.hunks.filter(e=>e!==i),s=a&&o.every(t=>e.seenHunks.has(`${r.path}\n${t.hash}`)),c=e.detail.files.find(e=>e.path===r.path)?.viewed;e.range.fullPr&&s&&c!==`VIEWED`?t.setFileViewed.mutate({prId:e.detail.pr.id,path:r.path,viewed:!0}):!a&&c===`VIEWED`&&t.setFileViewed.mutate({prId:e.detail.pr.id,path:r.path,viewed:!1})}}}function gz({state:e}){return(0,G.jsx)(`span`,{className:`vbox`,"data-state":e,children:e===`viewed`?`✓`:e===`dismissed`?`•`:``})}var _z={added:{label:`ajouté`,color:`green`},deleted:{label:`supprimé`,color:`red`},renamed:{label:`renommé`,color:`blue`},modified:null};function vz(e){let{file:t}=e,n=zI(),r=hz(),{state:i,seenHunks:a}=pz(t),o=n.detail.threads.filter(e=>e.path===t.path),s=o.filter(e=>!e.isResolved).length,c=_z[t.status];return(0,G.jsxs)(`div`,{className:`file-head`,"data-viewed":i===`viewed`||void 0,children:[(0,G.jsx)(Pl,{size:`sm`,variant:`subtle`,color:`gray`,onClick:e.onToggleCollapse,"aria-label":`Replier`,children:e.collapsed?`▸`:`▾`}),(0,G.jsx)(Gh,{label:t.status===`renamed`?`${t.oldPath} → ${t.path}`:t.path,openDelay:400,children:(0,G.jsxs)(`span`,{className:`file-path`,children:[t.status===`renamed`&&(0,G.jsxs)(Z,{span:!0,c:`dimmed`,inherit:!0,children:[t.oldPath,` →`,` `]}),t.path]})}),c&&(0,G.jsx)(Ep,{size:`xs`,variant:`light`,color:c.color,children:c.label}),i===`dismissed`&&(0,G.jsx)(Ep,{size:`xs`,variant:`light`,color:`orange`,children:`modifié depuis vu`}),(0,G.jsxs)(Z,{size:`xs`,span:!0,children:[(0,G.jsxs)(Z,{span:!0,c:`green.4`,inherit:!0,children:[`+`,t.additions]}),` `,(0,G.jsxs)(Z,{span:!0,c:`red.4`,inherit:!0,children:[`−`,t.deletions]})]}),t.hunks.length>1&&(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[a,`/`,t.hunks.length,` hunks vus`]}),o.length>0&&(0,G.jsxs)(Z,{size:`xs`,c:s>0?`yellow.4`:`dimmed`,children:[(0,G.jsx)(`i`,{className:`ico-c`}),s,`/`,o.length]}),(0,G.jsx)(`div`,{style:{flex:1}}),(0,G.jsx)(tf,{size:`xs`,c:`dimmed`,target:`_blank`,href:`https://github.com/${n.ref.owner}/${n.ref.repo}/blob/${n.detail.pr.headRefOid}/${t.path}`,children:`fichier ↗`}),n.canCommentFile(t.path)&&(0,G.jsx)(Gh,{label:`Commenter le fichier entier`,openDelay:300,children:(0,G.jsx)(Fp,{size:`compact-xs`,variant:`subtle`,color:`gray`,leftSection:(0,G.jsx)(`i`,{className:`ico-c`}),onClick:()=>{e.collapsed&&e.onToggleCollapse(),n.setFileComposer(t.path)},children:`Commenter`})}),(0,G.jsx)(Fp,{size:`compact-xs`,variant:i===`viewed`?`light`:`default`,color:i===`viewed`?`green`:`gray`,leftSection:(0,G.jsx)(gz,{state:i}),onClick:()=>{let e=i!==`viewed`;r.toggleFile(t,e),e&&n.advanceFrom(t.path)},children:`Vu`})]})}function yz({tokens:e,text:t}){return e?(0,G.jsx)(G.Fragment,{children:e.map((e,t)=>(0,G.jsx)(`span`,{style:{color:e.color,fontStyle:e.fontStyle&1?`italic`:void 0,fontWeight:e.fontStyle&2?600:void 0},children:e.content},t))}):(0,G.jsx)(G.Fragment,{children:t})}var bz={add:`c-add`,del:`c-del`,context:``},xz=(0,C.memo)(function(e){let{row:t,file:n}=e,r=zI(),i=uz(n),a=GR(n.path,i.old?.lines??null),o=GR(n.path,i.new?.lines??null),s=r.selection,c=(e,t)=>t!==null&&s!==null&&s.path===n.path&&s.side===e&&t>=s.start&&t<=s.end,l=r.linkTarget,u=(e,t)=>t!==null&&l!==null&&l.path===n.path&&l.side===e&&t>=l.start&&t<=l.end,d=(e,t)=>{if(t===`LEFT`){let t=e.oldNo===null||!i.old?void 0:rz(i.old,e.oldNo);return t===void 0?void 0:a?.[t]}let n=e.newNo===null||!i.new?void 0:rz(i.new,e.newNo);return n===void 0?void 0:o?.[n]},f=(e,t,i)=>{let a=t===null?null:r.commentHunk(n.path,e,t);t!==null&&a!==null&&(i.shiftKey&&s&&s.path===n.path&&s.side===e&&r.commentHunk(n.path,e,s.start)===a?r.setSelection({...s,start:Math.min(s.start,t),end:Math.max(s.end,t)}):r.setSelection({path:n.path,side:e,start:t,end:t}))},p=(e,t,i)=>{let a=t!==null&&r.commentHunk(n.path,e,t)!==null;return(0,G.jsx)(`div`,{className:`ln ${i}`,"data-disabled":!a||void 0,title:a?`Commenter (Maj+clic : plage dans le même hunk)`:void 0,onClick:n=>f(e,t,n),children:t??``})},m=(e,t,n)=>(0,G.jsxs)(`div`,{className:`tx ${n}`,children:[e&&(0,G.jsx)(yz,{tokens:d(e,t),text:e.content}),e?.noNewline&&(0,G.jsx)(`span`,{className:`nonl`,children:`⏎̸ pas de fin de ligne`})]});if(t.kind===`split`){let n=t.left,r=t.right,i=n?n.type===`del`?bz.del:``:`c-empty`,a=r?r.type===`add`?bz.add:``:`c-empty`,o=c(`LEFT`,n?.oldNo??null)?` c-sel`:u(`LEFT`,n?.oldNo??null)?` c-target`:``,s=c(`RIGHT`,r?.newNo??null)?` c-sel`:u(`RIGHT`,r?.newNo??null)?` c-target`:``;return(0,G.jsx)(`div`,{className:`code${e.last?` last`:``}`,children:(0,G.jsxs)(`div`,{className:`code-row split`,"data-viewed":e.viewed||void 0,children:[p(`LEFT`,n?.oldNo??null,i+o),m(n,`LEFT`,i+o),p(`RIGHT`,r?.newNo??null,a+s),m(r,`RIGHT`,a+s)]})})}let h=t.line,g=bz[h.type],_=h.type===`del`?`LEFT`:`RIGHT`,v=c(_,_===`LEFT`?h.oldNo:h.newNo)?` c-sel`:u(`LEFT`,h.oldNo)||u(`RIGHT`,h.newNo)?` c-target`:``;return(0,G.jsx)(`div`,{className:`code${e.last?` last`:``}`,children:(0,G.jsxs)(`div`,{className:`code-row unified`,"data-viewed":e.viewed||void 0,children:[p(`LEFT`,h.oldNo,g+v),p(`RIGHT`,h.newNo,g+v),m(h,_,g+v)]})})});function Sz(e,t,n,r){let i=uz(e).newLines;if(i===null)return null;let a=ZR(e,i.length,n?.gaps)[t];if(!a||a.hidden===0)return null;let o=Math.min(20,a.hidden),s=(n,a,o)=>(0,G.jsx)(Gh,{label:o,openDelay:300,children:(0,G.jsx)(Pl,{size:`xs`,variant:`subtle`,color:`gray`,"aria-label":o,onClick:()=>r(e,i,t,n),children:a})}),c=`${a.hidden} ligne${a.hidden>1?`s`:``} masquée${a.hidden>1?`s`:``}`,l;return l=t===e.hunks.length?s(`down`,`↓`,`Afficher ${o} lignes de plus (${c})`):t===0?s(`up`,`↑`,`Afficher ${o} lignes de plus (${c})`):a.hidden<=20?s(`all`,`↕`,`Afficher les ${c}`):(0,G.jsxs)(G.Fragment,{children:[s(`down`,`↓`,`Afficher 20 lignes sous le hunk précédent (${c})`),s(`up`,`↑`,`Afficher 20 lignes au-dessus du hunk (${c})`)]}),(0,G.jsx)(`span`,{className:`gap-expand`,children:l})}function Cz(e){let t=zI(),n=hz(),r=e.file.hunks[e.hunkIdx],i=t.seenHunks.has(`${e.file.path}\n${r.hash}`),a=Sz(e.file,e.hunkIdx,e.expansion,e.onExpand);return(0,G.jsxs)(`div`,{className:`hunk-head`,"data-current":e.current||void 0,"data-unseen":!i||void 0,children:[a,(0,G.jsxs)(`span`,{children:[`@@ -`,r.oldStart,`,`,r.oldLines,` +`,r.newStart,`,`,r.newLines,` @@ `,r.section]}),(0,G.jsx)(`div`,{style:{flex:1}}),(0,G.jsx)(Fp,{size:`compact-xs`,variant:i?`light`:`subtle`,color:i?`green`:`gray`,onClick:()=>n.toggleHunk(e.file,r,!i),children:i?`✓ hunk vu`:`Marquer le hunk vu`})]})}function wz(e){let t=Sz(e.file,e.file.hunks.length,e.expansion,e.onExpand);return t?(0,G.jsx)(`div`,{className:`hunk-head${e.last?` last`:``}`,children:t}):e.last?(0,G.jsx)(`div`,{className:`code last`}):null}function Tz({file:e,target:t}){let n=zI(),r=iL(n.ref),i=n.selection;if(t===`line`&&!i)return null;let a,o,s=null,c;t===`file`||!i?(a=t=>({subjectType:`FILE`,path:e.path,body:t}),o=`sur le fichier`,c=()=>n.setFileComposer(null)):(a=e=>({subjectType:`LINE`,path:i.path,side:i.side,line:i.end,startLine:i.start===i.end?null:i.start,startSide:i.start===i.end?null:i.side,body:e}),o=`${i.start===i.end?`ligne ${i.end}`:`lignes ${i.start}–${i.end}`} · ${i.side===`LEFT`?`ancien code`:`nouveau code`}`,i.side===`RIGHT`&&(s=e.hunks.flatMap(e=>e.lines.filter(e=>e.newNo!==null&&e.newNo>=i.start&&e.newNo<=i.end).map(e=>e.content))),c=()=>n.setSelection(null));let l=n.pendingReviewId,u=(e,t)=>r.addThread.mutateAsync({prId:n.detail.pr.id,pendingReviewId:t===`review`?l:null,thread:a(e),mode:t});return(0,G.jsx)(`div`,{className:`diff-block`,children:(0,G.jsxs)(`div`,{className:`thread`,"data-focus":!0,children:[(0,G.jsxs)(`div`,{className:`thread-head`,children:[`Nouveau commentaire · `,o,l&&(0,G.jsx)(Ep,{size:`xs`,color:`yellow`,variant:`light`,ml:`auto`,children:`review en attente`})]}),(0,G.jsx)(VI,{draftKey:`new:${n.ref.owner}/${n.ref.repo}#${n.ref.number}`,repoContext:`${n.ref.owner}/${n.ref.repo}`,suggestionLines:s,onCancel:c,actions:[{label:`Commenter seul`,disabled:l!==null,run:e=>u(e,`single`)},{label:l?`Ajouter à la review`:`Démarrer une review`,run:e=>u(e,`review`)}]})]})})}function Ez(e){let t=zI(),[n,r]=(0,C.useState)(()=>new Map),i=(0,C.useCallback)((e,t,n,i)=>r(r=>new Map(r).set(e,QR(r.get(e),t,n,i))),[]),a=(0,C.useRef)(null),o=(0,C.useRef)({fileIdx:null,hunkIdx:null}),s=t.range.head===t.detail.pr.headRefOid,c=(0,C.useMemo)(()=>tz({files:e.files,layout:t.layout,threads:t.detail.threads,anchorable:e=>s&&(e===`RIGHT`||t.range.fullPr),collapsed:e.collapsed,composer:t.selection,fileComposer:t.fileComposer,onlyFile:e.onlyFile,expansions:n}),[e.files,t.layout,t.detail.threads,s,t.range.fullPr,e.collapsed,t.selection,t.fileComposer,e.onlyFile,n]),l=c.rows,u=KL({count:l.length,getScrollElement:()=>a.current,estimateSize:e=>dz[l[e].kind],getItemKey:e=>l[e].key,overscan:30,onChange:t=>{let n=t.getVirtualItemForOffset((t.scrollOffset??0)+mz+4),r=n?l[n.index]:void 0,i=null;if(n)for(let e=c.hunkRows.length-1;e>=0;e--){let t=c.hunkRows[e];if(t.row<=n.index&&t.fileIdx===r?.fileIdx){i=t.hunkIdx;break}}let a=r?.fileIdx??null;(a!==o.current.fileIdx||i!==o.current.hunkIdx)&&(o.current={fileIdx:a,hunkIdx:i},e.onCurrentChange(a,i))}}),d=e.onCurrentChange;(0,C.useImperativeHandle)(e.handleRef,()=>{let n=()=>u.getVirtualItemForOffset((u.scrollOffset??0)+mz+4)?.index??0,r=e=>{if(e===void 0)return;if(l[e]?.kind===`file`){u.scrollToIndex(e,{align:`start`});return}let t=u.getOffsetForIndex(e,`start`)?.[0];t!==void 0&&u.scrollToOffset(Math.max(0,t-mz))};return{scrollToFile:t=>{let n=e.files.findIndex(e=>e.path===t);r(c.fileRow[n]),n!==-1&&n!==o.current.fileIdx&&(o.current={fileIdx:n,hunkIdx:null},d(n,null))},scrollToThread:e=>{let t=c.threadRow.get(e);return t!==void 0&&(u.scrollToIndex(t,{align:`center`}),!0)},scrollToLine:(e,t,n)=>{let r=c.lineRow.get(qR(e,t,n));return r!==void 0&&(u.scrollToIndex(r,{align:`center`}),!0)},step:(e,i)=>{let a=n(),o;if(e===`file`)o=c.fileRow.filter(e=>e!==void 0);else if(e===`hunk`)o=c.hunkRows.map(e=>e.row);else{let e=new Set(t.detail.threads.filter(e=>!e.isResolved).map(e=>e.id));o=[...new Set([...c.threadRow].filter(([t])=>e.has(t)).map(([,e])=>e))].sort((e,t)=>e-t)}let s=i>0?o.find(e=>e>a):o.filter(e=>e<a).at(-1);if(r(s),e===`thread`&&s!==void 0){let e=l[s],n=e&&(e.kind===`threads`||e.kind===`orphans`)?e.threadIds.find(e=>!t.detail.threads.find(t=>t.id===e)?.isResolved):void 0;n&&t.setFocusedThread(n)}},current:()=>o.current}},[u,c,e.files,l,t,d]);let f=u.getVirtualItems(),p=u.getVirtualItemForOffset((u.scrollOffset??0)+4),m=p?l[p.index]:void 0,h=m&&m.kind!==`file`&&m.fileIdx!==null?e.files[m.fileIdx]:void 0,g=(0,C.useMemo)(()=>new Map(t.detail.threads.map(e=>[e.id,e])),[t.detail.threads]),_=(r,a)=>{let s=l[a+1],c=!s||s.kind===`file`,u=r.fileIdx===null?void 0:e.files[r.fileIdx];switch(r.kind){case`file`:return(0,G.jsx)(vz,{file:u,collapsed:e.collapsed.has(u.path),onToggleCollapse:()=>e.onToggleCollapse(u.path)});case`hunk`:return(0,G.jsx)(Cz,{file:u,hunkIdx:r.hunkIdx,current:o.current.fileIdx===r.fileIdx&&o.current.hunkIdx===r.hunkIdx,expansion:n.get(u),onExpand:i});case`expand`:return(0,G.jsx)(wz,{file:u,last:c,expansion:n.get(u),onExpand:i});case`split`:case`line`:{let e=u.hunks[r.hunkIdx];return(0,G.jsx)(xz,{row:r,file:u,viewed:t.seenHunks.has(`${u.path}\n${e.hash}`),last:c})}case`threads`:return(0,G.jsx)(`div`,{className:`diff-block${c?` last`:``}`,children:r.threadIds.map(e=>{let t=g.get(e);return t?(0,G.jsx)(cz,{thread:t},e):null})});case`composer`:return(0,G.jsx)(Tz,{file:u,target:r.target});case`notice`:return(0,G.jsx)(`div`,{className:`diff-block${c?` last`:``}`,children:(0,G.jsx)(Z,{size:`sm`,c:`dimmed`,children:r.text})});case`orphans`:return(0,G.jsxs)(`div`,{className:`diff-block${c?` last`:``}`,style:r.fileIdx===null?{marginTop:16,borderTop:`1px solid var(--br-border)`}:void 0,children:[(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:600,mb:4,children:r.title}),r.threadIds.map(e=>{let t=g.get(e);return t?(0,G.jsx)(cz,{thread:t,showPath:r.fileIdx===null},e):null})]})}};return l.length===0?(0,G.jsx)(`div`,{className:`diff-scroll`,ref:a,children:(0,G.jsx)(Z,{c:`dimmed`,p:`lg`,children:`Aucun changement dans cette plage.`})}):(0,G.jsxs)(`div`,{className:`diff-scroll`,ref:a,children:[h&&(0,G.jsx)(`div`,{className:`sticky-file`,children:(0,G.jsx)(vz,{file:h,collapsed:e.collapsed.has(h.path),onToggleCollapse:()=>e.onToggleCollapse(h.path)})}),(0,G.jsx)(`div`,{className:`diff-inner`,style:{height:u.getTotalSize()+80},children:f.map(e=>(0,G.jsx)(`div`,{"data-index":e.index,ref:u.measureElement,className:`diff-row`,style:{transform:`translateY(${e.start}px)`},children:_(l[e.index],e.index)},e.key))}),(0,G.jsx)(X,{className:`diff-end`,justify:`center`,p:`md`,children:(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[(0,G.jsx)(Em,{size:`xs`,children:`j`}),`/`,(0,G.jsx)(Em,{size:`xs`,children:`k`}),` fichier · `,(0,G.jsx)(Em,{size:`xs`,children:`n`}),`/`,(0,G.jsx)(Em,{size:`xs`,children:`p`}),` hunk · `,(0,G.jsx)(Em,{size:`xs`,children:`]`}),`/`,(0,G.jsx)(Em,{size:`xs`,children:`[`}),` thread ouvert`]})})]})}var Dz=e=>e.additions+e.deletions;function Oz(e){let t=Dz(e),n=t===0?.5:e.additions/t;return`hsl(${Math.round(n*130)} 45% 30%)`}function kz(e,t){return{kind:`dir`,name:e,path:t,dirs:[],files:[],additions:0,deletions:0,fileCount:0,viewedCount:0,openThreads:0}}function Az(e,t){let n=kz(``,``);for(let t of e){let e=t.path.split(`/`),r=n;for(let t of e.slice(0,-1)){let e=r.path?`${r.path}/${t}`:t,n=r.dirs.find(t=>t.path===e);n||(n=kz(t,e),r.dirs.push(n)),r=n}r.files.push({kind:`file`,name:e.at(-1),path:t.path,stat:t})}let r=(e,n)=>{let i=e;for(;!n&&i.files.length===0&&i.dirs.length===1;){let e=i.dirs[0];i={...e,name:`${i.name}/${e.name}`}}i.dirs=i.dirs.map(e=>r(e,!1)),i.additions=i.deletions=i.fileCount=i.viewedCount=i.openThreads=0;for(let e of i.dirs)i.additions+=e.additions,i.deletions+=e.deletions,i.fileCount+=e.fileCount,i.viewedCount+=e.viewedCount,i.openThreads+=e.openThreads;for(let e of i.files)i.additions+=e.stat.additions,i.deletions+=e.stat.deletions,i.fileCount+=1,i.viewedCount+=+(e.stat.state===`viewed`),i.openThreads+=e.stat.openThreads;if(t){let e=(e,t)=>e.name.localeCompare(t.name),n=(t,n)=>Dz(n.kind===`dir`?n:n.stat)-Dz(t.kind===`dir`?t:t.stat)||e(t,n);i.dirs.sort(t===`churn`?n:e),i.files.sort(t===`churn`?n:e)}return i};return r(n,!0)}function jz(e,t){let n=[],r=(e,i)=>{for(let a of e.dirs)n.push({...a,depth:i}),t.has(a.path)||r(a,i+1);for(let t of e.files)n.push({...t,depth:i})};return r(e,0),n}function Mz(e,t,n){return t===`list`?n===`name`?e.map(e=>e.path):[...e].sort((e,t)=>Dz(t)-Dz(e)||e.path.localeCompare(t.path)).map(e=>e.path):jz(Az(e.map(e=>({...e,state:`none`,openThreads:0,unreadThreads:0})),n),new Set).flatMap(e=>e.kind===`file`?[e.path]:[])}var Nz={local:`d1-3B (local)`,claude:`Claude Haiku 5.5 (API Anthropic)`},Pz=`https://platform.claude.com/settings/keys`;function Fz(){let e=ED(),t=W_(),n=dy(e.ai.status.queryOptions()),[r,i]=(0,C.useState)(``),a=()=>{t.invalidateQueries({queryKey:e.ai.status.queryKey()}),t.invalidateQueries({queryKey:e.config.get.queryKey()})},o=gy(e.ai.setModel.mutationOptions({onSuccess:a})),s=gy(e.ai.setClaudeKey.mutationOptions({onSuccess:()=>{i(``),a()},onError:e=>t_.show({color:`red`,title:`Clé non enregistrée`,message:e.message})})),c=n.data?.kind??`local`;return(0,G.jsxs)(tg,{gap:`xs`,children:[(0,G.jsx)(Yh,{size:`xs`,value:c,disabled:n.isPending||o.isPending,onChange:e=>o.mutate(e===`claude`?`claude`:`local`),data:[{value:`local`,label:Nz.local},{value:`claude`,label:Nz.claude}]}),c===`local`?(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`d1-3B, modèle de décision de Liquid AI servi par llama-server sur cette machine : le code ne la quitte pas. Probabilités calibrées, ≈ 0,3 s par fichier avec un GPU.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`Le diff, le début de chaque fichier et la description de la PR sont envoyés à l’API Anthropic. Coût indicatif : moins d’un dixième de centime par fichier. Claude ne donne pas de probabilités mesurées : confiances et pourcentages sont ceux qu’il estime, moins fiables que ceux de d1.`}),n.data?.claudeKey===`env`?(0,G.jsxs)(Z,{size:`xs`,children:[`Clé fournie par `,(0,G.jsx)(qp,{children:`ANTHROPIC_API_KEY`}),`.`]}):(0,G.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),r.trim()&&s.mutate({key:r.trim()})},children:(0,G.jsxs)(X,{gap:`xs`,align:`flex-end`,wrap:`nowrap`,children:[(0,G.jsx)(sh,{size:`xs`,style:{flex:1},label:n.data?.claudeKey===`file`?`Remplacer la clé API`:`Clé API Anthropic`,placeholder:`sk-ant-…`,value:r,onChange:e=>i(e.currentTarget.value),autoComplete:`off`}),(0,G.jsx)(Fp,{size:`xs`,type:`submit`,loading:s.isPending,disabled:!r.trim(),children:`Enregistrer`})]})}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`Clé à créer dans la `,(0,G.jsx)(tf,{href:Pz,children:`console Claude`}),`, gardée sur cette machine (fichier `,(0,G.jsx)(qp,{children:`anthropic-key`}),`, lisible par vous seul) et jamais renvoyée au navigateur.`,` `,(0,G.jsx)(qp,{children:`ANTHROPIC_API_KEY`}),` la remplace si elle est définie.`]})]})]})}var Iz=[{id:`core`,label:`Cœur du changement`,hint:`attention élevée, comportement modifié ou code sensible`},{id:`contract`,label:`Contrats et API`,hint:`API publique, types partagés, schémas, formats de données`},{id:`other`,label:`Autres changements de code`,hint:`sans changement de comportement probable`},{id:`tests`,label:`Tests`,hint:`tests, fixtures, snapshots`},{id:`support`,label:`Docs et configuration`,hint:`documentation, build, outillage, CI`},{id:`mechanical`,label:`Mécanique`,hint:`renommages, mise en forme, dépendances, fichiers générés`}],Lz={logic:`Logique`,contract:`Contrat`,ui:`UI`,tests:`Tests`,config:`Config`,docs:`Docs`,generated:`Généré`},Rz={feature:`Ajout`,fix:`Correctif`,refactor:`Refactor`,rename:`Renommage`,format:`Forme`,deps:`Dépendances`},zz=[`Mécanique`,`Faible risque`,`À lire`,`Critique`],Bz=.5,Vz=[`rename`,`format`,`deps`];function Hz(e){let t=e.role.value,n=e.attention.value;return t===`generated`||Vz.includes(e.nature.value)&&n<1?`mechanical`:t===`tests`?`tests`:t===`docs`||t===`config`?`support`:n>=1.5||e.sensitive>=.5?`core`:t===`contract`||e.api>=.5?`contract`:e.behaviour>=.5?`core`:`other`}function Uz(e,t,n){let r=new Map;for(let[e,n]of t)r.set(e,Hz(n));return FI(Iz.map(t=>({items:e.filter(e=>r.get(e)===t.id)})),e,n)}var Wz=e=>e.split(`/`).at(-1)??e,Gz=e=>e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``,Kz=e=>`${Math.round(e*100)} %`,qz=1e4,Jz=e=>({key:e,intents:new Map,failed:new Map,total:null,concurrency:1,done:!1,modelMs:0,modelFiles:0,error:null});function Yz(e,t){switch(t.type){case`start`:return{...e,total:t.total,concurrency:t.concurrency,error:null};case`file`:{let n=new Map(e.failed);return n.delete(t.path),{...e,intents:new Map(e.intents).set(t.path,t.intent),failed:n,modelMs:e.modelMs+(t.ms??0),modelFiles:e.modelFiles+(t.ms===null?0:1)}}case`failed`:return{...e,failed:new Map(e.failed).set(t.path,t.message)};case`done`:return{...e,done:!0}}}function Xz(e,t,n){let r=ED(),i=W_(),a=dy({...r.ai.status.queryOptions(),enabled:n,staleTime:0,refetchInterval:e=>e.state.data?.state!==`ready`&&e.state.data?.kind===`local`&&3e3}),o=a.data?.state===`ready`?a.data.kind:null,s=`${e.owner}/${e.repo}#${e.number}:${t.base}...${t.head}:${o}`,[c,l]=(0,C.useState)(()=>Jz(s)),u=c.key===s?c:Jz(s),d=e=>l(t=>e(t.key===s?t:Jz(s)));return xD(r.pr.intent.subscriptionOptions({ref:e,base:t.base,head:t.head,fullPr:t.fullPr,model:o??`local`},{enabled:n&&o!==null,onData:e=>{d(t=>Yz(t,e)),o===`claude`&&e.type!==`start`&&i.invalidateQueries({queryKey:r.ai.usage.queryKey()})},onError:e=>{d(t=>({...t,error:e.message})),a.refetch()}})),{status:a,progress:u}}var Zz={logic:`blue`,contract:`grape`,ui:`cyan`,tests:`teal`,config:`gray`,docs:`gray`,generated:`dark`};function Qz({value:e}){let t=Math.round(e);return(0,G.jsxs)(Z,{span:!0,size:`xs`,ff:`monospace`,c:t>=3?`red`:t===2?`orange`:`dimmed`,children:[`●`.repeat(t+1),`○`.repeat(3-t)]})}function $z(e){let t=t=>e.ruled.includes(t)?` (règle de chemin)`:``;return[`Rôle : ${Lz[e.role.value]} — confiance ${Kz(e.role.confidence)}${t(`role`)}`,`Nature : ${Rz[e.nature.value]} — confiance ${Kz(e.nature.confidence)}${t(`nature`)}`,`Attention : ${zz[Math.round(e.attention.value)]} (${e.attention.value.toFixed(1)} / 3)${t(`attention`)}`,`Comportement modifié : ${Kz(e.behaviour)}${t(`behaviour`)}`,`API / schéma / format modifié : ${Kz(e.api)}${t(`api`)}`,`Code sensible (auth, secrets, SQL, fichiers, entrées) : ${Kz(e.sensitive)}${t(`sensitive`)}`].join(`
113
+ `)}function eB({intent:e}){let t=e.role.confidence>=Bz,n=e.nature.confidence>=Bz;return(0,G.jsxs)(X,{gap:4,wrap:`nowrap`,children:[e.sensitive>=.5&&(0,G.jsx)(Ep,{size:`xs`,color:`red`,variant:`filled`,radius:`sm`,children:`sensible`}),e.api>=.5&&!(t&&e.role.value===`contract`)&&(0,G.jsx)(Ep,{size:`xs`,color:`grape`,variant:`outline`,radius:`sm`,children:`API`}),t&&(0,G.jsx)(Ep,{size:`xs`,radius:`sm`,variant:`light`,color:Zz[e.role.value],children:Lz[e.role.value]}),n&&(0,G.jsx)(Ep,{size:`xs`,radius:`sm`,variant:`outline`,color:`gray`,children:Rz[e.nature.value]}),(0,G.jsx)(Qz,{value:e.attention.value}),(0,G.jsx)(Gh,{multiline:!0,w:360,withArrow:!0,position:`right`,label:(0,G.jsx)(`span`,{style:{whiteSpace:`pre-line`},children:$z(e)}),children:(0,G.jsx)(`span`,{className:`intent-help`,"aria-label":`Détail du classement`,title:``,children:`?`})})]})}function tB(e){let t=Math.round(e/1e3);return t<90?`${t} s`:`${Math.round(t/60)} min`}function nB(e){let{status:t,progress:n}=e.intents,[r,i]=Ge({key:`br:intentHideMechanical`,defaultValue:!1});if(t.isPending)return(0,G.jsx)(X,{justify:`center`,p:`md`,children:(0,G.jsx)(El,{size:`sm`})});if(t.isError)return(0,G.jsx)(Jd,{color:`red`,m:`xs`,title:`Statut du modèle indisponible`,children:t.error.message});if(t.data.state!==`ready`)return(0,G.jsx)(sB,{status:t.data,onRetry:()=>void t.refetch()});let a=n.intents.size+n.failed.size,o=n.total,s=n.modelFiles>0?n.modelMs/n.modelFiles:null,c=e=>{let t=n.intents.get(e);return t?Hz(t):null},l=t=>{let r=n.intents.get(t.path),i=n.failed.get(t.path);return(0,G.jsxs)(`div`,{className:`tree-node intent-node`,"data-current":t.path===e.currentPath||void 0,"data-viewed":t.state===`viewed`||void 0,title:t.path,onClick:()=>e.onSelect(t.path),children:[n.done&&(0,G.jsx)(`span`,{className:`link-rank`,children:e.stats.indexOf(t)+1}),(0,G.jsx)(gz,{state:t.state}),(0,G.jsxs)(`span`,{className:`tree-name`,children:[Wz(t.path),(0,G.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,ml:6,children:Gz(t.path)})]}),(0,G.jsx)(`div`,{className:`intent-tags`,children:r?(0,G.jsx)(eB,{intent:r}):i?(0,G.jsx)(Gh,{label:i,children:(0,G.jsx)(Ep,{size:`xs`,color:`red`,variant:`outline`,radius:`sm`,children:`échec`})}):(0,G.jsx)(El,{size:10})})]},t.path)},u=e.stats.filter(e=>c(e.path)===null);return(0,G.jsxs)(`div`,{className:`links-view`,children:[(0,G.jsxs)(tg,{gap:4,px:10,pb:6,children:[n.error&&(0,G.jsx)(Jd,{color:`red`,p:6,title:`Classement interrompu`,children:(0,G.jsx)(Z,{size:`xs`,children:n.error})}),!n.done&&!n.error&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`Classement : `,a,`/`,o??`…`,s!==null&&o!==null?` · ≈ ${tB(s)} / fichier · reste ≈ ${tB((o-a)*s/n.concurrency)}`:``]}),(0,G.jsx)(gh,{size:`xs`,value:o?a/o*100:0,animated:!0})]}),t.data.kind===`local`&&s!==null&&s>qz&&(0,G.jsxs)(Z,{size:`xs`,c:`orange`,children:[`Machine lente pour ce modèle (`,tB(s),` par fichier) : un GPU est recommandé. Les fichiers déjà classés restent en cache.`]}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:n.done?`Ordre de lecture : du cœur du changement au mécanique, la base d’abord dans chaque groupe.`:`L’ordre de lecture passe par intention quand tous les fichiers sont classés.`}),(0,G.jsx)(ip,{size:`xs`,label:`Masquer le mécanique`,checked:r,onChange:e=>i(e.currentTarget.checked)}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`Modèle : `,Nz[t.data.kind],` ·`,` `,(0,G.jsx)(tf,{component:bC,to:`/settings`,size:`xs`,children:`changer`})]})]}),(0,G.jsxs)(`div`,{className:`file-nav-scroll`,children:[Iz.map(t=>{if(r&&t.id===`mechanical`)return null;let n=e.stats.filter(e=>c(e.path)===t.id);return n.length===0?null:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Gh,{label:t.hint,children:(0,G.jsxs)(`div`,{className:`pkg-head`,children:[(0,G.jsx)(Z,{span:!0,size:`xs`,fw:700,style:{flex:1},children:t.label}),(0,G.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,children:n.length})]})}),n.map(l)]},t.id)}),u.length>0&&(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`pkg-head`,children:[(0,G.jsx)(Z,{span:!0,size:`xs`,fw:700,style:{flex:1},children:n.done?`Non classés`:`En cours de classement`}),(0,G.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,children:u.length})]}),u.map(l)]})]})]})}var rB={absent:e=>`Aucun serveur ne répond sur ${e.url}.`,loading:()=>`llama-server charge le modèle…`,"no-key":e=>`${e.url} demande une clé.`,unauthorized:e=>`${e.url} refuse la clé de better-review : relancer llama-server avec la commande ci-dessous (option --api-key).`,"not-decision":e=>`${e.url} répond, mais ne sert pas de modèle de décision${e.model?` (${e.model})`:``} : vérifier le modèle et la version de llama.cpp (≥ 0.7.0).`},iB={absent:()=>`API Anthropic injoignable, ou Claude Haiku 5.5 indisponible pour ce compte.`,loading:()=>`API Anthropic en cours de vérification…`,"no-key":()=>`Clé API Anthropic requise.`,unauthorized:()=>`La clé Anthropic est refusée : en enregistrer une autre.`,"not-decision":()=>`Réponse inattendue de l’API Anthropic.`},aB=`https://github.com/ggml-org/llama.cpp/releases`;function oB({platform:e}){return e===`darwin`?(0,G.jsxs)(Z,{size:`xs`,children:[(0,G.jsx)(qp,{children:`brew install llama.cpp`}),` puis vérifier `,(0,G.jsx)(qp,{children:`llama-server --version`}),` ≥ 0.7.0 (la 0.6.0 ne charge pas d1), ou l’archive `,(0,G.jsx)(qp,{children:`macos-arm64`}),` des`,` `,(0,G.jsx)(tf,{href:aB,children:`releases`}),` (Apple Silicon : accélération Metal).`]}):e===`win32`?(0,G.jsxs)(Z,{size:`xs`,children:[`Archive des `,(0,G.jsx)(tf,{href:aB,children:`releases llama.cpp`}),` selon le GPU :`,` `,(0,G.jsx)(qp,{children:`win-cuda-13.4-x64`}),` ou `,(0,G.jsx)(qp,{children:`win-cuda-12.4-x64`}),` (NVIDIA), `,(0,G.jsx)(qp,{children:`win-rocm`}),` `,`(AMD), `,(0,G.jsx)(qp,{children:`win-vulkan-x64`}),` (autres) ; l’extraire et ajouter le dossier au `,(0,G.jsx)(qp,{children:`PATH`}),`.`]}):(0,G.jsxs)(Z,{size:`xs`,children:[`Archive des `,(0,G.jsx)(tf,{href:aB,children:`releases llama.cpp`}),` selon le GPU :`,` `,(0,G.jsx)(qp,{children:`ubuntu-cuda-13.4-x64`}),` ou `,(0,G.jsx)(qp,{children:`ubuntu-cuda-12.8-x64`}),` (NVIDIA),`,` `,(0,G.jsx)(qp,{children:`ubuntu-rocm`}),` (AMD), `,(0,G.jsx)(qp,{children:`ubuntu-vulkan-x64`}),` (autres), `,(0,G.jsx)(qp,{children:`ubuntu-x64`}),` (CPU seul) ; l’extraire et ajouter le dossier au `,(0,G.jsx)(qp,{children:`PATH`}),`.`]})}function sB(e){let{status:t}=e,n=t.kind===`claude`?iB:rB,r=t.state===`ready`?null:n[t.state](t);return(0,G.jsx)(`div`,{className:`file-nav-scroll`,children:(0,G.jsxs)(tg,{gap:`xs`,px:10,pb:`md`,children:[(0,G.jsx)(Z,{size:`sm`,fw:600,children:`Vue Intention : modèle requis`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`Chaque fichier est classé (rôle, nature du changement, attention requise, API, code sensible) par un modèle, au choix :`}),(0,G.jsx)(Fz,{}),(0,G.jsx)(Jd,{color:t.state===`loading`?`blue`:`orange`,p:6,children:(0,G.jsxs)(X,{gap:6,wrap:`nowrap`,children:[t.state===`loading`&&(0,G.jsx)(El,{size:12}),(0,G.jsx)(Z,{size:`xs`,children:r})]})}),t.kind===`local`&&(0,G.jsx)(cB,{status:t,onRetry:e.onRetry})]})})}function cB(e){let{status:t}=e;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Z,{size:`xs`,fw:600,children:`Prérequis`}),(0,G.jsxs)(Nm,{size:`xs`,spacing:2,children:[(0,G.jsx)(Nm.Item,{children:`GPU avec ≥ 6 Go de VRAM (NVIDIA, AMD, Vulkan) ou Apple Silicon 16 Go`}),(0,G.jsx)(Nm.Item,{children:`≈ 3 Go de disque pour le modèle (téléchargé au premier lancement)`}),(0,G.jsx)(Nm.Item,{children:`Sans GPU : fonctionne, mais ≈ 30 s par fichier`})]}),(0,G.jsx)(Z,{size:`xs`,fw:600,children:`1. Installer llama.cpp ≥ 0.7.0`}),(0,G.jsx)(oB,{platform:t.platform}),(0,G.jsx)(Z,{size:`xs`,fw:600,children:`2. Lancer le modèle (laisser tourner)`}),(0,G.jsx)(qp,{block:!0,style:{whiteSpace:`pre-wrap`,wordBreak:`break-all`},children:t.command}),(0,G.jsx)($p,{value:t.command,children:({copied:e,copy:t})=>(0,G.jsx)(Fp,{size:`compact-xs`,variant:`light`,onClick:t,w:`fit-content`,children:e?`Copié`:`Copier la commande`})}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`La clé protège le serveur des autres sites ouverts dans le navigateur (llama-server accepte toutes les origines). Autre adresse : `,(0,G.jsx)(qp,{children:`BR_AI_URL`}),` ; clé imposée : `,(0,G.jsx)(qp,{children:`BR_AI_KEY`}),`.`]}),(0,G.jsx)(Z,{size:`xs`,fw:600,children:`3. Détection`}),(0,G.jsxs)(X,{gap:6,children:[(0,G.jsx)(El,{size:10}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`Vérifié toutes les 3 s`}),(0,G.jsx)(Fp,{size:`compact-xs`,variant:`subtle`,onClick:e.onRetry,children:`Tester maintenant`})]})]})}var lB=Object.defineProperty,uB=(e,t,n)=>t in e?lB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dB=(e,t)=>{for(var n in t)lB(e,n,{get:t[n],enumerable:!0})},fB=(e,t,n)=>uB(e,typeof t==`symbol`?t:t+``,n),pB={};dB(pB,{Graph:()=>QB,alg:()=>EB});var mB=Object.defineProperty,hB=(e,t)=>{for(var n in t)mB(e,n,{get:t[n],enumerable:!0})},gB=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected=`directed`in e?e.directed:!0,this._isMultigraph=`multigraph`in e&&e.multigraph,this._isCompound=`compound`in e&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=typeof e==`function`?e:()=>e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(e=>{t===void 0?this.setNode(e):this.setNode(e,t)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{this.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e===`\0`)return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),r=this.successors(e);if(r)for(let e of r)n.add(e);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),(t?.length??0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,this.edge(e))});let n={},r=e=>{let i=this.parent(e);return!i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:r(i)};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,r(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=typeof e==`function`?e:()=>e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((e,n)=>(t===void 0?this.setEdge(e,n):this.setEdge(e,n,t),n)),this}setEdge(e,t,n,r){let i,a,o,s,c=!1;typeof e==`object`&&e&&`v`in e?(i=e.v,a=e.w,o=e.name,arguments.length===2&&(s=t,c=!0)):(i=e,a=t,o=r,arguments.length>2&&(s=n,c=!0)),i=``+i,a=``+a,o!==void 0&&(o=``+o);let l=yB(this._isDirected,i,a,o);if(l in this._edgeLabels)return c&&(this._edgeLabels[l]=s),this;if(o!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(i),this.setNode(a),this._edgeLabels[l]=c?s:this._defaultEdgeLabelFn(i,a,o);let u=bB(this._isDirected,i,a,o);return i=u.v,a=u.w,Object.freeze(u),this._edgeObjs[l]=u,_B(this._preds[a],i),_B(this._sucs[i],a),this._in[a][l]=u,this._out[i][l]=u,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?xB(this._isDirected,e):yB(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(e,t,n){let r=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof r!=`object`||!r?{label:r}:r}hasEdge(e,t,n){return(arguments.length===1?xB(this._isDirected,e):yB(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let r=arguments.length===1?xB(this._isDirected,e):yB(this._isDirected,e,t,n),i=this._edgeObjs[r];if(i){let e=i.v,t=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],vB(this._preds[t],e),vB(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let r=Object.values(e);return n?r.filter(e=>e.v===t&&e.w===n||e.v===n&&e.w===t):r}};function _B(e,t){e[t]?e[t]++:e[t]=1}function vB(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function yB(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+``+a+``+(r===void 0?`\0`:r)}function bB(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function xB(e,t){return yB(e,t.v,t.w,t.name)}hB({},{read:()=>TB,write:()=>SB});function SB(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:CB(e),edges:wB(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function CB(e){return e.nodes().map(t=>{let n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function wB(e){return e.edges().map(t=>{let n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function TB(e){let t=new gB(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(e=>{t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(e=>{t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}var EB={};hB(EB,{CycleException:()=>VB,bellmanFord:()=>OB,components:()=>AB,dijkstra:()=>NB,dijkstraAll:()=>FB,findCycles:()=>LB,floydWarshall:()=>zB,isAcyclic:()=>UB,postorder:()=>qB,preorder:()=>JB,prim:()=>YB,shortestPaths:()=>XB,tarjan:()=>IB,topsort:()=>HB});var DB=()=>1;function OB(e,t,n,r){return kB(e,String(t),n||DB,r||function(t){return e.outEdges(t)??[]})}function kB(e,t,n,r){let i={},a,o=0,s=e.nodes(),c=function(e){let t=i[e.v],r=i[e.w];if(!t||!r)return;let o=n(e);t.distance+o<r.distance&&(i[e.w]={distance:t.distance+o,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){r(e).forEach(function(t){let n=t.v===e?t.v:t.w,r=n===t.v?t.w:t.v;c({v:n,w:r})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0,predecessor:``}});let u=s.length;for(let e=1;e<u&&(a=!1,o++,l(),a);e++);if(o===u-1&&(a=!1,l(),a))throw Error(`The graph contains a negative weight cycle`);return i}function AB(e){let t={},n=[],r;function i(n){var a,o;n in t||(t[n]=!0,r.push(n),(a=e.successors(n))==null||a.forEach(i),(o=e.predecessors(n))==null||o.forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}var jB=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){let n=this._keyIndices,r=String(e);if(!(r in n)){let e=this._arr,i=e.length;return n[r]=i,e.push({key:r,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw Error(`Queue underflow`);this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw Error(`Key not found: ${e}`);let r=this._arr[n].priority;if(t>r)throw Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,n=t[e].priority,r;for(;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){let n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}},MB=()=>1;function NB(e,t,n,r){return PB(e,String(t),n||MB,r||function(t){return e.outEdges(t)??[]})}function PB(e,t,n,r){let i={},a=new jB,o,s,c=function(e){let t=e.v===o?e.w:e.v,r=i[t];if(!r)return;let c=n(e),l=s.distance+c;if(c<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+c);l<r.distance&&(r.distance=l,r.predecessor=o,a.decrease(t,l))};for(e.nodes().forEach(function(e){let n=e===t?0:1/0;i[e]={distance:n,predecessor:``},a.add(e,n)});a.size()>0;){o=a.removeMin();let e=i[o];if(!e||e.distance===1/0)break;s=e,r(o).forEach(c)}return i}function FB(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=NB(e,i,t,n),r},{})}function IB(e){let t=0,n=[],r={},i=[];function a(o){var s;let c=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),(s=e.successors(o))==null||s.forEach(function(e){if(e in r){let t=r[e];t!=null&&t.onStack&&(c.lowlink=Math.min(c.lowlink,t.index))}else{a(e);let t=r[e];t&&(c.lowlink=Math.min(c.lowlink,t.lowlink))}}),c.lowlink===c.index){let e=[],t;do{t=n.pop();let i=r[t];i&&(i.onStack=!1),e.push(t)}while(o!==t);i.push(e)}}return e.nodes().forEach(function(e){e in r||a(e)}),i}function LB(e){return IB(e).filter(function(t){let n=t[0];return n?t.length>1||t.length===1&&(e.outEdges(n,n)??[]).length>0:!1})}var RB=()=>1;function zB(e,t,n){return BB(e,t||RB,n||function(t){return e.outEdges(t)??[]})}function BB(e,t,n){let r={},i=e.nodes();return i.forEach(function(e){let a={};r[e]=a,a[e]={distance:0,predecessor:``},i.forEach(function(t){e!==t&&(a[t]={distance:1/0,predecessor:``})}),n(e).forEach(function(n){let r=n.v===e?n.w:n.v,i=t(n);a[r]={distance:i,predecessor:e}})}),i.forEach(function(e){let t=r[e];t&&i.forEach(function(n){let a=r[n];a&&i.forEach(function(n){let r=a[e],i=t[n],o=a[n];if(r&&i&&o){let e=r.distance+i.distance;e<o.distance&&(o.distance=e,o.predecessor=i.predecessor)}})})}),r}var VB=class extends Error{constructor(e){super(e),this.name=`CycleException`}};function HB(e){let t={},n={},r=[];function i(a){var o;if(a in n)throw new VB;a in t||(n[a]=!0,t[a]=!0,(o=e.predecessors(a))==null||o.forEach(i),delete n[a],r.push(a))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new VB;return r}function UB(e){try{HB(e)}catch(e){if(e instanceof VB)return!1;throw e}return!0}function WB(e,t,n,r,i){Array.isArray(t)||(t=[t]);let a=(t=>(e.isDirected()?e.successors(t):e.neighbors(t))??[]),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i=GB(e,t,n===`post`,o,a,r,i)}),i}function GB(e,t,n,r,i,a,o){return t in r||(r[t]=!0,n||(o=a(o,t)),i(t).forEach(function(t){o=GB(e,t,n,r,i,a,o)}),n&&(o=a(o,t))),o}function KB(e,t,n){return WB(e,t,n,function(e,t){return e.push(t),e},[])}function qB(e,t){return KB(e,t,`post`)}function JB(e,t){return KB(e,t,`pre`)}function YB(e,t){var n;let r=new gB,i={},a=new jB,o;function s(e){let n=e.v===o?e.w:e.v,r=a.priority(n);if(r!==void 0){let s=t(e);s<r&&(i[n]=o,a.decrease(n,s))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(e){a.add(e,1/0),r.setNode(e)});let c=e.nodes()[0];c!==void 0&&a.decrease(c,0);let l=!1;for(;a.size()>0;){if(o=a.removeMin(),o in i)r.setEdge(o,i[o]);else{if(l)throw Error(`Input graph is not connected: `+e);l=!0}(n=e.nodeEdges(o))==null||n.forEach(s)}return r}function XB(e,t,n,r){return ZB(e,t,n,r??(t=>e.outEdges(t)??[]))}function ZB(e,t,n,r){if(n===void 0)return NB(e,t,n,r);let i=!1,a=e.nodes();for(let o=0;o<a.length;o++){let s=a[o];if(s===void 0)continue;let c=r(s);for(let e=0;e<c.length;e++){let t=c[e];if(!t)continue;let r=t.v===s?t.v:t.w;n({v:r,w:r===t.v?t.w:t.v})<0&&(i=!0)}if(i)return OB(e,t,n,r)}return NB(e,t,n,r)}var QB=gB;function $B(e,t,n,r){let i=r;for(;e.hasNode(i);)i=hV(r);return n.dummy=t,e.setNode(i,n),i}function eV(e){let t=new QB().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function tV(e){let t=new QB({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function nV(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function rV(e){let t=gV(uV(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][r.order]=n)}),t}function iV(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=lV(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function aV(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=lV(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function oV(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),$B(e,`border`,i,t)}function sV(e,t=cV){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var cV=65535;function lV(e,t){return t.length>cV?e(...sV(t).map(t=>e(...t))):e(...t)}function uV(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return lV(Math.max,t)}function dV(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function fV(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function pV(e,t){return t()}var mV=0;function hV(e){return e+(``+ ++mV)}function gV(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function _V(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function vV(e,t){let n;return n=typeof t==`string`?e=>e[t]:t,Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function yV(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var bV=`\0`;function xV(e,t,n){if(!(e&&t&&n&&t.dummy===`edge`&&n.dummy===`edge`&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let r=!0;t.edgeObj.w===n.edgeObj.w&&(r=!1);let i=r?e[t.edgeObj.v]?.rank??NaN:e[t.edgeObj.w]?.rank??NaN,a=Object.entries(e).find(e=>e[1].edgeObj?.v===t.edgeObj.v&&e[1].edgeObj?.w===t.edgeObj.w&&e[1].rank===i),o=Object.entries(e).find(e=>e[1].edgeObj?.v===n.edgeObj.v&&e[1].edgeObj?.w===n.edgeObj.w&&e[1].rank===i);if(!a||!o)return 0;let s=a[1].order??NaN,c=o[1].order??NaN;return isNaN(s-c)?0:s-c}var SV=`3.1.1`,CV=class{constructor(){fB(this,`_sentinel`);let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return wV(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&wV(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,TV)),n=n._prev;return`[`+e.join(`, `)+`]`}};function wV(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function TV(e,t){if(e!==`_next`&&e!==`_prev`)return t}var EV=CV,DV=()=>1;function OV(e,t){if(e.nodeCount()<=1)return[];let n=jV(e,t||DV);return kV(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w)||[])}function kV(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)AV(e,t,n,o);for(;o=i.dequeue();)AV(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i]?.dequeue(),o){r=r.concat(AV(e,t,n,o,!0)||[]);break}}}return r}function AV(e,t,n,r,i){let a=[],o=i?a:void 0;return(e.inEdges(r.v)||[]).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,MV(t,n,s)}),(e.outEdges(r.v)||[]).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,MV(t,n,o)}),e.removeNode(r.v),o}function jV(e,t){let n=new QB,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s);let c=n.node(e.v),l=n.node(e.w);i=Math.max(i,c.out+=o),r=Math.max(r,l.in+=o)});let a=NV(i+r+3).map(()=>new EV),o=r+1;return n.nodes().forEach(e=>{MV(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function MV(e,t,n){var r,i,a;n.out?n.in?(a=e[n.out-n.in+t])==null||a.enqueue(n):(i=e[e.length-1])==null||i.enqueue(n):(r=e[0])==null||r.enqueue(n)}function NV(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function PV(e,t){(e.graph().acyclicer===`greedy`?OV(e,n(e)):FV(e,t??null)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,hV(`rev`))});function n(e){return t=>e.edge(t).weight}}function FV(e,t){let n=[],r={},i={};function a(t){Object.hasOwn(i,t)||(i[t]=!0,r[t]=!0,e.outEdges(t).forEach(e=>{Object.hasOwn(r,e.w)?n.push(e):a(e.w)}),delete r[t])}function o(a){var s;Object.hasOwn(i,a)||(i[a]=!0,r[a]=!0,(s=e.outEdges(a))==null||s.forEach(i=>{Object.hasOwn(r,i.w)||t.node(a)?.rank>t.node(i.w)?.rank&&LV(e,i.w,i)?n.push(i):o(i.w)}),delete r[a])}let s=a;return t&&typeof t.node==`function`&&(s=o),e.sources().forEach(s),e.nodes().forEach(s),n}function IV(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function LV(e,t,n){let r=new Set;function i(t){if(e.sources().includes(t))return!0;r.add(t);for(let a of e.inEdges(t)??[])if((a.v!==n.v||a.w!==n.w)&&!r.has(a.v)&&i(a.v))return!0;return!1}return i(t)}function RV(e){e.graph().dummyChains=[],e.edges().forEach(t=>zV(e,t))}function zV(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d=0;for(++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=$B(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function BV(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function VV(e){let t={};function n(r){let i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let a=e.outEdges(r),o=a?a.map(t=>t==null?1/0:n(t.w)-e.edge(t).minlen):[],s=lV(Math.min,o);return s===1/0&&(s=0),i.rank=s}e.sources().forEach(n)}function HV(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var UV=WV;function WV(e){let t=new QB({directed:!1}),n=e.nodes();if(n.length===0)throw Error(`Graph must have at least one node`);let r=n[0],i=e.nodeCount();t.setNode(r,{});let a,o;for(;GV(t,e)<i&&(a=KV(t,e),a);)o=t.hasNode(a.v)?HV(e,a):-HV(e,a),qV(t,e,o);return t}function GV(e,t){function n(r){let i=t.nodeEdges(r);i&&i.forEach(i=>{let a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!HV(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return e.nodes().forEach(n),e.nodeCount()}function KV(e,t){return t.edges().reduce((n,r)=>{let i=1/0;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=HV(t,r)),i<n[0]?[i,r]:n},[1/0,null])[1]}function qV(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}var{preorder:JV,postorder:YV}=EB,XV=ZV;ZV.initLowLimValues=tH,ZV.initCutValues=QV,ZV.calcCutValue=eH,ZV.leaveEdge=rH,ZV.enterEdge=iH,ZV.exchangeEdges=aH;function ZV(e){e=eV(e),VV(e);let t=UV(e);tH(t),QV(t,e);let n,r;for(;n=rH(t);)r=iH(t,e,n),aH(t,e,n,r)}function QV(e,t){let n=YV(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>$V(e,t,n))}function $V(e,t,n){let r=e.node(n).parent,i=e.edge(n,r);i.cutvalue=eH(e,t,n)}function eH(e,t,n){let r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;a||=(i=!1,t.edge(r,n)),o=a.weight;let s=t.nodeEdges(n);return s&&s.forEach(a=>{let s=a.v===n,c=s?a.w:a.v;if(c!==r){let r=s===i,l=t.edge(a).weight;if(o+=r?l:-l,sH(e,n,c)){let t=e.edge(n,c).cutvalue;o+=r?-t:t}}}),o}function tH(e,t){arguments.length<2&&(t=e.nodes()[0]),nH(e,{},1,t)}function nH(e,t,n,r,i){let a=n,o=e.node(r);t[r]=!0;let s=e.neighbors(r);return s&&s.forEach(i=>{Object.hasOwn(t,i)||(n=nH(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function rH(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function iH(e,t,n){let r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);let a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),t.edges().filter(t=>c===cH(e,e.node(t.v),s)&&c!==cH(e,e.node(t.w),s)).reduce((e,n)=>HV(t,n)<HV(t,e)?n:e)}function aH(e,t,n,r){let i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),tH(e),QV(e,t),oH(e,t)}function oH(e,t){let n=e.nodes().find(t=>!e.node(t).parent);if(!n)return;let r=JV(e,[n]);r=r.slice(1),r.forEach(n=>{let r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function sH(e,t,n){return e.hasEdge(t,n)}function cH(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var lH=uH;function uH(e){let t=e.graph().ranker;if(typeof t==`function`)return t(e);switch(t){case`network-simplex`:pH(e);break;case`tight-tree`:fH(e);break;case`longest-path`:dH(e);break;case`none`:break;default:pH(e)}}var dH=VV;function fH(e){VV(e),UV(e)}function pH(e){XV(e)}var mH=hH;function hH(e){let t=_H(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=gH(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;for(;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(o[c+1]).minRank<=r.rank;)c++;l=o[c]}l!==void 0&&e.setParent(n,l),n=e.successors(n)[0]}})}function gH(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));let l=c,u=r;for(;(u=e.parent(u))!==l;)a.push(u);return{path:i.concat(a.reverse()),lca:l}}function _H(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children(bV).forEach(r),t}function vH(e){let t=$B(e,`root`,{},`_root`),n=bH(e),r=Object.values(n),i=lV(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=a);let o=xH(e)+1;e.children(bV).forEach(r=>{yH(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function yH(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=oV(e,`_bt`),l=oV(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{yH(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-(a[o]??0)+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+(a[o]??0)})}function bH(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children(bV).forEach(e=>n(e,1)),t}function xH(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function SH(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}var CH=wH;function wH(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),i&&Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)TH(e,`borderLeft`,`_bl`,n,i,t),TH(e,`borderRight`,`_br`,n,i,t)}}e.children(bV).forEach(t)}function TH(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=$B(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function EH(e){let t=e.graph().rankdir?.toLowerCase();(t===`lr`||t===`rl`)&&OH(e)}function DH(e){let t=e.graph().rankdir?.toLowerCase();(t===`bt`||t===`rl`)&&AH(e),(t===`lr`||t===`rl`)&&(MH(e),OH(e))}function OH(e){e.nodes().forEach(t=>kH(e.node(t))),e.edges().forEach(t=>kH(e.edge(t)))}function kH(e){let t=e.width;e.width=e.height,e.height=t}function AH(e){e.nodes().forEach(t=>jH(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(jH),Object.hasOwn(r,`y`)&&jH(r)})}function jH(e){e.y=-e.y}function MH(e){e.nodes().forEach(t=>NH(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(NH),Object.hasOwn(r,`x`)&&NH(r)})}function NH(e){let t=e.x;e.x=e.y,e.y=t}function PH(e,t=null){let n={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=gV(lV(Math.max,i)+1).map(()=>[]);function o(t){if(n[t])return;n[t]=!0;let r=e.node(t);a[r.rank].push(t);let i=e.successors(t);i&&[...i].sort((e,t)=>s(e,t)).forEach(o)}r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(o);function s(n,r){return xV(t,e.node(n),e.node(r))}return a}function FH(e,t){let n=0;for(let r=1;r<t.length;++r)n+=IH(e,t[r-1],t[r]);return n}function IH(e,t,n){let r=yV(n,n.map((e,t)=>t)),i=t.flatMap(t=>{let n=e.outEdges(t);return n?n.map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos):[]}),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function LH(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n||!n.length)return{v:t};{let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}})}function RH(e,t){let n={};return e.forEach((e,t)=>{let r={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight),n[e.v]=r}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),zH(Object.values(n).filter(e=>!e.indegree))}function zH(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&BH(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>_V(e,[`vs`,`i`,`barycenter`,`weight`]))}function BH(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function VH(e,t,n,r,i){let a={},o=null,s=null,c=i;typeof t==`boolean`?(c=t,a={}):t&&(a=t,o=n??null,s=r??null);let l=dV(e,e=>Object.hasOwn(e,`barycenter`)),u=l.lhs,d=l.rhs.sort((e,t)=>t.i-e.i),f=[],p=0,m=0,h=0;u.sort(UH(s,o,!!c));for(let[e,t]of Object.entries(a)){let n=u.findIndex(t=>t.vs[0]===e);u.splice(n+1,0,t)}h=HH(f,d,h),u.forEach(e=>{h+=e.vs.length,f.push(e.vs),p+=e.barycenter*e.weight,m+=e.weight,h=HH(f,d,h)});let g={vs:f.flat(1)};return m&&(g.barycenter=p/m,g.weight=m),g}function HH(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function UH(e,t,n){return(r,i)=>{if(r.barycenter<i.barycenter)return-1;if(r.barycenter>i.barycenter)return 1;if(e&&(typeof r.vs[0]==`string`||typeof i.vs[0]==`string`)){let n=xV(t,e.node(r.vs[0]),e.node(i.vs[0]));if(n!==0)return n}return n?i.i-r.i:r.i-i.i}}function WH(e,t,n,r,i){var a,o;let s=null,c=i;typeof r==`boolean`?(c=r,s=null):r!==void 0&&(s=r);let l=e.children(t),u=e.node(t),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};d&&(l=l.filter(e=>e!==d&&e!==f));let m=LH(e,l);m.forEach(t=>{if(e.children(t.v).length){let{result:r}=WH(e,t.v,n,s,c);p[t.v]=r,Object.hasOwn(r,`barycenter`)&&KH(t,r)}});let h=RH(m,n);GH(h,p);let g={},_=!1;for(let t=0;t<h.length;t++)for(let n=t+1;n<h.length;n++)if(h[t]&&h[n]&&(a=h[t])!=null&&a.barycenter&&(o=h[n])!=null&&o.barycenter&&h[t]?.barycenter===h[n].barycenter){let r=h[t]?.vs[0]??``,i=h[n]?.vs[0]??``,a=e.node(r),o=e.node(i);if(a.dummy===`edge`&&o.dummy===`edge`&&a.edgeObj?.v===o.edgeObj?.v&&a.edgeObj?.w===o.edgeObj?.w){if(a.edgeLabel.reversed){g[i]=h[t],h.splice(t,1),t--;break}g[r]=h[n],h.splice(n,1),n--}else _=!0}let v=VH(h,g,s,e,c);if(d&&f){v.vs=[d,v.vs,f].flat(1);let t=e.predecessors(d);if(t&&t.length){let n=e.node(t[0]),r=e.predecessors(f),i=e.node(r[0]);Object.hasOwn(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+n.order+i.order)/(v.weight+2),v.weight+=2}}return Object.defineProperty(v,"result",{value:v,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(v,"usedBias",{value:_,enumerable:!1,configurable:!0,writable:!0}),v}function GH(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function KH(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function qH(e,t,n,r){r||=e.nodes();let i=JH(e),a=new QB({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);if(o.rank===t||o.minRank<=t&&t<=o.maxRank){a.setNode(r),a.setParent(r,s||i);let c=e[n](r);c&&c.forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i===void 0?0:i.weight;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]})}}),a}function JH(e){let t;for(;e.hasNode(t=hV(`_root`)););return t}function YH(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function XH(e,t={},n=null){if(typeof t.customOrder==`function`){t.customOrder(e,XH);return}let r=uV(e),i=ZH(e,gV(1,r+1),`inEdges`),a=ZH(e,gV(r-1,-1,-1),`outEdges`),o=PH(e,n);if($H(e,o),t.disableOptimalOrderHeuristic)return;let s=1/0,c,l=t.constraints||[];for(let t=0,r=0;r<4;++t,++r){QH(t%2?i:a,t%4>=2,l,n),o=rV(e);let u=FH(e,o);u<s?(r=0,c=Object.assign({},o),s=u):u===s&&(c=structuredClone(o))}$H(e,c)}function ZH(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return qH(e,t,n,r.get(t)||[])})}function QH(e,t,n,r){let i=!0,a=new QB;e.forEach(function(e){n.forEach(e=>a.setEdge(e.left,e.right));let o=e.graph().root,{result:s,usedBias:c}=WH(e,o,a,r,i);t&&c&&(i=!i),s.vs.forEach((t,n)=>e.node(t).order=n),YH(e,a,s.vs)})}function $H(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}function eU(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=nU(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{let r=e.predecessors(t);r&&r.forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&rU(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function tU(e,t){let n={};function r(t,r,i,a,o){gV(r,i).forEach(r=>{let i=t[r];if(i!==void 0&&e.node(i).dummy){let t=e.predecessors(i);t&&t.forEach(t=>{if(t===void 0)return;let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&rU(n,t,i)})}})}function i(t,n){let i=-1,a=-1,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);if(t&&t.length){let s=t[0];if(s===void 0)return;a=e.node(s).order,r(n,o,c,i,a),o=c,i=a}}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function nU(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(t=>e.node(t).dummy)}}function rU(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function iU(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];return r!==void 0&&Object.hasOwn(r,n)}function aU(e,t,n,r,i){let a={},o={},s={};return t.forEach(e=>{e.forEach((e,t)=>{a[e]=e,o[e]=e,s[e]=t})}),t.forEach(t=>{let c=-1,l=-1,u=!1,d=t,f=t.findIndex(t=>i?.includes(t)||mU(t,e,i));f>0&&(d=[t[f],...t.slice(0,f),...t.slice(f+1)],u=!0),d.forEach(t=>{let d=r(t);if(d&&d.length){i!=null&&i.includes(t)&&(d=d.filter(t=>mU(t,e,i)));let r=d.sort((e,t)=>{let n=s[e],r=s[t];return(n===void 0?0:n)-(r===void 0?0:r)}),f=(r.length-1)/2;for(let e=Math.floor(f),i=Math.ceil(f);e<=i;++e){let i=r[e];if(i===void 0)continue;let d=s[i];if(d!==void 0&&o[t]===t&&c<d&&s[i]!==l&&!iU(n,t,i)){let e=a[i];e!==void 0&&(o[i]=t,o[t]=a[t]=e,c=d,u&&=(c=-1,l=s[i]??-1,!1))}}}})}),{root:a,align:o}}function oU(e,t,n,r,i=!1){let a={},o=sU(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){let t=o.inEdges(e);t?a[e]=t.reduce((e,t)=>{let n=a[t.v]??0,r=o.edge(t);return Math.max(e,n+(r===void 0?0:r))},0):a[e]=0}function u(t){let n=o.outEdges(t),r=1/0;n&&(r=n.reduce((e,t)=>{let n=a[t.w],r=o.edge(t);return Math.min(e,(n===void 0?0:n)-(r===void 0?0:r))},1/0));let i=e.node(t);r!==1/0&&i.borderType!==s&&(a[t]=Math.max(a[t]===void 0?0:a[t],r))}function d(e){return o.predecessors(e)||[]}function f(e){return o.successors(e)||[]}return c(l,d),c(u,f),Object.keys(r).forEach(e=>{let t=n[e];t!==void 0&&(a[e]=a[t]??0)}),a}function sU(e,t,n,r){let i=new QB,a=e.graph(),o=fU(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(a!==void 0){if(i.setNode(a),r!==void 0){let s=n[r];if(s!==void 0){let n=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),n||0))}}r=t}})}),i}function cU(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=pU(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function lU(e,t){let n=Object.values(t),r=lV(Math.min,n),i=lV(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(!s||s===t)return;let c=Object.values(s),l=r-lV(Math.min,c);a!==`l`&&(l=i-lV(Math.max,c)),l&&(e[o]=vV(s,e=>e+l))})})}function uU(e,t=void 0){let n=e.ul;return n?vV(n,(n,r)=>{if(t){let n=e[t.toLowerCase()];if(n&&n[r]!==void 0)return n[r]}let i=Object.values(e).map(e=>{let t=e[r];return t===void 0?0:t}).sort((e,t)=>e-t);return((i[1]??0)+(i[2]??0))/2}):{}}function dU(e,t){let n=rV(e),r=Object.assign(eU(e,n),tU(e,n)),i={},a;return[`u`,`d`].forEach(o=>{a=o===`u`?n:Object.values(n).reverse(),[`l`,`r`].forEach(n=>{n===`r`&&(a=a.map(e=>Object.values(e).reverse()));let s=aU(e,a,r,t=>(o===`u`?e.predecessors(t):e.successors(t))||[],t),c=oU(e,a,s.root,s.align,n===`r`);n===`r`&&(c=vV(c,e=>-e)),i[o+n]=c})}),lU(i,cU(e,i)),uU(i,e.graph().align)}function fU(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=void 0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),c}}function pU(e,t){return e.node(t).width}function mU(e,t,n){if(!n)return!1;let r=t.node(e)?.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),a=n.indexOf(r?.w);return i!==-1&&a!==-1&&i===(a+1)%n.length||i===(a-1)%n.length}function hU(e,t){e=tV(e),gU(e),Object.entries(dU(e,t)).forEach(([t,n])=>e.node(t).x=n)}function gU(e){let t=rV(e),n=e.graph(),r=n.ranksep,i=n.rankalign,a=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height??0;return t>r?t:r},0);t.forEach(t=>{let r=e.node(t);r.y=i===`top`?a+r.height/2:i===`bottom`?a+n-r.height/2:a+n/2}),a+=n+r})}var _U=new WeakMap;function vU(e,t={}){return bU(e,pV,t),e}function yU(e,t,n){let r=t;for(;r!==void 0;){let t=e.parent(r);if(t===n)return r;r=t}}function bU(e,t,n){let r=e.nodes().filter(t=>e.children(t).length),i={};r.forEach(r=>{let a=e.node(r);if(a&&a.rankdir){let o=new QB({multigraph:!0,compound:!0});o.setGraph({rankdir:a.rankdir});let s=e.children(r);s.forEach(t=>{let n={...e.node(t)};o.setNode(t,n);let i=e.parent(t);i&&i!==r&&s.includes(i)&&o.setParent(t,i)});let c=new Set;e.edges().forEach(t=>{let n=yU(e,t.v,r),i=yU(e,t.w,r);if(n&&i&&n!==i){let r=`${n}\0${i}`;c.has(r)||(c.add(r),o.setEdge(n,i,{...e.edge(t)}))}}),bU(o,t,n);let l=jU(o);xU(l,t,n,null),SU(o,l);let u=1/0,d=1/0,f=-1/0,p=-1/0;o.nodes().forEach(e=>{if(e===r)return;let t=o.node(e);t&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.width==`number`&&typeof t.height==`number`&&(u=Math.min(u,t.x-t.width/2),f=Math.max(f,t.x+t.width/2),d=Math.min(d,t.y-t.height/2),p=Math.max(p,t.y+t.height/2))}),(!isFinite(u)||!isFinite(d)||!isFinite(f)||!isFinite(p))&&(u=d=0,f=p=0);let m=f-u,h=p-d;i[r]={minX:u,minY:d,maxX:f,maxY:p,width:m,height:h,offsetX:u,offsetY:d},a._dagreClusterSubgraph=o}});let a=[],o=t=>{let n=[],r=(e.children(t)||[]).filter(e=>e!==t);for(;r.length>0;){let t=r.shift();n.push(t),(e.children(t)||[]).filter(e=>e!==t).forEach(e=>r.push(e))}return n},s=new Map;r.forEach(t=>{let n=e.node(t);n&&n.rankdir&&i[t]&&s.set(t,(e.children(t)||[]).filter(e=>e!==t))});let c=new Set([...s.values()].flat()),l=new Map;s.forEach((e,t)=>{c.has(t)||l.set(t,o(t))});let u=new Set([...l.values()].flat()),d=e=>{for(let[t,n]of l)if(n.includes(e))return t;return e},f=[];e.edges().forEach(t=>{(u.has(t.v)||u.has(t.w))&&f.push({edge:t,label:e.edge(t)})});let p=new Map;u.forEach(t=>{let n=e.parent(t);p.set(t,typeof n==`string`?n:void 0)}),l.forEach((t,n)=>{let r=e.node(n),o=[];t.forEach(t=>{let n=e.node(t);n&&(o.push({id:t,node:n,parent:p.get(t)}),e.removeNode(t))});let s=f.filter(({edge:e})=>t.includes(e.v)||t.includes(e.w)),c=i[n];r&&(a.push({clusterId:n,subgraph:r._dagreClusterSubgraph,bounds:c,children:t,removedNodes:o,removedEdges:s}),r.width=c.width,r.height=c.height)});let m=new Set;f.forEach(({edge:t,label:n})=>{let r=d(t.v),i=d(t.w);if(r!==i&&e.hasNode(r)&&e.hasNode(i)){let t=`${r}\0${i}`;m.has(t)||(m.add(t),e.setEdge(r,i,{...n,width:0,height:0}))}});let h=jU(e),g=xU(h,t,n,_U.get(e)??null);_U.set(e,g),SU(e,h),m.forEach(t=>{let n=t.indexOf(`\0`),r=t.slice(0,n),i=t.slice(n+1);e.hasEdge(r,i)&&e.removeEdge(r,i)}),a.forEach(({clusterId:t,subgraph:n,bounds:r,removedNodes:i,removedEdges:a})=>{let o=e.node(t),s=o?.x??0,c=o?.y??0,l=(r.minX+r.maxX)/2,u=(r.minY+r.maxY)/2;i.forEach(({id:t,node:n,parent:r})=>{e.setNode(t,n),r!==void 0&&e.setParent(t,r)}),a.forEach(({edge:t,label:n})=>{e.setEdge(t,n)}),n.nodes().forEach(r=>{if(r===t)return;let i=n.node(r),a=e.node(r);a&&i&&typeof i.x==`number`&&typeof i.y==`number`&&(a.x=s+(i.x-l),a.y=c+(i.y-u))}),delete o._dagreClusterSubgraph}),r.forEach(t=>{let n=e.node(t),r=i[t];if(n&&n.rankdir&&n._dagreClusterSubgraph&&r){let i=n._dagreClusterSubgraph,a=n.x??0,o=n.y??0,s=(r.minX+r.maxX)/2,c=(r.minY+r.maxY)/2;i.nodes().forEach(n=>{if(n===t)return;let r=i.node(n),l=e.node(n);if(l&&r&&typeof r.x==`number`&&typeof r.y==`number`){let e=r.x-s,t=r.y-c;l.x=a+e,l.y=o+t}}),delete n._dagreClusterSubgraph}})}function xU(e,t,n,r=null){var i,a;let o=n?.useDynamic!==!1,s=o&&(i=r?.graph)!=null?i:null,c=o&&(a=r?.rawNodes)!=null?a:null;t(` makeSpaceForEdgeLabels`,()=>MU(e)),t(` removeSelfEdges`,()=>VU(e)),t(` acyclic`,()=>PV(e,s)),t(` nestingGraph.run`,()=>vH(e)),t(` rank`,()=>lH(tV(e))),t(` injectEdgeLabelProxies`,()=>NU(e)),t(` removeEmptyRanks`,()=>aV(e)),t(` nestingGraph.cleanup`,()=>SH(e)),t(` normalizeRanks`,()=>iV(e)),t(` assignRankMinMax`,()=>PU(e)),t(` removeEdgeLabelProxies`,()=>FU(e)),t(` normalize.run`,()=>RV(e)),t(` parentDummyChains`,()=>mH(e)),t(` addBorderSegments`,()=>CH(e)),t(` order`,()=>XH(e,n,c)),t(` insertSelfEdges`,()=>HU(e)),t(` adjustCoordinateSystem`,()=>EH(e)),t(` position`,()=>hU(e,n.corePath)),t(` positionSelfEdges`,()=>UU(e));let l=JSON.parse(JSON.stringify(e._nodes));return t(` removeBorderNodes`,()=>BU(e)),t(` normalize.undo`,()=>BV(e)),t(` fixupEdgeLabelCoords`,()=>RU(e)),t(` undoCoordinateSystem`,()=>DH(e)),t(` translateGraph`,()=>IU(e)),t(` assignNodeIntersects`,()=>LU(e)),t(` reversePoints`,()=>zU(e)),t(` acyclic.undo`,()=>IV(e)),{graph:e,rawNodes:l}}function SU(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var CU=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],wU={ranksep:50,edgesep:20,nodesep:50,rankdir:`TB`,rankalign:`center`},TU=[`acyclicer`,`ranker`,`rankdir`,`align`,`rankalign`],EU=[`width`,`height`,`rank`],DU={width:0,height:0},OU=[`minlen`,`weight`,`width`,`height`,`labeloffset`],kU={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},AU=[`labelpos`];function jU(e){let t=new QB({multigraph:!0,compound:!0}),n=GU(e.graph());return t.setGraph(Object.assign({},wU,WU(n,CU),_V(n,TU))),e.nodes().forEach(n=>{let r=WU(GU(e.node(n)),EU);Object.keys(DU).forEach(e=>{r[e]===void 0&&(r[e]=DU[e])}),t.setNode(n,r);let i=e.parent(n);i!==void 0&&t.setParent(n,i)}),e.edges().forEach(n=>{let r=GU(e.edge(n));t.setEdge(n,Object.assign({},kU,WU(r,OU),_V(r,AU)))}),t}function MU(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,(r.labelpos??`r`).toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function NU(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);$B(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function PU(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function FU(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`edge-proxy`){let r=n;e.edge(r.e).labelRank=n.rank,e.removeNode(t)}})}function IU(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function LU(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(nV(r,a)),n.points.push(nV(i,o))})}function RU(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function zU(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function BU(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function VU(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function HU(e){rV(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);typeof i.rank!=`number`&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(t=>{$B(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,edgeLabel:t.label},`_se`),(!Array.isArray(t.label.points)||t.label.points.length!==7)&&(t.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function UU(e){e.nodes().forEach(t=>{let n=e.node(t),r=e=>typeof e==`number`&&isFinite(e);if(n.dummy===`selfedge`){let i=n,a=e.node(i.e.v),o=r(a?.x)?a.x:0,s=r(a?.y)?a.y:0,c=r(a?.width)?a.width:0,l=r(a?.height)?a.height:0,u=r(n.x)?n.x:o,d=r(n.y)?n.y:s,f=c/2,p=l/2;i.edgeLabel.points=[{x:u+f,y:d-p},{x:u+f,y:d-p},{x:u,y:d},{x:u-f,y:d+p},{x:u-f,y:d+p},{x:u,y:d},{x:u,y:d}],i.edgeLabel.x=u,i.edgeLabel.y=d,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(e=>{if(!Array.isArray(e.label.points)||e.label.points.length!==7){let t=r(n.x)?n.x:0,i=r(n.y)?n.y:0,a=r(n.width)?n.width:0,o=r(n.height)?n.height:0,s=a/2,c=o/2;e.label.points=[{x:t+s,y:i-c},{x:t+s,y:i-c},{x:t,y:i},{x:t-s,y:i+c},{x:t-s,y:i+c},{x:t,y:i},{x:t,y:i}]}})})}function WU(e,t){return vV(_V(e,t),Number)}function GU(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}function KU(e){let t=rV(e),n=new QB({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{n.setNode(t,{label:t}),n.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>n.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let r=`layer`+t;n.setNode(r,{rank:`same`}),e.reduce((e,t)=>(n.setEdge(e,t,{style:`invis`}),t))}),n}var qU={graphlib:pB,version:SV,layout:vU,debug:KU,util:{time:fV,notime:pV}},JU=7.2;function YU(e){let t=e.split(`/`).at(-1)??e,n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``;return Math.min(300,Math.max(110,Math.max(t.length,Math.min(n.length,36)*.85)*JU+28))}function XU(e,t,n=[],r=null){let i=new qU.graphlib.Graph({multigraph:!0,compound:!0});i.setGraph({rankdir:`LR`,nodesep:n.length>0?44:16,ranksep:90,edgesep:10,marginx:24,marginy:24+(n.length>0?18:0)}),i.setDefaultEdgeLabel(()=>({}));for(let t of e)i.setNode(t,{width:YU(t),height:38});let a=new Set(e),o=[];for(let e of n){let t=e.members.filter(e=>a.has(e));if(t.length===0)continue;let n=`cluster:${e.id}`;i.setNode(n,{width:0,height:0});for(let e of t)i.setParent(e,n);o.push({id:e.id,label:e.label,key:n})}let s=new Map(o.map(e=>[e.id,e.key])),c=e=>`package:${e}`;for(let e of r?.packages??[]){i.setNode(c(e.id),{width:Math.max(110,e.label.length*JU+32),height:26});let t=s.get(e.id);t&&i.setParent(c(e.id),t)}let l=(r?.edges??[]).filter(e=>i.hasNode(c(e.from))&&i.hasNode(c(e.to)));l.forEach((e,t)=>i.setEdge(c(e.to),c(e.from),{},`pkg:${t}`)),t.forEach((e,t)=>i.setEdge(e.to,e.from,{},`${e.kind}:${t}`)),qU.layout(i);let u=e=>{let t=i.node(e);return{x:(t.x??0)-t.width/2,y:(t.y??0)-t.height/2,width:t.width,height:t.height}},d=e.map(e=>({path:e,...u(e)})),f=o.map(({id:e,label:t,key:n})=>({id:e,label:t,...u(n)})),p=t.map((e,t)=>({edge:e,points:i.edge({v:e.to,w:e.from,name:`${e.kind}:${t}`}).points??[]})),m=new Set((r?.packages??[]).filter(e=>e.touched).map(e=>e.id)),h=(r?.packages??[]).map(e=>({...e,...u(c(e.id))})),g=l.map((e,t)=>({from:e.from,to:e.to,touched:m.has(e.from)&&m.has(e.to),points:i.edge({v:c(e.to),w:c(e.from),name:`pkg:${t}`}).points??[]})),_=i.graph();return{nodes:d,edges:p,clusters:f,packageNodes:h,packageEdges:g,width:_.width??0,height:_.height??0}}var ZU=6,QU=34;function $U(e,t,n,r){let i=new Map;for(let r of e){let e=n===`from`?r.from:r.to;(n===`from`?r.to:r.from)===t&&e!==t&&i.set(e,[...i.get(e)??[],r])}let a=e=>+!e.some(e=>e.kind===`import`);return[...i].sort(([e,t],[n,i])=>r(e)-r(n)||a(t)-a(i)||e.localeCompare(n))}function eW(e,t,n,r=()=>0){let i=$U(t,e,`from`,r),a=$U(t,e,`to`,r),o=Math.max(1,i.length,a.length),s=Math.max(38,o*26+(o-1)*ZU),c=Math.min(Math.max(100,n*.3),200),l=+(i.length>0)+ +(a.length>0),u=l===0?0:Math.max(60,(n-c-l*QU)/l),d=(e,t)=>{let n=e.length*26+Math.max(0,e.length-1)*ZU,r=(s-n)/2;return e.map(([e,n],i)=>({path:e,x:t,y:r+i*32,width:u,height:26,edges:n}))},f=a.length>0?u+QU:l===0?(n-c)/2:0;return{center:{path:e,x:f,y:(s-38)/2,width:c,height:38},outgoing:d(a,0),incoming:d(i,f+c+QU),width:n,height:s}}var tW=e=>e.split(`/`).at(-1)??e,nW=e=>e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``;function rW(e){if(e.length===0)return``;let t=`M${e[0].x},${e[0].y}`;for(let n=0;n<e.length-1;n++){let r=e[n-1]??e[n],i=e[n],a=e[n+1],o=e[n+2]??a,s={x:i.x+(a.x-r.x)/6,y:i.y+(a.y-r.y)/6},c={x:a.x-(o.x-i.x)/6,y:a.y-(o.y-i.y)/6};t+=` C${s.x},${s.y} ${c.x},${c.y} ${a.x},${a.y}`}return t}function iW(e,t){let n=Math.max(3,Math.floor((t-14)/7.7));return e.length>n?`${e.slice(0,n-1)}…`:e}function aW(e,t,n,r){let i=(n-e)/2;return`M${e},${t} C${e+i},${t} ${n-i},${r} ${n},${r}`}var oW=`package:`;function sW(e){let{ref:t,width:n}=$e(),r=(0,C.useMemo)(()=>new Map(e.stats.map(e=>[e.path,e])),[e.stats]),i=e.packages,a=(0,C.useMemo)(()=>new Map(i?.context.packages.map(e=>[e.id,e])??[]),[i]),o=e.center,s=(0,C.useMemo)(()=>{if(!o||!i)return e.edges;let t=i.rootOf.get(o),n=new Set(e.edges.filter(e=>e.from===o).map(e=>i.rootOf.get(e.to))),r=new Set(e.edges.filter(e=>e.to===o).map(e=>i.rootOf.get(e.from))),a=[];for(let e of i.imports[o]??[])e!==t&&!n.has(e)&&a.push({from:o,to:oW+e,kind:`import`,detail:[]});if(t!==void 0)for(let e of i.context.edges)e.to===t&&e.from!==t&&!r.has(e.from)&&a.push({from:oW+e.from,to:o,kind:`import`,detail:[]});return[...e.edges,...a]},[o,i,e.edges]),c=o&&n>0?eW(o,s,n,e=>+!!e.startsWith(oW)):null,l=c?r.get(c.center.path):void 0,u=o&&i?a.get(i.rootOf.get(o)??``)?.label:void 0,d=(t,n)=>{let r=t.path.slice(8),s=a.get(r),c=i?.firstFile.get(r),l=s?.touched===!0&&c!==void 0,d=s?.label??(r||`(racine)`),f=n===`out`?`${tW(o??``)} importe le package ${d}`:`le package ${d} utilise ${u??`ce package`}`;return(0,G.jsxs)(`g`,{className:`link-pkg`,"data-touched":s?.touched||void 0,transform:`translate(${t.x} ${t.y})`,style:{cursor:l?`pointer`:`default`},onClick:()=>l&&e.onSelect(c),children:[(0,G.jsx)(`rect`,{width:t.width,height:t.height,rx:t.height/2}),(0,G.jsx)(`text`,{x:t.width/2,y:17,textAnchor:`middle`,children:iW(d,t.width+6)}),(0,G.jsx)(`title`,{children:`${f}${s?.touched?l?` · clic : ouvrir ses fichiers`:``:` · aucun fichier modifié`}`})]},`${n}:${t.path}`)},f=(t,n)=>{let s=r.get(t.path),c=t.edges.every(e=>e.kind===`mention`),l=n===`in`?c?`mentionne`:`importe`:c?`mentionné par`:`importé par`,d=[...new Set(t.edges.flatMap(e=>e.detail))].join(`, `),f=i?a.get(i.rootOf.get(t.path)??``)?.label:void 0;return(0,G.jsxs)(`g`,{className:`link-node`,"data-state":s?.state,transform:`translate(${t.x} ${t.y})`,onClick:()=>e.onSelect(t.path),children:[(0,G.jsx)(`rect`,{width:t.width,height:t.height,rx:5,fill:s?Oz(s):`var(--br-surface)`}),(0,G.jsxs)(`text`,{x:7,y:17,className:`link-name`,children:[s?.state===`viewed`?`✓ `:``,iW(tW(t.path),t.width-(s?.state===`viewed`?14:0)),f&&f!==u&&(0,G.jsx)(`tspan`,{dx:6,className:`link-pkg-tag`,children:iW(f,t.width-(tW(t.path).length+2)*7.7)})]}),(0,G.jsx)(`title`,{children:`${t.path}${f?` (${f})`:``}\n${l} ${tW(o??``)}${d?` : ${d}`:``}`})]},`${n}:${t.path}`)},p=(e,t,n)=>{let r=t===`out`?aW(e.x+e.width,e.y+e.height/2,n.x,n.y+n.height/2):aW(n.x+n.width,n.y+n.height/2,e.x,e.y+e.height/2);if(e.path.startsWith(oW)){let n=a.get(e.path.slice(8))?.touched===!0;return(0,G.jsx)(`path`,{d:r,className:`link-pkg-edge`,"data-touched":n||void 0,markerEnd:n?`url(#ego-arrow-pkg)`:`url(#ego-arrow)`},`e:${t}:${e.path}`)}return(0,G.jsx)(`path`,{d:r,className:`link-edge`,"data-kind":e.edges.every(e=>e.kind===`mention`)?`mention`:`import`,markerEnd:`url(#ego-arrow)`},`e:${t}:${e.path}`)},m=(e,t)=>e.path.startsWith(oW)?d(e,t):f(e,t);return(0,G.jsxs)(`div`,{className:`ego`,ref:t,children:[(0,G.jsxs)(X,{gap:6,py:4,wrap:`nowrap`,children:[(0,G.jsxs)(Z,{size:`xs`,fw:600,truncate:!0,style:{flex:1},children:[o?tW(o):``,u&&(0,G.jsx)(Z,{span:!0,size:`xs`,c:`violet.3`,fw:500,ml:6,children:u})]}),c&&(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[`utilise `,c.outgoing.length,` · utilisé par `,c.incoming.length]})]}),!o&&(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,pb:8,children:`Ouvrez un fichier pour voir ce qui l’utilise et ce qu’il utilise.`}),c&&(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(X,{justify:`space-between`,mb:2,children:[(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`ce qu’il utilise`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`ce qui l’utilise →`})]}),c.incoming.length+c.outgoing.length===0?(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`Aucun lien avec les autres fichiers`,i?` ou packages`:``,` de la PR.`]}):(0,G.jsxs)(`svg`,{width:`100%`,viewBox:`0 0 ${c.width} ${c.height}`,children:[(0,G.jsxs)(`defs`,{children:[(0,G.jsx)(`marker`,{id:`ego-arrow`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto`,children:(0,G.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-gray-5)`})}),(0,G.jsx)(`marker`,{id:`ego-arrow-pkg`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`6`,markerHeight:`6`,orient:`auto`,children:(0,G.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-violet-4)`})})]}),c.incoming.map(e=>p(e,`in`,c.center)),c.outgoing.map(e=>p(e,`out`,c.center)),c.incoming.map(e=>m(e,`in`)),c.outgoing.map(e=>m(e,`out`)),(0,G.jsxs)(`g`,{className:`link-node`,"data-current":!0,"data-state":l?.state,transform:`translate(${c.center.x} ${c.center.y})`,children:[(0,G.jsx)(`rect`,{width:c.center.width,height:38,rx:6,fill:l?Oz(l):`var(--br-surface)`}),(0,G.jsx)(`text`,{x:9,y:16,className:`link-name`,children:iW(tW(c.center.path),c.center.width)}),(0,G.jsx)(`text`,{x:9,y:30,className:`link-dir`,children:iW(nW(c.center.path)||`/`,c.center.width+10)}),(0,G.jsx)(`title`,{children:`${c.center.path}${u?` (${u})`:``}`})]})]})]})]})}function cW(e){let{ref:t,width:n,height:r}=$e(),[i,a]=(0,C.useState)(null),[o,s]=(0,C.useState)(null),c=(0,C.useRef)(null),l=(0,C.useMemo)(()=>new Map(e.stats.map(e=>[e.path,e])),[e.stats]),u=(0,C.useMemo)(()=>XU(e.stats.map(e=>e.path),e.edges,e.groups,e.context),[e.stats,e.edges,e.groups,e.context]),d=n>0&&u.width>0?Math.min(1.4,n/u.width,r/u.height):1,f=o??{k:d,x:(n-u.width*d)/2,y:(r-u.height*d)/2},p=new Map(u.packageNodes.map(e=>[e.id,e.label])),m=t=>i===null||t===i||e.edges.some(e=>e.from===i&&e.to===t||e.to===i&&e.from===t);return(0,G.jsxs)(`div`,{ref:t,className:`link-graph`,onWheel:e=>{let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=Math.min(4,Math.max(.15,f.k*(e.deltaY<0?1.15:1/1.15)));s({k:i,x:n-(n-f.x)*i/f.k,y:r-(r-f.y)*i/f.k})},onMouseDown:e=>c.current={x:e.clientX-f.x,y:e.clientY-f.y},onMouseMove:e=>c.current&&s({k:f.k,x:e.clientX-c.current.x,y:e.clientY-c.current.y}),onMouseUp:()=>c.current=null,onMouseLeave:()=>c.current=null,children:[(0,G.jsxs)(`svg`,{width:n,height:r,children:[(0,G.jsxs)(`defs`,{children:[(0,G.jsx)(`marker`,{id:`arrow`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto`,children:(0,G.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-gray-5)`})}),(0,G.jsx)(`marker`,{id:`arrow-hl`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto`,children:(0,G.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-blue-4)`})}),(0,G.jsx)(`marker`,{id:`arrow-pkg`,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto`,children:(0,G.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:`var(--mantine-color-violet-4)`})})]}),(0,G.jsxs)(`g`,{transform:`translate(${f.x} ${f.y}) scale(${f.k})`,children:[u.clusters.map(e=>(0,G.jsxs)(`g`,{className:`link-cluster`,transform:`translate(${e.x} ${e.y})`,children:[(0,G.jsx)(`rect`,{width:e.width,height:e.height,rx:10}),u.packageNodes.length===0&&(0,G.jsx)(`text`,{x:6,y:-6,children:e.label})]},e.id)),u.packageEdges.map(e=>{let t=i===`package:${e.from}`||i===`package:${e.to}`;return(0,G.jsx)(`path`,{d:rW(e.points),className:`link-pkg-edge`,"data-touched":e.touched||void 0,"data-active":t||void 0,markerEnd:e.touched?`url(#arrow-pkg)`:`url(#arrow)`,children:(0,G.jsx)(`title`,{children:`${p.get(e.from)??e.from} utilise ${p.get(e.to)??e.to}`})},`pkg:${e.from}:${e.to}`)}),u.packageNodes.map(e=>(0,G.jsxs)(`g`,{className:`link-pkg`,"data-touched":e.touched||void 0,transform:`translate(${e.x} ${e.y})`,onMouseEnter:()=>a(`package:${e.id}`),onMouseLeave:()=>a(null),children:[(0,G.jsx)(`rect`,{width:e.width,height:e.height,rx:e.height/2}),(0,G.jsx)(`text`,{x:e.width/2,y:17,textAnchor:`middle`,children:e.label}),(0,G.jsx)(`title`,{children:`${e.label} — ${e.id||`(racine)`}${e.touched?``:` · aucun fichier modifié`}`})]},`package:${e.id}`)),u.edges.map(({edge:e,points:t},n)=>{let r=i!==null&&(e.from===i||e.to===i),a=rW(t);return(0,G.jsx)(`path`,{d:a,className:`link-edge`,"data-kind":e.kind,"data-active":r||void 0,"data-dim":i!==null&&!r||void 0,markerEnd:r?`url(#arrow-hl)`:`url(#arrow)`,children:(0,G.jsxs)(`title`,{children:[e.from,` `,e.kind===`import`?`importe`:`mentionne`,` `,e.to,e.detail.length?` : ${e.detail.join(`, `)}`:``]})},n)}),u.nodes.map(t=>{let n=l.get(t.path);return(0,G.jsxs)(`g`,{className:`link-node`,"data-state":n?.state,"data-current":t.path===e.currentPath||void 0,"data-dim":!m(t.path)||void 0,transform:`translate(${t.x} ${t.y})`,onMouseEnter:()=>a(t.path),onMouseLeave:()=>a(null),onClick:()=>e.onSelect(t.path),children:[(0,G.jsx)(`rect`,{width:t.width,height:38,rx:6,fill:n?Oz(n):`var(--br-surface)`}),(0,G.jsxs)(`text`,{x:10,y:16,className:`link-name`,children:[n?.state===`viewed`?`✓ `:``,tW(t.path)]}),(0,G.jsx)(`text`,{x:10,y:30,className:`link-dir`,children:nW(t.path)||`/`}),n&&n.openThreads>0&&(0,G.jsx)(`circle`,{cx:t.width-9,cy:9,r:4,className:`link-thread`,"data-unread":n.unreadThreads>0||void 0}),(0,G.jsx)(`title`,{children:`${t.path}\n+${n?.additions??0} −${n?.deletions??0}`})]},t.path)})]})]}),o&&(0,G.jsx)(Fp,{size:`compact-xs`,variant:`default`,className:`link-fit`,onClick:()=>s(null),children:`Recadrer`})]})}function lW(e){let t=dW(),[n,r]=Ge({key:`br:linksMentions`,defaultValue:!0}),[i,a]=Ge({key:`br:linksIsolated`,defaultValue:!1}),[o,s]=(0,C.useState)(!1),c=(0,C.useMemo)(()=>(t.data?.edges??[]).filter(e=>n||e.kind===`import`),[t.data,n]),l=(0,C.useMemo)(()=>new Set(e.stats.map(e=>e.path)),[e.stats]),u=(0,C.useMemo)(()=>(t.data?.packages??[]).map(e=>({id:e.root,label:e.name,members:e.files})),[t.data]),d=fW(t.data),[f,p]=Ge({key:`br:linksWorkspace`,defaultValue:!0}),m=(0,C.useMemo)(()=>c.filter(e=>l.has(e.from)&&l.has(e.to)),[c,l]),h=new Map,g=new Map;for(let e of c)h.set(e.from,(h.get(e.from)??0)+1),g.set(e.to,(g.get(e.to)??0)+1);let _=e=>(h.get(e)??0)+(g.get(e)??0),v=t.data?.packages??[],y=e.stats,b=y.filter(e=>_(e.path)>0),x=y.filter(e=>_(e.path)===0),S=new Map(v.flatMap(e=>e.files.map(t=>[t,e.root]))),w=new Map(v.map(e=>[e.root,e.name])),T=i?e.stats:e.stats.filter(e=>m.some(t=>t.from===e.path||t.to===e.path));if(t.isPending)return(0,G.jsx)(pW,{});if(t.isError)return(0,G.jsx)(mW,{message:t.error.message});let E=(n,r)=>{let i=t.data.languages[n.path],a=t.data.externalImports[n.path]??0;return(0,G.jsxs)(`div`,{className:`tree-node`,"data-current":n.path===e.currentPath||void 0,"data-viewed":n.state===`viewed`||void 0,title:n.path,onClick:()=>e.onSelect(n.path),children:[r!==void 0&&(0,G.jsx)(`span`,{className:`link-rank`,children:r}),(0,G.jsx)(gz,{state:n.state}),(0,G.jsxs)(`span`,{className:`tree-name`,children:[tW(n.path),(0,G.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,ml:6,children:nW(n.path)})]}),i&&(0,G.jsx)(Ep,{size:`xs`,variant:`outline`,color:`gray`,radius:`sm`,children:SR(i)}),(0,G.jsx)(Gh,{label:`importe / mentionne ${h.get(n.path)??0} · utilisé par ${g.get(n.path)??0}${a?` · ${a} import(s) hors PR`:``}`,children:(0,G.jsxs)(Z,{span:!0,size:`xs`,ff:`monospace`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[`→`,h.get(n.path)??0,` ←`,g.get(n.path)??0]})})]},n.path)};return(0,G.jsxs)(`div`,{className:`links-view`,children:[(0,G.jsxs)(X,{gap:6,px:10,pb:6,children:[(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[c.length,` liens · `,b.length,` fichiers reliés`]}),(0,G.jsx)(Fp,{size:`compact-xs`,ml:`auto`,variant:`light`,onClick:()=>s(!0),disabled:T.length===0,children:`Graphe ⤢`})]}),(0,G.jsx)(ip,{size:`xs`,px:10,pb:6,label:`Inclure les mentions (noms ou chemins cités dans le texte)`,checked:n,onChange:e=>r(e.currentTarget.checked)}),t.data.unreadable.length>0&&(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,px:10,pb:4,children:[`Non analysés (binaires / trop gros) : `,t.data.unreadable.length]}),(0,G.jsxs)(`div`,{className:`file-nav-scroll`,children:[(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,px:10,pt:6,pb:2,children:v.length>0?`Ordre de lecture : packages les plus utilisés en premier, puis la base d’abord dans chaque package.`:`Ordre de lecture : la base d’abord (fichiers utilisés par les autres), puis ce qui les assemble.`}),v.length>0?(0,G.jsxs)(G.Fragment,{children:[v.map(e=>{let t=y.filter(t=>S.get(t.path)===e.root);if(t.length===0)return null;let n=e=>e.map(e=>w.get(e)??e).join(`, `);return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Gh,{multiline:!0,w:320,label:`${e.root||`(racine)`} · utilise : ${n(e.dependsOn)||`—`} · utilisé par : ${n(e.usedBy)||`—`}`,children:(0,G.jsxs)(`div`,{className:`pkg-head`,children:[(0,G.jsx)(Ep,{size:`xs`,variant:`light`,color:`violet`,radius:`sm`,children:e.ecosystem}),(0,G.jsx)(Z,{span:!0,size:`xs`,fw:700,truncate:!0,children:e.name}),(0,G.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,truncate:!0,style:{flex:1},children:e.root?`${e.root}/`:``}),(0,G.jsxs)(Z,{span:!0,size:`xs`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:[`utilisé par `,e.usedBy.length,` · utilise `,e.dependsOn.length]})]})}),t.map(e=>E(e,y.indexOf(e)+1))]},e.root)}),y.some(e=>!S.has(e.path))&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`tree-dir`,children:`Hors des packages`}),y.filter(e=>!S.has(e.path)).map(e=>E(e,y.indexOf(e)+1))]})]}):(0,G.jsxs)(G.Fragment,{children:[b.map((e,t)=>E(e,t+1)),x.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`tree-dir`,children:[`Sans lien avec les autres fichiers de la PR (`,x.length,`)`]}),x.map(e=>E(e))]})]})]}),(0,G.jsx)(Xm,{opened:o,onClose:()=>s(!1),fullScreen:!0,title:(0,G.jsxs)(X,{gap:`md`,children:[(0,G.jsx)(Z,{fw:600,children:`Liens entre les fichiers modifiés`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`à gauche la base (fichiers utilisés par les autres), à droite ce qui les utilise · flèche = « est utilisé par » · trait plein = import, pointillé = mention · glisser pour déplacer, molette pour zoomer, clic pour ouvrir le fichier`})]}),styles:{body:{height:`calc(100vh - 60px)`,padding:0}},children:(0,G.jsxs)(tg,{gap:0,h:`100%`,children:[(0,G.jsxs)(X,{gap:`lg`,px:`md`,py:6,children:[(0,G.jsx)(ip,{size:`xs`,label:`Mentions`,checked:n,onChange:e=>r(e.currentTarget.checked)}),(0,G.jsx)(ip,{size:`xs`,label:`Fichiers sans lien`,checked:i,onChange:e=>a(e.currentTarget.checked)}),d&&(0,G.jsx)(ip,{size:`xs`,label:`Autres packages du monorepo (${d.packages.filter(e=>!e.touched).length})`,checked:f,onChange:e=>p(e.currentTarget.checked)})]}),(0,G.jsx)(cW,{stats:T,groups:u,context:f?d:null,edges:m,currentPath:e.currentPath,onSelect:t=>{s(!1),e.onSelect(t)}})]})})]})}function uW(e){let t=dW(),[n,r]=Ge({key:`br:linksMentions`,defaultValue:!0}),i=(0,C.useMemo)(()=>(t.data?.edges??[]).filter(e=>n||e.kind===`import`),[t.data,n]),a=fW(t.data),o=(0,C.useMemo)(()=>{if(!t.data||!a)return null;let n=new Map(t.data.packages.flatMap(e=>e.files.map(t=>[t,e.root]))),r=new Map;for(let t of e.stats){let e=n.get(t.path);e!==void 0&&!r.has(e)&&r.set(e,t.path)}return{context:a,rootOf:n,firstFile:r,imports:t.data.packageImports}},[t.data,a,e.stats]);return t.isPending?(0,G.jsx)(pW,{}):t.isError?(0,G.jsx)(mW,{message:t.error.message}):(0,G.jsxs)(`div`,{className:`panel-body`,children:[(0,G.jsx)(ip,{size:`xs`,pb:6,label:`Inclure les mentions (noms ou chemins cités dans le texte)`,checked:n,onChange:e=>r(e.currentTarget.checked)}),(0,G.jsx)(sW,{center:e.currentPath,edges:i,stats:e.stats,onSelect:e.onSelect,packages:o})]})}function dW(){let e=zI();return dy({...ED().pr.links.queryOptions({ref:e.ref,base:e.range.base,head:e.range.head,fullPr:e.range.fullPr}),staleTime:1/0})}function fW(e){return(0,C.useMemo)(()=>e&&e.workspace.length>0?{packages:e.workspace.map(e=>({id:e.root,label:e.name,touched:e.touched})),edges:e.packageEdges}:null,[e])}function pW(){return(0,G.jsxs)(X,{p:`md`,gap:`xs`,children:[(0,G.jsx)(El,{size:`xs`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:`Analyse des imports…`})]})}function mW({message:e}){return(0,G.jsx)(Jd,{color:`red`,m:`xs`,title:`Liens indisponibles`,children:e})}function hW(e){let t=e.width??48,n=Dz(e),r=e.max>0?Math.max(n>0?2:0,n/e.max*t):0,i=n>0?e.additions/n*r:0;return(0,G.jsxs)(`span`,{className:`churn-bar`,style:{width:t},children:[(0,G.jsx)(`i`,{className:`add`,style:{width:i}}),(0,G.jsx)(`i`,{className:`del`,style:{width:r-i}})]})}function gW({additions:e,deletions:t}){return(0,G.jsxs)(Z,{span:!0,size:`xs`,ff:`monospace`,style:{whiteSpace:`nowrap`},children:[e>0&&(0,G.jsxs)(Z,{span:!0,c:`green.4`,inherit:!0,children:[`+`,e]}),` `,t>0&&(0,G.jsxs)(Z,{span:!0,c:`red.4`,inherit:!0,children:[`−`,t]})]})}function _W(e){let{stat:t}=e,n=(0,C.useRef)(null),r=e.current;return(0,C.useEffect)(()=>{r&&n.current?.scrollIntoView({block:`nearest`})},[r]),(0,G.jsxs)(`div`,{ref:n,className:`tree-node`,"data-current":r||void 0,"data-viewed":t.state===`viewed`||void 0,onClick:e.onSelect,title:t.path,style:{paddingLeft:10+e.depth*14},children:[(0,G.jsx)(gz,{state:t.state}),(0,G.jsxs)(`span`,{className:`tree-name`,children:[t.path.split(`/`).at(-1),e.dir&&(0,G.jsx)(Z,{span:!0,size:`xs`,c:`dimmed`,ml:6,children:e.dir})]}),t.openThreads>0&&(0,G.jsxs)(Z,{span:!0,size:`xs`,c:t.unreadThreads>0?`orange.4`:`yellow.4`,children:[(0,G.jsx)(`i`,{className:`ico-c`}),t.openThreads]}),(0,G.jsx)(hW,{additions:t.additions,deletions:t.deletions,max:e.maxChurn,width:36}),(0,G.jsx)(gW,{additions:t.additions,deletions:t.deletions})]})}function vW(e){let t=Math.max(0,...e.stats.map(Dz));if(e.sort===`churn`)return(0,G.jsx)(G.Fragment,{children:e.stats.map(n=>(0,G.jsx)(_W,{stat:n,depth:0,dir:n.path.includes(`/`)?n.path.slice(0,n.path.lastIndexOf(`/`)):void 0,current:n.path===e.currentPath,maxChurn:t,onSelect:()=>e.onSelect(n.path)},n.path))});let n=[];for(let t of e.stats){let e=t.path.includes(`/`)?t.path.slice(0,t.path.lastIndexOf(`/`)):``,r=n.at(-1);r&&r.dir===e?r.stats.push(t):n.push({dir:e,stats:[t]})}return(0,G.jsx)(G.Fragment,{children:n.map((n,r)=>(0,G.jsxs)(`div`,{children:[n.dir&&(0,G.jsxs)(`div`,{className:`tree-dir`,children:[n.dir,`/`]}),n.stats.map(n=>(0,G.jsx)(_W,{stat:n,depth:1,current:n.path===e.currentPath,maxChurn:t,onSelect:()=>e.onSelect(n.path)},n.path))]},`${n.dir}:${r}`))})}function yW(e){let[t,n]=(0,C.useState)(new Set),r=jz(e.root,t),i=Dz(e.root),a=Math.max(0,...r.flatMap(e=>e.kind===`file`?[Dz(e.stat)]:[])),o=e=>n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return(0,G.jsx)(G.Fragment,{children:r.map(n=>n.kind===`dir`?(0,G.jsxs)(`div`,{className:`tree-node tree-folder`,style:{paddingLeft:6+n.depth*14},onClick:()=>o(n.path),title:`${n.path}/ · ${n.fileCount} fichiers · ${n.viewedCount} vus`,children:[(0,G.jsx)(`span`,{className:`tree-chevron`,children:t.has(n.path)?`▸`:`▾`}),(0,G.jsxs)(`span`,{className:`tree-name`,children:[n.name,`/`]}),n.openThreads>0&&(0,G.jsxs)(Z,{span:!0,size:`xs`,c:`yellow.4`,children:[(0,G.jsx)(`i`,{className:`ico-c`}),n.openThreads]}),(0,G.jsxs)(Z,{span:!0,size:`xs`,c:n.viewedCount===n.fileCount?`green.5`:`dimmed`,children:[n.viewedCount,`/`,n.fileCount]}),(0,G.jsx)(hW,{additions:n.additions,deletions:n.deletions,max:i,width:36}),(0,G.jsx)(gW,{additions:n.additions,deletions:n.deletions})]},`d:${n.path}`):(0,G.jsx)(_W,{stat:n.stat,depth:n.depth+.6,current:n.path===e.currentPath,maxChurn:a,onSelect:()=>e.onSelect(n.path)},n.path))})}function bW(e){let{stats:t}=e,[n,r]=(0,C.useState)([]),[i,a]=(0,C.useState)(``),o=(0,C.useMemo)(()=>t.filter(e=>(!n.includes(`unviewed`)||e.state!==`viewed`)&&(!n.includes(`threads`)||e.openThreads>0)&&(i===``||e.path.toLowerCase().includes(i.toLowerCase()))),[t,n,i]),s=(0,C.useMemo)(()=>Az(o),[o]),c=t.filter(e=>e.state===`viewed`).length;return(0,G.jsxs)(`div`,{className:`file-nav`,children:[(0,G.jsx)(Yh,{size:`xs`,mx:10,mb:6,value:e.nav,onChange:t=>e.onNavChange(t===`list`||t===`links`||t===`intent`?t:`tree`),data:[{value:`list`,label:`Liste`},{value:`tree`,label:`Arbre`},{value:`links`,label:`Liens`},{value:`intent`,label:`Intention`}]}),(0,G.jsxs)(X,{gap:4,px:10,pb:6,children:[(0,G.jsxs)(Wp.Group,{multiple:!0,value:n,onChange:r,children:[(0,G.jsx)(Wp,{size:`xs`,value:`unviewed`,children:`Non vus`}),(0,G.jsx)(Wp,{size:`xs`,value:`threads`,children:`Threads ouverts`})]}),(e.nav===`list`||e.nav===`tree`)&&(0,G.jsx)(Yh,{size:`xs`,ml:`auto`,value:e.sort,onChange:t=>e.onSortChange(t===`churn`?`churn`:`name`),data:[{value:`name`,label:`A→Z`},{value:`churn`,label:`Taille`}]})]}),(0,G.jsx)(jg,{size:`xs`,px:10,pb:6,placeholder:`Filtrer les fichiers…`,value:i,onChange:e=>a(e.currentTarget.value)}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,px:10,pb:4,children:[c,`/`,t.length,` fichiers vus · `,Dz(s),` lignes modifiées`,o.length===t.length?``:` · ${o.length} affichés`]}),o.length===0?(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,px:10,children:`Aucun fichier.`}):e.nav===`links`?(0,G.jsx)(lW,{stats:o,currentPath:e.currentPath,onSelect:e.onSelect}):e.nav===`intent`?(0,G.jsx)(nB,{stats:o,intents:e.intents,currentPath:e.currentPath,onSelect:e.onSelect}):(0,G.jsx)(`div`,{className:`file-nav-scroll`,children:e.nav===`tree`?(0,G.jsx)(yW,{root:s,currentPath:e.currentPath,onSelect:e.onSelect}):(0,G.jsx)(vW,{stats:o,sort:e.sort,currentPath:e.currentPath,onSelect:e.onSelect})})]})}var xW=/^[0-9a-f]{7,40}$/i;function SW(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n;try{n=t.pathname.split(`/`).filter(Boolean).map(decodeURIComponent)}catch{return null}let[r,i,a,...o]=n;if(!r||!i)return null;let s=t.hash.slice(1);if(a===`pull`&&/^\d+$/.test(o[0]??``)){let e=o[1]===`commits`&&xW.test(o[2]??``)?o[2].toLowerCase():null,t=/^diff-([0-9a-f]{64})(?:([LR])(\d+)(?:-([LR])(\d+))?)?$/.exec(s),n=null;if(t?.[2]){let e=Number(t[3]),r=t[4]===t[2]?Number(t[5]):e;n={side:t[2]===`L`?`LEFT`:`RIGHT`,start:Math.min(e,r),end:Math.max(e,r)}}let a=/^discussion_r(\d+)$/.exec(s);return{kind:`pr`,owner:r,repo:i,number:Number(o[0]),commit:e,fileHash:t?.[1]??null,lines:n,discussion:a?Number(a[1]):null}}if(a===`blob`&&o.length>=2){let e=/^L(\d+)(?:C\d+)?(?:-L(\d+)(?:C\d+)?)?$/.exec(s),t=e?{start:Number(e[1]),end:Number(e[2]??e[1])}:null;return{kind:`blob`,owner:r,repo:i,refAndPath:o.join(`/`),lines:t}}return a===`commit`&&xW.test(o[0]??``)?{kind:`commit`,owner:r,repo:i,sha:o[0].toLowerCase()}:null}var CW=(e,t)=>e.toLowerCase()===t.toLowerCase();function wW(e,t){if(!CW(e.owner,t.owner)||!CW(e.repo,t.repo))return e.kind===`pr`?{kind:`otherPr`,owner:e.owner,repo:e.repo,number:e.number}:null;let n=e=>{let n=t.commits.find(t=>t.oid.startsWith(e));return n?.parentOid?`${n.parentOid}..${n.oid}`:null};if(e.kind===`pr`){if(e.number!==t.number)return{kind:`otherPr`,owner:t.owner,repo:t.repo,number:e.number};if(e.discussion!==null){let n=t.threads.find(t=>t.comments.some(t=>t.databaseId===e.discussion));return n?{kind:`thread`,threadId:n.id}:null}let r=e.fileHash===null?null:t.pathByHash.get(e.fileHash);if(r===void 0)return null;let i=r===null?null:{path:r,lines:e.lines};if(e.commit!==null){let t=n(e.commit);return t?{kind:`commit`,range:t,file:i}:null}return i?{kind:`file`,file:i}:{kind:`pr`}}if(e.kind===`commit`){let t=n(e.sha);return t?{kind:`commit`,range:t,file:null}:null}let r=e.refAndPath.split(`/`);for(let n=1;n<r.length;n++){let i=r.slice(n).join(`/`);if(!t.files.includes(i))continue;let a=r.slice(0,n).join(`/`);return{kind:`file`,file:{path:i,lines:(a===t.headRefName||xW.test(a)&&t.headRefOid.toLowerCase().startsWith(a.toLowerCase()))&&e.lines?{side:`RIGHT`,...e.lines}:null}}}return null}async function TW(e){let t=new TextEncoder,n=await Promise.all(e.map(async e=>{let n=await crypto.subtle.digest(`SHA-256`,t.encode(e));return[[...new Uint8Array(n)].map(e=>e.toString(16).padStart(2,`0`)).join(``),e]}));return new Map(n)}function EW(e,t,n){if(t.length===0&&n.length===0)return e;let r=new Map(t.map(e=>[e.path,e.viewed])),i=new Set(e.seenHunks);for(let e of n)for(let t of e.hunks){let n=`${t.path}\n${t.hash}`;e.seen?i.add(n):i.delete(n)}return{...e,files:e.files.map(e=>{let t=r.get(e.path);return t===void 0?e:{...e,viewed:t?`VIEWED`:`UNVIEWED`}}),seenHunks:[...i]}}function DW(e){let t=zI(),n=aC({from:`/$owner/$repo/pull/$number`}),[r,i]=(0,C.useState)(!1),[a,o]=(0,C.useState)(null),s=t.detail.commits,c=t.detail.pr.headRefOid,l=t.detail.myReview?.commitOid??null,u=e.visitHead!==null&&!LI(t.detail,e.visitHead),d=l!==null&&!LI(t.detail,l),f=e=>{n({search:t=>({...t,range:e})}),i(!1)},p=new Set;if(t.range.kind===`commits`){let e=s.findIndex(e=>e.parentOid===t.range.base),n=s.findIndex(e=>e.oid===t.range.head);if(e!==-1&&n>=e)for(let t of s.slice(e,n+1))p.add(t.oid)}let m=(e,t,n,r=!1)=>(0,G.jsx)(jh,{value:e,disabled:r,label:(0,G.jsxs)(X,{gap:8,justify:`space-between`,wrap:`nowrap`,w:380,children:[(0,G.jsx)(Z,{size:`sm`,children:t}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:n})]})},e);return(0,G.jsxs)(vl,{opened:r,onChange:i,position:`bottom-start`,shadow:`lg`,width:460,trapFocus:!0,children:[(0,G.jsx)(vl.Target,{children:(0,G.jsxs)(Fp,{size:`compact-sm`,variant:`light`,onClick:()=>i(e=>!e),rightSection:`▾`,children:[`Plage : `,t.range.label]})}),(0,G.jsxs)(vl.Dropdown,{p:`sm`,children:[(0,G.jsx)(Z,{size:`xs`,tt:`uppercase`,fw:600,c:`dimmed`,mb:6,children:`Plage de comparaison`}),(0,G.jsx)(jh.Group,{value:t.range.kind===`commits`?``:t.range.kind,onChange:f,children:(0,G.jsxs)(tg,{gap:8,children:[m(`all`,`Tous les changements`,`${s.length} commits · ${t.detail.files.length} fichiers`),m(`visit`,`Depuis ma dernière visite`,e.visitAt?e.visitHead===c?`aucun nouveau commit`:u?`branche rebasée depuis`:new Date(e.visitAt).toLocaleString(`fr`):`jamais visitée`,!e.visitAt||e.visitHead===c||u),m(`review`,`Depuis ma dernière review`,l?l===c?`à jour`:d?`branche rebasée depuis`:l.slice(0,7):`jamais reviewée`,!l||l===c||d)]})}),(0,G.jsx)(rm,{my:`sm`}),(0,G.jsx)(Z,{size:`xs`,tt:`uppercase`,fw:600,c:`dimmed`,mb:6,children:`Commits (clic : un commit · Maj+clic : intervalle)`}),(0,G.jsx)(tg,{gap:2,mah:320,style:{overflow:`auto`},children:s.map((e,t)=>(0,G.jsxs)(X,{gap:8,wrap:`nowrap`,px:4,py:2,style:{cursor:`pointer`,borderRadius:4,background:e.seen?void 0:`rgba(255,146,43,.08)`},onClick:e=>{let n=e.shiftKey&&a!==null?Math.min(a,t):t,r=e.shiftKey&&a!==null?Math.max(a,t):t;o(t);let i=s[n],c=s[r];i.parentOid&&f(`${i.parentOid}..${c.oid}`)},children:[(0,G.jsx)(ip,{size:`xs`,readOnly:!0,checked:p.has(e.oid)}),(0,G.jsx)(Z,{ff:`monospace`,size:`xs`,c:`dimmed`,children:e.shortOid}),(0,G.jsx)(Z,{size:`sm`,truncate:!0,style:{flex:1},children:e.headline}),!e.seen&&(0,G.jsx)(Ep,{size:`xs`,color:`orange`,variant:`light`,children:`nouveau`}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,children:UD(e.date)})]},e.oid))}),(0,G.jsx)(Z,{size:`xs`,c:`dimmed`,mt:`sm`,children:`Hors « tous les changements », seuls les commentaires côté nouveau code sont possibles (numéros de ligne de la PR).`})]})]})}function OW(e){let t=zI(),n=iL(t.ref),[r,i]=(0,C.useState)(``),a=t.detail.pr.author?.login===t.me,[o,s]=(0,C.useState)(`COMMENT`),c=t.detail.pendingReview,l=async()=>{await n.submitReview.mutateAsync({prId:t.detail.pr.id,pendingReviewId:c?.id??null,event:o,body:r}),i(``),e.onChange(!1)};return(0,G.jsxs)(vl,{opened:e.opened,onChange:e.onChange,position:`bottom-end`,shadow:`lg`,width:400,trapFocus:!0,children:[(0,G.jsx)(vl.Target,{children:(0,G.jsx)(Fp,{size:`compact-sm`,onClick:()=>e.onChange(!e.opened),rightSection:(0,G.jsx)(Em,{size:`xs`,children:`⇧S`}),children:c?`Soumettre la review (${c.comments})`:`Review`})}),(0,G.jsxs)(vl.Dropdown,{children:[(0,G.jsx)(Z,{fw:600,mb:6,children:c?`Review en attente · ${c.comments} commentaire${c.comments>1?`s`:``}`:`Nouvelle review`}),(0,G.jsx)(Cm,{autosize:!0,minRows:3,placeholder:`Résumé (optionnel)`,value:r,onChange:e=>i(e.currentTarget.value),onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&l()}}),(0,G.jsx)(jh.Group,{value:o,onChange:e=>s(e),my:`sm`,children:(0,G.jsxs)(tg,{gap:6,children:[(0,G.jsx)(jh,{value:`COMMENT`,label:`Commenter`}),(0,G.jsx)(Gh,{label:`Impossible d’approuver sa propre PR`,disabled:!a,children:(0,G.jsx)(jh,{value:`APPROVE`,label:`Approuver`,disabled:a})}),(0,G.jsx)(Gh,{label:`Impossible sur sa propre PR`,disabled:!a,children:(0,G.jsx)(jh,{value:`REQUEST_CHANGES`,label:`Demander des changements`,disabled:a})})]})}),(0,G.jsxs)(X,{justify:`flex-end`,gap:6,children:[c&&(0,G.jsx)(Fp,{size:`compact-sm`,variant:`subtle`,color:`red`,loading:n.discardReview.isPending,onClick:()=>n.discardReview.mutate({reviewId:c.id}),children:`Abandonner la review`}),(0,G.jsx)(Fp,{size:`compact-sm`,color:o===`APPROVE`?`green`:o===`REQUEST_CHANGES`?`red`:`blue`,loading:n.submitReview.isPending,disabled:!c&&o===`COMMENT`&&r.trim()===``,onClick:()=>void l(),children:`Soumettre`})]})]})]})}function kW(e){let t=zI(),{pr:n,reviewers:r,requestedTeams:i}=t.detail;return(0,G.jsxs)(`div`,{className:`pr-head`,children:[(0,G.jsxs)(X,{gap:8,wrap:`nowrap`,align:`baseline`,children:[(0,G.jsxs)(Rg,{order:3,fw:600,style:{minWidth:0},lineClamp:1,children:[n.title,` `,(0,G.jsxs)(Z,{span:!0,c:`dimmed`,fw:400,inherit:!0,children:[n.owner,`/`,n.repo,` #`,n.number]})]}),(0,G.jsx)(tf,{href:n.url,target:`_blank`,size:`sm`,c:`dimmed`,style:{whiteSpace:`nowrap`},children:`GitHub ↗`})]}),(0,G.jsxs)(X,{gap:8,mt:4,wrap:`wrap`,children:[(0,G.jsx)(Ep,{color:n.state===`OPEN`?n.isDraft?`gray`:`green`:n.state===`MERGED`?`violet`:`red`,variant:`light`,children:n.isDraft?`Brouillon`:n.state===`OPEN`?`Ouverte`:n.state===`MERGED`?`Mergée`:`Fermée`}),(0,G.jsx)(Cp,{src:n.author?.avatarUrl,size:20}),(0,G.jsxs)(Z,{size:`sm`,c:`dimmed`,children:[n.author?.login??`ghost`,` · `,t.detail.commits.length,` commits de`,` `,(0,G.jsx)(Z,{span:!0,ff:`monospace`,c:`blue.4`,inherit:!0,children:n.headRefName}),` `,`vers`,` `,(0,G.jsx)(Z,{span:!0,ff:`monospace`,c:`blue.4`,inherit:!0,children:n.baseRefName}),` `,`· ouverte `,UD(n.createdAt)]}),(0,G.jsx)(MW,{}),n.mergeable===`CONFLICTING`&&(0,G.jsx)(Ep,{color:`red`,variant:`light`,children:`conflits`}),r.map(e=>(0,G.jsxs)(Ep,{variant:`outline`,color:GD[e.state]?.color??`gray`,leftSection:(0,G.jsx)(Cp,{src:e.avatarUrl,size:14}),children:[e.login,` : `,GD[e.state]?.label??e.state]},e.login)),i.map(e=>(0,G.jsxs)(Ep,{variant:`outline`,color:`yellow`,children:[`@`,e,` : demandé`]},e))]}),(0,G.jsxs)(`div`,{className:`pr-bar`,children:[(0,G.jsx)(DW,{visitAt:e.visitAt,visitHead:e.visitHead}),e.children]})]})}var AW=15e3,jW={failure:{label:`En échec`,color:`red`},pending:{label:`En cours`,color:`yellow`},success:{label:`Réussis`,color:`green`},skipped:{label:`Ignorés`,color:`gray`}};function MW(){let e=zI(),t=dy(ED().pr.checks.queryOptions(e.ref,{refetchInterval:e=>e.state.data?.checks.some(e=>e.outcome===`pending`)?AW:!1})).data;if(!t||t.checks.length===0)return null;let n=e=>t.checks.filter(t=>t.outcome===e),r=n(`failure`),i=n(`pending`),a=t.checks.length-i.length,o=r.length===1?`✕ CI : ${r[0].name}`:r.length>1?`✕ CI : ${r.length} en échec`:i.length>0?`● CI en cours ${a}/${t.checks.length}`:`✓ CI ok · ${t.checks.length}`;return(0,G.jsxs)(vl,{position:`bottom-start`,shadow:`md`,width:440,children:[(0,G.jsx)(vl.Target,{children:(0,G.jsxs)(Ep,{color:r.length>0?`red`:i.length>0?`yellow`:`green`,variant:r.length>0?`filled`:`light`,style:{cursor:`pointer`,textTransform:`none`,maxWidth:420},title:r.length>0?`${r.length} check(s) en échec`:void 0,children:[o,r.length>0&&i.length>0?` · ${i.length} en cours`:``]})}),(0,G.jsx)(vl.Dropdown,{mah:420,style:{overflowY:`auto`},children:(0,G.jsx)(tg,{gap:8,children:[`failure`,`pending`,`success`,`skipped`].map(e=>{let t=n(e);if(t.length===0)return null;let a=e===`failure`||e===`pending`||r.length+i.length===0;return(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(Z,{size:`xs`,fw:600,c:`${jW[e].color}.4`,mb:2,children:[jW[e].label,` · `,t.length]}),a&&t.map(t=>(0,G.jsxs)(`div`,{className:`check-row`,children:[t.url?(0,G.jsx)(tf,{href:t.url,target:`_blank`,size:`sm`,truncate:!0,children:t.name}):(0,G.jsx)(Z,{size:`sm`,truncate:!0,children:t.name}),(t.summary||e===`failure`)&&(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,truncate:!0,children:[t.state,t.summary?` · ${t.summary}`:``]})]},t.name))]},e)})})})]})}function NW(){let e=GW.useParams(),t=(0,C.useMemo)(()=>({owner:e.owner,repo:e.repo,number:Number(e.number)}),[e.owner,e.repo,e.number]),n=ED(),r=W_(),i=dy(n.pr.get.queryOptions(t)),a=hy({filters:{mutationKey:n.pr.setFileViewed.mutationKey(),status:`pending`},select:e=>e.state.variables}),o=hy({filters:{mutationKey:n.pr.setHunksSeen.mutationKey(),status:`pending`},select:e=>e.state.variables}),s=(0,C.useMemo)(()=>i.data&&EW(i.data,a,o),[i.data,a,o]);return xD(n.pr.onChange.subscriptionOptions(t,{onData:()=>{r.invalidateQueries({queryKey:n.pr.get.queryKey(t)}),r.invalidateQueries({queryKey:n.pr.checks.queryKey(t)})}})),i.isPending?(0,G.jsx)(Rp,{style:{flex:1},children:(0,G.jsx)(El,{})}):i.isError?(0,G.jsx)(Jd,{color:`red`,m:`lg`,title:`PR introuvable ou inaccessible`,children:i.error.message}):(0,G.jsx)(FW,{ref_:t,detail:s},`${t.owner}/${t.repo}#${t.number}`)}function PW(e,t,n){let{baseRefOid:r,headRefOid:i}=t.pr,a={kind:`all`,base:r,head:i,fullPr:!0,label:`Tous les changements`};if(e===`visit`&&n&&n!==i&&LI(t,n))return{kind:`visit`,base:n,head:i,fullPr:!1,label:`Depuis ma dernière visite`};let o=t.myReview?.commitOid;if(e===`review`&&o&&o!==i&&LI(t,o))return{kind:`review`,base:o,head:i,fullPr:!1,label:`Depuis ma dernière review`};let s=/^([0-9a-f]{7,40})\.\.([0-9a-f]{7,40})$/.exec(e);if(s){let[,e,n]=s,r=t.commits.find(t=>t.parentOid===e),i=t.commits.find(e=>e.oid===n);return{kind:`commits`,base:e,head:n,fullPr:!1,label:r&&i&&r.oid===i.oid?`Commit ${i.shortOid}`:`Commits ${r?.shortOid??e.slice(0,7)}…${i?.shortOid??n.slice(0,7)}`}}return a}function FW({ref_:e,detail:t}){let n=ED(),r=aC({from:`/$owner/$repo/pull/$number`}),i=GW.useSearch(),a=iL(e),[o]=(0,C.useState)(()=>Date.now()),[s]=(0,C.useState)(()=>t.pr.headRefOid),[c,l]=Ge({key:`br:layout`,defaultValue:`split`}),[u,d]=Ge({key:`br:panel`,defaultValue:!0}),[f,p]=Ge({key:`br:panelTab`,defaultValue:`conversations`}),m=e=>{u&&f===e?d(!1):(p(e),d(!0))},[h,g]=Ge({key:`br:tree`,defaultValue:!0}),[_,v]=Ge({key:`br:nav`,defaultValue:`tree`}),y=_===`list`||_===`links`||_===`intent`?_:`tree`,[b,x]=Ge({key:`br:navSort`,defaultValue:`name`}),[S]=Ge({key:`br:linksMentions`,defaultValue:!0}),[w,T]=(0,C.useState)(null),[E,D]=(0,C.useState)(null),[O,k]=(0,C.useState)(null),[A,j]=(0,C.useState)(new Set),[M,N]=(0,C.useState)({fileIdx:null,hunkIdx:null}),[ee,P]=(0,C.useState)(!1),[F,I]=(0,C.useState)(!1),L=(0,C.useRef)(null),[R,te]=(0,C.useState)(null),ne=t.pr.headRefOid,re=t.visits.find(e=>e.visitedAt<o)??null,ie=re?.headOid??null,ae=PW(i.range??`all`,t,ie),oe=i.mode??`continuous`,se=dy({...n.pr.diff.queryOptions({ref:e,base:ae.base,head:ae.head,fullPr:ae.fullPr}),staleTime:1/0}),ce=t.pr.state===`OPEN`,le=dy({...n.pr.diff.queryOptions({ref:e,base:t.pr.baseRefOid,head:ne,fullPr:!0}),staleTime:1/0,enabled:ce}),z=(0,C.useMemo)(()=>ce&&le.data?JR(le.data.files):null,[ce,le.data]),B=dy({...n.pr.links.queryOptions({ref:e,base:ae.base,head:ae.head,fullPr:ae.fullPr}),staleTime:1/0,enabled:y===`links`||y===`intent`}),V=Xz(e,ae,y===`intent`),ue=V.progress.done?V.progress.intents:null,H=(0,C.useMemo)(()=>{let e=se.data?.files??[],t=new Map(e.map(e=>[e.path,e])),n=e.map(e=>e.path),r;if(y===`list`||y===`tree`)r=Mz(e,y,b);else if(y===`intent`&&ue){let e=(B.data?.edges??[]).filter(e=>S||e.kind===`import`);r=Uz(n,ue,e)}else if(B.data){let e=B.data.edges.filter(e=>S||e.kind===`import`);r=B.data.packages.length>0?FI(B.data.packages.map(e=>({items:e.files})),n,e):PI(n,e)}else return e;return r.flatMap(e=>t.get(e)??[])},[se.data,y,b,B.data,S,ue]),de=(0,C.useMemo)(()=>t.files.map(e=>e.path),[t.files]),fe=dy({queryKey:[`pathHashes`,de],queryFn:()=>TW(de),staleTime:1/0}),pe=n=>{let r=SW(n);return!r||!fe.data?null:wW(r,{...e,headRefOid:ne,headRefName:t.pr.headRefName,files:de,pathByHash:fe.data,threads:t.threads,commits:t.commits})},me=a.visit.mutate,he=(0,C.useRef)(!1);(0,C.useEffect)(()=>{he.current||(he.current=!0,me({ref:e,headOid:ne,commitOids:t.commits.map(e=>e.oid)}))},[me,e,ne,t.commits]);let ge=(0,C.useMemo)(()=>new Set(t.seenHunks),[t.seenHunks]),_e=(0,C.useMemo)(()=>{let e=new Map(t.files.map(e=>[e.path,e.viewed]));return H.map(n=>{let r=t.threads.filter(e=>e.path===n.path&&!e.isResolved);return{path:n.path,additions:n.additions,deletions:n.deletions,state:fz(n,e.get(n.path),ge).state,openThreads:r.length,unreadThreads:r.filter(e=>e.unread>0).length}})},[H,t.files,t.threads,ge]),ve=oe===`focus`?H.find(e=>e.path===i.file)??H.find(e=>t.files.find(t=>t.path===e.path)?.viewed!==`VIEWED`)??H[0]??null:null,ye=oe===`focus`?ve?.path??null:H[M.fileIdx??-1]?.path??null,U=`${ae.base}..${ae.head}`,be=e=>{k(e);let n=t.threads.find(t=>t.id===e);oe===`focus`&&n&&n.path!==ve?.path&&H.some(e=>e.path===n.path)?(r({search:e=>({...e,file:n.path})}),requestAnimationFrame(()=>L.current?.scrollToThread(e))):L.current?.scrollToThread(e)},xe=(0,C.useEffectEvent)(e=>{let t=()=>void r({search:({goto:e,...t})=>t,replace:!0}),n=e=>void r({search:t=>({...t,...e}),replace:!0}),a=pe(e);if(!a||a.kind===`pr`)return t();if(a.kind===`otherPr`){let{owner:t,repo:n,number:i}=a;r({to:`/$owner/$repo/pull/$number`,params:{owner:t,repo:n,number:String(i)},search:{goto:e},replace:!0});return}if(a.kind===`thread`){let e=a.threadId;requestAnimationFrame(()=>{if(oe!==`focus`&&!L.current?.scrollToThread(e)&&ae.kind!==`all`)return n({range:`all`});be(e),t()});return}let o;if(a.kind===`commit`){if(i.range!==a.range)return n({range:a.range});o=a.file}else o=a.file;if(!o)return t();let s=o;if(!H.some(e=>e.path===s.path))return a.kind===`file`&&ae.kind!==`all`?n({range:`all`}):t();if(oe===`focus`&&ve?.path!==s.path)return n({file:s.path});requestAnimationFrame(()=>{if(A.has(s.path)){j(e=>new Set([...e].filter(e=>e!==s.path)));return}let e=s.lines;if(e&&L.current?.scrollToLine(s.path,e.side,e.start))te({range:U,lines:{path:s.path,...e}});else if(e&&a.kind===`file`&&ae.kind!==`all`)return n({range:`all`});else L.current?.scrollToFile(s.path),te(null);t()})}),Se=se.data!==void 0&&fe.data!==void 0;(0,C.useEffect)(()=>{i.goto&&Se&&xe(i.goto)},[i.goto,Se,U,A,ve?.path,oe]);let Ce={ref:e,detail:t,diff:se.data??null,me:t.viewer.login,range:ae,layout:c,mode:oe,pendingReviewId:t.pendingReview?.id??null,seenHunks:ge,selection:w,setSelection:e=>{T(e),e&&D(null)},fileComposer:E,setFileComposer:e=>{D(e),e&&T(null)},focusedThread:O,setFocusedThread:k,commentHunk:(e,t,n)=>ae.head!==ne||t===`LEFT`&&!ae.fullPr?null:z?.get(e)?.[t].get(n)??null,canCommentFile:e=>z?.has(e)??!1,scrollToThread:be,scrollToFile:e=>{oe===`focus`?r({search:t=>({...t,file:e})}):L.current?.scrollToFile(e)},linkTarget:R?.range===U?R.lines:null,onMarkdownClick:e=>{let t=e.target instanceof Element?e.target.closest(`a[href]`):null;if(!(t instanceof HTMLAnchorElement)||e.defaultPrevented||t.origin===window.location.origin||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;e.preventDefault();let n=pe(t.href);if(!n)window.open(t.href,`_blank`,`noopener`);else if(n.kind===`otherPr`){let{owner:e,repo:i,number:a}=n;r({to:`/$owner/$repo/pull/$number`,params:{owner:e,repo:i,number:String(a)},search:{goto:t.href}})}else r({search:e=>({...e,goto:t.href})})},advanceFrom:e=>{if(oe===`focus`){let n=IW(H,t,e);n&&r({search:e=>({...e,file:n.path})});return}let n=H[H.findIndex(t=>t.path===e)+1];n&&L.current?.scrollToFile(n.path)}},we=t.files.filter(e=>e.viewed===`VIEWED`).length,Te=H.reduce((e,t)=>e+t.hunks.length,0),Ee=H.reduce((e,t)=>e+t.hunks.filter(e=>ge.has(`${t.path}\n${e.hash}`)).length,0);return(0,G.jsx)(RI,{value:Ce,children:(0,G.jsxs)(`div`,{className:`pr-page`,children:[(0,G.jsxs)(kW,{visitAt:re?.visitedAt??null,visitHead:ie,children:[(0,G.jsx)(Yh,{size:`xs`,value:oe,onChange:e=>void r({search:t=>({...t,mode:e===`focus`?`focus`:`continuous`})}),data:[{value:`continuous`,label:`Continu`},{value:`focus`,label:`Focus`}]}),(0,G.jsx)(Yh,{size:`xs`,value:c,onChange:e=>l(e===`unified`?`unified`:`split`),data:[{value:`split`,label:`Côte à côte`},{value:`unified`,label:`Unifié`}]}),(0,G.jsx)(`div`,{style:{flex:1}}),(0,G.jsx)(Gh,{label:`${Ee}/${Te} hunks vus dans la plage`,children:(0,G.jsxs)(X,{gap:6,children:[(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`Vu `,we,`/`,t.files.length,` fichiers`]}),(0,G.jsx)(gh,{w:90,size:`sm`,color:`green`,value:t.files.length?we/t.files.length*100:0})]})}),(0,G.jsx)(Fp,{size:`compact-sm`,variant:h?`light`:`default`,onClick:()=>g(!h),children:`Fichiers`}),(0,G.jsx)(Fp,{size:`compact-sm`,variant:u&&f===`description`?`light`:`default`,onClick:()=>m(`description`),children:`Description`}),(0,G.jsxs)(Fp,{size:`compact-sm`,variant:u&&f===`conversations`?`light`:`default`,onClick:()=>m(`conversations`),children:[`Conversations `,t.threads.filter(e=>!e.isResolved).length]}),(0,G.jsx)(Fp,{size:`compact-sm`,variant:u&&f===`neighbors`?`light`:`default`,onClick:()=>m(`neighbors`),children:`Voisinage`}),(0,G.jsx)(OW,{opened:ee,onChange:P})]}),s!==ne&&ae.base!==s&&(0,G.jsx)(Jd,{color:`orange`,variant:`light`,radius:0,py:6,children:(0,G.jsxs)(X,{gap:`sm`,children:[(0,G.jsx)(Z,{size:`sm`,children:`Nouveaux commits poussés pendant votre lecture.`}),(0,G.jsx)(Fp,{size:`compact-xs`,variant:`light`,color:`orange`,onClick:()=>void r({search:e=>({...e,range:`${s}..${ne}`})}),children:`Voir uniquement ces changements`})]})}),oe===`focus`&&ve&&(0,G.jsx)(LW,{files:H,current:ve}),(0,G.jsxs)(`div`,{className:`pr-body`,"data-tree":h?`open`:`closed`,"data-panel":u?`open`:`closed`,children:[h&&(0,G.jsx)(`aside`,{className:`pr-tree`,children:(0,G.jsx)(bW,{stats:_e,nav:y,onNavChange:v,sort:b,onSortChange:x,currentPath:ye,onSelect:Ce.scrollToFile,intents:V})}),(0,G.jsxs)(`main`,{style:{minWidth:0,minHeight:0},children:[se.isPending&&(0,G.jsx)(Rp,{h:`100%`,children:(0,G.jsx)(El,{})}),se.isError&&(0,G.jsxs)(Jd,{color:`red`,m:`md`,title:`Diff indisponible pour cette plage`,children:[se.error.message,(0,G.jsx)(Fp,{mt:`sm`,size:`xs`,onClick:()=>void r({search:e=>({...e,range:`all`})}),children:`Revenir à tous les changements`})]}),se.data&&(0,G.jsx)(Ez,{files:H,onlyFile:ve?.path??null,collapsed:A,onToggleCollapse:e=>j(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),onCurrentChange:(e,t)=>N({fileIdx:e,hunkIdx:t}),handleRef:L})]}),u&&(0,G.jsxs)(`aside`,{className:`pr-panel`,children:[(0,G.jsx)(Yh,{className:`panel-tabs`,size:`xs`,fullWidth:!0,value:f,onChange:e=>p(e===`description`||e===`neighbors`?e:`conversations`),data:[{value:`conversations`,label:`Conversations ${t.threads.filter(e=>!e.isResolved).length}`},{value:`description`,label:`Description`},{value:`neighbors`,label:`Voisinage`}]}),(0,G.jsx)(`div`,{className:`panel-scroll`,children:f===`description`?(0,G.jsx)(sL,{}):f===`neighbors`?(0,G.jsx)(uW,{stats:_e,currentPath:ye,onSelect:Ce.scrollToFile}):(0,G.jsx)(oL,{})})]})]}),(0,G.jsx)(RW,{files:H,focusFile:ve,current:M,listRef:L,onToggleReview:()=>P(e=>!e),onToggleConversations:()=>m(`conversations`),onToggleDescription:()=>m(`description`),onToggleTree:()=>g(!h),onToggleLayout:()=>l(c===`split`?`unified`:`split`),onHelp:()=>I(!0)}),(0,G.jsx)(BW,{opened:F,onClose:()=>I(!1)})]})})}function IW(e,t,n){let r=e.findIndex(e=>e.path===n);return[...e.slice(r+1),...e.slice(0,r)].find(e=>t.files.find(t=>t.path===e.path)?.viewed!==`VIEWED`)}function LW({files:e,current:t}){let n=aC({from:`/$owner/$repo/pull/$number`}),r=hz(),i=zI(),a=e.indexOf(t),o=e=>e&&void n({search:t=>({...t,file:e.path})}),s=e.filter(e=>i.detail.files.find(t=>t.path===e.path)?.viewed!==`VIEWED`).length;return(0,G.jsxs)(X,{className:`focus-bar`,gap:`sm`,px:`md`,py:6,children:[(0,G.jsxs)(Fp,{size:`compact-xs`,variant:`default`,onClick:()=>o(e[a-1]),disabled:a<=0,children:[`←`,` `,(0,G.jsx)(Em,{size:`xs`,ml:4,children:`k`})]}),(0,G.jsx)(Z,{ff:`monospace`,fw:600,size:`sm`,children:t.path}),(0,G.jsxs)(Z,{size:`xs`,c:`dimmed`,children:[`fichier `,a+1,`/`,e.length,` · `,s,` non vu`,s>1?`s`:``]}),(0,G.jsx)(`div`,{style:{flex:1}}),(0,G.jsx)(`div`,{className:`steps`,children:e.map(e=>{let n=i.detail.files.find(t=>t.path===e.path)?.viewed;return(0,G.jsx)(`i`,{title:e.path,"data-state":e===t?`current`:n===`VIEWED`?`viewed`:`none`,onClick:()=>o(e)},e.path)})}),(0,G.jsx)(Fp,{size:`compact-xs`,color:`green`,onClick:()=>{r.toggleFile(t,!0),i.advanceFrom(t.path)},rightSection:(0,G.jsx)(Em,{size:`xs`,children:`v`}),children:`✓ Vu, suivant non vu`}),(0,G.jsxs)(Fp,{size:`compact-xs`,variant:`default`,onClick:()=>o(e[a+1]),disabled:a>=e.length-1,children:[(0,G.jsx)(Em,{size:`xs`,mr:4,children:`j`}),` `,`→`]})]})}function RW(e){let t=zI(),n=iL(t.ref),r=hz(),i=aC({from:`/$owner/$repo/pull/$number`}),{files:a,focusFile:o,listRef:s}=e,c=o??a[e.current.fileIdx??-1]??null,l=c&&e.current.hunkIdx!==null?c.hunks[e.current.hunkIdx]:void 0,u=e=>{if(o){let t=a[a.indexOf(o)+e];t&&i({search:e=>({...e,file:t.path})})}else s.current?.step(`file`,e)},d=t.detail.threads.find(e=>e.id===t.focusedThread);return lt([[`j`,()=>u(1)],[`k`,()=>u(-1)],[`n`,()=>s.current?.step(`hunk`,1)],[`p`,()=>s.current?.step(`hunk`,-1)],[`]`,()=>s.current?.step(`thread`,1)],[`v`,()=>{if(!c)return;let e=t.detail.files.find(e=>e.path===c.path)?.viewed===`VIEWED`;r.toggleFile(c,!e),e||t.advanceFrom(c.path)}],[`h`,()=>{c&&l&&(r.toggleHunk(c,l,!t.seenHunks.has(`${c.path}\n${l.hash}`)),s.current?.step(`hunk`,1))}],[`r`,()=>{document.querySelector(`[data-thread="${t.focusedThread}"] [data-reply]`)?.click()}],[`x`,()=>d&&(d.isResolved?d.canUnresolve:d.canResolve)&&n.setResolved.mutate({threadId:d.id,resolved:!d.isResolved})],[`m`,()=>void i({search:e=>({...e,mode:t.mode===`focus`?`continuous`:`focus`})})],[`u`,e.onToggleLayout],[`t`,e.onToggleConversations],[`d`,e.onToggleDescription],[`f`,e.onToggleTree],[`shift+S`,e.onToggleReview],[`i`,()=>void i({to:`/`})],[`Escape`,()=>{t.setSelection(null),t.setFileComposer(null)}],[`shift+?`,e.onHelp]]),(0,G.jsxs)(`div`,{className:`statusbar`,children:[(0,G.jsxs)(`span`,{children:[(0,G.jsx)(Em,{size:`xs`,children:`j`}),`/`,(0,G.jsx)(Em,{size:`xs`,children:`k`}),` fichier`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(Em,{size:`xs`,children:`n`}),`/`,(0,G.jsx)(Em,{size:`xs`,children:`p`}),` hunk`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(Em,{size:`xs`,children:`]`}),`/`,(0,G.jsx)(Em,{size:`xs`,children:`[`}),` thread ouvert`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(Em,{size:`xs`,children:`v`}),` fichier vu · `,(0,G.jsx)(Em,{size:`xs`,children:`h`}),` hunk vu`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(Em,{size:`xs`,children:`r`}),` répondre · `,(0,G.jsx)(Em,{size:`xs`,children:`x`}),` résoudre`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(Em,{size:`xs`,children:`?`}),` aide`]}),(0,G.jsx)(`div`,{style:{flex:1}}),(0,G.jsxs)(`span`,{children:[c?c.path:``,c&&l?` · hunk ${(e.current.hunkIdx??0)+1}/${c.hunks.length}`:``]})]})}var zW=[[`j / k`,`fichier suivant / précédent`],[`n / p`,`hunk suivant / précédent`],[`] / [`,`thread non résolu suivant / précédent`],[`v`,`marquer le fichier vu, puis fichier suivant (focus : fichier non vu suivant)`],[`h`,`marquer le hunk courant vu, puis hunk suivant`],[`r`,`répondre au thread sélectionné`],[`x`,`résoudre / rouvrir le thread sélectionné`],[`clic n° de ligne`,`commenter (Maj+clic : plage)`],[`m`,`mode continu / focus`],[`u`,`côte à côte / unifié`],[`t`,`panneau conversations`],[`d`,`description de la PR`],[`f`,`arbre des fichiers`],[`Maj+S`,`soumettre la review`],[`i`,`retour à l’inbox`],[`Ctrl+K`,`aller à une PR`],[`Échap`,`fermer le commentaire en cours`]];function BW(e){return(0,G.jsx)(Xm,{opened:e.opened,onClose:e.onClose,title:`Raccourcis clavier`,size:`md`,children:(0,G.jsx)(bg,{children:(0,G.jsx)(bg.Tbody,{children:zW.map(([e,t])=>(0,G.jsxs)(bg.Tr,{children:[(0,G.jsx)(bg.Td,{children:(0,G.jsx)(Em,{children:e})}),(0,G.jsx)(bg.Td,{children:t})]},e))})})})}function VW(){let e=ED(),t=W_(),n=dy(e.config.get.queryOptions()),[r,i]=(0,C.useState)(`repo`),[a,o]=(0,C.useState)(``),s=()=>{t.invalidateQueries({queryKey:e.config.get.queryKey()}),t.invalidateQueries({queryKey:e.inbox.get.queryKey()})},c=gy(e.config.add.mutationOptions({onSuccess:()=>{o(``),s()},onError:e=>t_.show({color:`red`,title:`Ajout impossible`,message:e.message})})),l=gy(e.config.remove.mutationOptions({onSuccess:s})),u=[...n.data?.orgs.map(e=>({kind:`org`,name:e}))??[],...n.data?.repos.map(e=>({kind:`repo`,name:e}))??[]];return(0,G.jsxs)(Zp,{size:`sm`,py:`xl`,children:[(0,G.jsx)(Rg,{order:2,mb:`xs`,children:`Repos et orgs suivis`}),(0,G.jsx)(Z,{c:`dimmed`,size:`sm`,mb:`lg`,children:`L’inbox ne montre que les PR de cette liste. Une org (ou un compte) suivie inclut tous ses repos. Le fichier de config peut aussi être édité à la main : les modifications sont prises en compte à chaud.`}),(0,G.jsx)(`form`,{onSubmit:e=>{e.preventDefault();let t=a.trim();t&&c.mutate({kind:r,name:t})},children:(0,G.jsxs)(X,{align:`flex-end`,mb:`lg`,children:[(0,G.jsx)(Yh,{value:r,onChange:e=>i(e===`org`?`org`:`repo`),data:[{value:`repo`,label:`Repo`},{value:`org`,label:`Org / compte`}]}),(0,G.jsx)(jg,{style:{flex:1},placeholder:r===`repo`?`owner/repo`:`nom-de-l-org`,value:a,onChange:e=>o(e.currentTarget.value),"data-autofocus":!0}),(0,G.jsx)(Fp,{type:`submit`,loading:c.isPending,children:`Suivre`})]})}),(0,G.jsxs)(tg,{gap:`xs`,children:[u.length===0&&(0,G.jsx)(Z,{c:`dimmed`,children:`Aucun repo suivi pour l’instant.`}),u.map(e=>(0,G.jsx)(Ac,{withBorder:!0,p:`xs`,px:`sm`,children:(0,G.jsxs)(X,{justify:`space-between`,children:[(0,G.jsxs)(X,{gap:`xs`,children:[(0,G.jsx)(Ep,{variant:`light`,color:e.kind===`org`?`violet`:`blue`,children:e.kind===`org`?`org`:`repo`}),(0,G.jsx)(Z,{ff:`monospace`,size:`sm`,children:e.name})]}),(0,G.jsx)(Pl,{variant:`subtle`,color:`red`,"aria-label":`Ne plus suivre ${e.name}`,onClick:()=>l.mutate(e),children:`✕`})]})},`${e.kind}:${e.name}`))]}),(0,G.jsx)(Rg,{order:2,mt:`xl`,mb:`xs`,children:`Modèle de la vue Intention`}),(0,G.jsx)(Fz,{})]})}var HW=TC({component:BD}),UW=CC({getParentRoute:()=>HW,path:`/`,component:tO}),WW=CC({getParentRoute:()=>HW,path:`/settings`,component:VW}),GW=CC({getParentRoute:()=>HW,path:`/$owner/$repo/pull/$number`,validateSearch:e=>({...typeof e.range==`string`?{range:e.range}:{},...e.mode===`focus`||e.mode===`continuous`?{mode:e.mode}:{},...typeof e.file==`string`?{file:e.file}:{},...typeof e.goto==`string`?{goto:e.goto}:{}}),component:NW}),KW=VC({routeTree:HW.addChildren([UW,WW,GW]),defaultPreload:`intent`,scrollRestoration:!1}),qW=Zn({primaryColor:`blue`,defaultRadius:`sm`,fontFamilyMonospace:`ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace`,cursorType:`pointer`});(0,Gw.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(C.StrictMode,{children:(0,G.jsxs)(Xn,{theme:qW,defaultColorScheme:`dark`,forceColorScheme:`dark`,children:[(0,G.jsx)(H_,{position:`bottom-left`,limit:4}),(0,G.jsx)(G_,{client:OD,children:(0,G.jsx)(TD,{trpcClient:kD,queryClient:OD,children:(0,G.jsx)(WC,{router:KW})})})]})}));