wgts-report 0.1.4 → 0.1.7

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.
@@ -1,4 +1,4 @@
1
- var Tv=l=>{throw TypeError(l)};var Qf=(l,i,s)=>i.has(l)||Tv("Cannot "+s);var M=(l,i,s)=>(Qf(l,i,"read from private field"),s?s.call(l):i.get(l)),ue=(l,i,s)=>i.has(l)?Tv("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(l):i.set(l,s),K=(l,i,s,u)=>(Qf(l,i,"write to private field"),u?u.call(l,s):i.set(l,s),s),_e=(l,i,s)=>(Qf(l,i,"access private method"),s);var Qo=(l,i,s,u)=>({set _(c){K(l,i,c,s)},get _(){return M(l,i,u)}});function Ix(l,i){for(var s=0;s<i.length;s++){const u=i[s];if(typeof u!="string"&&!Array.isArray(u)){for(const c in u)if(c!=="default"&&!(c in l)){const f=Object.getOwnPropertyDescriptor(u,c);f&&Object.defineProperty(l,c,f.get?f:{enumerable:!0,get:()=>u[c]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const g of f.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&u(g)}).observe(document,{childList:!0,subtree:!0});function s(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(c){if(c.ep)return;c.ep=!0;const f=s(c);fetch(c.href,f)}})();function Jx(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Yf={exports:{}},Is={};/**
1
+ var Av=n=>{throw TypeError(n)};var Rd=(n,s,i)=>s.has(n)||Av("Cannot "+i);var L=(n,s,i)=>(Rd(n,s,"read from private field"),i?i.call(n):s.get(n)),pe=(n,s,i)=>s.has(n)?Av("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,i),oe=(n,s,i,r)=>(Rd(n,s,"write to private field"),r?r.call(n,i):s.set(n,i),i),De=(n,s,i)=>(Rd(n,s,"access private method"),i);var Cu=(n,s,i,r)=>({set _(u){oe(n,s,u,i)},get _(){return L(n,s,r)}});function a2(n,s){for(var i=0;i<s.length;i++){const r=s[i];if(typeof r!="string"&&!Array.isArray(r)){for(const u in r)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(r,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>r[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(u){if(u.ep)return;u.ep=!0;const d=i(u);fetch(u.href,d)}})();function s2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Td={exports:{}},br={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var Tv=l=>{throw TypeError(l)};var Qf=(l,i,s)=>i.has(l)||Tv("Cannot "+s);var M=(
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Mv;function Px(){if(Mv)return Is;Mv=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(u,c,f){var g=null;if(f!==void 0&&(g=""+f),c.key!==void 0&&(g=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:l,type:u,key:g,ref:c!==void 0?c:null,props:f}}return Is.Fragment=i,Is.jsx=s,Is.jsxs=s,Is}var jv;function Wx(){return jv||(jv=1,Yf.exports=Px()),Yf.exports}var d=Wx(),Xf={exports:{}},he={};/**
9
+ */var Ov;function i2(){if(Ov)return br;Ov=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(r,u,d){var h=null;if(d!==void 0&&(h=""+d),u.key!==void 0&&(h=""+u.key),"key"in u){d={};for(var m in u)m!=="key"&&(d[m]=u[m])}else d=u;return u=d.ref,{$$typeof:n,type:r,key:h,ref:u!==void 0?u:null,props:d}}return br.Fragment=s,br.jsx=i,br.jsxs=i,br}var zv;function r2(){return zv||(zv=1,Td.exports=i2()),Td.exports}var f=r2(),Ad={exports:{}},we={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var Tv=l=>{throw TypeError(l)};var Qf=(l,i,s)=>i.has(l)||Tv("Cannot "+s);var M=(
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Av;function eb(){if(Av)return he;Av=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),g=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),C=Symbol.for("react.view_transition"),R=Symbol.iterator;function _(T){return T===null||typeof T!="object"?null:(T=R&&T[R]||T["@@iterator"],typeof T=="function"?T:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,E={};function U(T,k,ne){this.props=T,this.context=k,this.refs=E,this.updater=ne||O}U.prototype.isReactComponent={},U.prototype.setState=function(T,k){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,k,"setState")},U.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function B(){}B.prototype=U.prototype;function $(T,k,ne){this.props=T,this.context=k,this.refs=E,this.updater=ne||O}var F=$.prototype=new B;F.constructor=$,b(F,U.prototype),F.isPureReactComponent=!0;var P=Array.isArray;function X(){}var Z={H:null,A:null,T:null,S:null},de=Object.prototype.hasOwnProperty;function ve(T,k,ne){var te=ne.ref;return{$$typeof:l,type:T,key:k,ref:te!==void 0?te:null,props:ne}}function Le(T,k){return ve(T.type,k,T.props)}function ge(T){return typeof T=="object"&&T!==null&&T.$$typeof===l}function ie(T){var k={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(ne){return k[ne]})}var qe=/\/+/g;function Qe(T,k){return typeof T=="object"&&T!==null&&T.key!=null?ie(""+T.key):k.toString(36)}function Y(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(X,X):(T.status="pending",T.then(function(k){T.status==="pending"&&(T.status="fulfilled",T.value=k)},function(k){T.status==="pending"&&(T.status="rejected",T.reason=k)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function se(T,k,ne,te,ye){var xe=typeof T;(xe==="undefined"||xe==="boolean")&&(T=null);var Me=!1;if(T===null)Me=!0;else switch(xe){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(T.$$typeof){case l:case i:Me=!0;break;case y:return Me=T._init,se(Me(T._payload),k,ne,te,ye)}}if(Me)return ye=ye(T),Me=te===""?"."+Qe(T,0):te,P(ye)?(ne="",Me!=null&&(ne=Me.replace(qe,"$&/")+"/"),se(ye,k,ne,"",function(an){return an})):ye!=null&&(ge(ye)&&(ye=Le(ye,ne+(ye.key==null||T&&T.key===ye.key?"":(""+ye.key).replace(qe,"$&/")+"/")+Me)),k.push(ye)),1;Me=0;var ee=te===""?".":te+":";if(P(T))for(var oe=0;oe<T.length;oe++)te=T[oe],xe=ee+Qe(te,oe),Me+=se(te,k,ne,xe,ye);else if(oe=_(T),typeof oe=="function")for(T=oe.call(T),oe=0;!(te=T.next()).done;)te=te.value,xe=ee+Qe(te,oe++),Me+=se(te,k,ne,xe,ye);else if(xe==="object"){if(typeof T.then=="function")return se(Y(T),k,ne,te,ye);throw k=String(T),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return Me}function ae(T,k,ne){if(T==null)return T;var te=[],ye=0;return se(T,te,"","",function(xe){return k.call(ne,xe,ye++)}),te}function Ne(T){if(T._status===-1){var k=T._result,ne=k();ne.then(function(te){(T._status===0||T._status===-1)&&(T._status=1,T._result=te,ne.status===void 0&&(ne.status="fulfilled",ne.value=te))},function(te){(T._status===0||T._status===-1)&&(T._status=2,T._result=te,ne.status===void 0&&(ne.status="rejected",ne.reason=te))}),T._status===-1&&(T._status=0,T._result=ne)}if(T._status===1)return T._result.default;throw T._result}var Ee=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)};function mt(T){var k=Z.T,ne={};ne.types=k!==null?k.types:null,Z.T=ne;try{var te=T(),ye=Z.S;ye!==null&&ye(ne,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(X,Ee)}catch(xe){Ee(xe)}finally{k!==null&&ne.types!==null&&(k.types=ne.types),Z.T=k}}function pt(T){var k=Z.T;if(k!==null){var ne=k.types;ne===null?k.types=[T]:ne.indexOf(T)===-1&&ne.push(T)}else mt(pt.bind(null,T))}var Yt={map:ae,forEach:function(T,k,ne){ae(T,function(){k.apply(this,arguments)},ne)},count:function(T){var k=0;return ae(T,function(){k++}),k},toArray:function(T){return ae(T,function(k){return k})||[]},only:function(T){if(!ge(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return he.Activity=x,he.Children=Yt,he.Component=U,he.Fragment=s,he.Profiler=c,he.PureComponent=$,he.StrictMode=u,he.Suspense=v,he.ViewTransition=C,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,he.__COMPILER_RUNTIME={__proto__:null,c:function(T){return Z.H.useMemoCache(T)}},he.addTransitionType=pt,he.cache=function(T){return function(){return T.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(T,k,ne){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var te=b({},T.props),ye=T.key;if(k!=null)for(xe in k.key!==void 0&&(ye=""+k.key),k)!de.call(k,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&k.ref===void 0||(te[xe]=k[xe]);var xe=arguments.length-2;if(xe===1)te.children=ne;else if(1<xe){for(var Me=Array(xe),ee=0;ee<xe;ee++)Me[ee]=arguments[ee+2];te.children=Me}return ve(T.type,ye,te)},he.createContext=function(T){return T={$$typeof:g,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},he.createElement=function(T,k,ne){var te,ye={},xe=null;if(k!=null)for(te in k.key!==void 0&&(xe=""+k.key),k)de.call(k,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ye[te]=k[te]);var Me=arguments.length-2;if(Me===1)ye.children=ne;else if(1<Me){for(var ee=Array(Me),oe=0;oe<Me;oe++)ee[oe]=arguments[oe+2];ye.children=ee}if(T&&T.defaultProps)for(te in Me=T.defaultProps,Me)ye[te]===void 0&&(ye[te]=Me[te]);return ve(T,xe,ye)},he.createRef=function(){return{current:null}},he.forwardRef=function(T){return{$$typeof:m,render:T}},he.isValidElement=ge,he.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:Ne}},he.memo=function(T,k){return{$$typeof:S,type:T,compare:k===void 0?null:k}},he.startTransition=mt,he.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},he.use=function(T){return Z.H.use(T)},he.useActionState=function(T,k,ne){return Z.H.useActionState(T,k,ne)},he.useCallback=function(T,k){return Z.H.useCallback(T,k)},he.useContext=function(T){return Z.H.useContext(T)},he.useDebugValue=function(){},he.useDeferredValue=function(T,k){return Z.H.useDeferredValue(T,k)},he.useEffect=function(T,k){return Z.H.useEffect(T,k)},he.useEffectEvent=function(T){return Z.H.useEffectEvent(T)},he.useId=function(){return Z.H.useId()},he.useImperativeHandle=function(T,k,ne){return Z.H.useImperativeHandle(T,k,ne)},he.useInsertionEffect=function(T,k){return Z.H.useInsertionEffect(T,k)},he.useLayoutEffect=function(T,k){return Z.H.useLayoutEffect(T,k)},he.useMemo=function(T,k){return Z.H.useMemo(T,k)},he.useOptimistic=function(T,k){return Z.H.useOptimistic(T,k)},he.useReducer=function(T,k,ne){return Z.H.useReducer(T,k,ne)},he.useRef=function(T){return Z.H.useRef(T)},he.useState=function(T){return Z.H.useState(T)},he.useSyncExternalStore=function(T,k,ne){return Z.H.useSyncExternalStore(T,k,ne)},he.useTransition=function(){return Z.H.useTransition()},he.version="19.3.1",he}var Ov;function kd(){return Ov||(Ov=1,Xf.exports=eb()),Xf.exports}var j=kd();const tb=Jx(j),nb=Ix({__proto__:null,default:tb},[j]);var Zf={exports:{}},Js={},Kf={exports:{}},If={};/**
17
+ */var Dv;function o2(){if(Dv)return we;Dv=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),w=Symbol.iterator;function C(A){return A===null||typeof A!="object"?null:(A=w&&A[w]||A["@@iterator"],typeof A=="function"?A:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,R={};function j(A,V,W){this.props=A,this.context=V,this.refs=R,this.updater=W||N}j.prototype.isReactComponent={},j.prototype.setState=function(A,V){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,V,"setState")},j.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function F(){}F.prototype=j.prototype;function T(A,V,W){this.props=A,this.context=V,this.refs=R,this.updater=W||N}var H=T.prototype=new F;H.constructor=T,M(H,j.prototype),H.isPureReactComponent=!0;var D=Array.isArray;function z(){}var Y={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function k(A,V,W){var se=W.ref;return{$$typeof:n,type:A,key:V,ref:se!==void 0?se:null,props:W}}function ne(A,V){return k(A.type,V,A.props)}function ie(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function Ce(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(W){return V[W]})}var X=/\/+/g;function ee(A,V){return typeof A=="object"&&A!==null&&A.key!=null?Ce(""+A.key):V.toString(36)}function P(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(z,z):(A.status="pending",A.then(function(V){A.status==="pending"&&(A.status="fulfilled",A.value=V)},function(V){A.status==="pending"&&(A.status="rejected",A.reason=V)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function J(A,V,W,se,he){var ye=typeof A;(ye==="undefined"||ye==="boolean")&&(A=null);var be=!1;if(A===null)be=!0;else switch(ye){case"bigint":case"string":case"number":be=!0;break;case"object":switch(A.$$typeof){case n:case s:be=!0;break;case x:return be=A._init,J(be(A._payload),V,W,se,he)}}if(be)return he=he(A),be=se===""?"."+ee(A,0):se,D(he)?(W="",be!=null&&(W=be.replace(X,"$&/")+"/"),J(he,V,W,"",function(rt){return rt})):he!=null&&(ie(he)&&(he=ne(he,W+(he.key==null||A&&A.key===he.key?"":(""+he.key).replace(X,"$&/")+"/")+be)),V.push(he)),1;be=0;var re=se===""?".":se+":";if(D(A))for(var me=0;me<A.length;me++)se=A[me],ye=re+ee(se,me),be+=J(se,V,W,ye,he);else if(me=C(A),typeof me=="function")for(A=me.call(A),me=0;!(se=A.next()).done;)se=se.value,ye=re+ee(se,me++),be+=J(se,V,W,ye,he);else if(ye==="object"){if(typeof A.then=="function")return J(P(A),V,W,se,he);throw V=String(A),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return be}function ue(A,V,W){if(A==null)return A;var se=[],he=0;return J(A,se,"","",function(ye){return V.call(W,ye,he++)}),se}function Ee(A){if(A._status===-1){var V=A._result,W=V();W.then(function(se){(A._status===0||A._status===-1)&&(A._status=1,A._result=se,W.status===void 0&&(W.status="fulfilled",W.value=se))},function(se){(A._status===0||A._status===-1)&&(A._status=2,A._result=se,W.status===void 0&&(W.status="rejected",W.reason=se))}),A._status===-1&&(A._status=0,A._result=W)}if(A._status===1)return A._result.default;throw A._result}var je=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function $e(A){var V=Y.T,W={};W.types=V!==null?V.types:null,Y.T=W;try{var se=A(),he=Y.S;he!==null&&he(W,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(z,je)}catch(ye){je(ye)}finally{V!==null&&W.types!==null&&(V.types=W.types),Y.T=V}}function Ie(A){var V=Y.T;if(V!==null){var W=V.types;W===null?V.types=[A]:W.indexOf(A)===-1&&W.push(A)}else $e(Ie.bind(null,A))}var We={map:ue,forEach:function(A,V,W){ue(A,function(){V.apply(this,arguments)},W)},count:function(A){var V=0;return ue(A,function(){V++}),V},toArray:function(A){return ue(A,function(V){return V})||[]},only:function(A){if(!ie(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return we.Activity=v,we.Children=We,we.Component=j,we.Fragment=i,we.Profiler=u,we.PureComponent=T,we.StrictMode=r,we.Suspense=p,we.ViewTransition=b,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,we.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Y.H.useMemoCache(A)}},we.addTransitionType=Ie,we.cache=function(A){return function(){return A.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(A,V,W){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var se=M({},A.props),he=A.key;if(V!=null)for(ye in V.key!==void 0&&(he=""+V.key),V)!te.call(V,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&V.ref===void 0||(se[ye]=V[ye]);var ye=arguments.length-2;if(ye===1)se.children=W;else if(1<ye){for(var be=Array(ye),re=0;re<ye;re++)be[re]=arguments[re+2];se.children=be}return k(A.type,he,se)},we.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},we.createElement=function(A,V,W){var se,he={},ye=null;if(V!=null)for(se in V.key!==void 0&&(ye=""+V.key),V)te.call(V,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(he[se]=V[se]);var be=arguments.length-2;if(be===1)he.children=W;else if(1<be){for(var re=Array(be),me=0;me<be;me++)re[me]=arguments[me+2];he.children=re}if(A&&A.defaultProps)for(se in be=A.defaultProps,be)he[se]===void 0&&(he[se]=be[se]);return k(A,ye,he)},we.createRef=function(){return{current:null}},we.forwardRef=function(A){return{$$typeof:m,render:A}},we.isValidElement=ie,we.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:Ee}},we.memo=function(A,V){return{$$typeof:y,type:A,compare:V===void 0?null:V}},we.startTransition=$e,we.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},we.use=function(A){return Y.H.use(A)},we.useActionState=function(A,V,W){return Y.H.useActionState(A,V,W)},we.useCallback=function(A,V){return Y.H.useCallback(A,V)},we.useContext=function(A){return Y.H.useContext(A)},we.useDebugValue=function(){},we.useDeferredValue=function(A,V){return Y.H.useDeferredValue(A,V)},we.useEffect=function(A,V){return Y.H.useEffect(A,V)},we.useEffectEvent=function(A){return Y.H.useEffectEvent(A)},we.useId=function(){return Y.H.useId()},we.useImperativeHandle=function(A,V,W){return Y.H.useImperativeHandle(A,V,W)},we.useInsertionEffect=function(A,V){return Y.H.useInsertionEffect(A,V)},we.useLayoutEffect=function(A,V){return Y.H.useLayoutEffect(A,V)},we.useMemo=function(A,V){return Y.H.useMemo(A,V)},we.useOptimistic=function(A,V){return Y.H.useOptimistic(A,V)},we.useReducer=function(A,V,W){return Y.H.useReducer(A,V,W)},we.useRef=function(A){return Y.H.useRef(A)},we.useState=function(A){return Y.H.useState(A)},we.useSyncExternalStore=function(A,V,W){return Y.H.useSyncExternalStore(A,V,W)},we.useTransition=function(){return Y.H.useTransition()},we.version="19.3.1",we}var Hv;function Ih(){return Hv||(Hv=1,Ad.exports=o2()),Ad.exports}var E=Ih();const u2=s2(E),c2=a2({__proto__:null,default:u2},[E]);var Od={exports:{}},wr={},zd={exports:{}},Dd={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var Tv=l=>{throw TypeError(l)};var Qf=(l,i,s)=>i.has(l)||Tv("Cannot "+s);var M=(
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var zv;function lb(){return zv||(zv=1,(function(l){function i(Y,se){var ae=Y.length;Y.push(se);e:for(;0<ae;){var Ne=ae-1>>>1,Ee=Y[Ne];if(0<c(Ee,se))Y[Ne]=se,Y[ae]=Ee,ae=Ne;else break e}}function s(Y){return Y.length===0?null:Y[0]}function u(Y){if(Y.length===0)return null;var se=Y[0],ae=Y.pop();if(ae!==se){Y[0]=ae;e:for(var Ne=0,Ee=Y.length,mt=Ee>>>1;Ne<mt;){var pt=2*(Ne+1)-1,Yt=Y[pt],T=pt+1,k=Y[T];if(0>c(Yt,ae))T<Ee&&0>c(k,Yt)?(Y[Ne]=k,Y[T]=ae,Ne=T):(Y[Ne]=Yt,Y[pt]=ae,Ne=pt);else if(T<Ee&&0>c(k,ae))Y[Ne]=k,Y[T]=ae,Ne=T;else break e}}return se}function c(Y,se){var ae=Y.sortIndex-se.sortIndex;return ae!==0?ae:Y.id-se.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var g=Date,m=g.now();l.unstable_now=function(){return g.now()-m}}var v=[],S=[],y=1,x=null,C=3,R=!1,_=!1,O=!1,b=!1,E=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function $(Y){for(var se=s(S);se!==null;){if(se.callback===null)u(S);else if(se.startTime<=Y)u(S),se.sortIndex=se.expirationTime,i(v,se);else break;se=s(S)}}function F(Y){if(O=!1,$(Y),!_)if(s(v)!==null)_=!0,P||(P=!0,ge());else{var se=s(S);se!==null&&Qe(F,se.startTime-Y)}}var P=!1,X=-1,Z=5,de=-1;function ve(){return b?!0:!(l.unstable_now()-de<Z)}function Le(){if(b=!1,P){var Y=l.unstable_now();de=Y;var se=!0;try{e:{_=!1,O&&(O=!1,U(X),X=-1),R=!0;var ae=C;try{t:{for($(Y),x=s(v);x!==null&&!(x.expirationTime>Y&&ve());){var Ne=x.callback;if(typeof Ne=="function"){x.callback=null,C=x.priorityLevel;var Ee=Ne(x.expirationTime<=Y);if(Y=l.unstable_now(),typeof Ee=="function"){x.callback=Ee,$(Y),se=!0;break t}x===s(v)&&u(v),$(Y)}else u(v);x=s(v)}if(x!==null)se=!0;else{var mt=s(S);mt!==null&&Qe(F,mt.startTime-Y),se=!1}}break e}finally{x=null,C=ae,R=!1}se=void 0}}finally{se?ge():P=!1}}}var ge;if(typeof B=="function")ge=function(){B(Le)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,qe=ie.port2;ie.port1.onmessage=Le,ge=function(){qe.postMessage(null)}}else ge=function(){E(Le,0)};function Qe(Y,se){X=E(function(){Y(l.unstable_now())},se)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(Y){Y.callback=null},l.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<Y?Math.floor(1e3/Y):5},l.unstable_getCurrentPriorityLevel=function(){return C},l.unstable_next=function(Y){switch(C){case 1:case 2:case 3:var se=3;break;default:se=C}var ae=C;C=se;try{return Y()}finally{C=ae}},l.unstable_requestPaint=function(){b=!0},l.unstable_runWithPriority=function(Y,se){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var ae=C;C=Y;try{return se()}finally{C=ae}},l.unstable_scheduleCallback=function(Y,se,ae){var Ne=l.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ne+ae:Ne):ae=Ne,Y){case 1:var Ee=-1;break;case 2:Ee=250;break;case 5:Ee=1073741823;break;case 4:Ee=1e4;break;default:Ee=5e3}return Ee=ae+Ee,Y={id:y++,callback:se,priorityLevel:Y,startTime:ae,expirationTime:Ee,sortIndex:-1},ae>Ne?(Y.sortIndex=ae,i(S,Y),s(v)===null&&Y===s(S)&&(O?(U(X),X=-1):O=!0,Qe(F,ae-Ne))):(Y.sortIndex=Ee,i(v,Y),_||R||(_=!0,P||(P=!0,ge()))),Y},l.unstable_shouldYield=ve,l.unstable_wrapCallback=function(Y){var se=C;return function(){var ae=C;C=se;try{return Y.apply(this,arguments)}finally{C=ae}}}})(If)),If}var Dv;function ab(){return Dv||(Dv=1,Kf.exports=lb()),Kf.exports}var Jf={exports:{}},Et={};/**
25
+ */var Lv;function f2(){return Lv||(Lv=1,(function(n){function s(P,J){var ue=P.length;P.push(J);e:for(;0<ue;){var Ee=ue-1>>>1,je=P[Ee];if(0<u(je,J))P[Ee]=J,P[ue]=je,ue=Ee;else break e}}function i(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var J=P[0],ue=P.pop();if(ue!==J){P[0]=ue;e:for(var Ee=0,je=P.length,$e=je>>>1;Ee<$e;){var Ie=2*(Ee+1)-1,We=P[Ie],A=Ie+1,V=P[A];if(0>u(We,ue))A<je&&0>u(V,We)?(P[Ee]=V,P[A]=ue,Ee=A):(P[Ee]=We,P[Ie]=ue,Ee=Ie);else if(A<je&&0>u(V,ue))P[Ee]=V,P[A]=ue,Ee=A;else break e}}return J}function u(P,J){var ue=P.sortIndex-J.sortIndex;return ue!==0?ue:P.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();n.unstable_now=function(){return h.now()-m}}var p=[],y=[],x=1,v=null,b=3,w=!1,C=!1,N=!1,M=!1,R=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;function T(P){for(var J=i(y);J!==null;){if(J.callback===null)r(y);else if(J.startTime<=P)r(y),J.sortIndex=J.expirationTime,s(p,J);else break;J=i(y)}}function H(P){if(N=!1,T(P),!C)if(i(p)!==null)C=!0,D||(D=!0,ie());else{var J=i(y);J!==null&&ee(H,J.startTime-P)}}var D=!1,z=-1,Y=5,te=-1;function k(){return M?!0:!(n.unstable_now()-te<Y)}function ne(){if(M=!1,D){var P=n.unstable_now();te=P;var J=!0;try{e:{C=!1,N&&(N=!1,j(z),z=-1),w=!0;var ue=b;try{t:{for(T(P),v=i(p);v!==null&&!(v.expirationTime>P&&k());){var Ee=v.callback;if(typeof Ee=="function"){v.callback=null,b=v.priorityLevel;var je=Ee(v.expirationTime<=P);if(P=n.unstable_now(),typeof je=="function"){v.callback=je,T(P),J=!0;break t}v===i(p)&&r(p),T(P)}else r(p);v=i(p)}if(v!==null)J=!0;else{var $e=i(y);$e!==null&&ee(H,$e.startTime-P),J=!1}}break e}finally{v=null,b=ue,w=!1}J=void 0}}finally{J?ie():D=!1}}}var ie;if(typeof F=="function")ie=function(){F(ne)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,X=Ce.port2;Ce.port1.onmessage=ne,ie=function(){X.postMessage(null)}}else ie=function(){R(ne,0)};function ee(P,J){z=R(function(){P(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(P){P.callback=null},n.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<P?Math.floor(1e3/P):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(P){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var ue=b;b=J;try{return P()}finally{b=ue}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(P,J){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ue=b;b=P;try{return J()}finally{b=ue}},n.unstable_scheduleCallback=function(P,J,ue){var Ee=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Ee+ue:Ee):ue=Ee,P){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ue+je,P={id:x++,callback:J,priorityLevel:P,startTime:ue,expirationTime:je,sortIndex:-1},ue>Ee?(P.sortIndex=ue,s(y,P),i(p)===null&&P===i(y)&&(N?(j(z),z=-1):N=!0,ee(H,ue-Ee))):(P.sortIndex=je,s(p,P),C||w||(C=!0,D||(D=!0,ie()))),P},n.unstable_shouldYield=k,n.unstable_wrapCallback=function(P){var J=b;return function(){var ue=b;b=J;try{return P.apply(this,arguments)}finally{b=ue}}}})(Dd)),Dd}var Uv;function d2(){return Uv||(Uv=1,zd.exports=f2()),zd.exports}var Hd={exports:{}},Vt={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var Tv=l=>{throw TypeError(l)};var Qf=(l,i,s)=>i.has(l)||Tv("Cannot "+s);var M=(
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Uv;function ib(){if(Uv)return Et;Uv=1;var l=kd();function i(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var C=2;C<arguments.length;C++)x+="&args[]="+encodeURIComponent(arguments[C])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var u={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},c=Symbol.for("react.portal"),f=Symbol.for("react.recoverable"),g=Symbol.for("react.optimistic_key");function m(y,x,C){var R=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:R==null?null:R===g?g:""+R,children:y,containerInfo:x,implementation:C}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function S(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Et.browser=function(y){return{$$typeof:f,_reason:y}},Et.createPortal=function(y,x){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(i(299));return m(y,x,null,C)},Et.flushSync=function(y){var x=v.T,C=u.p;try{if(v.T=null,u.p=2,y)return y()}finally{v.T=x,u.p=C,u.d.f()}},Et.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,u.d.C(y,x))},Et.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},Et.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var C=x.as,R=S(C,x.crossOrigin),_=typeof x.integrity=="string"?x.integrity:void 0,O=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;C==="style"?u.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:R,integrity:_,fetchPriority:O}):C==="script"&&u.d.X(y,{crossOrigin:R,integrity:_,fetchPriority:O,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Et.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var C=S(x.as,x.crossOrigin);u.d.M(y,{crossOrigin:C,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0})}}else x==null&&u.d.M(y)},Et.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var C=x.as,R=S(C,x.crossOrigin);u.d.L(y,C,{crossOrigin:R,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Et.preloadModule=function(y,x){if(typeof y=="string")if(x){var C=S(x.as,x.crossOrigin);u.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:C,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0})}else u.d.m(y)},Et.requestFormReset=function(y){u.d.r(y)},Et.unstable_batchedUpdates=function(y,x){return y(x)},Et.useFormState=function(y,x,C){return v.H.useFormState(y,x,C)},Et.useFormStatus=function(){return v.H.useHostTransitionStatus()},Et.version="19.3.1",Et}var Hv;function Oy(){if(Hv)return Jf.exports;Hv=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),Jf.exports=ib(),Jf.exports}/**
33
+ */var Vv;function h2(){if(Vv)return Vt;Vv=1;var n=Ih();function s(x){var v="https://react.dev/errors/"+x;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)v+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+x+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal"),d=Symbol.for("react.recoverable"),h=Symbol.for("react.optimistic_key");function m(x,v,b){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:w==null?null:w===h?h:""+w,children:x,containerInfo:v,implementation:b}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(x,v){if(x==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Vt.browser=function(x){return{$$typeof:d,_reason:x}},Vt.createPortal=function(x,v){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(s(299));return m(x,v,null,b)},Vt.flushSync=function(x){var v=p.T,b=r.p;try{if(p.T=null,r.p=2,x)return x()}finally{p.T=v,r.p=b,r.d.f()}},Vt.preconnect=function(x,v){typeof x=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(x,v))},Vt.prefetchDNS=function(x){typeof x=="string"&&r.d.D(x)},Vt.preinit=function(x,v){if(typeof x=="string"&&v&&typeof v.as=="string"){var b=v.as,w=y(b,v.crossOrigin),C=typeof v.integrity=="string"?v.integrity:void 0,N=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;b==="style"?r.d.S(x,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:w,integrity:C,fetchPriority:N}):b==="script"&&r.d.X(x,{crossOrigin:w,integrity:C,fetchPriority:N,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Vt.preinitModule=function(x,v){if(typeof x=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var b=y(v.as,v.crossOrigin);r.d.M(x,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}}else v==null&&r.d.M(x)},Vt.preload=function(x,v){if(typeof x=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var b=v.as,w=y(b,v.crossOrigin);r.d.L(x,b,{crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Vt.preloadModule=function(x,v){if(typeof x=="string")if(v){var b=y(v.as,v.crossOrigin);r.d.m(x,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}else r.d.m(x)},Vt.requestFormReset=function(x){r.d.r(x)},Vt.unstable_batchedUpdates=function(x,v){return x(v)},Vt.useFormState=function(x,v,b){return p.H.useFormState(x,v,b)},Vt.useFormStatus=function(){return p.H.useHostTransitionStatus()},Vt.version="19.3.1",Vt}var $v;function Iy(){if($v)return Hd.exports;$v=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Hd.exports=h2(),Hd.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,15 +38,15 @@ var Tv=l=>{throw TypeError(l)};var Qf=(l,i,s)=>i.has(l)||Tv("Cannot "+s);var M=(
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var Lv;function sb(){if(Lv)return Js;Lv=1;var l=ab(),i=kd(),s=Oy();function u(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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){for(var t=e,n=t;n&&!n.alternate;)t=n,(t.flags&4098)!==0&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function g(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 m(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 v(e){if(f(e)!==e)throw Error(u(188))}function S(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,a=t;;){var o=n.return;if(o===null)break;var r=o.alternate;if(r===null){if(a=o.return,a!==null){n=a;continue}break}if(o.child===r.child){for(r=o.child;r;){if(r===n)return v(o),e;if(r===a)return v(o),t;r=r.sibling}throw Error(u(188))}if(n.return!==a.return)n=o,a=r;else{for(var h=!1,p=o.child;p;){if(p===n){h=!0,n=o,a=r;break}if(p===a){h=!0,a=o,n=r;break}p=p.sibling}if(!h){for(p=r.child;p;){if(p===n){h=!0,n=r,a=o;break}if(p===a){h=!0,a=r,n=o;break}p=p.sibling}if(!h)throw Error(u(189))}}if(n.alternate!==a)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}function x(e,t,n,a,o,r){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,a,o,r)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&x(e.child,t,n,a,o,r))return!0;e=e.sibling}return!1}function C(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 R(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 _(e){var t=[null,null],n=C(e);return n===null||O(t,e,n.child,{foundSelf:!1}),t}function O(e,t,n,a){for(;n!==null;){if(n===t)a.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(a.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&O(e,t,n.child,a))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(u(559))}}var E=null,U=null;function B(e,t,n){return e===n?!0:e===t?(E=e,!0):!1}function $(e,t,n){return e===n?(U=e,!1):e===t?(U!==null&&(E=e),!0):!1}function F(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 P(e,t,n){for(var a=0,o=e;o;o=n(o))a++;o=0;for(var r=t;r;r=n(r))o++;for(;0<a-o;)e=n(e),a--;for(;0<o-a;)t=n(t),o--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var X=Object.assign,Z=Symbol.for("react.element"),de=Symbol.for("react.transitional.element"),ve=Symbol.for("react.portal"),Le=Symbol.for("react.fragment"),ge=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),qe=Symbol.for("react.consumer"),Qe=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),Ne=Symbol.for("react.memo"),Ee=Symbol.for("react.lazy"),mt=Symbol.for("react.activity"),pt=Symbol.for("react.legacy_hidden"),Yt=Symbol.for("react.memo_cache_sentinel"),T=Symbol.for("react.view_transition"),k=Symbol.for("react.recoverable"),ne=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Symbol.for("react.client.reference");function xe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Le:return"Fragment";case ie:return"Profiler";case ge:return"StrictMode";case se:return"Suspense";case ae:return"SuspenseList";case mt:return"Activity";case T:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case ve:return"Portal";case Qe:return e.displayName||"Context";case qe:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ne:return t=e.displayName||null,t!==null?t:xe(e.type)||"Memo";case Ee:t=e._payload,e=e._init;try{return xe(e(t))}catch{}}return null}var Me=Array.isArray,ee=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,an={pending:!1,data:null,method:null,action:null},na=[],sn=-1;function Mt(e){return{current:e}}function tt(e){0>sn||(e.current=na[sn],na[sn]=null,sn--)}function Fe(e,t){sn++,na[sn]=e.current,e.current=t}var Vt=Mt(null),un=Mt(null),yn=Mt(null),la=Mt(null);function aa(e,t){switch(Fe(yn,t),Fe(un,e),Fe(Vt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Lp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Lp(t),e=Vp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}tt(Vt),Fe(Vt,e)}function Yn(){tt(Vt),tt(un),tt(yn)}function Fa(e){var t=e.memoizedState;t!==null&&(Di._currentValue=t.memoizedState,Fe(la,e)),t=Vt.current;var n=Vp(t,e.type);t!==n&&(Fe(un,e),Fe(Vt,n))}function ia(e){un.current===e&&(tt(Vt),tt(un)),la.current===e&&(tt(la),Di._currentValue=an)}var $a,es;function Sn(e){if($a===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$a=t&&t[1]||"",es=-1<n.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+$a+e+es}var ka=!1;function Qa(e,t){if(!e||ka)return"";ka=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(Q){var A=Q}Reflect.construct(e,[],q)}else{try{q.call()}catch(Q){A=Q}q=!1;try{var L=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),q=!0,new e}finally{q&&(L!==void 0?Object.defineProperty(e.prototype,"props",L):delete e.prototype.props)}}}else{try{throw Error()}catch(Q){A=Q}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(Q){if(Q&&A&&typeof Q.stack=="string")return[Q.stack,A.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=a.DetermineComponentFrameRoot(),h=r[0],p=r[1];if(h&&p){var w=h.split(`
44
- `),D=p.split(`
45
- `);for(o=a=0;a<w.length&&!w[a].includes("DetermineComponentFrameRoot");)a++;for(;o<D.length&&!D[o].includes("DetermineComponentFrameRoot");)o++;if(a===w.length||o===D.length)for(a=w.length-1,o=D.length-1;1<=a&&0<=o&&w[a]!==D[o];)o--;for(;1<=a&&0<=o;a--,o--)if(w[a]!==D[o]){if(a!==1||o!==1)do if(a--,o--,0>o||w[a]!==D[o]){var V=`
46
- `+w[a].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=a&&0<=o);break}}}finally{ka=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Sn(n):""}function pu(e,t){switch(e.tag){case 26:case 27:case 5:return Sn(e.type);case 16:return Sn("Lazy");case 13:return e.child!==t&&t!==null?Sn("Suspense Fallback"):Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 15:return Qa(e.type,!1);case 11:return Qa(e.type.render,!1);case 1:return Qa(e.type,!0);case 31:return Sn("Activity");case 30:return Sn("ViewTransition");default:return""}}function ts(e){try{var t="",n=null;do t+=pu(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
41
+ */var Fv;function m2(){if(Fv)return wr;Fv=1;var n=d2(),s=Ih(),i=Iy();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function h(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 m(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 p(e){if(d(e)!==e)throw Error(r(188))}function y(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var o=l.return;if(o===null)break;var c=o.alternate;if(c===null){if(a=o.return,a!==null){l=a;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===l)return p(o),e;if(c===a)return p(o),t;c=c.sibling}throw Error(r(188))}if(l.return!==a.return)l=o,a=c;else{for(var g=!1,S=o.child;S;){if(S===l){g=!0,l=o,a=c;break}if(S===a){g=!0,a=o,l=c;break}S=S.sibling}if(!g){for(S=c.child;S;){if(S===l){g=!0,l=c,a=o;break}if(S===a){g=!0,a=c,l=o;break}S=S.sibling}if(!g)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}function v(e,t,l,a,o,c){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,a,o,c)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&v(e.child,t,l,a,o,c))return!0;e=e.sibling}return!1}function b(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 w(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 C(e){var t=[null,null],l=b(e);return l===null||N(t,e,l.child,{foundSelf:!1}),t}function N(e,t,l,a){for(;l!==null;){if(l===t)a.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(a.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&N(e,t,l.child,a))return!0;l=l.sibling}return!1}function M(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(r(559))}}var R=null,j=null;function F(e,t,l){return e===l?!0:e===t?(R=e,!0):!1}function T(e,t,l){return e===l?(j=e,!1):e===t?(j!==null&&(R=e),!0):!1}function H(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 D(e,t,l){for(var a=0,o=e;o;o=l(o))a++;o=0;for(var c=t;c;c=l(c))o++;for(;0<a-o;)e=l(e),a--;for(;0<o-a;)t=l(t),o--;for(;a--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var z=Object.assign,Y=Symbol.for("react.element"),te=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),Ce=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),Ee=Symbol.for("react.memo"),je=Symbol.for("react.lazy"),$e=Symbol.for("react.activity"),Ie=Symbol.for("react.legacy_hidden"),We=Symbol.for("react.memo_cache_sentinel"),A=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),W=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ne:return"Fragment";case Ce:return"Profiler";case ie:return"StrictMode";case J:return"Suspense";case ue:return"SuspenseList";case $e:return"Activity";case A:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case ee:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ee:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case je:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var be=Array.isArray,re=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt={pending:!1,data:null,method:null,action:null},Bt=[],zn=-1;function Nt(e){return{current:e}}function ot(e){0>zn||(e.current=Bt[zn],Bt[zn]=null,zn--)}function Ge(e,t){zn++,Bt[zn]=e.current,e.current=t}var pt=Nt(null),cl=Nt(null),At=Nt(null),nn=Nt(null);function qn(e,t){switch(Ge(At,t),Ge(cl,e),Ge(pt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?F0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=F0(t),e=B0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ot(pt),Ge(pt,e)}function ut(){ot(pt),ot(cl),ot(At)}function fl(e){var t=e.memoizedState;t!==null&&(ei._currentValue=t.memoizedState,Ge(nn,e)),t=pt.current;var l=B0(t,e.type);t!==l&&(Ge(cl,e),Ge(pt,l))}function It(e){cl.current===e&&(ot(pt),ot(cl)),nn.current===e&&(ot(nn),ei._currentValue=rt)}var kt,zl;function Gt(e){if(kt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);kt=t&&t[1]||"",zl=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+kt+e+zl}var Qn=!1;function ln(e,t){if(!e||Qn)return"";Qn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(ae){var U=ae}Reflect.construct(e,[],K)}else{try{K.call()}catch(ae){U=ae}K=!1;try{var q=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),K=!0,new e}finally{K&&(q!==void 0?Object.defineProperty(e.prototype,"props",q):delete e.prototype.props)}}}else{try{throw Error()}catch(ae){U=ae}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(ae){if(ae&&U&&typeof ae.stack=="string")return[ae.stack,U.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),g=c[0],S=c[1];if(g&&S){var _=g.split(`
44
+ `),B=S.split(`
45
+ `);for(o=a=0;a<_.length&&!_[a].includes("DetermineComponentFrameRoot");)a++;for(;o<B.length&&!B[o].includes("DetermineComponentFrameRoot");)o++;if(a===_.length||o===B.length)for(a=_.length-1,o=B.length-1;1<=a&&0<=o&&_[a]!==B[o];)o--;for(;1<=a&&0<=o;a--,o--)if(_[a]!==B[o]){if(a!==1||o!==1)do if(a--,o--,0>o||_[a]!==B[o]){var Q=`
46
+ `+_[a].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),Q}while(1<=a&&0<=o);break}}}finally{Qn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Gt(l):""}function Z(e,t){switch(e.tag){case 26:case 27:case 5:return Gt(e.type);case 16:return Gt("Lazy");case 13:return e.child!==t&&t!==null?Gt("Suspense Fallback"):Gt("Suspense");case 19:return Gt("SuspenseList");case 0:case 15:return ln(e.type,!1);case 11:return ln(e.type.render,!1);case 1:return ln(e.type,!0);case 31:return Gt("Activity");case 30:return Gt("ViewTransition");default:return""}}function le(e){try{var t="",l=null;do t+=Z(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
47
  Error generating stack: `+a.message+`
48
- `+a.stack}}var Ya=Object.prototype.hasOwnProperty,I=l.unstable_scheduleCallback,ut=l.unstable_cancelCallback,Mn=l.unstable_shouldYield,mr=l.unstable_requestPaint,jt=l.unstable_now,pr=l.unstable_getCurrentPriorityLevel,vu=l.unstable_ImmediatePriority,ns=l.unstable_UserBlockingPriority,Xa=l.unstable_NormalPriority,a1=l.unstable_LowPriority,oh=l.unstable_IdlePriority,i1=l.log,s1=l.unstable_setDisableYieldValue,ls=null,Xt=null;function fl(e){if(typeof i1=="function"&&s1(e),Xt&&typeof Xt.setStrictMode=="function")try{Xt.setStrictMode(ls,e)}catch{}}var Zt=Math.clz32?Math.clz32:r1,u1=Math.log,o1=Math.LN2;function r1(e){return e>>>=0,e===0?32:31-(u1(e)/o1|0)|0}var yu=256,Su=262144,xu=4194304;function sa(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 bu(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var o=0,r=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~r,a!==0?o=sa(a):(h&=p,h!==0?o=sa(h):n||(n=p&~e,n!==0&&(o=sa(n))))):(p=a&~r,p!==0?o=sa(p):h!==0?o=sa(h):n||(n=a&~e,n!==0&&(o=sa(n)))),o===0?0:t!==0&&t!==o&&(t&r)===0&&(r=o&-o,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:o}function as(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rh(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-Zt(n),o=1<<a;t|=e[a],n&=~o}return t}function c1(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 ch(){var e=xu;return xu<<=1,(xu&62914560)===0&&(xu=4194304),e}function vr(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function is(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function f1(e,t,n,a,o,r){var h=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 p=e.entanglements,w=e.expirationTimes,D=e.hiddenUpdates;for(n=h&~n;0<n;){var V=31-Zt(n),q=1<<V;p[V]=0,w[V]=-1;var A=D[V];if(A!==null)for(D[V]=null,V=0;V<A.length;V++){var L=A[V];L!==null&&(L.lane&=-536870913)}n&=~q}a!==0&&fh(e,a,0),r!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=r&~(h&~t))}function fh(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Zt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function dh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Zt(n),o=1<<a;o&t|e[a]&t&&(e[a]|=t),n&=~o}}function hh(e,t){var n=t&-t;return n=(n&42)!==0?1:yr(n),(n&(e.suspendedLanes|t))!==0?0:n}function yr(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 Sr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function gh(){var e=oe.p;return e!==0?e:(e=window.event,e===void 0?32:bv(e.type))}function mh(e,t){var n=oe.p;try{return oe.p=e,t()}finally{oe.p=n}}var Xn=Math.random().toString(36).slice(2),vt="__reactFiber$"+Xn,Bt="__reactProps$"+Xn,Za="__reactContainer$"+Xn,ph="__reactEvents$"+Xn,d1="__reactListeners$"+Xn,h1="__reactHandles$"+Xn,vh="__reactResources$"+Xn,ss="__reactMarker$"+Xn,Cu="__reactLoad$"+Xn;function Eu(e){delete e[vt],delete e[Bt],delete e[d1],delete e[h1]}function ua(e){var t;if(t=e[vt])return t;for(var n=e.parentNode;n;){if(t=n[Za]||n[vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=tv(e);e!==null;){if(n=e[vt])return n;e=tv(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){if(e=e[vt]||e[Za]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function us(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ia(e){var t=e[vh];return t||(t=e[vh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[ss]=!0}function yh(e){e[Cu]=void 0}var Sh=new Set,xh={};function oa(e,t){Ja(e,t),Ja(e+"Capture",t)}function Ja(e,t){for(xh[e]=t,e=0;e<t.length;e++)Sh.add(t[e])}var g1=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]*$"),bh={},Ch={};function m1(e){return Ya.call(Ch,e)?!0:Ya.call(bh,e)?!1:g1.test(e)?Ch[e]=!0:(bh[e]=!0,!1)}var Ae=!1;function Eh(){var e=Ae;return Ae=!1,e}function wu(e,t,n){if(m1(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function Ru(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 Zn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,a)}}function Kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function p1(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,r=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){n=""+h,r.call(this,h)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(h){n=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xr(e){if(!e._valueTracker){var t=wh(e)?"checked":"value";e._valueTracker=p1(e,t,""+e[t])}}function Rh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=wh(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}var v1=/[\n"\\]/g;function on(e){return e.replace(v1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function br(e,t,n,a,o,r,h,p){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Kt(t)):e.value!==""+Kt(t)&&(e.value=""+Kt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?h==="number"&&e.value==t?Cr(e,Kt(e.value)):Cr(e,Kt(t)):n!=null?Cr(e,Kt(n)):a!=null&&e.removeAttribute("value"),o==null&&r!=null&&(e.defaultChecked=!!r),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Kt(p):e.removeAttribute("name")}function _h(e,t,n,a,o,r,h,p){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){xr(e);return}n=n!=null?""+Kt(n):"",t=t!=null?""+Kt(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),xr(e)}function Cr(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Pa(e,t,n,a){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Kt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Nh(e,t,n){if(t!=null&&(t=""+Kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Kt(n):""}function Th(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(u(92));if(Me(a)){if(1<a.length)throw Error(u(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Kt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),xr(e)}function Wa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var y1=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 Mh(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||y1.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function jh(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",Ae=!0);for(var o in t)a=t[o],t.hasOwnProperty(o)&&n[o]!==a&&(Mh(e,o,a),Ae=!0)}else for(var r in t)t.hasOwnProperty(r)&&Mh(e,r,t[r])}function Er(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 S1=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"]]),x1=/^[\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 _u(e){return x1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function jn(){}var wr=null;function Rr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ei=null,ti=null;function Ah(e){var t=Ka(e);if(t&&(e=t.stateNode)){var n=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(br(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="'+on(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var o=a[Bt]||null;if(!o)throw Error(u(90));br(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Rh(a)}break e;case"textarea":Nh(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Pa(e,!!n.multiple,t,!1)}}}var _r=!1;function Oh(e,t,n){if(_r)return e(t,n);_r=!0;try{var a=e(t);return a}finally{if(_r=!1,(ei!==null||ti!==null)&&(No(),ei&&(t=ei,e=ti,ti=ei=null,Ah(t),e)))for(t=0;t<e.length;t++)Ah(e[t])}}function os(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Bt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nr=!1;if(Kn)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){Nr=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{Nr=!1}var dl=null,Tr=null,Nu=null;function zh(){if(Nu)return Nu;var e,t=Tr,n=t.length,a,o="value"in dl?dl.value:dl.textContent,r=o.length;for(e=0;e<n&&t[e]===o[e];e++);var h=n-e;for(a=1;a<=h&&t[n-a]===o[r-a];a++);return Nu=o.slice(e,1<a?1-a:void 0)}function Tu(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 Mu(){return!0}function Dh(){return!1}function At(e){function t(n,a,o,r,h){this._reactName=n,this._targetInst=o,this.type=a,this.nativeEvent=r,this.target=h,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(r):r[p]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Mu:Dh,this.isPropagationStopped=Dh,this}return X(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Mu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Mu)},persist:function(){},isPersistent:Mu}),t}var hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ju=At(hl),cs=X({},hl,{view:0,detail:0}),b1=At(cs),Mr,jr,fs,Au=X({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Or,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!==fs&&(fs&&e.type==="mousemove"?(Mr=e.screenX-fs.screenX,jr=e.screenY-fs.screenY):jr=Mr=0,fs=e),Mr)},movementY:function(e){return"movementY"in e?e.movementY:jr}}),Uh=At(Au),C1=X({},Au,{dataTransfer:0}),E1=At(C1),w1=X({},cs,{relatedTarget:0}),Ar=At(w1),R1=X({},hl,{animationName:0,elapsedTime:0,pseudoElement:0}),_1=At(R1),N1=X({},hl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),T1=At(N1),M1=X({},hl,{data:0}),Hh=At(M1),j1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A1={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"},O1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function z1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=O1[e])?!!t[e]:!1}function Or(){return z1}var D1=X({},cs,{key:function(e){if(e.key){var t=j1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?A1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Or,charCode:function(e){return e.type==="keypress"?Tu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),U1=At(D1),H1=X({},Au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lh=At(H1),L1=X({},hl,{submitter:0}),V1=At(L1),B1=X({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Or}),G1=At(B1),q1=X({},hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),F1=At(q1),$1=X({},Au,{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}),k1=At($1),Q1=X({},hl,{newState:0,oldState:0,source:0}),Y1=At(Q1),X1=[9,13,27,32],zr=Kn&&"CompositionEvent"in window,ds=null;Kn&&"documentMode"in document&&(ds=document.documentMode);var Z1=Kn&&"TextEvent"in window&&!ds,Vh=Kn&&(!zr||ds&&8<ds&&11>=ds),Bh=" ",Gh=!1;function qh(e,t){switch(e){case"keyup":return X1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function K1(e,t){switch(e){case"compositionend":return Fh(t);case"keypress":return t.which!==32?null:(Gh=!0,Bh);case"textInput":return e=t.data,e===Bh&&Gh?null:e;default:return null}}function I1(e,t){if(ni)return e==="compositionend"||!zr&&qh(e,t)?(e=zh(),Nu=Tr=dl=null,ni=!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 Vh&&t.locale!=="ko"?null:t.data;default:return null}}var J1={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 $h(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!J1[e.type]:t==="textarea"}function kh(e,t,n,a){ei?ti?ti.push(a):ti=[a]:ei=a,t=zo(t,"onChange"),0<t.length&&(n=new ju("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var hs=null,gs=null;function P1(e){Ap(e,0)}function Ou(e){var t=us(e);if(Rh(t))return e}function Qh(e,t){if(e==="change")return t}var Yh=!1;if(Kn){var Dr;if(Kn){var Ur="oninput"in document;if(!Ur){var Xh=document.createElement("div");Xh.setAttribute("oninput","return;"),Ur=typeof Xh.oninput=="function"}Dr=Ur}else Dr=!1;Yh=Dr&&(!document.documentMode||9<document.documentMode)}function Zh(){hs&&(hs.detachEvent("onpropertychange",Kh),gs=hs=null)}function Kh(e){if(e.propertyName==="value"&&Ou(gs)){var t=[];kh(t,gs,e,Rr(e)),Oh(P1,t)}}function W1(e,t,n){e==="focusin"?(Zh(),hs=t,gs=n,hs.attachEvent("onpropertychange",Kh)):e==="focusout"&&Zh()}function eS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ou(gs)}function tS(e,t){if(e==="click")return Ou(t)}function nS(e,t){if(e==="input"||e==="change")return Ou(t)}function lS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var It=typeof Object.is=="function"?Object.is:lS;function ms(e,t){if(It(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var o=n[a];if(!Ya.call(t,o)||!It(e[o],t[o]))return!1}return!0}function Hr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ih(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jh(e,t){var n=Ih(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ih(n)}}function Ph(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ph(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(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=Hr(e.document)}return t}function Lr(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 aS=Kn&&"documentMode"in document&&11>=document.documentMode,li=null,Vr=null,ps=null,Br=!1;function eg(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||li==null||li!==Hr(a)||(a=li,"selectionStart"in a&&Lr(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ps&&ms(ps,a)||(ps=a,a=zo(Vr,"onSelect"),0<a.length&&(t=new ju("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=li)))}function ra(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ai={animationend:ra("Animation","AnimationEnd"),animationiteration:ra("Animation","AnimationIteration"),animationstart:ra("Animation","AnimationStart"),transitionrun:ra("Transition","TransitionRun"),transitionstart:ra("Transition","TransitionStart"),transitioncancel:ra("Transition","TransitionCancel"),transitionend:ra("Transition","TransitionEnd")},Gr={},tg={};Kn&&(tg=document.createElement("div").style,"AnimationEvent"in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),"TransitionEvent"in window||delete ai.transitionend.transition);function ca(e){if(Gr[e])return Gr[e];if(!ai[e])return e;var t=ai[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in tg)return Gr[e]=t[n];return e}var ng=ca("animationend"),lg=ca("animationiteration"),ag=ca("animationstart"),iS=ca("transitionrun"),sS=ca("transitionstart"),uS=ca("transitioncancel"),ig=ca("transitionend"),sg=new Map,qr="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(" ");qr.push("scrollEnd");function xn(e,t){sg.set(e,t),oa(t,[e])}var oS=0;function In(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=wn.identifierPrefix;var n=oS++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function ug(e){if(e==null||typeof e=="string")return e;var t=null,n=wi;if(n!==null)for(var a=0;a<n.length;a++){var o=e[n[a]];if(o!=null){if(o==="none")return"none";t=t==null?o:t+(" "+o)}}return t??e.default}function Jn(e,t){return e=ug(e),t=ug(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var zu=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!==null&&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)},rn=[],ii=0,Fr=0;function Du(){for(var e=ii,t=Fr=ii=0;t<e;){var n=rn[t];rn[t++]=null;var a=rn[t];rn[t++]=null;var o=rn[t];rn[t++]=null;var r=rn[t];if(rn[t++]=null,a!==null&&o!==null){var h=a.pending;h===null?o.next=o:(o.next=h.next,h.next=o),a.pending=o}r!==0&&og(n,o,r)}}function Uu(e,t,n,a){rn[ii++]=e,rn[ii++]=t,rn[ii++]=n,rn[ii++]=a,Fr|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function $r(e,t,n,a){return Uu(e,t,n,a),Hu(e)}function fa(e,t){return Uu(e,null,null,t),Hu(e)}function og(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var o=!1,r=e.return;r!==null;)r.childLanes|=n,a=r.alternate,a!==null&&(a.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(o=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,o&&t!==null&&(o=31-Zt(n),e=r.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=n|536870912),r):null}function Hu(e){if(50<Vs)throw Vs=0,_o=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function rS(e,t,n,a){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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,n,a){return new rS(e,t,n,a)}function kr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pn(e,t){var n=e.alternate;return n===null?(n=Gt(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 rg(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 Lu(e,t,n,a,o,r){var h=0;if(a=e,typeof a=="function")kr(a)&&(h=1);else if(typeof a=="string")h=Lx(e,n,Vt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case mt:return e=Gt(31,n,t,o),e.elementType=mt,e.lanes=r,e;case Le:return da(n.children,o,r,t);case ge:h=8,o|=24;break;case ie:return e=Gt(12,n,t,o|2),e.elementType=ie,e.lanes=r,e;case se:return e=Gt(13,n,t,o),e.elementType=se,e.lanes=r,e;case ae:return e=Gt(19,n,t,o),e.elementType=ae,e.lanes=r,e;case pt:case T:return e=o|32,e=Gt(30,n,t,e),e.elementType=T,e.lanes=r,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case Qe:h=10;break e;case qe:h=9;break e;case Y:h=11;break e;case Ne:h=14;break e;case Ee:h=16,a=null;break e}h=29,n=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=Gt(h,n,t,o),t.elementType=e,t.type=a,t.lanes=r,t}function da(e,t,n,a){return e=Gt(7,e,a,t),e.lanes=n,e}function Qr(e,t,n){return e=Gt(6,e,null,t),e.lanes=n,e}function cg(e){var t=Gt(18,null,null,0);return t.stateNode=e,t}function Yr(e,t,n){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fg=new WeakMap;function cn(e,t){if(typeof e=="object"&&e!==null){var n=fg.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ts(t)},fg.set(e,t),t)}return{value:e,source:t,stack:ts(t)}}var ui=[],oi=0,Vu=null,vs=0,fn=[],dn=0,gl=null,An=1,On="";function Wn(e,t){ui[oi++]=vs,ui[oi++]=Vu,Vu=e,vs=t}function dg(e,t,n){fn[dn++]=An,fn[dn++]=On,fn[dn++]=gl,gl=e;var a=An;e=On;var o=32-Zt(a)-1;a&=~(1<<o),n+=1;var r=32-Zt(t)+o;if(30<r){var h=o-o%5;r=(a&(1<<h)-1).toString(32),a>>=h,o-=h,An=1<<32-Zt(t)+o|n<<o|a,On=r+e}else An=1<<r|n<<o|a,On=e}function Bu(e){e.return!==null&&(Wn(e,1),dg(e,1,0))}function Xr(e){for(;e===Vu;)Vu=ui[--oi],ui[oi]=null,vs=ui[--oi],ui[oi]=null;for(;e===gl;)gl=fn[--dn],fn[dn]=null,On=fn[--dn],fn[dn]=null,An=fn[--dn],fn[dn]=null}function hg(e,t){fn[dn++]=An,fn[dn++]=On,fn[dn++]=gl,An=t.id,On=t.overflow,gl=e}var ft=null,Ye=null,Se=!1,ml=null,hn=!1,Zr=Error(u(519));function pl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ys(cn(t,e)),Zr}function gg(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[vt]=e,t[Bt]=a,n){case"dialog":Ce("cancel",t),Ce("close",t);break;case"iframe":case"object":case"embed":Ce("load",t);break;case"video":case"audio":for(n=0;n<Gs.length;n++)Ce(Gs[n],t);break;case"source":Ce("error",t);break;case"img":case"image":case"link":Ce("error",t),Ce("load",t);break;case"details":Ce("toggle",t);break;case"input":Ce("invalid",t),_h(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ce("invalid",t);break;case"textarea":Ce("invalid",t),Th(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Up(t.textContent,n)?(a.popover!=null&&(Ce("beforetoggle",t),Ce("toggle",t)),a.onScroll!=null&&Ce("scroll",t),a.onScrollEnd!=null&&Ce("scrollend",t),a.onClick!=null&&(t.onclick=jn),t=!0):t=!1,t||pl(e,!0)}function Gu(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:ft=ft.return}}function ri(e){if(e!==ft)return!1;if(!Se)return Gu(e),Se=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Rf(e.type,e.memoizedProps)),n=!n),n&&Ye&&pl(e),Gu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ye=ev(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ye=ev(e)}else t===27?(t=Ye,Ol(e.type)?(e=Df,Df=null,Ye=e):Ye=t):Ye=ft?mn(e.stateNode.nextSibling):null;return!0}function ha(){Ye=ft=null,Se=!1}function Kr(){var e=ml;return e!==null&&($t===null?$t=e:$t.push.apply($t,e),ml=null),e}function ys(e){ml===null?ml=[e]:ml.push(e)}var Ir=Mt(null),ga=null,el=null;function vl(e,t,n){Fe(Ir,t._currentValue),t._currentValue=n}function tl(e){e._currentValue=Ir.current,tt(Ir)}function qu(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Jr(e,t,n,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var r=o.dependencies;if(r!==null){var h=o.child;r=r.firstContext;e:for(;r!==null;){var p=r;r=o;for(var w=0;w<t.length;w++)if(p.context===t[w]){r.lanes|=n,p=r.alternate,p!==null&&(p.lanes|=n),qu(r.return,n,e),a||(h=null);break e}r=p.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(u(341));h.lanes|=n,r=h.alternate,r!==null&&(r.lanes|=n),qu(h,n,e),h=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=n,h=o.alternate,h!==null&&(h.lanes|=n),qu(o.return,n,e),h=o.child,h=h!==null?h.sibling:null):h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function ma(e,t,n,a){e=null;for(var o=t,r=!1;o!==null;){if(!r){if((o.flags&524288)!==0)r=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(u(387));if(h=h.memoizedProps,h!==null){var p=o.type;It(o.pendingProps.value,h.value)||(e!==null?e.push(p):e=[p])}}else if(o===la.current){if(h=o.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Di):e=[Di])}o=o.return}return e!==null&&Jr(t,e,n,a),t.flags|=262144,e!==null}function Fu(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function pa(e){ga=e,el=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function yt(e){return mg(ga,e)}function $u(e,t){return ga===null&&pa(e),mg(e,t)}function mg(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},el===null){if(e===null)throw Error(u(308));el=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else el=el.next=t;return n}var cS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},fS=l.unstable_scheduleCallback,dS=l.unstable_NormalPriority,nt={$$typeof:Qe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pr(){return{controller:new cS,data:new Map,refCount:0}}function Ss(e){e.refCount--,e.refCount===0&&fS(dS,function(){e.controller.abort()})}function pg(e,t){if((e.pendingLanes&4194048)!==0){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];n.indexOf(a)===-1&&n.push(a)}}}var xs=null;function hS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var bs=null,Wr=0,va=0,ci=null;function gS(e,t){if(bs===null){var n=bs=[];Wr=0,va=pf(),ci={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Wr++,t.then(vg,vg),t}function vg(){if(--Wr===0&&(xs=null,bs!==null)){ci!==null&&(ci.status="fulfilled");var e=bs;bs=null,va=0,ci=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function mS(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),a}var yg=ee.S;ee.S=function(e,t){if(cp=jt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gS(e,t),xs!==null)for(var n=Ti;n!==null;)pg(n,xs),n=n.next;if(n=e.types,n!==null){for(var a=Ti;a!==null;)pg(a,n),a=a.next;if(va!==0){a=xs,a===null&&(a=xs=[]);for(var o=0;o<n.length;o++){var r=n[o];a.indexOf(r)===-1&&a.push(r)}}}yg!==null&&yg(e,t)};var ya=Mt(null);function ec(){var e=ya.current;return e!==null?e:ke.pooledCache}function ku(e,t){t===null?Fe(ya,ya.current):Fe(ya,t.pool)}function Sg(){var e=ec();return e===null?null:{parent:nt._currentValue,pool:e}}var fi=Error(u(460)),tc=Error(u(474)),Qu=Error(u(542)),Yu={then:function(){}};function xg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bg(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(jn,jn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eg(e),e===void 0&&!("reason"in t)?Error(u(600)):e;default:if(typeof t.status=="string")t.then(jn,jn);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eg(e),e}throw xa=t,fi}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(xa=n,fi):n}}var xa=null;function Cg(){if(xa===null)throw Error(u(459));var e=xa;return xa=null,e}function Eg(e){if(e===fi||e===Qu)throw Error(u(483))}var di=null,Cs=0;function Xu(e){var t=Cs;return Cs+=1,di===null&&(di=[]),bg(di,e,t)}function yl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zu(e,t){throw t.$$typeof===Z?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wg(e){function t(z,N){if(e){var H=z.deletions;H===null?(z.deletions=[N],z.flags|=16):H.push(N)}}function n(z,N){if(!e)return null;for(;N!==null;)t(z,N),N=N.sibling;return null}function a(z){for(var N=new Map;z!==null;)z.key===null?N.set(z.index,z):N.set(z.key,z),z=z.sibling;return N}function o(z,N){return z=Pn(z,N),z.index=0,z.sibling=null,z}function r(z,N,H){return z.index=H,e?(H=z.alternate,H!==null?(H=H.index,H<N?(z.flags|=2,N):H):(z.flags|=134217730,N)):(z.flags|=1048576,N)}function h(z){return e&&z.alternate===null&&(z.flags|=134217730),z}function p(z,N,H,G){return N===null||N.tag!==6?(N=Qr(H,z.mode,G),N.return=z,N):(N=o(N,H),N.return=z,N)}function w(z,N,H,G){var J=H.type;return J===Le?(z=V(z,N,H.props.children,G,H.key),yl(z,H),z):N!==null&&(N.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Ee&&Sa(J)===N.type)?(N=o(N,H.props),yl(N,H),N.return=z,N):(N=Lu(H.type,H.key,H.props,null,z.mode,G),yl(N,H),N.return=z,N)}function D(z,N,H,G){return N===null||N.tag!==4||N.stateNode.containerInfo!==H.containerInfo||N.stateNode.implementation!==H.implementation?(N=Yr(H,z.mode,G),N.return=z,N):(N=o(N,H.children||[]),N.return=z,N)}function V(z,N,H,G,J){return N===null||N.tag!==7?(N=da(H,z.mode,G,J),N.return=z,N):(N=o(N,H),N.return=z,N)}function q(z,N,H){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=Qr(""+N,z.mode,H),N.return=z,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case de:return H=Lu(N.type,N.key,N.props,null,z.mode,H),yl(H,N),H.return=z,H;case ve:return N=Yr(N,z.mode,H),N.return=z,N;case Ee:return N=Sa(N),q(z,N,H)}if(Me(N)||te(N))return N=da(N,z.mode,H,null),N.return=z,N;if(typeof N.then=="function")return q(z,Xu(N),H);if(N.$$typeof===Qe)return q(z,$u(z,N),H);Zu(z,N)}return null}function A(z,N,H,G){var J=N!==null?N.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return J!==null?null:p(z,N,""+H,G);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case de:return H.key===J?w(z,N,H,G):null;case ve:return H.key===J?D(z,N,H,G):null;case Ee:return H=Sa(H),A(z,N,H,G)}if(Me(H)||te(H))return J!==null?null:V(z,N,H,G,null);if(typeof H.then=="function")return A(z,N,Xu(H),G);if(H.$$typeof===Qe)return A(z,N,$u(z,H),G);Zu(z,H)}return null}function L(z,N,H,G,J){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return z=z.get(H)||null,p(N,z,""+G,J);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case de:return z=z.get(G.key===null?H:G.key)||null,w(N,z,G,J);case ve:return z=z.get(G.key===null?H:G.key)||null,D(N,z,G,J);case Ee:return G=Sa(G),L(z,N,H,G,J)}if(Me(G)||te(G))return z=z.get(H)||null,V(N,z,G,J,null);if(typeof G.then=="function")return L(z,N,H,Xu(G),J);if(G.$$typeof===Qe)return L(z,N,H,$u(N,G),J);Zu(N,G)}return null}function Q(z,N,H,G){for(var J=null,Re=null,le=N,re=N=0,it=null;le!==null&&re<H.length;re++){le.index>re?(it=le,le=null):it=le.sibling;var je=A(z,le,H[re],G);if(je===null){le===null&&(le=it);break}e&&le&&je.alternate===null&&t(z,le),N=r(je,N,re),Re===null?J=je:Re.sibling=je,Re=je,le=it}if(re===H.length)return n(z,le),Se&&Wn(z,re),J;if(le===null){for(;re<H.length;re++)le=q(z,H[re],G),le!==null&&(N=r(le,N,re),Re===null?J=le:Re.sibling=le,Re=le);return Se&&Wn(z,re),J}for(le=a(le);re<H.length;re++)it=L(le,z,re,H[re],G),it!==null&&(e&&(je=it.alternate,je!==null&&le.delete(je.key===null?re:je.key)),N=r(it,N,re),Re===null?J=it:Re.sibling=it,Re=it);return e&&le.forEach(function(Ll){return t(z,Ll)}),Se&&Wn(z,re),J}function W(z,N,H,G){if(H==null)throw Error(u(151));for(var J=null,Re=null,le=N,re=N=0,it=null,je=H.next();le!==null&&!je.done;re++,je=H.next()){le.index>re?(it=le,le=null):it=le.sibling;var Ll=A(z,le,je.value,G);if(Ll===null){le===null&&(le=it);break}e&&le&&Ll.alternate===null&&t(z,le),N=r(Ll,N,re),Re===null?J=Ll:Re.sibling=Ll,Re=Ll,le=it}if(je.done)return n(z,le),Se&&Wn(z,re),J;if(le===null){for(;!je.done;re++,je=H.next())je=q(z,je.value,G),je!==null&&(N=r(je,N,re),Re===null?J=je:Re.sibling=je,Re=je);return Se&&Wn(z,re),J}for(le=a(le);!je.done;re++,je=H.next())je=L(le,z,re,je.value,G),je!==null&&(e&&(it=je.alternate,it!==null&&le.delete(it.key===null?re:it.key)),N=r(je,N,re),Re===null?J=je:Re.sibling=je,Re=je);return e&&le.forEach(function(Kx){return t(z,Kx)}),Se&&Wn(z,re),J}function pe(z,N,H,G){if(typeof H=="object"&&H!==null&&H.type===Le&&H.key===null&&H.props.ref===void 0&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case de:e:{for(var J=H.key;N!==null;){if(N.key===J){if(J=H.type,J===Le){if(N.tag===7){n(z,N.sibling),G=o(N,H.props.children),yl(G,H),G.return=z,z=G;break e}}else if(N.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Ee&&Sa(J)===N.type){n(z,N.sibling),G=o(N,H.props),yl(G,H),G.return=z,z=G;break e}n(z,N);break}else t(z,N);N=N.sibling}H.type===Le?(G=da(H.props.children,z.mode,G,H.key),yl(G,H),G.return=z,z=G):(G=Lu(H.type,H.key,H.props,null,z.mode,G),yl(G,H),G.return=z,z=G)}return h(z);case ve:e:{for(J=H.key;N!==null;){if(N.key===J)if(N.tag===4&&N.stateNode.containerInfo===H.containerInfo&&N.stateNode.implementation===H.implementation){n(z,N.sibling),G=o(N,H.children||[]),G.return=z,z=G;break e}else{n(z,N);break}else t(z,N);N=N.sibling}G=Yr(H,z.mode,G),G.return=z,z=G}return h(z);case Ee:return H=Sa(H),pe(z,N,H,G)}if(Me(H))return Q(z,N,H,G);if(te(H)){if(J=te(H),typeof J!="function")throw Error(u(150));return H=J.call(H),W(z,N,H,G)}if(typeof H.then=="function")return pe(z,N,Xu(H),G);if(H.$$typeof===Qe)return pe(z,N,$u(z,H),G);Zu(z,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,N!==null&&N.tag===6?(n(z,N.sibling),G=o(N,H),G.return=z,z=G):(n(z,N),G=Qr(H,z.mode,G),G.return=z,z=G),h(z)):n(z,N)}return function(z,N,H,G){try{Cs=0;var J=pe(z,N,H,G);return di=null,J}catch(le){if(le===fi||le===Qu)throw le;var Re=Gt(29,le,null,z.mode);return Re.lanes=G,Re.return=z,Re}finally{}}}var ba=wg(!0),Rg=wg(!1),Sl=!1;function nc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lc(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 xl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bl(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Oe&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=Hu(e),og(e,null,n),t}return Uu(e,a,t,n),Hu(e)}function Es(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,dh(e,n)}}function ac(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var o=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?o=r=h:r=r.next=h,n=n.next}while(n!==null);r===null?o=r=t:r=r.next=t}else o=r=t;n={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:r,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ic=!1;function ws(){if(ic){var e=ci;if(e!==null)throw e}}function Rs(e,t,n,a){ic=!1;var o=e.updateQueue;Sl=!1;var r=o.firstBaseUpdate,h=o.lastBaseUpdate,p=o.shared.pending;if(p!==null){o.shared.pending=null;var w=p,D=w.next;w.next=null,h===null?r=D:h.next=D,h=w;var V=e.alternate;V!==null&&(V=V.updateQueue,p=V.lastBaseUpdate,p!==h&&(p===null?V.firstBaseUpdate=D:p.next=D,V.lastBaseUpdate=w))}if(r!==null){var q=o.baseState;h=0,V=D=w=null,p=r;do{var A=p.lane&-536870913,L=A!==p.lane;if(L?(we&A)===A:(a&A)===A){A!==0&&A===va&&(ic=!0),V!==null&&(V=V.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var Q=e,W=p;A=t;var pe=n;switch(W.tag){case 1:if(Q=W.payload,typeof Q=="function"){q=Q.call(pe,q,A);break e}q=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=W.payload,A=typeof Q=="function"?Q.call(pe,q,A):Q,A==null)break e;q=X({},q,A);break e;case 2:Sl=!0}}A=p.callback,A!==null&&(e.flags|=64,L&&(e.flags|=8192),L=o.callbacks,L===null?o.callbacks=[A]:L.push(A))}else L={lane:A,tag:p.tag,payload:p.payload,callback:p.callback,next:null},V===null?(D=V=L,w=q):V=V.next=L,h|=A;if(p=p.next,p===null){if(p=o.shared.pending,p===null)break;L=p,p=L.next,L.next=null,o.lastBaseUpdate=L,o.shared.pending=null}}while(!0);V===null&&(w=q),o.baseState=w,o.firstBaseUpdate=D,o.lastBaseUpdate=V,r===null&&(o.shared.lanes=0),Tl|=h,e.lanes=h,e.memoizedState=q}}function _g(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Ng(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)_g(n[e],t)}var Cl=Mt(null),Ku=Mt(0);function Tg(e,t){e=sl,Fe(Ku,e),Fe(Cl,t),sl=e|t.baseLanes}function sc(){Fe(Ku,sl),Fe(Cl,Cl.current)}function uc(){sl=Ku.current,tt(Cl),tt(Ku)}var St=Mt(null),_t=null;function El(e){var t=e.alternate;Fe(xt,xt.current&1),Fe(St,e),_t===null&&(t===null||Cl.current!==null||t.memoizedState!==null)&&(_t=e)}function oc(e){Fe(xt,xt.current),Fe(St,e),_t===null&&(_t=e)}function Mg(e){e.tag===22?(Fe(xt,xt.current),Fe(St,e),_t===null&&(_t=e)):wl()}function wl(){Fe(xt,xt.current),Fe(St,St.current)}function Jt(e){tt(St),_t===e&&(_t=null),tt(xt)}var xt=Mt(0);function _s(e,t){Fe(St,St.current),Fe(xt,t)}function rc(e){tt(xt),tt(St),_t===e&&(_t=null)}function Iu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Of(n)||zf(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)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 nl=0,me=null,$e=null,lt=null,Ju=!1,hi=!1,Ca=!1,Pu=0,Ns=0,gi=null,pS=0;function Pe(){throw Error(u(321))}function cc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!It(e[n],t[n]))return!1;return!0}function fc(e,t,n,a,o,r){return nl=r,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ee.H=e===null||e.memoizedState===null?dm:hm,Ca=!1,r=n(a,o),Ca=!1,hi&&(r=Ag(t,n,a,o)),jg(e),r}function jg(e){ee.H=io;var t=$e!==null&&$e.next!==null;if(nl=0,lt=$e=me=null,Ju=!1,Ns=0,gi=null,t)throw Error(u(300));e===null||at||(e=e.dependencies,e!==null&&Fu(e)&&(at=!0))}function Ag(e,t,n,a){me=e;var o=0;do{if(hi&&(gi=null),Ns=0,hi=!1,25<=o)throw Error(u(301));if(o+=1,lt=$e=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}ee.H=wS,r=t(n,a)}while(hi);return r}function vS(){var e=ee.H,t=e.useState()[0];return t=typeof t.then=="function"?Ts(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(me.flags|=1024),t}function dc(){var e=Pu!==0;return Pu=0,e}function hc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function gc(e){if(Ju){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ju=!1}nl=0,lt=$e=me=null,hi=!1,Ns=Pu=0,gi=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?me.memoizedState=lt=e:lt=lt.next=e,lt}function et(){if($e===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=lt===null?me.memoizedState:lt.next;if(t!==null)lt=t,$e=e;else{if(e===null)throw me.alternate===null?Error(u(467)):Error(u(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},lt===null?me.memoizedState=lt=e:lt=lt.next=e}return lt}function Wu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ts(e){var t=Ns;return Ns+=1,gi===null&&(gi=[]),e=bg(gi,e,t),t=me,(lt===null?t.memoizedState:lt.next)===null&&(t=t.alternate,ee.H=t===null||t.memoizedState===null?dm:hm),e}function eo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ts(e);if(e.$$typeof===k)return;if(e.$$typeof===Qe)return yt(e)}throw Error(u(438,String(e)))}function mc(e){var t=null,n=me.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=me.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Wu(),me.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Yt;return t.index++,n}function ll(e,t){return typeof t=="function"?t(e):t}function to(e){var t=et();return pc(t,$e,e)}function pc(e,t,n){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=n;var o=e.baseQueue,r=a.pending;if(r!==null){if(o!==null){var h=o.next;o.next=r.next,r.next=h}t.baseQueue=o=r,a.pending=null}if(r=e.baseState,o===null)e.memoizedState=r;else{t=o.next;var p=h=null,w=null,D=t,V=!1;do{var q=D.lane&-536870913;if(q!==D.lane?(we&q)===q:(nl&q)===q){var A=D.revertLane;if(A===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),q===va&&(V=!0);else if((nl&A)===A){D=D.next,A===va&&(V=!0);continue}else q={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},w===null?(p=w=q,h=r):w=w.next=q,me.lanes|=A,Tl|=A;q=D.action,Ca&&n(r,q),r=D.hasEagerState?D.eagerState:n(r,q)}else A={lane:q,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},w===null?(p=w=A,h=r):w=w.next=A,me.lanes|=q,Tl|=q;D=D.next}while(D!==null&&D!==t);if(w===null?h=r:w.next=p,!It(r,e.memoizedState)&&(at=!0,V&&(n=ci,n!==null)))throw n;e.memoizedState=r,e.baseState=h,e.baseQueue=w,a.lastRenderedState=r}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function vc(e){var t=et(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var a=n.dispatch,o=n.pending,r=t.memoizedState;if(o!==null){n.pending=null;var h=o=o.next;do r=e(r,h.action),h=h.next;while(h!==o);It(r,t.memoizedState)||(at=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,a]}function Og(e,t,n){var a=me,o=et(),r=Se;if(r){if(n===void 0)throw Error(u(407));n=n()}else n=t();var h=!It(($e||o).memoizedState,n);if(h&&(o.memoizedState=n,at=!0),o=o.queue,xc(Ug.bind(null,a,o,e),[e]),e=o.getSnapshot!==t||h||lt!==null&&(lt.memoizedState.tag&1)!==0,mi(e?9:8,{destroy:void 0},Dg.bind(null,a,o,n,t),null),e){if(a.flags|=2048,ke===null)throw Error(u(349));r||(nl&127)!==0||zg(a,t,n)}return n}function zg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t=Wu(),me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Dg(e,t,n,a){t.value=n,t.getSnapshot=a,Hg(t)&&Lg(e)}function Ug(e,t,n){return n(function(){Hg(t)&&Lg(e)})}function Hg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!It(e,n)}catch{return!0}}function Lg(e){var t=fa(e,2);t!==null&&kt(t,e,2)}function yc(e){var t=Ot();if(typeof e=="function"){var n=e;if(e=n(),Ca){fl(!0);try{n()}finally{fl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:e},t}function Vg(e,t,n,a){return e.baseState=n,pc(e,$e,typeof a=="function"?a:ll)}function yS(e,t,n,a,o){if(ao(e))throw Error(u(485));if(e=t.action,e!==null){var r={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){r.listeners.push(h)}};ee.T!==null?n(!0):r.isTransition=!1,a(r),n=t.pending,n===null?(r.next=t.pending=r,Bg(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Bg(e,t){var n=t.action,a=t.payload,o=e.state;if(t.isTransition){var r=ee.T,h={};h.types=r!==null?r.types:null,ee.T=h;try{var p=n(o,a),w=ee.S;w!==null&&w(h,p),Gg(e,t,p)}catch(D){Sc(e,t,D)}finally{r!==null&&h.types!==null&&(r.types=h.types),ee.T=r}}else try{r=n(o,a),Gg(e,t,r)}catch(D){Sc(e,t,D)}}function Gg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){qg(e,t,a)},function(a){return Sc(e,t,a)}):qg(e,t,n)}function qg(e,t,n){t.status="fulfilled",t.value=n,Fg(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Bg(e,n)))}function Sc(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Fg(t),t=t.next;while(t!==a)}e.action=null}function Fg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $g(e,t){return t}function kg(e,t){if(Se){var n=ke.formState;if(n!==null){e:{var a=me;if(Se){if(Ye){t:{for(var o=Ye,r=hn;o.nodeType!==8;){if(!r){o=null;break t}if(o=mn(o.nextSibling),o===null){o=null;break t}}r=o.data,o=r==="F!"||r==="F"?o:null}if(o){Ye=mn(o.nextSibling),a=o.data==="F!";break e}}pl(a)}a=!1}a&&(t=n[0])}}return n=Ot(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$g,lastRenderedState:t},n.queue=a,n=rm.bind(null,me,a),a.dispatch=n,a=yc(!1),r=Rc.bind(null,me,!1,a.queue),a=Ot(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,n=yS.bind(null,me,o,r,n),o.dispatch=n,a.memoizedState=e,[t,n,!1]}function Qg(e){var t=et();return Yg(t,$e,e)}function Yg(e,t,n){if(t=pc(e,t,$g)[0],e=to(ll)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Ts(t)}catch(h){throw h===fi?Qu:h}else a=t;t=et();var o=t.queue,r=o.dispatch;return n!==t.memoizedState&&(me.flags|=2048,mi(9,{destroy:void 0},SS.bind(null,o,n),null)),[a,r,e]}function SS(e,t){e.action=t}function Xg(e){var t=et(),n=$e;if(n!==null)return Yg(t,n,e);et(),t=t.memoizedState,n=et();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function mi(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=me.updateQueue,t===null&&(t=Wu(),me.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Zg(){return et().memoizedState}function no(e,t,n,a){var o=Ot();me.flags|=e,o.memoizedState=mi(1|t,{destroy:void 0},n,a===void 0?null:a)}function lo(e,t,n,a){var o=et();a=a===void 0?null:a;var r=o.memoizedState.inst;$e!==null&&a!==null&&cc(a,$e.memoizedState.deps)?o.memoizedState=mi(t,r,n,a):(me.flags|=e,o.memoizedState=mi(1|t,r,n,a))}function Kg(e,t){no(8390656,8,e,t)}function xc(e,t){lo(2048,8,e,t)}function xS(e){me.flags|=4;var t=me.updateQueue;if(t===null)t=Wu(),me.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ig(e){var t=et().memoizedState;return xS({ref:t,nextImpl:e}),function(){if((Oe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Jg(e,t){return lo(4,2,e,t)}function Pg(e,t){return lo(4,4,e,t)}function Wg(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 em(e,t,n){n=n!=null?n.concat([e]):null,lo(4,4,Wg.bind(null,t,e),n)}function bc(){}function tm(e,t){var n=et();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&cc(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function nm(e,t){var n=et();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&cc(t,a[1]))return a[0];if(a=e(),Ca){fl(!0);try{e()}finally{fl(!1)}}return n.memoizedState=[a,t],a}function Cc(e,t,n){return n===void 0||(nl&1073741824)!==0&&(we&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=dp(),me.lanes|=e,Tl|=e,n)}function lm(e,t,n,a){return It(n,t)?n:Cl.current!==null?(e=Cc(e,n,a),It(e,t)||(at=!0),e):(nl&106)===0||(nl&1073741824)!==0&&(we&261930)===0?(at=!0,e.memoizedState=n):(e=dp(),me.lanes|=e,Tl|=e,t)}function am(e,t,n,a,o){var r=oe.p;oe.p=r!==0&&8>r?r:8;var h=ee.T,p={};p.types=h!==null?h.types:null,ee.T=p,Rc(e,!1,t,n);try{var w=o(),D=ee.S;if(D!==null&&D(p,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var V=mS(w,a);Ms(e,t,V,tn(e))}else Ms(e,t,a,tn(e))}catch(q){Ms(e,t,{then:function(){},status:"rejected",reason:q},tn())}finally{oe.p=r,h!==null&&p.types!==null&&(h.types=p.types),ee.T=h}}function bS(){}function Ec(e,t,n,a){if(e.tag!==5)throw Error(u(476));var o=im(e).queue;am(e,o,t,an,n===null?bS:function(){return sm(e),n(a)})}function im(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:an,baseState:an,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:an},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function sm(e){var t=im(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},tn())}function wc(){return yt(Di)}function um(){return et().memoizedState}function om(){return et().memoizedState}function CS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=tn();e=xl(n);var a=bl(t,e,n);a!==null&&(kt(a,t,n),Es(a,t,n)),t={cache:Pr()},e.payload=t;return}t=t.return}}function ES(e,t,n){var a=tn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ao(e)?cm(t,n):(n=$r(e,t,n,a),n!==null&&(kt(n,e,a),fm(n,t,a)))}function rm(e,t,n){var a=tn();Ms(e,t,n,a)}function Ms(e,t,n,a){var o={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ao(e))cm(t,o);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var h=t.lastRenderedState,p=r(h,n);if(o.hasEagerState=!0,o.eagerState=p,It(p,h))return Uu(e,t,o,0),ke===null&&Du(),!1}catch{}finally{}if(n=$r(e,t,o,a),n!==null)return kt(n,e,a),fm(n,t,a),!0}return!1}function Rc(e,t,n,a){if(a={lane:2,revertLane:pf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ao(e)){if(t)throw Error(u(479))}else t=$r(e,n,a,2),t!==null&&kt(t,e,2)}function ao(e){var t=e.alternate;return e===me||t!==null&&t===me}function cm(e,t){hi=Ju=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fm(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,dh(e,n)}}var io={readContext:yt,use:eo,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe,useEffectEvent:Pe},dm={readContext:yt,use:eo,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:Kg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,no(4194308,4,Wg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return no(4194308,4,e,t)},useInsertionEffect:function(e,t){no(4,2,e,t)},useMemo:function(e,t){var n=Ot();t=t===void 0?null:t;var a=e();if(Ca){fl(!0);try{e()}finally{fl(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Ot();if(n!==void 0){var o=n(t);if(Ca){fl(!0);try{n(t)}finally{fl(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=ES.bind(null,me,e),[a.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=yc(e);var t=e.queue,n=rm.bind(null,me,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bc,useDeferredValue:function(e,t){var n=Ot();return Cc(n,e,t)},useTransition:function(){var e=yc(!1);return e=am.bind(null,me,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=me,o=Ot();if(Se){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),ke===null)throw Error(u(349));(we&127)!==0||zg(a,t,n)}o.memoizedState=n;var r={value:n,getSnapshot:t};return o.queue=r,Kg(Ug.bind(null,a,r,e),[e]),a.flags|=2048,mi(9,{destroy:void 0},Dg.bind(null,a,r,n,t),null),n},useId:function(){var e=Ot(),t=ke.identifierPrefix;if(Se){var n=On,a=An;n=(a&~(1<<32-Zt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Pu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=pS++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wc,useFormState:kg,useActionState:kg,useOptimistic:function(e){var t=Ot();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,me,!0,n),n.dispatch=t,[e,t]},useMemoCache:mc,useCacheRefresh:function(){return Ot().memoizedState=CS.bind(null,me)},useEffectEvent:function(e){var t=Ot(),n={impl:e};return t.memoizedState=n,function(){if((Oe&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},hm={readContext:yt,use:eo,useCallback:tm,useContext:yt,useEffect:xc,useImperativeHandle:em,useInsertionEffect:Jg,useLayoutEffect:Pg,useMemo:nm,useReducer:to,useRef:Zg,useState:function(){return to(ll)},useDebugValue:bc,useDeferredValue:function(e,t){var n=et();return lm(n,$e.memoizedState,e,t)},useTransition:function(){var e=to(ll)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Ts(e),t]},useSyncExternalStore:Og,useId:um,useHostTransitionStatus:wc,useFormState:Qg,useActionState:Qg,useOptimistic:function(e,t){var n=et();return Vg(n,$e,e,t)},useMemoCache:mc,useCacheRefresh:om,useEffectEvent:Ig},wS={readContext:yt,use:eo,useCallback:tm,useContext:yt,useEffect:xc,useImperativeHandle:em,useInsertionEffect:Jg,useLayoutEffect:Pg,useMemo:nm,useReducer:vc,useRef:Zg,useState:function(){return vc(ll)},useDebugValue:bc,useDeferredValue:function(e,t){var n=et();return $e===null?Cc(n,e,t):lm(n,$e.memoizedState,e,t)},useTransition:function(){var e=vc(ll)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Ts(e),t]},useSyncExternalStore:Og,useId:um,useHostTransitionStatus:wc,useFormState:Xg,useActionState:Xg,useOptimistic:function(e,t){var n=et();return $e!==null?Vg(n,$e,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:mc,useCacheRefresh:om,useEffectEvent:Ig};function _c(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:X({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nc={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=tn(),o=xl(a);o.payload=t,n!=null&&(o.callback=n),t=bl(e,o,a),t!==null&&(kt(t,e,a),Es(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=tn(),o=xl(a);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=bl(e,o,a),t!==null&&(kt(t,e,a),Es(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tn(),a=xl(n);a.tag=2,t!=null&&(a.callback=t),t=bl(e,a,n),t!==null&&(kt(t,e,n),Es(t,e,n))}};function gm(e,t,n,a,o,r,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,h):t.prototype&&t.prototype.isPureReactComponent?!ms(n,a)||!ms(o,r):!0}function mm(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Nc.enqueueReplaceState(t,t.state,null)}function Ea(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=X({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function pm(e){zu(e)}function vm(e){console.error(e)}function ym(e){zu(e)}function so(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Sm(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Tc(e,t,n){return n=xl(n),n.tag=3,n.payload={element:null},n.callback=function(){so(e,t)},n}function xm(e){return e=xl(e),e.tag=3,e}function bm(e,t,n,a){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var r=a.value;e.payload=function(){return o(r)},e.callback=function(){Sm(t,n,a)}}var h=n.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Sm(t,n,a),typeof o!="function"&&(Ml===null?Ml=new Set([this]):Ml.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function RS(e,t,n,a,o){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&ma(t,n,o,!0),n=St.current,n!==null){switch(n.tag){case 31:case 13:case 19:return _t===null?To():n.alternate===null&&We===0&&(We=3),n.flags&=-257,n.flags|=65536,n.lanes=o,a===Yu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),hf(e,a,o)),!1;case 22:return n.flags|=65536,a===Yu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),hf(e,a,o)),!1}throw Error(u(435,n.tag))}return hf(e,a,o),To(),!1}if(Se)return t=St.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==Zr&&(e=Error(u(422),{cause:a}),ys(cn(e,n)))):(a!==Zr&&(t=Error(u(423),{cause:a}),ys(cn(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=cn(a,n),o=Tc(e.stateNode,a,o),ac(e,o),We!==4&&(We=2)),!1;var r=Error(u(520),{cause:a});if(r=cn(r,n),Ls===null?Ls=[r]:Ls.push(r),We!==4&&(We=2),t===null)return!0;a=cn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Tc(n.stateNode,a,e),ac(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Ml===null||!Ml.has(r))))return n.flags|=65536,o&=-o,n.lanes|=o,o=xm(o),bm(o,e,n,a),ac(n,o),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(u(461)),at=!1;function ot(e,t,n,a){t.child=e===null?Rg(t,null,n,a):ba(t,e.child,n,a)}function Cm(e,t,n,a,o){n=n.render;var r=t.ref;if("ref"in a){var h={};for(var p in a)p!=="ref"&&(h[p]=a[p])}else h=a;return pa(t),a=fc(e,t,n,h,r,o),p=dc(),e!==null&&!at?(hc(e,t,o),al(e,t,o)):(Se&&p&&Bu(t),t.flags|=1,ot(e,t,a,o),t.child)}function Em(e,t,n,a,o){if(e===null){var r=n.type;return typeof r=="function"&&!kr(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,wm(e,t,r,a,o)):(e=Lu(n.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!Lc(e,o)){var h=r.memoizedProps;if(n=n.compare,n=n!==null?n:ms,n(h,a)&&e.ref===t.ref)return al(e,t,o)}return t.flags|=1,e=Pn(r,a),e.ref=t.ref,e.return=t,t.child=e}function wm(e,t,n,a,o){if(e!==null){var r=e.memoizedProps;if(ms(r,a)&&e.ref===t.ref)if(at=!1,t.pendingProps=a=r,Lc(e,o))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,al(e,t,o)}return jc(e,t,n,a,o)}function Rm(e,t,n,a){var o=a.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|n:n,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~r}else a=0,t.child=null;return _m(e,t,r,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ku(t,r!==null?r.cachePool:null),r!==null?Tg(t,r):sc(),Mg(t);else return a=t.lanes=536870912,_m(e,t,r!==null?r.baseLanes|n:n,n,a)}else r!==null?(ku(t,r.cachePool),Tg(t,r),wl(),t.memoizedState=null):(e!==null&&ku(t,null),sc(),wl());return ot(e,t,o,n),t.child}function js(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function _m(e,t,n,a,o){var r=ec();return r=r===null?null:{parent:nt._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&ku(t,null),sc(),Mg(t),e!==null&&ma(e,t,a,!0),t.childLanes=o,null}function uo(e,t){return t=oo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Nm(e,t,n){return ba(t,e.child,null,n),e=uo(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function _S(e,t,n){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(a.mode==="hidden")return e=uo(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},js(null,e);if(oc(t),(e=Ye)?(e=Wp(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gl!==null?{id:An,overflow:On}:null,retryLane:536870912,hydrationErrors:null},n=cg(e),n.return=t,t.child=n,ft=t,Ye=null)):e=null,e===null)throw pl(t);return t.lanes=536870912,null}return uo(t,a)}var r=e.memoizedState;if(r!==null){var h=r.dehydrated;if(oc(t),o)if(t.flags&256)t.flags&=-257,t=Nm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(at||ma(e,t,n,!1),o=(n&e.childLanes)!==0,at||o){if(Cl.current===null){if(a=ke,a!==null&&(h=hh(a,n),h!==0&&h!==r.retryLane))throw r.retryLane=h,fa(e,h),kt(a,e,h),Mc;To()}t=Nm(e,t,n)}else e=r.treeContext,Ye=mn(h.nextSibling),ft=t,Se=!0,ml=null,hn=!1,e!==null&&hg(t,e),t=uo(t,a),t.flags|=134221824;return t}return e=Pn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pi(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(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function jc(e,t,n,a,o){return pa(t),n=fc(e,t,n,a,void 0,o),a=dc(),e!==null&&!at?(hc(e,t,o),al(e,t,o)):(Se&&a&&Bu(t),t.flags|=1,ot(e,t,n,o),t.child)}function Tm(e,t,n,a,o,r){return pa(t),t.updateQueue=null,n=Ag(t,a,n,o),jg(e),a=dc(),e!==null&&!at?(hc(e,t,r),al(e,t,r)):(Se&&a&&Bu(t),t.flags|=1,ot(e,t,n,r),t.child)}function Mm(e,t,n,a,o){if(pa(t),t.stateNode===null){var r=si,h=n.contextType;typeof h=="object"&&h!==null&&(r=yt(h)),r=new n(a,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Nc,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=a,r.state=t.memoizedState,r.refs={},nc(t),h=n.contextType,r.context=typeof h=="object"&&h!==null?yt(h):si,r.state=t.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(_c(t,n,h,a),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(h=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),h!==r.state&&Nc.enqueueReplaceState(r,r.state,null),Rs(t,a,r,o),ws(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){r=t.stateNode;var p=t.memoizedProps,w=Ea(n,p);r.props=w;var D=r.context,V=n.contextType;h=si,typeof V=="object"&&V!==null&&(h=yt(V));var q=n.getDerivedStateFromProps;V=typeof q=="function"||typeof r.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,V||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(p||D!==h)&&mm(t,r,a,h),Sl=!1;var A=t.memoizedState;r.state=A,Rs(t,a,r,o),ws(),D=t.memoizedState,p||A!==D||Sl?(typeof q=="function"&&(_c(t,n,q,a),D=t.memoizedState),(w=Sl||gm(t,n,w,a,A,D,h))?(V||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=D),r.props=a,r.state=D,r.context=h,a=w):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{r=t.stateNode,lc(e,t),h=t.memoizedProps,V=Ea(n,h),r.props=V,q=t.pendingProps,A=r.context,D=n.contextType,w=si,typeof D=="object"&&D!==null&&(w=yt(D)),p=n.getDerivedStateFromProps,(D=typeof p=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(h!==q||A!==w)&&mm(t,r,a,w),Sl=!1,A=t.memoizedState,r.state=A,Rs(t,a,r,o),ws();var L=t.memoizedState;h!==q||A!==L||Sl||e!==null&&e.dependencies!==null&&Fu(e.dependencies)?(typeof p=="function"&&(_c(t,n,p,a),L=t.memoizedState),(V=Sl||gm(t,n,V,a,A,L,w)||e!==null&&e.dependencies!==null&&Fu(e.dependencies))?(D||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(a,L,w),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(a,L,w)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||h===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=L),r.props=a,r.state=L,r.context=w,a=V):(typeof r.componentDidUpdate!="function"||h===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),a=!1)}return r=a,pi(e,t),a=(t.flags&128)!==0,r||a?(r=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&a?(t.child=ba(t,e.child,null,o),t.child=ba(t,null,n,o)):ot(e,t,n,o),t.memoizedState=r.state,e=t.child):e=al(e,t,o),e}function jm(e,t,n,a){return ha(),t.flags|=256,ot(e,t,n,a),t.child}var Ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(e){return{baseLanes:e,cachePool:Sg()}}function zc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=en),e}function Am(e,t,n){var a=t.pendingProps,o=!1,r=(t.flags&128)!==0,h;if((h=r)||(h=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(o?El(t):wl(),(e=Ye)?(e=Wp(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gl!==null?{id:An,overflow:On}:null,retryLane:536870912,hydrationErrors:null},n=cg(e),n.return=t,t.child=n,ft=t,Ye=null)):e=null,e===null)throw pl(t);return zf(e)?t.lanes=32:t.lanes=536870912,null}return r=a.children,a=a.fallback,o?(wl(),o=t.mode,r=oo({mode:"hidden",children:r},o),a=da(a,o,n,null),r.return=t,a.return=t,r.sibling=a,t.child=r,a=t.child,a.memoizedState=Oc(n),a.childLanes=zc(e,h,n),t.memoizedState=Ac,js(null,a)):(El(t),Dc(t,r))}var p=e.memoizedState;if(p!==null){var w=p.dehydrated;if(w!==null)return NS(e,t,r,h,a,w,p,n)}return o?(wl(),o=a.fallback,r=t.mode,p=e.child,w=p.sibling,a=Pn(p,{mode:"hidden",children:a.children}),a.subtreeFlags=p.subtreeFlags&1206910976,w!==null?o=Pn(w,o):(o=da(o,r,n,null),o.flags|=2),o.return=t,a.return=t,a.sibling=o,t.child=a,js(null,a),a=t.child,o=e.child.memoizedState,o===null?o=Oc(n):(r=o.cachePool,r!==null?(p=nt._currentValue,r=r.parent!==p?{parent:p,pool:p}:r):r=Sg(),o={baseLanes:o.baseLanes|n,cachePool:r}),a.memoizedState=o,a.childLanes=zc(e,h,n),t.memoizedState=Ac,js(e.child,a)):(El(t),n=e.child,e=n.sibling,n=Pn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=oo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function oo(e,t){return e=Gt(22,e,null,t),e.lanes=0,e}function ro(e,t,n){return ba(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function NS(e,t,n,a,o,r,h,p){if(n)return t.flags&256?(El(t),t.flags&=-257,ro(e,t,p)):t.memoizedState!==null?(wl(),t.child=e.child,t.flags|=128,null):(wl(),r=o.fallback,h=t.mode,o=oo({mode:"visible",children:o.children},h),r=da(r,h,p,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,ba(t,e.child,null,p),o=t.child,o.memoizedState=Oc(p),o.childLanes=zc(e,a,p),t.memoizedState=Ac,js(null,o));if(El(t),zf(r)){if(a=r.nextSibling&&r.nextSibling.dataset,a)var w=a.dgst;return a=w,a!==""&&(o=Error(u(419)),o.stack="",o.digest=a,ys({value:o,source:null,stack:null})),ro(e,t,p)}if(at||ma(e,t,p,!1),a=(p&e.childLanes)!==0,at||a){if(Cl.current!==null)return ro(e,t,p);if(a=ke,a!==null&&(o=hh(a,p),o!==0&&o!==h.retryLane))throw h.retryLane=o,fa(e,o),kt(a,e,o),Mc;return Of(r)||To(),ro(e,t,p)}return Of(r)?(t.flags|=192,t.child=e.child,null):(e=h.treeContext,Ye=mn(r.nextSibling),ft=t,Se=!0,ml=null,hn=!1,e!==null&&hg(t,e),t=Dc(t,o.children),t.flags|=134221824,t)}function Om(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),qu(e.return,t,n)}function zm(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Iu(n)===null&&(t=e),e=e.sibling}return t}function co(e,t,n,a,o,r){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:o,treeForkCount:r}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=a,h.tail=n,h.tailMode=o,h.treeForkCount=r)}function Uc(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 Hc(e,t,n){var a=t.pendingProps,o=a.revealOrder,r=a.tail;a=a.children;var h=xt.current;if(t.flags&128)return _s(t,h),null;var p=(h&2)!==0;if(p?(h=h&1|2,t.flags|=128):h&=1,_s(t,h),o==="backwards"&&e!==null?(Uc(e),ot(e,t,a,n),Uc(e)):ot(e,t,a,n),a=Se?vs:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Om(e,n,t);else if(e.tag===19)Om(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"backwards":n=zm(t.child),n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null,Uc(t)),co(t,!0,o,null,r,a);break;case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Iu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}co(t,!0,n,null,r,a);break;case"together":co(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:n=zm(t.child),n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),co(t,!1,o,n,r,a)}return t.child}function Dm(e,t,n){var a=t.pendingProps;return vl(t,t.type,a.value),ot(e,t,a.children,n),t.child}function al(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ma(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Lc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Fu(e)))}function TS(e,t,n){switch(t.tag){case 3:aa(t,t.stateNode.containerInfo),vl(t,nt,e.memoizedState.cache),ha();break;case 27:case 5:Fa(t);break;case 4:aa(t,t.stateNode.containerInfo);break;case 10:vl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oc(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return El(t),t.flags|=128,null;a=ma(e,t,n,!1);var o=t.child.childLanes;return a||(n&o)!==0?Am(e,t,n):(El(t),e=al(e,t,n),e!==null?e.sibling:null)}El(t);break;case 19:if(t.flags&128)return Hc(e,t,n);if(o=(e.flags&128)!==0,a=(n&t.childLanes)!==0,a||(ma(e,t,n,!1),a=(n&t.childLanes)!==0),o){if(a)return Hc(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),_s(t,xt.current),a)break;return null;case 22:return t.lanes=0,Rm(e,t,n,t.pendingProps);case 24:vl(t,nt,e.memoizedState.cache)}return al(e,t,n)}function Um(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!Lc(e,n)&&(t.flags&128)===0)return at=!1,TS(e,t,n);at=(e.flags&131072)!==0}else at=!1,Se&&(t.flags&1048576)!==0&&dg(t,vs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Sa(t.elementType),t.type=e,typeof e=="function")kr(e)?(a=Ea(e,a),t.tag=1,t=Mm(null,t,e,a,n)):(t.tag=0,t=jc(null,t,e,a,n));else{if(e!=null){var o=e.$$typeof;if(o===Y){t.tag=11,t=Cm(null,t,e,a,n);break e}else if(o===Ne){t.tag=14,t=Em(null,t,e,a,n);break e}else if(o===Qe){t.tag=10,t.type=e,t=Dm(null,t,n);break e}}throw t=xe(e)||e,Error(u(306,t,""))}}return t;case 0:return jc(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,o=Ea(a,t.pendingProps),Mm(e,t,a,o,n);case 3:e:{if(aa(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var r=t.memoizedState;o=r.element,lc(e,t),Rs(t,a,null,n);var h=t.memoizedState;if(a=h.cache,vl(t,nt,a),a!==r.cache&&Jr(t,[nt],n,!0),ws(),a=h.element,r.isDehydrated)if(r={element:a,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=jm(e,t,a,n);break e}else if(a!==o){o=cn(Error(u(424)),t),ys(o),t=jm(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ye=mn(e.firstChild),ft=t,Se=!0,ml=null,hn=!0,n=Rg(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ha(),a===o){t=al(e,t,n);break e}ot(e,t,a,n)}t=t.child}return t;case 26:return pi(e,t),e===null?(n=sv(t.type,null,t.pendingProps,null))?t.memoizedState=n:Se||(t.stateNode=Bp(t.type,t.pendingProps,yn.current,t)):t.memoizedState=sv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Fa(t),e===null&&Se&&(a=t.stateNode=nv(t.type,t.pendingProps,yn.current),ft=t,hn=!0,o=Ye,Ol(t.type)?(Df=o,Ye=mn(a.firstChild)):Ye=o),ot(e,t,t.pendingProps.children,n),pi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((o=a=Ye)&&(a=Cx(a,t.type,t.pendingProps,hn),a!==null?(t.stateNode=a,ft=t,Ye=mn(a.firstChild),hn=!1,o=!0):o=!1),o||pl(t)),Fa(t),o=t.type,r=t.pendingProps,h=e!==null?e.memoizedProps:null,a=r.children,Rf(o,r)?a=null:h!==null&&Rf(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=fc(e,t,vS,null,null,n),Di._currentValue=o),pi(e,t),ot(e,t,a,n),t.child;case 6:return e===null&&Se&&((e=n=Ye)&&(n=Ex(n,t.pendingProps,hn),n!==null?(t.stateNode=n,ft=t,Ye=null,e=!0):e=!1),e||pl(t)),null;case 13:return Am(e,t,n);case 4:return aa(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ba(t,null,a,n):ot(e,t,a,n),t.child;case 11:return Cm(e,t,t.type,t.pendingProps,n);case 7:return a=t.pendingProps,pi(e,t),ot(e,t,a,n),t.child;case 8:return ot(e,t,t.pendingProps.children,n),t.child;case 12:return ot(e,t,t.pendingProps.children,n),t.child;case 10:return Dm(e,t,n);case 9:return o=t.type._context,a=t.pendingProps.children,pa(t),o=yt(o),a=a(o),t.flags|=1,ot(e,t,a,n),t.child;case 14:return Em(e,t,t.type,t.pendingProps,n);case 15:return wm(e,t,t.type,t.pendingProps,n);case 19:return Hc(e,t,n);case 31:return _S(e,t,n);case 22:return Rm(e,t,n,t.pendingProps);case 24:return pa(t),a=yt(nt),e===null?(o=ec(),o===null&&(o=ke,r=Pr(),o.pooledCache=r,r.refCount++,r!==null&&(o.pooledCacheLanes|=n),o=r),t.memoizedState={parent:a,cache:o},nc(t),vl(t,nt,o)):((e.lanes&n)!==0&&(lc(e,t),Rs(t,null,null,n),ws()),o=e.memoizedState,r=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),vl(t,nt,a)):(a=r.cache,vl(t,nt,a),a!==o.cache&&Jr(t,[nt],n,!0))),ot(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:Se&&Bu(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:pi(e,t),ot(e,t,a.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function il(e){e.flags|=4}function Vc(e,t,n,a,o){var r;if((r=(e.mode&32)!==0)&&(r=n===null?cv(t,a):cv(t,a)&&(a.src!==n.src||a.srcSet!==n.srcSet)),r){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(pp())e.flags|=8192;else throw xa=Yu,tc}else e.flags&=-16777217}function Hm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!fv(t))if(pp())e.flags|=8192;else throw xa=Yu,tc}function fo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ch():536870912,e.lanes|=t,bi|=t)}function As(e,t){if(!Se)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.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 Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags&1206910976,a|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function MS(e,t,n){var a=t.pendingProps;switch(Xr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),tl(nt),Yn(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ri(t)?il(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Kr())),Xe(t),null;case 26:var o=t.type,r=t.memoizedState;return e===null?(il(t),r!==null?(Xe(t),Hm(t,r)):(Xe(t),Vc(t,o,null,a,n))):r?r!==e.memoizedState?(il(t),Xe(t),Hm(t,r)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&il(t),Xe(t),Vc(t,o,e,a,n)),null;case 27:if(ia(t),n=yn.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Xe(t),t.subtreeFlags&=-33554433,null}e=Vt.current,ri(t)?gg(t):(e=nv(o,a,n),t.stateNode=e,il(t))}return Xe(t),t.subtreeFlags&=-33554433,null;case 5:if(ia(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Xe(t),t.subtreeFlags&=-33554433,null}if(r=Vt.current,ri(t))gg(t);else{var h=Fs(yn.current);switch(r){case 1:r=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:r=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":r=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":r=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":r=h.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof a.is=="string"?h.createElement("select",{is:a.is}):h.createElement("select"),a.multiple?r.multiple=!0:a.size&&(r.size=a.size);break;default:r=typeof a.is=="string"?h.createElement(o,{is:a.is}):h.createElement(o)}}r[vt]=t,r[Bt]=a;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)r.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=r;e:switch(Ct(r,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&il(t)}}return Xe(t),t.subtreeFlags&=-33554433,Vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=yn.current,ri(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,o=ft,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[vt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Up(e.nodeValue,n)),e||pl(t,!0)}else e=Fs(e).createTextNode(a),e[vt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=ri(t),n!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[vt]=t}else ha(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=Kr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Xe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=ri(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(u(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(u(317));o[vt]=t}else ha(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),o=!1}else o=Kr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==o&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fo(t,t.updateQueue),Xe(t),null);case 4:return Yn(),e===null&&xf(t.stateNode.containerInfo),t.flags|=67108864,Xe(t),null;case 10:return tl(t.type),Xe(t),null;case 19:if(rc(t),a=t.memoizedState,a===null)return Xe(t),null;if(o=(t.flags&128)!==0,r=a.rendering,r===null)if(o)As(a,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Iu(e),r!==null){for(t.flags|=128,As(a,!1),e=r.updateQueue,t.updateQueue=e,fo(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)rg(n,e),n=n.sibling;return _s(t,xt.current&1|2),Se&&Wn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&jt()>wo&&(t.flags|=128,o=!0,As(a,!1),t.lanes=4194304)}else{if(!o)if(e=Iu(r),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,fo(t,e),As(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!r.alternate&&!Se)return Xe(t),null}else 2*jt()-a.renderingStartTime>wo&&n!==536870912&&(t.flags|=128,o=!0,As(a,!1),t.lanes=4194304);a.isBackwards?(r.sibling=t.child,t.child=r):(e=a.last,e!==null?e.sibling=r:t.child=r,a.last=r)}if(a.tail!==null){e=a.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=jt(),e.sibling=null,r=xt.current,r=o?r&1|2:r&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!n||Se?_s(t,r):(n=r,Fe(St,t),Fe(xt,n),_t===null&&(_t=t)),Se&&Wn(t,a.treeForkCount),e}return Xe(t),null;case 22:case 23:return Jt(t),uc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&fo(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&tt(ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),tl(nt),Xe(t),null;case 25:return null;case 30:return t.flags|=33554432,Xe(t),null}throw Error(u(156,t.tag))}function jS(e,t){switch(Xr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tl(nt),Yn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ia(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(u(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rc(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 Yn(),null;case 10:return tl(t.type),null;case 22:case 23:return Jt(t),uc(),e!==null&&tt(ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return tl(nt),null;case 25:return null;default:return null}}function Lm(e,t){switch(Xr(t),t.tag){case 3:tl(nt),Yn();break;case 26:case 27:case 5:ia(t);break;case 4:Yn();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:rc(t);break;case 10:tl(t.type);break;case 22:case 23:Jt(t),uc(),e!==null&&tt(ya);break;case 24:tl(nt)}}function Os(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var o=a.next;n=o;do{if((n.tag&e)===e){a=void 0;var r=n.create,h=n.inst;a=r(),h.destroy=a}n=n.next}while(n!==o)}}catch(p){Be(t,t.return,p)}}function Rl(e,t,n){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var r=o.next;a=r;do{if((a.tag&e)===e){var h=a.inst,p=h.destroy;if(p!==void 0){h.destroy=void 0,o=t;var w=n,D=p;try{D()}catch(V){Be(o,w,V)}}}a=a.next}while(a!==r)}}catch(V){Be(t,t.return,V)}}function Vm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ng(t,n)}catch(a){Be(e,e.return,a)}}}function Bm(e,t,n){n.props=Ea(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Be(e,t,a)}}function zn(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var o=e.stateNode,r=In(e.memoizedProps,o);(o.ref===null||o.ref.name!==r)&&(o.ref=Yp(r)),a=o.ref;break;case 7:if(e.stateNode===null){var h=new nn(e);x(e.child,!1,xx,h,void 0,void 0),e.stateNode=h}a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(p){Be(e,t,p)}}function bt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(o){Be(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Be(e,t,o)}else n.current=null}function ho(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++)Pp(e.stateNode,t[n])}function Gm(e){for(var t=e.return;t!==null&&(Gc(t)&&Pp(e.stateNode,t.stateNode),!Bc(t));)t=t.return}function zs(e){for(var t=e.return;t!==null&&(Gc(t)&&bx(e.stateNode,t.stateNode),!Bc(t));)t=t.return}function Bc(e){return e.tag===5||e.tag===3||e.tag===27}function Gc(e){return e&&e.tag===7&&e.stateNode!==null}function qc(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(o){Be(e,e.return,o)}}function Fc(e,t,n){try{var a=e.stateNode;nx(a,e.type,n,t),a[Bt]=t}catch(o){Be(e,e.return,o)}}function qm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ol(e.type)||e.tag===4}function $c(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qm(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&&Ol(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kc(e,t,n,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(o,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(o),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=jn)),ho(e,a),Ae=!0;else if(o!==4&&(o===27&&(ho(e,a),a=null,Ol(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(kc(e,t,n,a),e=e.sibling;e!==null;)kc(e,t,n,a),e=e.sibling}function go(e,t,n,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?n.insertBefore(o,t):n.appendChild(o),ho(e,a),Ae=!0;else if(o!==4&&(o===27&&(ho(e,a),a=null,Ol(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(go(e,t,n,a),e=e.sibling;e!==null;)go(e,t,n,a),e=e.sibling}function Fm(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ct(t,a,n),t[vt]=e,t[Bt]=n}catch(r){Be(e,e.return,r)}}var mo=!1,Pt=null;function $m(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(mo=!0)}var Dn=null;function km(){var e=Dn;return Dn=null,e}var qt=0;function vi(e,t,n,a,o){return qt=0,Qm(e.child,t,n,a,o)}function Qm(e,t,n,a,o){for(var r=!1;e!==null;){if(e.tag===5){var h=e.stateNode;if(a!==null){var p=Tf(h);a.push(p),p.view&&(r=!0)}else r||Tf(h).view&&(r=!0);mo=!0,kp(h,qt===0?t:t+"_"+qt,n),qt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||Qm(e.child,t,n,a,o)&&(r=!0));e=e.sibling}return r}function Un(e,t){for(;e!==null;)e.tag===5?Qp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Un(e.child,t)),e=e.sibling}function po(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(po(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(u(544));var n=t.name;t=Jn(t.default,t.share),t!=="none"&&(vi(e,n,t,null,!1)||Un(e.child,!1))}e=e.sibling}}function Qc(e,t){if(e.tag===30){var n=e.stateNode,a=e.memoizedProps,o=In(a,n),r=Jn(a.default,n.paired?a.share:a.enter);r!=="none"?vi(e,o,r,null,!1)?(po(e),n.paired||t||Ri(e,a.onEnter)):Un(e.child,!1):po(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Qc(e,t),e=e.sibling;else po(e)}function Yc(e){if(Pt!==null&&Pt.size!==0){var t=Pt;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var n=e.memoizedProps,a=n.name;if(a!=null&&a!=="auto"){var o=t.get(a);if(o!==void 0){var r=Jn(n.default,n.share);if(r!=="none"&&(vi(e,a,r,null,!1)?(r=e.stateNode,o.paired=r,r.paired=o,Ri(e,n.onShare)):Un(e.child,!1)),t.delete(a),t.size===0)break}}}Yc(e)}e=e.sibling}}}function Xc(e){if(e.tag===30){var t=e.memoizedProps,n=In(t,e.stateNode),a=Pt!==null?Pt.get(n):void 0,o=Jn(t.default,a!==void 0?t.share:t.exit);o!=="none"&&(vi(e,n,o,null,!1)?a!==void 0?(o=e.stateNode,a.paired=o,o.paired=a,Pt.delete(n),Ri(e,t.onShare)):Ri(e,t.onExit):Un(e.child,!1)),Pt!==null&&Yc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Xc(e),e=e.sibling;else Pt!==null&&Yc(e)}function Ym(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=In(t,e.stateNode);t=Jn(t.default,t.update),e.flags&=-5,t!=="none"&&vi(e,n,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Ym(e);e=e.sibling}}function Zc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Un(e.child,!1))}Zc(e)}e=e.sibling}}function vo(e){if(e.tag===30)e.stateNode.paired=null,Un(e.child,!1),Zc(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)vo(e),e=e.sibling;else Zc(e)}function Xm(e){for(e=e.child;e!==null;)e.tag===30?Un(e.child,!1):(e.subtreeFlags&33554432)!==0&&Xm(e),e=e.sibling}function Kc(e,t,n,a,o,r,h){for(var p=!1;t!==null;){if(t.tag===5){var w=t.stateNode;if(r!==null&&qt<r.length){var D=r[qt],V=Tf(w);(D.view||V.view)&&(p=!0);var q;if(q=(e.flags&4)===0)if(V.clip)q=!0;else{q=D.rect;var A=V.rect;q=q.y!==A.y||q.x!==A.x||q.height!==A.height||q.width!==A.width}q&&(e.flags|=4),V.abs?V=!D.abs:(D=D.rect,V=V.rect,V=D.height!==V.height||D.width!==V.width),V&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&kp(w,qt===0?n:n+"_"+qt,o),p&&(e.flags&4)!==0||(Dn===null&&(Dn=[]),Dn.push(w,qt===0?a:a+"_"+qt,t.memoizedProps)),qt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&h?e.flags|=t.flags&32:Kc(e,t.child,n,a,o,r,h)&&(p=!0));t=t.sibling}return p}function Zm(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,a=e.stateNode,o=In(n,a),r=Jn(n.default,n.update),h;h=e.memoizedState,e.memoizedState=null,a=e;var p=e.child;qt=0,o=Kc(a,p,o,o,r,h,!1),(e.flags&4)!==0&&o&&Ri(e,n.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Zm(e);e=e.sibling}}var dt=!1,Ue=!1,Hn=!1,Ic=!1,Km=typeof WeakSet=="function"?WeakSet:Set,ht=null,Ln=!1,Ds=!1,yo=!1,Jc=!1;function AS(e,t,n){if(e=e.containerInfo,Ef=Ui,e=Wh(e),Lr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var r=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var p=0,w=-1,D=-1,V=0,q=0,A=e,L=null;t:for(;;){for(var Q;A!==a||r!==0&&A.nodeType!==3||(w=p+r),A!==h||o!==0&&A.nodeType!==3||(D=p+o),A.nodeType===3&&(p+=A.nodeValue.length),(Q=A.firstChild)!==null;)L=A,A=Q;for(;;){if(A===e)break t;if(L===a&&++V===r&&(w=p),L===h&&++q===o&&(D=p),(Q=A.nextSibling)!==null)break;A=L,L=A.parentNode}A=Q}a=w===-1||D===-1?null:{start:w,end:D}}else a=null}a=a||{start:0,end:0}}else a=null;for(wf={focusedElem:e,selectionRange:a},Ui=!1,n=(n&335544064)===n,ht=t,t=n?9270:1024;ht!==null;){if(e=ht,n&&(a=e.deletions,a!==null))for(r=0;r<a.length;r++)n&&Xc(a[r]);if(e.alternate===null&&(e.flags&2)!==0)n&&$m(e),So(n);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&n&&Xc(a),So(n);continue}else if(a!==null&&a.memoizedState!==null){n&&$m(e),So(n);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,ht=a):(n&&Ym(e),So(n))}}Pt=null}function So(e){for(;ht!==null;){var t=ht,n=e,a=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&a!==null){n=void 0,o=a.memoizedProps,a=a.memoizedState;var r=t.stateNode;try{var h=Ea(t.type,o);n=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=n}catch(p){Be(t,t.return,p)}}break;case 3:if((o&1024)!==0){if(a=t.stateNode.containerInfo,n=a.nodeType,n===9)Af(a);else if(n===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Af(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&a!==null&&(n=In(a.memoizedProps,a.stateNode),o=t.memoizedProps,o=Jn(o.default,o.update),o!=="none"&&vi(a,n,o,a.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(u(163))}if(a=t.sibling,a!==null){a.return=t.return,ht=a;break}ht=t.return}}function Im(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Vn(e,n),a&4&&Os(5,n);break;case 1:if(Vn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(h){Be(n,n.return,h)}else{var o=Ea(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Be(n,n.return,h)}}a&64&&Vm(n),a&512&&zn(n,n.return);break;case 3:if(Vn(e,n),a&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{Ng(e,t)}catch(h){Be(n,n.return,h)}}break;case 27:t===null&&a&4&&Fm(n);case 26:case 5:Vn(e,n),t===null&&a&4&&qc(n),a&512&&zn(n,n.return);break;case 12:Vn(e,n);break;case 31:Vn(e,n),a&4&&ep(e,n);break;case 13:Vn(e,n),a&4&&tp(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=$S.bind(null,n),wx(e,n))));break;case 22:if(a=n.memoizedState!==null||dt,!a){var r=t!==null&&t.memoizedState!==null||Ue;t=dt,o=Ue,dt=a,(Ue=r)&&!o?(a=2,(n.subtreeFlags&8772)!==0&&(a|=1),En(e,n,a)):Vn(e,n),dt=t,Ue=o}break;case 30:Vn(e,n),a&512&&zn(n,n.return);break;case 7:a&512&&zn(n,n.return);default:Vn(e,n)}}function Pc(e,t){for(e=e.child;e!==null;)Jm(e,t),e=e.sibling}function Jm(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var a=n.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var o=e.stateNode,r=e.memoizedProps.style,h=r!=null&&r.hasOwnProperty("display")?r.display:null;o.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(w){Be(e,e.return,w)}Wc(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ae=!0}catch(w){Be(e,e.return,w)}break;case 18:try{var p=e.stateNode;t?$p(p,!0):$p(e.stateNode,!1)}catch(w){Be(e,e.return,w)}break;case 22:case 23:e.memoizedState===null&&Pc(e,t);break;default:Pc(e,t)}}function Wc(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,a=t;switch(n.tag){case 4:Jm(n,a);break e;case 22:n.memoizedState===null&&Wc(n,a);break e;default:Wc(n,a)}}e=e.sibling}}function Pm(e){var t=e.alternate;t!==null&&(e.alternate=null,Pm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Eu(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 Ze=null,Ft=!1;function bn(e,t,n){for(n=n.child;n!==null;)Wm(e,t,n),n=n.sibling}function Wm(e,t,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(ls,n)}catch{}switch(n.tag){case 26:Ue||bt(n,t),bn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Ue&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ue||bt(n,t),zs(n);var a=Ze,o=Ft;Ol(n.type)&&(Ze=n.stateNode,Ft=!1),bn(e,t,n),lv(n.stateNode,n.type,n.memoizedProps),Ze=a,Ft=o;break;case 5:Ue||bt(n,t),zs(n);case 6:if(n.tag===6&&zs(n),a=Ze,o=Ft,Ze=null,bn(e,t,n),Ze=a,Ft=o,Ze!==null)if(Ft)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(n.stateNode),Ae=!0}catch(r){Be(n,t,r)}else try{Ze.removeChild(n.stateNode),Ae=!0}catch(r){Be(n,t,r)}break;case 18:Ze!==null&&(Ft?(e=Ze,Fp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Hi(e)):Fp(Ze,n.stateNode));break;case 4:a=Ze,o=Ft,Ze=n.stateNode.containerInfo,Ft=!0,bn(e,t,n),Ze=a,Ft=o;break;case 0:case 11:case 14:case 15:Rl(2,n,t),Ue||Rl(4,n,t),bn(e,t,n);break;case 1:Ue||(bt(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Bm(n,t,a)),bn(e,t,n);break;case 21:bn(e,t,n);break;case 22:Ue=(a=Ue)||n.memoizedState!==null,bn(e,t,n),Ue=a;break;case 30:bt(n,t),bn(e,t,n);break;case 7:Ue||bt(n,t),bn(e,t,n);break;default:bn(e,t,n)}}function ep(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hi(e)}catch(n){Be(t,t.return,n)}}}function tp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hi(e)}catch(n){Be(t,t.return,n)}}function OS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Km),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Km),t;default:throw Error(u(435,e.tag))}}function xo(e,t){var n=OS(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var o=kS.bind(null,e,a);a.then(o,o)}})}function zt(e,t,n){var a=t.deletions;if(a!==null)for(var o=0;o<a.length;o++){var r=a[o],h=e,p=t,w=p;e:for(;w!==null;){switch(w.tag){case 27:if(Ol(w.type)){Ze=w.stateNode,Ft=!1;break e}break;case 5:Ze=w.stateNode,Ft=!1;break e;case 3:case 4:Ze=w.stateNode.containerInfo,Ft=!0;break e}w=w.return}if(Ze===null)throw Error(u(160));Wm(h,p,r),Ze=null,Ft=!1,h=r.alternate,h!==null&&(h.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)np(t,e,n),t=t.sibling}var Cn=null;function np(e,t,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var r=0;r<a.length;r++){var h=a[r];h.ref.impl=h.nextImpl}zt(t,e,n),Dt(e),o&4&&(Rl(3,e,e.return),Os(3,e),Rl(5,e,e.return));break;case 1:zt(t,e,n),Dt(e),o&512&&(Ue||a===null||bt(a,a.return)),o&64&&dt&&(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(r=Cn,zt(t,e,n),Dt(e),o&512&&(Ue||a===null||bt(a,a.return)),o&4)if(o=a!==null?a.memoizedState:null,n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null)if(dt)e.stateNode=Bp(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,o=r.ownerDocument||r;t:switch(t){case"title":a=o.getElementsByTagName("title")[0],(!a||a[ss]||a[vt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=o.createElement(t),o.head.insertBefore(a,o.querySelector("head > title"))),Ct(a,t,n),a[vt]=e,ct(a),t=a;break e;case"link":if(r=rv("link","href",o).get(t+(n.href||""))){for(h=0;h<r.length;h++)if(a=r[h],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(h,1);break t}}a=o.createElement(t),Ct(a,t,n),o.head.appendChild(a);break;case"meta":if(r=rv("meta","content",o).get(t+(n.content||""))){for(h=0;h<r.length;h++)if(a=r[h],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(h,1);break t}}a=o.createElement(t),Ct(a,t,n),o.head.appendChild(a);break;default:throw Error(u(468,t))}a[vt]=e,ct(a),t=a}e.stateNode=t}else dt||Vf(r,e.type,e.stateNode);else e.stateNode=ov(r,n,e.memoizedProps);else o!==n?(o===null?(t=a.stateNode,t===null||Ue||t.parentNode.removeChild(t)):o.count--,n===null?dt||Vf(r,e.type,e.stateNode):ov(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Fc(e,e.memoizedProps,a.memoizedProps);break;case 27:zt(t,e,n),Dt(e),o&512&&(Ue||a===null||bt(a,a.return)),a!==null&&o&4&&Fc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(r=Hn,Hn=!1,zt(t,e,n),Hn=r,Dt(e),o&512&&(Ue||a===null||bt(a,a.return)),e.flags&32){t=e.stateNode;try{Wa(t,""),Ae=!0}catch(V){Be(e,e.return,V)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,Fc(e,t,a!==null?a.memoizedProps:t)),o&1024&&(Ic=!0);break;case 6:if(zt(t,e,n),Dt(e),o&4){if(e.stateNode===null)throw Error(u(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ae=!0}catch(V){Be(e,e.return,V)}}break;case 3:if(Ae=!1,Uo=null,r=Cn,Cn=$s(t.containerInfo),zt(t,e,n),Cn=r,Dt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{Hi(t.containerInfo)}catch(V){Be(e,e.return,V)}Ic&&(Ic=!1,lp(e)),Ae=!1;break;case 4:o=Hn,Hn=dt,a=Eh(),r=Cn,Cn=$s(e.stateNode.containerInfo),zt(t,e,n),Dt(e),Cn=r,Ae&&Ds&&(yo=!0),Ae=a,Hn=o;break;case 12:zt(t,e,n),Dt(e);break;case 31:zt(t,e,n),Dt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xo(e,t)));break;case 13:zt(t,e,n),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Eo=jt()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xo(e,t)));break;case 22:r=e.memoizedState!==null,h=a!==null&&a.memoizedState!==null;var p=dt,w=Ue,D=Hn;dt=p||r,Hn=D||r,Ue=w||h,zt(t,e,n),Ue=w,Hn=D,dt=p,Dt(e),o&8192&&(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,!r||a===null||h||dt||Ue||(t=h||Ue,n=dt,a=Ue,dt=r||dt,Ue=t,_l(e,2),dt=n,Ue=a),!r&&Hn||Pc(e,r)),o&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,xo(e,n))));break;case 19:zt(t,e,n),Dt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xo(e,t)));break;case 30:o&512&&(Ue||a===null||bt(a,a.return)),o=Eh(),r=Ds,h=(n&335544064)===n,p=e.memoizedProps,Ds=h&&Jn(p.default,p.update)!=="none",zt(t,e,n),Dt(e),h&&a!==null&&Ae&&(e.flags|=4),Ds=r,Ae=o;break;case 21:break;case 7:o&512&&(Ue||a===null||bt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:zt(t,e,n),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(qm(a)){n=a;break}a=a.return}a=null;for(var o=e.return;o!==null;){if(Gc(o)){var r=o.stateNode;a===null?a=[r]:a.push(r)}if(Bc(o))break;o=o.return}var h=a;if(n==null)throw Error(u(160));switch(n.tag){case 27:var p=n.stateNode,w=$c(e);go(e,w,p,h);break;case 5:var D=n.stateNode;n.flags&32&&(Wa(D,""),n.flags&=-33);var V=$c(e);go(e,V,D,h);break;case 3:case 4:var q=n.stateNode.containerInfo,A=$c(e);kc(e,A,q,h);break;default:throw Error(u(161))}}catch(L){Be(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function lp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;lp(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ui=!0,t.reset(),Ui=!1),e=e.sibling}}function yi(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ap(t,e),t=t.sibling;else Zm(t)}function ap(e,t){var n=e.alternate;if(n===null)Qc(e,!1);else switch(e.tag){case 3:if(Jc=Ln=!1,km(),yi(t,e),!Ln&&!yo){if(e=Dn,e!==null)for(var a=0;a<e.length;a+=3){n=e[a];var o=e[a+1];Qp(n,e[a+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}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"})),Jc=!0}Dn=null;break;case 5:yi(t,e);break;case 4:a=Ln,Ln=!1,yi(t,e),Ln&&(yo=!0),Ln=a;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?Qc(e,!1):yi(t,e));break;case 30:a=Ln,o=km(),Ln=!1,yi(t,e),Ln&&(e.flags|=4);var r=e.memoizedProps,h=e.stateNode;t=In(r,h),h=In(n.memoizedProps,h);var p=Jn(r.default,r.update);p==="none"?t=!1:(r=n.memoizedState,n.memoizedState=null,n=e.child,qt=0,t=Kc(e,n,t,h,p,r,!0),qt!==(r===null?0:r.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Ri(e,e.memoizedProps.onUpdate),Dn=o):o!==null&&(o.push.apply(o,Dn),Dn=o),Ln=(e.flags&32)!==0?!0:a;break;default:yi(t,e)}}function Vn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Im(e,t.alternate,t),t=t.sibling}function _l(e,t){for(e=e.child;e!==null;){var n=e,a=t;switch(n.tag){case 0:case 11:case 14:case 15:Rl(4,n,n.return),_l(n,a);break;case 1:bt(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&Bm(n,n.return,o),_l(n,a);break;case 27:(a&2)!==0&&lv(n.stateNode,n.type,n.memoizedProps);case 5:bt(n,n.return),n.tag!==5&&n.tag!==27||zs(n),_l(n,a);break;case 6:zs(n);break;case 26:bt(n,n.return),o=n.stateNode,n.memoizedState!==null||o===null||Ue||o.parentNode.removeChild(o),_l(n,a);break;case 22:n.memoizedState===null&&_l(n,a);break;case 30:bt(n,n.return),_l(n,a);break;case 7:bt(n,n.return);default:_l(n,a)}e=e.sibling}}function En(e,t,n){for(n=(t.subtreeFlags&8772)!==0?n:n&-2,t=t.child;t!==null;){var a=t.alternate,o=e,r=t,h=r.flags,p=(n&1)!==0;switch(r.tag){case 0:case 11:case 15:En(o,r,n),Os(4,r);break;case 1:if(En(o,r,n),a=r,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(V){Be(a,a.return,V)}if(a=r,o=a.updateQueue,o!==null){var w=a.stateNode;try{var D=o.shared.hiddenCallbacks;if(D!==null)for(o.shared.hiddenCallbacks=null,o=0;o<D.length;o++)_g(D[o],w)}catch(V){Be(a,a.return,V)}}p&&h&64&&Vm(r),zn(r,r.return);break;case 27:(n&2)!==0&&Fm(r);case 5:r.tag!==5&&r.tag!==27||Gm(r),En(o,r,n),p&&a===null&&h&4&&qc(r),zn(r,r.return);break;case 6:Gm(r);break;case 26:w=r.stateNode,r.memoizedState!==null||w===null||dt||Vf($s(w.ownerDocument),r.type,w),En(o,r,n),p&&a===null&&h&4&&qc(r),zn(r,r.return);break;case 12:En(o,r,n);break;case 31:En(o,r,n),p&&h&4&&ep(o,r);break;case 13:En(o,r,n),p&&h&4&&tp(o,r);break;case 22:r.memoizedState===null&&En(o,r,n),zn(r,r.return);break;case 30:En(o,r,n),zn(r,r.return);break;case 7:zn(r,r.return);default:En(o,r,n)}t=t.sibling}}function ef(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&&Ss(n))}function tf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ss(e))}function gn(e,t,n,a){var o=(n&335544064)===n;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)ip(e,t,n,a),t=t.sibling;else o&&Xm(t)}function ip(e,t,n,a){var o=(n&335544064)===n;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&vo(t);var r=t.flags;switch(t.tag){case 0:case 11:case 15:gn(e,t,n,a),r&2048&&Os(9,t);break;case 1:gn(e,t,n,a);break;case 3:gn(e,t,n,a),o&&Jc&&(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="")),r&2048&&(r=null,t.alternate!==null&&(r=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==r&&(t.refCount++,r!=null&&Ss(r)));break;case 12:if(r&2048){gn(e,t,n,a),r=t.stateNode;try{var h=t.memoizedProps,p=h.id,w=h.onPostCommit;typeof w=="function"&&w(p,t.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(D){Be(t,t.return,D)}}else gn(e,t,n,a);break;case 31:gn(e,t,n,a);break;case 13:gn(e,t,n,a);break;case 23:break;case 22:h=t.stateNode,p=t.alternate,t.memoizedState!==null?(o&&p!==null&&p.memoizedState===null&&vo(p),h._visibility&2?gn(e,t,n,a):Us(e,t)):(o&&p!==null&&p.memoizedState!==null&&vo(t),h._visibility&2?gn(e,t,n,a):(h._visibility|=2,Si(e,t,n,a,(t.subtreeFlags&10256)!==0||!1))),r&2048&&ef(p,t);break;case 24:gn(e,t,n,a),r&2048&&tf(t.alternate,t);break;case 30:o&&(r=t.alternate,r!==null&&(Un(r.child,!0),Un(t.child,!0))),gn(e,t,n,a);break;default:gn(e,t,n,a)}}function Si(e,t,n,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,h=t,p=n,w=a,D=h.flags;switch(h.tag){case 0:case 11:case 15:Si(r,h,p,w,o),Os(8,h);break;case 23:break;case 22:var V=h.stateNode;h.memoizedState!==null?V._visibility&2?Si(r,h,p,w,o):Us(r,h):(V._visibility|=2,Si(r,h,p,w,o)),o&&D&2048&&ef(h.alternate,h);break;case 24:Si(r,h,p,w,o),o&&D&2048&&tf(h.alternate,h);break;default:Si(r,h,p,w,o)}t=t.sibling}}function Us(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,o=a.flags;switch(a.tag){case 22:Us(n,a),o&2048&&ef(a.alternate,a);break;case 24:Us(n,a),o&2048&&tf(a.alternate,a);break;default:Us(n,a)}t=t.sibling}}var wa=8192;function Ra(e,t,n){if(e.subtreeFlags&wa)for(e=e.child;e!==null;)sp(e,t,n),e=e.sibling}function sp(e,t,n){switch(e.tag){case 26:Ra(e,t,n),e.flags&wa&&(e.memoizedState!==null?Vx(n,Cn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&hv(n,e)));break;case 5:Ra(e,t,n),e.flags&wa&&(e=e.stateNode,(t&335544128)===t&&hv(n,e));break;case 3:case 4:var a=Cn;Cn=$s(e.stateNode.containerInfo),Ra(e,t,n),Cn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=wa,wa=16777216,Ra(e,t,n),wa=a):Ra(e,t,n));break;case 30:if((e.flags&wa)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var o=e.stateNode;o.paired=null,Pt===null&&(Pt=new Map),Pt.set(a,o)}Ra(e,t,n);break;default:Ra(e,t,n)}}function up(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 Hs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,rp(a,e)}up(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)op(e),e=e.sibling}function op(e){switch(e.tag){case 0:case 11:case 15:Hs(e),e.flags&2048&&Rl(9,e,e.return);break;case 3:Hs(e);break;case 12:Hs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,bo(e)):Hs(e);break;default:Hs(e)}}function bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,rp(a,e)}up(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rl(8,t,t.return),bo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,bo(t));break;default:bo(t)}e=e.sibling}}function rp(e,t){for(;ht!==null;){var n=ht;switch(n.tag){case 0:case 11:case 15:Rl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ss(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ht=a;else e:for(n=e;ht!==null;){a=ht;var o=a.sibling,r=a.return;if(Pm(a),a===n){ht=null;break e}if(o!==null){o.return=r,ht=o;break e}ht=r}}}var zS={getCacheForType:function(e){var t=yt(nt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return yt(nt).controller.signal}},DS=typeof WeakMap=="function"?WeakMap:Map,Oe=0,ke=null,be=null,we=0,Ve=0,Wt=null,Nl=!1,xi=!1,nf=!1,sl=0,We=0,Tl=0,_a=0,Co=0,en=0,bi=0,Ls=null,$t=null,lf=!1,Eo=0,cp=0,wo=1/0,Ro=null,Ml=null,Ie=0,wn=null,Na=null,Bn=0,af=0,sf=null,fp=null,Ci=null,Ei=null,wi=null,Vs=0,_o=null;function tn(){return(Oe&2)!==0&&we!==0?we&-we:ee.T!==null?pf():gh()}function dp(){if(en===0)if((we&536870912)===0||Se){var e=Su;Su<<=1,(Su&3932160)===0&&(Su=262144),en=e}else en=536870912;return e=St.current,e!==null&&(e.flags|=32),en}function Ri(e,t){if(t!=null){var n=e.stateNode,a=n.ref;a===null&&(a=n.ref=Yp(In(e.memoizedProps,n))),Ei===null&&(Ei=[]),Ei.push(t.bind(null,a))}}function kt(e,t,n){(e===ke&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(_i(e,0),jl(e,we,en,!1)),is(e,n),((Oe&2)===0||e!==ke)&&(e===ke&&((Oe&2)===0&&(_a|=n),We===4&&jl(e,we,en,!1)),Gn(e))}function hp(e,t,n){if((Oe&6)!==0)throw Error(u(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||as(e,t),o=a?LS(e,t):of(e,t,!0),r=a;do{if(o===0){xi&&!a&&jl(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!US(n)){o=of(e,t,!1),r=!1;continue}if(o===2){if(r=t,e.errorRecoveryDisabledLanes&r)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var p=e;o=Ls;var w=p.current.memoizedState.isDehydrated;if(w&&(_i(p,h).flags|=256),h=of(p,h,!1),h!==2&&h!==6){if(nf&&!w){p.errorRecoveryDisabledLanes|=r,_a|=r,o=4;break e}r=$t,$t=o,r!==null&&($t===null?$t=r:$t.push.apply($t,r))}o=h}if(r=!1,o!==2)continue}}if(o===1){_i(e,0),jl(e,t,0,!0);break}e:{switch(a=e,r=o,r){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:jl(a,t,en,!Nl);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(o=Eo+300-jt(),10<o)){if(jl(a,t,en,!Nl),bu(a,0,!0)!==0)break e;Bn=t,a.timeoutHandle=Nf(gp.bind(null,a,n,$t,Ro,lf,t,en,_a,bi,Nl,r,"Throttled",-0,0),o);break e}gp(a,n,$t,Ro,lf,t,en,_a,bi,Nl,r,null,-0,0)}}break}while(!0);Gn(e)}function gp(e,t,n,a,o,r,h,p,w,D,V,q,A,L){e.timeoutHandle=-1;var Q=t.subtreeFlags,W=(r&335544064)===r;if(q=null,(W||Q&8192||(Q&16785408)===16785408)&&(q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jn},Pt=null,sp(t,r,q),W&&(Q=q,W=e.containerInfo,W=(W.nodeType===9?W:W.ownerDocument).__reactViewTransition,W!=null&&(Q.count++,Q.waitingForViewTransition=!0,Q=Ys.bind(Q),W.finished.then(Q,Q))),Q=(r&62914560)===r?Eo-jt():(r&4194048)===r?cp-jt():0,Q=Bx(q,Q),Q!==null)){Bn=r,e.cancelPendingCommit=Q(Cp.bind(null,e,t,r,n,a,o,h,p,w,D,V,q,null,A,L)),jl(e,r,h,!D);return}Cp(e,t,r,n,a,o,h,p,w,D,V,q)}function US(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 a=0;a<n.length;a++){var o=n[a],r=o.getSnapshot;o=o.value;try{if(!It(r(),o))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 jl(e,t,n,a){t=rh(e,t),t&=~Co,t&=~_a,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var r=31-Zt(o),h=1<<r;a[r]=-1,o&=~h}n!==0&&fh(e,n,t)}function No(){return(Oe&6)===0?(Bs(0),!1):!0}function uf(){if(be!==null){if(Ve===0)var e=be.return;else e=be,el=ga=null,gc(e),di=null,Cs=0,e=be;for(;e!==null;)Lm(e.alternate,e),e=e.return;be=null}}function _i(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,ix(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Bn=0,uf(),ke=e,be=n=Pn(e.current,null),we=t,Ve=0,Wt=null,Nl=!1,xi=as(e,t),nf=!1,bi=en=Co=_a=Tl=We=0,$t=Ls=null,lf=!1,sl=rh(e,t),Du(),n}function mp(e,t){me=null,ee.H=io,t===fi||t===Qu?(t=Cg(),Ve=3):t===tc?(t=Cg(),Ve=4):Ve=t===Mc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Wt=t,be===null&&(We=1,so(e,cn(t,e.current)))}function pp(){var e=St.current;return e===null?!0:(we&4194048)===we?_t===null:(we&62914560)===we||(we&536870912)!==0?e===_t:!1}function vp(){var e=ee.H;return ee.H=io,e===null?io:e}function yp(){var e=ee.A;return ee.A=zS,e}function To(){We=4,Nl||(we&4194048)!==we&&St.current!==null||(xi=!0),(Tl&134217727)===0&&(_a&134217727)===0||ke===null||jl(ke,we,en,!1)}function of(e,t,n){var a=Oe;Oe|=2;var o=vp(),r=yp();(ke!==e||we!==t)&&(Ro=null,_i(e,t)),t=!1;var h=We;e:do try{if(Ve!==0&&be!==null){var p=be,w=Wt;switch(Ve){case 8:uf(),h=6;break e;case 3:case 2:case 9:case 6:St.current===null&&(t=!0);var D=Ve;if(Ve=0,Wt=null,Ni(e,p,w,D),n&&xi){h=0;break e}break;default:D=Ve,Ve=0,Wt=null,Ni(e,p,w,D)}}HS(),h=We;break}catch(V){mp(e,V)}while(!0);return t&&e.shellSuspendCounter++,el=ga=null,Oe=a,ee.H=o,ee.A=r,be===null&&(ke=null,we=0,Du()),h}function HS(){for(;be!==null;)Sp(be)}function LS(e,t){var n=Oe;Oe|=2;var a=vp(),o=yp();ke!==e||we!==t?(Ro=null,wo=jt()+500,_i(e,t)):xi=as(e,t);e:do try{if(Ve!==0&&be!==null){t=be;var r=Wt;t:switch(Ve){case 1:Ve=0,Wt=null,Ni(e,t,r,1);break;case 2:case 9:if(xg(r)){Ve=0,Wt=null,xp(t);break}t=function(){Ve!==2&&Ve!==9||ke!==e||(Ve=7),Gn(e)},r.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:xg(r)?(Ve=0,Wt=null,xp(t)):(Ve=0,Wt=null,Ni(e,t,r,7));break;case 5:var h=null;switch(be.tag){case 26:h=be.memoizedState;case 5:case 27:var p=be;if(h?fv(h):p.stateNode.complete){Ve=0,Wt=null;var w=p.sibling;if(w!==null)be=w;else{var D=p.return;D!==null?(be=D,Mo(D)):be=null}break t}}Ve=0,Wt=null,Ni(e,t,r,5);break;case 6:Ve=0,Wt=null,Ni(e,t,r,6);break;case 8:uf(),We=6;break e;default:throw Error(u(462))}}VS();break}catch(V){mp(e,V)}while(!0);return el=ga=null,ee.H=a,ee.A=o,Oe=n,be!==null?0:(ke=null,we=0,Du(),We)}function VS(){for(;be!==null&&!Mn();)Sp(be)}function Sp(e){var t=Um(e.alternate,e,sl);e.memoizedProps=e.pendingProps,t===null?Mo(e):be=t}function xp(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Tm(n,t,t.pendingProps,t.type,void 0,we);break;case 11:t=Tm(n,t,t.pendingProps,t.type.render,t.ref,we);break;case 5:gc(t);var a=t;a===ft&&(Se?(Gu(a),a.tag===5&&a.stateNode!=null&&(Ye=a.stateNode)):(Gu(a),Se=!0));default:Lm(n,t),t=be=rg(t,sl),t=Um(n,t,sl)}e.memoizedProps=e.pendingProps,t===null?Mo(e):be=t}function Ni(e,t,n,a){el=ga=null,gc(t),di=null,Cs=0;var o=t.return;try{if(RS(e,o,t,n,we)){We=1,so(e,cn(n,e.current)),be=null;return}}catch(r){if(o!==null)throw be=o,r;We=1,so(e,cn(n,e.current)),be=null;return}t.flags&32768?(Se||a===1?e=!0:xi||(we&536870912)!==0?e=!1:(Nl=e=!0,(a===2||a===9||a===3||a===6)&&(a=St.current,a!==null&&a.tag===13&&(a.flags|=16384))),bp(t,e)):Mo(t)}function Mo(e){var t=e;do{if((t.flags&32768)!==0){bp(t,Nl);return}e=t.return;var n=MS(t.alternate,t,sl);if(n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);We===0&&(We=5)}function bp(e,t){do{var n=jS(e.alternate,e);if(n!==null){n.flags&=32767,be=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){be=e;return}be=e=n}while(e!==null);We=6,be=null}function Cp(e,t,n,a,o,r,h,p,w,D,V,q){e.cancelPendingCommit=null;do jo();while(Ie!==0);if((Oe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));e===ke&&(be=ke=null,we=0),Na=t,wn=e,Bn=n,sf=o,fp=a,BS(e,t,n,h,p,w,q)}}function BS(e,t,n,a,o,r,h){var p=t.lanes|t.childLanes;if(af=p,p|=Fr,f1(e,n,p,a,o,r),Ei=null,(n&335544064)===n?(wi=hS(e),a=10262):(wi=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,QS(Xa,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),mo=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=ee.T,ee.T=null,o=oe.p,oe.p=2,r=Oe,Oe|=4;try{AS(e,t,n)}finally{Oe=r,oe.p=o,ee.T=a}}Ie=1,mo?Ci=fx(h,e.containerInfo,wi,rf,cf,qS,ff,df,GS):(rf(),cf(),ff())}function GS(e){if(Ie!==0){var t=wn.onRecoverableError;t(e,{componentStack:null})}}function qS(){Ie===3&&(Ie=0,ap(Na,wn),Ie=4)}function rf(){if(Ie===1){Ie=0;var e=wn,t=Na,n=Bn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=ee.T,ee.T=null;var o=oe.p;oe.p=2;var r=Oe;Oe|=4;try{Ds=yo=!1,np(t,e,n),n=wf;var h=Wh(e.containerInfo),p=n.focusedElem,w=n.selectionRange;if(h!==p&&p&&p.ownerDocument&&Ph(p.ownerDocument.documentElement,p)){if(w!==null&&Lr(p)){var D=w.start,V=w.end;if(V===void 0&&(V=D),"selectionStart"in p)p.selectionStart=D,p.selectionEnd=Math.min(V,p.value.length);else{var q=p.ownerDocument||document,A=q&&q.defaultView||window;if(A.getSelection){var L=A.getSelection(),Q=p.textContent.length,W=Math.min(w.start,Q),pe=w.end===void 0?W:Math.min(w.end,Q);!L.extend&&W>pe&&(h=pe,pe=W,W=h);var z=Jh(p,W),N=Jh(p,pe);if(z&&N&&(L.rangeCount!==1||L.anchorNode!==z.node||L.anchorOffset!==z.offset||L.focusNode!==N.node||L.focusOffset!==N.offset)){var H=q.createRange();H.setStart(z.node,z.offset),L.removeAllRanges(),W>pe?(L.addRange(H),L.extend(N.node,N.offset)):(H.setEnd(N.node,N.offset),L.addRange(H))}}}}for(q=[],L=p;L=L.parentNode;)L.nodeType===1&&q.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<q.length;p++){var G=q[p];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Ui=!!Ef,wf=Ef=null}finally{Oe=r,oe.p=o,ee.T=a}}e.current=t,Ie=2}}function cf(){if(Ie===2){Ie=0;var e=wn,t=Na,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ee.T,ee.T=null;var a=oe.p;oe.p=2;var o=Oe;Oe|=4;try{Im(e,t.alternate,t)}finally{Oe=o,oe.p=a,ee.T=n}}Ie=3}}function ff(){if(Ie===4||Ie===3){Ie=0;var e=Ci;Ci=null,mr();var t=wn,n=Na,a=Bn,o=fp,r=(a&335544064)===a?10262:10256;if((n.subtreeFlags&r)!==0||(n.flags&r)!==0?Ie=5:(Ie=0,Na=wn=null,Ep(t,t.pendingLanes)),r=t.pendingLanes,r===0&&(Ml=null),Sr(a),n=n.stateNode,Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(ls,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=ee.T,r=oe.p,oe.p=2,ee.T=null;try{for(var h=t.onRecoverableError,p=0;p<o.length;p++){var w=o[p];h(w.value,{componentStack:w.stack})}}finally{ee.T=n,oe.p=r}}if(o=Ei,h=wi,wi=null,o!==null&&(Ei=null,h===null&&(h=[]),e!==null))for(w=0;w<o.length;w++)n=(0,o[w])(h),n!==void 0&&e.finished.finally(n);(Bn&3)!==0&&jo(),Gn(t),r=t.pendingLanes,(a&261930)!==0&&(r&42)!==0?t===_o?Vs++:(Vs=0,_o=t):(Vs=0,_o=null),Bs(0)}}function Ep(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ss(t)))}function jo(){return Ci!==null&&(Ci.skipTransition(),Ci=null),rf(),cf(),ff(),df()}function df(){if(Ie!==5)return!1;var e=wn,t=af;af=0;var n=Sr(Bn),a=ee.T,o=oe.p;try{oe.p=32>n?32:n,ee.T=null,n=sf,sf=null;var r=wn,h=Bn;if(Ie=0,Na=wn=null,Bn=0,(Oe&6)!==0)throw Error(u(331));var p=Oe;if(Oe|=4,op(r.current),ip(r,r.current,h,n),Oe=p,Bs(0,!1),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(ls,r)}catch{}return!0}finally{oe.p=o,ee.T=a,Ep(e,t)}}function wp(e,t,n){t=cn(n,t),t=Tc(e.stateNode,t,2),e=bl(e,t,2),e!==null&&(is(e,2),Gn(e))}function Be(e,t,n){if(e.tag===3)wp(e,e,n);else for(;t!==null;){if(t.tag===3){wp(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ml===null||!Ml.has(a))){e=cn(n,e),n=xm(2),a=bl(t,n,2),a!==null&&(bm(n,a,t,e),is(a,2),Gn(a));break}}t=t.return}}function hf(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new DS;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(n)||(nf=!0,o.add(n),e=FS.bind(null,e,t,n),t.then(e,e))}function FS(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ke===e&&(we&n)===n&&((We===4||We===3&&(we&62914560)===we&&300>jt()-Eo)&&(Oe&2)===0?_i(e,0):Co|=n,bi===we&&(bi=0)),Gn(e)}function Rp(e,t){t===0&&(t=ch()),e=fa(e,t),e!==null&&(is(e,t),Gn(e))}function $S(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rp(e,n)}function kS(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(t),Rp(e,n)}function QS(e,t){return I(e,t)}var Ti=null,Mi=null,gf=!1,Ao=!1,mf=!1,Al=0;function Gn(e){e!==Mi&&e.next===null&&(Mi===null?Ti=Mi=e:Mi=Mi.next=e),Ao=!0,gf||(gf=!0,XS())}function Bs(e,t){if(!mf&&Ao){mf=!0;do for(var n=!1,a=Ti;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var r=0;else{var h=a.suspendedLanes,p=a.pingedLanes;r=(1<<31-Zt(42|e)+1)-1,r&=o&~(h&~p),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Mp(a,r))}else r=we,r=bu(a,a===ke?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(r&3)===0||as(a,r)||(n=!0,Mp(a,r));a=a.next}while(n);mf=!1}}function YS(){_p()}function _p(){Ao=gf=!1;var e=0;Al!==0&&ax()&&(e=Al);for(var t=jt(),n=null,a=Ti;a!==null;){var o=a.next,r=Np(a,t);r===0?(a.next=null,n===null?Ti=o:n.next=o,o===null&&(Mi=n)):(n=a,(e!==0||(r&3)!==0)&&(Ao=!0)),a=o}Ie!==0&&Ie!==5||Bs(e),Al!==0&&(Al=0)}function Np(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var h=31-Zt(r),p=1<<h,w=o[h];w===-1?((p&n)===0||(p&a)!==0)&&(o[h]=c1(p,t)):w<=t&&(e.expiredLanes|=p),r&=~p}if(t=ke,n=we,n=bu(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ut(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||as(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&ut(a),Sr(n)){case 2:case 8:n=ns;break;case 32:n=Xa;break;case 268435456:n=oh;break;default:n=Xa}return a=Tp.bind(null,e),n=I(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&ut(a),e.callbackPriority=2,e.callbackNode=null,2}function Tp(e,t){if(Ie!==0&&Ie!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(jo()&&e.callbackNode!==n)return null;var a=we;return a=bu(e,e===ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(hp(e,a,t),Np(e,jt()),e.callbackNode!=null&&e.callbackNode===n?Tp.bind(null,e):null)}function Mp(e,t){if(jo())return null;hp(e,t,!0)}function XS(){sx(function(){(Oe&6)!==0?I(vu,YS):_p()})}function pf(){if(Al===0){var e=va;e===0&&(e=yu,yu<<=1,(yu&261888)===0&&(yu=256)),Al=e}return Al}function jp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_u(e)}function ZS(e,t,n,a,o){if(t==="submit"&&n&&n.stateNode===o){var r=jp((o[Bt]||null).action),h=a.submitter;h&&(t=(t=h[Bt]||null)?jp(t.formAction):h.getAttribute("formAction"),t!==null&&(r=t,h=null));var p=new ju("action","action",null,a,o);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Al!==0){var w=new FormData(o,h);Ec(n,{pending:!0,data:w,method:o.method,action:r},null,w)}}else typeof r=="function"&&(p.preventDefault(),w=new FormData(o,h),Ec(n,{pending:!0,data:w,method:o.method,action:r},r,w))},currentTarget:o}]})}}for(var vf=0;vf<qr.length;vf++){var yf=qr[vf],KS=yf.toLowerCase(),IS=yf[0].toUpperCase()+yf.slice(1);xn(KS,"on"+IS)}xn(ng,"onAnimationEnd"),xn(lg,"onAnimationIteration"),xn(ag,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(iS,"onTransitionRun"),xn(sS,"onTransitionStart"),xn(uS,"onTransitionCancel"),xn(ig,"onTransitionEnd"),Ja("onMouseEnter",["mouseout","mouseover"]),Ja("onMouseLeave",["mouseout","mouseover"]),Ja("onPointerEnter",["pointerout","pointerover"]),Ja("onPointerLeave",["pointerout","pointerover"]),oa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),oa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),oa("onBeforeInput",["compositionend","keypress","textInput","paste"]),oa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),oa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),oa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gs="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(" "),JS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gs));function Ap(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],o=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var h=a.length-1;0<=h;h--){var p=a[h],w=p.instance,D=p.currentTarget;if(p=p.listener,w!==r&&o.isPropagationStopped())break e;r=p,o.currentTarget=D;try{r(o)}catch(V){zu(V)}o.currentTarget=null,r=w}else for(h=0;h<a.length;h++){if(p=a[h],w=p.instance,D=p.currentTarget,p=p.listener,w!==r&&o.isPropagationStopped())break e;r=p,o.currentTarget=D;try{r(o)}catch(V){zu(V)}o.currentTarget=null,r=w}}}}function Ce(e,t){var n=t[ph];n===void 0&&(n=t[ph]=new Set);var a=e+"__bubble";n.has(a)||(Op(t,e,2,!1),n.add(a))}function Sf(e,t,n){var a=0;t&&(a|=4),Op(n,e,a,t)}var Oo="_reactListening"+Math.random().toString(36).slice(2);function xf(e){if(!e[Oo]){e[Oo]=!0,Sh.forEach(function(n){n!=="selectionchange"&&(JS.has(n)||Sf(n,!1,e),Sf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oo]||(t[Oo]=!0,Sf("selectionchange",!1,t))}}function Op(e,t,n,a){switch(bv(t)){case 2:var o=$x;break;case 8:o=kx;break;default:o=Gf}n=o.bind(null,t,n,e),o=void 0,!Nr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function bf(e,t,n,a,o){var r=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var h=a.tag;if(h===3||h===4){var p=a.stateNode.containerInfo;if(p===o)break;if(h===4)for(h=a.return;h!==null;){var w=h.tag;if((w===3||w===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;p!==null;){if(h=ua(p),h===null)return;if(w=h.tag,w===5||w===6||w===26||w===27){a=r=h;continue e}p=p.parentNode}}a=a.return}Oh(function(){var D=r,V=Rr(n),q=[];e:{var A=sg.get(e);if(A!==void 0){var L=ju,Q=e;switch(e){case"keypress":if(Tu(n)===0)break e;case"keydown":case"keyup":L=U1;break;case"focusin":Q="focus",L=Ar;break;case"focusout":Q="blur",L=Ar;break;case"beforeblur":case"afterblur":L=Ar;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Uh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=E1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=G1;break;case ng:case lg:case ag:L=_1;break;case ig:L=F1;break;case"scroll":case"scrollend":L=b1;break;case"wheel":L=k1;break;case"copy":case"cut":case"paste":L=T1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Lh;break;case"submit":L=V1;break;case"toggle":case"beforetoggle":L=Y1}var W=(t&4)!==0,pe=!W&&(e==="scroll"||e==="scrollend"),z=W?A!==null?A+"Capture":null:A;W=[];for(var N=D,H;N!==null;){var G=N;if(H=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||H===null||z===null||(G=os(N,z),G!=null&&W.push(qs(N,G,H))),pe)break;N=N.return}0<W.length&&(A=new L(A,Q,null,n,V),q.push({event:A,listeners:W}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",A=e==="mouseout"||e==="pointerout",L&&n!==wr&&(Q=n.relatedTarget||n.fromElement)&&(ua(Q)||Q[Za]))break e;(A||L)&&(Q=V.window===V?V:(L=V.ownerDocument)?L.defaultView||L.parentWindow:window,A?(L=n.relatedTarget||n.toElement,A=D,L=L?ua(L):null,L!==null&&(pe=f(L),W=L.tag,L!==pe||W!==5&&W!==27&&W!==6)&&(L=null)):(A=null,L=D),A!==L&&(W=Uh,G="onMouseLeave",z="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(W=Lh,G="onPointerLeave",z="onPointerEnter",N="pointer"),pe=A==null?Q:us(A),H=L==null?Q:us(L),Q=new W(G,N+"leave",A,n,V),Q.target=pe,Q.relatedTarget=H,G=null,ua(V)===D&&(W=new W(z,N+"enter",L,n,V),W.target=H,W.relatedTarget=pe,G=W),pe=G,W=A&&L?P(A,L,PS):null,A!==null&&zp(q,Q,A,W,!1),L!==null&&pe!==null&&zp(q,pe,L,W,!0)))}e:{if(A=D?us(D):window,L=A.nodeName&&A.nodeName.toLowerCase(),L==="select"||L==="input"&&A.type==="file")var J=Qh;else if($h(A))if(Yh)J=nS;else{J=eS;var Re=W1}else L=A.nodeName,!L||L.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?D&&Er(D.elementType)&&(J=Qh):J=tS;if(J&&(J=J(e,D))){kh(q,J,n,V);break e}Re&&Re(e,A,D)}switch(Re=D?us(D):window,e){case"focusin":($h(Re)||Re.contentEditable==="true")&&(li=Re,Vr=D,ps=null);break;case"focusout":ps=Vr=li=null;break;case"mousedown":Br=!0;break;case"contextmenu":case"mouseup":case"dragend":Br=!1,eg(q,n,V);break;case"selectionchange":if(aS)break;case"keydown":case"keyup":eg(q,n,V)}var le;if(zr)e:{switch(e){case"compositionstart":var re="onCompositionStart";break e;case"compositionend":re="onCompositionEnd";break e;case"compositionupdate":re="onCompositionUpdate";break e}re=void 0}else ni?qh(e,n)&&(re="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(re="onCompositionStart");re&&(Vh&&n.locale!=="ko"&&(ni||re!=="onCompositionStart"?re==="onCompositionEnd"&&ni&&(le=zh()):(dl=V,Tr="value"in dl?dl.value:dl.textContent,ni=!0)),Re=zo(D,re),0<Re.length&&(re=new Hh(re,e,null,n,V),q.push({event:re,listeners:Re}),le?re.data=le:(le=Fh(n),le!==null&&(re.data=le)))),(le=Z1?K1(e,n):I1(e,n))&&(re=zo(D,"onBeforeInput"),0<re.length&&(Re=new Hh("onBeforeInput","beforeinput",null,n,V),q.push({event:Re,listeners:re}),Re.data=le)),ZS(q,e,D,n,V)}Ap(q,t)})}function qs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zo(e,t){for(var n=t+"Capture",a=[];e!==null;){var o=e,r=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||r===null||(o=os(e,n),o!=null&&a.unshift(qs(e,o,r)),o=os(e,t),o!=null&&a.push(qs(e,o,r))),e.tag===3)return a;e=e.return}return[]}function PS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zp(e,t,n,a,o){for(var r=t._reactName,h=[];n!==null&&n!==a;){var p=n,w=p.alternate,D=p.stateNode;if(p=p.tag,w!==null&&w===a)break;p!==5&&p!==26&&p!==27||D===null||(w=D,o?(D=os(n,r),D!=null&&h.unshift(qs(n,D,w))):o||(D=os(n,r),D!=null&&h.push(qs(n,D,w)))),n=n.return}h.length!==0&&e.push({event:t,listeners:h})}var WS=/\r\n?/g,ex=/\u0000|\uFFFD/g;function Dp(e){return(typeof e=="string"?e:""+e).replace(WS,`
49
- `).replace(ex,"")}function Up(e,t){return t=Dp(t),Dp(e)===t}function Ge(e,t,n,a,o,r){switch(n){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||Wa(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&Wa(e,""+a);else return;break;case"className":Ru(e,"class",a);break;case"tabIndex":Ru(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Ru(e,n,a);break;case"style":jh(e,a,r);return;case"data":if(t!=="object"){Ru(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=_u(a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="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}else typeof r=="function"&&(n==="formAction"?(t!=="input"&&Ge(e,t,"name",o.name,o,null),Ge(e,t,"formEncType",o.formEncType,o,null),Ge(e,t,"formMethod",o.formMethod,o,null),Ge(e,t,"formTarget",o.formTarget,o,null)):(Ge(e,t,"encType",o.encType,o,null),Ge(e,t,"method",o.method,o,null),Ge(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=_u(a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=jn);return;case"onScroll":a!=null&&Ce("scroll",e);return;case"onScrollEnd":a!=null&&Ce("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(u(60));(r!=null?r.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=_u(a),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":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Ce("beforetoggle",e),Ce("toggle",e),wu(e,"popover",a);break;case"xlinkActuate":Zn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Zn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Zn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Zn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Zn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Zn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":wu(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=S1.get(n)||n,wu(e,n,a);else return}Ae=!0}function Cf(e,t,n,a,o,r){switch(n){case"style":jh(e,a,r);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(u(60));(r!=null?r.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof a=="string")Wa(e,a);else if(typeof a=="number"||typeof a=="bigint")Wa(e,""+a);else return;break;case"onScroll":a!=null&&Ce("scroll",e);return;case"onScrollEnd":a!=null&&Ce("scrollend",e);return;case"onClick":a!=null&&(e.onclick=jn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!xh.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),r=n.slice(2,o?n.length-7:void 0),t=e[Bt]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(r,t,o),typeof a=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(r,a,o);break e}Ae=!0,n in e?e[n]=a:a===!0?e.setAttribute(n,""):wu(e,n,a)}return}Ae=!0}function Ct(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",e),Ce("load",e);var a=!1,o=!1,r;for(r in n)if(n.hasOwnProperty(r)){var h=n[r];if(h!=null)switch(r){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ge(e,t,r,h,n,null)}}o&&Ge(e,t,"srcSet",n.srcSet,n,null),a&&Ge(e,t,"src",n.src,n,null);return;case"input":Ce("invalid",e);var p=r=h=o=null,w=null,D=null;for(a in n)if(n.hasOwnProperty(a)){var V=n[a];if(V!=null)switch(a){case"name":o=V;break;case"type":h=V;break;case"checked":w=V;break;case"defaultChecked":D=V;break;case"value":r=V;break;case"defaultValue":p=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:Ge(e,t,a,V,n,null)}}_h(e,r,p,w,D,h,o,!1);return;case"select":Ce("invalid",e),a=h=r=null;for(o in n)if(n.hasOwnProperty(o)&&(p=n[o],p!=null))switch(o){case"value":r=p;break;case"defaultValue":h=p;break;case"multiple":a=p;default:Ge(e,t,o,p,n,null)}t=r,n=h,e.multiple=!!a,t!=null?Pa(e,!!a,t,!1):n!=null&&Pa(e,!!a,n,!0);return;case"textarea":Ce("invalid",e),r=o=a=null;for(h in n)if(n.hasOwnProperty(h)&&(p=n[h],p!=null))switch(h){case"value":a=p;break;case"defaultValue":o=p;break;case"children":r=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(u(91));break;default:Ge(e,t,h,p,n,null)}Th(e,a,o,r);return;case"option":for(w in n)if(n.hasOwnProperty(w)&&(a=n[w],a!=null))switch(w){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ge(e,t,w,a,n,null)}return;case"dialog":Ce("beforetoggle",e),Ce("toggle",e),Ce("cancel",e),Ce("close",e);break;case"iframe":case"object":Ce("load",e);break;case"video":case"audio":for(a=0;a<Gs.length;a++)Ce(Gs[a],e);break;case"image":Ce("error",e),Ce("load",e);break;case"details":Ce("toggle",e);break;case"embed":case"source":case"link":Ce("error",e),Ce("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(D in n)if(n.hasOwnProperty(D)&&(a=n[D],a!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ge(e,t,D,a,n,null)}return;default:if(Er(t)){for(V in n)n.hasOwnProperty(V)&&(a=n[V],a!==void 0&&Cf(e,t,V,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&Ge(e,t,p,a,n,null))}var tx={};function nx(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,r=null,h=null,p=null,w=null,D=null,V=null;for(L in n){var q=n[L];if(n.hasOwnProperty(L)&&q!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":w=q;default:a.hasOwnProperty(L)||Ge(e,t,L,null,a,q)}}for(var A in a){var L=a[A];if(q=n[A],a.hasOwnProperty(A)&&(L!=null||q!=null))switch(A){case"type":L!==q&&(Ae=!0),r=L;break;case"name":L!==q&&(Ae=!0),o=L;break;case"checked":L!==q&&(Ae=!0),D=L;break;case"defaultChecked":L!==q&&(Ae=!0),V=L;break;case"value":L!==q&&(Ae=!0),h=L;break;case"defaultValue":L!==q&&(Ae=!0),p=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(u(137,t));break;default:L!==q&&Ge(e,t,A,L,a,q)}}br(e,h,p,w,D,V,r,o);return;case"select":L=h=p=A=null;for(r in n)if(w=n[r],n.hasOwnProperty(r)&&w!=null)switch(r){case"value":break;case"multiple":L=w;default:a.hasOwnProperty(r)||Ge(e,t,r,null,a,w)}for(o in a)if(r=a[o],w=n[o],a.hasOwnProperty(o)&&(r!=null||w!=null))switch(o){case"value":r!==w&&(Ae=!0),A=r;break;case"defaultValue":r!==w&&(Ae=!0),p=r;break;case"multiple":r!==w&&(Ae=!0),h=r;default:r!==w&&Ge(e,t,o,r,a,w)}t=p,n=h,a=L,A!=null?Pa(e,!!n,A,!1):!!a!=!!n&&(t!=null?Pa(e,!!n,t,!0):Pa(e,!!n,n?[]:"",!1));return;case"textarea":L=A=null;for(p in n)if(o=n[p],n.hasOwnProperty(p)&&o!=null&&!a.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Ge(e,t,p,null,a,o)}for(h in a)if(o=a[h],r=n[h],a.hasOwnProperty(h)&&(o!=null||r!=null))switch(h){case"value":o!==r&&(Ae=!0),A=o;break;case"defaultValue":o!==r&&(Ae=!0),L=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(u(91));break;default:o!==r&&Ge(e,t,h,o,a,r)}Nh(e,A,L);return;case"option":for(var Q in n)if(A=n[Q],n.hasOwnProperty(Q)&&A!=null&&!a.hasOwnProperty(Q))switch(Q){case"selected":e.selected=!1;break;default:Ge(e,t,Q,null,a,A)}for(w in a)if(A=a[w],L=n[w],a.hasOwnProperty(w)&&A!==L&&(A!=null||L!=null))switch(w){case"selected":A!==L&&(Ae=!0),e.selected=A&&typeof A!="function"&&typeof A!="symbol";break;default:Ge(e,t,w,A,a,L)}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 W in n)A=n[W],n.hasOwnProperty(W)&&A!=null&&!a.hasOwnProperty(W)&&Ge(e,t,W,null,a,A);for(D in a)if(A=a[D],L=n[D],a.hasOwnProperty(D)&&A!==L&&(A!=null||L!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(u(137,t));break;default:Ge(e,t,D,A,a,L)}return;default:if(Er(t)){for(var pe in n)A=n[pe],n.hasOwnProperty(pe)&&A!==void 0&&!a.hasOwnProperty(pe)&&Cf(e,t,pe,void 0,a,A);for(V in a)A=a[V],L=n[V],!a.hasOwnProperty(V)||A===L||A===void 0&&L===void 0||Cf(e,t,V,A,a,L);return}}for(var z in n)A=n[z],n.hasOwnProperty(z)&&A!=null&&!a.hasOwnProperty(z)&&Ge(e,t,z,null,a,A);for(q in a)A=a[q],L=n[q],!a.hasOwnProperty(q)||A===L||A==null&&L==null||Ge(e,t,q,A,a,L)}function Hp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var o=n[a],r=o.transferSize,h=o.initiatorType,p=o.duration;if(r&&p&&Hp(h)){for(h=0,p=o.responseEnd,a+=1;a<n.length;a++){var w=n[a],D=w.startTime;if(D>p)break;var V=w.transferSize,q=w.initiatorType;V&&Hp(q)&&(w=w.responseEnd,h+=V*(w<p?1:(p-D)/(w-D)))}if(--a,t+=8*(r+h)/(o.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 Ef=null,wf=null;function Fs(e){return e.nodeType===9?e:e.ownerDocument}function Lp(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 Vp(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 Bp(e,t,n,a){return n=Fs(n).createElement(e),n[vt]=a,n[Bt]=t,Ct(n,e,t),ct(n),n}function Rf(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 _f=null;function ax(){var e=window.event;return e&&e.type==="popstate"?e===_f?!1:(_f=e,!0):(_f=null,!1)}var Nf=typeof setTimeout=="function"?setTimeout:void 0,ix=typeof clearTimeout=="function"?clearTimeout:void 0,Gp=typeof Promise=="function"?Promise:void 0,qp=typeof requestAnimationFrame=="function"?requestAnimationFrame:Nf,sx=typeof queueMicrotask=="function"?queueMicrotask:typeof Gp<"u"?function(e){return Gp.resolve(null).then(e).catch(ux)}:Nf;function ux(e){setTimeout(function(){throw e})}function Ol(e){return e==="head"}function Fp(e,t){var n=t,a=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(o),Hi(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Uf(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Uf(n);for(var r=n.firstChild;r;){var h=r.nextSibling,p=r.nodeName;r[ss]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=h}}else n==="body"&&Uf(e.ownerDocument.body);n=o}while(n);Hi(t)}function $p(e,t){var n=e;e=0;do{var a=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||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function kp(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var o=a=0;o<t.length;o++){var r=t[o];0<r.width&&0<r.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function Qp(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null: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?e.margin=n:(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)))}function ox(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 Tf(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return ox(t,n,e)}function rx(e){return e.documentElement.clientHeight}function cx(e){this.addEventListener("load",e),this.addEventListener("error",e)}function fx(e,t,n,a,o,r,h,p,w){var D=t.nodeType===9?t:t.ownerDocument;try{var V=D.startViewTransition({update:function(){var A=D.defaultView,L=A.navigation&&A.navigation.transition,Q=D.fonts.status;a();var W=[];if(Q==="loaded"&&(rx(D),D.fonts.status==="loading"&&W.push(D.fonts.ready)),Q=W.length,e!==null)for(var pe=e.suspenseyImages,z=0,N=0;N<pe.length;N++){var H=pe[N];if(!H.complete){var G=H.getBoundingClientRect();if(0<G.bottom&&0<G.right&&G.top<A.innerHeight&&G.left<A.innerWidth){if(z+=dv(H),z>Ho){W.length=Q;break}H=new Promise(cx.bind(H)),W.push(H)}}}if(0<W.length)return A=Promise.race([Promise.all(W),new Promise(function(J){return setTimeout(J,500)})]).then(o,o),(L?Promise.allSettled([L.finished,A]):A).then(r,r);if(o(),L)return L.finished.then(r,r);r()},types:n});D.__reactViewTransition=V;var q=[];return V.ready.then(function(){for(var A=D.documentElement.getAnimations({subtree:!0}),L=0;L<A.length;L++){var Q=A[L],W=Q.effect,pe=W.pseudoElement;if(pe!=null&&pe.startsWith("::view-transition")){q.push(Q),Q=W.getKeyframes();for(var z=pe=void 0,N=!0,H=0;H<Q.length;H++){var G=Q[H],J=G.width;if(pe===void 0)pe=J;else if(pe!==J){N=!1;break}if(J=G.height,z===void 0)z=J;else if(z!==J){N=!1;break}delete G.width,delete G.height,G.transform==="none"&&delete G.transform}N&&pe!==void 0&&z!==void 0&&(W.setKeyframes(Q),N=getComputedStyle(W.target,W.pseudoElement),N.width!==pe||N.height!==z)&&(N=Q[0],N.width=pe,N.height=z,N=Q[Q.length-1],N.width=pe,N.height=z,W.setKeyframes(Q))}}h()},function(A){D.__reactViewTransition===V&&(D.__reactViewTransition=null);try{if(typeof A=="object"&&A!==null)switch(A.name){case"InvalidStateError":(A.message==="View transition was skipped because document visibility state is hidden."||A.message==="Skipping view transition because document visibility state has become hidden."||A.message==="Skipping view transition because viewport size changed."||A.message==="Transition was aborted because of invalid state")&&(A=null)}A!==null&&w(A)}finally{a(),o(),h()}}),V.finished.finally(function(){for(var A=0;A<q.length;A++)q[A].cancel();D.__reactViewTransition===V&&(D.__reactViewTransition=null),p()}),V}catch{return a(),o(),h(),null}}function Ta(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Ta.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:X({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ta.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),a=[],o=0;o<n.length;o++){var r=n[o].effect;r!==null&&r.target===e&&r.pseudoElement===t&&a.push(n[o])}return a},Ta.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Yp(e){return{name:e,group:new Ta("group",e),imagePair:new Ta("image-pair",e),old:new Ta("old",e),new:new Ta("new",e)}}function nn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}nn.prototype.addEventListener=function(e,t,n){var a=null,o=null;if(!(n!=null&&typeof n!="boolean"&&(a=n.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var r=this._eventListeners;if(Zp(r,e,t,n)===-1){var h=this,p=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(p=function(w){h.removeEventListener(e,t,n),typeof t=="function"?t.call(this,w):t.handleEvent(w)}),a!==null&&(o=h.removeEventListener.bind(h,e,t,n),a.addEventListener("abort",o,{once:!0}),o=a.removeEventListener.bind(a,"abort",o)),a=ji(n),r.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:p,cleanup:o}),x(this._fragmentFiber.child,!1,dx,e,p,a)}this._eventListeners=r}};function dx(e,t,n,a){return b(e).addEventListener(t,n,a),!1}nn.prototype.removeEventListener=function(e,t,n){var a=this._eventListeners;if(a!==null&&(t=Zp(a,e,t,n),t!==-1)){var o=a[t];n=o.attachedListener;var r=o.cleanup;o=ji(o.optionsOrUseCapture),x(this._fragmentFiber.child,!1,hx,e,n,o),a.splice(t,1),r!==null&&r()}};function hx(e,t,n,a){return b(e).removeEventListener(t,n,a),!1}function ji(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Xp(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Zp(e,t,n,a){if(e.length===0)return-1;a=Xp(a);for(var o=0;o<e.length;o++){var r=e[o];if(r.type===t&&r.listener===n&&Xp(r.optionsOrUseCapture)===a)return o}return-1}nn.prototype.dispatchEvent=function(e){var t=C(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var o=0;o<n.length;o++){var r=n[o];a.addEventListener(r.type,r.attachedListener,ji(r.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),n)for(o=0;o<n.length;o++)r=n[o],a.removeEventListener(r.type,r.attachedListener,ji(r.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},nn.prototype.focus=function(e){x(this._fragmentFiber.child,!0,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6?!1:(e=b(e),Rx(e,t))}nn.prototype.focusLast=function(e){var t=[];x(this._fragmentFiber.child,!0,Mf,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Kp(t[n],e);n--);};function Mf(e,t){return t.push(e),!1}nn.prototype.blur=function(){var e=C(this._fragmentFiber);e!==null&&(e=b(e),e=Fs(e).activeElement,e!==null&&x(this._fragmentFiber.child,!1,gx,e,void 0,void 0))};function gx(e,t){return e.tag===6?!1:(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}nn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),x(this._fragmentFiber.child,!1,mx,e,void 0,void 0)};function mx(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}nn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),x(this._fragmentFiber.child,!1,px,e,void 0,void 0);for(var n=t=0;n<Rn.length;n++){var a=Rn[n];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):Rn[t++]=a}Rn.length=t}};function px(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Rn=[],jf=!1;function vx(e,t,n){Rn.push({fragmentInstance:e,observer:t,instance:n}),jf||(jf=!0,_x(function(){jf=!1;var a=Rn;Rn=[];for(var o=0;o<a.length;o++){var r=a[o];r.observer.unobserve(r.instance)}}))}nn.prototype.getClientRects=function(){var e=[];return x(this._fragmentFiber.child,!1,yx,e,void 0,void 0),e};function yx(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=b(e),t.push.apply(t,e.getClientRects());return!1}nn.prototype.getRootNode=function(e){var t=C(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},nn.prototype.compareDocumentPosition=function(e){var t=C(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];x(this._fragmentFiber.child,!1,Mf,n,void 0,void 0);var a=b(t);if(n.length===0){if(n=a,R(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var o=a=n.compareDocumentPosition(e);return n===e?o=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=_(t)[1],n===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),o=b(n[n.length-1]);var r=R(this._fragmentFiber)?t.parentElement:a;if(r==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=r.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,r=r.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var h=t.compareDocumentPosition(e),p=o.compareDocumentPosition(e),w=h&Node.DOCUMENT_POSITION_CONTAINED_BY||p&Node.DOCUMENT_POSITION_CONTAINED_BY;return p=a&&r&&h&Node.DOCUMENT_POSITION_FOLLOWING&&p&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||r&&o===e||w||p?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!r&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:h,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Sx(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Sx(e,t,n,a,o){var r=ua(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!r)e:{for(;r!==null;){if(r.tag===7&&(r===t||r.alternate===t)){n=!0;break e}r=r.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(r===null)return r=o.ownerDocument,o===r||o===r.documentElement||o===r.body;e:{for(r=t,t=C(t);r!==null;){if(!(r.tag!==5&&r.tag!==3&&r.tag!==27||r!==t&&r.alternate!==t)){r=!0;break e}r=r.return}r=!1}return r}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!r)&&!(t=r===n)&&(t=P(n,r,F),t===null?t=!1:(x(t,!0,B,r,n),r=E,E=null,t=r!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!r)&&!(t=r===a)&&(t=P(a,r,F),t===null?t=!1:(x(t,!0,$,r,a),r=E,U=E=null,t=r!==null)),t):!1}function Ip(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)}nn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(u(566));var t=[];x(this._fragmentFiber.child,!1,Mf,t,void 0,void 0);var n=e!==!1;if(t.length===0){var a=_(this._fragmentFiber);if(a=n?a[1]||a[0]||C(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=b(a),Ip(e,n);return}if(a=b(a),a.nodeType!==9){if(a.nodeType===11){n="host"in a?a.host:null,n!==null&&n.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=n?t.length-1:0;a!==(n?-1:t.length);){var o=t[a];o.tag===6?(o=b(o),Ip(o,n)):b(o).scrollIntoView(e),a+=n?-1:1}};function xx(e,t){return e=b(e),Jp(e,t),!1}function Jp(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Pp(e,t){var n=t._eventListeners;if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];e.addEventListener(o.type,o.attachedListener,ji(o.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(r){for(var h=0,p=0;p<Rn.length;p++){var w=Rn[p];(w.fragmentInstance!==t||w.observer!==r||w.instance!==e)&&(Rn[h++]=w)}Rn.length=h,r.observe(e)}),Jp(e,t))}function bx(e,t){var n=t._eventListeners;if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];e.removeEventListener(o.type,o.attachedListener,ji(o.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(r){typeof r.rootMargin=="string"?vx(t,r,e):r.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Af(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":Af(n),Eu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Cx(e,t,n,a){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ss])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function Ex(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=mn(e.nextSibling),e===null))return null;return e}function Wp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=mn(e.nextSibling),e===null))return null;return e}function Of(e){return e.data==="$?"||e.data==="$~"}function zf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function wx(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function mn(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 Df=null;function ev(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return mn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function tv(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 Rx(e,t){function n(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return a}function _x(e){qp(function(){qp(function(t){return e(t)})})}function nv(e,t,n){switch(t=Fs(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function lv(e,t,n){for(var a in n){var o=n[a];n.hasOwnProperty(a)&&o!=null&&Ge(e,t,a,null,tx,o)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===jn&&(e.onclick=null),Eu(e)}function Uf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Eu(e)}var pn=new Map,av=new Set;function $s(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 ul=oe.d;oe.d={f:Nx,r:Tx,D:Mx,C:jx,L:Ax,m:Ox,X:Dx,S:zx,M:Ux};function Nx(){var e=ul.f(),t=No();return e||t}function Tx(e){var t=Ka(e);t!==null&&t.tag===5&&t.type==="form"?sm(t):ul.r(e)}var Ai=typeof document>"u"?null:document;function iv(e,t,n){var a=Ai;if(a&&typeof t=="string"&&t){var o=on(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),av.has(o)||(av.add(o),e={rel:e,crossOrigin:n,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),Ct(t,"link",e),ct(t),a.head.appendChild(t)))}}function Mx(e){ul.D(e),iv("dns-prefetch",e,null)}function jx(e,t){ul.C(e,t),iv("preconnect",e,t)}function Ax(e,t,n){ul.L(e,t,n);var a=Ai;if(a&&e&&t){var o='link[rel="preload"][as="'+on(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+on(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+on(n.imageSizes)+'"]')):o+='[href="'+on(e)+'"]';var r=o;switch(t){case"style":r=Oi(e);break;case"script":r=zi(e)}if(!(pn.has(r)||(e=X({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),pn.set(r,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(ks(r))||t==="script"&&a.querySelector(Qs(r))))){var h=a.createElement("link");Ct(h,"link",e),t==="style"&&(h[Cu]=!0,h.onload=h.onerror=function(){yh(h)}),ct(h),a.head.appendChild(h)}}}function Ox(e,t){ul.m(e,t);var n=Ai;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+on(a)+'"][href="'+on(e)+'"]',r=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=zi(e)}if(!pn.has(r)&&(e=X({rel:"modulepreload",href:e},t),pn.set(r,e),n.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Qs(r)))return}a=n.createElement("link"),Ct(a,"link",e),ct(a),n.head.appendChild(a)}}}function zx(e,t,n){ul.S(e,t,n);var a=Ai;if(a&&e){var o=Ia(a).hoistableStyles,r=Oi(e);t=t||"default";var h=o.get(r);if(!h){var p={loading:0,preload:null};if(h=a.querySelector(ks(r)))p.loading=5;else{e=X({rel:"stylesheet",href:e,"data-precedence":t},n),(n=pn.get(r))&&Hf(e,n);var w=h=a.createElement("link");ct(w),Ct(w,"link",e),w._p=new Promise(function(D,V){w.onload=D,w.onerror=V}),w.addEventListener("load",function(){p.loading|=1}),w.addEventListener("error",function(){p.loading|=2}),p.loading|=4,Do(h,t,a)}h={type:"stylesheet",instance:h,count:1,state:p},o.set(r,h)}}}function Dx(e,t){ul.X(e,t);var n=Ai;if(n&&e){var a=Ia(n).hoistableScripts,o=zi(e),r=a.get(o);r||(r=n.querySelector(Qs(o)),r||(e=X({src:e,async:!0},t),(t=pn.get(o))&&Lf(e,t),r=n.createElement("script"),ct(r),Ct(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(o,r))}}function Ux(e,t){ul.M(e,t);var n=Ai;if(n&&e){var a=Ia(n).hoistableScripts,o=zi(e),r=a.get(o);r||(r=n.querySelector(Qs(o)),r||(e=X({src:e,async:!0,type:"module"},t),(t=pn.get(o))&&Lf(e,t),r=n.createElement("script"),ct(r),Ct(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(o,r))}}function sv(e,t,n,a){var o=(o=yn.current)?$s(o):null;if(!o)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=Oi(n.href),t=Ia(o).hoistableStyles,a=t.get(n),a||(a={type:"style",instance:null,count:0,state:null},t.set(n,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Oi(n.href);var r=Ia(o).hoistableStyles,h=r.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,h),(r=o.querySelector(ks(e)))?r._p||(h.instance=r,h.state.loading=5):(r=pn.get(e),r||(r={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},pn.set(e,r)),Hx(o,e,r,h.state))),t&&a===null)throw Error(u(528,""));return h}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=zi(n),t=Ia(o).hoistableScripts,a=t.get(n),a||(a={type:"script",instance:null,count:0,state:null},t.set(n,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Oi(e){return'href="'+on(e)+'"'}function ks(e){return'link[rel="stylesheet"]['+e+"]"}function uv(e){return X({},e,{"data-precedence":e.precedence,precedence:null})}function Hx(e,t,n,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Cu]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[Cu]=!0,t.onload=t.onerror=yh.bind(null,t),Ct(t,"link",n),ct(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function zi(e){return'[src="'+on(e)+'"]'}function Qs(e){return"script[async]"+e}function ov(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+on(n.href)+'"]');if(a)return t.instance=a,ct(a),a;var o=X({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ct(a),Ct(a,"style",o),Do(a,n.precedence,e),t.instance=a;case"stylesheet":o=Oi(n.href);var r=e.querySelector(ks(o));if(r)return t.state.loading|=4,t.instance=r,ct(r),r;a=uv(n),(o=pn.get(o))&&Hf(a,o),r=(e.ownerDocument||e).createElement("link"),ct(r);var h=r;return h._p=new Promise(function(p,w){h.onload=p,h.onerror=w}),Ct(r,"link",a),t.state.loading|=4,Do(r,n.precedence,e),t.instance=r;case"script":return r=zi(n.src),(o=e.querySelector(Qs(r)))?(t.instance=o,ct(o),o):(a=n,(o=pn.get(r))&&(a=X({},n),Lf(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),ct(o),Ct(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Do(a,n.precedence,e));return t.instance}function Do(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,r=o,h=0;h<a.length;h++){var p=a[h];if(p.dataset.precedence===t)r=p;else if(r!==o)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Uo=null;function rv(e,t,n){if(Uo===null){var a=new Map,o=Uo=new Map;o.set(n,a)}else o=Uo,a=o.get(n),a||(a=new Map,o.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var r=n[o];if(!(r[ss]||r[vt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var h=r.getAttribute(t)||"";h=e+h;var p=a.get(h);p?p.push(r):a.set(h,[r])}}return a}function Vf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Lx(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 cv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function fv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function hv(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=dv(t),e.suspenseyImages.push(t)),e=Gx.bind(e),t.decode().then(e,e))}function Vx(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Oi(a.href),r=t.querySelector(ks(o));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ys.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=r,ct(r);return}r=t.ownerDocument||t,a=uv(a),(o=pn.get(o))&&Hf(a,o),r=r.createElement("link"),ct(r);var h=r;h._p=new Promise(function(p,w){h.onload=p,h.onerror=w}),Ct(r,"link",a),n.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ys.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Ho=0;function Bx(e,t){return e.stylesheets&&e.count===0&&Vo(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Vo(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&Ho===0&&(Ho=62500*lx());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Vo(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Ho?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function gv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Vo(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Ys(){this.count--,gv(this)}function Gx(){this.imgCount--,gv(this)}var Lo=null;function Vo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Lo=new Map,t.forEach(qx,e),Lo=null,Ys.call(e))}function qx(e,t){if(!(t.state.loading&4)){var n=Lo.get(e);if(n)var a=n.get(null);else{n=new Map,Lo.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<o.length;r++){var h=o[r];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),a=h)}a&&n.set(null,a)}o=t.instance,h=o.getAttribute("data-precedence"),r=n.get(h)||a,r===a&&n.set(null,o),n.set(h,o),this.count++,a=Ys.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),r?r.parentNode.insertBefore(o,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Di={$$typeof:Qe,Provider:null,Consumer:null,_currentValue:an,_currentValue2:an,_threadCount:0};function Fx(e,t,n,a,o,r,h,p,w){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=vr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vr(0),this.hiddenUpdates=vr(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=r,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.transitionTypes=null,this.incompleteTransitions=new Map}function mv(e,t,n,a,o,r,h,p,w,D,V,q){return e=new Fx(e,t,n,h,w,D,V,q,p),t=1,r===!0&&(t|=24),r=Gt(3,null,null,t),e.current=r,r.stateNode=e,t=Pr(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:n,cache:t},nc(r),e}function pv(e){return e?(e=si,e):si}function vv(e,t,n,a,o,r){o=pv(o),a.context===null?a.context=o:a.pendingContext=o,a=xl(t),a.payload={element:n},r=r===void 0?null:r,r!==null&&(a.callback=r),n=bl(e,a,t),n!==null&&(kt(n,e,t),Es(n,e,t))}function yv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Bf(e,t){yv(e,t),(e=e.alternate)&&yv(e,t)}function Sv(e){if(e.tag===13||e.tag===31){var t=fa(e,67108864);t!==null&&kt(t,e,67108864),Bf(e,67108864)}}function xv(e){if(e.tag===13||e.tag===31){var t=tn();t=yr(t);var n=fa(e,t);n!==null&&kt(n,e,t),Bf(e,t)}}var Ui=!0;function $x(e,t,n,a){var o=ee.T;ee.T=null;var r=oe.p;try{oe.p=2,Gf(e,t,n,a)}finally{oe.p=r,ee.T=o}}function kx(e,t,n,a){var o=ee.T;ee.T=null;var r=oe.p;try{oe.p=8,Gf(e,t,n,a)}finally{oe.p=r,ee.T=o}}function Gf(e,t,n,a){if(Ui){var o=qf(a);if(o===null)bf(e,t,a,Bo,n),Cv(e,a);else if(Yx(o,e,t,n,a))a.stopPropagation();else if(Cv(e,a),t&4&&-1<Qx.indexOf(e)){for(;o!==null;){var r=Ka(o);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var h=sa(r.pendingLanes);if(h!==0){var p=r;for(p.pendingLanes|=2,p.entangledLanes|=2;h;){var w=1<<31-Zt(h);p.entanglements[1]|=w,h&=~w}Gn(r),(Oe&6)===0&&(wo=jt()+500,Bs(0))}}break;case 31:case 13:p=fa(r,2),p!==null&&kt(p,r,2),No(),Bf(r,2)}if(r=qf(a),r===null&&bf(e,t,a,Bo,n),r===o)break;o=r}o!==null&&a.stopPropagation()}else bf(e,t,a,null,n)}}function qf(e){return e=Rr(e),Ff(e)}var Bo=null;function Ff(e){if(Bo=null,e=ua(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=g(t),e!==null)return e;e=null}else if(n===31){if(e=m(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 Bo=e,null}function bv(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(pr()){case vu:return 2;case ns:return 8;case Xa:case a1:return 32;case oh:return 268435456;default:return 32}default:return 32}}var $f=!1,zl=null,Dl=null,Ul=null,Xs=new Map,Zs=new Map,Hl=[],Qx="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 Cv(e,t){switch(e){case"focusin":case"focusout":zl=null;break;case"dragenter":case"dragleave":Dl=null;break;case"mouseover":case"mouseout":Ul=null;break;case"pointerover":case"pointerout":Xs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zs.delete(t.pointerId)}}function Ks(e,t,n,a,o,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:r,targetContainers:[o]},t!==null&&(t=Ka(t),t!==null&&Sv(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Yx(e,t,n,a,o){switch(t){case"focusin":return zl=Ks(zl,e,t,n,a,o),!0;case"dragenter":return Dl=Ks(Dl,e,t,n,a,o),!0;case"mouseover":return Ul=Ks(Ul,e,t,n,a,o),!0;case"pointerover":var r=o.pointerId;return Xs.set(r,Ks(Xs.get(r)||null,e,t,n,a,o)),!0;case"gotpointercapture":return r=o.pointerId,Zs.set(r,Ks(Zs.get(r)||null,e,t,n,a,o)),!0}return!1}function Ev(e){var t=ua(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=g(n),t!==null){e.blockedOn=t,mh(e.priority,function(){xv(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,mh(e.priority,function(){xv(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 Go(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qf(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);wr=a,n.target.dispatchEvent(a),wr=null}else return t=Ka(n),t!==null&&Sv(t),e.blockedOn=n,!1;t.shift()}return!0}function wv(e,t,n){Go(e)&&n.delete(t)}function Xx(){$f=!1,zl!==null&&Go(zl)&&(zl=null),Dl!==null&&Go(Dl)&&(Dl=null),Ul!==null&&Go(Ul)&&(Ul=null),Xs.forEach(wv),Zs.forEach(wv)}function qo(e,t){e.blockedOn===t&&(e.blockedOn=null,$f||($f=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Xx)))}var Fo=null;function Rv(e){Fo!==e&&(Fo=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Fo===e&&(Fo=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(Ff(a||n)===null)continue;break}var r=Ka(n);r!==null&&(e.splice(t,3),t-=3,Ec(r,{pending:!0,data:o,method:n.method,action:a},a,o))}}))}function Hi(e){function t(w){return qo(w,e)}zl!==null&&qo(zl,e),Dl!==null&&qo(Dl,e),Ul!==null&&qo(Ul,e),Xs.forEach(t),Zs.forEach(t);for(var n=0;n<Hl.length;n++){var a=Hl[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Hl.length&&(n=Hl[0],n.blockedOn===null);)Ev(n),n.blockedOn===null&&Hl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var o=n[a],r=n[a+1],h=o[Bt]||null;if(typeof r=="function")h||Rv(n);else if(h){var p=null;if(r&&r.hasAttribute("formAction")){if(o=r,h=r[Bt]||null)p=h.formAction;else if(Ff(o)!==null)continue}else p=h.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),Rv(n)}}}function _v(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function kf(e){this._internalRoot=e}$o.prototype.render=kf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,a=tn();vv(n,a,e,t,null,null)},$o.prototype.unmount=kf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vv(e.current,2,null,e,null,null),No(),t[Za]=null}};function $o(e){this._internalRoot=e}$o.prototype.unstable_scheduleHydration=function(e){if(e){var t=gh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Hl.length&&t!==0&&t<Hl[n].priority;n++);Hl.splice(n,0,e),n===0&&Ev(e)}};var Nv=i.version;if(Nv!=="19.3.1")throw Error(u(527,Nv,"19.3.1"));oe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=S(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Zx={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ee,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ko=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ko.isDisabled&&ko.supportsFiber)try{ls=ko.inject(Zx),Xt=ko}catch{}}return Js.createRoot=function(e,t){if(!c(e))throw Error(u(299));var n=!1,a="",o=pm,r=vm,h=ym;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=mv(e,1,!1,null,null,n,a,null,o,r,h,_v),e[Za]=t.current,xf(e),new kf(t)},Js.hydrateRoot=function(e,t,n){if(!c(e))throw Error(u(299));var a=!1,o="",r=pm,h=vm,p=ym,w=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(w=n.formState)),t=mv(e,1,!0,t,n??null,a,o,w,r,h,p,_v),t.context=pv(null),n=t.current,a=tn(),a=yr(a),o=xl(a),o.callback=null,bl(n,o,a),n=a,t.current.lanes=n,is(t,n),Gn(t),e[Za]=t.current,xf(e),new $o(t)},Js.version="19.3.1",Js}var Vv;function ub(){if(Vv)return Zf.exports;Vv=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),Zf.exports=sb(),Zf.exports}var ob=ub();const zy=j.createContext(void 0),Dy=l=>{const i=j.useContext(zy);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},rb=({client:l,children:i})=>(j.useEffect(()=>(l.mount(),()=>{l.unmount()}),[l]),d.jsx(zy.Provider,{value:l,children:i})),cb={setTimeout:(l,i)=>setTimeout(l,i),clearTimeout:l=>clearTimeout(l),setInterval:(l,i)=>setInterval(l,i),clearInterval:l=>clearInterval(l)};var Gl,$d,Cy,fb=(Cy=class{constructor(){ue(this,Gl,cb);ue(this,$d,!1)}setTimeoutProvider(l){K(this,Gl,l)}setTimeout(l,i){return M(this,Gl).setTimeout(l,i)}clearTimeout(l){M(this,Gl).clearTimeout(l)}setInterval(l,i){return M(this,Gl).setInterval(l,i)}clearInterval(l){M(this,Gl).clearInterval(l)}},Gl=new WeakMap,$d=new WeakMap,Cy);const ja=new fb;function db(l){setTimeout(l,0)}const hb=typeof window>"u"||"Deno"in globalThis;function Qt(){}function gb(l,i){return typeof l=="function"?l(i):l}function Uy(l){return typeof l=="number"&&l>=0&&l!==1/0}function Hy(l,i){return Math.max(l+(i||0)-Date.now(),0)}function Ke(l,i){return typeof l=="function"?l(i):l}function Bv(l,i){const{type:s="all",exact:u,fetchStatus:c,predicate:f,queryKey:g,stale:m}=l;if(g){if(u){if(i.queryHash!==Qd(g,i.options))return!1}else if(!Ji(i.queryKey,g))return!1}if(s!=="all"){const v=i.isActive();if(s==="active"&&!v||s==="inactive"&&v)return!1}return!(typeof m=="boolean"&&i.isStale()!==m||c&&c!==i.state.fetchStatus||f&&!f(i))}function Gv(l,i){const{exact:s,status:u,predicate:c,mutationKey:f}=l;if(f){if(!i.options.mutationKey)return!1;if(s){if(lu(i.options.mutationKey)!==lu(f))return!1}else if(!Ji(i.options.mutationKey,f))return!1}return!(u&&i.state.status!==u||c&&!c(i))}function Qd(l,i){return((i==null?void 0:i.queryKeyHashFn)||lu)(l)}function lu(l){return JSON.stringify(l,(i,s)=>dd(s)?Object.keys(s).sort().reduce((u,c)=>(u[c]=s[c],u),{}):s)}function Ji(l,i){if(l===i)return!0;if(typeof l!=typeof i)return!1;if(l&&i&&typeof l=="object"&&typeof i=="object"){if(Array.isArray(l)&&Array.isArray(i)){if(i.length>l.length)return!1;for(let u=0;u<i.length;u++)if(!Ji(l[u],i[u]))return!1;return!0}const s=Object.keys(i);for(const u of s)if(!Ji(l[u],i[u]))return!1;return!0}return!1}const mb=Object.prototype.hasOwnProperty;function Ly(l,i,s=0){if(l===i)return l;if(s>500)return i;const u=qv(l)&&qv(i);if(!u&&!(dd(l)&&dd(i)))return i;const c=(u?l:Object.keys(l)).length,f=u?i:Object.keys(i),g=f.length,m=u?new Array(g):{};let v=0;for(let S=0;S<g;S++){const y=u?S:f[S],x=l[y],C=i[y];if(x===C){m[y]=x,(u?S<c:mb.call(l,y))&&v++;continue}if(x===null||C===null||typeof x!="object"||typeof C!="object"){m[y]=C;continue}const R=Ly(x,C,s+1);m[y]=R,R===x&&v++}return c===g&&v===c?l:m}function Pf(l,i){if(!i||Object.keys(l).length!==Object.keys(i).length)return!1;for(const s in l)if(l[s]!==i[s])return!1;return!0}function qv(l){return Array.isArray(l)&&l.length===Object.keys(l).length}function dd(l){if(!Fv(l))return!1;const i=Object.getPrototypeOf(l),s=i==null?void 0:i.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;const u=s.prototype;return!(!Fv(u)||!u.hasOwnProperty("isPrototypeOf")||i!==Object.prototype)}function Fv(l){return Object.prototype.toString.call(l)==="[object Object]"}function pb(l){return new Promise(i=>{ja.setTimeout(i,l)})}function hd(l,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(l,i):s.structuralSharing!==!1?Ly(l,i):i}function Vy(l){return l}function vb(l,i,s=0){const u=[...l,i];return s&&u.length>s?u.slice(1):u}function yb(l,i,s=0){const u=[i,...l];return s&&u.length>s?u.slice(0,-1):u}const Yd=Symbol();function By(l,i){return!l.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!l.queryFn||l.queryFn===Yd?()=>Promise.reject(new Error(`Missing queryFn: '${l.queryHash}'`)):l.queryFn}function Gy(l,i){return typeof l=="function"?l(...i):!!l}function Sb(l,i,s){let u=!1,c;return Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(c??(c=i()),u||(u=!0,c.aborted?s():c.addEventListener("abort",s,{once:!0})),c)}),l}let xb=()=>hb;const Xd=()=>xb();var du=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(l){return this.listeners.add(l),this.onSubscribe(),()=>{this.listeners.delete(l),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Aa,ql,Vi,Ey,bb=(Ey=class extends du{constructor(){super();ue(this,Aa);ue(this,ql);ue(this,Vi);K(this,Vi,i=>{if(typeof window<"u"&&window.addEventListener){const s=()=>i();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){M(this,ql)||this.setEventListener(M(this,Vi))}onUnsubscribe(){var i;this.hasListeners()||((i=M(this,ql))==null||i.call(this),K(this,ql,void 0))}setEventListener(i){var s;K(this,Vi,i),(s=M(this,ql))==null||s.call(this),K(this,ql,i(u=>{typeof u=="boolean"?this.setFocused(u):this.onFocus()}))}setFocused(i){M(this,Aa)!==i&&(K(this,Aa,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(s=>{s(i)})}isFocused(){var i;return typeof M(this,Aa)=="boolean"?M(this,Aa):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},Aa=new WeakMap,ql=new WeakMap,Vi=new WeakMap,Ey);const Zd=new bb,Cb=db;function Eb(){let l=[],i=0,s=m=>{m()},u=m=>{m()},c=Cb;const f=m=>{i?l.push(m):c(()=>{s(m)})},g=()=>{const m=l;l=[],m.length&&c(()=>{u(()=>{m.forEach(v=>{s(v)})})})};return{batch:m=>{let v;i++;try{v=m()}finally{i--,i||g()}return v},batchCalls:m=>(...v)=>{f(()=>{m(...v)})},schedule:f,setNotifyFunction:m=>{s=m},setBatchNotifyFunction:m=>{u=m},setScheduler:m=>{c=m}}}const wt=Eb();var Bi,Fl,Gi,wy,wb=(wy=class extends du{constructor(){super();ue(this,Bi,!0);ue(this,Fl);ue(this,Gi);K(this,Gi,i=>{if(typeof window<"u"&&window.addEventListener){const s=()=>i(!0),u=()=>i(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",u,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",u)}}})}onSubscribe(){M(this,Fl)||this.setEventListener(M(this,Gi))}onUnsubscribe(){var i;this.hasListeners()||((i=M(this,Fl))==null||i.call(this),K(this,Fl,void 0))}setEventListener(i){var s;K(this,Gi,i),(s=M(this,Fl))==null||s.call(this),K(this,Fl,i(this.setOnline.bind(this)))}setOnline(i){M(this,Bi)!==i&&(K(this,Bi,i),this.listeners.forEach(s=>{s(i)}))}isOnline(){return M(this,Bi)}},Bi=new WeakMap,Fl=new WeakMap,Gi=new WeakMap,wy);const Jo=new wb;function Rb(l){return Math.min(1e3*2**l,3e4)}function qy(l){return(l??"online")==="online"?Jo.isOnline():!0}var gd=class extends Error{constructor(l){super("CancelledError"),this.revert=l==null?void 0:l.revert,this.silent=l==null?void 0:l.silent}};function Fy(l){let i=!1,s=0,u,c="pending",f,g;const m=new Promise((U,B)=>{f=U,g=B});m.catch(Qt);const v=()=>c!=="pending",S=U=>{var B;if(!v()){const $=new gd(U);O($),(B=l.onCancel)==null||B.call(l,$)}},y=()=>{i=!0},x=()=>{i=!1},C=()=>Zd.isFocused()&&(l.networkMode==="always"||Jo.isOnline())&&l.canRun(),R=()=>qy(l.networkMode)&&l.canRun(),_=U=>{v()||(u==null||u(),c="resolved",f(U))},O=U=>{v()||(u==null||u(),c="rejected",g(U))},b=U=>new Promise(B=>{var $;u=F=>{(v()||U())&&B(F)},($=l.onPause)==null||$.call(l)}).then(()=>{var B;u=void 0,v()||(B=l.onContinue)==null||B.call(l)}),E=()=>{if(v())return;let U;const B=s===0?l.initialPromise:void 0;try{U=B??l.fn()}catch($){U=Promise.reject($)}Promise.resolve(U).then(_).catch($=>{var de;if(v())return;const F=l.retry??(Xd()?0:3),P=l.retryDelay??Rb,X=typeof P=="function"?P(s,$):P,Z=F===!0||typeof F=="number"&&s<F||typeof F=="function"&&F(s,$);if(i||!Z){O($);return}s++,(de=l.onFail)==null||de.call(l,s,$),pb(X).then(()=>C()?void 0:b(C)).then(()=>{i?O($):E()})})};return{promise:m,status:()=>c,cancel:S,continue:()=>(u==null||u(),m),cancelRetry:y,continueRetry:x,canStart:R,start:()=>(R()?E():b(R).then(E),m)}}var Oa,Ry,$y=(Ry=class{constructor(){ue(this,Oa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Uy(this.gcTime)&&K(this,Oa,ja.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(l){this.gcTime=Math.max(this.gcTime||0,l??(Xd()?1/0:3e5))}clearGcTimeout(){M(this,Oa)!==void 0&&(ja.clearTimeout(M(this,Oa)),K(this,Oa,void 0))}},Oa=new WeakMap,Ry);function _b(l){return{onFetch:(i,s)=>{var y,x,C,R,_;const u=i.options,c=(C=(x=(y=i.fetchOptions)==null?void 0:y.meta)==null?void 0:x.fetchMore)==null?void 0:C.direction,f=((R=i.state.data)==null?void 0:R.pages)||[],g=((_=i.state.data)==null?void 0:_.pageParams)||[];let m={pages:[],pageParams:[]},v=0;const S=async()=>{let O=!1;const b=B=>{Sb(B,()=>i.signal,()=>O=!0)},E=By(i.options,i.fetchOptions),U=async(B,$,F)=>{if(O)return Promise.reject(i.signal.reason);if($==null&&B.pages.length)return Promise.resolve(B);const X=(()=>{const Le={client:i.client,queryKey:i.queryKey,pageParam:$,direction:F?"backward":"forward",meta:i.options.meta};return b(Le),Le})(),Z=await E(X),{maxPages:de}=i.options,ve=F?yb:vb;return{pages:ve(B.pages,Z,de),pageParams:ve(B.pageParams,$,de)}};if(c&&f.length){const B=c==="backward",$=B?Nb:$v,F={pages:f,pageParams:g};m=await U(F,$(u,F),B)}else{const B=l??f.length;do{const $=v===0?g[0]===void 0?u.initialPageParam:g[0]:$v(u,m);if(v>0&&$==null)break;m=await U(m,$),v++}while(v<B)}return m};i.options.persister?i.fetchFn=()=>{var O,b;return(b=(O=i.options).persister)==null?void 0:b.call(O,S,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s)}:i.fetchFn=S}}}function $v(l,{pages:i,pageParams:s}){const u=i.length-1;return i.length>0?l.getNextPageParam(i[u],i,s[u],s):void 0}function Nb(l,{pages:i,pageParams:s}){var u;return i.length>0?(u=l.getPreviousPageParam)==null?void 0:u.call(l,i[0],i,s[0],s):void 0}var qi,za,Fi,vn,Da,rt,uu,Ua,_n,ol,_y,Tb=(_y=class extends $y{constructor(i){super();ue(this,_n);ue(this,qi);ue(this,za);ue(this,Fi);ue(this,vn);ue(this,Da);ue(this,rt);ue(this,uu);ue(this,Ua);K(this,Ua,!1),K(this,uu,i.defaultOptions),this.setOptions(i.options),this.observers=[],K(this,Da,i.client),K(this,vn,M(this,Da).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,K(this,za,Qv(this.options)),this.state=i.state??M(this,za),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return M(this,qi)}get promise(){var i;return(i=M(this,rt))==null?void 0:i.promise}setOptions(i){if(this.options={...M(this,uu),...i},i!=null&&i._type&&K(this,qi,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Qv(this.options);s.data!==void 0&&(this.setState(kv(s.data,s.dataUpdatedAt)),K(this,za,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&M(this,vn).remove(this)}setData(i,s){const u=hd(this.state.data,i,this.options);return _e(this,_n,ol).call(this,{data:u,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),u}setState(i){_e(this,_n,ol).call(this,{type:"setState",state:i})}cancel(i){var u,c;const s=(u=M(this,rt))==null?void 0:u.promise;return(c=M(this,rt))==null||c.cancel(i),s?s.then(Qt).catch(Qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return M(this,za)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>Ke(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(i=>Ke(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!Hy(this.state.dataUpdatedAt,i)}onFocus(){var i,s;(i=this.observers.find(u=>u.shouldFetchOnWindowFocus()))==null||i.refetch({cancelRefetch:!1}),(s=M(this,rt))==null||s.continue()}onOnline(){var i,s;(i=this.observers.find(u=>u.shouldFetchOnReconnect()))==null||i.refetch({cancelRefetch:!1}),(s=M(this,rt))==null||s.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),M(this,vn).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){const s=this.observers.indexOf(i);s!==-1&&(this.observers.splice(s,1),this.observers.length||(M(this,rt)&&(M(this,Ua)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?M(this,rt).cancel({revert:!0}):M(this,rt).cancelRetry()),this.scheduleGc()),M(this,vn).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||_e(this,_n,ol).call(this,{type:"invalidate"})}async fetch(i,s){var S,y,x,C,R,_,O,b,E,U,B,$;if(this.state.fetchStatus!=="idle"&&((S=M(this,rt))==null?void 0:S.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(M(this,rt))return M(this,rt).continueRetry(),M(this,rt).promise}if(i&&this.setOptions(i),!this.options.queryFn){const F=this.observers.find(P=>P.options.queryFn);F&&this.setOptions(F.options)}const u=new AbortController,c=F=>{Object.defineProperty(F,"signal",{enumerable:!0,get:()=>(K(this,Ua,!0),u.signal)})},f=()=>{const F=By(this.options,s),X=(()=>{const Z={client:M(this,Da),queryKey:this.queryKey,meta:this.meta};return c(Z),Z})();return K(this,Ua,!1),this.options.persister?this.options.persister(F,X,this):F(X)},m=(()=>{const F={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:M(this,Da),state:this.state,fetchFn:f};return c(F),F})();(y=M(this,qi)==="infinite"?_b(this.options.pages):this.options.behavior)==null||y.onFetch(m,this),K(this,Fi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=m.fetchOptions)==null?void 0:x.meta))&&_e(this,_n,ol).call(this,{type:"fetch",meta:(C=m.fetchOptions)==null?void 0:C.meta});const v=K(this,rt,Fy({initialPromise:s==null?void 0:s.initialPromise,fn:m.fetchFn,onCancel:F=>{F instanceof gd&&F.revert&&this.setState({...M(this,Fi),fetchStatus:"idle"}),u.abort()},onFail:(F,P)=>{_e(this,_n,ol).call(this,{type:"failed",failureCount:F,error:P})},onPause:()=>{_e(this,_n,ol).call(this,{type:"pause"})},onContinue:()=>{_e(this,_n,ol).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const F=await v.start();if(F===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(F),(_=(R=M(this,vn).config).onSuccess)==null||_.call(R,F,this),(b=(O=M(this,vn).config).onSettled)==null||b.call(O,F,this.state.error,this),F}catch(F){if(F instanceof gd){if(F.silent)return M(this,rt).promise;if(F.revert){if(this.state.data===void 0)throw F;return this.state.data}}throw _e(this,_n,ol).call(this,{type:"error",error:F}),(U=(E=M(this,vn).config).onError)==null||U.call(E,F,this),($=(B=M(this,vn).config).onSettled)==null||$.call(B,this.state.data,F,this),F}finally{M(this,rt)===v&&K(this,rt,void 0),this.scheduleGc()}}},qi=new WeakMap,za=new WeakMap,Fi=new WeakMap,vn=new WeakMap,Da=new WeakMap,rt=new WeakMap,uu=new WeakMap,Ua=new WeakMap,_n=new WeakSet,ol=function(i){const s=u=>{switch(i.type){case"failed":return{...u,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...u,fetchStatus:"paused"};case"continue":return{...u,fetchStatus:"fetching"};case"fetch":return{...u,...ky(u.data,this.options),fetchMeta:i.meta??null};case"success":const c={...u,...kv(i.data,i.dataUpdatedAt),dataUpdateCount:u.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return K(this,Fi,i.manual?c:void 0),c;case"error":const f=i.error;return{...u,error:f,errorUpdateCount:u.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:u.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...u,isInvalidated:!0};case"setState":return{...u,...i.state}}};this.state=s(this.state),wt.batch(()=>{this.observers.slice().forEach(u=>{u.onQueryUpdate()}),M(this,vn).notify({query:this,type:"updated",action:i})})},_y);function ky(l,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qy(i.networkMode)?"fetching":"paused",...l===void 0&&{error:null,status:"pending"}}}function kv(l,i){return{data:l,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Qv(l){const i=typeof l.initialData=="function"?l.initialData():l.initialData,s=i!==void 0,u=s?typeof l.initialDataUpdatedAt=="function"?l.initialDataUpdatedAt():l.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?u??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Ht,Te,ou,Lt,Ha,$i,cl,ru,ki,Qi,La,Va,$l,Yi,ze,eu,md,pd,vd,yd,Sd,xd,bd,Cd,Ny,Mb=(Ny=class extends du{constructor(i,s){super();ue(this,ze);ue(this,Ht);ue(this,Te);ue(this,ou);ue(this,Lt);ue(this,Ha);ue(this,$i);ue(this,cl);ue(this,ru);ue(this,ki);ue(this,Qi);ue(this,La);ue(this,Va);ue(this,$l);ue(this,Yi,new Set);this.options=s,K(this,Ht,i),K(this,cl,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(M(this,Te).addObserver(this),Yv(M(this,Te),this.options)?_e(this,ze,eu).call(this):this.updateResult(),_e(this,ze,Sd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ed(M(this,Te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ed(M(this,Te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,_e(this,ze,xd).call(this),_e(this,ze,bd).call(this),M(this,Te).removeObserver(this)}setOptions(i){const s=this.options,u=M(this,Te);if(this.options=M(this,Ht).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ke(this.options.enabled,M(this,Te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");_e(this,ze,Cd).call(this),M(this,Te).setOptions(this.options),s._defaulted&&!Pf(this.options,s)&&M(this,Ht).getQueryCache().notify({type:"observerOptionsUpdated",query:M(this,Te),observer:this});const c=this.hasListeners();c&&Xv(M(this,Te),u,this.options,s)&&_e(this,ze,eu).call(this),this.updateResult(),c&&(M(this,Te)!==u||Ke(this.options.enabled,M(this,Te))!==Ke(s.enabled,M(this,Te))||Ke(this.options.staleTime,M(this,Te))!==Ke(s.staleTime,M(this,Te)))&&_e(this,ze,pd).call(this);const f=_e(this,ze,vd).call(this);c&&(M(this,Te)!==u||Ke(this.options.enabled,M(this,Te))!==Ke(s.enabled,M(this,Te))||f!==M(this,$l))&&_e(this,ze,yd).call(this,f)}getOptimisticResult(i){const s=M(this,Ht).getQueryCache().build(M(this,Ht),i),u=this.createResult(s,i);return Pf(this.getCurrentResult(),u)||(K(this,Lt,u),K(this,$i,this.options),K(this,Ha,M(this,Te).state)),u}getCurrentResult(){return M(this,Lt)}trackResult(i,s){return new Proxy(i,{get:(u,c)=>(this.trackProp(c),s==null||s(c),Reflect.get(u,c))})}trackProp(i){M(this,Yi).add(i)}getCurrentQuery(){return M(this,Te)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const s=M(this,Ht).defaultQueryOptions(i),u=M(this,Ht).getQueryCache().build(M(this,Ht),s);let c=()=>{},f;const g=new Promise(m=>{f=m,c=M(this,Ht).getQueryCache().subscribe(v=>{v.type==="updated"&&v.query.queryHash===u.queryHash&&u.state.data!==void 0&&(c(),m(this.createResult(u,s)))})});return Promise.race([u.fetch(s).then(()=>{const m=this.createResult(u,s);return f==null||f(m),m}).finally(()=>{c()}),g])}fetch(i){return _e(this,ze,eu).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),M(this,Lt)))}createResult(i,s){var P;const u=M(this,Te),c=this.options,f=M(this,Lt),g=M(this,Ha),m=M(this,$i),v=i!==u?i.state:M(this,ou),{state:S}=i;let y={...S},x=!1,C;if(s._optimisticResults){const X=this.hasListeners(),Z=!X&&Yv(i,s),de=X&&Xv(i,u,s,c);(Z||de)&&(y={...y,...ky(S.data,i.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:R,errorUpdatedAt:_,status:O}=y;C=y.data;let b=!1;if(s.placeholderData!==void 0&&C===void 0&&O==="pending"){let X;f!=null&&f.isPlaceholderData&&s.placeholderData===(m==null?void 0:m.placeholderData)?(X=f.data,b=!0):X=typeof s.placeholderData=="function"?s.placeholderData((P=M(this,Qi))==null?void 0:P.state.data,M(this,Qi)):s.placeholderData,X!==void 0&&(O="success",C=hd(f==null?void 0:f.data,X,s),x=!0)}if(s.select&&C!==void 0&&!b)if(f&&C===(g==null?void 0:g.data)&&s.select===M(this,ru))C=M(this,ki);else try{K(this,ru,s.select),C=s.select(C),C=hd(f==null?void 0:f.data,C,s),K(this,ki,C),K(this,cl,null)}catch(X){K(this,cl,X)}else C===void 0&&K(this,cl,null);M(this,cl)&&(R=M(this,cl),C=M(this,ki),_=Date.now(),O="error",x=!1);const E=y.fetchStatus==="fetching",U=O==="pending",B=O==="error",$=U&&E,F=C!==void 0;return{status:O,fetchStatus:y.fetchStatus,isPending:U,isSuccess:O==="success",isError:B,isInitialLoading:$,isLoading:$,data:C,dataUpdatedAt:y.dataUpdatedAt,error:R,errorUpdatedAt:_,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:y.dataUpdateCount>v.dataUpdateCount||y.errorUpdateCount>v.errorUpdateCount,isFetching:E,isRefetching:E&&!U,isLoadingError:B&&!F,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:B&&F,isStale:Kd(i,s),refetch:this.refetch,isEnabled:Ke(s.enabled,i)!==!1}}updateResult(){const i=M(this,Lt),s=this.createResult(M(this,Te),this.options);if(K(this,Ha,M(this,Te).state),K(this,$i,this.options),M(this,Ha).data!==void 0&&K(this,Qi,M(this,Te)),Pf(s,i))return;K(this,Lt,s);const c=(()=>{if(!i)return!0;const{notifyOnChangeProps:f}=this.options,g=typeof f=="function"?f():f;if(g==="all"||!g&&!M(this,Yi).size)return!0;const m=new Set(g??M(this,Yi));return this.options.throwOnError&&m.add("error"),Object.keys(M(this,Lt)).some(v=>{const S=v;return M(this,Lt)[S]!==i[S]&&m.has(S)})})();wt.batch(()=>{c&&this.listeners.forEach(f=>{f(M(this,Lt))}),M(this,Ht).getQueryCache().notify({query:M(this,Te),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&_e(this,ze,Sd).call(this)}},Ht=new WeakMap,Te=new WeakMap,ou=new WeakMap,Lt=new WeakMap,Ha=new WeakMap,$i=new WeakMap,cl=new WeakMap,ru=new WeakMap,ki=new WeakMap,Qi=new WeakMap,La=new WeakMap,Va=new WeakMap,$l=new WeakMap,Yi=new WeakMap,ze=new WeakSet,eu=function(i){_e(this,ze,Cd).call(this);let s=M(this,Te).fetch(this.options,i);return i!=null&&i.throwOnError||(s=s.catch(Qt)),s},md=function(i){return!Xd()&&Ke(this.options.enabled,M(this,Te))!==!1&&Uy(i)},pd=function(){_e(this,ze,xd).call(this);const i=Ke(this.options.staleTime,M(this,Te));if(M(this,Lt).isStale||!_e(this,ze,md).call(this,i))return;const s=Hy(M(this,Lt).dataUpdatedAt,i)+1;K(this,La,ja.setTimeout(()=>{M(this,Lt).isStale||this.updateResult()},s))},vd=function(){return Ke(this.options.refetchInterval,M(this,Te))??!1},yd=function(i){_e(this,ze,bd).call(this),K(this,$l,i),!(M(this,$l)===0||!_e(this,ze,md).call(this,M(this,$l)))&&K(this,Va,ja.setInterval(()=>{(this.options.refetchIntervalInBackground||Zd.isFocused())&&_e(this,ze,eu).call(this)},M(this,$l)))},Sd=function(){_e(this,ze,pd).call(this),_e(this,ze,yd).call(this,_e(this,ze,vd).call(this))},xd=function(){M(this,La)!==void 0&&(ja.clearTimeout(M(this,La)),K(this,La,void 0))},bd=function(){M(this,Va)!==void 0&&(ja.clearInterval(M(this,Va)),K(this,Va,void 0))},Cd=function(){const i=M(this,Ht).getQueryCache().build(M(this,Ht),this.options);if(i===M(this,Te))return;const s=M(this,Te);K(this,Te,i),K(this,ou,i.state),this.hasListeners()&&(s==null||s.removeObserver(this),i.addObserver(this))},Ny);function jb(l,i){return Ke(i.enabled,l)!==!1&&l.state.data===void 0&&!(l.state.status==="error"&&Ke(i.retryOnMount,l)===!1)}function Yv(l,i){return jb(l,i)||l.state.data!==void 0&&Ed(l,i,i.refetchOnMount)}function Ed(l,i,s){if(Ke(i.enabled,l)!==!1&&Ke(i.staleTime,l)!=="static"){const u=Ke(s,l);return u==="always"||u!==!1&&Kd(l,i)}return!1}function Xv(l,i,s,u){return(l!==i||Ke(u.enabled,l)===!1)&&(!s.suspense||l.state.status!=="error")&&Kd(l,s)}function Kd(l,i){return Ke(i.enabled,l)!==!1&&l.isStaleByTime(Ke(i.staleTime,l))}var cu,qn,Tt,Ba,Fn,Vl,Ty,Ab=(Ty=class extends $y{constructor(i){super();ue(this,Fn);ue(this,cu);ue(this,qn);ue(this,Tt);ue(this,Ba);K(this,cu,i.client),this.mutationId=i.mutationId,K(this,Tt,i.mutationCache),K(this,qn,[]),this.state=i.state||Ob(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){M(this,qn).includes(i)||(M(this,qn).push(i),this.clearGcTimeout(),M(this,Tt).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){K(this,qn,M(this,qn).filter(s=>s!==i)),this.scheduleGc(),M(this,Tt).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){M(this,qn).length||(this.state.status==="pending"?this.scheduleGc():M(this,Tt).remove(this))}continue(){var i;return((i=M(this,Ba))==null?void 0:i.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(i){var m,v,S,y,x,C,R,_,O,b,E,U,B,$,F,P,X,Z;const s=()=>{_e(this,Fn,Vl).call(this,{type:"continue"})},u={client:M(this,cu),meta:this.options.meta,mutationKey:this.options.mutationKey},c=K(this,Ba,Fy({fn:()=>this.options.mutationFn?this.options.mutationFn(i,u):Promise.reject(new Error("No mutationFn found")),onFail:(de,ve)=>{_e(this,Fn,Vl).call(this,{type:"failed",failureCount:de,error:ve})},onPause:()=>{_e(this,Fn,Vl).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>M(this,Tt).canRun(this)})),f=this.state.status==="pending",g=!c.canStart();try{if(f)s();else{_e(this,Fn,Vl).call(this,{type:"pending",variables:i,isPaused:g}),M(this,Tt).config.onMutate&&await M(this,Tt).config.onMutate(i,this,u);const ve=await((v=(m=this.options).onMutate)==null?void 0:v.call(m,i,u));ve!==this.state.context&&_e(this,Fn,Vl).call(this,{type:"pending",context:ve,variables:i,isPaused:g})}const de=await c.start();return await((y=(S=M(this,Tt).config).onSuccess)==null?void 0:y.call(S,de,i,this.state.context,this,u)),await((C=(x=this.options).onSuccess)==null?void 0:C.call(x,de,i,this.state.context,u)),await((_=(R=M(this,Tt).config).onSettled)==null?void 0:_.call(R,de,null,this.state.variables,this.state.context,this,u)),await((b=(O=this.options).onSettled)==null?void 0:b.call(O,de,null,i,this.state.context,u)),_e(this,Fn,Vl).call(this,{type:"success",data:de}),de}catch(de){try{await((U=(E=M(this,Tt).config).onError)==null?void 0:U.call(E,de,i,this.state.context,this,u))}catch(ve){Promise.reject(ve)}try{await(($=(B=this.options).onError)==null?void 0:$.call(B,de,i,this.state.context,u))}catch(ve){Promise.reject(ve)}try{await((P=(F=M(this,Tt).config).onSettled)==null?void 0:P.call(F,void 0,de,this.state.variables,this.state.context,this,u))}catch(ve){Promise.reject(ve)}try{await((Z=(X=this.options).onSettled)==null?void 0:Z.call(X,void 0,de,i,this.state.context,u))}catch(ve){Promise.reject(ve)}throw _e(this,Fn,Vl).call(this,{type:"error",error:de}),de}finally{M(this,Ba)===c&&K(this,Ba,void 0),M(this,Tt).runNext(this)}}},cu=new WeakMap,qn=new WeakMap,Tt=new WeakMap,Ba=new WeakMap,Fn=new WeakSet,Vl=function(i){const s=u=>{switch(i.type){case"failed":return{...u,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...u,isPaused:!0};case"continue":return{...u,isPaused:!1};case"pending":return{...u,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...u,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...u,data:void 0,error:i.error,failureCount:u.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=s(this.state),wt.batch(()=>{M(this,qn).forEach(u=>{u.onMutationUpdate(i)}),M(this,Tt).notify({mutation:this,type:"updated",action:i})})},Ty);function Ob(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kl,Nn,fu,My,zb=(My=class extends du{constructor(i={}){super();ue(this,kl);ue(this,Nn);ue(this,fu);this.config=i,K(this,kl,new Set),K(this,Nn,new Map),K(this,fu,0)}build(i,s,u){const c=new Ab({client:i,mutationCache:this,mutationId:++Qo(this,fu)._,options:i.defaultMutationOptions(s),state:u});return this.add(c),c}add(i){M(this,kl).add(i);const s=Yo(i);if(typeof s=="string"){const u=M(this,Nn).get(s);u?u.push(i):M(this,Nn).set(s,[i])}this.notify({type:"added",mutation:i})}remove(i){if(M(this,kl).delete(i)){const s=Yo(i);if(typeof s=="string"){const u=M(this,Nn).get(s);if(u)if(u.length>1){const c=u.indexOf(i);c!==-1&&u.splice(c,1)}else u[0]===i&&M(this,Nn).delete(s)}}this.notify({type:"removed",mutation:i})}canRun(i){var u;const s=Yo(i);if(typeof s=="string"){const c=(u=M(this,Nn).get(s))==null?void 0:u.find(f=>f.state.status==="pending");return!c||c===i}else return!0}runNext(i){var u,c;const s=Yo(i);return typeof s=="string"?((c=(u=M(this,Nn).get(s))==null?void 0:u.find(f=>f!==i&&f.state.isPaused))==null?void 0:c.continue())??Promise.resolve():Promise.resolve()}clear(){wt.batch(()=>{const i=this.getAll();M(this,kl).clear(),M(this,Nn).clear(),i.forEach(s=>{this.notify({type:"removed",mutation:s})})})}getAll(){return Array.from(M(this,kl))}find(i){const s={exact:!0,...i};return this.getAll().find(u=>Gv(s,u))}findAll(i={}){return this.getAll().filter(s=>Gv(i,s))}notify(i){wt.batch(()=>{this.listeners.forEach(s=>{s(i)})})}resumePausedMutations(){const i=this.getAll().filter(s=>s.state.isPaused);return wt.batch(()=>Promise.all(i.map(s=>s.continue().catch(Qt))))}},kl=new WeakMap,Nn=new WeakMap,fu=new WeakMap,My);function Yo(l){var i;return(i=l.options.scope)==null?void 0:i.id}var $n,jy,Db=(jy=class extends du{constructor(i={}){super();ue(this,$n);this.config=i,K(this,$n,new Map)}build(i,s,u){const c=s.queryKey,f=s.queryHash??Qd(c,s);let g=this.get(f);return g||(g=new Tb({client:i,queryKey:c,queryHash:f,options:i.defaultQueryOptions(s),state:u,defaultOptions:i.getQueryDefaults(c)}),this.add(g)),g}add(i){M(this,$n).has(i.queryHash)||(M(this,$n).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){M(this,$n).get(i.queryHash)===i&&(i.destroy(),M(this,$n).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){wt.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return M(this,$n).get(i)}getAll(){return[...M(this,$n).values()]}find(i){const s={exact:!0,...i};return this.getAll().find(u=>Bv(s,u))}findAll(i={}){const s=this.getAll();return Object.keys(i).length>0?s.filter(u=>Bv(i,u)):s}notify(i){wt.batch(()=>{this.listeners.forEach(s=>{s(i)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},$n=new WeakMap,jy),Je,Ql,Yl,Xi,Zi,Xl,Ki,Ii,Ay,Ub=(Ay=class{constructor(l={}){ue(this,Je);ue(this,Ql);ue(this,Yl);ue(this,Xi);ue(this,Zi);ue(this,Xl);ue(this,Ki);ue(this,Ii);K(this,Je,l.queryCache||new Db),K(this,Ql,l.mutationCache||new zb),K(this,Yl,l.defaultOptions||{}),K(this,Xi,new Map),K(this,Zi,new Map),K(this,Xl,0)}mount(){Qo(this,Xl)._++,M(this,Xl)===1&&(K(this,Ki,Zd.subscribe(async l=>{l&&(await this.resumePausedMutations(),M(this,Je).onFocus())})),K(this,Ii,Jo.subscribe(async l=>{l&&(await this.resumePausedMutations(),M(this,Je).onOnline())})))}unmount(){var l,i;Qo(this,Xl)._--,M(this,Xl)===0&&((l=M(this,Ki))==null||l.call(this),K(this,Ki,void 0),(i=M(this,Ii))==null||i.call(this),K(this,Ii,void 0))}isFetching(l){return M(this,Je).findAll({...l,fetchStatus:"fetching"}).length}isMutating(l){return M(this,Ql).findAll({...l,status:"pending"}).length}getQueryData(l){var s;const i=this.defaultQueryOptions({queryKey:l});return(s=M(this,Je).get(i.queryHash))==null?void 0:s.state.data}ensureQueryData(l){const i=this.defaultQueryOptions(l),s=M(this,Je).build(this,i),u=s.state.data;return u===void 0?this.fetchQuery(l):(l.revalidateIfStale&&s.isStaleByTime(Ke(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(u))}getQueriesData(l){return M(this,Je).findAll(l).map(({queryKey:i,state:s})=>[i,s.data])}setQueryData(l,i,s){var g;const u=this.defaultQueryOptions({queryKey:l}),c=(g=M(this,Je).get(u.queryHash))==null?void 0:g.state.data,f=gb(i,c);if(f!==void 0)return M(this,Je).build(this,u).setData(f,{...s,manual:!0})}setQueriesData(l,i,s){return wt.batch(()=>M(this,Je).findAll(l).map(({queryKey:u})=>[u,this.setQueryData(u,i,s)]))}getQueryState(l){var s;const i=this.defaultQueryOptions({queryKey:l});return(s=M(this,Je).get(i.queryHash))==null?void 0:s.state}removeQueries(l){const i=M(this,Je);wt.batch(()=>{i.findAll(l).forEach(s=>{i.remove(s)})})}resetQueries(l,i){const s=M(this,Je);return wt.batch(()=>{const u=s.findAll(l),c=new Set(u);return u.forEach(f=>{f.reset()}),this.refetchQueries({type:"active",predicate:f=>c.has(f)},i)})}cancelQueries(l,i={}){const s={revert:!0,...i},u=wt.batch(()=>M(this,Je).findAll(l).map(c=>c.cancel(s)));return Promise.all(u).then(Qt).catch(Qt)}invalidateQueries(l,i={}){return wt.batch(()=>(M(this,Je).findAll(l).forEach(s=>{s.invalidate()}),(l==null?void 0:l.refetchType)==="none"?Promise.resolve():this.refetchQueries({...l,type:(l==null?void 0:l.refetchType)??(l==null?void 0:l.type)??"active"},i)))}refetchQueries(l,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},u=wt.batch(()=>M(this,Je).findAll(l).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,s);return s.throwOnError||(f=f.catch(Qt)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(u).then(Qt)}async query(l){const i=this.defaultQueryOptions(l);i.retry===void 0&&(i.retry=!1);const s=M(this,Je).build(this,i),u=s.isStaleByTime(Ke(i.staleTime,s))?await s.fetch(i):s.state.data,c=i.select;return c?c(u):u}fetchQuery(l){const i=this.defaultQueryOptions(l);i.retry===void 0&&(i.retry=!1);const s=M(this,Je).build(this,i);return s.isStaleByTime(Ke(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(l){return this.fetchQuery(l).then(Qt).catch(Qt)}infiniteQuery(l){return l._type="infinite",this.query(l)}fetchInfiniteQuery(l){return l._type="infinite",this.fetchQuery(l)}prefetchInfiniteQuery(l){return this.fetchInfiniteQuery(l).then(Qt).catch(Qt)}ensureInfiniteQueryData(l){return l._type="infinite",this.ensureQueryData(l)}resumePausedMutations(){return Jo.isOnline()?M(this,Ql).resumePausedMutations():Promise.resolve()}getQueryCache(){return M(this,Je)}getMutationCache(){return M(this,Ql)}getDefaultOptions(){return M(this,Yl)}setDefaultOptions(l){K(this,Yl,l)}setQueryDefaults(l,i){M(this,Xi).set(lu(l),{queryKey:l,defaultOptions:i})}getQueryDefaults(l){const i=[...M(this,Xi).values()],s={};return i.forEach(u=>{Ji(l,u.queryKey)&&Object.assign(s,u.defaultOptions)}),s}setMutationDefaults(l,i){M(this,Zi).set(lu(l),{mutationKey:l,defaultOptions:i})}getMutationDefaults(l){const i=[...M(this,Zi).values()],s={};return i.forEach(u=>{Ji(l,u.mutationKey)&&Object.assign(s,u.defaultOptions)}),s}defaultQueryOptions(l){if(l._defaulted)return l;const i={...M(this,Yl).queries,...this.getQueryDefaults(l.queryKey),...l,_defaulted:!0};return i.queryHash||(i.queryHash=Qd(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Yd&&(i.enabled=!1),i}defaultMutationOptions(l){return l!=null&&l._defaulted?l:{...M(this,Yl).mutations,...(l==null?void 0:l.mutationKey)&&this.getMutationDefaults(l.mutationKey),...l,_defaulted:!0}}clear(){M(this,Je).clear(),M(this,Ql).clear()}},Je=new WeakMap,Ql=new WeakMap,Yl=new WeakMap,Xi=new WeakMap,Zi=new WeakMap,Xl=new WeakMap,Ki=new WeakMap,Ii=new WeakMap,Ay);const Qy=j.createContext(!1),Hb=()=>j.useContext(Qy);Qy.Provider;function Lb(){let l=!1;return{clearReset:()=>{l=!1},reset:()=>{l=!0},isReset:()=>l}}const Vb=j.createContext(Lb()),Bb=()=>j.useContext(Vb),Gb=(l,i,s)=>{const u=(s==null?void 0:s.state.status)==="error"&&typeof l.throwOnError=="function"?Gy(l.throwOnError,[s.state.error,s]):l.throwOnError;(l.suspense||u)&&(i.isReset()||(l.retryOnMount=!1))},qb=l=>{j.useEffect(()=>{l.clearReset()},[l])},Fb=({result:l,errorResetBoundary:i,throwOnError:s,query:u,suspense:c})=>l.isError&&!i.isReset()&&!l.isFetching&&u&&(c&&l.data===void 0||Gy(s,[l.error,u])),$b=l=>{if(l.suspense){const s=c=>c==="static"?c:Math.max(c??1e3,1e3),u=l.staleTime;l.staleTime=typeof u=="function"?(...c)=>s(u(...c)):s(u),typeof l.gcTime=="number"&&(l.gcTime=Math.max(l.gcTime,1e3))}},kb=(l,i)=>(l==null?void 0:l.suspense)&&i.isPending,Qb=(l,i,s)=>i.fetchOptimistic(l).catch(()=>{s.clearReset()});function Yb(l,i,s){const u=Hb(),c=Bb(),f=Dy(),g=f.defaultQueryOptions(l),m=f.getQueryCache().get(g.queryHash),v=l.subscribed!==!1;g._optimisticResults=u?"isRestoring":v?"optimistic":void 0,$b(g),Gb(g,c,m),qb(c);const[S]=j.useState(()=>new i(f,g)),y=S.getOptimisticResult(g),x=!u&&v;if(j.useSyncExternalStore(j.useCallback(C=>{const R=x?S.subscribe(wt.batchCalls(C)):Qt;return S.updateResult(),R},[S,x]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),j.useEffect(()=>{S.setOptions(g)},[g,S]),kb(g,y))throw Qb(g,S,c);if(Fb({result:y,errorResetBoundary:c,throwOnError:g.throwOnError,query:m,suspense:g.suspense}))throw y.error;return g.notifyOnChangeProps?y:S.trackResult(y)}function Wl(l,i){return Yb(l,Mb)}var Xb=Oy();/**
48
+ `+a.stack}}var Me=Object.prototype.hasOwnProperty,Ve=n.unstable_scheduleCallback,Fe=n.unstable_cancelCallback,Ct=n.unstable_shouldYield,st=n.unstable_requestPaint,et=n.unstable_now,Yn=n.unstable_getCurrentPriorityLevel,Dl=n.unstable_ImmediatePriority,ja=n.unstable_UserBlockingPriority,Ea=n.unstable_NormalPriority,Jr=n.unstable_LowPriority,Mi=n.unstable_IdlePriority,Wr=n.log,fe=n.unstable_setDisableYieldValue,Pe=null,nt=null;function bn(e){if(typeof Wr=="function"&&fe(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(Pe,e)}catch{}}var Xt=Math.clz32?Math.clz32:In,ec=Math.log,Ri=Math.LN2;function In(e){return e>>>=0,e===0?32:31-(ec(e)/Ri|0)|0}var Na=256,_a=262144,Ma=4194304;function dl(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 Ra(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var o=0,c=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=a&134217727;return S!==0?(a=S&~c,a!==0?o=dl(a):(g&=S,g!==0?o=dl(g):l||(l=S&~e,l!==0&&(o=dl(l))))):(S=a&~c,S!==0?o=dl(S):g!==0?o=dl(g):l||(l=a&~e,l!==0&&(o=dl(l)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:o}function Hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dm(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-Xt(l),o=1<<a;t|=e[a],l&=~o}return t}function yx(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 hm(){var e=Ma;return Ma<<=1,(Ma&62914560)===0&&(Ma=4194304),e}function tc(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ti(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xx(e,t,l,a,o,c){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var S=e.entanglements,_=e.expirationTimes,B=e.hiddenUpdates;for(l=g&~l;0<l;){var Q=31-Xt(l),K=1<<Q;S[Q]=0,_[Q]=-1;var U=B[Q];if(U!==null)for(B[Q]=null,Q=0;Q<U.length;Q++){var q=U[Q];q!==null&&(q.lane&=-536870913)}l&=~K}a!==0&&mm(e,a,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function mm(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Xt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function gm(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Xt(l),o=1<<a;o&t|e[a]&t&&(e[a]|=t),l&=~o}}function pm(e,t){var l=t&-t;return l=(l&42)!==0?1:nc(l),(l&(e.suspendedLanes|t))!==0?0:l}function nc(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 lc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vm(){var e=me.p;return e!==0?e:(e=window.event,e===void 0?32:jv(e.type))}function ym(e,t){var l=me.p;try{return me.p=e,t()}finally{me.p=l}}var hl=Math.random().toString(36).slice(2),Ot="__reactFiber$"+hl,an="__reactProps$"+hl,ms="__reactContainer$"+hl,xm="__reactEvents$"+hl,Sx="__reactListeners$"+hl,bx="__reactHandles$"+hl,Sm="__reactResources$"+hl,Ai="__reactMarker$"+hl,eo="__reactLoad$"+hl;function to(e){delete e[Ot],delete e[an],delete e[Sx],delete e[bx]}function Ta(e){var t;if(t=e[Ot])return t;for(var l=e.parentNode;l;){if(t=l[ms]||l[Ot]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=av(e);e!==null;){if(l=e[Ot])return l;e=av(e)}return t}e=l,l=e.parentNode}return null}function gs(e){if(e=e[Ot]||e[ms]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ps(e){var t=e[Sm];return t||(t=e[Sm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Ai]=!0}function bm(e){e[eo]=void 0}var wm=new Set,Cm={};function Aa(e,t){vs(e,t),vs(e+"Capture",t)}function vs(e,t){for(Cm[e]=t,e=0;e<t.length;e++)wm.add(t[e])}var wx=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]*$"),jm={},Em={};function Cx(e){return Me.call(Em,e)?!0:Me.call(jm,e)?!1:wx.test(e)?Em[e]=!0:(jm[e]=!0,!1)}var Be=!1;function Nm(){var e=Be;return Be=!1,e}function no(e,t,l){if(Cx(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function lo(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function ml(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,a)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _m(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jx(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){l=""+g,c.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ac(e){if(!e._valueTracker){var t=_m(e)?"checked":"value";e._valueTracker=jx(e,t,""+e[t])}}function Mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=_m(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}var Ex=/[\n"\\]/g;function wn(e){return e.replace(Ex,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sc(e,t,l,a,o,c,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?g==="number"&&e.value==t?ic(e,dn(e.value)):ic(e,dn(t)):l!=null?ic(e,dn(l)):a!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+dn(S):e.removeAttribute("name")}function Rm(e,t,l,a,o,c,g,S){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){ac(e);return}l=l!=null?""+dn(l):"",t=t!=null?""+dn(t):l,S||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=S?e.checked:!!a,e.defaultChecked=!!a,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ac(e)}function ic(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ys(e,t,l,a){if(e=e.options,t){t={};for(var o=0;o<l.length;o++)t["$"+l[o]]=!0;for(l=0;l<e.length;l++)o=t.hasOwnProperty("$"+e[l].value),e[l].selected!==o&&(e[l].selected=o),o&&a&&(e[l].defaultSelected=!0)}else{for(l=""+dn(l),t=null,o=0;o<e.length;o++){if(e[o].value===l){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Tm(e,t,l){if(t!=null&&(t=""+dn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+dn(l):""}function Am(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(be(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=dn(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),ac(e)}function xs(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Nx=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 Om(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Nx.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function zm(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="",Be=!0);for(var o in t)a=t[o],t.hasOwnProperty(o)&&l[o]!==a&&(Om(e,o,a),Be=!0)}else for(var c in t)t.hasOwnProperty(c)&&Om(e,c,t[c])}function rc(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 _x=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"]]),Mx=/^[\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 ao(e){return Mx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var oc=null;function uc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ss=null,bs=null;function Dm(e){var t=gs(e);if(t&&(e=t.stateNode)){var l=e[an]||null;e:switch(e=t.stateNode,t.type){case"input":if(sc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+wn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var o=a[an]||null;if(!o)throw Error(r(90));sc(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Mm(a)}break e;case"textarea":Tm(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ys(e,!!l.multiple,t,!1)}}}var cc=!1;function Hm(e,t,l){if(cc)return e(t,l);cc=!0;try{var a=e(t);return a}finally{if(cc=!1,(Ss!==null||bs!==null)&&(su(),Ss&&(t=Ss,e=bs,bs=Ss=null,Dm(t),e)))for(t=0;t<e.length;t++)Dm(e[t])}}function zi(e,t){var l=e.stateNode;if(l===null)return null;var a=l[an]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var gl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fc=!1;if(gl)try{var Di={};Object.defineProperty(Di,"passive",{get:function(){fc=!0}}),window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{fc=!1}var Ll=null,dc=null,so=null;function Lm(){if(so)return so;var e,t=dc,l=t.length,a,o="value"in Ll?Ll.value:Ll.textContent,c=o.length;for(e=0;e<l&&t[e]===o[e];e++);var g=l-e;for(a=1;a<=g&&t[l-a]===o[c-a];a++);return so=o.slice(e,1<a?1-a:void 0)}function io(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 ro(){return!0}function Um(){return!1}function Kt(e){function t(l,a,o,c,g){this._reactName=l,this._targetInst=o,this.type=a,this.nativeEvent=c,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(l=e[S],this[S]=l?l(c):c[S]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ro:Um,this.isPropagationStopped=Um,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ro)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ro)},persist:function(){},isPersistent:ro}),t}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Kt(Ul),Hi=z({},Ul,{view:0,detail:0}),Rx=Kt(Hi),hc,mc,Li,uo=z({},Hi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,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!==Li&&(Li&&e.type==="mousemove"?(hc=e.screenX-Li.screenX,mc=e.screenY-Li.screenY):mc=hc=0,Li=e),hc)},movementY:function(e){return"movementY"in e?e.movementY:mc}}),Vm=Kt(uo),Tx=z({},uo,{dataTransfer:0}),Ax=Kt(Tx),Ox=z({},Hi,{relatedTarget:0}),gc=Kt(Ox),zx=z({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=Kt(zx),Hx=z({},Ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lx=Kt(Hx),Ux=z({},Ul,{data:0}),$m=Kt(Ux),Vx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$x={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"},Fx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fx[e])?!!t[e]:!1}function pc(){return Bx}var kx=z({},Hi,{key:function(e){if(e.key){var t=Vx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=io(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$x[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?io(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?io(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gx=Kt(kx),qx=z({},uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fm=Kt(qx),Qx=z({},Ul,{submitter:0}),Yx=Kt(Qx),Ix=z({},Hi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),Xx=Kt(Ix),Kx=z({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zx=Kt(Kx),Px=z({},uo,{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}),Jx=Kt(Px),Wx=z({},Ul,{newState:0,oldState:0,source:0}),eS=Kt(Wx),tS=[9,13,27,32],vc=gl&&"CompositionEvent"in window,Ui=null;gl&&"documentMode"in document&&(Ui=document.documentMode);var nS=gl&&"TextEvent"in window&&!Ui,Bm=gl&&(!vc||Ui&&8<Ui&&11>=Ui),km=" ",Gm=!1;function qm(e,t){switch(e){case"keyup":return tS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function lS(e,t){switch(e){case"compositionend":return Qm(t);case"keypress":return t.which!==32?null:(Gm=!0,km);case"textInput":return e=t.data,e===km&&Gm?null:e;default:return null}}function aS(e,t){if(ws)return e==="compositionend"||!vc&&qm(e,t)?(e=Lm(),so=dc=Ll=null,ws=!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 Bm&&t.locale!=="ko"?null:t.data;default:return null}}var sS={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 Ym(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sS[e.type]:t==="textarea"}function Im(e,t,l,a){Ss?bs?bs.push(a):bs=[a]:Ss=a,t=fu(t,"onChange"),0<t.length&&(l=new oo("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Vi=null,$i=null;function iS(e){D0(e,0)}function co(e){var t=Oi(e);if(Mm(t))return e}function Xm(e,t){if(e==="change")return t}var Km=!1;if(gl){var yc;if(gl){var xc="oninput"in document;if(!xc){var Zm=document.createElement("div");Zm.setAttribute("oninput","return;"),xc=typeof Zm.oninput=="function"}yc=xc}else yc=!1;Km=yc&&(!document.documentMode||9<document.documentMode)}function Pm(){Vi&&(Vi.detachEvent("onpropertychange",Jm),$i=Vi=null)}function Jm(e){if(e.propertyName==="value"&&co($i)){var t=[];Im(t,$i,e,uc(e)),Hm(iS,t)}}function rS(e,t,l){e==="focusin"?(Pm(),Vi=t,$i=l,Vi.attachEvent("onpropertychange",Jm)):e==="focusout"&&Pm()}function oS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return co($i)}function uS(e,t){if(e==="click")return co(t)}function cS(e,t){if(e==="input"||e==="change")return co(t)}function fS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hn=typeof Object.is=="function"?Object.is:fS;function Fi(e,t){if(hn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var o=l[a];if(!Me.call(t,o)||!hn(e[o],t[o]))return!1}return!0}function Sc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Wm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eg(e,t){var l=Wm(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wm(l)}}function tg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ng(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Sc(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Sc(e.document)}return t}function bc(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 dS=gl&&"documentMode"in document&&11>=document.documentMode,Cs=null,wc=null,Bi=null,Cc=!1;function lg(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cc||Cs==null||Cs!==Sc(a)||(a=Cs,"selectionStart"in a&&bc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Bi&&Fi(Bi,a)||(Bi=a,a=fu(wc,"onSelect"),0<a.length&&(t=new oo("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Cs)))}function Oa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var js={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionrun:Oa("Transition","TransitionRun"),transitionstart:Oa("Transition","TransitionStart"),transitioncancel:Oa("Transition","TransitionCancel"),transitionend:Oa("Transition","TransitionEnd")},jc={},ag={};gl&&(ag=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function za(e){if(jc[e])return jc[e];if(!js[e])return e;var t=js[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in ag)return jc[e]=t[l];return e}var sg=za("animationend"),ig=za("animationiteration"),rg=za("animationstart"),hS=za("transitionrun"),mS=za("transitionstart"),gS=za("transitioncancel"),og=za("transitionend"),ug=new Map,Ec="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(" ");Ec.push("scrollEnd");function Dn(e,t){ug.set(e,t),Aa(t,[e])}var pS=0;function pl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Vn.identifierPrefix;var l=pS++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function cg(e){if(e==null||typeof e=="string")return e;var t=null,l=qs;if(l!==null)for(var a=0;a<l.length;a++){var o=e[l[a]];if(o!=null){if(o==="none")return"none";t=t==null?o:t+(" "+o)}}return t??e.default}function vl(e,t){return e=cg(e),t=cg(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var fo=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!==null&&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)},Cn=[],Es=0,Nc=0;function ho(){for(var e=Es,t=Nc=Es=0;t<e;){var l=Cn[t];Cn[t++]=null;var a=Cn[t];Cn[t++]=null;var o=Cn[t];Cn[t++]=null;var c=Cn[t];if(Cn[t++]=null,a!==null&&o!==null){var g=a.pending;g===null?o.next=o:(o.next=g.next,g.next=o),a.pending=o}c!==0&&fg(l,o,c)}}function mo(e,t,l,a){Cn[Es++]=e,Cn[Es++]=t,Cn[Es++]=l,Cn[Es++]=a,Nc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function _c(e,t,l,a){return mo(e,t,l,a),go(e)}function Da(e,t){return mo(e,null,null,t),go(e)}function fg(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var o=!1,c=e.return;c!==null;)c.childLanes|=l,a=c.alternate,a!==null&&(a.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-Xt(l),e=c.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=l|536870912),c):null}function go(e){if(50<ur)throw ur=0,au=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ns={};function vS(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,l,a){return new vS(e,t,l,a)}function Mc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yl(e,t){var l=e.alternate;return l===null?(l=sn(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function dg(e,t){e.flags&=1206910978;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,l,a,o,c){var g=0;if(a=e,typeof a=="function")Mc(a)&&(g=1);else if(typeof a=="string")g=Qb(e,l,pt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case $e:return e=sn(31,l,t,o),e.elementType=$e,e.lanes=c,e;case ne:return Ha(l.children,o,c,t);case ie:g=8,o|=24;break;case Ce:return e=sn(12,l,t,o|2),e.elementType=Ce,e.lanes=c,e;case J:return e=sn(13,l,t,o),e.elementType=J,e.lanes=c,e;case ue:return e=sn(19,l,t,o),e.elementType=ue,e.lanes=c,e;case Ie:case A:return e=o|32,e=sn(30,l,t,e),e.elementType=A,e.lanes=c,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case ee:g=10;break e;case X:g=9;break e;case P:g=11;break e;case Ee:g=14;break e;case je:g=16,a=null;break e}g=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=sn(g,l,t,o),t.elementType=e,t.type=a,t.lanes=c,t}function Ha(e,t,l,a){return e=sn(7,e,a,t),e.lanes=l,e}function Rc(e,t,l){return e=sn(6,e,null,t),e.lanes=l,e}function hg(e){var t=sn(18,null,null,0);return t.stateNode=e,t}function Tc(e,t,l){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mg=new WeakMap;function jn(e,t){if(typeof e=="object"&&e!==null){var l=mg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:le(t)},mg.set(e,t),t)}return{value:e,source:t,stack:le(t)}}var _s=[],Ms=0,vo=null,ki=0,En=[],Nn=0,Vl=null,Kn=1,Zn="";function xl(e,t){_s[Ms++]=ki,_s[Ms++]=vo,vo=e,ki=t}function gg(e,t,l){En[Nn++]=Kn,En[Nn++]=Zn,En[Nn++]=Vl,Vl=e;var a=Kn;e=Zn;var o=32-Xt(a)-1;a&=~(1<<o),l+=1;var c=32-Xt(t)+o;if(30<c){var g=o-o%5;c=(a&(1<<g)-1).toString(32),a>>=g,o-=g,Kn=1<<32-Xt(t)+o|l<<o|a,Zn=c+e}else Kn=1<<c|l<<o|a,Zn=e}function yo(e){e.return!==null&&(xl(e,1),gg(e,1,0))}function Ac(e){for(;e===vo;)vo=_s[--Ms],_s[Ms]=null,ki=_s[--Ms],_s[Ms]=null;for(;e===Vl;)Vl=En[--Nn],En[Nn]=null,Zn=En[--Nn],En[Nn]=null,Kn=En[--Nn],En[Nn]=null}function pg(e,t){En[Nn++]=Kn,En[Nn++]=Zn,En[Nn++]=Vl,Kn=t.id,Zn=t.overflow,Vl=e}var Mt=null,lt=null,Re=!1,$l=null,_n=!1,Oc=Error(r(519));function Fl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(jn(t,e)),Oc}function vg(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Ot]=e,t[an]=a,l){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(l=0;l<fr.length;l++)Ae(fr[l],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Rm(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Am(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||V0(t.textContent,l)?(a.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),a.onScroll!=null&&Ae("scroll",t),a.onScrollEnd!=null&&Ae("scrollend",t),a.onClick!=null&&(t.onclick=Xn),t=!0):t=!1,t||Fl(e,!0)}function xo(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Mt=Mt.return}}function Rs(e){if(e!==Mt)return!1;if(!Re)return xo(e),Re=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ud(e.type,e.memoizedProps)),l=!l),l&&lt&&Fl(e),xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=lv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=lv(e)}else t===27?(t=lt,na(e.type)?(e=yd,yd=null,lt=e):lt=t):lt=Mt?Rn(e.stateNode.nextSibling):null;return!0}function La(){lt=Mt=null,Re=!1}function zc(){var e=$l;return e!==null&&(un===null?un=e:un.push.apply(un,e),$l=null),e}function Gi(e){$l===null?$l=[e]:$l.push(e)}var Dc=Nt(null),Ua=null,Sl=null;function Bl(e,t,l){Ge(Dc,t._currentValue),t._currentValue=l}function bl(e){e._currentValue=Dc.current,ot(Dc)}function So(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Hc(e,t,l,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var g=o.child;c=c.firstContext;e:for(;c!==null;){var S=c;c=o;for(var _=0;_<t.length;_++)if(S.context===t[_]){c.lanes|=l,S=c.alternate,S!==null&&(S.lanes|=l),So(c.return,l,e),a||(g=null);break e}c=S.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(r(341));g.lanes|=l,c=g.alternate,c!==null&&(c.lanes|=l),So(g,l,e),g=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=l,g=o.alternate,g!==null&&(g.lanes|=l),So(o.return,l,e),g=o.child,g=g!==null?g.sibling:null):g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function Va(e,t,l,a){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var S=o.type;hn(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===nn.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ei):e=[ei])}o=o.return}return e!==null&&Hc(t,e,l,a),t.flags|=262144,e!==null}function bo(e){for(e=e.firstContext;e!==null;){if(!hn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Ua=e,Sl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return yg(Ua,e)}function wo(e,t){return Ua===null&&$a(e),yg(e,t)}function yg(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Sl===null){if(e===null)throw Error(r(308));Sl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sl=Sl.next=t;return l}var yS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},xS=n.unstable_scheduleCallback,SS=n.unstable_NormalPriority,yt={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lc(){return{controller:new yS,data:new Map,refCount:0}}function qi(e){e.refCount--,e.refCount===0&&xS(SS,function(){e.controller.abort()})}function xg(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var a=t[e];l.indexOf(a)===-1&&l.push(a)}}}var Qi=null;function bS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Yi=null,Uc=0,Fa=0,Ts=null;function wS(e,t){if(Yi===null){var l=Yi=[];Uc=0,Fa=ed(),Ts={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Uc++,t.then(Sg,Sg),t}function Sg(){if(--Uc===0&&(Qi=null,Yi!==null)){Ts!==null&&(Ts.status="fulfilled");var e=Yi;Yi=null,Fa=0,Ts=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function CS(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(o){l.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<l.length;o++)(0,l[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<l.length;o++)(0,l[o])(void 0)}),a}var bg=re.S;re.S=function(e,t){if(h0=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&wS(e,t),Qi!==null)for(var l=Xs;l!==null;)xg(l,Qi),l=l.next;if(l=e.types,l!==null){for(var a=Xs;a!==null;)xg(a,l),a=a.next;if(Fa!==0){a=Qi,a===null&&(a=Qi=[]);for(var o=0;o<l.length;o++){var c=l[o];a.indexOf(c)===-1&&a.push(c)}}}bg!==null&&bg(e,t)};var Ba=Nt(null);function Vc(){var e=Ba.current;return e!==null?e:tt.pooledCache}function Co(e,t){t===null?Ge(Ba,Ba.current):Ge(Ba,t.pool)}function wg(){var e=Vc();return e===null?null:{parent:yt._currentValue,pool:e}}var As=Error(r(460)),$c=Error(r(474)),jo=Error(r(542)),Eo={then:function(){}};function Cg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Xn,Xn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ng(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ng(e),e}throw Ga=t,As}}function ka(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ga=l,As):l}}var Ga=null;function Eg(){if(Ga===null)throw Error(r(459));var e=Ga;return Ga=null,e}function Ng(e){if(e===As||e===jo)throw Error(r(483))}var Os=null,Ii=0;function No(e){var t=Ii;return Ii+=1,Os===null&&(Os=[]),jg(Os,e,t)}function kl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _o(e,t){throw t.$$typeof===Y?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function _g(e){function t($,O){if(e){var G=$.deletions;G===null?($.deletions=[O],$.flags|=16):G.push(O)}}function l($,O){if(!e)return null;for(;O!==null;)t($,O),O=O.sibling;return null}function a($){for(var O=new Map;$!==null;)$.key===null?O.set($.index,$):O.set($.key,$),$=$.sibling;return O}function o($,O){return $=yl($,O),$.index=0,$.sibling=null,$}function c($,O,G){return $.index=G,e?(G=$.alternate,G!==null?(G=G.index,G<O?($.flags|=2,O):G):($.flags|=134217730,O)):($.flags|=1048576,O)}function g($){return e&&$.alternate===null&&($.flags|=134217730),$}function S($,O,G,I){return O===null||O.tag!==6?(O=Rc(G,$.mode,I),O.return=$,O):(O=o(O,G),O.return=$,O)}function _($,O,G,I){var ce=G.type;return ce===ne?($=Q($,O,G.props.children,I,G.key),kl($,G),$):O!==null&&(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===je&&ka(ce)===O.type)?(O=o(O,G.props),kl(O,G),O.return=$,O):(O=po(G.type,G.key,G.props,null,$.mode,I),kl(O,G),O.return=$,O)}function B($,O,G,I){return O===null||O.tag!==4||O.stateNode.containerInfo!==G.containerInfo||O.stateNode.implementation!==G.implementation?(O=Tc(G,$.mode,I),O.return=$,O):(O=o(O,G.children||[]),O.return=$,O)}function Q($,O,G,I,ce){return O===null||O.tag!==7?(O=Ha(G,$.mode,I,ce),O.return=$,O):(O=o(O,G),O.return=$,O)}function K($,O,G){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Rc(""+O,$.mode,G),O.return=$,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case te:return G=po(O.type,O.key,O.props,null,$.mode,G),kl(G,O),G.return=$,G;case k:return O=Tc(O,$.mode,G),O.return=$,O;case je:return O=ka(O),K($,O,G)}if(be(O)||se(O))return O=Ha(O,$.mode,G,null),O.return=$,O;if(typeof O.then=="function")return K($,No(O),G);if(O.$$typeof===ee)return K($,wo($,O),G);_o($,O)}return null}function U($,O,G,I){var ce=O!==null?O.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return ce!==null?null:S($,O,""+G,I);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case te:return G.key===ce?_($,O,G,I):null;case k:return G.key===ce?B($,O,G,I):null;case je:return G=ka(G),U($,O,G,I)}if(be(G)||se(G))return ce!==null?null:Q($,O,G,I,null);if(typeof G.then=="function")return U($,O,No(G),I);if(G.$$typeof===ee)return U($,O,wo($,G),I);_o($,G)}return null}function q($,O,G,I,ce){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return $=$.get(G)||null,S(O,$,""+I,ce);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case te:return $=$.get(I.key===null?G:I.key)||null,_(O,$,I,ce);case k:return $=$.get(I.key===null?G:I.key)||null,B(O,$,I,ce);case je:return I=ka(I),q($,O,G,I,ce)}if(be(I)||se(I))return $=$.get(G)||null,Q(O,$,I,ce,null);if(typeof I.then=="function")return q($,O,G,No(I),ce);if(I.$$typeof===ee)return q($,O,G,wo(O,I),ce);_o(O,I)}return null}function ae($,O,G,I){for(var ce=null,ze=null,ge=O,ve=O=0,bt=null;ge!==null&&ve<G.length;ve++){ge.index>ve?(bt=ge,ge=null):bt=ge.sibling;var Le=U($,ge,G[ve],I);if(Le===null){ge===null&&(ge=bt);break}e&&ge&&Le.alternate===null&&t($,ge),O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le,ge=bt}if(ve===G.length)return l($,ge),Re&&xl($,ve),ce;if(ge===null){for(;ve<G.length;ve++)ge=K($,G[ve],I),ge!==null&&(O=c(ge,O,ve),ze===null?ce=ge:ze.sibling=ge,ze=ge);return Re&&xl($,ve),ce}for(ge=a(ge);ve<G.length;ve++)bt=q(ge,$,ve,G[ve],I),bt!==null&&(e&&(Le=bt.alternate,Le!==null&&ge.delete(Le.key===null?ve:Le.key)),O=c(bt,O,ve),ze===null?ce=bt:ze.sibling=bt,ze=bt);return e&&ge.forEach(function(ra){return t($,ra)}),Re&&xl($,ve),ce}function de($,O,G,I){if(G==null)throw Error(r(151));for(var ce=null,ze=null,ge=O,ve=O=0,bt=null,Le=G.next();ge!==null&&!Le.done;ve++,Le=G.next()){ge.index>ve?(bt=ge,ge=null):bt=ge.sibling;var ra=U($,ge,Le.value,I);if(ra===null){ge===null&&(ge=bt);break}e&&ge&&ra.alternate===null&&t($,ge),O=c(ra,O,ve),ze===null?ce=ra:ze.sibling=ra,ze=ra,ge=bt}if(Le.done)return l($,ge),Re&&xl($,ve),ce;if(ge===null){for(;!Le.done;ve++,Le=G.next())Le=K($,Le.value,I),Le!==null&&(O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le);return Re&&xl($,ve),ce}for(ge=a(ge);!Le.done;ve++,Le=G.next())Le=q(ge,$,ve,Le.value,I),Le!==null&&(e&&(bt=Le.alternate,bt!==null&&ge.delete(bt.key===null?ve:bt.key)),O=c(Le,O,ve),ze===null?ce=Le:ze.sibling=Le,ze=Le);return e&&ge.forEach(function(l2){return t($,l2)}),Re&&xl($,ve),ce}function _e($,O,G,I){if(typeof G=="object"&&G!==null&&G.type===ne&&G.key===null&&G.props.ref===void 0&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case te:e:{for(var ce=G.key;O!==null;){if(O.key===ce){if(ce=G.type,ce===ne){if(O.tag===7){l($,O.sibling),I=o(O,G.props.children),kl(I,G),I.return=$,$=I;break e}}else if(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===je&&ka(ce)===O.type){l($,O.sibling),I=o(O,G.props),kl(I,G),I.return=$,$=I;break e}l($,O);break}else t($,O);O=O.sibling}G.type===ne?(I=Ha(G.props.children,$.mode,I,G.key),kl(I,G),I.return=$,$=I):(I=po(G.type,G.key,G.props,null,$.mode,I),kl(I,G),I.return=$,$=I)}return g($);case k:e:{for(ce=G.key;O!==null;){if(O.key===ce)if(O.tag===4&&O.stateNode.containerInfo===G.containerInfo&&O.stateNode.implementation===G.implementation){l($,O.sibling),I=o(O,G.children||[]),I.return=$,$=I;break e}else{l($,O);break}else t($,O);O=O.sibling}I=Tc(G,$.mode,I),I.return=$,$=I}return g($);case je:return G=ka(G),_e($,O,G,I)}if(be(G))return ae($,O,G,I);if(se(G)){if(ce=se(G),typeof ce!="function")throw Error(r(150));return G=ce.call(G),de($,O,G,I)}if(typeof G.then=="function")return _e($,O,No(G),I);if(G.$$typeof===ee)return _e($,O,wo($,G),I);_o($,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,O!==null&&O.tag===6?(l($,O.sibling),I=o(O,G),I.return=$,$=I):(l($,O),I=Rc(G,$.mode,I),I.return=$,$=I),g($)):l($,O)}return function($,O,G,I){try{Ii=0;var ce=_e($,O,G,I);return Os=null,ce}catch(ge){if(ge===As||ge===jo)throw ge;var ze=sn(29,ge,null,$.mode);return ze.lanes=I,ze.return=$,ze}finally{}}}var qa=_g(!0),Mg=_g(!1),Gl=!1;function Fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bc(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 ql(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ql(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(qe&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=go(e),fg(e,null,l),t}return mo(e,a,t,l),go(e)}function Xi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,gm(e,l)}}function kc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var o=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?o=c=g:c=c.next=g,l=l.next}while(l!==null);c===null?o=c=t:c=c.next=t}else o=c=t;l={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Gc=!1;function Ki(){if(Gc){var e=Ts;if(e!==null)throw e}}function Zi(e,t,l,a){Gc=!1;var o=e.updateQueue;Gl=!1;var c=o.firstBaseUpdate,g=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var _=S,B=_.next;_.next=null,g===null?c=B:g.next=B,g=_;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,S=Q.lastBaseUpdate,S!==g&&(S===null?Q.firstBaseUpdate=B:S.next=B,Q.lastBaseUpdate=_))}if(c!==null){var K=o.baseState;g=0,Q=B=_=null,S=c;do{var U=S.lane&-536870913,q=U!==S.lane;if(q?(Oe&U)===U:(a&U)===U){U!==0&&U===Fa&&(Gc=!0),Q!==null&&(Q=Q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ae=e,de=S;U=t;var _e=l;switch(de.tag){case 1:if(ae=de.payload,typeof ae=="function"){K=ae.call(_e,K,U);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,U=typeof ae=="function"?ae.call(_e,K,U):ae,U==null)break e;K=z({},K,U);break e;case 2:Gl=!0}}U=S.callback,U!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[U]:q.push(U))}else q={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Q===null?(B=Q=q,_=K):Q=Q.next=q,g|=U;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;q=S,S=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);Q===null&&(_=K),o.baseState=_,o.firstBaseUpdate=B,o.lastBaseUpdate=Q,c===null&&(o.shared.lanes=0),Jl|=g,e.lanes=g,e.memoizedState=K}}function Rg(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Tg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Rg(l[e],t)}var Yl=Nt(null),Mo=Nt(0);function Ag(e,t){e=Nl,Ge(Mo,e),Ge(Yl,t),Nl=e|t.baseLanes}function qc(){Ge(Mo,Nl),Ge(Yl,Yl.current)}function Qc(){Nl=Mo.current,ot(Yl),ot(Mo)}var Dt=Nt(null),qt=null;function Il(e){var t=e.alternate;Ge(Ht,Ht.current&1),Ge(Dt,e),qt===null&&(t===null||Yl.current!==null||t.memoizedState!==null)&&(qt=e)}function Yc(e){Ge(Ht,Ht.current),Ge(Dt,e),qt===null&&(qt=e)}function Og(e){e.tag===22?(Ge(Ht,Ht.current),Ge(Dt,e),qt===null&&(qt=e)):Xl()}function Xl(){Ge(Ht,Ht.current),Ge(Dt,Dt.current)}function mn(e){ot(Dt),qt===e&&(qt=null),ot(Ht)}var Ht=Nt(0);function Pi(e,t){Ge(Dt,Dt.current),Ge(Ht,t)}function Ic(e){ot(Ht),ot(Dt),qt===e&&(qt=null)}function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||pd(l)||vd(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)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 wl=0,Ne=null,Je=null,xt=null,To=!1,zs=!1,Qa=!1,Ao=0,Ji=0,Ds=null,jS=0;function mt(){throw Error(r(321))}function Xc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!hn(e[l],t[l]))return!1;return!0}function Kc(e,t,l,a,o,c){return wl=c,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?gp:pp,Qa=!1,c=l(a,o),Qa=!1,zs&&(c=Dg(t,l,a,o)),zg(e),c}function zg(e){re.H=Vo;var t=Je!==null&&Je.next!==null;if(wl=0,xt=Je=Ne=null,To=!1,Ji=0,Ds=null,t)throw Error(r(300));e===null||St||(e=e.dependencies,e!==null&&bo(e)&&(St=!0))}function Dg(e,t,l,a){Ne=e;var o=0;do{if(zs&&(Ds=null),Ji=0,zs=!1,25<=o)throw Error(r(301));if(o+=1,xt=Je=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}re.H=OS,c=t(l,a)}while(zs);return c}function ES(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?Wi(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Zc(){var e=Ao!==0;return Ao=0,e}function Pc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Jc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}wl=0,xt=Je=Ne=null,zs=!1,Ji=Ao=0,Ds=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Ne.memoizedState=xt=e:xt=xt.next=e,xt}function vt(){if(Je===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=xt===null?Ne.memoizedState:xt.next;if(t!==null)xt=t,Je=e;else{if(e===null)throw Ne.alternate===null?Error(r(467)):Error(r(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},xt===null?Ne.memoizedState=xt=e:xt=xt.next=e}return xt}function Oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wi(e){var t=Ji;return Ji+=1,Ds===null&&(Ds=[]),e=jg(Ds,e,t),t=Ne,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?gp:pp),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wi(e);if(e.$$typeof===V)return;if(e.$$typeof===ee)return zt(e)}throw Error(r(438,String(e)))}function Wc(e){var t=null,l=Ne.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=Ne.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Oo(),Ne.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=We;return t.index++,l}function Cl(e,t){return typeof t=="function"?t(e):t}function Do(e){var t=vt();return ef(t,Je,e)}function ef(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var o=e.baseQueue,c=a.pending;if(c!==null){if(o!==null){var g=o.next;o.next=c.next,c.next=g}t.baseQueue=o=c,a.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var S=g=null,_=null,B=t,Q=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Oe&K)===K:(wl&K)===K){var U=B.revertLane;if(U===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Fa&&(Q=!0);else if((wl&U)===U){B=B.next,U===Fa&&(Q=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=K,g=c):_=_.next=K,Ne.lanes|=U,Jl|=U;K=B.action,Qa&&l(c,K),c=B.hasEagerState?B.eagerState:l(c,K)}else U={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=U,g=c):_=_.next=U,Ne.lanes|=K,Jl|=K;B=B.next}while(B!==null&&B!==t);if(_===null?g=c:_.next=S,!hn(c,e.memoizedState)&&(St=!0,Q&&(l=Ts,l!==null)))throw l;e.memoizedState=c,e.baseState=g,e.baseQueue=_,a.lastRenderedState=c}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function tf(e){var t=vt(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,o=l.pending,c=t.memoizedState;if(o!==null){l.pending=null;var g=o=o.next;do c=e(c,g.action),g=g.next;while(g!==o);hn(c,t.memoizedState)||(St=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function Hg(e,t,l){var a=Ne,o=vt(),c=Re;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var g=!hn((Je||o).memoizedState,l);if(g&&(o.memoizedState=l,St=!0),o=o.queue,af(Vg.bind(null,a,o,e),[e]),e=o.getSnapshot!==t||g||xt!==null&&(xt.memoizedState.tag&1)!==0,Hs(e?9:8,{destroy:void 0},Ug.bind(null,a,o,l,t),null),e){if(a.flags|=2048,tt===null)throw Error(r(349));c||(wl&127)!==0||Lg(a,t,l)}return l}function Lg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ne.updateQueue,t===null?(t=Oo(),Ne.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Ug(e,t,l,a){t.value=l,t.getSnapshot=a,$g(t)&&Fg(e)}function Vg(e,t,l){return l(function(){$g(t)&&Fg(e)})}function $g(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!hn(e,l)}catch{return!0}}function Fg(e){var t=Da(e,2);t!==null&&cn(t,e,2)}function nf(e){var t=Zt();if(typeof e=="function"){var l=e;if(e=l(),Qa){bn(!0);try{l()}finally{bn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:e},t}function Bg(e,t,l,a){return e.baseState=l,ef(e,Je,typeof a=="function"?a:Cl)}function NS(e,t,l,a,o){if(Uo(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){c.listeners.push(g)}};re.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,kg(t,c)):(c.next=l.next,t.pending=l.next=c)}}function kg(e,t){var l=t.action,a=t.payload,o=e.state;if(t.isTransition){var c=re.T,g={};g.types=c!==null?c.types:null,re.T=g;try{var S=l(o,a),_=re.S;_!==null&&_(g,S),Gg(e,t,S)}catch(B){lf(e,t,B)}finally{c!==null&&g.types!==null&&(c.types=g.types),re.T=c}}else try{c=l(o,a),Gg(e,t,c)}catch(B){lf(e,t,B)}}function Gg(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){qg(e,t,a)},function(a){return lf(e,t,a)}):qg(e,t,l)}function qg(e,t,l){t.status="fulfilled",t.value=l,Qg(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,kg(e,l)))}function lf(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Qg(t),t=t.next;while(t!==a)}e.action=null}function Qg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yg(e,t){return t}function Ig(e,t){if(Re){var l=tt.formState;if(l!==null){e:{var a=Ne;if(Re){if(lt){t:{for(var o=lt,c=_n;o.nodeType!==8;){if(!c){o=null;break t}if(o=Rn(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){lt=Rn(o.nextSibling),a=o.data==="F!";break e}}Fl(a)}a=!1}a&&(t=l[0])}}return l=Zt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yg,lastRenderedState:t},l.queue=a,l=dp.bind(null,Ne,a),a.dispatch=l,a=nf(!1),c=cf.bind(null,Ne,!1,a.queue),a=Zt(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,l=NS.bind(null,Ne,o,c,l),o.dispatch=l,a.memoizedState=e,[t,l,!1]}function Xg(e){var t=vt();return Kg(t,Je,e)}function Kg(e,t,l){if(t=ef(e,t,Yg)[0],e=Do(Cl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Wi(t)}catch(g){throw g===As?jo:g}else a=t;t=vt();var o=t.queue,c=o.dispatch;return l!==t.memoizedState&&(Ne.flags|=2048,Hs(9,{destroy:void 0},_S.bind(null,o,l),null)),[a,c,e]}function _S(e,t){e.action=t}function Zg(e){var t=vt(),l=Je;if(l!==null)return Kg(t,l,e);vt(),t=t.memoizedState,l=vt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Hs(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Oo(),Ne.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Pg(){return vt().memoizedState}function Ho(e,t,l,a){var o=Zt();Ne.flags|=e,o.memoizedState=Hs(1|t,{destroy:void 0},l,a===void 0?null:a)}function Lo(e,t,l,a){var o=vt();a=a===void 0?null:a;var c=o.memoizedState.inst;Je!==null&&a!==null&&Xc(a,Je.memoizedState.deps)?o.memoizedState=Hs(t,c,l,a):(Ne.flags|=e,o.memoizedState=Hs(1|t,c,l,a))}function Jg(e,t){Ho(8390656,8,e,t)}function af(e,t){Lo(2048,8,e,t)}function MS(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Oo(),Ne.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Wg(e){var t=vt().memoizedState;return MS({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function ep(e,t){return Lo(4,2,e,t)}function tp(e,t){return Lo(4,4,e,t)}function np(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lp(e,t,l){l=l!=null?l.concat([e]):null,Lo(4,4,np.bind(null,t,e),l)}function sf(){}function ap(e,t){var l=vt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Xc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function sp(e,t){var l=vt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Xc(t,a[1]))return a[0];if(a=e(),Qa){bn(!0);try{e()}finally{bn(!1)}}return l.memoizedState=[a,t],a}function rf(e,t,l){return l===void 0||(wl&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=g0(),Ne.lanes|=e,Jl|=e,l)}function ip(e,t,l,a){return hn(l,t)?l:Yl.current!==null?(e=rf(e,l,a),hn(e,t)||(St=!0),e):(wl&106)===0||(wl&1073741824)!==0&&(Oe&261930)===0?(St=!0,e.memoizedState=l):(e=g0(),Ne.lanes|=e,Jl|=e,t)}function rp(e,t,l,a,o){var c=me.p;me.p=c!==0&&8>c?c:8;var g=re.T,S={};S.types=g!==null?g.types:null,re.T=S,cf(e,!1,t,l);try{var _=o(),B=re.S;if(B!==null&&B(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Q=CS(_,a);er(e,t,Q,yn(e))}else er(e,t,a,yn(e))}catch(K){er(e,t,{then:function(){},status:"rejected",reason:K},yn())}finally{me.p=c,g!==null&&S.types!==null&&(g.types=S.types),re.T=g}}function RS(){}function of(e,t,l,a){if(e.tag!==5)throw Error(r(476));var o=op(e).queue;rp(e,o,t,rt,l===null?RS:function(){return up(e),l(a)})}function op(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:rt,baseState:rt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:rt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function up(e){var t=op(e);t.next===null&&(t=e.alternate.memoizedState),er(e,t.next.queue,{},yn())}function uf(){return zt(ei)}function cp(){return vt().memoizedState}function fp(){return vt().memoizedState}function TS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=yn();e=ql(l);var a=Ql(t,e,l);a!==null&&(cn(a,t,l),Xi(a,t,l)),t={cache:Lc()},e.payload=t;return}t=t.return}}function AS(e,t,l){var a=yn();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Uo(e)?hp(t,l):(l=_c(e,t,l,a),l!==null&&(cn(l,e,a),mp(l,t,a)))}function dp(e,t,l){var a=yn();er(e,t,l,a)}function er(e,t,l,a){var o={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Uo(e))hp(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var g=t.lastRenderedState,S=c(g,l);if(o.hasEagerState=!0,o.eagerState=S,hn(S,g))return mo(e,t,o,0),tt===null&&ho(),!1}catch{}finally{}if(l=_c(e,t,o,a),l!==null)return cn(l,e,a),mp(l,t,a),!0}return!1}function cf(e,t,l,a){if(a={lane:2,revertLane:ed(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Uo(e)){if(t)throw Error(r(479))}else t=_c(e,l,a,2),t!==null&&cn(t,e,2)}function Uo(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function hp(e,t){zs=To=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function mp(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,gm(e,l)}}var Vo={readContext:zt,use:zo,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt,useEffectEvent:mt},gp={readContext:zt,use:zo,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Jg,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ho(4194308,4,np.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ho(4194308,4,e,t)},useInsertionEffect:function(e,t){Ho(4,2,e,t)},useMemo:function(e,t){var l=Zt();t=t===void 0?null:t;var a=e();if(Qa){bn(!0);try{e()}finally{bn(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Zt();if(l!==void 0){var o=l(t);if(Qa){bn(!0);try{l(t)}finally{bn(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=AS.bind(null,Ne,e),[a.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=nf(e);var t=e.queue,l=dp.bind(null,Ne,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:sf,useDeferredValue:function(e,t){var l=Zt();return rf(l,e,t)},useTransition:function(){var e=nf(!1);return e=rp.bind(null,Ne,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=Ne,o=Zt();if(Re){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),tt===null)throw Error(r(349));(Oe&127)!==0||Lg(a,t,l)}o.memoizedState=l;var c={value:l,getSnapshot:t};return o.queue=c,Jg(Vg.bind(null,a,c,e),[e]),a.flags|=2048,Hs(9,{destroy:void 0},Ug.bind(null,a,c,l,t),null),l},useId:function(){var e=Zt(),t=tt.identifierPrefix;if(Re){var l=Zn,a=Kn;l=(a&~(1<<32-Xt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ao++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=jS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uf,useFormState:Ig,useActionState:Ig,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=cf.bind(null,Ne,!0,l),l.dispatch=t,[e,t]},useMemoCache:Wc,useCacheRefresh:function(){return Zt().memoizedState=TS.bind(null,Ne)},useEffectEvent:function(e){var t=Zt(),l={impl:e};return t.memoizedState=l,function(){if((qe&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},pp={readContext:zt,use:zo,useCallback:ap,useContext:zt,useEffect:af,useImperativeHandle:lp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:Do,useRef:Pg,useState:function(){return Do(Cl)},useDebugValue:sf,useDeferredValue:function(e,t){var l=vt();return ip(l,Je.memoizedState,e,t)},useTransition:function(){var e=Do(Cl)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Hg,useId:cp,useHostTransitionStatus:uf,useFormState:Xg,useActionState:Xg,useOptimistic:function(e,t){var l=vt();return Bg(l,Je,e,t)},useMemoCache:Wc,useCacheRefresh:fp,useEffectEvent:Wg},OS={readContext:zt,use:zo,useCallback:ap,useContext:zt,useEffect:af,useImperativeHandle:lp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:tf,useRef:Pg,useState:function(){return tf(Cl)},useDebugValue:sf,useDeferredValue:function(e,t){var l=vt();return Je===null?rf(l,e,t):ip(l,Je.memoizedState,e,t)},useTransition:function(){var e=tf(Cl)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Hg,useId:cp,useHostTransitionStatus:uf,useFormState:Zg,useActionState:Zg,useOptimistic:function(e,t){var l=vt();return Je!==null?Bg(l,Je,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Wc,useCacheRefresh:fp,useEffectEvent:Wg};function ff(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:z({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var df={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=yn(),o=ql(a);o.payload=t,l!=null&&(o.callback=l),t=Ql(e,o,a),t!==null&&(cn(t,e,a),Xi(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=yn(),o=ql(a);o.tag=1,o.payload=t,l!=null&&(o.callback=l),t=Ql(e,o,a),t!==null&&(cn(t,e,a),Xi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=yn(),a=ql(l);a.tag=2,t!=null&&(a.callback=t),t=Ql(e,a,l),t!==null&&(cn(t,e,l),Xi(t,e,l))}};function vp(e,t,l,a,o,c,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,g):t.prototype&&t.prototype.isPureReactComponent?!Fi(l,a)||!Fi(o,c):!0}function yp(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&df.enqueueReplaceState(t,t.state,null)}function Ya(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=z({},l));for(var o in e)l[o]===void 0&&(l[o]=e[o])}return l}function xp(e){fo(e)}function Sp(e){console.error(e)}function bp(e){fo(e)}function $o(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function wp(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function hf(e,t,l){return l=ql(l),l.tag=3,l.payload={element:null},l.callback=function(){$o(e,t)},l}function Cp(e){return e=ql(e),e.tag=3,e}function jp(e,t,l,a){var o=l.type.getDerivedStateFromError;if(typeof o=="function"){var c=a.value;e.payload=function(){return o(c)},e.callback=function(){wp(t,l,a)}}var g=l.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){wp(t,l,a),typeof o!="function"&&(Wl===null?Wl=new Set([this]):Wl.add(this));var S=a.stack;this.componentDidCatch(a.value,{componentStack:S!==null?S:""})})}function zS(e,t,l,a,o){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Va(t,l,o,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return qt===null?iu():l.alternate===null&&gt===0&&(gt=3),l.flags&=-257,l.flags|=65536,l.lanes=o,a===Eo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Pf(e,a,o)),!1;case 22:return l.flags|=65536,a===Eo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Pf(e,a,o)),!1}throw Error(r(435,l.tag))}return Pf(e,a,o),iu(),!1}if(Re)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==Oc&&(e=Error(r(422),{cause:a}),Gi(jn(e,l)))):(a!==Oc&&(t=Error(r(423),{cause:a}),Gi(jn(t,l))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=jn(a,l),o=hf(e.stateNode,a,o),kc(e,o),gt!==4&&(gt=2)),!1;var c=Error(r(520),{cause:a});if(c=jn(c,l),or===null?or=[c]:or.push(c),gt!==4&&(gt=2),t===null)return!0;a=jn(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=o&-o,l.lanes|=e,e=hf(l.stateNode,a,e),kc(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Wl===null||!Wl.has(c))))return l.flags|=65536,o&=-o,l.lanes|=o,o=Cp(o),jp(o,e,l,a),kc(l,o),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var mf=Error(r(461)),St=!1;function jt(e,t,l,a){t.child=e===null?Mg(t,null,l,a):qa(t,e.child,l,a)}function Ep(e,t,l,a,o){l=l.render;var c=t.ref;if("ref"in a){var g={};for(var S in a)S!=="ref"&&(g[S]=a[S])}else g=a;return $a(t),a=Kc(e,t,l,g,c,o),S=Zc(),e!==null&&!St?(Pc(e,t,o),jl(e,t,o)):(Re&&S&&yo(t),t.flags|=1,jt(e,t,a,o),t.child)}function Np(e,t,l,a,o){if(e===null){var c=l.type;return typeof c=="function"&&!Mc(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,_p(e,t,c,a,o)):(e=po(l.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!wf(e,o)){var g=c.memoizedProps;if(l=l.compare,l=l!==null?l:Fi,l(g,a)&&e.ref===t.ref)return jl(e,t,o)}return t.flags|=1,e=yl(c,a),e.ref=t.ref,e.return=t,t.child=e}function _p(e,t,l,a,o){if(e!==null){var c=e.memoizedProps;if(Fi(c,a)&&e.ref===t.ref)if(St=!1,t.pendingProps=a=c,wf(e,o))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,jl(e,t,o)}return gf(e,t,l,a,o)}function Mp(e,t,l,a){var o=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~c}else a=0,t.child=null;return Rp(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Co(t,c!==null?c.cachePool:null),c!==null?Ag(t,c):qc(),Og(t);else return a=t.lanes=536870912,Rp(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(Co(t,c.cachePool),Ag(t,c),Xl(),t.memoizedState=null):(e!==null&&Co(t,null),qc(),Xl());return jt(e,t,o,l),t.child}function tr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rp(e,t,l,a,o){var c=Vc();return c=c===null?null:{parent:yt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Co(t,null),qc(),Og(t),e!==null&&Va(e,t,a,!0),t.childLanes=o,null}function Fo(e,t){return t=Bo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Tp(e,t,l){return qa(t,e.child,null,l),e=Fo(t,t.pendingProps),e.flags|=2,mn(t),t.memoizedState=null,e}function DS(e,t,l){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Re){if(a.mode==="hidden")return e=Fo(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},tr(null,e);if(Yc(t),(e=lt)?(e=nv(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:Kn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},l=hg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw Fl(t);return t.lanes=536870912,null}return Fo(t,a)}var c=e.memoizedState;if(c!==null){var g=c.dehydrated;if(Yc(t),o)if(t.flags&256)t.flags&=-257,t=Tp(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(St||Va(e,t,l,!1),o=(l&e.childLanes)!==0,St||o){if(Yl.current===null){if(a=tt,a!==null&&(g=pm(a,l),g!==0&&g!==c.retryLane))throw c.retryLane=g,Da(e,g),cn(a,e,g),mf;iu()}t=Tp(e,t,l)}else e=c.treeContext,lt=Rn(g.nextSibling),Mt=t,Re=!0,$l=null,_n=!1,e!==null&&pg(t,e),t=Fo(t,a),t.flags|=134221824;return t}return e=yl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ls(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function gf(e,t,l,a,o){return $a(t),l=Kc(e,t,l,a,void 0,o),a=Zc(),e!==null&&!St?(Pc(e,t,o),jl(e,t,o)):(Re&&a&&yo(t),t.flags|=1,jt(e,t,l,o),t.child)}function Ap(e,t,l,a,o,c){return $a(t),t.updateQueue=null,l=Dg(t,a,l,o),zg(e),a=Zc(),e!==null&&!St?(Pc(e,t,c),jl(e,t,c)):(Re&&a&&yo(t),t.flags|=1,jt(e,t,l,c),t.child)}function Op(e,t,l,a,o){if($a(t),t.stateNode===null){var c=Ns,g=l.contextType;typeof g=="object"&&g!==null&&(c=zt(g)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=df,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},Fc(t),g=l.contextType,c.context=typeof g=="object"&&g!==null?zt(g):Ns,c.state=t.memoizedState,g=l.getDerivedStateFromProps,typeof g=="function"&&(ff(t,l,g,a),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(g=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),g!==c.state&&df.enqueueReplaceState(c,c.state,null),Zi(t,a,c,o),Ki(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var S=t.memoizedProps,_=Ya(l,S);c.props=_;var B=c.context,Q=l.contextType;g=Ns,typeof Q=="object"&&Q!==null&&(g=zt(Q));var K=l.getDerivedStateFromProps;Q=typeof K=="function"||typeof c.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(S||B!==g)&&yp(t,c,a,g),Gl=!1;var U=t.memoizedState;c.state=U,Zi(t,a,c,o),Ki(),B=t.memoizedState,S||U!==B||Gl?(typeof K=="function"&&(ff(t,l,K,a),B=t.memoizedState),(_=Gl||vp(t,l,_,a,U,B,g))?(Q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=B),c.props=a,c.state=B,c.context=g,a=_):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,Bc(e,t),g=t.memoizedProps,Q=Ya(l,g),c.props=Q,K=t.pendingProps,U=c.context,B=l.contextType,_=Ns,typeof B=="object"&&B!==null&&(_=zt(B)),S=l.getDerivedStateFromProps,(B=typeof S=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==K||U!==_)&&yp(t,c,a,_),Gl=!1,U=t.memoizedState,c.state=U,Zi(t,a,c,o),Ki();var q=t.memoizedState;g!==K||U!==q||Gl||e!==null&&e.dependencies!==null&&bo(e.dependencies)?(typeof S=="function"&&(ff(t,l,S,a),q=t.memoizedState),(Q=Gl||vp(t,l,Q,a,U,q,_)||e!==null&&e.dependencies!==null&&bo(e.dependencies))?(B||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,q,_),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,q,_)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=q),c.props=a,c.state=q,c.context=_,a=Q):(typeof c.componentDidUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,Ls(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=qa(t,e.child,null,o),t.child=qa(t,null,l,o)):jt(e,t,l,o),t.memoizedState=c.state,e=t.child):e=jl(e,t,o),e}function zp(e,t,l,a){return La(),t.flags|=256,jt(e,t,l,a),t.child}var pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vf(e){return{baseLanes:e,cachePool:wg()}}function yf(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=vn),e}function Dp(e,t,l){var a=t.pendingProps,o=!1,c=(t.flags&128)!==0,g;if((g=c)||(g=e!==null&&e.memoizedState===null?!1:(Ht.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(o?Il(t):Xl(),(e=lt)?(e=nv(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:Kn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},l=hg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw Fl(t);return vd(e)?t.lanes=32:t.lanes=536870912,null}return c=a.children,a=a.fallback,o?(Xl(),o=t.mode,c=Bo({mode:"hidden",children:c},o),a=Ha(a,o,l,null),c.return=t,a.return=t,c.sibling=a,t.child=c,a=t.child,a.memoizedState=vf(l),a.childLanes=yf(e,g,l),t.memoizedState=pf,tr(null,a)):(Il(t),xf(t,c))}var S=e.memoizedState;if(S!==null){var _=S.dehydrated;if(_!==null)return HS(e,t,c,g,a,_,S,l)}return o?(Xl(),o=a.fallback,c=t.mode,S=e.child,_=S.sibling,a=yl(S,{mode:"hidden",children:a.children}),a.subtreeFlags=S.subtreeFlags&1206910976,_!==null?o=yl(_,o):(o=Ha(o,c,l,null),o.flags|=2),o.return=t,a.return=t,a.sibling=o,t.child=a,tr(null,a),a=t.child,o=e.child.memoizedState,o===null?o=vf(l):(c=o.cachePool,c!==null?(S=yt._currentValue,c=c.parent!==S?{parent:S,pool:S}:c):c=wg(),o={baseLanes:o.baseLanes|l,cachePool:c}),a.memoizedState=o,a.childLanes=yf(e,g,l),t.memoizedState=pf,tr(e.child,a)):(Il(t),l=e.child,e=l.sibling,l=yl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=l,t.memoizedState=null,l)}function xf(e,t){return t=Bo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bo(e,t){return e=sn(22,e,null,t),e.lanes=0,e}function ko(e,t,l){return qa(t,e.child,null,l),e=xf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HS(e,t,l,a,o,c,g,S){if(l)return t.flags&256?(Il(t),t.flags&=-257,ko(e,t,S)):t.memoizedState!==null?(Xl(),t.child=e.child,t.flags|=128,null):(Xl(),c=o.fallback,g=t.mode,o=Bo({mode:"visible",children:o.children},g),c=Ha(c,g,S,null),c.flags|=2,o.return=t,c.return=t,o.sibling=c,t.child=o,qa(t,e.child,null,S),o=t.child,o.memoizedState=vf(S),o.childLanes=yf(e,a,S),t.memoizedState=pf,tr(null,o));if(Il(t),vd(c)){if(a=c.nextSibling&&c.nextSibling.dataset,a)var _=a.dgst;return a=_,a!==""&&(o=Error(r(419)),o.stack="",o.digest=a,Gi({value:o,source:null,stack:null})),ko(e,t,S)}if(St||Va(e,t,S,!1),a=(S&e.childLanes)!==0,St||a){if(Yl.current!==null)return ko(e,t,S);if(a=tt,a!==null&&(o=pm(a,S),o!==0&&o!==g.retryLane))throw g.retryLane=o,Da(e,o),cn(a,e,o),mf;return pd(c)||iu(),ko(e,t,S)}return pd(c)?(t.flags|=192,t.child=e.child,null):(e=g.treeContext,lt=Rn(c.nextSibling),Mt=t,Re=!0,$l=null,_n=!1,e!==null&&pg(t,e),t=xf(t,o.children),t.flags|=134221824,t)}function Hp(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),So(e.return,t,l)}function Lp(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Ro(l)===null&&(t=e),e=e.sibling}return t}function Go(e,t,l,a,o,c){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:o,treeForkCount:c}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=a,g.tail=l,g.tailMode=o,g.treeForkCount=c)}function Sf(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function bf(e,t,l){var a=t.pendingProps,o=a.revealOrder,c=a.tail;a=a.children;var g=Ht.current;if(t.flags&128)return Pi(t,g),null;var S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,Pi(t,g),o==="backwards"&&e!==null?(Sf(e),jt(e,t,a,l),Sf(e)):jt(e,t,a,l),a=Re?ki:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hp(e,l,t);else if(e.tag===19)Hp(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"backwards":l=Lp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null,Sf(t)),Go(t,!0,o,null,c,a);break;case"unstable_legacy-backwards":for(l=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ro(e)===null){t.child=o;break}e=o.sibling,o.sibling=l,l=o,o=e}Go(t,!0,l,null,c,a);break;case"together":Go(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:l=Lp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null),Go(t,!1,o,l,c,a)}return t.child}function Up(e,t,l){var a=t.pendingProps;return Bl(t,t.type,a.value),jt(e,t,a.children,l),t.child}function jl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Va(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=yl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=yl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function wf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bo(e)))}function LS(e,t,l){switch(t.tag){case 3:qn(t,t.stateNode.containerInfo),Bl(t,yt,e.memoizedState.cache),La();break;case 27:case 5:fl(t);break;case 4:qn(t,t.stateNode.containerInfo);break;case 10:Bl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yc(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return Il(t),t.flags|=128,null;a=Va(e,t,l,!1);var o=t.child.childLanes;return a||(l&o)!==0?Dp(e,t,l):(Il(t),e=jl(e,t,l),e!==null?e.sibling:null)}Il(t);break;case 19:if(t.flags&128)return bf(e,t,l);if(o=(e.flags&128)!==0,a=(l&t.childLanes)!==0,a||(Va(e,t,l,!1),a=(l&t.childLanes)!==0),o){if(a)return bf(e,t,l);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Pi(t,Ht.current),a)break;return null;case 22:return t.lanes=0,Mp(e,t,l,t.pendingProps);case 24:Bl(t,yt,e.memoizedState.cache)}return jl(e,t,l)}function Vp(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!wf(e,l)&&(t.flags&128)===0)return St=!1,LS(e,t,l);St=(e.flags&131072)!==0}else St=!1,Re&&(t.flags&1048576)!==0&&gg(t,ki,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")Mc(e)?(a=Ya(e,a),t.tag=1,t=Op(null,t,e,a,l)):(t.tag=0,t=gf(null,t,e,a,l));else{if(e!=null){var o=e.$$typeof;if(o===P){t.tag=11,t=Ep(null,t,e,a,l);break e}else if(o===Ee){t.tag=14,t=Np(null,t,e,a,l);break e}else if(o===ee){t.tag=10,t.type=e,t=Up(null,t,l);break e}}throw t=ye(e)||e,Error(r(306,t,""))}}return t;case 0:return gf(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,o=Ya(a,t.pendingProps),Op(e,t,a,o,l);case 3:e:{if(qn(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;o=c.element,Bc(e,t),Zi(t,a,null,l);var g=t.memoizedState;if(a=g.cache,Bl(t,yt,a),a!==c.cache&&Hc(t,[yt],l,!0),Ki(),a=g.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=zp(e,t,a,l);break e}else if(a!==o){o=jn(Error(r(424)),t),Gi(o),t=zp(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(lt=Rn(e.firstChild),Mt=t,Re=!0,$l=null,_n=!0,l=Mg(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(La(),a===o){t=jl(e,t,l);break e}jt(e,t,a,l)}t=t.child}return t;case 26:return Ls(e,t),e===null?(l=uv(t.type,null,t.pendingProps,null))?t.memoizedState=l:Re||(t.stateNode=k0(t.type,t.pendingProps,At.current,t)):t.memoizedState=uv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fl(t),e===null&&Re&&(a=t.stateNode=sv(t.type,t.pendingProps,At.current),Mt=t,_n=!0,o=lt,na(t.type)?(yd=o,lt=Rn(a.firstChild)):lt=o),jt(e,t,t.pendingProps.children,l),Ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((o=a=lt)&&(a=Tb(a,t.type,t.pendingProps,_n),a!==null?(t.stateNode=a,Mt=t,lt=Rn(a.firstChild),_n=!1,o=!0):o=!1),o||Fl(t)),fl(t),o=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,a=c.children,ud(o,c)?a=null:g!==null&&ud(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Kc(e,t,ES,null,null,l),ei._currentValue=o),Ls(e,t),jt(e,t,a,l),t.child;case 6:return e===null&&Re&&((e=l=lt)&&(l=Ab(l,t.pendingProps,_n),l!==null?(t.stateNode=l,Mt=t,lt=null,e=!0):e=!1),e||Fl(t)),null;case 13:return Dp(e,t,l);case 4:return qn(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=qa(t,null,a,l):jt(e,t,a,l),t.child;case 11:return Ep(e,t,t.type,t.pendingProps,l);case 7:return a=t.pendingProps,Ls(e,t),jt(e,t,a,l),t.child;case 8:return jt(e,t,t.pendingProps.children,l),t.child;case 12:return jt(e,t,t.pendingProps.children,l),t.child;case 10:return Up(e,t,l);case 9:return o=t.type._context,a=t.pendingProps.children,$a(t),o=zt(o),a=a(o),t.flags|=1,jt(e,t,a,l),t.child;case 14:return Np(e,t,t.type,t.pendingProps,l);case 15:return _p(e,t,t.type,t.pendingProps,l);case 19:return bf(e,t,l);case 31:return DS(e,t,l);case 22:return Mp(e,t,l,t.pendingProps);case 24:return $a(t),a=zt(yt),e===null?(o=Vc(),o===null&&(o=tt,c=Lc(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=l),o=c),t.memoizedState={parent:a,cache:o},Fc(t),Bl(t,yt,o)):((e.lanes&l)!==0&&(Bc(e,t),Zi(t,null,null,l),Ki()),o=e.memoizedState,c=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Bl(t,yt,a)):(a=c.cache,Bl(t,yt,a),a!==o.cache&&Hc(t,[yt],l,!0))),jt(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),a=t.pendingProps,a.name!=null&&a.name!=="auto"?t.flags|=e===null?18882560:18874368:Re&&yo(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Ls(e,t),jt(e,t,a.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function El(e){e.flags|=4}function Cf(e,t,l,a,o){var c;if((c=(e.mode&32)!==0)&&(c=l===null?hv(t,a):hv(t,a)&&(a.src!==l.src||a.srcSet!==l.srcSet)),c){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(x0())e.flags|=8192;else throw Ga=Eo,$c}else e.flags&=-16777217}function $p(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!mv(t))if(x0())e.flags|=8192;else throw Ga=Eo,$c}function qo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hm():536870912,e.lanes|=t,Bs|=t)}function nr(e,t){if(!Re)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags&1206910976,a|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function US(e,t,l){var a=t.pendingProps;switch(Ac(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),bl(yt),ut(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Rs(t)?El(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zc())),at(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(El(t),c!==null?(at(t),$p(t,c)):(at(t),Cf(t,o,null,a,l))):c?c!==e.memoizedState?(El(t),at(t),$p(t,c)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&El(t),at(t),Cf(t,o,e,a,l)),null;case 27:if(It(t),l=At.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}e=pt.current,Rs(t)?vg(t):(e=sv(o,a,l),t.stateNode=e,El(t))}return at(t),t.subtreeFlags&=-33554433,null;case 5:if(It(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}if(c=pt.current,Rs(t))vg(t);else{var g=hr(At.current);switch(c){case 1:c=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=g.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?g.createElement("select",{is:a.is}):g.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?g.createElement(o,{is:a.is}):g.createElement(o)}}c[Ot]=t,c[an]=a;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)c.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=c;e:switch(Ut(c,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&El(t)}}return at(t),t.subtreeFlags&=-33554433,Cf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&El(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=At.current,Rs(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,o=Mt,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||V0(e.nodeValue,l)),e||Fl(t,!0)}else e=hr(e).createTextNode(a),e[Ot]=t,t.stateNode=e}return at(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Rs(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ot]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else l=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(mn(t),t):(mn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return at(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Rs(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Ot]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),o=!1}else o=zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(mn(t),t):(mn(t),null)}return mn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),qo(t,t.updateQueue),at(t),null);case 4:return ut(),e===null&&ad(t.stateNode.containerInfo),t.flags|=67108864,at(t),null;case 10:return bl(t.type),at(t),null;case 19:if(Ic(t),a=t.memoizedState,a===null)return at(t),null;if(o=(t.flags&128)!==0,c=a.rendering,c===null)if(o)nr(a,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Ro(e),c!==null){for(t.flags|=128,nr(a,!1),e=c.updateQueue,t.updateQueue=e,qo(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)dg(l,e),l=l.sibling;return Pi(t,Ht.current&1|2),Re&&xl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&et()>nu&&(t.flags|=128,o=!0,nr(a,!1),t.lanes=4194304)}else{if(!o)if(e=Ro(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,qo(t,e),nr(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!c.alternate&&!Re)return at(t),null}else 2*et()-a.renderingStartTime>nu&&l!==536870912&&(t.flags|=128,o=!0,nr(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=et(),e.sibling=null,c=Ht.current,c=o?c&1|2:c&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||Re?Pi(t,c):(l=c,Ge(Dt,t),Ge(Ht,l),qt===null&&(qt=t)),Re&&xl(t,a.treeForkCount),e}return at(t),null;case 22:case 23:return mn(t),Qc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),l=t.updateQueue,l!==null&&qo(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&ot(Ba),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),bl(yt),at(t),null;case 25:return null;case 30:return t.flags|=33554432,at(t),null}throw Error(r(156,t.tag))}function VS(e,t){switch(Ac(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bl(yt),ut(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return It(t),null;case 31:if(t.memoizedState!==null){if(mn(t),t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ic(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 ut(),null;case 10:return bl(t.type),null;case 22:case 23:return mn(t),Qc(),e!==null&&ot(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return bl(yt),null;case 25:return null;default:return null}}function Fp(e,t){switch(Ac(t),t.tag){case 3:bl(yt),ut();break;case 26:case 27:case 5:It(t);break;case 4:ut();break;case 31:t.memoizedState!==null&&mn(t);break;case 13:mn(t);break;case 19:Ic(t);break;case 10:bl(t.type);break;case 22:case 23:mn(t),Qc(),e!==null&&ot(Ba);break;case 24:bl(yt)}}function lr(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var o=a.next;l=o;do{if((l.tag&e)===e){a=void 0;var c=l.create,g=l.inst;a=c(),g.destroy=a}l=l.next}while(l!==o)}}catch(S){Ke(t,t.return,S)}}function Kl(e,t,l){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var c=o.next;a=c;do{if((a.tag&e)===e){var g=a.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,o=t;var _=l,B=S;try{B()}catch(Q){Ke(o,_,Q)}}}a=a.next}while(a!==c)}}catch(Q){Ke(t,t.return,Q)}}function Bp(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Tg(t,l)}catch(a){Ke(e,e.return,a)}}}function kp(e,t,l){l.props=Ya(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ke(e,t,a)}}function Pn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var o=e.stateNode,c=pl(e.memoizedProps,o);(o.ref===null||o.ref.name!==c)&&(o.ref=K0(c)),a=o.ref;break;case 7:if(e.stateNode===null){var g=new xn(e);v(e.child,!1,Mb,g,void 0,void 0),e.stateNode=g}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(S){Ke(e,t,S)}}function Lt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(o){Ke(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){Ke(e,t,o)}else l.current=null}function Qo(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)tv(e.stateNode,t[l])}function Gp(e){for(var t=e.return;t!==null&&(Ef(t)&&tv(e.stateNode,t.stateNode),!jf(t));)t=t.return}function ar(e){for(var t=e.return;t!==null&&(Ef(t)&&Rb(e.stateNode,t.stateNode),!jf(t));)t=t.return}function jf(e){return e.tag===5||e.tag===3||e.tag===27}function Ef(e){return e&&e.tag===7&&e.stateNode!==null}function Nf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(o){Ke(e,e.return,o)}}function _f(e,t,l){try{var a=e.stateNode;cb(a,e.type,l,t),a[an]=t}catch(o){Ke(e,e.return,o)}}function qp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&na(e.type)||e.tag===4}function Mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qp(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&&na(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rf(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(o),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Xn)),Qo(e,a),Be=!0;else if(o!==4&&(o===27&&(Qo(e,a),a=null,na(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(Rf(e,t,l,a),e=e.sibling;e!==null;)Rf(e,t,l,a),e=e.sibling}function Yo(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?l.insertBefore(o,t):l.appendChild(o),Qo(e,a),Be=!0;else if(o!==4&&(o===27&&(Qo(e,a),a=null,na(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Yo(e,t,l,a),e=e.sibling;e!==null;)Yo(e,t,l,a),e=e.sibling}function Qp(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ut(t,a,l),t[Ot]=e,t[an]=l}catch(c){Ke(e,e.return,c)}}var Io=!1,gn=null;function Yp(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Io=!0)}var Jn=null;function Ip(){var e=Jn;return Jn=null,e}var rn=0;function Us(e,t,l,a,o){return rn=0,Xp(e.child,t,l,a,o)}function Xp(e,t,l,a,o){for(var c=!1;e!==null;){if(e.tag===5){var g=e.stateNode;if(a!==null){var S=dd(g);a.push(S),S.view&&(c=!0)}else c||dd(g).view&&(c=!0);Io=!0,I0(g,rn===0?t:t+"_"+rn,l),rn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||Xp(e.child,t,l,a,o)&&(c=!0));e=e.sibling}return c}function Wn(e,t){for(;e!==null;)e.tag===5?X0(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Wn(e.child,t)),e=e.sibling}function Xo(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Xo(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(r(544));var l=t.name;t=vl(t.default,t.share),t!=="none"&&(Us(e,l,t,null,!1)||Wn(e.child,!1))}e=e.sibling}}function Tf(e,t){if(e.tag===30){var l=e.stateNode,a=e.memoizedProps,o=pl(a,l),c=vl(a.default,l.paired?a.share:a.enter);c!=="none"?Us(e,o,c,null,!1)?(Xo(e),l.paired||t||Qs(e,a.onEnter)):Wn(e.child,!1):Xo(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Tf(e,t),e=e.sibling;else Xo(e)}function Af(e){if(gn!==null&&gn.size!==0){var t=gn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,a=l.name;if(a!=null&&a!=="auto"){var o=t.get(a);if(o!==void 0){var c=vl(l.default,l.share);if(c!=="none"&&(Us(e,a,c,null,!1)?(c=e.stateNode,o.paired=c,c.paired=o,Qs(e,l.onShare)):Wn(e.child,!1)),t.delete(a),t.size===0)break}}}Af(e)}e=e.sibling}}}function Of(e){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode),a=gn!==null?gn.get(l):void 0,o=vl(t.default,a!==void 0?t.share:t.exit);o!=="none"&&(Us(e,l,o,null,!1)?a!==void 0?(o=e.stateNode,a.paired=o,o.paired=a,gn.delete(l),Qs(e,t.onShare)):Qs(e,t.onExit):Wn(e.child,!1)),gn!==null&&Af(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Of(e),e=e.sibling;else gn!==null&&Af(e)}function Kp(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode);t=vl(t.default,t.update),e.flags&=-5,t!=="none"&&Us(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Kp(e);e=e.sibling}}function zf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wn(e.child,!1))}zf(e)}e=e.sibling}}function Ko(e){if(e.tag===30)e.stateNode.paired=null,Wn(e.child,!1),zf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ko(e),e=e.sibling;else zf(e)}function Zp(e){for(e=e.child;e!==null;)e.tag===30?Wn(e.child,!1):(e.subtreeFlags&33554432)!==0&&Zp(e),e=e.sibling}function Df(e,t,l,a,o,c,g){for(var S=!1;t!==null;){if(t.tag===5){var _=t.stateNode;if(c!==null&&rn<c.length){var B=c[rn],Q=dd(_);(B.view||Q.view)&&(S=!0);var K;if(K=(e.flags&4)===0)if(Q.clip)K=!0;else{K=B.rect;var U=Q.rect;K=K.y!==U.y||K.x!==U.x||K.height!==U.height||K.width!==U.width}K&&(e.flags|=4),Q.abs?Q=!B.abs:(B=B.rect,Q=Q.rect,Q=B.height!==Q.height||B.width!==Q.width),Q&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&I0(_,rn===0?l:l+"_"+rn,o),S&&(e.flags&4)!==0||(Jn===null&&(Jn=[]),Jn.push(_,rn===0?a:a+"_"+rn,t.memoizedProps)),rn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&g?e.flags|=t.flags&32:Df(e,t.child,l,a,o,c,g)&&(S=!0));t=t.sibling}return S}function Pp(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,a=e.stateNode,o=pl(l,a),c=vl(l.default,l.update),g;g=e.memoizedState,e.memoizedState=null,a=e;var S=e.child;rn=0,o=Df(a,S,o,o,c,g,!1),(e.flags&4)!==0&&o&&Qs(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Pp(e);e=e.sibling}}var Rt=!1,Ye=!1,el=!1,Hf=!1,Jp=typeof WeakSet=="function"?WeakSet:Set,Tt=null,tl=!1,sr=!1,Zo=!1,Lf=!1;function $S(e,t,l){if(e=e.containerInfo,rd=ti,e=ng(e),bc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var c=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var S=0,_=-1,B=-1,Q=0,K=0,U=e,q=null;t:for(;;){for(var ae;U!==a||c!==0&&U.nodeType!==3||(_=S+c),U!==g||o!==0&&U.nodeType!==3||(B=S+o),U.nodeType===3&&(S+=U.nodeValue.length),(ae=U.firstChild)!==null;)q=U,U=ae;for(;;){if(U===e)break t;if(q===a&&++Q===c&&(_=S),q===g&&++K===o&&(B=S),(ae=U.nextSibling)!==null)break;U=q,q=U.parentNode}U=ae}a=_===-1||B===-1?null:{start:_,end:B}}else a=null}a=a||{start:0,end:0}}else a=null;for(od={focusedElem:e,selectionRange:a},ti=!1,l=(l&335544064)===l,Tt=t,t=l?9270:1024;Tt!==null;){if(e=Tt,l&&(a=e.deletions,a!==null))for(c=0;c<a.length;c++)l&&Of(a[c]);if(e.alternate===null&&(e.flags&2)!==0)l&&Yp(e),Po(l);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&l&&Of(a),Po(l);continue}else if(a!==null&&a.memoizedState!==null){l&&Yp(e),Po(l);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,Tt=a):(l&&Kp(e),Po(l))}}gn=null}function Po(e){for(;Tt!==null;){var t=Tt,l=e,a=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&a!==null){l=void 0,o=a.memoizedProps,a=a.memoizedState;var c=t.stateNode;try{var g=Ya(t.type,o);l=c.getSnapshotBeforeUpdate(g,a),c.__reactInternalSnapshotBeforeUpdate=l}catch(S){Ke(t,t.return,S)}}break;case 3:if((o&1024)!==0){if(a=t.stateNode.containerInfo,l=a.nodeType,l===9)gd(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":gd(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&a!==null&&(l=pl(a.memoizedProps,a.stateNode),o=t.memoizedProps,o=vl(o.default,o.update),o!=="none"&&Us(a,l,o,a.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(r(163))}if(a=t.sibling,a!==null){a.return=t.return,Tt=a;break}Tt=t.return}}function Wp(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:nl(e,l),a&4&&lr(5,l);break;case 1:if(nl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(g){Ke(l,l.return,g)}else{var o=Ya(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ke(l,l.return,g)}}a&64&&Bp(l),a&512&&Pn(l,l.return);break;case 3:if(nl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Tg(e,t)}catch(g){Ke(l,l.return,g)}}break;case 27:t===null&&a&4&&Qp(l);case 26:case 5:nl(e,l),t===null&&a&4&&Nf(l),a&512&&Pn(l,l.return);break;case 12:nl(e,l);break;case 31:nl(e,l),a&4&&l0(e,l);break;case 13:nl(e,l),a&4&&a0(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=PS.bind(null,l),Ob(e,l))));break;case 22:if(a=l.memoizedState!==null||Rt,!a){var c=t!==null&&t.memoizedState!==null||Ye;t=Rt,o=Ye,Rt=a,(Ye=c)&&!o?(a=2,(l.subtreeFlags&8772)!==0&&(a|=1),Un(e,l,a)):nl(e,l),Rt=t,Ye=o}break;case 30:nl(e,l),a&512&&Pn(l,l.return);break;case 7:a&512&&Pn(l,l.return);default:nl(e,l)}}function Uf(e,t){for(e=e.child;e!==null;)e0(e,t),e=e.sibling}function e0(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var a=l.style;typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"}else{var o=e.stateNode,c=e.memoizedProps.style,g=c!=null&&c.hasOwnProperty("display")?c.display:null;o.style.display=g==null||typeof g=="boolean"?"":(""+g).trim()}}catch(_){Ke(e,e.return,_)}Vf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Be=!0}catch(_){Ke(e,e.return,_)}break;case 18:try{var S=e.stateNode;t?Y0(S,!0):Y0(e.stateNode,!1)}catch(_){Ke(e,e.return,_)}break;case 22:case 23:e.memoizedState===null&&Uf(e,t);break;default:Uf(e,t)}}function Vf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,a=t;switch(l.tag){case 4:e0(l,a);break e;case 22:l.memoizedState===null&&Vf(l,a);break e;default:Vf(l,a)}}e=e.sibling}}function t0(e){var t=e.alternate;t!==null&&(e.alternate=null,t0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&to(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 ct=null,on=!1;function Hn(e,t,l){for(l=l.child;l!==null;)n0(e,t,l),l=l.sibling}function n0(e,t,l){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Pe,l)}catch{}switch(l.tag){case 26:Ye||Lt(l,t),Hn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ye&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ye||Lt(l,t),ar(l);var a=ct,o=on;na(l.type)&&(ct=l.stateNode,on=!1),Hn(e,t,l),iv(l.stateNode,l.type,l.memoizedProps),ct=a,on=o;break;case 5:Ye||Lt(l,t),ar(l);case 6:if(l.tag===6&&ar(l),a=ct,o=on,ct=null,Hn(e,t,l),ct=a,on=o,ct!==null)if(on)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(l.stateNode),Be=!0}catch(c){Ke(l,t,c)}else try{ct.removeChild(l.stateNode),Be=!0}catch(c){Ke(l,t,c)}break;case 18:ct!==null&&(on?(e=ct,Q0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ni(e)):Q0(ct,l.stateNode));break;case 4:a=ct,o=on,ct=l.stateNode.containerInfo,on=!0,Hn(e,t,l),ct=a,on=o;break;case 0:case 11:case 14:case 15:Kl(2,l,t),Ye||Kl(4,l,t),Hn(e,t,l);break;case 1:Ye||(Lt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&kp(l,t,a)),Hn(e,t,l);break;case 21:Hn(e,t,l);break;case 22:Ye=(a=Ye)||l.memoizedState!==null,Hn(e,t,l),Ye=a;break;case 30:Lt(l,t),Hn(e,t,l);break;case 7:Ye||Lt(l,t),Hn(e,t,l);break;default:Hn(e,t,l)}}function l0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ni(e)}catch(l){Ke(t,t.return,l)}}}function a0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ni(e)}catch(l){Ke(t,t.return,l)}}function FS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jp),t;default:throw Error(r(435,e.tag))}}function Jo(e,t){var l=FS(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var o=JS.bind(null,e,a);a.then(o,o)}})}function Pt(e,t,l){var a=t.deletions;if(a!==null)for(var o=0;o<a.length;o++){var c=a[o],g=e,S=t,_=S;e:for(;_!==null;){switch(_.tag){case 27:if(na(_.type)){ct=_.stateNode,on=!1;break e}break;case 5:ct=_.stateNode,on=!1;break e;case 3:case 4:ct=_.stateNode.containerInfo,on=!0;break e}_=_.return}if(ct===null)throw Error(r(160));n0(g,S,c),ct=null,on=!1,g=c.alternate,g!==null&&(g.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)s0(t,e,l),t=t.sibling}var Ln=null;function s0(e,t,l){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(a=e.updateQueue,a=a!==null?a.events:null,a!==null))for(var c=0;c<a.length;c++){var g=a[c];g.ref.impl=g.nextImpl}Pt(t,e,l),Jt(e),o&4&&(Kl(3,e,e.return),lr(3,e),Kl(5,e,e.return));break;case 1:Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),o&64&&Rt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(c=Ln,Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),o&4)if(o=a!==null?a.memoizedState:null,l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null)if(Rt)e.stateNode=k0(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,o=c.ownerDocument||c;t:switch(t){case"title":a=o.getElementsByTagName("title")[0],(!a||a[Ai]||a[Ot]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=o.createElement(t),o.head.insertBefore(a,o.querySelector("head > title"))),Ut(a,t,l),a[Ot]=e,_t(a),t=a;break e;case"link":if(c=dv("link","href",o).get(t+(l.href||""))){for(g=0;g<c.length;g++)if(a=c[g],a.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&a.getAttribute("rel")===(l.rel==null?null:l.rel)&&a.getAttribute("title")===(l.title==null?null:l.title)&&a.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){c.splice(g,1);break t}}a=o.createElement(t),Ut(a,t,l),o.head.appendChild(a);break;case"meta":if(c=dv("meta","content",o).get(t+(l.content||""))){for(g=0;g<c.length;g++)if(a=c[g],a.getAttribute("content")===(l.content==null?null:""+l.content)&&a.getAttribute("name")===(l.name==null?null:l.name)&&a.getAttribute("property")===(l.property==null?null:l.property)&&a.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&a.getAttribute("charset")===(l.charSet==null?null:l.charSet)){c.splice(g,1);break t}}a=o.createElement(t),Ut(a,t,l),o.head.appendChild(a);break;default:throw Error(r(468,t))}a[Ot]=e,_t(a),t=a}e.stateNode=t}else Rt||wd(c,e.type,e.stateNode);else e.stateNode=fv(c,l,e.memoizedProps);else o!==l?(o===null?(t=a.stateNode,t===null||Ye||t.parentNode.removeChild(t)):o.count--,l===null?Rt||wd(c,e.type,e.stateNode):fv(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&_f(e,e.memoizedProps,a.memoizedProps);break;case 27:Pt(t,e,l),Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),a!==null&&o&4&&_f(e,e.memoizedProps,a.memoizedProps);break;case 5:if(c=el,el=!1,Pt(t,e,l),el=c,Jt(e),o&512&&(Ye||a===null||Lt(a,a.return)),e.flags&32){t=e.stateNode;try{xs(t,""),Be=!0}catch(Q){Ke(e,e.return,Q)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,_f(e,t,a!==null?a.memoizedProps:t)),o&1024&&(Hf=!0);break;case 6:if(Pt(t,e,l),Jt(e),o&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Be=!0}catch(Q){Ke(e,e.return,Q)}}break;case 3:if(Be=!1,hu=null,c=Ln,Ln=mr(t.containerInfo),Pt(t,e,l),Ln=c,Jt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ni(t.containerInfo)}catch(Q){Ke(e,e.return,Q)}Hf&&(Hf=!1,i0(e)),Be=!1;break;case 4:o=el,el=Rt,a=Nm(),c=Ln,Ln=mr(e.stateNode.containerInfo),Pt(t,e,l),Jt(e),Ln=c,Be&&sr&&(Zo=!0),Be=a,el=o;break;case 12:Pt(t,e,l),Jt(e);break;case 31:Pt(t,e,l),Jt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 13:Pt(t,e,l),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(tu=et()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 22:c=e.memoizedState!==null,g=a!==null&&a.memoizedState!==null;var S=Rt,_=Ye,B=el;Rt=S||c,el=B||c,Ye=_||g,Pt(t,e,l),Ye=_,el=B,Rt=S,Jt(e),o&8192&&(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,!c||a===null||g||Rt||Ye||(t=g||Ye,l=Rt,a=Ye,Rt=c||Rt,Ye=t,Zl(e,2),Rt=l,Ye=a),!c&&el||Uf(e,c)),o&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Jo(e,l))));break;case 19:Pt(t,e,l),Jt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Jo(e,t)));break;case 30:o&512&&(Ye||a===null||Lt(a,a.return)),o=Nm(),c=sr,g=(l&335544064)===l,S=e.memoizedProps,sr=g&&vl(S.default,S.update)!=="none",Pt(t,e,l),Jt(e),g&&a!==null&&Be&&(e.flags|=4),sr=c,Be=o;break;case 21:break;case 7:o&512&&(Ye||a===null||Lt(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Pt(t,e,l),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(qp(a)){l=a;break}a=a.return}a=null;for(var o=e.return;o!==null;){if(Ef(o)){var c=o.stateNode;a===null?a=[c]:a.push(c)}if(jf(o))break;o=o.return}var g=a;if(l==null)throw Error(r(160));switch(l.tag){case 27:var S=l.stateNode,_=Mf(e);Yo(e,_,S,g);break;case 5:var B=l.stateNode;l.flags&32&&(xs(B,""),l.flags&=-33);var Q=Mf(e);Yo(e,Q,B,g);break;case 3:case 4:var K=l.stateNode.containerInfo,U=Mf(e);Rf(e,U,K,g);break;default:throw Error(r(161))}}catch(q){Ke(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;i0(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ti=!0,t.reset(),ti=!1),e=e.sibling}}function Vs(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)r0(t,e),t=t.sibling;else Pp(t)}function r0(e,t){var l=e.alternate;if(l===null)Tf(e,!1);else switch(e.tag){case 3:if(Lf=tl=!1,Ip(),Vs(t,e),!tl&&!Zo){if(e=Jn,e!==null)for(var a=0;a<e.length;a+=3){l=e[a];var o=e[a+1];X0(l,e[a+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}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"})),Lf=!0}Jn=null;break;case 5:Vs(t,e);break;case 4:a=tl,tl=!1,Vs(t,e),tl&&(Zo=!0),tl=a;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?Tf(e,!1):Vs(t,e));break;case 30:a=tl,o=Ip(),tl=!1,Vs(t,e),tl&&(e.flags|=4);var c=e.memoizedProps,g=e.stateNode;t=pl(c,g),g=pl(l.memoizedProps,g);var S=vl(c.default,c.update);S==="none"?t=!1:(c=l.memoizedState,l.memoizedState=null,l=e.child,rn=0,t=Df(e,l,t,g,S,c,!0),rn!==(c===null?0:c.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Qs(e,e.memoizedProps.onUpdate),Jn=o):o!==null&&(o.push.apply(o,Jn),Jn=o),tl=(e.flags&32)!==0?!0:a;break;default:Vs(t,e)}}function nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wp(e,t.alternate,t),t=t.sibling}function Zl(e,t){for(e=e.child;e!==null;){var l=e,a=t;switch(l.tag){case 0:case 11:case 14:case 15:Kl(4,l,l.return),Zl(l,a);break;case 1:Lt(l,l.return);var o=l.stateNode;typeof o.componentWillUnmount=="function"&&kp(l,l.return,o),Zl(l,a);break;case 27:(a&2)!==0&&iv(l.stateNode,l.type,l.memoizedProps);case 5:Lt(l,l.return),l.tag!==5&&l.tag!==27||ar(l),Zl(l,a);break;case 6:ar(l);break;case 26:Lt(l,l.return),o=l.stateNode,l.memoizedState!==null||o===null||Ye||o.parentNode.removeChild(o),Zl(l,a);break;case 22:l.memoizedState===null&&Zl(l,a);break;case 30:Lt(l,l.return),Zl(l,a);break;case 7:Lt(l,l.return);default:Zl(l,a)}e=e.sibling}}function Un(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var a=t.alternate,o=e,c=t,g=c.flags,S=(l&1)!==0;switch(c.tag){case 0:case 11:case 15:Un(o,c,l),lr(4,c);break;case 1:if(Un(o,c,l),a=c,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(Q){Ke(a,a.return,Q)}if(a=c,o=a.updateQueue,o!==null){var _=a.stateNode;try{var B=o.shared.hiddenCallbacks;if(B!==null)for(o.shared.hiddenCallbacks=null,o=0;o<B.length;o++)Rg(B[o],_)}catch(Q){Ke(a,a.return,Q)}}S&&g&64&&Bp(c),Pn(c,c.return);break;case 27:(l&2)!==0&&Qp(c);case 5:c.tag!==5&&c.tag!==27||Gp(c),Un(o,c,l),S&&a===null&&g&4&&Nf(c),Pn(c,c.return);break;case 6:Gp(c);break;case 26:_=c.stateNode,c.memoizedState!==null||_===null||Rt||wd(mr(_.ownerDocument),c.type,_),Un(o,c,l),S&&a===null&&g&4&&Nf(c),Pn(c,c.return);break;case 12:Un(o,c,l);break;case 31:Un(o,c,l),S&&g&4&&l0(o,c);break;case 13:Un(o,c,l),S&&g&4&&a0(o,c);break;case 22:c.memoizedState===null&&Un(o,c,l),Pn(c,c.return);break;case 30:Un(o,c,l),Pn(c,c.return);break;case 7:Pn(c,c.return);default:Un(o,c,l)}t=t.sibling}}function $f(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&qi(l))}function Ff(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&qi(e))}function Mn(e,t,l,a){var o=(l&335544064)===l;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)o0(e,t,l,a),t=t.sibling;else o&&Zp(t)}function o0(e,t,l,a){var o=(l&335544064)===l;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ko(t);var c=t.flags;switch(t.tag){case 0:case 11:case 15:Mn(e,t,l,a),c&2048&&lr(9,t);break;case 1:Mn(e,t,l,a);break;case 3:Mn(e,t,l,a),o&&Lf&&(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="")),c&2048&&(c=null,t.alternate!==null&&(c=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==c&&(t.refCount++,c!=null&&qi(c)));break;case 12:if(c&2048){Mn(e,t,l,a),c=t.stateNode;try{var g=t.memoizedProps,S=g.id,_=g.onPostCommit;typeof _=="function"&&_(S,t.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(B){Ke(t,t.return,B)}}else Mn(e,t,l,a);break;case 31:Mn(e,t,l,a);break;case 13:Mn(e,t,l,a);break;case 23:break;case 22:g=t.stateNode,S=t.alternate,t.memoizedState!==null?(o&&S!==null&&S.memoizedState===null&&Ko(S),g._visibility&2?Mn(e,t,l,a):ir(e,t)):(o&&S!==null&&S.memoizedState!==null&&Ko(t),g._visibility&2?Mn(e,t,l,a):(g._visibility|=2,$s(e,t,l,a,(t.subtreeFlags&10256)!==0||!1))),c&2048&&$f(S,t);break;case 24:Mn(e,t,l,a),c&2048&&Ff(t.alternate,t);break;case 30:o&&(c=t.alternate,c!==null&&(Wn(c.child,!0),Wn(t.child,!0))),Mn(e,t,l,a);break;default:Mn(e,t,l,a)}}function $s(e,t,l,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,g=t,S=l,_=a,B=g.flags;switch(g.tag){case 0:case 11:case 15:$s(c,g,S,_,o),lr(8,g);break;case 23:break;case 22:var Q=g.stateNode;g.memoizedState!==null?Q._visibility&2?$s(c,g,S,_,o):ir(c,g):(Q._visibility|=2,$s(c,g,S,_,o)),o&&B&2048&&$f(g.alternate,g);break;case 24:$s(c,g,S,_,o),o&&B&2048&&Ff(g.alternate,g);break;default:$s(c,g,S,_,o)}t=t.sibling}}function ir(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,o=a.flags;switch(a.tag){case 22:ir(l,a),o&2048&&$f(a.alternate,a);break;case 24:ir(l,a),o&2048&&Ff(a.alternate,a);break;default:ir(l,a)}t=t.sibling}}var Ia=8192;function Xa(e,t,l){if(e.subtreeFlags&Ia)for(e=e.child;e!==null;)u0(e,t,l),e=e.sibling}function u0(e,t,l){switch(e.tag){case 26:Xa(e,t,l),e.flags&Ia&&(e.memoizedState!==null?Yb(l,Ln,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&pv(l,e)));break;case 5:Xa(e,t,l),e.flags&Ia&&(e=e.stateNode,(t&335544128)===t&&pv(l,e));break;case 3:case 4:var a=Ln;Ln=mr(e.stateNode.containerInfo),Xa(e,t,l),Ln=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ia,Ia=16777216,Xa(e,t,l),Ia=a):Xa(e,t,l));break;case 30:if((e.flags&Ia)!==0&&(a=e.memoizedProps.name,a!=null&&a!=="auto")){var o=e.stateNode;o.paired=null,gn===null&&(gn=new Map),gn.set(a,o)}Xa(e,t,l);break;default:Xa(e,t,l)}}function c0(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 rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,d0(a,e)}c0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)f0(e),e=e.sibling}function f0(e){switch(e.tag){case 0:case 11:case 15:rr(e),e.flags&2048&&Kl(9,e,e.return);break;case 3:rr(e);break;case 12:rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wo(e)):rr(e);break;default:rr(e)}}function Wo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,d0(a,e)}c0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kl(8,t,t.return),Wo(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Wo(t));break;default:Wo(t)}e=e.sibling}}function d0(e,t){for(;Tt!==null;){var l=Tt;switch(l.tag){case 0:case 11:case 15:Kl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:qi(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Tt=a;else e:for(l=e;Tt!==null;){a=Tt;var o=a.sibling,c=a.return;if(t0(a),a===l){Tt=null;break e}if(o!==null){o.return=c,Tt=o;break e}Tt=c}}}var BS={getCacheForType:function(e){var t=zt(yt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return zt(yt).controller.signal}},kS=typeof WeakMap=="function"?WeakMap:Map,qe=0,tt=null,Te=null,Oe=0,Xe=0,pn=null,Pl=!1,Fs=!1,Bf=!1,Nl=0,gt=0,Jl=0,Ka=0,eu=0,vn=0,Bs=0,or=null,un=null,kf=!1,tu=0,h0=0,nu=1/0,lu=null,Wl=null,dt=0,Vn=null,Za=null,ll=0,Gf=0,qf=null,m0=null,ks=null,Gs=null,qs=null,ur=0,au=null;function yn(){return(qe&2)!==0&&Oe!==0?Oe&-Oe:re.T!==null?ed():vm()}function g0(){if(vn===0)if((Oe&536870912)===0||Re){var e=_a;_a<<=1,(_a&3932160)===0&&(_a=262144),vn=e}else vn=536870912;return e=Dt.current,e!==null&&(e.flags|=32),vn}function Qs(e,t){if(t!=null){var l=e.stateNode,a=l.ref;a===null&&(a=l.ref=K0(pl(e.memoizedProps,l))),Gs===null&&(Gs=[]),Gs.push(t.bind(null,a))}}function cn(e,t,l){(e===tt&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),ea(e,Oe,vn,!1)),Ti(e,l),((qe&2)===0||e!==tt)&&(e===tt&&((qe&2)===0&&(Ka|=l),gt===4&&ea(e,Oe,vn,!1)),al(e))}function p0(e,t,l){if((qe&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Hl(e,t),o=a?QS(e,t):Yf(e,t,!0),c=a;do{if(o===0){Fs&&!a&&ea(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!GS(l)){o=Yf(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;o=or;var _=S.current.memoizedState.isDehydrated;if(_&&(Ys(S,g).flags|=256),g=Yf(S,g,!1),g!==2&&g!==6){if(Bf&&!_){S.errorRecoveryDisabledLanes|=c,Ka|=c,o=4;break e}c=un,un=o,c!==null&&(un===null?un=c:un.push.apply(un,c))}o=g}if(c=!1,o!==2)continue}}if(o===1){Ys(e,0),ea(e,t,0,!0);break}e:{switch(a=e,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:ea(a,t,vn,!Pl);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=tu+300-et(),10<o)){if(ea(a,t,vn,!Pl),Ra(a,0,!0)!==0)break e;ll=t,a.timeoutHandle=fd(v0.bind(null,a,l,un,lu,kf,t,vn,Ka,Bs,Pl,c,"Throttled",-0,0),o);break e}v0(a,l,un,lu,kf,t,vn,Ka,Bs,Pl,c,null,-0,0)}}break}while(!0);al(e)}function v0(e,t,l,a,o,c,g,S,_,B,Q,K,U,q){e.timeoutHandle=-1;var ae=t.subtreeFlags,de=(c&335544064)===c;if(K=null,(de||ae&8192||(ae&16785408)===16785408)&&(K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},gn=null,u0(t,c,K),de&&(ae=K,de=e.containerInfo,de=(de.nodeType===9?de:de.ownerDocument).__reactViewTransition,de!=null&&(ae.count++,ae.waitingForViewTransition=!0,ae=vr.bind(ae),de.finished.then(ae,ae))),ae=(c&62914560)===c?tu-et():(c&4194048)===c?h0-et():0,ae=Ib(K,ae),ae!==null)){ll=c,e.cancelPendingCommit=ae(E0.bind(null,e,t,c,l,a,o,g,S,_,B,Q,K,null,U,q)),ea(e,c,g,!B);return}E0(e,t,c,l,a,o,g,S,_,B,Q,K)}function GS(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var o=l[a],c=o.getSnapshot;o=o.value;try{if(!hn(c(),o))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 ea(e,t,l,a){t=dm(e,t),t&=~eu,t&=~Ka,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var c=31-Xt(o),g=1<<c;a[c]=-1,o&=~g}l!==0&&mm(e,l,t)}function su(){return(qe&6)===0?(cr(0),!1):!0}function Qf(){if(Te!==null){if(Xe===0)var e=Te.return;else e=Te,Sl=Ua=null,Jc(e),Os=null,Ii=0,e=Te;for(;e!==null;)Fp(e.alternate,e),e=e.return;Te=null}}function Ys(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,hb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ll=0,Qf(),tt=e,Te=l=yl(e.current,null),Oe=t,Xe=0,pn=null,Pl=!1,Fs=Hl(e,t),Bf=!1,Bs=vn=eu=Ka=Jl=gt=0,un=or=null,kf=!1,Nl=dm(e,t),ho(),l}function y0(e,t){Ne=null,re.H=Vo,t===As||t===jo?(t=Eg(),Xe=3):t===$c?(t=Eg(),Xe=4):Xe=t===mf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pn=t,Te===null&&(gt=1,$o(e,jn(t,e.current)))}function x0(){var e=Dt.current;return e===null?!0:(Oe&4194048)===Oe?qt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===qt:!1}function S0(){var e=re.H;return re.H=Vo,e===null?Vo:e}function b0(){var e=re.A;return re.A=BS,e}function iu(){gt=4,Pl||(Oe&4194048)!==Oe&&Dt.current!==null||(Fs=!0),(Jl&134217727)===0&&(Ka&134217727)===0||tt===null||ea(tt,Oe,vn,!1)}function Yf(e,t,l){var a=qe;qe|=2;var o=S0(),c=b0();(tt!==e||Oe!==t)&&(lu=null,Ys(e,t)),t=!1;var g=gt;e:do try{if(Xe!==0&&Te!==null){var S=Te,_=pn;switch(Xe){case 8:Qf(),g=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var B=Xe;if(Xe=0,pn=null,Is(e,S,_,B),l&&Fs){g=0;break e}break;default:B=Xe,Xe=0,pn=null,Is(e,S,_,B)}}qS(),g=gt;break}catch(Q){y0(e,Q)}while(!0);return t&&e.shellSuspendCounter++,Sl=Ua=null,qe=a,re.H=o,re.A=c,Te===null&&(tt=null,Oe=0,ho()),g}function qS(){for(;Te!==null;)w0(Te)}function QS(e,t){var l=qe;qe|=2;var a=S0(),o=b0();tt!==e||Oe!==t?(lu=null,nu=et()+500,Ys(e,t)):Fs=Hl(e,t);e:do try{if(Xe!==0&&Te!==null){t=Te;var c=pn;t:switch(Xe){case 1:Xe=0,pn=null,Is(e,t,c,1);break;case 2:case 9:if(Cg(c)){Xe=0,pn=null,C0(t);break}t=function(){Xe!==2&&Xe!==9||tt!==e||(Xe=7),al(e)},c.then(t,t);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Cg(c)?(Xe=0,pn=null,C0(t)):(Xe=0,pn=null,Is(e,t,c,7));break;case 5:var g=null;switch(Te.tag){case 26:g=Te.memoizedState;case 5:case 27:var S=Te;if(g?mv(g):S.stateNode.complete){Xe=0,pn=null;var _=S.sibling;if(_!==null)Te=_;else{var B=S.return;B!==null?(Te=B,ru(B)):Te=null}break t}}Xe=0,pn=null,Is(e,t,c,5);break;case 6:Xe=0,pn=null,Is(e,t,c,6);break;case 8:Qf(),gt=6;break e;default:throw Error(r(462))}}YS();break}catch(Q){y0(e,Q)}while(!0);return Sl=Ua=null,re.H=a,re.A=o,qe=l,Te!==null?0:(tt=null,Oe=0,ho(),gt)}function YS(){for(;Te!==null&&!Ct();)w0(Te)}function w0(e){var t=Vp(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,t===null?ru(e):Te=t}function C0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Ap(l,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Ap(l,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:Jc(t);var a=t;a===Mt&&(Re?(xo(a),a.tag===5&&a.stateNode!=null&&(lt=a.stateNode)):(xo(a),Re=!0));default:Fp(l,t),t=Te=dg(t,Nl),t=Vp(l,t,Nl)}e.memoizedProps=e.pendingProps,t===null?ru(e):Te=t}function Is(e,t,l,a){Sl=Ua=null,Jc(t),Os=null,Ii=0;var o=t.return;try{if(zS(e,o,t,l,Oe)){gt=1,$o(e,jn(l,e.current)),Te=null;return}}catch(c){if(o!==null)throw Te=o,c;gt=1,$o(e,jn(l,e.current)),Te=null;return}t.flags&32768?(Re||a===1?e=!0:Fs||(Oe&536870912)!==0?e=!1:(Pl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),j0(t,e)):ru(t)}function ru(e){var t=e;do{if((t.flags&32768)!==0){j0(t,Pl);return}e=t.return;var l=US(t.alternate,t,Nl);if(l!==null){Te=l;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);gt===0&&(gt=5)}function j0(e,t){do{var l=VS(e.alternate,e);if(l!==null){l.flags&=32767,Te=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=l}while(e!==null);gt=6,Te=null}function E0(e,t,l,a,o,c,g,S,_,B,Q,K){e.cancelPendingCommit=null;do ou();while(dt!==0);if((qe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));e===tt&&(Te=tt=null,Oe=0),Za=t,Vn=e,ll=l,qf=o,m0=a,IS(e,t,l,g,S,_,K)}}function IS(e,t,l,a,o,c,g){var S=t.lanes|t.childLanes;if(Gf=S,S|=Nc,xx(e,l,S,a,o,c),Gs=null,(l&335544064)===l?(qs=bS(e),a=10262):(qs=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,WS(Ea,function(){return Zf(),null})):(e.callbackNode=null,e.callbackPriority=0),Io=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null,o=me.p,me.p=2,c=qe,qe|=4;try{$S(e,t,l)}finally{qe=c,me.p=o,re.T=a}}dt=1,Io?ks=xb(g,e.containerInfo,qs,If,Xf,KS,Kf,Zf,XS):(If(),Xf(),Kf())}function XS(e){if(dt!==0){var t=Vn.onRecoverableError;t(e,{componentStack:null})}}function KS(){dt===3&&(dt=0,r0(Za,Vn),dt=4)}function If(){if(dt===1){dt=0;var e=Vn,t=Za,l=ll,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=re.T,re.T=null;var o=me.p;me.p=2;var c=qe;qe|=4;try{sr=Zo=!1,s0(t,e,l),l=od;var g=ng(e.containerInfo),S=l.focusedElem,_=l.selectionRange;if(g!==S&&S&&S.ownerDocument&&tg(S.ownerDocument.documentElement,S)){if(_!==null&&bc(S)){var B=_.start,Q=_.end;if(Q===void 0&&(Q=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(Q,S.value.length);else{var K=S.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var q=U.getSelection(),ae=S.textContent.length,de=Math.min(_.start,ae),_e=_.end===void 0?de:Math.min(_.end,ae);!q.extend&&de>_e&&(g=_e,_e=de,de=g);var $=eg(S,de),O=eg(S,_e);if($&&O&&(q.rangeCount!==1||q.anchorNode!==$.node||q.anchorOffset!==$.offset||q.focusNode!==O.node||q.focusOffset!==O.offset)){var G=K.createRange();G.setStart($.node,$.offset),q.removeAllRanges(),de>_e?(q.addRange(G),q.extend(O.node,O.offset)):(G.setEnd(O.node,O.offset),q.addRange(G))}}}}for(K=[],q=S;q=q.parentNode;)q.nodeType===1&&K.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<K.length;S++){var I=K[S];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}ti=!!rd,od=rd=null}finally{qe=c,me.p=o,re.T=a}}e.current=t,dt=2}}function Xf(){if(dt===2){dt=0;var e=Vn,t=Za,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=re.T,re.T=null;var a=me.p;me.p=2;var o=qe;qe|=4;try{Wp(e,t.alternate,t)}finally{qe=o,me.p=a,re.T=l}}dt=3}}function Kf(){if(dt===4||dt===3){dt=0;var e=ks;ks=null,st();var t=Vn,l=Za,a=ll,o=m0,c=(a&335544064)===a?10262:10256;if((l.subtreeFlags&c)!==0||(l.flags&c)!==0?dt=5:(dt=0,Za=Vn=null,N0(t,t.pendingLanes)),c=t.pendingLanes,c===0&&(Wl=null),lc(a),l=l.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Pe,l,void 0,(l.current.flags&128)===128)}catch{}if(o!==null){l=re.T,c=me.p,me.p=2,re.T=null;try{for(var g=t.onRecoverableError,S=0;S<o.length;S++){var _=o[S];g(_.value,{componentStack:_.stack})}}finally{re.T=l,me.p=c}}if(o=Gs,g=qs,qs=null,o!==null&&(Gs=null,g===null&&(g=[]),e!==null))for(_=0;_<o.length;_++)l=(0,o[_])(g),l!==void 0&&e.finished.finally(l);(ll&3)!==0&&ou(),al(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===au?ur++:(ur=0,au=t):(ur=0,au=null),cr(0)}}function N0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,qi(t)))}function ou(){return ks!==null&&(ks.skipTransition(),ks=null),If(),Xf(),Kf(),Zf()}function Zf(){if(dt!==5)return!1;var e=Vn,t=Gf;Gf=0;var l=lc(ll),a=re.T,o=me.p;try{me.p=32>l?32:l,re.T=null,l=qf,qf=null;var c=Vn,g=ll;if(dt=0,Za=Vn=null,ll=0,(qe&6)!==0)throw Error(r(331));var S=qe;if(qe|=4,f0(c.current),o0(c,c.current,g,l),qe=S,cr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Pe,c)}catch{}return!0}finally{me.p=o,re.T=a,N0(e,t)}}function _0(e,t,l){t=jn(l,t),t=hf(e.stateNode,t,2),e=Ql(e,t,2),e!==null&&(Ti(e,2),al(e))}function Ke(e,t,l){if(e.tag===3)_0(e,e,l);else for(;t!==null;){if(t.tag===3){_0(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Wl===null||!Wl.has(a))){e=jn(l,e),l=Cp(2),a=Ql(t,l,2),a!==null&&(jp(l,a,t,e),Ti(a,2),al(a));break}}t=t.return}}function Pf(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new kS;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(l)||(Bf=!0,o.add(l),e=ZS.bind(null,e,t,l),t.then(e,e))}function ZS(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(Oe&l)===l&&((gt===4||gt===3&&(Oe&62914560)===Oe&&300>et()-tu)&&(qe&2)===0?Ys(e,0):eu|=l,Bs===Oe&&(Bs=0)),al(e)}function M0(e,t){t===0&&(t=hm()),e=Da(e,t),e!==null&&(Ti(e,t),al(e))}function PS(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),M0(e,l)}function JS(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(l=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),M0(e,l)}function WS(e,t){return Ve(e,t)}var Xs=null,Ks=null,Jf=!1,uu=!1,Wf=!1,ta=0;function al(e){e!==Ks&&e.next===null&&(Ks===null?Xs=Ks=e:Ks=Ks.next=e),uu=!0,Jf||(Jf=!0,tb())}function cr(e,t){if(!Wf&&uu){Wf=!0;do for(var l=!1,a=Xs;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var c=0;else{var g=a.suspendedLanes,S=a.pingedLanes;c=(1<<31-Xt(42|e)+1)-1,c&=o&~(g&~S),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,O0(a,c))}else c=Oe,c=Ra(a,a===tt?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Hl(a,c)||(l=!0,O0(a,c));a=a.next}while(l);Wf=!1}}function eb(){R0()}function R0(){uu=Jf=!1;var e=0;ta!==0&&db()&&(e=ta);for(var t=et(),l=null,a=Xs;a!==null;){var o=a.next,c=T0(a,t);c===0?(a.next=null,l===null?Xs=o:l.next=o,o===null&&(Ks=l)):(l=a,(e!==0||(c&3)!==0)&&(uu=!0)),a=o}dt!==0&&dt!==5||cr(e),ta!==0&&(ta=0)}function T0(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-Xt(c),S=1<<g,_=o[g];_===-1?((S&l)===0||(S&a)!==0)&&(o[g]=yx(S,t)):_<=t&&(e.expiredLanes|=S),c&=~S}if(t=tt,l=Oe,l=Ra(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Fe(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Hl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Fe(a),lc(l)){case 2:case 8:l=ja;break;case 32:l=Ea;break;case 268435456:l=Mi;break;default:l=Ea}return a=A0.bind(null,e),l=Ve(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Fe(a),e.callbackPriority=2,e.callbackNode=null,2}function A0(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ou()&&e.callbackNode!==l)return null;var a=Oe;return a=Ra(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(p0(e,a,t),T0(e,et()),e.callbackNode!=null&&e.callbackNode===l?A0.bind(null,e):null)}function O0(e,t){if(ou())return null;p0(e,t,!0)}function tb(){mb(function(){(qe&6)!==0?Ve(Dl,eb):R0()})}function ed(){if(ta===0){var e=Fa;e===0&&(e=Na,Na<<=1,(Na&261888)===0&&(Na=256)),ta=e}return ta}function z0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ao(e)}function nb(e,t,l,a,o){if(t==="submit"&&l&&l.stateNode===o){var c=z0((o[an]||null).action),g=a.submitter;g&&(t=(t=g[an]||null)?z0(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var S=new oo("action","action",null,a,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ta!==0){var _=new FormData(o,g);of(l,{pending:!0,data:_,method:o.method,action:c},null,_)}}else typeof c=="function"&&(S.preventDefault(),_=new FormData(o,g),of(l,{pending:!0,data:_,method:o.method,action:c},c,_))},currentTarget:o}]})}}for(var td=0;td<Ec.length;td++){var nd=Ec[td],lb=nd.toLowerCase(),ab=nd[0].toUpperCase()+nd.slice(1);Dn(lb,"on"+ab)}Dn(sg,"onAnimationEnd"),Dn(ig,"onAnimationIteration"),Dn(rg,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(hS,"onTransitionRun"),Dn(mS,"onTransitionStart"),Dn(gS,"onTransitionCancel"),Dn(og,"onTransitionEnd"),vs("onMouseEnter",["mouseout","mouseover"]),vs("onMouseLeave",["mouseout","mouseover"]),vs("onPointerEnter",["pointerout","pointerover"]),vs("onPointerLeave",["pointerout","pointerover"]),Aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Aa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fr="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(" "),sb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fr));function D0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],o=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var g=a.length-1;0<=g;g--){var S=a[g],_=S.instance,B=S.currentTarget;if(S=S.listener,_!==c&&o.isPropagationStopped())break e;c=S,o.currentTarget=B;try{c(o)}catch(Q){fo(Q)}o.currentTarget=null,c=_}else for(g=0;g<a.length;g++){if(S=a[g],_=S.instance,B=S.currentTarget,S=S.listener,_!==c&&o.isPropagationStopped())break e;c=S,o.currentTarget=B;try{c(o)}catch(Q){fo(Q)}o.currentTarget=null,c=_}}}}function Ae(e,t){var l=t[xm];l===void 0&&(l=t[xm]=new Set);var a=e+"__bubble";l.has(a)||(H0(t,e,2,!1),l.add(a))}function ld(e,t,l){var a=0;t&&(a|=4),H0(l,e,a,t)}var cu="_reactListening"+Math.random().toString(36).slice(2);function ad(e){if(!e[cu]){e[cu]=!0,wm.forEach(function(l){l!=="selectionchange"&&(sb.has(l)||ld(l,!1,e),ld(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cu]||(t[cu]=!0,ld("selectionchange",!1,t))}}function H0(e,t,l,a){switch(jv(t)){case 2:var o=Pb;break;case 8:o=Jb;break;default:o=jd}l=o.bind(null,t,l,e),o=void 0,!fc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,l,{capture:!0,passive:o}):e.addEventListener(t,l,!0):o!==void 0?e.addEventListener(t,l,{passive:o}):e.addEventListener(t,l,!1)}function sd(e,t,l,a,o){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var g=a.tag;if(g===3||g===4){var S=a.stateNode.containerInfo;if(S===o)break;if(g===4)for(g=a.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;S!==null;){if(g=Ta(S),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){a=c=g;continue e}S=S.parentNode}}a=a.return}Hm(function(){var B=c,Q=uc(l),K=[];e:{var U=ug.get(e);if(U!==void 0){var q=oo,ae=e;switch(e){case"keypress":if(io(l)===0)break e;case"keydown":case"keyup":q=Gx;break;case"focusin":ae="focus",q=gc;break;case"focusout":ae="blur",q=gc;break;case"beforeblur":case"afterblur":q=gc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Vm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Ax;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Xx;break;case sg:case ig:case rg:q=Dx;break;case og:q=Zx;break;case"scroll":case"scrollend":q=Rx;break;case"wheel":q=Jx;break;case"copy":case"cut":case"paste":q=Lx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Fm;break;case"submit":q=Yx;break;case"toggle":case"beforetoggle":q=eS}var de=(t&4)!==0,_e=!de&&(e==="scroll"||e==="scrollend"),$=de?U!==null?U+"Capture":null:U;de=[];for(var O=B,G;O!==null;){var I=O;if(G=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||G===null||$===null||(I=zi(O,$),I!=null&&de.push(dr(O,I,G))),_e)break;O=O.return}0<de.length&&(U=new q(U,ae,null,l,Q),K.push({event:U,listeners:de}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",q&&l!==oc&&(ae=l.relatedTarget||l.fromElement)&&(Ta(ae)||ae[ms]))break e;(U||q)&&(ae=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,U?(q=l.relatedTarget||l.toElement,U=B,q=q?Ta(q):null,q!==null&&(_e=d(q),de=q.tag,q!==_e||de!==5&&de!==27&&de!==6)&&(q=null)):(U=null,q=B),U!==q&&(de=Vm,I="onMouseLeave",$="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(de=Fm,I="onPointerLeave",$="onPointerEnter",O="pointer"),_e=U==null?ae:Oi(U),G=q==null?ae:Oi(q),ae=new de(I,O+"leave",U,l,Q),ae.target=_e,ae.relatedTarget=G,I=null,Ta(Q)===B&&(de=new de($,O+"enter",q,l,Q),de.target=G,de.relatedTarget=_e,I=de),_e=I,de=U&&q?D(U,q,ib):null,U!==null&&L0(K,ae,U,de,!1),q!==null&&_e!==null&&L0(K,_e,q,de,!0)))}e:{if(U=B?Oi(B):window,q=U.nodeName&&U.nodeName.toLowerCase(),q==="select"||q==="input"&&U.type==="file")var ce=Xm;else if(Ym(U))if(Km)ce=cS;else{ce=oS;var ze=rS}else q=U.nodeName,!q||q.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?B&&rc(B.elementType)&&(ce=Xm):ce=uS;if(ce&&(ce=ce(e,B))){Im(K,ce,l,Q);break e}ze&&ze(e,U,B)}switch(ze=B?Oi(B):window,e){case"focusin":(Ym(ze)||ze.contentEditable==="true")&&(Cs=ze,wc=B,Bi=null);break;case"focusout":Bi=wc=Cs=null;break;case"mousedown":Cc=!0;break;case"contextmenu":case"mouseup":case"dragend":Cc=!1,lg(K,l,Q);break;case"selectionchange":if(dS)break;case"keydown":case"keyup":lg(K,l,Q)}var ge;if(vc)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else ws?qm(e,l)&&(ve="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ve="onCompositionStart");ve&&(Bm&&l.locale!=="ko"&&(ws||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&ws&&(ge=Lm()):(Ll=Q,dc="value"in Ll?Ll.value:Ll.textContent,ws=!0)),ze=fu(B,ve),0<ze.length&&(ve=new $m(ve,e,null,l,Q),K.push({event:ve,listeners:ze}),ge?ve.data=ge:(ge=Qm(l),ge!==null&&(ve.data=ge)))),(ge=nS?lS(e,l):aS(e,l))&&(ve=fu(B,"onBeforeInput"),0<ve.length&&(ze=new $m("onBeforeInput","beforeinput",null,l,Q),K.push({event:ze,listeners:ve}),ze.data=ge)),nb(K,e,B,l,Q)}D0(K,t)})}function dr(e,t,l){return{instance:e,listener:t,currentTarget:l}}function fu(e,t){for(var l=t+"Capture",a=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=zi(e,l),o!=null&&a.unshift(dr(e,o,c)),o=zi(e,t),o!=null&&a.push(dr(e,o,c))),e.tag===3)return a;e=e.return}return[]}function ib(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function L0(e,t,l,a,o){for(var c=t._reactName,g=[];l!==null&&l!==a;){var S=l,_=S.alternate,B=S.stateNode;if(S=S.tag,_!==null&&_===a)break;S!==5&&S!==26&&S!==27||B===null||(_=B,o?(B=zi(l,c),B!=null&&g.unshift(dr(l,B,_))):o||(B=zi(l,c),B!=null&&g.push(dr(l,B,_)))),l=l.return}g.length!==0&&e.push({event:t,listeners:g})}var rb=/\r\n?/g,ob=/\u0000|\uFFFD/g;function U0(e){return(typeof e=="string"?e:""+e).replace(rb,`
49
+ `).replace(ob,"")}function V0(e,t){return t=U0(t),U0(e)===t}function Ze(e,t,l,a,o,c){switch(l){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||xs(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&xs(e,""+a);else return;break;case"className":lo(e,"class",a);break;case"tabIndex":lo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":lo(e,l,a);break;case"style":zm(e,a,c);return;case"data":if(t!=="object"){lo(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ao(a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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}else typeof c=="function"&&(l==="formAction"?(t!=="input"&&Ze(e,t,"name",o.name,o,null),Ze(e,t,"formEncType",o.formEncType,o,null),Ze(e,t,"formMethod",o.formMethod,o,null),Ze(e,t,"formTarget",o.formTarget,o,null)):(Ze(e,t,"encType",o.encType,o,null),Ze(e,t,"method",o.method,o,null),Ze(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ao(a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Xn);return;case"onScroll":a!=null&&Ae("scroll",e);return;case"onScrollEnd":a!=null&&Ae("scrollend",e);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(r(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=ao(a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),no(e,"popover",a);break;case"xlinkActuate":ml(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ml(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ml(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ml(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ml(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ml(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ml(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ml(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ml(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":no(e,"is",a);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=_x.get(l)||l,no(e,l,a);else return}Be=!0}function id(e,t,l,a,o,c){switch(l){case"style":zm(e,a,c);return;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(r(60));(c!=null?c.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof a=="string")xs(e,a);else if(typeof a=="number"||typeof a=="bigint")xs(e,""+a);else return;break;case"onScroll":a!=null&&Ae("scroll",e);return;case"onScrollEnd":a!=null&&Ae("scrollend",e);return;case"onClick":a!=null&&(e.onclick=Xn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Cm.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(o=l.endsWith("Capture"),c=l.slice(2,o?l.length-7:void 0),t=e[an]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(c,t,o),typeof a=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(c,a,o);break e}Be=!0,l in e?e[l]=a:a===!0?e.setAttribute(l,""):no(e,l,a)}return}Be=!0}function Ut(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var a=!1,o=!1,c;for(c in l)if(l.hasOwnProperty(c)){var g=l[c];if(g!=null)switch(c){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,c,g,l,null)}}o&&Ze(e,t,"srcSet",l.srcSet,l,null),a&&Ze(e,t,"src",l.src,l,null);return;case"input":Ae("invalid",e);var S=c=g=o=null,_=null,B=null;for(a in l)if(l.hasOwnProperty(a)){var Q=l[a];if(Q!=null)switch(a){case"name":o=Q;break;case"type":g=Q;break;case"checked":_=Q;break;case"defaultChecked":B=Q;break;case"value":c=Q;break;case"defaultValue":S=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,t));break;default:Ze(e,t,a,Q,l,null)}}Rm(e,c,S,_,B,g,o,!1);return;case"select":Ae("invalid",e),a=g=c=null;for(o in l)if(l.hasOwnProperty(o)&&(S=l[o],S!=null))switch(o){case"value":c=S;break;case"defaultValue":g=S;break;case"multiple":a=S;default:Ze(e,t,o,S,l,null)}t=c,l=g,e.multiple=!!a,t!=null?ys(e,!!a,t,!1):l!=null&&ys(e,!!a,l,!0);return;case"textarea":Ae("invalid",e),c=o=a=null;for(g in l)if(l.hasOwnProperty(g)&&(S=l[g],S!=null))switch(g){case"value":a=S;break;case"defaultValue":o=S;break;case"children":c=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:Ze(e,t,g,S,l,null)}Am(e,a,o,c);return;case"option":for(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ze(e,t,_,a,l,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(a=0;a<fr.length;a++)Ae(fr[a],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(B in l)if(l.hasOwnProperty(B)&&(a=l[B],a!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ze(e,t,B,a,l,null)}return;default:if(rc(t)){for(Q in l)l.hasOwnProperty(Q)&&(a=l[Q],a!==void 0&&id(e,t,Q,a,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(a=l[S],a!=null&&Ze(e,t,S,a,l,null))}var ub={};function cb(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,g=null,S=null,_=null,B=null,Q=null;for(q in l){var K=l[q];if(l.hasOwnProperty(q)&&K!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":_=K;default:a.hasOwnProperty(q)||Ze(e,t,q,null,a,K)}}for(var U in a){var q=a[U];if(K=l[U],a.hasOwnProperty(U)&&(q!=null||K!=null))switch(U){case"type":q!==K&&(Be=!0),c=q;break;case"name":q!==K&&(Be=!0),o=q;break;case"checked":q!==K&&(Be=!0),B=q;break;case"defaultChecked":q!==K&&(Be=!0),Q=q;break;case"value":q!==K&&(Be=!0),g=q;break;case"defaultValue":q!==K&&(Be=!0),S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:q!==K&&Ze(e,t,U,q,a,K)}}sc(e,g,S,_,B,Q,c,o);return;case"select":q=g=S=U=null;for(c in l)if(_=l[c],l.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":q=_;default:a.hasOwnProperty(c)||Ze(e,t,c,null,a,_)}for(o in a)if(c=a[o],_=l[o],a.hasOwnProperty(o)&&(c!=null||_!=null))switch(o){case"value":c!==_&&(Be=!0),U=c;break;case"defaultValue":c!==_&&(Be=!0),S=c;break;case"multiple":c!==_&&(Be=!0),g=c;default:c!==_&&Ze(e,t,o,c,a,_)}t=S,l=g,a=q,U!=null?ys(e,!!l,U,!1):!!a!=!!l&&(t!=null?ys(e,!!l,t,!0):ys(e,!!l,l?[]:"",!1));return;case"textarea":q=U=null;for(S in l)if(o=l[S],l.hasOwnProperty(S)&&o!=null&&!a.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ze(e,t,S,null,a,o)}for(g in a)if(o=a[g],c=l[g],a.hasOwnProperty(g)&&(o!=null||c!=null))switch(g){case"value":o!==c&&(Be=!0),U=o;break;case"defaultValue":o!==c&&(Be=!0),q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Ze(e,t,g,o,a,c)}Tm(e,U,q);return;case"option":for(var ae in l)if(U=l[ae],l.hasOwnProperty(ae)&&U!=null&&!a.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:Ze(e,t,ae,null,a,U)}for(_ in a)if(U=a[_],q=l[_],a.hasOwnProperty(_)&&U!==q&&(U!=null||q!=null))switch(_){case"selected":U!==q&&(Be=!0),e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ze(e,t,_,U,a,q)}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 de in l)U=l[de],l.hasOwnProperty(de)&&U!=null&&!a.hasOwnProperty(de)&&Ze(e,t,de,null,a,U);for(B in a)if(U=a[B],q=l[B],a.hasOwnProperty(B)&&U!==q&&(U!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ze(e,t,B,U,a,q)}return;default:if(rc(t)){for(var _e in l)U=l[_e],l.hasOwnProperty(_e)&&U!==void 0&&!a.hasOwnProperty(_e)&&id(e,t,_e,void 0,a,U);for(Q in a)U=a[Q],q=l[Q],!a.hasOwnProperty(Q)||U===q||U===void 0&&q===void 0||id(e,t,Q,U,a,q);return}}for(var $ in l)U=l[$],l.hasOwnProperty($)&&U!=null&&!a.hasOwnProperty($)&&Ze(e,t,$,null,a,U);for(K in a)U=a[K],q=l[K],!a.hasOwnProperty(K)||U===q||U==null&&q==null||Ze(e,t,K,U,a,q)}function $0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var o=l[a],c=o.transferSize,g=o.initiatorType,S=o.duration;if(c&&S&&$0(g)){for(g=0,S=o.responseEnd,a+=1;a<l.length;a++){var _=l[a],B=_.startTime;if(B>S)break;var Q=_.transferSize,K=_.initiatorType;Q&&$0(K)&&(_=_.responseEnd,g+=Q*(_<S?1:(S-B)/(_-B)))}if(--a,t+=8*(c+g)/(o.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 rd=null,od=null;function hr(e){return e.nodeType===9?e:e.ownerDocument}function F0(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 B0(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 k0(e,t,l,a){return l=hr(l).createElement(e),l[Ot]=a,l[an]=t,Ut(l,e,t),_t(l),l}function ud(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 cd=null;function db(){var e=window.event;return e&&e.type==="popstate"?e===cd?!1:(cd=e,!0):(cd=null,!1)}var fd=typeof setTimeout=="function"?setTimeout:void 0,hb=typeof clearTimeout=="function"?clearTimeout:void 0,G0=typeof Promise=="function"?Promise:void 0,q0=typeof requestAnimationFrame=="function"?requestAnimationFrame:fd,mb=typeof queueMicrotask=="function"?queueMicrotask:typeof G0<"u"?function(e){return G0.resolve(null).then(e).catch(gb)}:fd;function gb(e){setTimeout(function(){throw e})}function na(e){return e==="head"}function Q0(e,t){var l=t,a=0;do{var o=l.nextSibling;if(e.removeChild(l),o&&o.nodeType===8)if(l=o.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(o),ni(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")xd(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,xd(l);for(var c=l.firstChild;c;){var g=c.nextSibling,S=c.nodeName;c[Ai]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=g}}else l==="body"&&xd(e.ownerDocument.body);l=o}while(l);ni(t)}function Y0(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function I0(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var a=1;else for(var o=a=0;o<t.length;o++){var c=t[o];0<c.width&&0<c.height&&a++}a===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function X0(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function pb(e,t,l){return l=l.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<=l.innerHeight&&e.left<=l.innerWidth}}function dd(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return pb(t,l,e)}function vb(e){return e.documentElement.clientHeight}function yb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function xb(e,t,l,a,o,c,g,S,_){var B=t.nodeType===9?t:t.ownerDocument;try{var Q=B.startViewTransition({update:function(){var U=B.defaultView,q=U.navigation&&U.navigation.transition,ae=B.fonts.status;a();var de=[];if(ae==="loaded"&&(vb(B),B.fonts.status==="loading"&&de.push(B.fonts.ready)),ae=de.length,e!==null)for(var _e=e.suspenseyImages,$=0,O=0;O<_e.length;O++){var G=_e[O];if(!G.complete){var I=G.getBoundingClientRect();if(0<I.bottom&&0<I.right&&I.top<U.innerHeight&&I.left<U.innerWidth){if($+=gv(G),$>mu){de.length=ae;break}G=new Promise(yb.bind(G)),de.push(G)}}}if(0<de.length)return U=Promise.race([Promise.all(de),new Promise(function(ce){return setTimeout(ce,500)})]).then(o,o),(q?Promise.allSettled([q.finished,U]):U).then(c,c);if(o(),q)return q.finished.then(c,c);c()},types:l});B.__reactViewTransition=Q;var K=[];return Q.ready.then(function(){for(var U=B.documentElement.getAnimations({subtree:!0}),q=0;q<U.length;q++){var ae=U[q],de=ae.effect,_e=de.pseudoElement;if(_e!=null&&_e.startsWith("::view-transition")){K.push(ae),ae=de.getKeyframes();for(var $=_e=void 0,O=!0,G=0;G<ae.length;G++){var I=ae[G],ce=I.width;if(_e===void 0)_e=ce;else if(_e!==ce){O=!1;break}if(ce=I.height,$===void 0)$=ce;else if($!==ce){O=!1;break}delete I.width,delete I.height,I.transform==="none"&&delete I.transform}O&&_e!==void 0&&$!==void 0&&(de.setKeyframes(ae),O=getComputedStyle(de.target,de.pseudoElement),O.width!==_e||O.height!==$)&&(O=ae[0],O.width=_e,O.height=$,O=ae[ae.length-1],O.width=_e,O.height=$,de.setKeyframes(ae))}}g()},function(U){B.__reactViewTransition===Q&&(B.__reactViewTransition=null);try{if(typeof U=="object"&&U!==null)switch(U.name){case"InvalidStateError":(U.message==="View transition was skipped because document visibility state is hidden."||U.message==="Skipping view transition because document visibility state has become hidden."||U.message==="Skipping view transition because viewport size changed."||U.message==="Transition was aborted because of invalid state")&&(U=null)}U!==null&&_(U)}finally{a(),o(),g()}}),Q.finished.finally(function(){for(var U=0;U<K.length;U++)K[U].cancel();B.__reactViewTransition===Q&&(B.__reactViewTransition=null),S()}),Q}catch{return a(),o(),g(),null}}function Pa(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Pa.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:z({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pa.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),a=[],o=0;o<l.length;o++){var c=l[o].effect;c!==null&&c.target===e&&c.pseudoElement===t&&a.push(l[o])}return a},Pa.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function K0(e){return{name:e,group:new Pa("group",e),imagePair:new Pa("image-pair",e),old:new Pa("old",e),new:new Pa("new",e)}}function xn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}xn.prototype.addEventListener=function(e,t,l){var a=null,o=null;if(!(l!=null&&typeof l!="boolean"&&(a=l.signal||null,a!==null&&a.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var c=this._eventListeners;if(P0(c,e,t,l)===-1){var g=this,S=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(S=function(_){g.removeEventListener(e,t,l),typeof t=="function"?t.call(this,_):t.handleEvent(_)}),a!==null&&(o=g.removeEventListener.bind(g,e,t,l),a.addEventListener("abort",o,{once:!0}),o=a.removeEventListener.bind(a,"abort",o)),a=Zs(l),c.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:S,cleanup:o}),v(this._fragmentFiber.child,!1,Sb,e,S,a)}this._eventListeners=c}};function Sb(e,t,l,a){return M(e).addEventListener(t,l,a),!1}xn.prototype.removeEventListener=function(e,t,l){var a=this._eventListeners;if(a!==null&&(t=P0(a,e,t,l),t!==-1)){var o=a[t];l=o.attachedListener;var c=o.cleanup;o=Zs(o.optionsOrUseCapture),v(this._fragmentFiber.child,!1,bb,e,l,o),a.splice(t,1),c!==null&&c()}};function bb(e,t,l,a){return M(e).removeEventListener(t,l,a),!1}function Zs(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Z0(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function P0(e,t,l,a){if(e.length===0)return-1;a=Z0(a);for(var o=0;o<e.length;o++){var c=e[o];if(c.type===t&&c.listener===l&&Z0(c.optionsOrUseCapture)===a)return o}return-1}xn.prototype.dispatchEvent=function(e){var t=b(this._fragmentFiber);if(t===null)return!0;t=M(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var a=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var o=0;o<l.length;o++){var c=l[o];a.addEventListener(c.type,c.attachedListener,Zs(c.optionsOrUseCapture))}if(t.appendChild(a),e=a.dispatchEvent(e),l)for(o=0;o<l.length;o++)c=l[o],a.removeEventListener(c.type,c.attachedListener,Zs(c.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},xn.prototype.focus=function(e){v(this._fragmentFiber.child,!0,J0,e,void 0,void 0)};function J0(e,t){return e.tag===6?!1:(e=M(e),zb(e,t))}xn.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,hd,t,void 0,void 0);for(var l=t.length-1;0<=l&&!J0(t[l],e);l--);};function hd(e,t){return t.push(e),!1}xn.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=M(e),e=hr(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,wb,e,void 0,void 0))};function wb(e,t){return e.tag===6?!1:(e=M(e),e===t||e.contains(t)?(t.blur(),!0):!1)}xn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,Cb,e,void 0,void 0)};function Cb(e,t){return e.tag===6||(e=M(e),t.observe(e)),!1}xn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,jb,e,void 0,void 0);for(var l=t=0;l<$n.length;l++){var a=$n[l];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):$n[t++]=a}$n.length=t}};function jb(e,t){return e.tag===6||(e=M(e),t.unobserve(e)),!1}var $n=[],md=!1;function Eb(e,t,l){$n.push({fragmentInstance:e,observer:t,instance:l}),md||(md=!0,Db(function(){md=!1;var a=$n;$n=[];for(var o=0;o<a.length;o++){var c=a[o];c.observer.unobserve(c.instance)}}))}xn.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,Nb,e,void 0,void 0),e};function Nb(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=M(e),t.push.apply(t,e.getClientRects());return!1}xn.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:M(t).getRootNode(e)},xn.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,hd,l,void 0,void 0);var a=M(t);if(l.length===0){if(l=a,w(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var o=a=l.compareDocumentPosition(e);return l===e?o=Node.DOCUMENT_POSITION_CONTAINS:a&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=C(t)[1],l===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=M(l).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=M(l[0]),o=M(l[l.length-1]);var c=w(this._fragmentFiber)?t.parentElement:a;if(c==null)return Node.DOCUMENT_POSITION_DISCONNECTED;a=c.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,c=c.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var g=t.compareDocumentPosition(e),S=o.compareDocumentPosition(e),_=g&Node.DOCUMENT_POSITION_CONTAINED_BY||S&Node.DOCUMENT_POSITION_CONTAINED_BY;return S=a&&c&&g&Node.DOCUMENT_POSITION_FOLLOWING&&S&Node.DOCUMENT_POSITION_PRECEDING,t=a&&t===e||c&&o===e||_||S?Node.DOCUMENT_POSITION_CONTAINED_BY:!a&&t===e||!c&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:g,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||_b(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function _b(e,t,l,a,o){var c=Ta(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!c)e:{for(;c!==null;){if(c.tag===7&&(c===t||c.alternate===t)){l=!0;break e}c=c.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(c===null)return c=o.ownerDocument,o===c||o===c.documentElement||o===c.body;e:{for(c=t,t=b(t);c!==null;){if(!(c.tag!==5&&c.tag!==3&&c.tag!==27||c!==t&&c.alternate!==t)){c=!0;break e}c=c.return}c=!1}return c}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!c)&&!(t=c===l)&&(t=D(l,c,H),t===null?t=!1:(v(t,!0,F,c,l),c=R,R=null,t=c!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!c)&&!(t=c===a)&&(t=D(a,c,H),t===null?t=!1:(v(t,!0,T,c,a),c=R,j=R=null,t=c!==null)),t):!1}function W0(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}xn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];v(this._fragmentFiber.child,!1,hd,t,void 0,void 0);var l=e!==!1;if(t.length===0){var a=C(this._fragmentFiber);if(a=l?a[1]||a[0]||b(this._fragmentFiber):a[0]||a[1],a===null)return;if(a.tag===6){e=M(a),W0(e,l);return}if(a=M(a),a.nodeType!==9){if(a.nodeType===11){l="host"in a?a.host:null,l!==null&&l.scrollIntoView(e);return}a.scrollIntoView(e)}}for(a=l?t.length-1:0;a!==(l?-1:t.length);){var o=t[a];o.tag===6?(o=M(o),W0(o,l)):M(o).scrollIntoView(e),a+=l?-1:1}};function Mb(e,t){return e=M(e),ev(e,t),!1}function ev(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function tv(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a];e.addEventListener(o.type,o.attachedListener,Zs(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){for(var g=0,S=0;S<$n.length;S++){var _=$n[S];(_.fragmentInstance!==t||_.observer!==c||_.instance!==e)&&($n[g++]=_)}$n.length=g,c.observe(e)}),ev(e,t))}function Rb(e,t){var l=t._eventListeners;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a];e.removeEventListener(o.type,o.attachedListener,Zs(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){typeof c.rootMargin=="string"?Eb(t,c,e):c.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function gd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":gd(l),to(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Tb(e,t,l,a){for(;e.nodeType===1;){var o=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ai])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Rn(e.nextSibling),e===null)break}return null}function Ab(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Rn(e.nextSibling),e===null))return null;return e}function nv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Rn(e.nextSibling),e===null))return null;return e}function pd(e){return e.data==="$?"||e.data==="$~"}function vd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ob(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Rn(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 yd=null;function lv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Rn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function av(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function zb(e,t){function l(){a=!0}if(e.ownerDocument.activeElement===e)return!0;var a=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return a}function Db(e){q0(function(){q0(function(t){return e(t)})})}function sv(e,t,l){switch(t=hr(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function iv(e,t,l){for(var a in l){var o=l[a];l.hasOwnProperty(a)&&o!=null&&Ze(e,t,a,null,ub,o)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Xn&&(e.onclick=null),to(e)}function xd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);to(e)}var Tn=new Map,rv=new Set;function mr(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 _l=me.d;me.d={f:Hb,r:Lb,D:Ub,C:Vb,L:$b,m:Fb,X:kb,S:Bb,M:Gb};function Hb(){var e=_l.f(),t=su();return e||t}function Lb(e){var t=gs(e);t!==null&&t.tag===5&&t.type==="form"?up(t):_l.r(e)}var Ps=typeof document>"u"?null:document;function ov(e,t,l){var a=Ps;if(a&&typeof t=="string"&&t){var o=wn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),rv.has(o)||(rv.add(o),e={rel:e,crossOrigin:l,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),Ut(t,"link",e),_t(t),a.head.appendChild(t)))}}function Ub(e){_l.D(e),ov("dns-prefetch",e,null)}function Vb(e,t){_l.C(e,t),ov("preconnect",e,t)}function $b(e,t,l){_l.L(e,t,l);var a=Ps;if(a&&e&&t){var o='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+wn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+wn(l.imageSizes)+'"]')):o+='[href="'+wn(e)+'"]';var c=o;switch(t){case"style":c=Js(e);break;case"script":c=Ws(e)}if(!(Tn.has(c)||(e=z({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Tn.set(c,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(gr(c))||t==="script"&&a.querySelector(pr(c))))){var g=a.createElement("link");Ut(g,"link",e),t==="style"&&(g[eo]=!0,g.onload=g.onerror=function(){bm(g)}),_t(g),a.head.appendChild(g)}}}function Fb(e,t){_l.m(e,t);var l=Ps;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+wn(a)+'"][href="'+wn(e)+'"]',c=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ws(e)}if(!Tn.has(c)&&(e=z({rel:"modulepreload",href:e},t),Tn.set(c,e),l.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pr(c)))return}a=l.createElement("link"),Ut(a,"link",e),_t(a),l.head.appendChild(a)}}}function Bb(e,t,l){_l.S(e,t,l);var a=Ps;if(a&&e){var o=ps(a).hoistableStyles,c=Js(e);t=t||"default";var g=o.get(c);if(!g){var S={loading:0,preload:null};if(g=a.querySelector(gr(c)))S.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Tn.get(c))&&Sd(e,l);var _=g=a.createElement("link");_t(_),Ut(_,"link",e),_._p=new Promise(function(B,Q){_.onload=B,_.onerror=Q}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,du(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(c,g)}}}function kb(e,t){_l.X(e,t);var l=Ps;if(l&&e){var a=ps(l).hoistableScripts,o=Ws(e),c=a.get(o);c||(c=l.querySelector(pr(o)),c||(e=z({src:e,async:!0},t),(t=Tn.get(o))&&bd(e,t),c=l.createElement("script"),_t(c),Ut(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function Gb(e,t){_l.M(e,t);var l=Ps;if(l&&e){var a=ps(l).hoistableScripts,o=Ws(e),c=a.get(o);c||(c=l.querySelector(pr(o)),c||(e=z({src:e,async:!0,type:"module"},t),(t=Tn.get(o))&&bd(e,t),c=l.createElement("script"),_t(c),Ut(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function uv(e,t,l,a){var o=(o=At.current)?mr(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Js(l.href),t=ps(o).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Js(l.href);var c=ps(o).hoistableStyles,g=c.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,g),(c=o.querySelector(gr(e)))?c._p||(g.instance=c,g.state.loading=5):(c=Tn.get(e),c||(c={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Tn.set(e,c)),qb(o,e,c,g.state))),t&&a===null)throw Error(r(528,""));return g}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Ws(l),t=ps(o).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Js(e){return'href="'+wn(e)+'"'}function gr(e){return'link[rel="stylesheet"]['+e+"]"}function cv(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function qb(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[eo]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[eo]=!0,t.onload=t.onerror=bm.bind(null,t),Ut(t,"link",l),_t(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function Ws(e){return'[src="'+wn(e)+'"]'}function pr(e){return"script[async]"+e}function fv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+wn(l.href)+'"]');if(a)return t.instance=a,_t(a),a;var o=z({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),_t(a),Ut(a,"style",o),du(a,l.precedence,e),t.instance=a;case"stylesheet":o=Js(l.href);var c=e.querySelector(gr(o));if(c)return t.state.loading|=4,t.instance=c,_t(c),c;a=cv(l),(o=Tn.get(o))&&Sd(a,o),c=(e.ownerDocument||e).createElement("link"),_t(c);var g=c;return g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Ut(c,"link",a),t.state.loading|=4,du(c,l.precedence,e),t.instance=c;case"script":return c=Ws(l.src),(o=e.querySelector(pr(c)))?(t.instance=o,_t(o),o):(a=l,(o=Tn.get(c))&&(a=z({},l),bd(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),_t(o),Ut(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,du(a,l.precedence,e));return t.instance}function du(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,c=o,g=0;g<a.length;g++){var S=a[g];if(S.dataset.precedence===t)c=S;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Sd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hu=null;function dv(e,t,l){if(hu===null){var a=new Map,o=hu=new Map;o.set(l,a)}else o=hu,a=o.get(l),a||(a=new Map,o.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),o=0;o<l.length;o++){var c=l[o];if(!(c[Ai]||c[Ot]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var g=c.getAttribute(t)||"";g=e+g;var S=a.get(g);S?S.push(c):a.set(g,[c])}}return a}function wd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Qb(e,t,l){if(l===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 hv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function mv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function pv(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=gv(t),e.suspenseyImages.push(t)),e=Xb.bind(e),t.decode().then(e,e))}function Yb(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var o=Js(a.href),c=t.querySelector(gr(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,_t(c);return}c=t.ownerDocument||t,a=cv(a),(o=Tn.get(o))&&Sd(a,o),c=c.createElement("link"),_t(c);var g=c;g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Ut(c,"link",a),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=vr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var mu=0;function Ib(e,t){return e.stylesheets&&e.count===0&&pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&mu===0&&(mu=62500*fb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>mu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function vv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)pu(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function vr(){this.count--,vv(this)}function Xb(){this.imgCount--,vv(this)}var gu=null;function pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gu=new Map,t.forEach(Kb,e),gu=null,vr.call(e))}function Kb(e,t){if(!(t.state.loading&4)){var l=gu.get(e);if(l)var a=l.get(null);else{l=new Map,gu.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var g=o[c];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(l.set(g.dataset.precedence,g),a=g)}a&&l.set(null,a)}o=t.instance,g=o.getAttribute("data-precedence"),c=l.get(g)||a,c===a&&l.set(null,o),l.set(g,o),this.count++,a=vr.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ei={$$typeof:ee,Provider:null,Consumer:null,_currentValue:rt,_currentValue2:rt,_threadCount:0};function Zb(e,t,l,a,o,c,g,S,_){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=tc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tc(0),this.hiddenUpdates=tc(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.transitionTypes=null,this.incompleteTransitions=new Map}function yv(e,t,l,a,o,c,g,S,_,B,Q,K){return e=new Zb(e,t,l,g,_,B,Q,K,S),t=1,c===!0&&(t|=24),c=sn(3,null,null,t),e.current=c,c.stateNode=e,t=Lc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},Fc(c),e}function xv(e){return e?(e=Ns,e):Ns}function Sv(e,t,l,a,o,c){o=xv(o),a.context===null?a.context=o:a.pendingContext=o,a=ql(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=Ql(e,a,t),l!==null&&(cn(l,e,t),Xi(l,e,t))}function bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Cd(e,t){bv(e,t),(e=e.alternate)&&bv(e,t)}function wv(e){if(e.tag===13||e.tag===31){var t=Da(e,67108864);t!==null&&cn(t,e,67108864),Cd(e,67108864)}}function Cv(e){if(e.tag===13||e.tag===31){var t=yn();t=nc(t);var l=Da(e,t);l!==null&&cn(l,e,t),Cd(e,t)}}var ti=!0;function Pb(e,t,l,a){var o=re.T;re.T=null;var c=me.p;try{me.p=2,jd(e,t,l,a)}finally{me.p=c,re.T=o}}function Jb(e,t,l,a){var o=re.T;re.T=null;var c=me.p;try{me.p=8,jd(e,t,l,a)}finally{me.p=c,re.T=o}}function jd(e,t,l,a){if(ti){var o=Ed(a);if(o===null)sd(e,t,a,vu,l),Ev(e,a);else if(e2(o,e,t,l,a))a.stopPropagation();else if(Ev(e,a),t&4&&-1<Wb.indexOf(e)){for(;o!==null;){var c=gs(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=dl(c.pendingLanes);if(g!==0){var S=c;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var _=1<<31-Xt(g);S.entanglements[1]|=_,g&=~_}al(c),(qe&6)===0&&(nu=et()+500,cr(0))}}break;case 31:case 13:S=Da(c,2),S!==null&&cn(S,c,2),su(),Cd(c,2)}if(c=Ed(a),c===null&&sd(e,t,a,vu,l),c===o)break;o=c}o!==null&&a.stopPropagation()}else sd(e,t,a,null,l)}}function Ed(e){return e=uc(e),Nd(e)}var vu=null;function Nd(e){if(vu=null,e=Ta(e),e!==null){var t=d(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===31){if(e=m(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vu=e,null}function jv(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(Yn()){case Dl:return 2;case ja:return 8;case Ea:case Jr:return 32;case Mi:return 268435456;default:return 32}default:return 32}}var _d=!1,la=null,aa=null,sa=null,yr=new Map,xr=new Map,ia=[],Wb="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 Ev(e,t){switch(e){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":sa=null;break;case"pointerover":case"pointerout":yr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xr.delete(t.pointerId)}}function Sr(e,t,l,a,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:c,targetContainers:[o]},t!==null&&(t=gs(t),t!==null&&wv(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function e2(e,t,l,a,o){switch(t){case"focusin":return la=Sr(la,e,t,l,a,o),!0;case"dragenter":return aa=Sr(aa,e,t,l,a,o),!0;case"mouseover":return sa=Sr(sa,e,t,l,a,o),!0;case"pointerover":var c=o.pointerId;return yr.set(c,Sr(yr.get(c)||null,e,t,l,a,o)),!0;case"gotpointercapture":return c=o.pointerId,xr.set(c,Sr(xr.get(c)||null,e,t,l,a,o)),!0}return!1}function Nv(e){var t=Ta(e.target);if(t!==null){var l=d(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,ym(e.priority,function(){Cv(l)});return}}else if(t===31){if(t=m(l),t!==null){e.blockedOn=t,ym(e.priority,function(){Cv(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Ed(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);oc=a,l.target.dispatchEvent(a),oc=null}else return t=gs(l),t!==null&&wv(t),e.blockedOn=l,!1;t.shift()}return!0}function _v(e,t,l){yu(e)&&l.delete(t)}function t2(){_d=!1,la!==null&&yu(la)&&(la=null),aa!==null&&yu(aa)&&(aa=null),sa!==null&&yu(sa)&&(sa=null),yr.forEach(_v),xr.forEach(_v)}function xu(e,t){e.blockedOn===t&&(e.blockedOn=null,_d||(_d=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,t2)))}var Su=null;function Mv(e){Su!==e&&(Su=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Su===e&&(Su=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(Nd(a||l)===null)continue;break}var c=gs(l);c!==null&&(e.splice(t,3),t-=3,of(c,{pending:!0,data:o,method:l.method,action:a},a,o))}}))}function ni(e){function t(_){return xu(_,e)}la!==null&&xu(la,e),aa!==null&&xu(aa,e),sa!==null&&xu(sa,e),yr.forEach(t),xr.forEach(t);for(var l=0;l<ia.length;l++){var a=ia[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ia.length&&(l=ia[0],l.blockedOn===null);)Nv(l),l.blockedOn===null&&ia.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var o=l[a],c=l[a+1],g=o[an]||null;if(typeof c=="function")g||Mv(l);else if(g){var S=null;if(c&&c.hasAttribute("formAction")){if(o=c,g=c[an]||null)S=g.formAction;else if(Nd(o)!==null)continue}else S=g.action;typeof S=="function"?l[a+1]=S:(l.splice(a,3),a-=3),Mv(l)}}}function Rv(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Md(e){this._internalRoot=e}bu.prototype.render=Md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=yn();Sv(l,a,e,t,null,null)},bu.prototype.unmount=Md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sv(e.current,2,null,e,null,null),su(),t[ms]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=vm();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ia.length&&t!==0&&t<ia[l].priority;l++);ia.splice(l,0,e),l===0&&Nv(e)}};var Tv=s.version;if(Tv!=="19.3.1")throw Error(r(527,Tv,"19.3.1"));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=y(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var n2={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{Pe=wu.inject(n2),nt=wu}catch{}}return wr.createRoot=function(e,t){if(!u(e))throw Error(r(299));var l=!1,a="",o=xp,c=Sp,g=bp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=yv(e,1,!1,null,null,l,a,null,o,c,g,Rv),e[ms]=t.current,ad(e),new Md(t)},wr.hydrateRoot=function(e,t,l){if(!u(e))throw Error(r(299));var a=!1,o="",c=xp,g=Sp,S=bp,_=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(o=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(g=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError),l.formState!==void 0&&(_=l.formState)),t=yv(e,1,!0,t,l??null,a,o,_,c,g,S,Rv),t.context=xv(null),l=t.current,a=yn(),a=nc(a),o=ql(a),o.callback=null,Ql(l,o,a),l=a,t.current.lanes=l,Ti(t,l),al(t),e[ms]=t.current,ad(e),new bu(t)},wr.version="19.3.1",wr}var Bv;function g2(){if(Bv)return Od.exports;Bv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Od.exports=m2(),Od.exports}var p2=g2();const Xy=E.createContext(void 0),Ky=n=>{const s=E.useContext(Xy);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},v2=({client:n,children:s})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Xy.Provider,{value:n,children:s})),y2={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)};var fa,Yh,Uy,x2=(Uy=class{constructor(){pe(this,fa,y2);pe(this,Yh,!1)}setTimeoutProvider(n){oe(this,fa,n)}setTimeout(n,s){return L(this,fa).setTimeout(n,s)}clearTimeout(n){L(this,fa).clearTimeout(n)}setInterval(n,s){return L(this,fa).setInterval(n,s)}clearInterval(n){L(this,fa).clearInterval(n)}},fa=new WeakMap,Yh=new WeakMap,Uy);const ts=new x2;function S2(n){setTimeout(n,0)}const b2=typeof window>"u"||"Deno"in globalThis;function fn(){}function w2(n,s){return typeof n=="function"?n(s):n}function Zy(n){return typeof n=="number"&&n>=0&&n!==1/0}function Py(n,s){return Math.max(n+(s||0)-Date.now(),0)}function ft(n,s){return typeof n=="function"?n(s):n}function kv(n,s){const{type:i="all",exact:r,fetchStatus:u,predicate:d,queryKey:h,stale:m}=n;if(h){if(r){if(s.queryHash!==Xh(h,s.options))return!1}else if(!ji(s.queryKey,h))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof m=="boolean"&&s.isStale()!==m||u&&u!==s.state.fetchStatus||d&&!d(s))}function Gv(n,s){const{exact:i,status:r,predicate:u,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(i){if(Ur(s.options.mutationKey)!==Ur(d))return!1}else if(!ji(s.options.mutationKey,d))return!1}return!(r&&s.state.status!==r||u&&!u(s))}function Xh(n,s){return((s==null?void 0:s.queryKeyHashFn)||Ur)(n)}function Ur(n){return JSON.stringify(n,(s,i)=>hh(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function ji(n,s){if(n===s)return!0;if(typeof n!=typeof s)return!1;if(n&&s&&typeof n=="object"&&typeof s=="object"){if(Array.isArray(n)&&Array.isArray(s)){if(s.length>n.length)return!1;for(let r=0;r<s.length;r++)if(!ji(n[r],s[r]))return!1;return!0}const i=Object.keys(s);for(const r of i)if(!ji(n[r],s[r]))return!1;return!0}return!1}const C2=Object.prototype.hasOwnProperty;function Jy(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=qv(n)&&qv(s);if(!r&&!(hh(n)&&hh(s)))return s;const u=(r?n:Object.keys(n)).length,d=r?s:Object.keys(s),h=d.length,m=r?new Array(h):{};let p=0;for(let y=0;y<h;y++){const x=r?y:d[y],v=n[x],b=s[x];if(v===b){m[x]=v,(r?y<u:C2.call(n,x))&&p++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){m[x]=b;continue}const w=Jy(v,b,i+1);m[x]=w,w===v&&p++}return u===h&&p===u?n:m}function Ld(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const i in n)if(n[i]!==s[i])return!1;return!0}function qv(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function hh(n){if(!Qv(n))return!1;const s=Object.getPrototypeOf(n),i=s==null?void 0:s.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const r=i.prototype;return!(!Qv(r)||!r.hasOwnProperty("isPrototypeOf")||s!==Object.prototype)}function Qv(n){return Object.prototype.toString.call(n)==="[object Object]"}function j2(n){return new Promise(s=>{ts.setTimeout(s,n)})}function mh(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?Jy(n,s):s}function Wy(n){return n}function E2(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function N2(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}const Kh=Symbol();function e1(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===Kh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function t1(n,s){return typeof n=="function"?n(...s):!!n}function _2(n,s,i){let r=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=s()),r||(r=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),n}let M2=()=>b2;const Zh=()=>M2();var Ir=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ns,da,fi,Vy,R2=(Vy=class extends Ir{constructor(){super();pe(this,ns);pe(this,da);pe(this,fi);oe(this,fi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){L(this,da)||this.setEventListener(L(this,fi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,da))==null||s.call(this),oe(this,da,void 0))}setEventListener(s){var i;oe(this,fi,s),(i=L(this,da))==null||i.call(this),oe(this,da,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){L(this,ns)!==s&&(oe(this,ns,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof L(this,ns)=="boolean"?L(this,ns):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},ns=new WeakMap,da=new WeakMap,fi=new WeakMap,Vy);const Ph=new R2,T2=S2;function A2(){let n=[],s=0,i=m=>{m()},r=m=>{m()},u=T2;const d=m=>{s?n.push(m):u(()=>{i(m)})},h=()=>{const m=n;n=[],m.length&&u(()=>{r(()=>{m.forEach(p=>{i(p)})})})};return{batch:m=>{let p;s++;try{p=m()}finally{s--,s||h()}return p},batchCalls:m=>(...p)=>{d(()=>{m(...p)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{u=m}}}const $t=A2();var di,ha,hi,$y,O2=($y=class extends Ir{constructor(){super();pe(this,di,!0);pe(this,ha);pe(this,hi);oe(this,hi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){L(this,ha)||this.setEventListener(L(this,hi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,ha))==null||s.call(this),oe(this,ha,void 0))}setEventListener(s){var i;oe(this,hi,s),(i=L(this,ha))==null||i.call(this),oe(this,ha,s(this.setOnline.bind(this)))}setOnline(s){L(this,di)!==s&&(oe(this,di,s),this.listeners.forEach(i=>{i(s)}))}isOnline(){return L(this,di)}},di=new WeakMap,ha=new WeakMap,hi=new WeakMap,$y);const Ou=new O2;function z2(n){return Math.min(1e3*2**n,3e4)}function n1(n){return(n??"online")==="online"?Ou.isOnline():!0}var gh=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function l1(n){let s=!1,i=0,r,u="pending",d,h;const m=new Promise((j,F)=>{d=j,h=F});m.catch(fn);const p=()=>u!=="pending",y=j=>{var F;if(!p()){const T=new gh(j);N(T),(F=n.onCancel)==null||F.call(n,T)}},x=()=>{s=!0},v=()=>{s=!1},b=()=>Ph.isFocused()&&(n.networkMode==="always"||Ou.isOnline())&&n.canRun(),w=()=>n1(n.networkMode)&&n.canRun(),C=j=>{p()||(r==null||r(),u="resolved",d(j))},N=j=>{p()||(r==null||r(),u="rejected",h(j))},M=j=>new Promise(F=>{var T;r=H=>{(p()||j())&&F(H)},(T=n.onPause)==null||T.call(n)}).then(()=>{var F;r=void 0,p()||(F=n.onContinue)==null||F.call(n)}),R=()=>{if(p())return;let j;const F=i===0?n.initialPromise:void 0;try{j=F??n.fn()}catch(T){j=Promise.reject(T)}Promise.resolve(j).then(C).catch(T=>{var te;if(p())return;const H=n.retry??(Zh()?0:3),D=n.retryDelay??z2,z=typeof D=="function"?D(i,T):D,Y=H===!0||typeof H=="number"&&i<H||typeof H=="function"&&H(i,T);if(s||!Y){N(T);return}i++,(te=n.onFail)==null||te.call(n,i,T),j2(z).then(()=>b()?void 0:M(b)).then(()=>{s?N(T):R()})})};return{promise:m,status:()=>u,cancel:y,continue:()=>(r==null||r(),m),cancelRetry:x,continueRetry:v,canStart:w,start:()=>(w()?R():M(w).then(R),m)}}var ls,Fy,a1=(Fy=class{constructor(){pe(this,ls)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zy(this.gcTime)&&oe(this,ls,ts.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Zh()?1/0:3e5))}clearGcTimeout(){L(this,ls)!==void 0&&(ts.clearTimeout(L(this,ls)),oe(this,ls,void 0))}},ls=new WeakMap,Fy);function D2(n){return{onFetch:(s,i)=>{var x,v,b,w,C;const r=s.options,u=(b=(v=(x=s.fetchOptions)==null?void 0:x.meta)==null?void 0:v.fetchMore)==null?void 0:b.direction,d=((w=s.state.data)==null?void 0:w.pages)||[],h=((C=s.state.data)==null?void 0:C.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const y=async()=>{let N=!1;const M=F=>{_2(F,()=>s.signal,()=>N=!0)},R=e1(s.options,s.fetchOptions),j=async(F,T,H)=>{if(N)return Promise.reject(s.signal.reason);if(T==null&&F.pages.length)return Promise.resolve(F);const z=(()=>{const ne={client:s.client,queryKey:s.queryKey,pageParam:T,direction:H?"backward":"forward",meta:s.options.meta};return M(ne),ne})(),Y=await R(z),{maxPages:te}=s.options,k=H?N2:E2;return{pages:k(F.pages,Y,te),pageParams:k(F.pageParams,T,te)}};if(u&&d.length){const F=u==="backward",T=F?s1:ph,H={pages:d,pageParams:h};m=await j(H,T(r,H),F)}else{const F=n??d.length;do{const T=p===0?h[0]===void 0?r.initialPageParam:h[0]:ph(r,m);if(p>0&&T==null)break;m=await j(m,T),p++}while(p<F)}return m};s.options.persister?s.fetchFn=()=>{var N,M;return(M=(N=s.options).persister)==null?void 0:M.call(N,y,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i)}:s.fetchFn=y}}}function ph(n,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,i[r],i):void 0}function s1(n,{pages:s,pageParams:i}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,i[0],i):void 0}function H2(n,s){return s?ph(n,s)!=null:!1}function L2(n,s){return!s||!n.getPreviousPageParam?!1:s1(n,s)!=null}var mi,as,gi,An,ss,Et,kr,is,Fn,Rl,By,U2=(By=class extends a1{constructor(s){super();pe(this,Fn);pe(this,mi);pe(this,as);pe(this,gi);pe(this,An);pe(this,ss);pe(this,Et);pe(this,kr);pe(this,is);oe(this,is,!1),oe(this,kr,s.defaultOptions),this.setOptions(s.options),this.observers=[],oe(this,ss,s.client),oe(this,An,L(this,ss).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,oe(this,as,Iv(this.options)),this.state=s.state??L(this,as),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,mi)}get promise(){var s;return(s=L(this,Et))==null?void 0:s.promise}setOptions(s){if(this.options={...L(this,kr),...s},s!=null&&s._type&&oe(this,mi,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Iv(this.options);i.data!==void 0&&(this.setState(Yv(i.data,i.dataUpdatedAt)),oe(this,as,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,An).remove(this)}setData(s,i){const r=mh(this.state.data,s,this.options);return De(this,Fn,Rl).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(s){De(this,Fn,Rl).call(this,{type:"setState",state:s})}cancel(s){var r,u;const i=(r=L(this,Et))==null?void 0:r.promise;return(u=L(this,Et))==null||u.cancel(s),i?i.then(fn).catch(fn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,as)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>ft(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>ft(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!Py(this.state.dataUpdatedAt,s)}onFocus(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Et))==null||i.continue()}onOnline(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Et))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),L(this,An).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){const i=this.observers.indexOf(s);i!==-1&&(this.observers.splice(i,1),this.observers.length||(L(this,Et)&&(L(this,is)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,Et).cancel({revert:!0}):L(this,Et).cancelRetry()),this.scheduleGc()),L(this,An).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Fn,Rl).call(this,{type:"invalidate"})}async fetch(s,i){var y,x,v,b,w,C,N,M,R,j,F,T;if(this.state.fetchStatus!=="idle"&&((y=L(this,Et))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(L(this,Et))return L(this,Et).continueRetry(),L(this,Et).promise}if(s&&this.setOptions(s),!this.options.queryFn){const H=this.observers.find(D=>D.options.queryFn);H&&this.setOptions(H.options)}const r=new AbortController,u=H=>{Object.defineProperty(H,"signal",{enumerable:!0,get:()=>(oe(this,is,!0),r.signal)})},d=()=>{const H=e1(this.options,i),z=(()=>{const Y={client:L(this,ss),queryKey:this.queryKey,meta:this.meta};return u(Y),Y})();return oe(this,is,!1),this.options.persister?this.options.persister(H,z,this):H(z)},m=(()=>{const H={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:L(this,ss),state:this.state,fetchFn:d};return u(H),H})();(x=L(this,mi)==="infinite"?D2(this.options.pages):this.options.behavior)==null||x.onFetch(m,this),oe(this,gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&De(this,Fn,Rl).call(this,{type:"fetch",meta:(b=m.fetchOptions)==null?void 0:b.meta});const p=oe(this,Et,l1({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:H=>{H instanceof gh&&H.revert&&this.setState({...L(this,gi),fetchStatus:"idle"}),r.abort()},onFail:(H,D)=>{De(this,Fn,Rl).call(this,{type:"failed",failureCount:H,error:D})},onPause:()=>{De(this,Fn,Rl).call(this,{type:"pause"})},onContinue:()=>{De(this,Fn,Rl).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const H=await p.start();if(H===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(H),(C=(w=L(this,An).config).onSuccess)==null||C.call(w,H,this),(M=(N=L(this,An).config).onSettled)==null||M.call(N,H,this.state.error,this),H}catch(H){if(H instanceof gh){if(H.silent)return L(this,Et).promise;if(H.revert){if(this.state.data===void 0)throw H;return this.state.data}}throw De(this,Fn,Rl).call(this,{type:"error",error:H}),(j=(R=L(this,An).config).onError)==null||j.call(R,H,this),(T=(F=L(this,An).config).onSettled)==null||T.call(F,this.state.data,H,this),H}finally{L(this,Et)===p&&oe(this,Et,void 0),this.scheduleGc()}}},mi=new WeakMap,as=new WeakMap,gi=new WeakMap,An=new WeakMap,ss=new WeakMap,Et=new WeakMap,kr=new WeakMap,is=new WeakMap,Fn=new WeakSet,Rl=function(s){const i=r=>{switch(s.type){case"failed":return{...r,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...i1(r.data,this.options),fetchMeta:s.meta??null};case"success":const u={...r,...Yv(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return oe(this,gi,s.manual?u:void 0),u;case"error":const d=s.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...s.state}}};this.state=i(this.state),$t.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),L(this,An).notify({query:this,type:"updated",action:s})})},By);function i1(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:n1(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Yv(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Iv(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,i=s!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var en,He,Gr,tn,rs,pi,Al,qr,vi,yi,os,us,ma,xi,Qe,Ar,vh,yh,xh,Sh,bh,wh,Ch,jh,ky,r1=(ky=class extends Ir{constructor(s,i){super();pe(this,Qe);pe(this,en);pe(this,He);pe(this,Gr);pe(this,tn);pe(this,rs);pe(this,pi);pe(this,Al);pe(this,qr);pe(this,vi);pe(this,yi);pe(this,os);pe(this,us);pe(this,ma);pe(this,xi,new Set);this.options=i,oe(this,en,s),oe(this,Al,null),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,He).addObserver(this),Xv(L(this,He),this.options)?De(this,Qe,Ar).call(this):this.updateResult(),De(this,Qe,bh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Eh(L(this,He),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Eh(L(this,He),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Qe,wh).call(this),De(this,Qe,Ch).call(this),L(this,He).removeObserver(this)}setOptions(s){const i=this.options,r=L(this,He);if(this.options=L(this,en).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ft(this.options.enabled,L(this,He))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Qe,jh).call(this),L(this,He).setOptions(this.options),i._defaulted&&!Ld(this.options,i)&&L(this,en).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,He),observer:this});const u=this.hasListeners();u&&Kv(L(this,He),r,this.options,i)&&De(this,Qe,Ar).call(this),this.updateResult(),u&&(L(this,He)!==r||ft(this.options.enabled,L(this,He))!==ft(i.enabled,L(this,He))||ft(this.options.staleTime,L(this,He))!==ft(i.staleTime,L(this,He)))&&De(this,Qe,yh).call(this);const d=De(this,Qe,xh).call(this);u&&(L(this,He)!==r||ft(this.options.enabled,L(this,He))!==ft(i.enabled,L(this,He))||d!==L(this,ma))&&De(this,Qe,Sh).call(this,d)}getOptimisticResult(s){const i=L(this,en).getQueryCache().build(L(this,en),s),r=this.createResult(i,s);return Ld(this.getCurrentResult(),r)||(oe(this,tn,r),oe(this,pi,this.options),oe(this,rs,L(this,He).state)),r}getCurrentResult(){return L(this,tn)}trackResult(s,i){return new Proxy(s,{get:(r,u)=>(this.trackProp(u),i==null||i(u),Reflect.get(r,u))})}trackProp(s){L(this,xi).add(s)}getCurrentQuery(){return L(this,He)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=L(this,en).defaultQueryOptions(s),r=L(this,en).getQueryCache().build(L(this,en),i);let u=()=>{},d;const h=new Promise(m=>{d=m,u=L(this,en).getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===r.queryHash&&r.state.data!==void 0&&(u(),m(this.createResult(r,i)))})});return Promise.race([r.fetch(i).then(()=>{const m=this.createResult(r,i);return d==null||d(m),m}).finally(()=>{u()}),h])}fetch(s){return De(this,Qe,Ar).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,tn)))}createResult(s,i){var D;const r=L(this,He),u=this.options,d=L(this,tn),h=L(this,rs),m=L(this,pi),p=s!==r?s.state:L(this,Gr),{state:y}=s;let x={...y},v=!1,b;if(i._optimisticResults){const z=this.hasListeners(),Y=!z&&Xv(s,i),te=z&&Kv(s,r,i,u);(Y||te)&&(x={...x,...i1(y.data,s.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:w,errorUpdatedAt:C,status:N}=x;b=x.data;let M=!1;if(i.placeholderData!==void 0&&b===void 0&&N==="pending"){let z;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(z=d.data,M=!0):z=typeof i.placeholderData=="function"?i.placeholderData((D=L(this,yi))==null?void 0:D.state.data,L(this,yi)):i.placeholderData,z!==void 0&&(N="success",b=mh(d==null?void 0:d.data,z,i),v=!0)}if(i.select&&b!==void 0&&!M)if(d&&b===(h==null?void 0:h.data)&&i.select===L(this,qr))b=L(this,vi);else try{oe(this,qr,i.select),b=i.select(b),b=mh(d==null?void 0:d.data,b,i),oe(this,vi,b),oe(this,Al,null)}catch(z){oe(this,Al,z)}else b===void 0&&oe(this,Al,null);L(this,Al)&&(w=L(this,Al),b=L(this,vi),C=Date.now(),N="error",v=!1);const R=x.fetchStatus==="fetching",j=N==="pending",F=N==="error",T=j&&R,H=b!==void 0;return{status:N,fetchStatus:x.fetchStatus,isPending:j,isSuccess:N==="success",isError:F,isInitialLoading:T,isLoading:T,data:b,dataUpdatedAt:x.dataUpdatedAt,error:w,errorUpdatedAt:C,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:x.dataUpdateCount>p.dataUpdateCount||x.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!j,isLoadingError:F&&!H,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:F&&H,isStale:Jh(s,i),refetch:this.refetch,isEnabled:ft(i.enabled,s)!==!1}}updateResult(){const s=L(this,tn),i=this.createResult(L(this,He),this.options);if(oe(this,rs,L(this,He).state),oe(this,pi,this.options),L(this,rs).data!==void 0&&oe(this,yi,L(this,He)),Ld(i,s))return;oe(this,tn,i);const u=(()=>{if(!s)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!L(this,xi).size)return!0;const m=new Set(h??L(this,xi));return this.options.throwOnError&&m.add("error"),Object.keys(L(this,tn)).some(p=>{const y=p;return L(this,tn)[y]!==s[y]&&m.has(y)})})();$t.batch(()=>{u&&this.listeners.forEach(d=>{d(L(this,tn))}),L(this,en).getQueryCache().notify({query:L(this,He),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Qe,bh).call(this)}},en=new WeakMap,He=new WeakMap,Gr=new WeakMap,tn=new WeakMap,rs=new WeakMap,pi=new WeakMap,Al=new WeakMap,qr=new WeakMap,vi=new WeakMap,yi=new WeakMap,os=new WeakMap,us=new WeakMap,ma=new WeakMap,xi=new WeakMap,Qe=new WeakSet,Ar=function(s){De(this,Qe,jh).call(this);let i=L(this,He).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(fn)),i},vh=function(s){return!Zh()&&ft(this.options.enabled,L(this,He))!==!1&&Zy(s)},yh=function(){De(this,Qe,wh).call(this);const s=ft(this.options.staleTime,L(this,He));if(L(this,tn).isStale||!De(this,Qe,vh).call(this,s))return;const i=Py(L(this,tn).dataUpdatedAt,s)+1;oe(this,os,ts.setTimeout(()=>{L(this,tn).isStale||this.updateResult()},i))},xh=function(){return ft(this.options.refetchInterval,L(this,He))??!1},Sh=function(s){De(this,Qe,Ch).call(this),oe(this,ma,s),!(L(this,ma)===0||!De(this,Qe,vh).call(this,L(this,ma)))&&oe(this,us,ts.setInterval(()=>{(this.options.refetchIntervalInBackground||Ph.isFocused())&&De(this,Qe,Ar).call(this)},L(this,ma)))},bh=function(){De(this,Qe,yh).call(this),De(this,Qe,Sh).call(this,De(this,Qe,xh).call(this))},wh=function(){L(this,os)!==void 0&&(ts.clearTimeout(L(this,os)),oe(this,os,void 0))},Ch=function(){L(this,us)!==void 0&&(ts.clearInterval(L(this,us)),oe(this,us,void 0))},jh=function(){const s=L(this,en).getQueryCache().build(L(this,en),this.options);if(s===L(this,He))return;const i=L(this,He);oe(this,He,s),oe(this,Gr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},ky);function V2(n,s){return ft(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&ft(s.retryOnMount,n)===!1)}function Xv(n,s){return V2(n,s)||n.state.data!==void 0&&Eh(n,s,s.refetchOnMount)}function Eh(n,s,i){if(ft(s.enabled,n)!==!1&&ft(s.staleTime,n)!=="static"){const r=ft(i,n);return r==="always"||r!==!1&&Jh(n,s)}return!1}function Kv(n,s,i,r){return(n!==s||ft(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Jh(n,i)}function Jh(n,s){return ft(s.enabled,n)!==!1&&n.isStaleByTime(ft(s.staleTime,n))}var $2=class extends r1{constructor(n,s){super(n,s)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){n._type="infinite",super.setOptions(n)}getOptimisticResult(n){return n._type="infinite",super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,s){var w,C;const{state:i}=n,r=super.createResult(n,s),{isFetching:u,isRefetching:d,isError:h,isRefetchError:m}=r,p=(C=(w=i.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:C.direction,y=h&&p==="forward",x=u&&p==="forward",v=h&&p==="backward",b=u&&p==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:H2(s,i.data),hasPreviousPage:L2(s,i.data),isFetchNextPageError:y,isFetchingNextPage:x,isFetchPreviousPageError:v,isFetchingPreviousPage:b,isRefetchError:m&&!y&&!v,isRefetching:d&&!x&&!b}}},Qr,sl,Yt,cs,il,oa,Gy,F2=(Gy=class extends a1{constructor(s){super();pe(this,il);pe(this,Qr);pe(this,sl);pe(this,Yt);pe(this,cs);oe(this,Qr,s.client),this.mutationId=s.mutationId,oe(this,Yt,s.mutationCache),oe(this,sl,[]),this.state=s.state||B2(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){L(this,sl).includes(s)||(L(this,sl).push(s),this.clearGcTimeout(),L(this,Yt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){oe(this,sl,L(this,sl).filter(i=>i!==s)),this.scheduleGc(),L(this,Yt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){L(this,sl).length||(this.state.status==="pending"?this.scheduleGc():L(this,Yt).remove(this))}continue(){var s;return((s=L(this,cs))==null?void 0:s.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(s){var m,p,y,x,v,b,w,C,N,M,R,j,F,T,H,D,z,Y;const i=()=>{De(this,il,oa).call(this,{type:"continue"})},r={client:L(this,Qr),meta:this.options.meta,mutationKey:this.options.mutationKey},u=oe(this,cs,l1({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(te,k)=>{De(this,il,oa).call(this,{type:"failed",failureCount:te,error:k})},onPause:()=>{De(this,il,oa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Yt).canRun(this)})),d=this.state.status==="pending",h=!u.canStart();try{if(d)i();else{De(this,il,oa).call(this,{type:"pending",variables:s,isPaused:h}),L(this,Yt).config.onMutate&&await L(this,Yt).config.onMutate(s,this,r);const k=await((p=(m=this.options).onMutate)==null?void 0:p.call(m,s,r));k!==this.state.context&&De(this,il,oa).call(this,{type:"pending",context:k,variables:s,isPaused:h})}const te=await u.start();return await((x=(y=L(this,Yt).config).onSuccess)==null?void 0:x.call(y,te,s,this.state.context,this,r)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,te,s,this.state.context,r)),await((C=(w=L(this,Yt).config).onSettled)==null?void 0:C.call(w,te,null,this.state.variables,this.state.context,this,r)),await((M=(N=this.options).onSettled)==null?void 0:M.call(N,te,null,s,this.state.context,r)),De(this,il,oa).call(this,{type:"success",data:te}),te}catch(te){try{await((j=(R=L(this,Yt).config).onError)==null?void 0:j.call(R,te,s,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((T=(F=this.options).onError)==null?void 0:T.call(F,te,s,this.state.context,r))}catch(k){Promise.reject(k)}try{await((D=(H=L(this,Yt).config).onSettled)==null?void 0:D.call(H,void 0,te,this.state.variables,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((Y=(z=this.options).onSettled)==null?void 0:Y.call(z,void 0,te,s,this.state.context,r))}catch(k){Promise.reject(k)}throw De(this,il,oa).call(this,{type:"error",error:te}),te}finally{L(this,cs)===u&&oe(this,cs,void 0),L(this,Yt).runNext(this)}}},Qr=new WeakMap,sl=new WeakMap,Yt=new WeakMap,cs=new WeakMap,il=new WeakSet,oa=function(s){const i=r=>{switch(s.type){case"failed":return{...r,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...r,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:s.error,failureCount:r.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),$t.batch(()=>{L(this,sl).forEach(r=>{r.onMutationUpdate(s)}),L(this,Yt).notify({mutation:this,type:"updated",action:s})})},Gy);function B2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ga,Bn,Yr,qy,k2=(qy=class extends Ir{constructor(s={}){super();pe(this,ga);pe(this,Bn);pe(this,Yr);this.config=s,oe(this,ga,new Set),oe(this,Bn,new Map),oe(this,Yr,0)}build(s,i,r){const u=new F2({client:s,mutationCache:this,mutationId:++Cu(this,Yr)._,options:s.defaultMutationOptions(i),state:r});return this.add(u),u}add(s){L(this,ga).add(s);const i=ju(s);if(typeof i=="string"){const r=L(this,Bn).get(i);r?r.push(s):L(this,Bn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(L(this,ga).delete(s)){const i=ju(s);if(typeof i=="string"){const r=L(this,Bn).get(i);if(r)if(r.length>1){const u=r.indexOf(s);u!==-1&&r.splice(u,1)}else r[0]===s&&L(this,Bn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){var r;const i=ju(s);if(typeof i=="string"){const u=(r=L(this,Bn).get(i))==null?void 0:r.find(d=>d.state.status==="pending");return!u||u===s}else return!0}runNext(s){var r,u;const i=ju(s);return typeof i=="string"?((u=(r=L(this,Bn).get(i))==null?void 0:r.find(d=>d!==s&&d.state.isPaused))==null?void 0:u.continue())??Promise.resolve():Promise.resolve()}clear(){$t.batch(()=>{const s=this.getAll();L(this,ga).clear(),L(this,Bn).clear(),s.forEach(i=>{this.notify({type:"removed",mutation:i})})})}getAll(){return Array.from(L(this,ga))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Gv(i,r))}findAll(s={}){return this.getAll().filter(i=>Gv(s,i))}notify(s){$t.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return $t.batch(()=>Promise.all(s.map(i=>i.continue().catch(fn))))}},ga=new WeakMap,Bn=new WeakMap,Yr=new WeakMap,qy);function ju(n){var s;return(s=n.options.scope)==null?void 0:s.id}var rl,Qy,G2=(Qy=class extends Ir{constructor(s={}){super();pe(this,rl);this.config=s,oe(this,rl,new Map)}build(s,i,r){const u=i.queryKey,d=i.queryHash??Xh(u,i);let h=this.get(d);return h||(h=new U2({client:s,queryKey:u,queryHash:d,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(u)}),this.add(h)),h}add(s){L(this,rl).has(s.queryHash)||(L(this,rl).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){L(this,rl).get(s.queryHash)===s&&(s.destroy(),L(this,rl).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){$t.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return L(this,rl).get(s)}getAll(){return[...L(this,rl).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>kv(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>kv(s,r)):i}notify(s){$t.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){$t.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){$t.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},rl=new WeakMap,Qy),ht,pa,va,Si,bi,ya,wi,Ci,Yy,q2=(Yy=class{constructor(n={}){pe(this,ht);pe(this,pa);pe(this,va);pe(this,Si);pe(this,bi);pe(this,ya);pe(this,wi);pe(this,Ci);oe(this,ht,n.queryCache||new G2),oe(this,pa,n.mutationCache||new k2),oe(this,va,n.defaultOptions||{}),oe(this,Si,new Map),oe(this,bi,new Map),oe(this,ya,0)}mount(){Cu(this,ya)._++,L(this,ya)===1&&(oe(this,wi,Ph.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,ht).onFocus())})),oe(this,Ci,Ou.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,ht).onOnline())})))}unmount(){var n,s;Cu(this,ya)._--,L(this,ya)===0&&((n=L(this,wi))==null||n.call(this),oe(this,wi,void 0),(s=L(this,Ci))==null||s.call(this),oe(this,Ci,void 0))}isFetching(n){return L(this,ht).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return L(this,pa).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,ht).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=L(this,ht).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ft(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return L(this,ht).findAll(n).map(({queryKey:s,state:i})=>[s,i.data])}setQueryData(n,s,i){var h;const r=this.defaultQueryOptions({queryKey:n}),u=(h=L(this,ht).get(r.queryHash))==null?void 0:h.state.data,d=w2(s,u);if(d!==void 0)return L(this,ht).build(this,r).setData(d,{...i,manual:!0})}setQueriesData(n,s,i){return $t.batch(()=>L(this,ht).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,ht).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=L(this,ht);$t.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=L(this,ht);return $t.batch(()=>{const r=i.findAll(n),u=new Set(r);return r.forEach(d=>{d.reset()}),this.refetchQueries({type:"active",predicate:d=>u.has(d)},s)})}cancelQueries(n,s={}){const i={revert:!0,...s},r=$t.batch(()=>L(this,ht).findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(fn).catch(fn)}invalidateQueries(n,s={}){return $t.batch(()=>(L(this,ht).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},s)))}refetchQueries(n,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=$t.batch(()=>L(this,ht).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,i);return i.throwOnError||(d=d.catch(fn)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(fn)}async query(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,ht).build(this,s),r=i.isStaleByTime(ft(s.staleTime,i))?await i.fetch(s):i.state.data,u=s.select;return u?u(r):r}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,ht).build(this,s);return i.isStaleByTime(ft(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(fn).catch(fn)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(fn).catch(fn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Ou.isOnline()?L(this,pa).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,ht)}getMutationCache(){return L(this,pa)}getDefaultOptions(){return L(this,va)}setDefaultOptions(n){oe(this,va,n)}setQueryDefaults(n,s){L(this,Si).set(Ur(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...L(this,Si).values()],i={};return s.forEach(r=>{ji(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){L(this,bi).set(Ur(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...L(this,bi).values()],i={};return s.forEach(r=>{ji(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const s={...L(this,va).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=Xh(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===Kh&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...L(this,va).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){L(this,ht).clear(),L(this,pa).clear()}},ht=new WeakMap,pa=new WeakMap,va=new WeakMap,Si=new WeakMap,bi=new WeakMap,ya=new WeakMap,wi=new WeakMap,Ci=new WeakMap,Yy);const o1=E.createContext(!1),Q2=()=>E.useContext(o1);o1.Provider;function Y2(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const I2=E.createContext(Y2()),X2=()=>E.useContext(I2),K2=(n,s,i)=>{const r=(i==null?void 0:i.state.status)==="error"&&typeof n.throwOnError=="function"?t1(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||r)&&(s.isReset()||(n.retryOnMount=!1))},Z2=n=>{E.useEffect(()=>{n.clearReset()},[n])},P2=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:u})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||t1(i,[n.error,r])),J2=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...u)=>i(r(...u)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},W2=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,ew=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function u1(n,s,i){const r=Q2(),u=X2(),d=Ky(),h=d.defaultQueryOptions(n),m=d.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,J2(h),K2(h,u,m),Z2(u);const[y]=E.useState(()=>new s(d,h)),x=y.getOptimisticResult(h),v=!r&&p;if(E.useSyncExternalStore(E.useCallback(b=>{const w=v?y.subscribe($t.batchCalls(b)):fn;return y.updateResult(),w},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),E.useEffect(()=>{y.setOptions(h)},[h,y]),W2(h,x))throw ew(h,y,u);if(P2({result:x,errorResetBoundary:u,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw x.error;return h.notifyOnChangeProps?x:y.trackResult(x)}function Ol(n,s){return u1(n,r1)}function tw(n,s){return u1(n,$2)}var Wh=Iy();/**
50
50
  * @remix-run/router v1.23.4
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,7 +55,7 @@ Error generating stack: `+a.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */function au(){return au=Object.assign?Object.assign.bind():function(l){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var u in s)({}).hasOwnProperty.call(s,u)&&(l[u]=s[u])}return l},au.apply(null,arguments)}var Zl;(function(l){l.Pop="POP",l.Push="PUSH",l.Replace="REPLACE"})(Zl||(Zl={}));const Zv="popstate";function Zb(l){l===void 0&&(l={});function i(u,c){let{pathname:f,search:g,hash:m}=u.location;return wd("",{pathname:f,search:g,hash:m},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function s(u,c){return typeof c=="string"?c:Po(c)}return Ib(i,s,null,l)}function st(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function Yy(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function Kb(){return Math.random().toString(36).substr(2,8)}function Kv(l,i){return{usr:l.state,key:l.key,idx:i}}function wd(l,i,s,u){return s===void 0&&(s=null),au({pathname:typeof l=="string"?l:l.pathname,search:"",hash:""},typeof i=="string"?Wi(i):i,{state:s,key:i&&i.key||u||Kb()})}function Po(l){let{pathname:i="/",search:s="",hash:u=""}=l;return s&&s!=="?"&&(i+=s.charAt(0)==="?"?s:"?"+s),u&&u!=="#"&&(i+=u.charAt(0)==="#"?u:"#"+u),i}function Wi(l){let i={};if(l){let s=l.indexOf("#");s>=0&&(i.hash=l.substr(s),l=l.substr(0,s));let u=l.indexOf("?");u>=0&&(i.search=l.substr(u),l=l.substr(0,u)),l&&(i.pathname=l)}return i}function Ib(l,i,s,u){u===void 0&&(u={});let{window:c=document.defaultView,v5Compat:f=!1}=u,g=c.history,m=Zl.Pop,v=null,S=y();S==null&&(S=0,g.replaceState(au({},g.state,{idx:S}),""));function y(){return(g.state||{idx:null}).idx}function x(){m=Zl.Pop;let b=y(),E=b==null?null:b-S;S=b,v&&v({action:m,location:O.location,delta:E})}function C(b,E){m=Zl.Push;let U=wd(O.location,b,E);S=y()+1;let B=Kv(U,S),$=O.createHref(U);try{g.pushState(B,"",$)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;c.location.assign($)}f&&v&&v({action:m,location:O.location,delta:1})}function R(b,E){m=Zl.Replace;let U=wd(O.location,b,E);S=y();let B=Kv(U,S),$=O.createHref(U);g.replaceState(B,"",$),f&&v&&v({action:m,location:O.location,delta:0})}function _(b){let E=c.location.origin!=="null"?c.location.origin:c.location.href,U=typeof b=="string"?b:Po(b);return U=U.replace(/ $/,"%20"),st(E,"No window.location.(origin|href) available to create URL for href: "+U),new URL(U,E)}let O={get action(){return m},get location(){return l(c,g)},listen(b){if(v)throw new Error("A history only accepts one active listener");return c.addEventListener(Zv,x),v=b,()=>{c.removeEventListener(Zv,x),v=null}},createHref(b){return i(c,b)},createURL:_,encodeLocation(b){let E=_(b);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:C,replace:R,go(b){return g.go(b)}};return O}var Iv;(function(l){l.data="data",l.deferred="deferred",l.redirect="redirect",l.error="error"})(Iv||(Iv={}));function Jb(l,i,s){return s===void 0&&(s="/"),Pb(l,i,s)}function Pb(l,i,s,u){let c=typeof i=="string"?Wi(i):i,f=Id(c.pathname||"/",s);if(f==null)return null;let g=Xy(l);Wb(g);let m=null,v=f2(f);for(let S=0;m==null&&S<g.length;++S)m=o2(g[S],v);return m}function Xy(l,i,s,u){i===void 0&&(i=[]),s===void 0&&(s=[]),u===void 0&&(u="");let c=(f,g,m)=>{let v={relativePath:m===void 0?f.path||"":m,caseSensitive:f.caseSensitive===!0,childrenIndex:g,route:f};v.relativePath.startsWith("/")&&(st(v.relativePath.startsWith(u),'Absolute route path "'+v.relativePath+'" nested under path '+('"'+u+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),v.relativePath=v.relativePath.slice(u.length));let S=Il([u,v.relativePath]),y=s.concat(v);f.children&&f.children.length>0&&(st(f.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+S+'".')),Xy(f.children,i,y,S)),!(f.path==null&&!f.index)&&i.push({path:S,score:s2(S,f.index),routesMeta:y})};return l.forEach((f,g)=>{var m;if(f.path===""||!((m=f.path)!=null&&m.includes("?")))c(f,g);else for(let v of Zy(f.path))c(f,g,v)}),i}function Zy(l){let i=l.split("/");if(i.length===0)return[];let[s,...u]=i,c=s.endsWith("?"),f=s.replace(/\?$/,"");if(u.length===0)return c?[f,""]:[f];let g=Zy(u.join("/")),m=[];return m.push(...g.map(v=>v===""?f:[f,v].join("/"))),c&&m.push(...g),m.map(v=>l.startsWith("/")&&v===""?"/":v)}function Wb(l){l.sort((i,s)=>i.score!==s.score?s.score-i.score:u2(i.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}const e2=/^:[\w-]+$/,t2=3,n2=2,l2=1,a2=10,i2=-2,Jv=l=>l==="*";function s2(l,i){let s=l.split("/"),u=s.length;return s.some(Jv)&&(u+=i2),i&&(u+=n2),s.filter(c=>!Jv(c)).reduce((c,f)=>c+(e2.test(f)?t2:f===""?l2:a2),u)}function u2(l,i){return l.length===i.length&&l.slice(0,-1).every((u,c)=>u===i[c])?l[l.length-1]-i[i.length-1]:0}function o2(l,i,s){let{routesMeta:u}=l,c={},f="/",g=[];for(let m=0;m<u.length;++m){let v=u[m],S=m===u.length-1,y=f==="/"?i:i.slice(f.length)||"/",x=r2({path:v.relativePath,caseSensitive:v.caseSensitive,end:S},y),C=v.route;if(!x)return null;Object.assign(c,x.params),g.push({params:c,pathname:Il([f,x.pathname]),pathnameBase:g2(Il([f,x.pathnameBase])),route:C}),x.pathnameBase!=="/"&&(f=Il([f,x.pathnameBase]))}return g}function r2(l,i){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[s,u]=c2(l.path,l.caseSensitive,l.end),c=i.match(s);if(!c)return null;let f=c[0],g=f.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:u.reduce((S,y,x)=>{let{paramName:C,isOptional:R}=y;if(C==="*"){let O=m[x]||"";g=f.slice(0,f.length-O.length).replace(/(.)\/+$/,"$1")}const _=m[x];return R&&!_?S[C]=void 0:S[C]=(_||"").replace(/%2F/g,"/"),S},{}),pathname:f,pathnameBase:g,pattern:l}}function c2(l,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0),Yy(l==="*"||!l.endsWith("*")||l.endsWith("/*"),'Route path "'+l+'" will be treated as if it were '+('"'+l.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+l.replace(/\*$/,"/*")+'".'));let u=[],c="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,m,v)=>(u.push({paramName:m,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)"));return l.endsWith("*")?(u.push({paramName:"*"}),c+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?c+="\\/*$":l!==""&&l!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),u]}function f2(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Yy(!1,'The URL path "'+l+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+i+").")),l}}function Id(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,u=l.charAt(s);return u&&u!=="/"?null:l.slice(s)||"/"}function d2(l,i){i===void 0&&(i="/");let{pathname:s,search:u="",hash:c=""}=typeof l=="string"?Wi(l):l,f;return s?(s=Jy(s),s.startsWith("/")?f=Pv(s.substring(1),"/"):f=Pv(s,i)):f=i,{pathname:f,search:m2(u),hash:p2(c)}}function Pv(l,i){let s=i.replace(/\/+$/,"").split("/");return l.split("/").forEach(c=>{c===".."?s.length>1&&s.pop():c!=="."&&s.push(c)}),s.length>1?s.join("/"):"/"}function Wf(l,i,s,u){return"Cannot include a '"+l+"' character in a manually specified "+("`to."+i+"` field ["+JSON.stringify(u)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function h2(l){return l.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function Ky(l,i){let s=h2(l);return i?s.map((u,c)=>c===s.length-1?u.pathname:u.pathnameBase):s.map(u=>u.pathnameBase)}function Iy(l,i,s,u){u===void 0&&(u=!1);let c;typeof l=="string"?c=Wi(l):(c=au({},l),st(!c.pathname||!c.pathname.includes("?"),Wf("?","pathname","search",c)),st(!c.pathname||!c.pathname.includes("#"),Wf("#","pathname","hash",c)),st(!c.search||!c.search.includes("#"),Wf("#","search","hash",c)));let f=l===""||c.pathname==="",g=f?"/":c.pathname,m;if(g==null)m=s;else{let x=i.length-1;if(!u&&g.startsWith("..")){let C=g.split("/");for(;C[0]==="..";)C.shift(),x-=1;c.pathname=C.join("/")}m=x>=0?i[x]:"/"}let v=d2(c,m),S=g&&g!=="/"&&g.endsWith("/"),y=(f||g===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(S||y)&&(v.pathname+="/"),v}const Jy=l=>l.replace(/\/\/+/g,"/"),Il=l=>Jy(l.join("/")),g2=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),m2=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,p2=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function v2(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}const Py=["post","put","patch","delete"];new Set(Py);const y2=["get",...Py];new Set(y2);/**
58
+ */function Vr(){return Vr=Object.assign?Object.assign.bind():function(n){for(var s=1;s<arguments.length;s++){var i=arguments[s];for(var r in i)({}).hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},Vr.apply(null,arguments)}var xa;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(xa||(xa={}));const Zv="popstate";function nw(n){n===void 0&&(n={});function s(r,u){let{pathname:d,search:h,hash:m}=r.location;return Nh("",{pathname:d,search:h,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(r,u){return typeof u=="string"?u:f1(u)}return aw(s,i,null,n)}function wt(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function c1(n,s){if(!n){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function lw(){return Math.random().toString(36).substr(2,8)}function Pv(n,s){return{usr:n.state,key:n.key,idx:s}}function Nh(n,s,i,r){return i===void 0&&(i=null),Vr({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof s=="string"?_i(s):s,{state:i,key:s&&s.key||r||lw()})}function f1(n){let{pathname:s="/",search:i="",hash:r=""}=n;return i&&i!=="?"&&(s+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function _i(n){let s={};if(n){let i=n.indexOf("#");i>=0&&(s.hash=n.substr(i),n=n.substr(0,i));let r=n.indexOf("?");r>=0&&(s.search=n.substr(r),n=n.substr(0,r)),n&&(s.pathname=n)}return s}function aw(n,s,i,r){r===void 0&&(r={});let{window:u=document.defaultView,v5Compat:d=!1}=r,h=u.history,m=xa.Pop,p=null,y=x();y==null&&(y=0,h.replaceState(Vr({},h.state,{idx:y}),""));function x(){return(h.state||{idx:null}).idx}function v(){m=xa.Pop;let M=x(),R=M==null?null:M-y;y=M,p&&p({action:m,location:N.location,delta:R})}function b(M,R){m=xa.Push;let j=Nh(N.location,M,R);y=x()+1;let F=Pv(j,y),T=N.createHref(j);try{h.pushState(F,"",T)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;u.location.assign(T)}d&&p&&p({action:m,location:N.location,delta:1})}function w(M,R){m=xa.Replace;let j=Nh(N.location,M,R);y=x();let F=Pv(j,y),T=N.createHref(j);h.replaceState(F,"",T),d&&p&&p({action:m,location:N.location,delta:0})}function C(M){let R=u.location.origin!=="null"?u.location.origin:u.location.href,j=typeof M=="string"?M:f1(M);return j=j.replace(/ $/,"%20"),wt(R,"No window.location.(origin|href) available to create URL for href: "+j),new URL(j,R)}let N={get action(){return m},get location(){return n(u,h)},listen(M){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(Zv,v),p=M,()=>{u.removeEventListener(Zv,v),p=null}},createHref(M){return s(u,M)},createURL:C,encodeLocation(M){let R=C(M);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:b,replace:w,go(M){return h.go(M)}};return N}var Jv;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Jv||(Jv={}));function sw(n,s,i){return i===void 0&&(i="/"),iw(n,s,i)}function iw(n,s,i,r){let u=typeof s=="string"?_i(s):s,d=p1(u.pathname||"/",i);if(d==null)return null;let h=d1(n);rw(h);let m=null,p=g1(d);for(let y=0;m==null&&y<h.length;++y)m=pw(h[y],p);return m}function d1(n,s,i,r){s===void 0&&(s=[]),i===void 0&&(i=[]),r===void 0&&(r="");let u=(d,h,m)=>{let p={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};p.relativePath.startsWith("/")&&(wt(p.relativePath.startsWith(r),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(r.length));let y=fs([r,p.relativePath]),x=i.concat(p);d.children&&d.children.length>0&&(wt(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),d1(d.children,s,x,y)),!(d.path==null&&!d.index)&&s.push({path:y,score:mw(y,d.index),routesMeta:x})};return n.forEach((d,h)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,h);else for(let p of h1(d.path))u(d,h,p)}),s}function h1(n){let s=n.split("/");if(s.length===0)return[];let[i,...r]=s,u=i.endsWith("?"),d=i.replace(/\?$/,"");if(r.length===0)return u?[d,""]:[d];let h=h1(r.join("/")),m=[];return m.push(...h.map(p=>p===""?d:[d,p].join("/"))),u&&m.push(...h),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function rw(n){n.sort((s,i)=>s.score!==i.score?i.score-s.score:gw(s.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}const ow=/^:[\w-]+$/,uw=3,cw=2,fw=1,dw=10,hw=-2,Wv=n=>n==="*";function mw(n,s){let i=n.split("/"),r=i.length;return i.some(Wv)&&(r+=hw),s&&(r+=cw),i.filter(u=>!Wv(u)).reduce((u,d)=>u+(ow.test(d)?uw:d===""?fw:dw),r)}function gw(n,s){return n.length===s.length&&n.slice(0,-1).every((r,u)=>r===s[u])?n[n.length-1]-s[s.length-1]:0}function pw(n,s,i){let{routesMeta:r}=n,u={},d="/",h=[];for(let m=0;m<r.length;++m){let p=r[m],y=m===r.length-1,x=d==="/"?s:s.slice(d.length)||"/",v=m1({path:p.relativePath,caseSensitive:p.caseSensitive,end:y},x),b=p.route;if(!v)return null;Object.assign(u,v.params),h.push({params:u,pathname:fs([d,v.pathname]),pathnameBase:ww(fs([d,v.pathnameBase])),route:b}),v.pathnameBase!=="/"&&(d=fs([d,v.pathnameBase]))}return h}function m1(n,s){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,r]=vw(n.path,n.caseSensitive,n.end),u=s.match(i);if(!u)return null;let d=u[0],h=d.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:r.reduce((y,x,v)=>{let{paramName:b,isOptional:w}=x;if(b==="*"){let N=m[v]||"";h=d.slice(0,d.length-N.length).replace(/(.)\/+$/,"$1")}const C=m[v];return w&&!C?y[b]=void 0:y[b]=(C||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:h,pattern:n}}function vw(n,s,i){s===void 0&&(s=!1),i===void 0&&(i=!0),c1(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let r=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,p)=>(r.push({paramName:m,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,s?void 0:"i"),r]}function g1(n){try{return n.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return c1(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+s+").")),n}}function p1(n,s){if(s==="/")return n;if(!n.toLowerCase().startsWith(s.toLowerCase()))return null;let i=s.endsWith("/")?s.length-1:s.length,r=n.charAt(i);return r&&r!=="/"?null:n.slice(i)||"/"}function yw(n,s){s===void 0&&(s="/");let{pathname:i,search:r="",hash:u=""}=typeof n=="string"?_i(n):n,d;return i?(i=v1(i),i.startsWith("/")?d=ey(i.substring(1),"/"):d=ey(i,s)):d=s,{pathname:d,search:Cw(r),hash:jw(u)}}function ey(n,s){let i=s.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function Ud(n,s,i,r){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+s+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+i+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function xw(n){return n.filter((s,i)=>i===0||s.route.path&&s.route.path.length>0)}function Sw(n,s){let i=xw(n);return s?i.map((r,u)=>u===i.length-1?r.pathname:r.pathnameBase):i.map(r=>r.pathnameBase)}function bw(n,s,i,r){r===void 0&&(r=!1);let u;typeof n=="string"?u=_i(n):(u=Vr({},n),wt(!u.pathname||!u.pathname.includes("?"),Ud("?","pathname","search",u)),wt(!u.pathname||!u.pathname.includes("#"),Ud("#","pathname","hash",u)),wt(!u.search||!u.search.includes("#"),Ud("#","search","hash",u)));let d=n===""||u.pathname==="",h=d?"/":u.pathname,m;if(h==null)m=i;else{let v=s.length-1;if(!r&&h.startsWith("..")){let b=h.split("/");for(;b[0]==="..";)b.shift(),v-=1;u.pathname=b.join("/")}m=v>=0?s[v]:"/"}let p=yw(u,m),y=h&&h!=="/"&&h.endsWith("/"),x=(d||h===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(y||x)&&(p.pathname+="/"),p}const v1=n=>n.replace(/\/\/+/g,"/"),fs=n=>v1(n.join("/")),ww=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Cw=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,jw=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Ew(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const y1=["post","put","patch","delete"];new Set(y1);const Nw=["get",...y1];new Set(Nw);/**
59
59
  * React Router v6.30.6
60
60
  *
61
61
  * Copyright (c) Remix Software Inc.
@@ -64,7 +64,7 @@ Error generating stack: `+a.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function iu(){return iu=Object.assign?Object.assign.bind():function(l){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var u in s)({}).hasOwnProperty.call(s,u)&&(l[u]=s[u])}return l},iu.apply(null,arguments)}const Jd=j.createContext(null),S2=j.createContext(null),Ga=j.createContext(null),ar=j.createContext(null),ea=j.createContext({outlet:null,matches:[],isDataRoute:!1}),Wy=j.createContext(null);function x2(l,i){let{relative:s}=i===void 0?{}:i;hu()||st(!1);let{basename:u,navigator:c}=j.useContext(Ga),{hash:f,pathname:g,search:m}=t0(l,{relative:s}),v=g;return u!=="/"&&(v=g==="/"?u:Il([u,g])),c.createHref({pathname:v,search:m,hash:f})}function hu(){return j.useContext(ar)!=null}function gu(){return hu()||st(!1),j.useContext(ar).location}function e0(l){j.useContext(Ga).static||j.useLayoutEffect(l)}function ir(){let{isDataRoute:l}=j.useContext(ea);return l?D2():b2()}function b2(){hu()||st(!1);let l=j.useContext(Jd),{basename:i,future:s,navigator:u}=j.useContext(Ga),{matches:c}=j.useContext(ea),{pathname:f}=gu(),g=JSON.stringify(Ky(c,s.v7_relativeSplatPath)),m=j.useRef(!1);return e0(()=>{m.current=!0}),j.useCallback(function(S,y){if(y===void 0&&(y={}),!m.current)return;if(typeof S=="number"){u.go(S);return}let x=Iy(S,JSON.parse(g),f,y.relative==="path");l==null&&i!=="/"&&(x.pathname=x.pathname==="/"?i:Il([i,x.pathname])),(y.replace?u.replace:u.push)(x,y.state,y)},[i,u,g,f,l])}function C2(){let{matches:l}=j.useContext(ea),i=l[l.length-1];return i?i.params:{}}function t0(l,i){let{relative:s}=i===void 0?{}:i,{future:u}=j.useContext(Ga),{matches:c}=j.useContext(ea),{pathname:f}=gu(),g=JSON.stringify(Ky(c,u.v7_relativeSplatPath));return j.useMemo(()=>Iy(l,JSON.parse(g),f,s==="path"),[l,g,f,s])}function E2(l,i){return w2(l,i)}function w2(l,i,s,u){hu()||st(!1);let{navigator:c}=j.useContext(Ga),{matches:f}=j.useContext(ea),g=f[f.length-1],m=g?g.params:{};g&&g.pathname;let v=g?g.pathnameBase:"/";g&&g.route;let S=gu(),y;if(i){var x;let b=typeof i=="string"?Wi(i):i;v==="/"||(x=b.pathname)!=null&&x.startsWith(v)||st(!1),y=b}else y=S;let C=y.pathname||"/",R=C;if(v!=="/"){let b=v.replace(/^\//,"").split("/");R="/"+C.replace(/^\//,"").split("/").slice(b.length).join("/")}let _=Jb(l,{pathname:R}),O=M2(_&&_.map(b=>Object.assign({},b,{params:Object.assign({},m,b.params),pathname:Il([v,c.encodeLocation?c.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?v:Il([v,c.encodeLocation?c.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),f,s,u);return i&&O?j.createElement(ar.Provider,{value:{location:iu({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:Zl.Pop}},O):O}function R2(){let l=z2(),i=v2(l)?l.status+" "+l.statusText:l instanceof Error?l.message:JSON.stringify(l),s=l instanceof Error?l.stack:null,c={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},i),s?j.createElement("pre",{style:c},s):null,null)}const _2=j.createElement(R2,null);class N2 extends j.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,s){return s.location!==i.location||s.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:s.error,location:s.location,revalidation:i.revalidation||s.revalidation}}componentDidCatch(i,s){console.error("React Router caught the following error during render",i,s)}render(){return this.state.error!==void 0?j.createElement(ea.Provider,{value:this.props.routeContext},j.createElement(Wy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function T2(l){let{routeContext:i,match:s,children:u}=l,c=j.useContext(Jd);return c&&c.static&&c.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=s.route.id),j.createElement(ea.Provider,{value:i},u)}function M2(l,i,s,u){var c;if(i===void 0&&(i=[]),s===void 0&&(s=null),u===void 0&&(u=null),l==null){var f;if(!s)return null;if(s.errors)l=s.matches;else if((f=u)!=null&&f.v7_partialHydration&&i.length===0&&!s.initialized&&s.matches.length>0)l=s.matches;else return null}let g=l,m=(c=s)==null?void 0:c.errors;if(m!=null){let y=g.findIndex(x=>x.route.id&&(m==null?void 0:m[x.route.id])!==void 0);y>=0||st(!1),g=g.slice(0,Math.min(g.length,y+1))}let v=!1,S=-1;if(s&&u&&u.v7_partialHydration)for(let y=0;y<g.length;y++){let x=g[y];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(S=y),x.route.id){let{loaderData:C,errors:R}=s,_=x.route.loader&&C[x.route.id]===void 0&&(!R||R[x.route.id]===void 0);if(x.route.lazy||_){v=!0,S>=0?g=g.slice(0,S+1):g=[g[0]];break}}}return g.reduceRight((y,x,C)=>{let R,_=!1,O=null,b=null;s&&(R=m&&x.route.id?m[x.route.id]:void 0,O=x.route.errorElement||_2,v&&(S<0&&C===0?(U2("route-fallback"),_=!0,b=null):S===C&&(_=!0,b=x.route.hydrateFallbackElement||null)));let E=i.concat(g.slice(0,C+1)),U=()=>{let B;return R?B=O:_?B=b:x.route.Component?B=j.createElement(x.route.Component,null):x.route.element?B=x.route.element:B=y,j.createElement(T2,{match:x,routeContext:{outlet:y,matches:E,isDataRoute:s!=null},children:B})};return s&&(x.route.ErrorBoundary||x.route.errorElement||C===0)?j.createElement(N2,{location:s.location,revalidation:s.revalidation,component:O,error:R,children:U(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):U()},null)}var n0=(function(l){return l.UseBlocker="useBlocker",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l})(n0||{}),l0=(function(l){return l.UseBlocker="useBlocker",l.UseLoaderData="useLoaderData",l.UseActionData="useActionData",l.UseRouteError="useRouteError",l.UseNavigation="useNavigation",l.UseRouteLoaderData="useRouteLoaderData",l.UseMatches="useMatches",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l.UseRouteId="useRouteId",l})(l0||{});function j2(l){let i=j.useContext(Jd);return i||st(!1),i}function A2(l){let i=j.useContext(S2);return i||st(!1),i}function O2(l){let i=j.useContext(ea);return i||st(!1),i}function a0(l){let i=O2(),s=i.matches[i.matches.length-1];return s.route.id||st(!1),s.route.id}function z2(){var l;let i=j.useContext(Wy),s=A2(),u=a0();return i!==void 0?i:(l=s.errors)==null?void 0:l[u]}function D2(){let{router:l}=j2(n0.UseNavigateStable),i=a0(l0.UseNavigateStable),s=j.useRef(!1);return e0(()=>{s.current=!0}),j.useCallback(function(c,f){f===void 0&&(f={}),s.current&&(typeof c=="number"?l.navigate(c):l.navigate(c,iu({fromRouteId:i},f)))},[l,i])}const Wv={};function U2(l,i,s){Wv[l]||(Wv[l]=!0)}function H2(l,i){l==null||l.v7_startTransition,l==null||l.v7_relativeSplatPath}function Rd(l){st(!1)}function L2(l){let{basename:i="/",children:s=null,location:u,navigationType:c=Zl.Pop,navigator:f,static:g=!1,future:m}=l;hu()&&st(!1);let v=i.replace(/^\/*/,"/"),S=j.useMemo(()=>({basename:v,navigator:f,static:g,future:iu({v7_relativeSplatPath:!1},m)}),[v,m,f,g]);typeof u=="string"&&(u=Wi(u));let{pathname:y="/",search:x="",hash:C="",state:R=null,key:_="default"}=u,O=j.useMemo(()=>{let b=Id(y,v);return b==null?null:{location:{pathname:b,search:x,hash:C,state:R,key:_},navigationType:c}},[v,y,x,C,R,_,c]);return O==null?null:j.createElement(Ga.Provider,{value:S},j.createElement(ar.Provider,{children:s,value:O}))}function V2(l){let{children:i,location:s}=l;return E2(_d(i),s)}new Promise(()=>{});function _d(l,i){i===void 0&&(i=[]);let s=[];return j.Children.forEach(l,(u,c)=>{if(!j.isValidElement(u))return;let f=[...i,c];if(u.type===j.Fragment){s.push.apply(s,_d(u.props.children,f));return}u.type!==Rd&&st(!1),!u.props.index||!u.props.children||st(!1);let g={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,loader:u.props.loader,action:u.props.action,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(g.children=_d(u.props.children,f)),s.push(g)}),s}/**
67
+ */function $r(){return $r=Object.assign?Object.assign.bind():function(n){for(var s=1;s<arguments.length;s++){var i=arguments[s];for(var r in i)({}).hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},$r.apply(null,arguments)}const em=E.createContext(null),_w=E.createContext(null),Bu=E.createContext(null),ku=E.createContext(null),hs=E.createContext({outlet:null,matches:[],isDataRoute:!1}),x1=E.createContext(null);function Xr(){return E.useContext(ku)!=null}function Gu(){return Xr()||wt(!1),E.useContext(ku).location}function Mw(n){Xr()||wt(!1);let{pathname:s}=Gu();return E.useMemo(()=>m1(n,g1(s)),[s,n])}function S1(n){E.useContext(Bu).static||E.useLayoutEffect(n)}function tm(){let{isDataRoute:n}=E.useContext(hs);return n?kw():Rw()}function Rw(){Xr()||wt(!1);let n=E.useContext(em),{basename:s,future:i,navigator:r}=E.useContext(Bu),{matches:u}=E.useContext(hs),{pathname:d}=Gu(),h=JSON.stringify(Sw(u,i.v7_relativeSplatPath)),m=E.useRef(!1);return S1(()=>{m.current=!0}),E.useCallback(function(y,x){if(x===void 0&&(x={}),!m.current)return;if(typeof y=="number"){r.go(y);return}let v=bw(y,JSON.parse(h),d,x.relative==="path");n==null&&s!=="/"&&(v.pathname=v.pathname==="/"?s:fs([s,v.pathname])),(x.replace?r.replace:r.push)(v,x.state,x)},[s,r,h,d,n])}function Tw(){let{matches:n}=E.useContext(hs),s=n[n.length-1];return s?s.params:{}}function Aw(n,s){return Ow(n,s)}function Ow(n,s,i,r){Xr()||wt(!1);let{navigator:u}=E.useContext(Bu),{matches:d}=E.useContext(hs),h=d[d.length-1],m=h?h.params:{};h&&h.pathname;let p=h?h.pathnameBase:"/";h&&h.route;let y=Gu(),x;if(s){var v;let M=typeof s=="string"?_i(s):s;p==="/"||(v=M.pathname)!=null&&v.startsWith(p)||wt(!1),x=M}else x=y;let b=x.pathname||"/",w=b;if(p!=="/"){let M=p.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(M.length).join("/")}let C=sw(n,{pathname:w}),N=Uw(C&&C.map(M=>Object.assign({},M,{params:Object.assign({},m,M.params),pathname:fs([p,u.encodeLocation?u.encodeLocation(M.pathname).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?p:fs([p,u.encodeLocation?u.encodeLocation(M.pathnameBase).pathname:M.pathnameBase])})),d,i,r);return s&&N?E.createElement(ku.Provider,{value:{location:$r({pathname:"/",search:"",hash:"",state:null,key:"default"},x),navigationType:xa.Pop}},N):N}function zw(){let n=Bw(),s=Ew(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,u={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},s),i?E.createElement("pre",{style:u},i):null,null)}const Dw=E.createElement(zw,null);class Hw extends E.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,i){return i.location!==s.location||i.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:i.error,location:i.location,revalidation:s.revalidation||i.revalidation}}componentDidCatch(s,i){console.error("React Router caught the following error during render",s,i)}render(){return this.state.error!==void 0?E.createElement(hs.Provider,{value:this.props.routeContext},E.createElement(x1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Lw(n){let{routeContext:s,match:i,children:r}=n,u=E.useContext(em);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),E.createElement(hs.Provider,{value:s},r)}function Uw(n,s,i,r){var u;if(s===void 0&&(s=[]),i===void 0&&(i=null),r===void 0&&(r=null),n==null){var d;if(!i)return null;if(i.errors)n=i.matches;else if((d=r)!=null&&d.v7_partialHydration&&s.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let h=n,m=(u=i)==null?void 0:u.errors;if(m!=null){let x=h.findIndex(v=>v.route.id&&(m==null?void 0:m[v.route.id])!==void 0);x>=0||wt(!1),h=h.slice(0,Math.min(h.length,x+1))}let p=!1,y=-1;if(i&&r&&r.v7_partialHydration)for(let x=0;x<h.length;x++){let v=h[x];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(y=x),v.route.id){let{loaderData:b,errors:w}=i,C=v.route.loader&&b[v.route.id]===void 0&&(!w||w[v.route.id]===void 0);if(v.route.lazy||C){p=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}return h.reduceRight((x,v,b)=>{let w,C=!1,N=null,M=null;i&&(w=m&&v.route.id?m[v.route.id]:void 0,N=v.route.errorElement||Dw,p&&(y<0&&b===0?(Gw("route-fallback"),C=!0,M=null):y===b&&(C=!0,M=v.route.hydrateFallbackElement||null)));let R=s.concat(h.slice(0,b+1)),j=()=>{let F;return w?F=N:C?F=M:v.route.Component?F=E.createElement(v.route.Component,null):v.route.element?F=v.route.element:F=x,E.createElement(Lw,{match:v,routeContext:{outlet:x,matches:R,isDataRoute:i!=null},children:F})};return i&&(v.route.ErrorBoundary||v.route.errorElement||b===0)?E.createElement(Hw,{location:i.location,revalidation:i.revalidation,component:N,error:w,children:j(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):j()},null)}var b1=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(b1||{}),w1=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(w1||{});function Vw(n){let s=E.useContext(em);return s||wt(!1),s}function $w(n){let s=E.useContext(_w);return s||wt(!1),s}function Fw(n){let s=E.useContext(hs);return s||wt(!1),s}function C1(n){let s=Fw(),i=s.matches[s.matches.length-1];return i.route.id||wt(!1),i.route.id}function Bw(){var n;let s=E.useContext(x1),i=$w(),r=C1();return s!==void 0?s:(n=i.errors)==null?void 0:n[r]}function kw(){let{router:n}=Vw(b1.UseNavigateStable),s=C1(w1.UseNavigateStable),i=E.useRef(!1);return S1(()=>{i.current=!0}),E.useCallback(function(u,d){d===void 0&&(d={}),i.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,$r({fromRouteId:s},d)))},[n,s])}const ty={};function Gw(n,s,i){ty[n]||(ty[n]=!0)}function qw(n,s){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function _h(n){wt(!1)}function Qw(n){let{basename:s="/",children:i=null,location:r,navigationType:u=xa.Pop,navigator:d,static:h=!1,future:m}=n;Xr()&&wt(!1);let p=s.replace(/^\/*/,"/"),y=E.useMemo(()=>({basename:p,navigator:d,static:h,future:$r({v7_relativeSplatPath:!1},m)}),[p,m,d,h]);typeof r=="string"&&(r=_i(r));let{pathname:x="/",search:v="",hash:b="",state:w=null,key:C="default"}=r,N=E.useMemo(()=>{let M=p1(x,p);return M==null?null:{location:{pathname:M,search:v,hash:b,state:w,key:C},navigationType:u}},[p,x,v,b,w,C,u]);return N==null?null:E.createElement(Bu.Provider,{value:y},E.createElement(ku.Provider,{children:i,value:N}))}function Yw(n){let{children:s,location:i}=n;return Aw(Mh(s),i)}new Promise(()=>{});function Mh(n,s){s===void 0&&(s=[]);let i=[];return E.Children.forEach(n,(r,u)=>{if(!E.isValidElement(r))return;let d=[...s,u];if(r.type===E.Fragment){i.push.apply(i,Mh(r.props.children,d));return}r.type!==_h&&wt(!1),!r.props.index||!r.props.children||wt(!1);let h={id:r.props.id||d.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(h.children=Mh(r.props.children,d)),i.push(h)}),i}/**
68
68
  * React Router DOM v6.30.6
69
69
  *
70
70
  * Copyright (c) Remix Software Inc.
@@ -73,12 +73,12 @@ Error generating stack: `+a.message+`
73
73
  * LICENSE.md file in the root directory of this source tree.
74
74
  *
75
75
  * @license MIT
76
- */function Nd(){return Nd=Object.assign?Object.assign.bind():function(l){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var u in s)({}).hasOwnProperty.call(s,u)&&(l[u]=s[u])}return l},Nd.apply(null,arguments)}function B2(l,i){if(l==null)return{};var s={};for(var u in l)if({}.hasOwnProperty.call(l,u)){if(i.indexOf(u)!==-1)continue;s[u]=l[u]}return s}function G2(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function q2(l,i){return l.button===0&&(!i||i==="_self")&&!G2(l)}function Td(l){return l===void 0&&(l=""),new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((i,s)=>{let u=l[s];return i.concat(Array.isArray(u)?u.map(c=>[s,c]):[[s,u]])},[]))}function F2(l,i){let s=Td(l);return i&&i.forEach((u,c)=>{s.has(c)||i.getAll(c).forEach(f=>{s.append(c,f)})}),s}const $2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],k2="6";try{window.__reactRouterVersion=k2}catch{}const Q2="startTransition",ey=nb[Q2];function Y2(l){let{basename:i,children:s,future:u,window:c}=l,f=j.useRef();f.current==null&&(f.current=Zb({window:c,v5Compat:!0}));let g=f.current,[m,v]=j.useState({action:g.action,location:g.location}),{v7_startTransition:S}=u||{},y=j.useCallback(x=>{S&&ey?ey(()=>v(x)):v(x)},[v,S]);return j.useLayoutEffect(()=>g.listen(y),[g,y]),j.useEffect(()=>H2(u),[u]),j.createElement(L2,{basename:i,children:s,location:m.location,navigationType:m.action,navigator:g,future:u})}const X2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Z2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,K2=j.forwardRef(function(i,s){let{onClick:u,relative:c,reloadDocument:f,replace:g,state:m,target:v,to:S,preventScrollReset:y,viewTransition:x}=i,C=B2(i,$2),{basename:R}=j.useContext(Ga),_,O=!1;if(typeof S=="string"&&Z2.test(S)&&(_=S,X2))try{let B=new URL(window.location.href),$=S.startsWith("//")?new URL(B.protocol+S):new URL(S),F=Id($.pathname,R);$.origin===B.origin&&F!=null?S=F+$.search+$.hash:O=!0}catch{}let b=x2(S,{relative:c}),E=I2(S,{replace:g,state:m,target:v,preventScrollReset:y,relative:c,viewTransition:x});function U(B){u&&u(B),B.defaultPrevented||E(B)}return j.createElement("a",Nd({},C,{href:_||b,onClick:O||f?u:U,ref:s,target:v}))});var ty;(function(l){l.UseScrollRestoration="useScrollRestoration",l.UseSubmit="useSubmit",l.UseSubmitFetcher="useSubmitFetcher",l.UseFetcher="useFetcher",l.useViewTransitionState="useViewTransitionState"})(ty||(ty={}));var ny;(function(l){l.UseFetcher="useFetcher",l.UseFetchers="useFetchers",l.UseScrollRestoration="useScrollRestoration"})(ny||(ny={}));function I2(l,i){let{target:s,replace:u,state:c,preventScrollReset:f,relative:g,viewTransition:m}=i===void 0?{}:i,v=ir(),S=gu(),y=t0(l,{relative:g});return j.useCallback(x=>{if(q2(x,s)){x.preventDefault();let C=u!==void 0?u:Po(S)===Po(y);v(l,{replace:C,state:c,preventScrollReset:f,relative:g,viewTransition:m})}},[S,v,y,u,c,s,l,f,g,m])}function J2(l){let i=j.useRef(Td(l)),s=j.useRef(!1),u=gu(),c=j.useMemo(()=>F2(u.search,s.current?null:i.current),[u.search]),f=ir(),g=j.useCallback((m,v)=>{const S=Td(typeof m=="function"?m(c):m);s.current=!0,f("?"+S,v)},[f,c]);return[c,g]}function P2(l){const i=l.replace(/^\/+/,"").replace(/\/+$/,"");return i?`/${i}`:""}const Ut=typeof window>"u"?void 0:window.$isabl,Qn={apiHost:((Ut==null?void 0:Ut.apiHost)??"").replace(/\/$/,""),basePath:P2((Ut==null?void 0:Ut.basePath)??"/wgts"),theme:(Ut==null?void 0:Ut.theme)==="sand"?"th-sand":(Ut==null?void 0:Ut.theme)==="msk"?"th-msk":"th-clean",isablUiUrl:((Ut==null?void 0:Ut.isablUiUrl)??"/beta").replace(/\/+$/,"")};function i0(l){return`${Qn.isablUiUrl}/explorer?r=analyses:${l}`}const Md="user-token";/**
76
+ */function Rh(n){return n===void 0&&(n=""),new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((s,i)=>{let r=n[i];return s.concat(Array.isArray(r)?r.map(u=>[i,u]):[[i,r]])},[]))}function Iw(n,s){let i=Rh(n);return s&&s.forEach((r,u)=>{i.has(u)||s.getAll(u).forEach(d=>{i.append(u,d)})}),i}const Xw="6";try{window.__reactRouterVersion=Xw}catch{}const Kw="startTransition",ny=c2[Kw];function Zw(n){let{basename:s,children:i,future:r,window:u}=n,d=E.useRef();d.current==null&&(d.current=nw({window:u,v5Compat:!0}));let h=d.current,[m,p]=E.useState({action:h.action,location:h.location}),{v7_startTransition:y}=r||{},x=E.useCallback(v=>{y&&ny?ny(()=>p(v)):p(v)},[p,y]);return E.useLayoutEffect(()=>h.listen(x),[h,x]),E.useEffect(()=>qw(r),[r]),E.createElement(Qw,{basename:s,children:i,location:m.location,navigationType:m.action,navigator:h,future:r})}var ly;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(ly||(ly={}));var ay;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(ay||(ay={}));function Pw(n){let s=E.useRef(Rh(n)),i=E.useRef(!1),r=Gu(),u=E.useMemo(()=>Iw(r.search,i.current?null:s.current),[r.search]),d=tm(),h=E.useCallback((m,p)=>{const y=Rh(typeof m=="function"?m(u):m);i.current=!0,d("?"+y,p)},[d,u]);return[u,h]}function Jw(n){const s=n.replace(/^\/+/,"").replace(/\/+$/,"");return s?`/${s}`:""}const Wt=typeof window>"u"?void 0:window.$isabl,Gn={apiHost:((Wt==null?void 0:Wt.apiHost)??"").replace(/\/$/,""),basePath:Jw((Wt==null?void 0:Wt.basePath)??"/wgts"),theme:(Wt==null?void 0:Wt.theme)==="sand"?"th-sand":(Wt==null?void 0:Wt.theme)==="msk"?"th-msk":"th-clean",isablUiUrl:((Wt==null?void 0:Wt.isablUiUrl)??"/beta").replace(/\/+$/,"")};function j1(n){return`${Gn.isablUiUrl}/explorer?r=analyses:${n}`}const Th="user-token";/**
77
77
  * @license lucide-react v0.468.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const W2=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s0=(...l)=>l.filter((i,s,u)=>!!i&&i.trim()!==""&&u.indexOf(i)===s).join(" ").trim();/**
81
+ */const Ww=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),E1=(...n)=>n.filter((s,i,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===i).join(" ").trim();/**
82
82
  * @license lucide-react v0.468.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
@@ -88,169 +88,183 @@ Error generating stack: `+a.message+`
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const tC=j.forwardRef(({color:l="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:u,className:c="",children:f,iconNode:g,...m},v)=>j.createElement("svg",{ref:v,...eC,width:i,height:i,stroke:l,strokeWidth:u?Number(s)*24/Number(i):s,className:s0("lucide",c),...m},[...g.map(([S,y])=>j.createElement(S,y)),...Array.isArray(f)?f:[f]]));/**
91
+ */const tC=E.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:u="",children:d,iconNode:h,...m},p)=>E.createElement("svg",{ref:p,...eC,width:s,height:s,stroke:n,strokeWidth:r?Number(i)*24/Number(s):i,className:E1("lucide",u),...m},[...h.map(([y,x])=>E.createElement(y,x)),...Array.isArray(d)?d:[d]]));/**
92
92
  * @license lucide-react v0.468.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const De=(l,i)=>{const s=j.forwardRef(({className:u,...c},f)=>j.createElement(tC,{ref:f,iconNode:i,className:s0(`lucide-${W2(l)}`,u),...c}));return s.displayName=`${l}`,s};/**
96
+ */const Ue=(n,s)=>{const i=E.forwardRef(({className:r,...u},d)=>E.createElement(tC,{ref:d,iconNode:s,className:E1(`lucide-${Ww(n)}`,r),...u}));return i.displayName=`${n}`,i};/**
97
97
  * @license lucide-react v0.468.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const nC=De("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
101
+ */const nC=Ue("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
102
102
  * @license lucide-react v0.468.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const Wo=De("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
106
+ */const zu=Ue("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
107
107
  * @license lucide-react v0.468.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const lC=De("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
111
+ */const lC=Ue("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
112
112
  * @license lucide-react v0.468.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const u0=De("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
116
+ */const N1=Ue("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
117
117
  * @license lucide-react v0.468.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const aC=De("AudioWaveform",[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]]);/**
121
+ */const aC=Ue("AudioWaveform",[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]]);/**
122
122
  * @license lucide-react v0.468.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const iC=De("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
126
+ */const sC=Ue("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
127
127
  * @license lucide-react v0.468.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const sC=De("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
131
+ */const _1=Ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
132
132
  * @license lucide-react v0.468.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
- */const o0=De("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
136
+ */const M1=Ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
137
137
  * @license lucide-react v0.468.0 - ISC
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const mu=De("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
141
+ */const nm=Ue("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
142
142
  * @license lucide-react v0.468.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const uC=De("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
146
+ */const iC=Ue("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
147
147
  * @license lucide-react v0.468.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const oC=De("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
151
+ */const rC=Ue("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
152
152
  * @license lucide-react v0.468.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
155
155
  * See the LICENSE file in the root directory of this source tree.
156
- */const rC=De("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
156
+ */const oC=Ue("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
157
157
  * @license lucide-react v0.468.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
- */const r0=De("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
161
+ */const R1=Ue("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
162
162
  * @license lucide-react v0.468.0 - ISC
163
163
  *
164
164
  * This source code is licensed under the ISC license.
165
165
  * See the LICENSE file in the root directory of this source tree.
166
- */const cC=De("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
166
+ */const Ah=Ue("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
167
167
  * @license lucide-react v0.468.0 - ISC
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const jd=De("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
171
+ */const qu=Ue("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/**
172
172
  * @license lucide-react v0.468.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const sr=De("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/**
176
+ */const T1=Ue("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);/**
177
177
  * @license lucide-react v0.468.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const fC=De("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
181
+ */const uC=Ue("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
182
182
  * @license lucide-react v0.468.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
- */const c0=De("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);/**
186
+ */const cC=Ue("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
187
187
  * @license lucide-react v0.468.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const dC=De("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
191
+ */const fC=Ue("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
192
192
  * @license lucide-react v0.468.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const hC=De("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
196
+ */const dC=Ue("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
197
197
  * @license lucide-react v0.468.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const gC=De("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
201
+ */const hC=Ue("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
202
202
  * @license lucide-react v0.468.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const mC=De("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
206
+ */const mC=Ue("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);/**
207
207
  * @license lucide-react v0.468.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
- */const pC=De("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);/**
211
+ */const gC=Ue("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
212
212
  * @license lucide-react v0.468.0 - ISC
213
213
  *
214
214
  * This source code is licensed under the ISC license.
215
215
  * See the LICENSE file in the root directory of this source tree.
216
- */const ur=De("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
216
+ */const pC=Ue("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
217
217
  * @license lucide-react v0.468.0 - ISC
218
218
  *
219
219
  * This source code is licensed under the ISC license.
220
220
  * See the LICENSE file in the root directory of this source tree.
221
- */const vC=De("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
221
+ */const vC=Ue("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
222
222
  * @license lucide-react v0.468.0 - ISC
223
223
  *
224
224
  * This source code is licensed under the ISC license.
225
225
  * See the LICENSE file in the root directory of this source tree.
226
- */const yC=De("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);/**
226
+ */const Du=Ue("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
227
227
  * @license lucide-react v0.468.0 - ISC
228
228
  *
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
- */const f0=De("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
231
+ */const yC=Ue("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
232
232
  * @license lucide-react v0.468.0 - ISC
233
233
  *
234
234
  * This source code is licensed under the ISC license.
235
235
  * See the LICENSE file in the root directory of this source tree.
236
- */const d0=De("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
236
+ */const xC=Ue("Shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]);/**
237
237
  * @license lucide-react v0.468.0 - ISC
238
238
  *
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
- */const SC=De("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/**
241
+ */const A1=Ue("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
242
242
  * @license lucide-react v0.468.0 - ISC
243
243
  *
244
244
  * This source code is licensed under the ISC license.
245
245
  * See the LICENSE file in the root directory of this source tree.
246
- */const Pd=De("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
246
+ */const SC=Ue("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
247
247
  * @license lucide-react v0.468.0 - ISC
248
248
  *
249
249
  * This source code is licensed under the ISC license.
250
250
  * See the LICENSE file in the root directory of this source tree.
251
- */const xC=De("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function bC(l){if(l.value===null)return l.text??"";switch(l.key){case"coverage":return`${Math.round(l.value)}×`;case"tmb":return l.value<.01?l.value.toPrecision(2):l.value.toFixed(2);default:return l.value.toFixed(2)}}function CC(l){return l.status==="failed"?"Failed":l.status==="skipped"?"Not in this mode":"Not run"}const EC=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function wC(l){if(!l)return"";const i=new Date(l);return Number.isNaN(i.getTime())?"":EC.format(i)}function Wd(l,i){return l.startsWith(`${i}_`)?l.slice(i.length+1):l}function Ad(l){return l==null?"–":l.toFixed(2)}const ly={missense_variant:"Missense",stop_gained:"Nonsense",stop_lost:"Stop lost",start_lost:"Start lost",frameshift_variant:"Frameshift",inframe_deletion:"In-frame deletion",inframe_insertion:"In-frame insertion",splice_acceptor_variant:"Splice acceptor",splice_donor_variant:"Splice donor",splice_region_variant:"Splice region",synonymous_variant:"Synonymous",intron_variant:"Intronic",upstream_gene_variant:"Upstream",downstream_gene_variant:"Downstream","5_prime_UTR_variant":"5′ UTR","3_prime_UTR_variant":"3′ UTR"};function RC(l,i){const s=(l??i??"").split("&")[0];if(!s)return"–";if(ly[s])return ly[s];const u=s.replace(/_/g," ");return u.charAt(0).toUpperCase()+u.slice(1)}function su(l,i){return`chr${l}:${i.toLocaleString("en-US")}`}const kn=[["1",249250621],["2",243199373],["3",198022430],["4",191154276],["5",180915260],["6",171115067],["7",159138663],["8",146364022],["9",141213431],["10",135534747],["11",135006516],["12",133851895],["13",115169878],["14",107349540],["15",102531392],["16",90354753],["17",81195210],["18",78077248],["19",59128983],["20",63025520],["21",48129895],["22",51304566],["X",155270560]],Od=.0025,_C=kn.reduce((l,[,i])=>l+i,0),NC=1-Od*kn.length,or=(()=>{const l={};let i=Od/2;for(const[s,u]of kn){const c=u/_C*NC;l[s]=[i,i+c],i+=c+Od}return l})(),ay=Object.fromEntries(kn);function er(l,i){const s=l.replace(/^chr/,""),u=or[s];if(!u)return null;const c=Math.min(Math.max(i,0),ay[s]);return u[0]+c/ay[s]*(u[1]-u[0])}function iy(l,i,s,u){const c=u*2*Math.PI-Math.PI/2;return[l+s*Math.cos(c),i+s*Math.sin(c)]}function ed(l,i,s,u,c){const[f,g]=iy(l,i,s,u),[m,v]=iy(l,i,s,c),S=c-u>.5?1:0;return`M${f.toFixed(2)},${g.toFixed(2)} A${s},${s} 0 ${S} 1 ${m.toFixed(2)},${v.toFixed(2)}`}function sy(l,i="start"){let s=null;for(const f of kn){const[g,m]=f,[v,S]=or[g];if(l<v&&i==="end"&&s)return{chrom:s[0],pos:s[1]};if(l<=S)return{chrom:g,pos:Math.round(Math.max(0,(l-v)/(S-v))*m)};s=f}const[u,c]=kn[kn.length-1];return{chrom:u,pos:c}}function tu(l,i){const s=i>=1e6?0:i>=1e5?1:2;return`${(l/1e6).toFixed(s)} Mb`}const TC={hero:{box:220,ring:78,ringW:10,gain:93,gainW:7,amp:94,ampW:13,loss:63,lossW:7,drv:50,drvW:9},switcher:{box:48,ring:16,ringW:4.5,gain:21,gainW:3,amp:21,ampW:4.5,loss:11,lossW:3,drv:0,drvW:0},mini:{box:20,ring:7,ringW:2.6,gain:7,gainW:2.6,amp:7,ampW:2.6,loss:7,lossW:2.6,drv:0,drvW:0}},uy=.004,oy=.003;function MC(l,i,s){const u=er(l,i),c=er(l,s);return u===null||c===null?null:c-u<uy?[u,u+uy]:[u,c]}function td(l){return l.length<=1?l[0]??"":`${l.slice(0,-1).join(", ")} and ${l[l.length-1]}`}function jC(l,i,s){return l===1?`one ${i}`:`${l} ${s}`}function h0(l){const s=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([g,m,v])=>{const S=l.events.filter(_=>_.kind===g);if(S.length===0)return[];const y=[...new Set(S.map(_=>_.chrom))],x=y.length>6?[...y.slice(0,6),`${y.length-6} more`]:y,C=y.length===1?`chromosome ${y[0]}`:`chromosomes ${td(x)}`,R=g==="amp"&&S.length===1&&S[0].total_cn!==null?` (${Math.round(S[0].total_cn)} copies)`:"";return[`${jC(S.length,m,v)} on ${C}${R}`]}),u=s.length?td(s):`no copy-number changes against ${l.baseline} copies`,c=[...new Set(l.drivers.map(g=>g.gene).filter(g=>!!g))].sort(),f=c.length?`Drivers in ${td(c)}.`:"No drivers.";return`${u.charAt(0).toUpperCase()}${u.slice(1)}. ${f}`}function rr({fingerprint:l,size:i,title:s,subtitle:u,className:c}){const f=TC[i],g=f.box/2,m=(l==null?void 0:l.events)??[],v=(l==null?void 0:l.drivers)??[],S=l?`Genome fingerprint: ${h0(l)}`:"No copy-number data";return d.jsxs("svg",{viewBox:`0 0 ${f.box} ${f.box}`,role:i==="mini"?void 0:"img","aria-label":i==="mini"?void 0:S,"aria-hidden":i==="mini"?!0:void 0,className:c,children:[d.jsxs("g",{fill:"none",strokeLinecap:"butt",children:[Object.entries(or).map(([y,[x,C]])=>d.jsx("path",{className:"r-neu",strokeWidth:f.ringW,d:ed(g,g,f.ring,x,C)},y)),m.map((y,x)=>{const C=MC(y.chrom,y.start,y.end);if(!C)return null;const R=y.kind==="loss"?f.loss:y.kind==="amp"?f.amp:f.gain,_=y.kind==="loss"?f.lossW:y.kind==="amp"?f.ampW:f.gainW;return d.jsx("path",{className:`r-${y.kind}`,strokeWidth:_,d:ed(g,g,R,C[0],C[1])},`${y.chrom}-${y.start}-${x}`)}),f.drvW>0&&v.map((y,x)=>{const C=er(y.chrom,y.pos);return C===null?null:d.jsx("path",{className:"r-drv",strokeWidth:f.drvW,d:ed(g,g,f.drv,C-oy/2,C+oy/2)},`${y.gene}-${y.pos}-${x}`)})]}),i==="hero"&&s&&d.jsxs(d.Fragment,{children:[d.jsx("text",{className:"t-ink",x:g,y:g-2,textAnchor:"middle",fontSize:"24",fontWeight:"800",children:s}),u&&d.jsx("text",{className:"t-faint",x:g,y:g+18,textAnchor:"middle",fontSize:"12",fontWeight:"600",children:u})]})]})}const AC={"DNA|WG":{label:"WGS",icon:sr},"RNA|WT":{label:"RNA",icon:aC}};function ry({children:l}){return d.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l})}function OC({sex:l}){const i=l==null?void 0:l.toUpperCase();return i==="MALE"?d.jsxs(ry,{children:[d.jsx("circle",{cx:"12",cy:"9",r:"4.5"}),d.jsx("path",{d:"M7.6 8.2c.5-2.9 2.4-4.7 4.6-4.7 2.6 0 4.4 1.7 4.4 4.3-2.2.1-4.2-.6-5.6-2.1"}),d.jsx("path",{d:"M3.5 21a8.5 7.5 0 0 1 17 0"}),d.jsx("path",{d:"m10 15.6 2 2.2 2-2.2"})]}):i==="FEMALE"?d.jsxs(ry,{children:[d.jsx("circle",{cx:"12",cy:"9.2",r:"3.4"}),d.jsx("path",{d:"M6.3 14.2C4.6 9 6.6 2.8 12 2.8s7.4 6.2 5.7 11.4"}),d.jsx("path",{d:"M5 21.2a7 6.3 0 0 1 14 0"})]}):d.jsx(d0,{size:16,"aria-hidden":!0})}const g0="wgts-patient-root";function zC(l,i){const s=l.getBoundingClientRect(),u=l.closest(".topbar"),c=u==null?void 0:u.parentElement,f=u&&c?c.getBoundingClientRect().top-u.getBoundingClientRect().top:0;return{x:s.left-i.left+s.width/2,y:s.top+f-i.top+s.height/2}}const m0=8;function nd(l,i,s,u){const c=s>=l.x?1:-1,f=Math.min(m0,Math.abs(s-l.x)/2,(i-l.y-14)/2);return[`M${l.x},${l.y+14}`,`V${i-f}`,`Q${l.x},${i} ${l.x+c*f},${i}`,`H${s-c*f}`,`Q${s},${i} ${s},${i+f}`,`V${u}`].join(" ")}function DC(l,i,s){const u=s.x>i.x?1:-1,c=Math.min(m0,Math.abs(s.x-i.x)/2,(i.top-l)/2);return[`M${i.x},${i.top}`,`V${l+c}`,`Q${i.x},${l} ${i.x+u*c},${l}`,`H${s.x-u*c}`,`Q${s.x},${l} ${s.x},${l+c}`,`V${s.top}`].join(" ")}function UC(l,i,s){const u=i.left+i.width/2,c=s.left+s.width/2,f=l-7,m=(l-31-.25*f)/.75;return`M${u},${f} C${u},${m} ${c},${m} ${c},${f}`}function HC(l,i){var u,c;const s=l.samples.find(f=>f.id===i);for(const f of(s==null?void 0:s.experiments)??[]){const g=(u=l.experiments[f])==null?void 0:u.normal,m=g?(c=l.experiments[g])==null?void 0:c.sample:void 0;if(m&&m!==i)return m}return null}function LC({data:l,sampleId:i,fingerprint:s,onSample:u}){const c=j.useRef(null),[f,g]=j.useState(null),[m,v]=j.useState(!1);j.useEffect(()=>{if(!f||m)return;const E=requestAnimationFrame(()=>v(!0));return()=>cancelAnimationFrame(E)},[f,m]);const S=new Set(l.failures.map(E=>E.sample)),y=j.useRef(i),[x,C]=j.useState(null);j.useEffect(()=>{if(y.current===i)return;const E=y.current;y.current=i,C(U=>({from:E,to:i,n:((U==null?void 0:U.n)??0)+1}))},[i]);const R=HC(l,i);j.useLayoutEffect(()=>{const E=c.current;if(!E)return;const U=()=>{const $=E.getBoundingClientRect(),F=document.getElementById(g0);if(!F)return;const P=Array.from(E.querySelectorAll("[data-sample]")).map(de=>{const ve=de.getBoundingClientRect();return{id:de.dataset.sample,x:ve.left-$.left+22,left:ve.left-$.left,width:ve.width,top:ve.top-$.top,bottom:ve.bottom-$.top}}),X=zC(F,$),Z=Math.min(...P.map(de=>de.top));g({root:X,trunk:Z-12,tabs:P})};if(U(),typeof ResizeObserver>"u")return;const B=new ResizeObserver(U);return B.observe(E),()=>B.disconnect()},[l,i]);const _=f==null?void 0:f.tabs.find(E=>E.id===i),O=R?f==null?void 0:f.tabs.find(E=>E.id===R):void 0,b=x?f==null?void 0:f.tabs.find(E=>E.id===x.from):void 0;return d.jsxs("div",{ref:c,className:"ltabs",children:[f&&d.jsxs("svg",{className:"ltabs-links","aria-hidden":!0,children:[f.tabs.map(E=>d.jsx("path",{d:nd(f.root,f.trunk,E.x,E.top)},E.id)),_&&d.jsxs(d.Fragment,{children:[d.jsx("path",{className:"ltabs-haze","data-moving":m,style:{d:`path("${nd(f.root,f.trunk,_.x,_.top)}")`}}),d.jsx("path",{className:"ltabs-on","data-moving":m,style:{d:`path("${nd(f.root,f.trunk,_.x,_.top)}")`}}),b&&x&&x.to===_.id&&d.jsx("path",{className:"ltabs-bead",pathLength:1,d:DC(f.trunk,b,_)},`bead-${x.n}`)]}),_&&O&&d.jsxs("g",{className:"ltabs-match",children:[d.jsx("path",{d:UC(f.trunk,_,O)}),d.jsx("text",{x:(_.left+_.width/2+O.left+O.width/2)/2,y:f.trunk-27,children:"matched normal"})]})]}),_&&d.jsx("span",{className:"ltabs-thumb","data-moving":m,"aria-hidden":!0,style:{width:_.width,height:_.bottom-_.top,transform:`translate(${_.left}px, ${_.top}px)`}}),d.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:l.samples.map(E=>{const U=E.id===i,B=s==null?void 0:s.samples.find(F=>F.sample===E.id),$=E.experiments.map(F=>({id:F,...l.experiments[F]})).filter(F=>F.technique);return d.jsxs("button",{type:"button",role:"tab","data-sample":E.id,"aria-selected":U,className:"ltab",onClick:()=>u(E.id),children:[d.jsxs("span",{className:"ltab-name",children:[E.category==="TUMOR"?d.jsx(rr,{fingerprint:B,size:"mini",className:"h-[18px] w-[18px] flex-none"}):d.jsx(c0,{size:15,"aria-hidden":!0,className:"flex-none"}),Wd(E.id,l.individual.id)," ",E.category==="TUMOR"?"tumour":"normal",S.has(E.id)&&d.jsx("span",{className:"ltab-warn",title:"A module failed for this sample","aria-label":"A module failed"})]}),d.jsxs("span",{className:"ltab-exps",children:[$.length===0&&d.jsx("span",{children:"No experiments"}),$.map(F=>{const P=AC[F.technique],X=(P==null?void 0:P.icon)??sr;return d.jsxs("span",{title:F.id,children:[d.jsx(X,{size:12,"aria-hidden":!0}),(P==null?void 0:P.label)??F.technique]},F.id)})]})]},E.id)})})]})}function VC({data:l,sampleId:i,fingerprint:s,onSample:u}){return d.jsx("div",{className:"ctabs",role:"tablist","aria-label":"Samples",children:l.samples.map(c=>{const f=s==null?void 0:s.samples.find(g=>g.sample===c.id);return d.jsxs("button",{type:"button",role:"tab","aria-selected":c.id===i,className:"ctab",onClick:()=>u(c.id),children:[c.category==="TUMOR"?d.jsx(rr,{fingerprint:f,size:"mini",className:"h-[16px] w-[16px] flex-none"}):d.jsx(c0,{size:14,"aria-hidden":!0,className:"flex-none"}),Wd(c.id,l.individual.id)," ",c.category==="TUMOR"?"tumour":"normal"]},c.id)})})}function p0({individualId:l,subtitle:i,patientIcon:s,compact:u,showCompact:c=!1}){const[f,g]=j.useState(!1),[m,v]=j.useState(!1);j.useEffect(()=>{const y=()=>v(window.scrollY>4);return y(),window.addEventListener("scroll",y,{passive:!0}),()=>window.removeEventListener("scroll",y)},[]);async function S(){try{await navigator.clipboard.writeText(window.location.href),g(!0),window.setTimeout(()=>g(!1),1600)}catch{window.prompt("Copy this link",window.location.href)}}return d.jsxs("div",{className:"topbar flex flex-wrap items-center justify-between gap-x-4 gap-y-3 px-8 pt-4 pb-3.5","data-scrolled":m,children:[d.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-2 text-[13.5px]",children:[d.jsx(K2,{to:"/",style:{color:"var(--muted)",textDecoration:"none"},children:"Patients"}),l&&d.jsxs(d.Fragment,{children:[d.jsx(mu,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),s&&d.jsx("span",{id:g0,className:"ltabs-icon",children:s}),d.jsx("h1",{className:"m-0 text-[20px] font-semibold tracking-tight",style:{color:"var(--ink)"},children:l}),i&&d.jsx("span",{className:"ml-1.5 truncate text-[13.5px]",style:{color:"var(--muted)"},children:i})]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs("div",{className:"field w-[300px] max-w-full",title:"Not available yet",children:[d.jsx(ur,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),d.jsx("label",{className:"sr-only",htmlFor:"search",children:"Search"}),d.jsx("input",{id:"search",placeholder:"Search genes, variants, analyses",disabled:!0})]}),d.jsx("button",{type:"button",className:"sc-btn sc-b2",disabled:!0,title:"Not available yet",children:"Compare versions"}),d.jsx("button",{type:"button",className:"sc-ib","aria-label":"Copy a link to this view",onClick:S,children:d.jsx(mC,{size:16,"aria-hidden":!0})}),d.jsx("button",{type:"button",className:"sc-ib","aria-label":"Export tables",disabled:!0,title:"Not available yet",children:d.jsx(fC,{size:16,"aria-hidden":!0})}),d.jsx("span",{"aria-live":"polite",className:"text-xs",style:{color:"var(--muted)"},children:f?"Link copied":""})]}),u&&d.jsx("div",{className:"topbar-compact","data-open":c,inert:!c,"aria-hidden":!c,children:d.jsx("div",{children:u})})]})}class cr extends Error{}class v0 extends Error{}function BC(){try{return localStorage.getItem(Md)}catch{return null}}function y0(l){try{l?localStorage.setItem(Md,l):localStorage.removeItem(Md)}catch{}}function S0(){const l=BC();return{Accept:"application/json",...l?{Authorization:`Token ${l}`}:{}}}async function qa(l,i={}){const s=new URLSearchParams;for(const[f,g]of Object.entries(i))g&&s.set(f,g);const u=s.toString(),c=await fetch(`${Qn.apiHost}/wgts/api/${l}${u?`?${u}`:""}`,{headers:S0()});if(c.status===401)throw new cr;if(c.status===403){const f=await c.json().catch(()=>({}));throw new v0(f.detail??"You may not see this patient's results.")}if(!c.ok)throw new Error(`The dashboard API answered ${c.status}.`);return await c.json()}async function GC(l){if(!(await fetch(`${Qn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${l}`}})).ok)throw new Error("Isabl did not accept that token.");y0(l)}async function qC(l,i){const s=await fetch(`${Qn.apiHost}/api/v1/rest-auth/login/`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({username:l,password:i})});if(!s.ok)throw new Error("Isabl did not accept that username and password.");const u=await s.json();y0(u.key)}async function FC(l){const i=new URLSearchParams(l?{q:l}:{}).toString(),s=await fetch(`${Qn.apiHost}/wgts/api/individuals/${i?`?${i}`:""}`,{headers:S0()});if(s.status===401)throw new cr;if(!s.ok)throw new Error(`The dashboard API answered ${s.status}.`);return(await s.json()).results}const x0={drivers:"gene",coding:"position",all:"position"},eh=[10,25,50,100];function cy(){return{scope:"drivers",page:1,pageSize:25,sort:x0.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function b0(l){return(l.q.trim()?1:0)+l.effects.length+l.flags.length+(l.range?1:0)}function $C(l){const i={scope:l.scope,page:String(l.page),page_size:String(l.pageSize),sort:l.sort,q:l.q.trim()||void 0,effects:l.effects.join(",")||void 0,flags:l.flags.join(",")||void 0,ffpe:l.ffpe?"all":void 0};return l.range&&(i[`${l.range.measure}_min`]=String(l.range.low),i[`${l.range.measure}_max`]=String(l.range.high)),i}const C0={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},E0={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function kC(l){return`${l.chrom}:${l.pos}:${l.ref}>${l.alt}`}const QC=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function YC(l){return QC.test(l.trim())}function XC(l,i,s){return`chr${l}:${i.toLocaleString("en-US")}-${s.toLocaleString("en-US")}`}const ZC={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function KC(l){var f;if(!l)return null;const i=l.split(";"),s=(f=l.match(/SOM=(\d+)/))==null?void 0:f[1],u=ZC[i[0]];return!s&&!u?l:[s?`${Number(s).toLocaleString("en-US")} somatic ${s==="1"?"sample":"samples"}`:"",u].filter(Boolean).join(", ")}function IC(l){const i=l==null?void 0:l.match(/^(\d+)\/(\d+)$/);return i?`${i[1]} of ${i[2]} ${i[2]==="1"?"copy":"copies"}`:l}function JC(l){return l.oncogene&&l.tsg?"Oncogene and TSG":l.oncogene?"Oncogene":l.tsg?"TSG":null}const ta=(l,i)=>!(i instanceof cr)&&l<2;function PC(l,i){return Wl({queryKey:["individual",l,i??null],queryFn:()=>qa(`individuals/${encodeURIComponent(l)}/`,{version:i}),retry:ta})}function WC(l,i,s){return Wl({queryKey:["metrics",l,i,s??null],queryFn:()=>qa(`individuals/${encodeURIComponent(l)}/metrics/`,{sample:i,version:s}),enabled:!!i,retry:ta})}function eE(l,i){return Wl({queryKey:["fingerprint",l,i??null],queryFn:()=>qa(`individuals/${encodeURIComponent(l)}/fingerprint/`,{version:i}),retry:ta})}const fr=(l,i)=>`individuals/${encodeURIComponent(l)}/${i}/`;function tE(l,i,s){return Wl({queryKey:["cn",l,i,s??null],queryFn:()=>qa(fr(l,"cn"),{sample:i,version:s}),enabled:!!i,retry:ta})}function nE(l,i,s,u,c){return Wl({queryKey:["ccf",l,i,s,u,c??null],queryFn:()=>qa(fr(l,"ccf"),{sample:i,measure:s,version:c,ffpe:u?"all":void 0}),enabled:!!i,retry:ta})}function lE(l,i,s){return Wl({queryKey:["svs",l,i,s??null],queryFn:()=>qa(fr(l,"svs"),{sample:i,version:s}),enabled:!!i,retry:ta})}function aE(l,i,s,u){return Wl({queryKey:["variants",l,i,s,u??null],queryFn:()=>qa(fr(l,"variants"),{sample:i,version:u,...$C(s)}),enabled:!!i,placeholderData:Vy,retry:ta})}function iE(l,i){return Wl({queryKey:["patients",l],queryFn:()=>FC(l),enabled:i,staleTime:6e4,placeholderData:Vy,retry:ta})}const w0="wgts-recent-patients",sE=6;function R0(){try{const l=JSON.parse(localStorage.getItem(w0)??"[]");return Array.isArray(l)?l.filter(i=>typeof i=="string"):[]}catch{return[]}}function uE(l){try{localStorage.setItem(w0,JSON.stringify([l,...R0().filter(i=>i!==l)].slice(0,sE)))}catch{}}const oE=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function _0({current:l}){const i=ir(),[s,u]=j.useState(""),[c,f]=j.useState(!1),[g,m]=j.useState(0),v=j.useRef(null),S=j.useId(),y=j.useDeferredValue(s.trim()),x=iE(y,c&&y.length>0);j.useEffect(()=>{const E=U=>{var B;U.key.toLowerCase()==="k"&&(U.metaKey||U.ctrlKey)&&(U.preventDefault(),(B=v.current)==null||B.focus())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[]);const C=y?(x.data??[]).map(E=>({id:E.individual,meta:E.individual===l?"On this page":`${E.samples} ${E.samples===1?"sample":"samples"}, report ${E.report_version}`})):R0().filter(E=>E!==l).map(E=>({id:E,meta:"Opened recently",recent:!0})),R=y&&C.length===0&&!x.isFetching?{id:y,meta:"No dashboard found; open anyway"}:null,_=R?[...C,R]:C,O=c&&(_.length>0||y&&x.isFetching),b=E=>{var U;u(""),f(!1),(U=v.current)==null||U.blur(),E!==l&&i(`/${encodeURIComponent(E)}`)};return d.jsxs("div",{className:"psearch","data-open":!!O,children:[d.jsxs("div",{className:"psearch-field",children:[d.jsx(ur,{size:15,"aria-hidden":!0}),d.jsx("input",{ref:v,role:"combobox","aria-expanded":!!O,"aria-controls":S,"aria-activedescendant":O&&_[g]?`${S}-${g}`:void 0,"aria-label":"Search patients",placeholder:"Search patients",value:s,onFocus:()=>f(!0),onBlur:()=>f(!1),onChange:E=>{u(E.target.value),m(0),f(!0)},onKeyDown:E=>{var U;E.key==="ArrowDown"?(E.preventDefault(),m(B=>Math.min(B+1,_.length-1))):E.key==="ArrowUp"?(E.preventDefault(),m(B=>Math.max(B-1,0))):E.key==="Enter"&&_[g]?(E.preventDefault(),b(_[g].id)):E.key==="Escape"&&(u(""),(U=v.current)==null||U.blur())}}),d.jsx("kbd",{className:"kbd","aria-hidden":!0,children:oE?"⌘K":"Ctrl K"})]}),O&&d.jsxs("ul",{id:S,role:"listbox",className:"psearch-list","aria-label":"Patients",children:[!y&&d.jsx("li",{className:"psearch-head",children:"Recent"}),_.map((E,U)=>d.jsxs("li",{id:`${S}-${U}`,role:"option","aria-selected":U===g,className:"psearch-option",onMouseDown:B=>B.preventDefault(),onMouseEnter:()=>m(U),onClick:()=>b(E.id),children:[E.recent?d.jsx(dC,{size:14,"aria-hidden":!0}):d.jsx(d0,{size:14,"aria-hidden":!0}),d.jsxs("span",{className:"flex min-w-0 flex-col",children:[d.jsx("span",{className:"truncate",children:E.id}),d.jsx("span",{className:"psearch-meta",children:E.meta})]}),U===g&&d.jsx(cC,{size:13,"aria-hidden":!0,className:"ml-auto flex-none opacity-50"})]},E.id)),y&&_.length===0&&d.jsx("li",{className:"psearch-head",children:"Searching…"})]})]})}function rE(){const l=ir(),[i,s]=j.useState("");return d.jsxs("div",{className:`wgts ${Qn.theme}`,children:[d.jsxs("aside",{className:"side","aria-label":"Navigation",children:[d.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1",children:[d.jsx(sr,{size:24,strokeWidth:1.9,style:{color:"var(--menu-hi)"},"aria-hidden":!0}),d.jsx("span",{className:"text-base font-semibold tracking-tight",style:{color:"var(--menu-brand)"},children:"WGTS Reports"})]}),d.jsx(_0,{current:""})]}),d.jsxs("div",{className:"page",children:[d.jsx(p0,{}),d.jsxs("main",{className:"flex flex-col gap-4 px-8 pt-8 pb-10",children:[d.jsx("h1",{className:"m-0 text-[28px] font-semibold tracking-tight",children:"Open a patient"}),d.jsx("p",{className:"m-0 max-w-[60ch] text-[14.5px]",style:{color:"var(--ink-2)"},children:"Enter an individual's system id to see its WGTS report as live charts and tables."}),d.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:u=>{u.preventDefault(),i.trim()&&l(`/${i.trim()}`)},children:[d.jsxs("div",{className:"field w-[340px] max-w-full",children:[d.jsx(ur,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),d.jsx("label",{className:"sr-only",htmlFor:"open-id",children:"Individual id"}),d.jsx("input",{id:"open-id",placeholder:"IID_H000001",value:i,onChange:u=>s(u.target.value)})]}),d.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:!i.trim(),children:"Open"})]})]})]})]})}function zd(l){const i=l.toUpperCase();return i.startsWith("BATTENBERG")||i.startsWith("CNV_")?"cn":i.startsWith("ANNOT_SNVS")||i.startsWith("ANNOT_INDELS")||i.startsWith("FFPERASE")?"mut":i.startsWith("MSISENSOR")?"msi":"other"}function Pi(l){return`fam-${zd(l)}`}function N0(l){return l.pk?`${l.app} #${l.pk}`:l.app}function Rt(l){return`${l.app}#${l.pk??""}`}const cE=[{label:"Overview",icon:gC,ready:!0},{label:"Copy number",icon:nC,ready:!1},{label:"Mutations",icon:pC,ready:!1},{label:"Structural variants",icon:yC,ready:!1},{label:"Signatures and HRD",icon:iC,ready:!1},{label:"RNA",icon:SC,ready:!1},{label:"Germline",icon:vC,ready:!1},{label:"Quality",icon:oC,ready:!1}];function fE({individualId:l,sampleCount:i,mode:s,fingerprint:u,analyses:c,onPage:f,sampleLabel:g,picked:m,onPick:v}){const[S,y]=j.useState(!1),x=["cn","mut","msi","other"],C=(b,E)=>x.indexOf(zd(b.app))-x.indexOf(zd(E.app))||b.app.localeCompare(E.app),R=c.filter(b=>b.role==="input"),_=R.filter(b=>f.has(Rt(b))).sort(C),O=[...R.filter(b=>!f.has(Rt(b))).sort(C),...c.filter(b=>b.role==="cohort")];return d.jsxs("aside",{className:"side","aria-label":"Patient navigation",children:[d.jsxs("div",{className:"flex items-center gap-2.5 px-2 py-1",children:[d.jsx(sr,{size:24,strokeWidth:1.9,style:{color:"var(--menu-hi)"},"aria-hidden":!0}),d.jsx("span",{className:"text-base font-semibold tracking-tight",style:{color:"var(--menu-brand)"},children:"WGTS Reports"})]}),d.jsx(_0,{current:l}),d.jsxs("nav",{"aria-label":"Patient sections",className:"flex flex-col gap-0.5",children:[d.jsxs("div",{className:"side-patient",children:[d.jsx(rr,{fingerprint:u,size:"switcher",className:"h-10 w-10 flex-none"}),d.jsxs("span",{className:"flex min-w-0 flex-col gap-px",children:[d.jsx("span",{className:"truncate text-[13.5px] font-semibold",style:{color:"var(--menu-strong)"},children:l}),d.jsxs("span",{className:"text-xs",style:{color:"var(--menu-muted)"},children:[i," samples",s?`, ${s}`:""]})]})]}),cE.map(({label:b,icon:E,ready:U})=>d.jsxs("button",{type:"button",className:"sc-nav","aria-current":U?"page":void 0,disabled:!U,title:U?void 0:"Not available yet",children:[d.jsx(E,{size:18,"aria-hidden":!0}),b]},b))]}),d.jsxs("section",{"aria-label":"Analyses on this page",className:"flex flex-col gap-0.5",children:[d.jsx("span",{className:"side-label",children:"Analyses on this page"}),_.length===0&&d.jsxs("span",{className:"px-3 text-xs",style:{color:"var(--menu-muted)"},children:["Nothing on this page reads an analysis for ",g||"this sample","."]}),_.map(b=>{const E=Rt(b),U=b.state==="failed",B=b.modules.filter($=>$.status==="failed");return d.jsxs("button",{type:"button",className:`tb-src${U?" fail":""}`,"aria-pressed":m===E,title:U?B.map($=>`${$.label} failed`).join("; "):"Show what it feeds",onClick:()=>v(m===E?null:E),children:[U?d.jsx(f0,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):d.jsx("span",{className:`tb-dot ${Pi(b.app)}`,"aria-hidden":!0}),d.jsxs("span",{className:"truncate",children:[b.app," ",b.version??""]}),U&&d.jsx("span",{className:"sr-only",children:", failed"}),d.jsx("span",{className:"tb-n",children:b.pk?`#${b.pk}`:""})]},E)}),O.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",className:"tb-src","aria-expanded":S,onClick:()=>y(b=>!b),children:[d.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),S?"Hide":"Show"," ",O.length," more for ",g||"this sample"]}),S&&O.map(b=>d.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[d.jsx("span",{className:`tb-dot ${Pi(b.app)}`,"aria-hidden":!0}),d.jsx("span",{className:"truncate",children:b.role==="cohort"?`${b.app}${b.project?`, project ${b.project}`:""}`:`${b.app} ${b.version??""}`}),d.jsx("span",{className:"tb-n",children:b.pk?`#${b.pk}`:""})]},Rt(b)))]}),d.jsx("span",{className:"px-3 pt-2 text-xs leading-normal",style:{color:"var(--menu-muted)"},children:"Pick one to see what it feeds."})]}),d.jsx("div",{className:"flex-auto"})]})}function Ma({envelope:l}){const i=l.status==="error",s=i?uC:rC;return d.jsxs("div",{className:"flex items-start gap-2.5 text-sm",style:{color:"var(--ink-2)"},children:[d.jsx(s,{size:18,"aria-hidden":!0,style:{color:i?"var(--warn-ink)":"var(--chev)",flex:"none"}}),d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"font-semibold",style:{color:"var(--ink)"},children:i?"This panel could not be read":"Nothing to show here"}),l.warnings.map(u=>d.jsx("span",{children:u},u))]})]})}const Dd={summary:{title:"Genome fingerprint and summary",intro:"A one-glance portrait of the selected tumour: its copy-number changes and driver mutations drawn as a ring, a sentence describing them, and the headline measurements of the sample.",sections:[{heading:"The fingerprint ring",paragraphs:["The ring is the whole genome. Chromosome 1 starts at the top and the ring runs clockwise through chromosome 22 to X, each chromosome's arc in proportion to its length (GRCh37).","Copy-number changes are called against the tumour's baseline, its ploidy rounded to whole copies. Very short changes are drawn at a minimum length so they stay visible."],terms:[["Gains (outer track, orange)","Regions with at least one copy more than the baseline."],["Amplifications (outer track, darker and thicker)","Regions with three or more copies above the baseline."],["Losses (inner track, blue)","Regions with at least one copy fewer than the baseline."],["Drivers (black ticks)","Where the tumour's likely driver mutations sit (see the Mutations card for how they are flagged)."]]},{heading:"The sentence",paragraphs:["Written from the same data as the ring: how many amplifications, gains and losses there are and on which chromosomes, and which genes carry driver mutations."]},{heading:"The measurements",paragraphs:["Each tile shows a value, a small picture of where it sits on its scale when it has a natural one, and the analysis it came from. A tile with no value says why: the analysis was not run, it failed, or it does not apply to this kind of report (tumour-only reports have no matched normal)."],terms:[["Purity","The estimated fraction of cells in the sample that are tumour cells, from 0 to 1. The ring fills to the value."],["Ploidy","The tumour's average number of copies across the genome. The scale runs from 1 to 6 copies; the tall tick marks 2, a diploid genome."],["Coverage","The median sequencing depth of the tumour across the genome, in reads (×)."],["TMB per Mb","Tumour mutational burden: somatic SNVs and indels per megabase of genome. The report computes it from the counts of the SNV and indel calls. The scale is logarithmic, 0.01 to 100."],["MSI score","The MSIsensor score: the percentage of microsatellite sites that look unstable in the tumour."],["FGA","Fraction of the genome altered: the share of the genome whose copy number differs from the baseline, from 0 to 1. It is read from the project-wide Battenberg tables."]]},{heading:"Linking back to the analyses",paragraphs:[`Every value names its analysis, with version and Isabl id. Picking an analysis in the side menu's "Analyses on this page" highlights the tiles and cards it feeds.`]}]},copyNumber:{title:"Copy number",intro:"How many copies of each part of the genome the tumour carries, segment by segment, from chromosome 1 to X.",sections:[{heading:"What is drawn",paragraphs:['Each horizontal stroke is one segment: a stretch of the genome with a constant copy number. Its height is the number of copies, from 0 up to 8; anything higher is drawn at the top and the axis reads "8+". Alternating grey bands mark the chromosomes, named along the bottom.',`The dashed line is the baseline: the tumour's ploidy rounded to whole copies (labelled, for example, "2 copies"). Segments are coloured by how they compare with it.`],terms:[["Grey","Neutral: the same number of copies as the baseline."],["Orange","Gain: at least one copy more than the baseline."],["Dark orange","Amplification: three or more copies above the baseline."],["Blue","Loss: at least one copy fewer than the baseline."]]},{heading:"Total or allele-specific",paragraphs:["Total shows all copies together. Allele-specific, when the analysis provides it, splits each segment into its major allele (the more common parental copy, dark) and minor allele (light). Where the two are equal they are drawn slightly apart so both stay visible. A minor allele of 0 means one parent's copy is lost there (loss of heterozygosity)."]},{heading:"Driver genes",paragraphs:["Triangles along the top mark the genes with likely driver mutations, one per gene; hover for its protein changes."]},{heading:"Reading and moving around",terms:[["Hover a segment","Its call, copies (major + minor), coordinates and, when available, log2 ratio."],["Click a segment","Lists the mutations inside it in the Mutations card."],["Click a driver","Finds that gene in the Mutations card."],["Pinch, or Ctrl and scroll","Zooms around the pointer. Plain scrolling always scrolls the page."],["Drag","Pans a zoomed view."],["Double-click a chromosome","Zooms to fill the view with it; the axis then counts megabases."],["Slider and reset","The slider under the plot shows and moves the window; the button by the title returns to the whole genome."],["Hover a mutation in the table","Marks it here, with a ring on the segment it sits on and its copy number."]]},{heading:"Tumour-only reports",paragraphs:["Without a matched normal there is no ploidy estimate, so segments come from CNVkit and are called against two copies. Allele-specific copy numbers are not available."]}]},mutations:{title:"Mutations",intro:"The tumour's somatic SNVs and indels that passed the callers' filters: how they are distributed across cancer cells, and a searchable, filterable table of every call.",sections:[{heading:"Which mutations",terms:[["Drivers","Likely drivers flagged by the report: coding mutations that match OncoKB or COSMIC driver annotations (the exact protein change, or a damaging consequence in a known cancer gene), plus known hotspots the callers missed and the report recovered from the tumour's reads."],["Coding","Mutations whose effect changes a protein, by the report's list of coding effects."],["All","Every PASS SNV and indel."]],paragraphs:["The counts beside each choice follow the search and filters, so they always say what you would see."]},{heading:"FFPE samples",paragraphs:["Formalin-fixed (FFPE) tissue damages DNA in ways that look like mutations, mostly C>T changes at low allele fractions. For an FFPE sample, FFPERASE scores each SNV and indel for how likely it is to be such an artifact, and the report counts only the calls scored at or below its threshold (quoted beside the table). Its SNV, indel and coding totals and the TMB leave the rest out.",`The report marks each call it leaves out, and the dashboard follows that mark: the Coding and All counts, the table and the curve leave those calls out, and the card's subtitle says so. Drivers are all listed, as in the report, and any the filter would remove carry an "FFPE filtered" tag. "Show filtered calls", under FFPE filter beside the table, brings the removed calls back, tagged the same way.`]},{heading:"Cancer cell fraction and variant allele fraction",paragraphs:["The curve across the top is a smoothed histogram of every PASS mutation; driver mutations are labelled on it. Switch between the two measures:"],terms:[["CCF",'Cancer cell fraction: the estimated share of cancer cells carrying the mutation, corrected for purity and copy number. Around 1 (the "clonal" mark) means nearly every cancer cell has it, which suggests it arose early; clearly below 1 means a subclone. Estimates can land somewhat above 1. Shown from 0 to 2.'],["VAF","Variant allele fraction: the share of sequencing reads at the position that carry the mutation, from 0 to 1. Raw, not corrected for purity or copy number. Tumour-only reports open on VAF, since CCF needs a matched normal."]]},{heading:"Filtering by the curve",paragraphs:["Drag across the curve to keep only mutations in that CCF or VAF range; drivers outside it fade. The range appears with the other filters and can be removed there, or by clicking the curve."]},{heading:"The table",terms:[["Gene and position","The gene, and the mutation's chromosome and position (GRCh37)."],["Change","The protein change, with the cDNA change beneath."],["Effect","What the mutation does to the gene, from the VEP consequence (or the report's effect). Truncating effects are in bold."],["VAF and CCF bars","The value with a bar for quick comparison; the CCF bar's tick marks 1, clonal."],["Driver","Flagged as a likely driver (shown when the table is not already limited to drivers)."],["Hotspot","The exact protein change is a known recurrent cancer hotspot."],["In DMP","The same mutation was also found by the patient's clinical MSK-IMPACT (DMP) sequencing."],["FFPE filtered","FFPE samples only: the report's FFPE artifact filter leaves this call out of its counts (see FFPE samples)."]]},{heading:"Opening a row",terms:[["Variant","SNV or indel, with the reference and alternate bases."],["Reads","Reads supporting the mutation out of all reads at the position. Only hotspots the report recovered from the tumour's reads have them; the callers' tables give no single count."],["Normal VAF","The mutation's allele fraction in the matched normal; near 0 for a somatic mutation."],["Mutant copies","How many copies of that part of the genome carry the mutation, out of all copies there."],["Consequence","The full VEP consequence."],["COSMIC","How many samples in COSMIC carry it, and how closely they match (exact change, same position, codon or gene)."],["Expression","The gene's expression in the tumour's RNA, in transcripts per million, when RNA was sequenced."],["Gene role","Whether the gene is a known oncogene or tumour suppressor gene (TSG)."],["Show on copy number","Zooms the Copy number card to the mutation's chromosome and marks it."]]},{heading:"Searching and filtering",paragraphs:["Search takes a gene, a protein or cDNA change, a COSMIC term, or a locus such as chr12:25,398,284 or a range such as chr8:1-50,000,000. Press / anywhere on the page to jump to it. Each filter's count is how many rows you would get by ticking it, given everything else."],terms:[["Missense","One amino acid replaced by another."],["Truncating","Stop gained or lost, start lost, or a frameshift."],["Splice","Changes a splice site or splice region."],["In-frame","Inserts or deletes amino acids without shifting the reading frame."],["Synonymous","Changes the DNA but not the amino acid."],["Other","Everything else, such as intronic, UTR or upstream changes."]]}]},structuralVariants:{title:"Structural variants",intro:"The tumour's rearrangements as the report shows them: those with a breakpoint in an oncogene or tumour suppressor, those that take in a whole gene, and how all of them group into rearrangement signatures.",sections:[{heading:"Which rearrangements",paragraphs:["The report works from the high-confidence structural variants of ANNOT_SVS, which keeps calls made by two or more callers (SvABA, BRASS and GRIDSS) and annotates the genes they touch with AnnotSV. The count beside the title is how many of these the report counts, its rearrangements total.",`The tables keep the rearrangements whose genes include an oncogene or tumour suppressor, by the report's gene lists. It also searches the callers' raw calls for known rearrangements the high-confidence set can miss, such as CIC fusions, and adds them; a rescued event that is not a two-caller PASS says so in its callers, as in "gridss (CIC rescued)".`]},{heading:"The two tables",terms:[["Rearranged oncogenes and tumour suppressors",'One row per rearrangement and gene it hits, with the gene and breakpoint on each side. A gene near a breakpoint rather than in it is named as the report names it, such as "TERT +/- 100Kb".'],["Whole-gene rearrangements","Rearrangements that take in a whole oncogene or tumour suppressor, from start to end: a deletion of the whole gene, for example."],["Role","Whether the row's genes include an oncogene, a tumour suppressor or both, as the report colours its rows. Click a role above the tables to show only its rows."],["Left and right","Each breakpoint's gene, position (GRCh37) and where it falls in the gene, as AnnotSV writes it (intron5, exon2-exon5). Breakpoints are ordered by chromosome, then position."],["Callers and support","The callers that made the call, and the most reads any of them gives in support."],["Pileups","Supporting reads over all reads at each breakpoint in the tumour's alignments, left then right."],["Expression","For tumours with RNA: whether each gene's expression is high or low against each expression cohort (p63 is cohort project 63): at or above its 90th percentile, at or below its 10th, or neither (None). N/A means the cohort has no value for the gene."]],paragraphs:["Open a row to see both breakpoints, show them on the copy-number card, or copy their IGV loci."]},{heading:"Rearrangement signatures",paragraphs:["WGSPOST groups the tumour's rearrangements the way rearrangement signatures are described: clustered (rearrangements that sit unusually close together, as in chromothripsis) or dispersed, then by class and, except for translocations, by size from under 1 kb to over 1 Mb. Each bar is how many rearrangements fall in a group; lighter bars are the clustered ones.","WGSPOST counts from its own copy of the calls, so its total can differ slightly from the report's rearrangements count."],terms:[["Deletion","A stretch of the genome lost between two breakpoints."],["Tandem duplication","A stretch copied next to itself."],["Inversion","A stretch turned around in place."],["Translocation","A join between two chromosomes."]]}]}},dE={summary:{BATTENBERG:"Tumour purity and ploidy, and the copy-number segments the ring's gains and losses are called from.","BATTENBERG cohort":"Project-wide Battenberg tables, which hold the FGA value and the cohort it is compared with.",CNV_UNMATCHED:"Copy-number segments of a tumour-only report (CNVkit), which the ring's gains and losses are called from.",MOSDEPTH:"The median sequencing coverage.",MSISENSOR:"The MSI score.",MSISENSOR_UNMATCHED:"The MSI score of a tumour-only report.",ANNOT_SNVS:"Somatic SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS:"Somatic indel calls: their count goes into TMB, and driver indels are marked on the ring.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls: their count goes into TMB, and driver indels are marked on the ring.",WGSPOST:"Cancer cell fractions of the mutations, read together with the driver calls marked on the ring."},copyNumber:{BATTENBERG:"Every segment drawn: total copies, major and minor allele copies, and the ploidy the baseline is rounded from.","BATTENBERG cohort":"Project-wide Battenberg tables the report reads alongside this run; they hold the FGA, and are not drawn here.",CNV_UNMATCHED:"The segments of a tumour-only report (CNVkit), drawn against two copies."},mutations:{ANNOT_SNVS:"The tumour's PASS somatic SNVs and their annotation: gene, protein and cDNA change, effect, VAF, read counts, normal VAF and COSMIC.",ANNOT_INDELS:"The tumour's PASS somatic indels and their annotation, as for SNVs.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls and their annotation.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls and their annotation.",WGSPOST:"Each mutation's cancer cell fraction (CCF) and how many copies carry it.",BATTENBERG:"Ploidy, which fills in the copy count where WGSPOST has none, and purity, which gives a CCF to hotspots recovered from the tumour's reads.",FFPERASE_SNVS:"FFPE samples: each SNV's artifact score. Calls scoring above the report's threshold are left out of the counts.",FFPERASE_INDELS:"FFPE samples: each indel's artifact score. Calls scoring above the report's threshold are left out of the counts."},structuralVariants:{ANNOT_SVS:"The high-confidence structural variants and their AnnotSV gene annotation: the rearrangements the report counts and the rows of its tables.",ANNOT_SVS_UNMATCHED:"Tumour-only structural variants and their annotation, kept when rare in the population.",SVABA:"Raw SvABA calls, searched for known rearrangements the high-confidence set missed (rescued events).",GRIDSS:"Raw GRIDSS calls, searched for rescued events like SvABA's.",SVABA_UNMATCHED:"Raw tumour-only SvABA calls, searched for rescued events.",GRIDSS_UNMATCHED:"Raw tumour-only GRIDSS calls, searched for rescued events.",WGSPOST:"The rearrangement-signature counts.",WGSPOST_UNMATCHED:"The rearrangement-signature counts of a tumour-only report."}};function hE(l,i){const s=i.role==="cohort"||i.app.endsWith("Project Application"),u=i.app.replace(/ Project Application$/,""),c=dE[l];return(s?c[`${u} cohort`]:c[u])??(s?"A project-wide run the report reads for comparison with the cohort.":"An analysis the report reads to build this card.")}function gE({topic:l,lineage:i,subject:s,onClose:u}){const c=Dd[l],f=j.useId(),g=j.useRef(null),m=i.filter(E=>E.role!=="cohort"&&!E.app.endsWith("Project Application")),v=i.filter(E=>!m.includes(E)),S=j.useRef(u);S.current=u,j.useEffect(()=>{var F;const E=document.activeElement;(F=g.current)==null||F.focus();const U=document.documentElement,B=U.style.overflow;U.style.overflow="hidden";const $=P=>{P.key==="Escape"&&S.current()};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$),U.style.overflow=B,E==null||E.focus()}},[]);const y=[...c.sections.map(E=>E.heading),"Sources"],x=y.map((E,U)=>`${f}-s${U}`),[C,R]=j.useState(0),_=j.useRef(null);j.useEffect(()=>{const E=_.current;if(!E)return;const U=()=>{const B=E.getBoundingClientRect().top+24;let $=0;x.forEach((F,P)=>{const X=document.getElementById(F);X&&X.getBoundingClientRect().top<=B&&($=P)}),E.scrollTop+E.clientHeight>=E.scrollHeight-4&&($=x.length-1),R($)};return U(),E.addEventListener("scroll",U,{passive:!0}),()=>E.removeEventListener("scroll",U)},[]);const O=E=>{var B;const U=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;(B=document.getElementById(x[E]))==null||B.scrollIntoView({behavior:U?"auto":"smooth",block:"start"})},b=E=>d.jsxs("li",{className:"info-source",children:[d.jsx("span",{className:`tb-dot ${Pi(E.app)}`,"aria-hidden":!0}),d.jsxs("span",{className:"info-source-text",children:[E.pk?d.jsxs("a",{className:"info-source-name info-source-link",href:i0(E.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[d.jsxs("span",{className:"mono",children:[E.app,E.version?` ${E.version}`:""]}),d.jsxs("span",{className:"mono info-source-pk",children:["#",E.pk]}),d.jsx(lC,{size:13,"aria-hidden":!0,className:"info-source-arrow"})]}):d.jsxs("span",{className:"info-source-name",children:[d.jsxs("span",{className:"mono",children:[E.app,E.version?` ${E.version}`:""]}),E.project?d.jsxs("span",{className:"info-source-pk",children:["project ",E.project]}):null]}),d.jsx("span",{className:"info-source-role",children:hE(l,E)})]})]},Rt(E));return Xb.createPortal(d.jsx("div",{className:`info-backdrop ${Qn.theme}`,onMouseDown:E=>E.target===E.currentTarget&&u(),children:d.jsxs("div",{className:"info-dialog",role:"dialog","aria-modal":"true","aria-labelledby":f,children:[d.jsx("button",{ref:g,type:"button",className:"info-close","aria-label":"Close",onClick:u,children:d.jsx(Pd,{size:18,"aria-hidden":!0})}),d.jsxs("nav",{className:"info-rail","aria-label":"Contents",children:[d.jsx("span",{className:"info-kicker",children:s??"About"}),d.jsx("h2",{id:f,children:c.title}),d.jsx("ol",{children:y.map((E,U)=>d.jsx("li",{children:d.jsx("button",{type:"button","aria-current":U===C?"true":void 0,onClick:()=>O(U),children:E})},E))})]}),d.jsxs("div",{ref:_,className:"info-main",children:[d.jsx("p",{className:"info-intro",children:c.intro}),c.sections.map((E,U)=>{var B;return d.jsxs("section",{id:x[U],className:"info-section",children:[d.jsx("h3",{children:E.heading}),(B=E.paragraphs)==null?void 0:B.map($=>d.jsx("p",{children:$},$)),E.terms&&d.jsx("dl",{children:E.terms.map(([$,F])=>d.jsxs("div",{children:[d.jsx("dt",{children:$}),d.jsx("dd",{children:F})]},$))})]},E.heading)}),d.jsxs("section",{id:x[x.length-1],className:"info-section","aria-label":"Sources",children:[d.jsx("h3",{children:"Sources"}),d.jsx("p",{children:"The analyses this card reads, with their version and Isabl id, and what each one is responsible for."}),i.length===0&&d.jsx("p",{children:"No analyses recorded for this card."}),d.jsx("ul",{className:"info-sources",children:m.map(b)}),v.length>0&&d.jsxs(d.Fragment,{children:[d.jsx("h4",{children:"Cohort runs"}),d.jsx("ul",{className:"info-sources",children:v.map(b)})]})]})]})]})}),document.body)}function T0({topic:l,lineage:i,subject:s}){const[u,c]=j.useState(!1);return d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${Dd[l].title.toLowerCase()}`,title:`About ${Dd[l].title.toLowerCase()}`,"aria-haspopup":"dialog",onClick:()=>c(!0),children:d.jsx(hC,{size:15,"aria-hidden":!0})}),u&&d.jsx(gE,{topic:l,lineage:i,subject:s,onClose:()=>c(!1)})]})}function mE({lineage:l,children:i}){const[s,u]=j.useState(!1),c=l.filter(g=>g.role!=="cohort"),f=l.filter(g=>g.role==="cohort");return d.jsxs("div",{className:"sc-cf",children:[i,i&&d.jsx("span",{className:"flex-auto"}),l.length>0&&d.jsx("span",{className:"text-xs",style:{color:"var(--muted)"},children:"Sources"}),c.map(g=>g.pk?d.jsxs("a",{className:"sc-src sc-src-link",href:i0(g.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[d.jsx("span",{className:`tb-dot ${Pi(g.app)}`,"aria-hidden":!0}),g.app," ",g.version??""," #",g.pk]},Rt(g)):d.jsxs("span",{className:"sc-src",children:[d.jsx("span",{className:`tb-dot ${Pi(g.app)}`,"aria-hidden":!0}),g.app," ",g.version??""]},Rt(g))),f.length>0&&d.jsxs("button",{type:"button",className:"sc-src",style:{border:0,cursor:"pointer"},"aria-expanded":s,onClick:()=>u(g=>!g),children:[s?"Hide":"+"," ",f.length," cohort ",f.length===1?"run":"runs"]}),s&&f.map(g=>d.jsxs("span",{className:"sc-src",children:[d.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),g.app,g.project?`, project ${g.project}`:""," ",g.pk?`#${g.pk}`:""]},Rt(g)))]})}function M0(...l){const i=new Map;for(const s of l.flat())s&&!i.has(Rt(s))&&i.set(Rt(s),s);return[...i.values()]}const th=j.forwardRef(function({title:i,subtitle:s,controls:u,lineage:c,picked:f,footer:g,className:m="",info:v,children:S},y){const x=!!f&&c.some(C=>Rt(C)===f);return d.jsxs("section",{ref:y,className:`sc-card flex flex-col ${m}`,"data-picked":x,"aria-label":i,children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 px-5 pt-4 pb-1",children:[d.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[d.jsx("h2",{className:"m-0 text-base font-semibold",children:i}),s&&d.jsx("span",{className:"text-[13px]",style:{color:"var(--muted)"},children:s})]}),(u||v)&&d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u,v&&d.jsx(T0,{topic:v,lineage:c,subject:typeof s=="string"?s:void 0})]})]}),d.jsx("div",{className:"min-w-0 flex-auto",children:S}),(c.length>0||g)&&d.jsx(mE,{lineage:c,children:g})]})});function dr({label:l,envelope:i,loading:s,skeletonHeight:u=160,children:c}){return d.jsxs(d.Fragment,{children:[s&&!i&&d.jsx("div",{className:"px-5 py-3",children:d.jsx("div",{className:"skeleton",style:{height:u},"aria-label":`Loading ${l}`})}),i&&i.status!=="ok"&&d.jsx("div",{className:"px-5 py-4",children:d.jsx(Ma,{envelope:i})}),(i==null?void 0:i.status)==="ok"&&i.data!==null&&c(i.data),(i==null?void 0:i.status)==="ok"&&i.warnings.length>0&&d.jsx("div",{className:"px-5 pb-1 text-xs",style:{color:"var(--warn-ink)"},children:i.warnings.join(" ")})]})}function pE({title:l,subtitle:i,controls:s,envelope:u,loading:c,picked:f,skeletonHeight:g=160,footer:m,className:v="",info:S,children:y}){return d.jsx(th,{title:l,subtitle:i,controls:s,lineage:(u==null?void 0:u.lineage)??[],picked:f,footer:m,className:v,info:S,children:d.jsx(dr,{label:l,envelope:u,loading:c,skeletonHeight:g,children:y})})}function vE(l,i){const[s,u]=j.useState(null),[c,f]=j.useState(!1);return j.useLayoutEffect(()=>{const g=l.current;if(!g)return;const m=()=>{const S=g.querySelector('[aria-pressed="true"]');u(S?{x:S.offsetLeft,y:S.offsetTop,width:S.offsetWidth,height:S.offsetHeight}:null)};if(m(),typeof ResizeObserver>"u")return;const v=new ResizeObserver(m);v.observe(g);for(const S of Array.from(g.children))v.observe(S);return()=>v.disconnect()},[l,i]),j.useEffect(()=>{if(s&&!c){const g=requestAnimationFrame(()=>f(!0));return()=>cancelAnimationFrame(g)}},[s,c]),{thumb:s,moving:c}}function hr({label:l,options:i,value:s,onChange:u,className:c=""}){const f=j.useRef(null),{thumb:g,moving:m}=vE(f,s);return d.jsxs("div",{ref:f,className:`sc-track ${c}`,role:"group","aria-label":l,children:[g&&d.jsx("span",{className:"sc-thumb","data-moving":m,"aria-hidden":!0,style:{width:g.width,height:g.height,transform:`translate(${g.x}px, ${g.y}px)`}}),i.map(v=>d.jsx("button",{type:"button",className:"sc-seg","aria-pressed":v.value===s,disabled:v.disabled,title:v.title,onClick:()=>u(v.value),children:v.label},v.value))]})}function yE(l){var s;const i=[];return l.mode==="unmatched"&&i.push("Tumour only"),l.individual.germline_consent&&i.push("Germline consented"),(s=l.individual.dmp_id)!=null&&s.startsWith("P-")&&i.push("DMP linked"),i}function SE({data:l,fingerprint:i,sampleId:s,onSample:u,onVersion:c}){const f=l.report;return d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-x-10 gap-y-5",children:[d.jsx(LC,{data:l,sampleId:s,fingerprint:i,onSample:u}),d.jsxs("div",{className:"flex flex-col items-start gap-2.5 pt-1 lg:items-end",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[d.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--muted)"},children:"Report version"}),d.jsx(hr,{label:"Report version",value:f.version,onChange:c,options:l.versions.map(g=>({value:g.version,label:g.version}))})]}),d.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["WGTS_REPORT ",f.analysis?`run #${f.analysis}`:"run indexed by hand",f.built?`, built ${wC(f.built)}`:""]}),d.jsx("div",{className:"flex flex-wrap gap-2",children:yE(l).map(g=>d.jsx("span",{className:"sc-chip",children:g},g))})]})]})}const Ud=["purity","ploidy","coverage","tmb","msi","fga"];function xE({value:l}){const s=2*Math.PI*13,u=Math.min(Math.max(l,0),1);return d.jsxs("svg",{viewBox:"0 0 34 34",className:"kpi-glyph h-[34px] w-[34px]","aria-hidden":!0,children:[d.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",className:"kpi-track"}),d.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",strokeLinecap:"round",className:"kpi-fill",strokeDasharray:`${u*s} ${s}`,transform:"rotate(-90 17 17)"})]})}function fy({value:l,min:i,max:s,ticks:u,reference:c}){const f=g=>4+(Math.min(Math.max(g,i),s)-i)/(s-i)*64;return d.jsxs("svg",{viewBox:"0 0 72 20",className:"kpi-glyph h-[18px] w-[60px]","aria-hidden":!0,children:[d.jsx("line",{x1:"4",x2:"68",y1:"12",y2:"12",className:"kpi-track",strokeWidth:"2",strokeLinecap:"round"}),u.map(g=>d.jsx("line",{x1:f(g),x2:f(g),y1:g===c?5:9,y2:"15",className:"kpi-tick",strokeWidth:g===c?1.5:1},g)),d.jsx("circle",{cx:f(l),cy:"12",r:"4.5",className:"kpi-dot",strokeWidth:"2"})]})}function bE({metric:l}){const i=l.value;if(i===null)return null;switch(l.key){case"purity":case"fga":return d.jsx(xE,{value:i});case"ploidy":return d.jsx(fy,{value:i,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return d.jsx(fy,{value:Math.log10(Math.max(i,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const CE={purity:"Share of tumour cells, 0 to 1",fga:"Share of the genome altered, 0 to 1",ploidy:"On a scale of 1 to 6 copies; the tall tick marks 2",tmb:"On a log scale from 0.01 to 100 mutations per Mb"};function EE({metric:l,picked:i}){const s=l.value===null&&!l.text,u=!!i&&l.sources.some(c=>Rt(c)===i);return d.jsxs("div",{className:"kpi","data-picked":u,title:CE[l.key],children:[d.jsxs("span",{className:"kpi-top",children:[d.jsx("span",{className:"kpi-label",children:l.label}),d.jsx(bE,{metric:l})]}),d.jsx("span",{className:"kpi-value","data-empty":s,children:s?CC(l):bC(l)}),l.sources.length>0?d.jsx("span",{className:"flex flex-col gap-0.5",children:l.sources.map(c=>d.jsxs("span",{className:"kpi-src",children:[d.jsx("span",{className:`tb-dot ${Pi(c.app)}`,"aria-hidden":!0}),d.jsx("span",{className:"min-w-0",children:N0(c)})]},Rt(c)))}):d.jsx("span",{className:"kpi-src",children:l.etl?`from ${l.etl}`:"no source"})]})}function wE({sampleLabel:l,fingerprint:i,metrics:s,picked:u,lineage:c=[]}){var g;const f=(((g=s==null?void 0:s.data)==null?void 0:g.metrics)??[]).filter(m=>Ud.includes(m.key));return d.jsxs("section",{className:"sc-card relative flex flex-wrap items-center gap-x-8 gap-y-5 px-6 py-5","aria-label":`Genome fingerprint and summary of ${l}`,children:[d.jsx("span",{className:"absolute top-3 right-3",children:d.jsx(T0,{topic:"summary",lineage:c,subject:l})}),d.jsx(rr,{fingerprint:i,size:"hero",title:l.split(" ")[0],subtitle:"tumour",className:"h-[210px] w-[210px] max-w-full flex-none"}),d.jsxs("div",{className:"flex min-w-0 flex-[1_1_230px] flex-col gap-3",children:[d.jsxs("h2",{className:"m-0 text-lg font-semibold tracking-tight",children:["Genome fingerprint of ",l]}),d.jsx("p",{className:"m-0 max-w-[46ch] text-[14.5px] leading-relaxed",style:{color:"var(--ink-2)"},children:i?h0(i):"No copy-number data for this sample."}),d.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-[12.5px]",style:{color:"var(--ink-2)"},children:[d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--gain)"}}),"Gains, outer track"]}),d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--loss)"}}),"Losses, inner track"]}),d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"h-3 w-[5px] rounded-sm",style:{background:"var(--ink)"}}),"Drivers"]})]}),d.jsx("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:"Chromosome 1 starts at the top and the ring runs clockwise to X."})]}),d.jsxs("div",{className:"kpi-grid min-w-0 flex-[1.4_1_420px]",children:[s===void 0&&Ud.map(m=>d.jsx("div",{className:"kpi","aria-hidden":!0,children:d.jsx("div",{className:"skeleton h-[70px]"})},m)),s&&s.status!=="ok"&&d.jsx("div",{className:"col-span-full",children:d.jsx(Ma,{envelope:s})}),f.map(m=>d.jsx(EE,{metric:m,picked:u},m.key))]})]})}function RE({sampleLabel:l,failures:i,analyses:s}){return i.length===0?null:d.jsx("div",{className:"flex flex-col gap-2.5",children:i.map(u=>{const c=s.filter(f=>f.modules.some(g=>g.etl===u.etl&&g.status==="failed"));return d.jsxs("div",{className:"sc-card flex flex-wrap items-center gap-x-4 gap-y-3 px-[18px] py-3.5",role:"status",children:[d.jsx("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-[10px]",style:{background:"var(--warn-soft)",color:"var(--warn-ink)"},children:d.jsx(f0,{size:18,"aria-hidden":!0})}),d.jsxs("div",{className:"flex min-w-0 flex-[1_1_360px] flex-col gap-0.5",children:[d.jsxs("span",{className:"text-[14.5px] font-semibold",children:[u.label," failed for ",l]}),d.jsx("span",{className:"text-[13.5px]",style:{color:"var(--ink-2)"},children:u.message.split(`
252
- `)[0]}),c.length>0&&d.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["Reading ",c.map(N0).join(", ")]})]})]},`${u.etl}-${u.node}`)})})}function _E({onSignedIn:l}){const[i,s]=j.useState("password"),[u,c]=j.useState(""),[f,g]=j.useState(""),[m,v]=j.useState(""),[S,y]=j.useState(null),[x,C]=j.useState(!1),R=i==="password"?!!u&&!!f:!!m.trim();return d.jsxs("form",{className:"sc-card mx-auto mt-16 flex w-[380px] max-w-full flex-col gap-3 p-6",onSubmit:async _=>{_.preventDefault(),C(!0),y(null);try{i==="password"?await qC(u,f):await GC(m.trim()),l()}catch(O){y(O.message)}finally{C(!1)}},children:[d.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Sign in to Isabl"}),d.jsx("p",{className:"m-0 text-sm",style:{color:"var(--ink-2)"},children:"The WGTS dashboard uses your Isabl account."}),i==="password"?d.jsxs(d.Fragment,{children:[d.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"username",children:["Username",d.jsx("span",{className:"field",children:d.jsx("input",{id:"username",autoComplete:"username",value:u,onChange:_=>c(_.target.value)})})]}),d.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"password",children:["Password",d.jsx("span",{className:"field",children:d.jsx("input",{id:"password",type:"password",autoComplete:"current-password",value:f,onChange:_=>g(_.target.value)})})]})]}):d.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"token",children:["API token",d.jsx("span",{className:"field",children:d.jsx("input",{id:"token",type:"password",autoComplete:"off",spellCheck:!1,value:m,onChange:_=>v(_.target.value)})}),d.jsx("span",{className:"text-xs font-normal",style:{color:"var(--muted)"},children:"The token the Isabl CLI uses. Admins find it under Auth Token in Django admin."})]}),S&&d.jsx("p",{className:"m-0 text-sm",style:{color:"var(--warn-ink)"},role:"alert",children:S}),d.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:x||!R,children:x?"Signing in":"Sign in"}),d.jsx("button",{type:"button",className:"self-start border-0 bg-transparent p-0 text-[13px] font-semibold",style:{color:"var(--link)",cursor:"pointer"},onClick:()=>{s(i==="password"?"token":"password"),y(null)},children:i==="password"?"Use an API token instead":"Use a username and password instead"})]})}const NE="modulepreload",TE=function(l){return"https://cdn.jsdelivr.net/npm/wgts-report@0.1.4/dist/"+l},dy={},ME=function(i,s,u){let c=Promise.resolve();if(s&&s.length>0){let g=function(S){return Promise.all(S.map(y=>Promise.resolve(y).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),v=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));c=g(s.map(S=>{if(S=TE(S),S in dy)return;dy[S]=!0;const y=S.endsWith(".css"),x=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${S}"]${x}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":NE,y||(C.as="script"),C.crossOrigin="",C.href=S,v&&C.setAttribute("nonce",v),document.head.appendChild(C),y)return new Promise((R,_)=>{C.addEventListener("load",R),C.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${S}`)))})}))}function f(g){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=g,window.dispatchEvent(m),!m.defaultPrevented)throw g}return c.then(g=>{for(const m of g||[])m.status==="rejected"&&f(m.reason);return i().catch(f)})},He={ink:"#18181b",ink2:"#52525b",muted:"#6e6e76",faint:"#71717a",card:"#ffffff",head:"#fafafb",line:"#e8e8ec",grid:"#f0f0f3",axis:"#d4d4d8",band:"#fafafb",cn2:"#dcdce1",guide:"#ececf0",gain:"#e8590c",gainStrong:"#c2410c",loss:"#1c7ed6",neutral:"#52525b",major:"#52525b",minor:"#a1a1aa",accent:"#6e5ad8",accentSoft:"#f3f1fd",ccfLine:"#6e5ad8",ccfFill:"#8e7fe6",dot:"#5a46c8",svDel:"#1c7ed6",svDup:"#e8590c",svInv:"#1f9e89",svTra:"#b0458f",font:"Manrope, system-ui, sans-serif",mono:"JetBrains Mono, ui-monospace, monospace",reducedMotion:!1};function jE(l){if(!l||typeof getComputedStyle>"u")return He;const i=getComputedStyle(l),s=(u,c)=>i.getPropertyValue(u).trim()||c;return{ink:s("--ink",He.ink),ink2:s("--ink-2",He.ink2),muted:s("--muted",He.muted),faint:s("--faint",He.faint),card:s("--card",He.card),head:s("--head",He.head),line:s("--line",He.line),grid:s("--grid",He.grid),axis:s("--axis",He.axis),band:s("--band",He.band),cn2:s("--cn2",He.cn2),guide:s("--guide",He.guide),gain:s("--gain",He.gain),gainStrong:s("--gain-strong",He.gainStrong),loss:s("--loss",He.loss),neutral:s("--neutral",He.neutral),major:s("--ink-2",He.major),minor:s("--chev",He.minor),accent:s("--focus",He.accent),accentSoft:s("--hi-soft",He.accentSoft),ccfLine:s("--ccf-line",He.ccfLine),ccfFill:s("--ccf-fill",He.ccfFill),dot:s("--dot",He.dot),svDel:s("--sv-del",He.svDel),svDup:s("--sv-dup",He.svDup),svInv:s("--sv-inv",He.svInv),svTra:s("--sv-tra",He.svTra),font:s("--font",He.font),mono:s("--mono",He.mono),reducedMotion:typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches}}function nh(l){return{confine:!0,backgroundColor:l.card,borderColor:l.line,borderWidth:1,padding:[10,12],textStyle:{color:l.ink,fontFamily:l.font,fontSize:12.5},extraCssText:"border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(16,16,20,0.28);"}}function Bl(l,i){const s=l.replace("#","");if(s.length!==6)return l;const[u,c,f]=[0,2,4].map(g=>parseInt(s.slice(g,g+2),16));return`rgba(${u}, ${c}, ${f}, ${i})`}const j0=()=>ME(()=>import("./EChart-l9bEGg9a.js"),[]),AE=j.lazy(j0);function OE(){j0()}function lh(l){return d.jsx(j.Suspense,{fallback:d.jsx("div",{className:"skeleton",style:{height:l.height},"aria-hidden":!0}),children:d.jsx(AE,{...l})})}function ah(){const l=j.useRef(null),[i,s]=j.useState(null);return j.useLayoutEffect(()=>s(jE(l.current)),[]),[l,i]}function A0({top:l,distance:i=5,gap:s=6,rowGap:u=3}={}){let c=[],f=-1;return g=>{g.dataIndex<=f&&(c=[]),f=g.dataIndex;const{labelRect:m,rect:v}=g;let S=c.findIndex(_=>_+s<=m.x);S===-1&&(S=c.push(0)-1),c[S]=m.x+m.width;const y=m.height+u,x=l===void 0?v.y-i-m.height-S*y:l+S*y,C=m.x+m.width/2,R=x+m.height+2;return{y:x,align:"center",verticalAlign:"top",labelLinePoints:[[C,R],[C,Math.max(R,v.y-3)]]}}}const gt=1e3,O0=.35,zE=8,Hd=.1;function tr(l,i){return(er(l,i)??0)*gt}function Jl(l){const[i,s]=or[l.replace(/^chr/,"")];return[i*gt,s*gt]}function DE(l,i,s){const[u,c]=l,f=Math.min(gt,Math.max(O0,(c-u)*s)),g=Math.min(Math.max(i-(i-u)/(c-u)*f,0),gt-f);return[g,g+f]}function UE(l,i){const s=l[1]-l[0],u=Math.min(Math.max(l[0]+i,0),gt-s);return[u,u+s]}function HE(l){for(const[i]of kn){const[s,u]=Jl(i);if(l>=s&&l<=u)return i}return null}function z0(l,i){const s=l.segments.flatMap(c=>i==="total"?[c.total_cn]:[c.major_cn,c.minor_cn]),u=Math.max(...s.map(c=>c??0));return Math.min(zE,Math.max(l.baseline+2,Math.ceil(u)))}function LE(l){const i=10**Math.floor(Math.log10(l)),s=l/i;return(s<1.5?1:s<3.5?2:s<7.5?5:10)*i}function D0(l,i,s=5){const u=kn.filter(([C])=>{const[R,_]=Jl(C);return _>l&&R<i});if(u.length!==1)return u.map(([C])=>{const[R,_]=Jl(C);return{value:(R+_)/2,label:C}});const[c,f]=u[0],[g,m]=Jl(c),v=(Math.max(l,g)-g)/(m-g)*f,S=(Math.min(i,m)-g)/(m-g)*f,y=LE(Math.max(S-v,1)/s),x=[];for(let C=Math.ceil(v/y)*y;C<=S;C+=y)x.push({value:g+C/f*(m-g),label:tu(C,y)});return x}function U0(l,i){const s=new Map(l.map(u=>[u.value,u.label]));return{customValues:l.map(u=>u.value),formatter:u=>s.get(u)??"",hideOverlap:!0,color:i.faint,fontFamily:i.mono,fontSize:10.5,margin:10}}function VE(l,i){if(l<=.5&&i>=gt-.5)return null;const s=sy(l/gt,"start"),u=sy(i/gt,"end");if(s.chrom===u.chrom){const c=(u.pos-s.pos)/10;return`chr${s.chrom}: ${tu(s.pos,c).replace(" Mb","")}–${tu(u.pos,c)}`}return`chr${s.chrom}:${tu(s.pos,1e6)} – chr${u.chrom}:${tu(u.pos,1e6)}`}const BE={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},hy=["neutral","gain","amp","loss"];function GE(l,i){const s=`chr${l.chrom}:${l.start.toLocaleString("en-US")}–${l.end.toLocaleString("en-US")}`,u=l.major_cn!==null&&l.minor_cn!==null?` (${l.major_cn} + ${l.minor_cn})`:"",c=l.log2!==null?`, log2 ratio ${l.log2.toFixed(2)}`:"";return`<span style="font-weight:600">${BE[l.call??"neutral"]}</span>, ${l.total_cn??"?"} copies${u}<div style="font-family:var(--mono);font-size:11.5px;margin-top:3px">${s}${c}</div><div style="opacity:.7;font-size:11.5px;margin-top:5px">${i}</div>`}function qE(l){const i=new Map;for(const s of l){const u=s.gene??"?",c=i.get(u)??{gene:u,x:tr(s.chrom,s.pos),changes:[]};s.protein_change&&c.changes.push(s.protein_change),i.set(u,c)}return[...i.values()].map(s=>({...s,changes:s.changes.join(", ")})).sort((s,u)=>s.x-u.x)}function FE(l,i,s,u=[]){const c=z0(l,i),f=l.segments.some(y=>Math.max(y.total_cn??0,y.major_cn??0)>c),g={neutral:s.minor,gain:s.gain,amp:s.gainStrong,loss:s.loss},m=(y,x=0)=>l.segments.flatMap((C,R)=>{const _=y(C);if(_===null)return[];const O=hy.indexOf(C.call??"neutral");return[[tr(C.chrom,C.start),tr(C.chrom,C.end),Math.min(_,c)+x,O,R]]}),v=(y,x,C,R)=>({type:"custom",id:y,name:x,data:C,encode:{x:[0,1],y:2},clip:!0,z:6,renderItem:(_,O)=>{const b=O.coord([O.value(0),O.value(2)]),E=O.coord([O.value(1),O.value(2)]),U=hy[O.value(3)],B=Math.max(E[0]-b[0],U==="neutral"?2:7),$={x1:b[0],y1:b[1],x2:b[0]+B,y2:b[1]};return{type:"group",children:[{type:"line",shape:$,style:{stroke:"rgba(0,0,0,0)",lineWidth:16}},{type:"line",shape:$,style:{stroke:R??g[U],lineWidth:5,lineCap:"round"},emphasis:{style:{lineWidth:8}}}]}},tooltip:{formatter:_=>GE(l.segments[_.data[4]],"Click to list the mutations in this segment")}}),S=[{id:"bands",type:"line",data:[[0,0]],symbol:"none",silent:!0,lineStyle:{opacity:0},markArea:{silent:!0,data:kn.filter((y,x)=>x%2===0).map(([y])=>[{xAxis:Jl(y)[0],itemStyle:{color:s.band}},{xAxis:Jl(y)[1]}])},markLine:{silent:!0,symbol:"none",animation:!1,lineStyle:{color:s.axis,type:[5,4],width:1.25},label:{show:!0,position:"insideStartTop",formatter:`${l.baseline} copies`,color:s.faint,fontSize:10.5},data:[{yAxis:l.baseline}]}}];return i==="total"?S.push(v("cn-total","Copy number",m(y=>y.total_cn))):(S.push(v("cn-major","Major allele",m(y=>y.major_cn,Hd),s.major)),S.push(v("cn-minor","Minor allele",m(y=>y.minor_cn,-Hd),s.minor))),S.push({id:"drivers",type:"scatter",name:"Drivers",data:qE(u).map(y=>({value:[y.x,c],name:y.gene,protein:y.changes})),symbol:"triangle",symbolRotate:180,symbolSize:9,symbolOffset:[0,-11],itemStyle:{opacity:1,color:s.ink},cursor:"pointer",label:{show:!0,formatter:"{b}",position:"top",distance:3,color:s.ink2,fontSize:10.5,fontWeight:600,fontStyle:"italic"},labelLine:{show:!0,lineStyle:{color:s.axis,width:1}},labelLayout:A0({distance:3,rowGap:1}),emphasis:{scale:1.4},tooltip:{formatter:y=>`<span style="font-weight:600"><i>${y.name}</i></span> ${y.data.protein}<div style="opacity:.7;font-size:11.5px;margin-top:5px">Driver. Click to find it in the table</div>`},z:7}),S.push({id:"focus",type:"scatter",data:[],silent:!0,animation:!1,symbolSize:12,itemStyle:{opacity:1,color:s.card,borderColor:s.ink,borderWidth:2.5},label:{show:!0,position:"right",distance:8,color:s.ink,backgroundColor:s.card,borderColor:s.line,borderWidth:1,borderRadius:6,padding:[3,6],rich:{gene:{fontWeight:600,fontStyle:"italic",fontSize:11.5,color:s.ink},copies:{fontSize:11.5,color:s.muted,padding:[0,0,0,4]}}},markLine:{silent:!0,symbol:"none",animation:!1,lineStyle:{color:s.ink,type:"solid",width:1.25,opacity:.4},label:{show:!1},data:[]},z:8}),{animation:!s.reducedMotion,animationDuration:450,textStyle:{fontFamily:s.font},grid:{left:34,right:16,top:u.length?46:16,bottom:54},xAxis:{type:"value",min:0,max:gt,axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},axisLabel:U0(D0(0,gt),s)},yAxis:{type:"value",min:0,max:c,interval:1,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:s.faint,fontFamily:s.mono,fontSize:11,formatter:y=>y===c&&f?`${y}+`:`${y}`},splitLine:{lineStyle:{color:s.grid}}},tooltip:{trigger:"item",...nh(s)},dataZoom:[{type:"slider",xAxisIndex:0,filterMode:"none",height:10,bottom:6,borderColor:"transparent",backgroundColor:s.grid,fillerColor:Bl(s.accent,.16),dataBackground:{lineStyle:{opacity:0},areaStyle:{opacity:0}},selectedDataBackground:{lineStyle:{opacity:0},areaStyle:{opacity:0}},handleIcon:"path://M2,0 h2 a2,2 0 0 1 2,2 v12 a2,2 0 0 1 -2,2 h-2 a2,2 0 0 1 -2,-2 v-12 a2,2 0 0 1 2,-2 z",handleSize:"140%",handleStyle:{color:s.card,borderColor:s.axis,borderWidth:1},moveHandleSize:0,showDetail:!1,brushSelect:!1,minValueSpan:O0}],series:S}}function $E(l,i,s){const u=i.replace(/^chr/,"");return l.segments.find(c=>c.chrom===u&&c.start<=s&&s<=c.end)}function kE(l,i,s){if(!l)return{series:[{id:"focus",data:[],markLine:{data:[]}}]};const u=z0(i,s),c=$E(i,l.chrom,l.pos),f=c?s==="total"?c.total_cn:c.major_cn:null,g=tr(l.chrom,l.pos),m=Math.min(f??i.baseline,u)+(s==="allele"&&f!==null?Hd:0),v=(c==null?void 0:c.total_cn)!==null&&(c==null?void 0:c.total_cn)!==void 0?`{copies|${c.total_cn} copies}`:"";return{series:[{id:"focus",data:[{value:[g,m],label:{formatter:`{gene|${l.gene??"?"}}${v}`}}],markLine:{data:[[{coord:[g,0]},{coord:[g,u]}]]}}]}}function Li(l,[i,s]){l==null||l.dispatchAction({type:"dataZoom",startValue:i,endValue:s})}function QE(l){var s;const i=((s=l.batch)==null?void 0:s[0])??l;return i.startValue!==void 0&&i.endValue!==void 0?[i.startValue,i.endValue]:i.start!==void 0&&i.end!==void 0?[i.start/100*gt,i.end/100*gt]:null}function YE({data:l,mode:i,drivers:s,focus:u,locate:c,chartRef:f,onWindow:g,onSegment:m,onGene:v}){const[S,y]=ah(),x=j.useRef([0,gt]),C=j.useMemo(()=>y?FE(l,i,y,s):null,[l,i,y,s]),R=j.useMemo(()=>kE(u,l,i),[u,l,i]),_=j.useMemo(()=>({datazoom:E=>{const U=QE(E),B=f.current;if(!U||!B||!y)return;x.current=U;const $=D0(...U,Math.max(2,Math.round(B.getWidth()/150)));B.setOption({xAxis:{axisLabel:U0($,y)}},{lazyUpdate:!0}),g(U)},click:E=>{var U;E.seriesId==="drivers"&&E.name?v(E.name):(U=E.seriesId)!=null&&U.startsWith("cn-")&&m(l.segments[E.data[4]])}}),[f,y,l,g,m,v]),O=j.useCallback(E=>{f.current=E;const U=E.getZr(),B=E.getDom(),$=ge=>E.containPixel({gridIndex:0},ge),F=ge=>E.convertFromPixel({gridIndex:0},ge)[0],P=ge=>{const ie=[ge.offsetX,ge.offsetY];if(!$(ie))return;const qe=HE(F(ie));qe&&Li(E,Jl(qe))},X=ge=>{if(!ge.ctrlKey)return;const ie=B.getBoundingClientRect(),qe=[ge.clientX-ie.left,ge.clientY-ie.top];if(!$(qe))return;ge.preventDefault();const Qe=Math.max(-50,Math.min(50,ge.deltaY));Li(E,DE(x.current,F(qe),Math.exp(Qe*.01)))};let Z=null;const de=ge=>{Z=x.current[1]-x.current[0]<gt-.5&&$([ge.offsetX,ge.offsetY])?{pixel:ge.offsetX,view:x.current}:null},ve=ge=>{if(!Z)return;const ie=F([ge.offsetX,0])-F([Z.pixel,0]);Li(E,UE(Z.view,-ie))},Le=()=>{Z=null};return U.on("dblclick",P),U.on("mousedown",de),U.on("mousemove",ve),U.on("mouseup",Le),U.on("globalout",Le),B.addEventListener("wheel",X,{passive:!1}),()=>{U.off("dblclick",P),U.off("mousedown",de),U.off("mousemove",ve),U.off("mouseup",Le),U.off("globalout",Le),B.removeEventListener("wheel",X),f.current=null}},[f]),b=j.useCallback(E=>{const[U,B]=x.current;(U>0||B<gt)&&Li(E,[U,B])},[]);return j.useEffect(()=>{c&&Li(f.current,Jl(c.chrom))},[c,f]),d.jsx("div",{ref:S,className:"px-2 pt-1",children:C&&d.jsx(lh,{option:C,overlay:R,height:268,ariaLabel:`Copy number of ${l.sample} across the genome, against ${l.baseline} copies.`,onEvents:_,onReady:O,onDrawn:b})})}function Ps({color:l,label:i}){return d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"h-1 w-3.5 rounded-sm",style:{background:l}}),i]})}function XE({envelope:l,loading:i,picked:s,sampleLabel:u,drivers:c,focus:f,locate:g,onSegment:m,onGene:v}){var b;const[S,y]=j.useState("total"),[x,C]=j.useState([0,gt]),R=j.useRef(null),_=((b=l==null?void 0:l.data)==null?void 0:b.allele_specific)??!1,O=VE(...x);return d.jsx(pE,{title:"Copy number",subtitle:`Copy number across the genome, ${u}`,info:"copyNumber",envelope:l,loading:i,picked:s,skeletonHeight:250,controls:d.jsxs(d.Fragment,{children:[O&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:O}),d.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Show the whole genome",title:"Show the whole genome",onClick:()=>Li(R.current,[0,gt]),children:d.jsx(xC,{size:15,"aria-hidden":!0})})]}),d.jsx(hr,{label:"Copy number view",value:_?S:"total",onChange:y,options:[{value:"total",label:"Total"},{value:"allele",label:"Allele-specific",disabled:!_}]})]}),footer:d.jsxs("span",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]",style:{color:"var(--ink-2)"},children:[S==="total"||!_?d.jsxs(d.Fragment,{children:[d.jsx(Ps,{color:"var(--gain)",label:"Gain"}),d.jsx(Ps,{color:"var(--gain-strong)",label:"Amplification"}),d.jsx(Ps,{color:"var(--loss)",label:"Loss"})]}):d.jsxs(d.Fragment,{children:[d.jsx(Ps,{color:"var(--ink-2)",label:"Major allele"}),d.jsx(Ps,{color:"var(--chev)",label:"Minor allele"})]}),d.jsx("span",{style:{color:"var(--faint)"},children:"Pinch or Ctrl-scroll to zoom, drag to pan. Double-click a chromosome to fill the view."})]}),children:E=>d.jsx(YE,{data:E,mode:_?S:"total",drivers:c,focus:f,locate:g,chartRef:R,onWindow:C,onSegment:m,onGene:v})})}function H0(l){const[i,s]=l.range;return[[i,0],...l.bins.map(u=>[(u.x0+u.x1)/2,u.n]),[s,0]]}function L0(l,i){for(let s=1;s<l.length;s++){const[u,c]=l[s-1],[f,g]=l[s];if(i<=f)return f===u?g:c+(i-u)/(f-u)*(g-c)}return l[l.length-1][1]}function V0(l){return l==="ccf"?"CCF":"VAF"}function Ld(l,i){return Math.min(Math.max(i,l.range[0]),l.range[1])}const ZE=1;function KE(l,i){const s=H0(l),u=V0(l.measure);return{animation:!i.reducedMotion,animationDuration:650,animationEasing:"cubicOut",textStyle:{fontFamily:i.font},grid:{left:16,right:22,top:44,bottom:40},xAxis:{type:"value",min:l.range[0],max:l.range[1],interval:l.measure==="ccf"?.25:.1,axisLine:{lineStyle:{color:i.axis}},axisTick:{show:!1},axisLabel:{color:i.faint,fontFamily:i.mono,fontSize:10.5,lineHeight:14,formatter:c=>l.measure==="ccf"?c===1?`1.0
253
- {clonal|clonal}`:c.toFixed(2).replace(/0$/,""):c.toFixed(1),rich:{clonal:{color:i.faint,fontFamily:i.font,fontSize:10.5}}},splitLine:{show:!0,lineStyle:{color:i.grid}}},yAxis:{type:"value",show:!1,max:c=>Math.max(1,c.max)*1.25},tooltip:{trigger:"item",...nh(i)},brush:{xAxisIndex:0,seriesIndex:[ZE],brushType:"lineX",brushMode:"single",transformable:!0,removeOnClick:!0,brushStyle:{color:Bl(i.accent,.08),borderColor:Bl(i.accent,.55),borderWidth:1},outOfBrush:{colorAlpha:.25},throttleType:"debounce",throttleDelay:120},series:[{id:"density",type:"line",name:u,data:s,smooth:.45,symbol:"none",silent:!0,lineStyle:{width:2.25,color:i.ccfLine},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:Bl(i.ccfFill,.26)},{offset:1,color:Bl(i.ccfFill,.02)}]}},markLine:l.measure==="ccf"?{silent:!0,symbol:"none",animation:!1,lineStyle:{color:i.axis,type:[4,4],width:1.25},label:{show:!1},data:[{xAxis:1}]}:void 0},{id:"drivers",type:"scatter",name:"Drivers",data:[...l.drivers].sort((c,f)=>c.value-f.value).map(c=>({value:[Ld(l,c.value),L0(s,Ld(l,c.value))],name:c.gene??"?",protein:c.protein_change,actual:c.value})),symbolSize:10,cursor:"pointer",itemStyle:{opacity:1,color:i.dot,borderColor:i.card,borderWidth:2.5,shadowBlur:6,shadowColor:Bl(i.dot,.3)},emphasis:{scale:1.5},label:{show:!0,formatter:"{b}",position:"top",distance:10,color:i.ink,fontWeight:600,fontStyle:"italic",fontSize:11.5},labelLine:{show:!0,lineStyle:{color:i.axis,width:1}},labelLayout:A0({top:4}),tooltip:{formatter:c=>`<span style="font-weight:600"><i>${c.name}</i></span> ${c.data.protein??""}<div style="margin-top:3px">${u} <span style="font-weight:600">${c.data.actual.toFixed(2)}</span></div><div style="opacity:.7;font-size:11.5px;margin-top:5px">Driver. Click to find it in the table</div>`},z:4},{id:"focus",type:"scatter",data:[],silent:!0,symbolSize:13,itemStyle:{opacity:1,color:i.card,borderColor:i.ink,borderWidth:2.5},label:{show:!0,position:"right",distance:8,color:i.ink,fontSize:11,fontWeight:600,backgroundColor:i.card,borderColor:i.line,borderWidth:1,borderRadius:6,padding:[3,6]},markLine:{silent:!0,symbol:"none",animation:!1,lineStyle:{color:i.ink,type:"solid",width:1.25,opacity:.45},label:{show:!1},data:[]},animation:!1,z:6}]}}function IE(l,i){const s=i?l.measure==="ccf"?i.ccf:i.vaf:null;if(s==null)return{series:[{id:"focus",data:[],markLine:{data:[]}}]};const u=Ld(l,s),c=L0(H0(l),u);return{series:[{id:"focus",data:[{value:[u,c],label:{formatter:`${(i==null?void 0:i.gene)??"?"} ${s.toFixed(2)}`}}],markLine:{data:[[{coord:[u,0]},{coord:[u,c]}]]}}]}}function gy(l,i){l.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"lineX",brushMode:"single"}}),l.dispatchAction({type:"brush",areas:i?[{brushType:"lineX",xAxisIndex:0,coordRange:i}]:[]})}const my=l=>Math.round(l*100)/100;function JE({data:l,range:i,focus:s,onRange:u,onGene:c}){const[f,g]=ah(),m=j.useRef(null),v=j.useRef(i);v.current=i;const S=j.useMemo(()=>g?KE(l,g):null,[l,g]),y=j.useMemo(()=>IE(l,s),[l,s]),x=j.useMemo(()=>({brushEnd:O=>{const b=O.areas[0];if(!b)return u(null);const[E,U]=b.coordRange;u(U-E<.005?null:[my(E),my(U)])},click:O=>{O.seriesId==="drivers"&&O.name&&c(O.name)}}),[u,c]),C=j.useCallback(O=>(m.current=O,()=>{m.current=null}),[]),R=j.useCallback(O=>gy(O,v.current),[]);j.useEffect(()=>{m.current&&gy(m.current,i)},[i]);const _=V0(l.measure);return d.jsx("div",{ref:f,className:"strip-chart",children:S&&d.jsx(lh,{option:S,overlay:y,height:196,ariaLabel:`${_} of ${l.total} variants in ${l.sample}${l.drivers.length?`, with ${l.drivers.map(O=>`${O.gene} at ${O.value.toFixed(2)}`).join(", ")}`:""}.`,onEvents:x,onReady:C,onDrawn:R})})}function PE({envelope:l,loading:i,measure:s,onMeasure:u,range:c,focus:f,onRange:g,onGene:m}){const v=s==="ccf"?"Cancer cell fraction":"Variant allele fraction",S=(l==null?void 0:l.status)==="ok"?l.data:null;return d.jsxs("div",{className:"strip",children:[d.jsxs("div",{className:"strip-head",children:[d.jsx("span",{className:"text-[13px] font-semibold",children:v}),S&&d.jsxs("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:[S.median!==null?`Median ${S.median.toFixed(2)}. `:"","Drag across the plot to filter the table."]}),d.jsx("span",{className:"flex-auto"}),d.jsx(hr,{label:"Measure",value:s,onChange:u,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),d.jsx(dr,{label:v,envelope:l,loading:i,skeletonHeight:180,children:y=>d.jsx(JE,{data:y,range:c,focus:f,onRange:g,onGene:m})})]})}const WE=Object.keys(C0),ew=Object.keys(E0);function py(l,i){return l.includes(i)?l.filter(s=>s!==i):[...l,i]}function ld({label:l,count:i,active:s,onClick:u}){return d.jsxs("button",{type:"button",className:"facet","aria-pressed":s,"data-empty":!s&&i===0,onClick:u,children:[d.jsx("span",{className:"facet-check","aria-hidden":!0,children:s&&d.jsx(sC,{size:11,strokeWidth:3})}),d.jsx("span",{className:"truncate",children:l}),d.jsx("span",{className:"facet-n",children:i===void 0?"":i.toLocaleString("en-US")})]})}function tw({table:l,data:i,onChange:s}){const u=i==null?void 0:i.facets.effects,c=i==null?void 0:i.facets.flags,f=l.range;return d.jsxs("aside",{className:"facets","aria-label":"Filters",children:[d.jsxs("div",{className:"facet-group",role:"group","aria-label":"Effect",children:[d.jsx("span",{className:"facet-title",children:"Effect"}),WE.map(g=>d.jsx(ld,{label:C0[g],count:u==null?void 0:u[g],active:l.effects.includes(g),onClick:()=>s({effects:py(l.effects,g)})},g))]}),d.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[d.jsx("span",{className:"facet-title",children:"Flags"}),ew.map(g=>d.jsx(ld,{label:E0[g],count:c==null?void 0:c[g],active:l.flags.includes(g),onClick:()=>s({flags:py(l.flags,g)})},g))]}),(i==null?void 0:i.ffpe)&&d.jsxs("div",{className:"facet-group",role:"group","aria-label":"FFPE filter",children:[d.jsx("span",{className:"facet-title",children:"FFPE filter"}),d.jsx(ld,{label:"Show filtered calls",count:i.ffpe.removed,active:l.ffpe,onClick:()=>s({ffpe:!l.ffpe})}),d.jsx("span",{className:"facet-note",children:i.ffpe.threshold!==null?`As in the report, calls FFPERASE scores above ${i.ffpe.threshold} are left out of the counts.`:"As in the report, calls its FFPE filter removes are left out of the counts."})]}),f&&d.jsxs("div",{className:"facet-group",role:"group","aria-label":"Range",children:[d.jsxs("span",{className:"facet-title",children:[f.measure==="ccf"?"CCF":"VAF"," range"]}),d.jsxs("span",{className:"facet-range",children:[d.jsxs("span",{className:"mono",children:[f.low.toFixed(2)," – ",f.high.toFixed(2)]}),d.jsx("button",{type:"button",className:"sc-ib xs","aria-label":"Remove the range",title:"Remove the range",onClick:()=>s({range:null}),children:d.jsx(Pd,{size:13,"aria-hidden":!0})})]})]}),b0(l)>0&&d.jsx("button",{type:"button",className:"facet-clear",onClick:()=>s({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}function nw({value:l,onChange:i}){const[s,u]=j.useState(l),c=j.useRef(null),f=j.useRef(i);f.current=i,j.useEffect(()=>u(l),[l]),j.useEffect(()=>{if(s===l)return;const m=window.setTimeout(()=>f.current(s),250);return()=>window.clearTimeout(m)},[s,l]),j.useEffect(()=>{const m=v=>{var S,y,x;v.key!=="/"||v.metaKey||v.ctrlKey||v.altKey||(y=(S=v.target)==null?void 0:S.closest)!=null&&y.call(S,"input, textarea, select, [contenteditable]")||(v.preventDefault(),(x=c.current)==null||x.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[]);const g=()=>{u(""),i("")};return d.jsxs("div",{className:"field search-field",children:[d.jsx(ur,{size:15,"aria-hidden":!0,style:{color:"var(--chev)"}}),d.jsx("input",{ref:c,type:"search","aria-label":"Search mutations",placeholder:"Search gene, change or locus",value:s,onChange:m=>u(m.target.value),onKeyDown:m=>{m.key==="Escape"&&g(),m.key==="Enter"&&i(s)}}),s?d.jsx("button",{type:"button",className:"search-clear","aria-label":"Clear the search",onClick:g,children:d.jsx(Pd,{size:14,"aria-hidden":!0})}):d.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"})]})}/**
251
+ */const bC=Ue("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
252
+ * @license lucide-react v0.468.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const wC=Ue("Waves",[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]]);/**
257
+ * @license lucide-react v0.468.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const Qu=Ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
262
+ * @license lucide-react v0.468.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const CC=Ue("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function jC(n){if(n.value===null)return n.text??"";switch(n.key){case"coverage":return`${Math.round(n.value)}×`;case"tmb":return n.value<.01?n.value.toPrecision(2):n.value.toFixed(2);default:return n.value.toFixed(2)}}function EC(n){return n.status==="failed"?"Failed":n.status==="skipped"?"Not in this mode":"Not run"}const NC=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function O1(n){if(!n)return"";const s=new Date(n);return Number.isNaN(s.getTime())?"":NC.format(s)}function lm(n,s){return n.startsWith(`${s}_`)?n.slice(s.length+1):n}function Oh(n){return n==null?"–":n.toFixed(2)}const sy={missense_variant:"Missense",stop_gained:"Nonsense",stop_lost:"Stop lost",start_lost:"Start lost",frameshift_variant:"Frameshift",inframe_deletion:"In-frame deletion",inframe_insertion:"In-frame insertion",splice_acceptor_variant:"Splice acceptor",splice_donor_variant:"Splice donor",splice_region_variant:"Splice region",synonymous_variant:"Synonymous",intron_variant:"Intronic",upstream_gene_variant:"Upstream",downstream_gene_variant:"Downstream","5_prime_UTR_variant":"5′ UTR","3_prime_UTR_variant":"3′ UTR"};function _C(n,s){const i=(n??s??"").split("&")[0];if(!i)return"–";if(sy[i])return sy[i];const r=i.replace(/_/g," ");return r.charAt(0).toUpperCase()+r.slice(1)}function Fr(n,s){return`chr${n}:${s.toLocaleString("en-US")}`}const On=[["1",249250621],["2",243199373],["3",198022430],["4",191154276],["5",180915260],["6",171115067],["7",159138663],["8",146364022],["9",141213431],["10",135534747],["11",135006516],["12",133851895],["13",115169878],["14",107349540],["15",102531392],["16",90354753],["17",81195210],["18",78077248],["19",59128983],["20",63025520],["21",48129895],["22",51304566],["X",155270560]],zh=.0025,MC=On.reduce((n,[,s])=>n+s,0),RC=1-zh*On.length,Yu=(()=>{const n={};let s=zh/2;for(const[i,r]of On){const u=r/MC*RC;n[i]=[s,s+u],s+=u+zh}return n})(),iy=Object.fromEntries(On);function Hu(n,s){const i=n.replace(/^chr/,""),r=Yu[i];if(!r)return null;const u=Math.min(Math.max(s,0),iy[i]);return r[0]+u/iy[i]*(r[1]-r[0])}function ry(n,s,i,r){const u=r*2*Math.PI-Math.PI/2;return[n+i*Math.cos(u),s+i*Math.sin(u)]}function Vd(n,s,i,r,u){const[d,h]=ry(n,s,i,r),[m,p]=ry(n,s,i,u),y=u-r>.5?1:0;return`M${d.toFixed(2)},${h.toFixed(2)} A${i},${i} 0 ${y} 1 ${m.toFixed(2)},${p.toFixed(2)}`}function Dh(n,s="start"){let i=null;for(const d of On){const[h,m]=d,[p,y]=Yu[h];if(n<p&&s==="end"&&i)return{chrom:i[0],pos:i[1]};if(n<=y)return{chrom:h,pos:Math.round(Math.max(0,(n-p)/(y-p))*m)};i=d}const[r,u]=On[On.length-1];return{chrom:r,pos:u}}function Or(n,s){const i=s>=1e6?0:s>=1e5?1:2;return`${(n/1e6).toFixed(i)} Mb`}const TC={hero:{box:220,ring:78,ringW:10,gain:93,gainW:7,amp:94,ampW:13,loss:63,lossW:7,drv:50,drvW:9},switcher:{box:48,ring:16,ringW:4.5,gain:21,gainW:3,amp:21,ampW:4.5,loss:11,lossW:3,drv:0,drvW:0},mini:{box:20,ring:7,ringW:2.6,gain:7,gainW:2.6,amp:7,ampW:2.6,loss:7,lossW:2.6,drv:0,drvW:0}},oy=.004,uy=.003;function AC(n,s,i){const r=Hu(n,s),u=Hu(n,i);return r===null||u===null?null:u-r<oy?[r,r+oy]:[r,u]}function $d(n){return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function OC(n,s,i){return n===1?`one ${s}`:`${n} ${i}`}function z1(n){const i=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([h,m,p])=>{const y=n.events.filter(C=>C.kind===h);if(y.length===0)return[];const x=[...new Set(y.map(C=>C.chrom))],v=x.length>6?[...x.slice(0,6),`${x.length-6} more`]:x,b=x.length===1?`chromosome ${x[0]}`:`chromosomes ${$d(v)}`,w=h==="amp"&&y.length===1&&y[0].total_cn!==null?` (${Math.round(y[0].total_cn)} copies)`:"";return[`${OC(y.length,m,p)} on ${b}${w}`]}),r=i.length?$d(i):`no copy-number changes against ${n.baseline} copies`,u=[...new Set(n.drivers.map(h=>h.gene).filter(h=>!!h))].sort(),d=u.length?`Drivers in ${$d(u)}.`:"No drivers.";return`${r.charAt(0).toUpperCase()}${r.slice(1)}. ${d}`}function am({fingerprint:n,size:s,title:i,subtitle:r,className:u}){const d=TC[s],h=d.box/2,m=(n==null?void 0:n.events)??[],p=(n==null?void 0:n.drivers)??[],y=n?`Genome fingerprint: ${z1(n)}`:"No copy-number data";return f.jsxs("svg",{viewBox:`0 0 ${d.box} ${d.box}`,role:s==="mini"?void 0:"img","aria-label":s==="mini"?void 0:y,"aria-hidden":s==="mini"?!0:void 0,className:u,children:[f.jsxs("g",{fill:"none",strokeLinecap:"butt",children:[Object.entries(Yu).map(([x,[v,b]])=>f.jsx("path",{className:"r-neu",strokeWidth:d.ringW,d:Vd(h,h,d.ring,v,b)},x)),m.map((x,v)=>{const b=AC(x.chrom,x.start,x.end);if(!b)return null;const w=x.kind==="loss"?d.loss:x.kind==="amp"?d.amp:d.gain,C=x.kind==="loss"?d.lossW:x.kind==="amp"?d.ampW:d.gainW;return f.jsx("path",{className:`r-${x.kind}`,strokeWidth:C,d:Vd(h,h,w,b[0],b[1])},`${x.chrom}-${x.start}-${v}`)}),d.drvW>0&&p.map((x,v)=>{const b=Hu(x.chrom,x.pos);return b===null?null:f.jsx("path",{className:"r-drv",strokeWidth:d.drvW,d:Vd(h,h,d.drv,b-uy/2,b+uy/2)},`${x.gene}-${x.pos}-${v}`)})]}),s==="hero"&&i&&f.jsxs(f.Fragment,{children:[f.jsx("text",{className:"t-ink",x:h,y:h-2,textAnchor:"middle",fontSize:"24",fontWeight:"800",children:i}),r&&f.jsx("text",{className:"t-faint",x:h,y:h+18,textAnchor:"middle",fontSize:"12",fontWeight:"600",children:r})]})]})}const zC={"DNA|WG":{label:"WGS",icon:qu},"RNA|WT":{label:"RNA",icon:aC}};function cy({children:n}){return f.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:n})}function DC({sex:n}){const s=n==null?void 0:n.toUpperCase();return s==="MALE"?f.jsxs(cy,{children:[f.jsx("circle",{cx:"12",cy:"9",r:"4.5"}),f.jsx("path",{d:"M7.6 8.2c.5-2.9 2.4-4.7 4.6-4.7 2.6 0 4.4 1.7 4.4 4.3-2.2.1-4.2-.6-5.6-2.1"}),f.jsx("path",{d:"M3.5 21a8.5 7.5 0 0 1 17 0"}),f.jsx("path",{d:"m10 15.6 2 2.2 2-2.2"})]}):s==="FEMALE"?f.jsxs(cy,{children:[f.jsx("circle",{cx:"12",cy:"9.2",r:"3.4"}),f.jsx("path",{d:"M6.3 14.2C4.6 9 6.6 2.8 12 2.8s7.4 6.2 5.7 11.4"}),f.jsx("path",{d:"M5 21.2a7 6.3 0 0 1 14 0"})]}):f.jsx(SC,{size:16,"aria-hidden":!0})}const D1="wgts-patient-root";function HC(n,s){const i=n.getBoundingClientRect(),r=n.closest(".topbar"),u=r==null?void 0:r.parentElement,d=r&&u?u.getBoundingClientRect().top-r.getBoundingClientRect().top:0;return{x:i.left-s.left+i.width/2,y:i.top+d-s.top+i.height/2}}const H1=8;function Fd(n,s,i,r){const u=i>=n.x?1:-1,d=Math.min(H1,Math.abs(i-n.x)/2,(s-n.y-14)/2);return[`M${n.x},${n.y+14}`,`V${s-d}`,`Q${n.x},${s} ${n.x+u*d},${s}`,`H${i-u*d}`,`Q${i},${s} ${i},${s+d}`,`V${r}`].join(" ")}function LC(n,s,i){const r=i.x>s.x?1:-1,u=Math.min(H1,Math.abs(i.x-s.x)/2,(s.top-n)/2);return[`M${s.x},${s.top}`,`V${n+u}`,`Q${s.x},${n} ${s.x+r*u},${n}`,`H${i.x-r*u}`,`Q${i.x},${n} ${i.x},${n+u}`,`V${i.top}`].join(" ")}function UC(n,s,i){const r=s.left+s.width/2,u=i.left+i.width/2,d=n-7,m=(n-25-.25*d)/.75;return`M${r},${d} C${r},${m} ${u},${m} ${u},${d}`}function VC(n,s){var r,u;const i=n.samples.find(d=>d.id===s);for(const d of(i==null?void 0:i.experiments)??[]){const h=(r=n.experiments[d])==null?void 0:r.normal,m=h?(u=n.experiments[h])==null?void 0:u.sample:void 0;if(m&&m!==s)return m}return null}function $C({data:n,sampleId:s,fingerprint:i,onSample:r}){const u=E.useRef(null),[d,h]=E.useState(null),[m,p]=E.useState(!1);E.useEffect(()=>{if(!d||m)return;const R=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(R)},[d,m]);const y=new Set(n.failures.map(R=>R.sample)),x=E.useRef(s),[v,b]=E.useState(null);E.useEffect(()=>{if(x.current===s)return;const R=x.current;x.current=s,b(j=>({from:R,to:s,n:((j==null?void 0:j.n)??0)+1}))},[s]);const w=VC(n,s);E.useLayoutEffect(()=>{const R=u.current;if(!R)return;const j=()=>{const T=R.getBoundingClientRect(),H=document.getElementById(D1);if(!H)return;const D=Array.from(R.querySelectorAll("[data-sample]")).map(te=>{const k=te.getBoundingClientRect();return{id:te.dataset.sample,x:k.left-T.left+22,left:k.left-T.left,width:k.width,top:k.top-T.top,bottom:k.bottom-T.top}}),z=HC(H,T),Y=Math.min(...D.map(te=>te.top));h({root:z,trunk:Y-12,tabs:D})};if(j(),typeof ResizeObserver>"u")return;const F=new ResizeObserver(j);return F.observe(R),()=>F.disconnect()},[n,s]);const C=d==null?void 0:d.tabs.find(R=>R.id===s),N=w?d==null?void 0:d.tabs.find(R=>R.id===w):void 0,M=v?d==null?void 0:d.tabs.find(R=>R.id===v.from):void 0;return f.jsxs("div",{ref:u,className:"ltabs",children:[d&&f.jsxs("svg",{className:"ltabs-links","aria-hidden":!0,children:[d.tabs.map(R=>f.jsx("path",{d:Fd(d.root,d.trunk,R.x,R.top)},R.id)),C&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":m,style:{d:`path("${Fd(d.root,d.trunk,C.x,C.top)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":m,style:{d:`path("${Fd(d.root,d.trunk,C.x,C.top)}")`}}),M&&v&&v.to===C.id&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:LC(d.trunk,M,C)},`bead-${v.n}`)]}),C&&N&&f.jsxs("g",{className:"ltabs-match",children:[f.jsx("path",{d:UC(d.trunk,C,N)}),f.jsx("text",{x:(C.left+C.width/2+N.left+N.width/2)/2,y:d.trunk-27,children:"matched normal"})]})]}),C&&f.jsx("span",{className:"ltabs-thumb","data-moving":m,"aria-hidden":!0,style:{width:C.width,height:C.bottom-C.top,transform:`translate(${C.left}px, ${C.top}px)`}}),f.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:n.samples.map(R=>{const j=R.id===s,F=i==null?void 0:i.samples.find(H=>H.sample===R.id),T=R.experiments.map(H=>({id:H,...n.experiments[H]})).filter(H=>H.technique);return f.jsxs("button",{type:"button",role:"tab","data-sample":R.id,"aria-selected":j,className:"ltab",onClick:()=>r(R.id),children:[f.jsxs("span",{className:"ltab-name",children:[R.category==="TUMOR"?f.jsx(am,{fingerprint:F,size:"mini",className:"h-[18px] w-[18px] flex-none"}):f.jsx(T1,{size:15,"aria-hidden":!0,className:"flex-none"}),lm(R.id,n.individual.id)," ",R.category==="TUMOR"?"tumour":"normal",y.has(R.id)&&f.jsx("span",{className:"ltab-warn",title:"A module failed for this sample","aria-label":"A module failed"})]}),f.jsxs("span",{className:"ltab-exps",children:[T.length===0&&f.jsx("span",{children:"No experiments"}),T.map(H=>{const D=zC[H.technique],z=(D==null?void 0:D.icon)??qu;return f.jsxs("span",{title:H.id,children:[f.jsx(z,{size:12,"aria-hidden":!0}),(D==null?void 0:D.label)??H.technique]},H.id)})]})]},R.id)})})]})}function FC({data:n,sampleId:s,fingerprint:i,onSample:r}){return f.jsx("div",{className:"ctabs",role:"tablist","aria-label":"Samples",children:n.samples.map(u=>{const d=i==null?void 0:i.samples.find(h=>h.sample===u.id);return f.jsxs("button",{type:"button",role:"tab","aria-selected":u.id===s,className:"ctab",onClick:()=>r(u.id),children:[u.category==="TUMOR"?f.jsx(am,{fingerprint:d,size:"mini",className:"h-[16px] w-[16px] flex-none"}):f.jsx(T1,{size:14,"aria-hidden":!0,className:"flex-none"}),lm(u.id,n.individual.id)," ",u.category==="TUMOR"?"tumour":"normal"]},u.id)})})}function Dr(n){let s=n;const i=new Set;return{get:()=>s,set:r=>{Object.is(r,s)||(s=r,i.forEach(u=>u()))},subscribe:r=>(i.add(r),()=>i.delete(r))}}function Iu(n){return E.useSyncExternalStore(n.subscribe,n.get,n.get)}const sm=Dr(!1),Br=()=>sm.set(!0),Eu=()=>sm.set(!1),BC=Dr(!0);function L1({individualId:n,subtitle:s,patientIcon:i,report:r,compact:u,headerInView:d=BC}){const h=!Iu(d),[m,p]=E.useState(!1),[y,x]=E.useState(!1);E.useEffect(()=>{const b=()=>x(window.scrollY>4);return b(),window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]);async function v(){try{await navigator.clipboard.writeText(window.location.href),p(!0),window.setTimeout(()=>p(!1),1600)}catch{window.prompt("Copy this link",window.location.href)}}return f.jsxs("div",{className:"topbar flex flex-wrap items-center justify-between gap-x-4 gap-y-3 px-8 pt-3 pb-2","data-scrolled":y,children:[f.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-2 text-[13.5px]",children:[f.jsx("button",{type:"button",className:"crumb",onClick:Br,title:"Browse projects and patients",children:"Patients"}),n&&f.jsxs(f.Fragment,{children:[f.jsx(nm,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),i&&f.jsx("span",{id:D1,className:"ltabs-icon",children:i}),f.jsx("h1",{className:"m-0 text-[20px] font-semibold tracking-tight",style:{color:"var(--ink)"},children:n}),s&&f.jsx("span",{className:"ml-1.5 truncate text-[13.5px]",style:{color:"var(--muted)"},children:s})]})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,f.jsx("button",{type:"button",className:"sc-ib","aria-label":"Copy a link to this view",onClick:v,children:f.jsx(dC,{size:16,"aria-hidden":!0})}),f.jsx("span",{"aria-live":"polite",className:"text-xs",style:{color:"var(--muted)"},children:m?"Link copied":""})]}),u&&f.jsx("div",{className:"topbar-compact","data-open":h,inert:!h,"aria-hidden":!h,children:f.jsx("div",{children:u})})]})}function kC(){const n=tm(),[s,i]=E.useState("");return f.jsxs("div",{className:`wgts ${Gn.theme}`,children:[f.jsx("aside",{className:"side","aria-label":"Navigation",children:f.jsxs("div",{className:"side-brand",children:[f.jsx("span",{className:"side-badge","aria-hidden":!0,children:f.jsx(qu,{size:17,strokeWidth:2})}),f.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),f.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients",onClick:Br,children:f.jsx(Du,{size:17,"aria-hidden":!0})})]})}),f.jsxs("div",{className:"page",children:[f.jsx(L1,{}),f.jsxs("main",{className:"flex flex-col gap-4 px-8 pt-8 pb-10",children:[f.jsx("h1",{className:"m-0 text-[28px] font-semibold tracking-tight",children:"Open a patient"}),f.jsx("p",{className:"m-0 max-w-[60ch] text-[14.5px]",style:{color:"var(--ink-2)"},children:"Browse the projects that have a dashboard and pick a patient, or enter an individual's system id to see its WGTS report as live charts and tables."}),f.jsx("div",{children:f.jsxs("button",{type:"button",className:"sc-btn sc-b1 gap-2",onClick:Br,children:[f.jsx(uC,{size:16,"aria-hidden":!0}),"Browse projects and patients"]})}),f.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:r=>{r.preventDefault(),s.trim()&&n(`/${s.trim()}`)},children:[f.jsxs("div",{className:"field w-[340px] max-w-full",children:[f.jsx(Du,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),f.jsx("label",{className:"sr-only",htmlFor:"open-id",children:"Individual id"}),f.jsx("input",{id:"open-id",placeholder:"IID_H000001",value:s,onChange:r=>i(r.target.value)})]}),f.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:!s.trim(),children:"Open"})]})]})]})]})}class Xu extends Error{}class U1 extends Error{}function GC(){try{return localStorage.getItem(Th)}catch{return null}}function V1(n){try{n?localStorage.setItem(Th,n):localStorage.removeItem(Th)}catch{}}function $1(){const n=GC();return{Accept:"application/json",...n?{Authorization:`Token ${n}`}:{}}}async function Ca(n,s={}){const i=new URLSearchParams;for(const[d,h]of Object.entries(s))h&&i.set(d,h);const r=i.toString(),u=await fetch(`${Gn.apiHost}/wgts/api/${n}${r?`?${r}`:""}`,{headers:$1()});if(u.status===401)throw new Xu;if(u.status===403){const d=await u.json().catch(()=>({}));throw new U1(d.detail??"You may not see this patient's results.")}if(!u.ok)throw new Error(`The dashboard API answered ${u.status}.`);return await u.json()}async function qC(n){if(!(await fetch(`${Gn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${n}`}})).ok)throw new Error("Isabl did not accept that token.");V1(n)}async function QC(n,s){const i=await fetch(`${Gn.apiHost}/api/v1/rest-auth/login/`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({username:n,password:s})});if(!i.ok)throw new Error("Isabl did not accept that username and password.");const r=await i.json();V1(r.key)}async function F1(n){const s=await fetch(`${Gn.apiHost}/wgts/api/${n}`,{headers:$1()});if(s.status===401)throw new Xu;if(!s.ok)throw new Error(`The dashboard API answered ${s.status}.`);return await s.json()}const YC=()=>F1("projects/"),IC=n=>F1(`projects/${n}/individuals/`);function Hh(n){const s=n.toUpperCase();return s.startsWith("BATTENBERG")||s.startsWith("CNV_")?"cn":s.startsWith("ANNOT_SNVS")||s.startsWith("ANNOT_INDELS")||s.startsWith("FFPERASE")?"mut":s.startsWith("MSISENSOR")?"msi":"other"}function Ei(n){return`fam-${Hh(n)}`}function B1(n){return n.pk?`${n.app} #${n.pk}`:n.app}function Ft(n){return`${n.app}#${n.pk??""}`}const k1={drivers:"gene",coding:"position",all:"position"},XC=100;function fy(){return{scope:"drivers",sort:k1.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function G1(n){return(n.q.trim()?1:0)+n.effects.length+n.flags.length+(n.range?1:0)}function KC(n){const s={scope:n.scope,sort:n.sort,q:n.q.trim()||void 0,effects:n.effects.join(",")||void 0,flags:n.flags.join(",")||void 0,ffpe:n.ffpe?"all":void 0};return n.range&&(s[`${n.range.measure}_min`]=String(n.range.low),s[`${n.range.measure}_max`]=String(n.range.high)),s}const q1={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},Q1={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function ZC(n){return`${n.chrom}:${n.pos}:${n.ref}>${n.alt}`}const Y1=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function PC(n){return Y1.test(n.trim())}function JC(n,s,i){return`chr${n}:${s.toLocaleString("en-US")}-${i.toLocaleString("en-US")}`}const WC={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function ej(n){var d;if(!n)return null;const s=n.split(";"),i=(d=n.match(/SOM=(\d+)/))==null?void 0:d[1],r=WC[s[0]];return!i&&!r?n:[i?`${Number(i).toLocaleString("en-US")} somatic ${i==="1"?"sample":"samples"}`:"",r].filter(Boolean).join(", ")}function tj(n){const s=n==null?void 0:n.match(/^(\d+)\/(\d+)$/);return s?`${s[1]} of ${s[2]} ${s[2]==="1"?"copy":"copies"}`:n}function nj(n){return n.oncogene&&n.tsg?"Oncogene and TSG":n.oncogene?"Oncogene":n.tsg?"TSG":null}const ul=(n,s)=>!(s instanceof Xu)&&n<2;function lj(n,s){return Ol({queryKey:["individual",n,s??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/`,{version:s}),retry:ul})}function aj(n,s,i){return Ol({queryKey:["metrics",n,s,i??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/metrics/`,{sample:s,version:i}),enabled:!!s,retry:ul})}function sj(n,s){return Ol({queryKey:["fingerprint",n,s??null],queryFn:()=>Ca(`individuals/${encodeURIComponent(n)}/fingerprint/`,{version:s}),retry:ul})}const Kr=(n,s)=>`individuals/${encodeURIComponent(n)}/${s}/`;function ij(n,s,i){return Ol({queryKey:["cn",n,s,i??null],queryFn:()=>Ca(Kr(n,"cn"),{sample:s,version:i}),enabled:!!s,retry:ul})}function rj(n,s,i,r,u){return Ol({queryKey:["ccf",n,s,i,r,u??null],queryFn:()=>Ca(Kr(n,"ccf"),{sample:s,measure:i,version:u,ffpe:r?"all":void 0}),enabled:!!s,retry:ul})}function oj(n,s,i){return Ol({queryKey:["signatures",n,s,i??null],queryFn:()=>Ca(Kr(n,"signatures"),{sample:s,version:i}),enabled:!!s,retry:ul})}function uj(n,s,i){return Ol({queryKey:["svs",n,s,i??null],queryFn:()=>Ca(Kr(n,"svs"),{sample:s,version:i}),enabled:!!s,retry:ul})}function cj(n,s,i,r){return tw({queryKey:["variants",n,s,i,r??null],queryFn:({pageParam:u})=>Ca(Kr(n,"variants"),{sample:s,version:r,...KC(i),page:String(u),page_size:String(XC)}),initialPageParam:1,getNextPageParam:(u,d,h)=>u.status!=="ok"||!u.data?void 0:d.reduce((p,y)=>p+(y.status==="ok"&&y.data?y.data.rows.length:0),0)<u.data.total?h+1:void 0,enabled:!!s,placeholderData:Wy,retry:ul})}function fj(){return Ol({queryKey:["picker","projects"],queryFn:YC,staleTime:6e4,retry:ul})}function dj(n){return Ol({queryKey:["picker","patients",n],queryFn:()=>IC(n),staleTime:6e4,placeholderData:Wy,retry:ul})}const ci=6,hj=16,I1=7,Lu=6;function Bd(n){const s=Math.min(I1,(n-Lu)/2);return`M${ci},${Lu} V${n-s}`}function kd(n){const s=Math.min(I1,(n-Lu)/2);return`M${ci},${n-s} Q${ci},${n} ${ci+s},${n} H${hj}`}function mj(n,s){return`M${ci},${n} V${s}`}function gj(n,s,i,r){const[u,d]=E.useState(null),[h,m]=E.useState([]),[p,y]=E.useState(!1),[x,v]=E.useState(null),[b,w]=E.useState(280),C=n.map(D=>`${D.key}:${D.available}`).join();E.useLayoutEffect(()=>{if(!u)return;const D=()=>{const Y=Array.from(u.querySelectorAll(i));m(n.flatMap((te,k)=>{const ne=Y[k];if(!ne)return[];const ie=ne.offsetTop,Ce=ne.offsetHeight;return[{key:te.key,cy:ie+Ce/2,top:ie,height:Ce,available:te.available}]}))};if(D(),typeof ResizeObserver>"u")return;const z=new ResizeObserver(D);return z.observe(u),()=>z.disconnect()},[u,C,i,r]);const N=h.find(D=>D.key===s&&D.available),M=N?{top:N.top,height:N.height}:null;E.useEffect(()=>{if(!N||p)return;const D=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(D)},[N,p]);const[R,j]=E.useState(s);E.useEffect(()=>{if(R===s)return;const D=R;j(s),D&&s&&v(z=>({from:D,to:s,n:((z==null?void 0:z.n)??0)+1}))},[s,R]);const F=x?h.find(D=>D.key===x.from):void 0,[T,H]=E.useState(null);return E.useLayoutEffect(()=>{if(N&&T!==null&&T!==N.cy){const D=Math.abs(N.cy-T)/38;w(Math.round(Math.min(620,240+80*D)))}H(N?N.cy:null)},[N==null?void 0:N.key,N==null?void 0:N.cy]),{setBox:d,tree:h,on:N,light:M,glides:p,hop:x,leaving:F,duration:b}}function pj({tree:n,on:s,light:i,glides:r,hop:u,leaving:d}){return f.jsxs(f.Fragment,{children:[n.length>0&&f.jsxs("svg",{className:"ltabs-links side-tree","aria-hidden":!0,children:[f.jsx("circle",{cx:ci,cy:Lu,r:"2.5",className:"side-root"}),f.jsx("path",{d:Bd(n[n.length-1].cy)}),n.map(h=>f.jsx("path",{d:kd(h.cy),"data-off":h.available?void 0:"true"},h.key)),s&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":r,style:{d:`path("${Bd(s.cy)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":r,style:{d:`path("${Bd(s.cy)}")`}})]}),n.map(h=>f.jsxs("g",{className:"side-stub","data-active":h.key===(s==null?void 0:s.key)||void 0,children:[f.jsx("path",{className:"ltabs-haze",d:kd(h.cy)}),f.jsx("path",{className:"ltabs-on",d:kd(h.cy)})]},h.key)),s&&d&&u&&u.to===s.key&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:mj(d.cy,s.cy)},`bead-${u.n}`)]}),f.jsx("span",{className:"side-light","aria-hidden":!0,"data-on":i?"true":void 0,"data-glides":r||void 0,style:i?{transform:`translateY(${i.top}px)`,height:i.height}:void 0})]})}const Gd=[{key:"overview",label:"Overview",icon:fC},{key:"copyNumber",label:"Copy number",icon:nC},{key:"mutations",label:"Mutations",icon:mC},{key:"structuralVariants",label:"Structural variants",icon:xC},{key:"signatures",label:"Signatures and HRD",icon:sC},{key:"rna",label:"RNA",icon:wC,soon:!0},{key:"germline",label:"Germline",icon:yC,soon:!0},{key:"quality",label:"Quality",icon:rC,soon:!0}],dy="wgts-side-collapsed";function vj(){const[n,s]=E.useState(()=>{try{return localStorage.getItem(dy)==="1"}catch{return!1}});return[n,r=>{s(r);try{localStorage.setItem(dy,r?"1":"0")}catch{}}]}function yj({analyses:n,onPage:s,sampleLabel:i,picked:r,onPick:u,sections:d,activeStore:h,onSection:m}){const p=Iu(h),[y,x]=vj(),{setBox:v,...b}=gj(Gd.map(({key:z})=>({key:z,available:d.has(z)})),p,".sc-nav",y),[w,C]=E.useState(!1),[N,M]=E.useState(!1),R=["cn","mut","msi","other"],j=(z,Y)=>R.indexOf(Hh(z.app))-R.indexOf(Hh(Y.app))||z.app.localeCompare(Y.app),F=N||r!==null;E.useEffect(()=>{const z=Y=>{Y.key.toLowerCase()==="k"&&(Y.metaKey||Y.ctrlKey)&&(Y.preventDefault(),Br())};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[]);const T=n.filter(z=>z.role==="input"),H=T.filter(z=>s.has(Ft(z))).sort(j),D=[...T.filter(z=>!s.has(Ft(z))).sort(j),...n.filter(z=>z.role==="cohort")];return f.jsxs("aside",{className:"side","aria-label":"Patient navigation","data-collapsed":y||void 0,children:[f.jsxs("div",{className:"side-brand",children:[f.jsx("span",{className:"side-badge","aria-hidden":!0,children:f.jsx(qu,{size:17,strokeWidth:2})}),f.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),f.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients (Ctrl or ⌘ K)",onClick:Br,children:f.jsx(Du,{size:17,"aria-hidden":!0})}),f.jsx("button",{type:"button",className:"side-toggle","aria-label":y?"Expand the menu":"Collapse the menu","aria-expanded":!y,title:y?"Expand the menu":"Collapse the menu",onClick:()=>x(!y),children:y?f.jsx(vC,{size:17,"aria-hidden":!0}):f.jsx(pC,{size:17,"aria-hidden":!0})})]}),f.jsxs("nav",{ref:v,"aria-label":"Patient sections",className:"side-nav",style:{"--duration":`${b.duration}ms`},children:[f.jsx(pj,{...b}),Gd.map(({key:z,label:Y,icon:te,soon:k},ne)=>{const ie=d.has(z);return f.jsxs("div",{className:"contents",children:[k&&!Gd[ne-1].soon&&f.jsx("span",{className:"side-group",children:"Coming soon"}),f.jsxs("button",{type:"button",className:"sc-nav","aria-current":ie&&p===z?"location":void 0,"aria-label":Y,disabled:!ie,title:y?Y:ie?void 0:"Not available for this sample yet",onClick:()=>m(z),children:[f.jsx(te,{size:17,strokeWidth:1.7,"aria-hidden":!0}),f.jsx("span",{className:"side-text",children:Y})]})]},z)})]}),f.jsx("div",{className:"flex-auto"}),f.jsxs("section",{"aria-label":"Analyses on this page",className:"side-sources",children:[f.jsxs("button",{type:"button",className:"side-fold","aria-expanded":F,onClick:()=>M(z=>!z),children:["Analyses on this page",f.jsx("span",{className:"side-count",children:H.length}),f.jsx(M1,{size:14,"aria-hidden":!0,"data-open":F})]}),F&&H.length===0&&f.jsxs("span",{className:"px-3 text-xs",style:{color:"var(--menu-muted)"},children:["Nothing on this page reads an analysis for ",i||"this sample","."]}),F&&H.map(z=>{const Y=Ft(z),te=z.state==="failed",k=z.modules.filter(ne=>ne.status==="failed");return f.jsxs("button",{type:"button",className:`tb-src${te?" fail":""}`,"aria-pressed":r===Y,title:te?k.map(ne=>`${ne.label} failed`).join("; "):"Show what it feeds",onClick:()=>u(r===Y?null:Y),children:[te?f.jsx(A1,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):f.jsx("span",{className:`tb-dot ${Ei(z.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"truncate",children:[z.app," ",z.version??""]}),te&&f.jsx("span",{className:"sr-only",children:", failed"}),f.jsx("span",{className:"tb-n",children:z.pk?`#${z.pk}`:""})]},Y)}),F&&D.length>0&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"tb-src","aria-expanded":w,onClick:()=>C(z=>!z),children:[f.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),w?"Hide":"Show"," ",D.length," more for ",i||"this sample"]}),w&&D.map(z=>f.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[f.jsx("span",{className:`tb-dot ${Ei(z.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"truncate",children:z.role==="cohort"?`${z.app}${z.project?`, project ${z.project}`:""}`:`${z.app} ${z.version??""}`}),f.jsx("span",{className:"tb-n",children:z.pk?`#${z.pk}`:""})]},Ft(z)))]}),F&&f.jsx("span",{className:"px-3 pt-2 text-xs leading-normal",style:{color:"var(--menu-muted)"},children:"Pick one to see what it feeds."})]})]})}function es({envelope:n}){const s=n.status==="error",i=s?iC:oC;return f.jsxs("div",{className:"flex items-start gap-2.5 text-sm",style:{color:"var(--ink-2)"},children:[f.jsx(i,{size:18,"aria-hidden":!0,style:{color:s?"var(--warn-ink)":"var(--chev)",flex:"none"}}),f.jsxs("div",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"font-semibold",style:{color:"var(--ink)"},children:s?"This panel could not be read":"Nothing to show here"}),n.warnings.map(r=>f.jsx("span",{children:r},r))]})]})}const Lh={summary:{title:"Genome fingerprint and summary",intro:"A one-glance portrait of the selected tumour: its copy-number changes and driver mutations drawn as a ring, a sentence describing them, and the headline measurements of the sample.",sections:[{heading:"The fingerprint ring",paragraphs:["The ring is the whole genome. Chromosome 1 starts at the top and the ring runs clockwise through chromosome 22 to X, each chromosome's arc in proportion to its length (GRCh37).","Copy-number changes are called against the tumour's baseline, its ploidy rounded to whole copies. Very short changes are drawn at a minimum length so they stay visible."],terms:[["Gains (outer track, orange)","Regions with at least one copy more than the baseline."],["Amplifications (outer track, darker and thicker)","Regions with three or more copies above the baseline."],["Losses (inner track, blue)","Regions with at least one copy fewer than the baseline."],["Drivers (black ticks)","Where the tumour's likely driver mutations sit (see the Mutations card for how they are flagged)."]]},{heading:"The sentence",paragraphs:["Written from the same data as the ring: how many amplifications, gains and losses there are and on which chromosomes, and which genes carry driver mutations."]},{heading:"The measurements",paragraphs:["Each tile shows a value, a small picture of where it sits on its scale when it has a natural one, and the analysis it came from. A tile with no value says why: the analysis was not run, it failed, or it does not apply to this kind of report (tumour-only reports have no matched normal)."],terms:[["Purity","The estimated fraction of cells in the sample that are tumour cells, from 0 to 1. The ring fills to the value."],["Ploidy","The tumour's average number of copies across the genome. The scale runs from 1 to 6 copies; the tall tick marks 2, a diploid genome."],["Coverage","The median sequencing depth of the tumour across the genome, in reads (×)."],["TMB per Mb","Tumour mutational burden: somatic SNVs and indels per megabase of genome. The report computes it from the counts of the SNV and indel calls. The scale is logarithmic, 0.01 to 100."],["MSI score","The MSIsensor score: the percentage of microsatellite sites that look unstable in the tumour."],["FGA","Fraction of the genome altered: the share of the genome whose copy number differs from the baseline, from 0 to 1. It is read from the project-wide Battenberg tables."]]},{heading:"Linking back to the analyses",paragraphs:[`Every value names its analysis, with version and Isabl id. Picking an analysis in the side menu's "Analyses on this page" highlights the tiles and cards it feeds.`]}]},copyNumber:{title:"Copy number",intro:"How many copies of each part of the genome the tumour carries, segment by segment, from chromosome 1 to X.",sections:[{heading:"What is drawn",paragraphs:['Each horizontal stroke is one segment: a stretch of the genome with a constant copy number. Its height is the number of copies, from 0 up to 8; anything higher is drawn at the top and the axis reads "8+". A gain or amplification rises as a column from the baseline to its stroke, and a loss falls to it, so the changes read as a landscape. Alternating grey bands mark the chromosomes, named in a strip along the bottom.',`The line across the plot is the baseline: the tumour's ploidy rounded to whole copies (labelled, for example, "2 copies"). Segments are coloured by how they compare with it.`],terms:[["Grey","Neutral: the same number of copies as the baseline."],["Orange","Gain: at least one copy more than the baseline."],["Dark orange","Amplification: three or more copies above the baseline."],["Blue","Loss: at least one copy fewer than the baseline."]]},{heading:"Total or allele-specific",paragraphs:["Total shows all copies together. Allele-specific, when the analysis provides it, splits each segment into its major allele (the more common parental copy, dark) and minor allele (light). Where the two are equal they are drawn slightly apart so both stay visible. A minor allele of 0 means one parent's copy is lost there (loss of heterozygosity)."]},{heading:"Driver genes",paragraphs:["A label along the top names each gene with likely driver mutations, one per gene, joined by a line to a dot on the segment the gene sits on, so its copy number can be read off at once. Hover one for its protein changes and the copies there."]},{heading:"Reading and moving around",terms:[["Hover a segment","Its call, copies (major + minor), coordinates and, when available, log2 ratio. A readout at the foot of the plot gives the pointer's place on the genome."],["Click a segment","Lists the mutations inside it in the Mutations card."],["Click a driver","Finds that gene in the Mutations card."],["Pinch, or Ctrl and scroll","Zooms around the pointer. Plain scrolling always scrolls the page."],["Drag","Pans a zoomed view."],["Arrow keys, plus and minus, 0","With the plot focused: pan, zoom in and out, and show the whole genome."],["Double-click a chromosome, or click its name","Glides to fill the view with it; the strip then counts megabases."],["The overview","The whole genome in miniature under the strip. Its window shows where the plot is: drag the window to move, its ends to resize, or click elsewhere to centre it there. The button by the title returns to the whole genome."],["Hover a mutation in the table","Marks it here, with a ring on the segment it sits on and its copy number."]]},{heading:"Tumour-only reports",paragraphs:["Without a matched normal there is no ploidy estimate, so segments come from CNVkit and are called against two copies. Allele-specific copy numbers are not available."]}]},mutations:{title:"Mutations",intro:"The tumour's somatic SNVs and indels that passed the callers' filters: how they are distributed across cancer cells, and a searchable, filterable table of every call.",sections:[{heading:"Which mutations",terms:[["Drivers","Likely drivers flagged by the report: coding mutations that match OncoKB or COSMIC driver annotations (the exact protein change, or a damaging consequence in a known cancer gene), plus known hotspots the callers missed and the report recovered from the tumour's reads."],["Coding","Mutations whose effect changes a protein, by the report's list of coding effects."],["All","Every PASS SNV and indel."]],paragraphs:["The counts beside each choice follow the search and filters, so they always say what you would see."]},{heading:"FFPE samples",paragraphs:["Formalin-fixed (FFPE) tissue damages DNA in ways that look like mutations, mostly C>T changes at low allele fractions. For an FFPE sample, FFPERASE scores each SNV and indel for how likely it is to be such an artifact, and the report counts only the calls scored at or below its threshold (quoted beside the table). Its SNV, indel and coding totals and the TMB leave the rest out.",`The report marks each call it leaves out, and the dashboard follows that mark: the Coding and All counts, the table and the curve leave those calls out, and the card's subtitle says so. Drivers are all listed, as in the report, and any the filter would remove carry an "FFPE filtered" tag. "Show filtered calls", under FFPE filter beside the table, brings the removed calls back, tagged the same way.`]},{heading:"Cancer cell fraction and variant allele fraction",paragraphs:["The curve across the top is a smoothed histogram of every PASS mutation; driver mutations sit on it as labelled dots, and the diamond on the axis is the median. Switch between the two measures:"],terms:[["CCF",'Cancer cell fraction: the estimated share of cancer cells carrying the mutation, corrected for purity and copy number. Around 1 (the "clonal" mark) means nearly every cancer cell has it, which suggests it arose early; clearly below 1 means a subclone. Estimates can land somewhat above 1. Shown from 0 to 2.'],["VAF","Variant allele fraction: the share of sequencing reads at the position that carry the mutation, from 0 to 1. Raw, not corrected for purity or copy number. Tumour-only reports open on VAF, since CCF needs a matched normal."]]},{heading:"Filtering by the curve",paragraphs:["Drag across the curve to keep only mutations in that CCF or VAF range: the curve stays lit inside the range and fades outside it, and the range is read out at its foot. Drag the edges to resize it, or its body to move it. The range appears with the other filters and can be removed there, or by clicking the curve."]},{heading:"The table",terms:[["Gene and position","The gene, and the mutation's chromosome and position (GRCh37)."],["Change","The protein change, with the cDNA change beneath."],["Effect","What the mutation does to the gene, from the VEP consequence (or the report's effect). Truncating effects are in bold."],["VAF and CCF bars","The value with a bar for quick comparison; the CCF bar's tick marks 1, clonal."],["Driver","Flagged as a likely driver (shown when the table is not already limited to drivers)."],["Hotspot","The exact protein change is a known recurrent cancer hotspot."],["In DMP","The same mutation was also found by the patient's clinical MSK-IMPACT (DMP) sequencing."],["FFPE filtered","FFPE samples only: the report's FFPE artifact filter leaves this call out of its counts (see FFPE samples)."]]},{heading:"Opening a row",terms:[["Variant","SNV or indel, with the reference and alternate bases."],["Reads","Reads supporting the mutation out of all reads at the position. Only hotspots the report recovered from the tumour's reads have them; the callers' tables give no single count."],["Normal VAF","The mutation's allele fraction in the matched normal; near 0 for a somatic mutation."],["Mutant copies","How many copies of that part of the genome carry the mutation, out of all copies there."],["Consequence","The full VEP consequence."],["COSMIC","How many samples in COSMIC carry it, and how closely they match (exact change, same position, codon or gene)."],["Expression","The gene's expression in the tumour's RNA, in transcripts per million, when RNA was sequenced."],["Gene role","Whether the gene is a known oncogene or tumour suppressor gene (TSG)."],["Show on copy number","Zooms the Copy number card to the mutation's chromosome and marks it."]]},{heading:"Searching and filtering",paragraphs:["Search takes a gene, a protein or cDNA change, a COSMIC term, or a locus such as chr12:25,398,284 or a range such as chr8:1-50,000,000. Press / anywhere on the page to jump to it. Each filter's count is how many rows you would get by ticking it, given everything else."],terms:[["Missense","One amino acid replaced by another."],["Truncating","Stop gained or lost, start lost, or a frameshift."],["Splice","Changes a splice site or splice region."],["In-frame","Inserts or deletes amino acids without shifting the reading frame."],["Synonymous","Changes the DNA but not the amino acid."],["Other","Everything else, such as intronic, UTR or upstream changes."]]}]},structuralVariants:{title:"Structural variants",intro:"The tumour's rearrangements as the report shows them: those with a breakpoint in an oncogene or tumour suppressor, those that take in a whole gene, and how all of them group into rearrangement signatures.",sections:[{heading:"Which rearrangements",paragraphs:["The report works from the high-confidence structural variants of ANNOT_SVS, which keeps calls made by two or more callers (SvABA, BRASS and GRIDSS) and annotates the genes they touch with AnnotSV. The count beside the title is how many of these the report counts, its rearrangements total.",`The tables keep the rearrangements whose genes include an oncogene or tumour suppressor, by the report's gene lists. It also searches the callers' raw calls for known rearrangements the high-confidence set can miss, such as CIC fusions, and adds them; a rescued event that is not a two-caller PASS says so in its callers, as in "gridss (CIC rescued)".`]},{heading:"The two tables",terms:[["Rearranged oncogenes and tumour suppressors",'One row per rearrangement and gene it hits, with the gene and breakpoint on each side. A gene near a breakpoint rather than in it is named as the report names it, such as "TERT +/- 100Kb".'],["Whole-gene rearrangements","Rearrangements that take in a whole oncogene or tumour suppressor, from start to end: a deletion of the whole gene, for example."],["Role","Whether the row's genes include an oncogene, a tumour suppressor or both, as the report colours its rows. Click a role above the tables to show only its rows."],["Left and right","Each breakpoint's gene, position (GRCh37) and where it falls in the gene, as AnnotSV writes it (intron5, exon2-exon5). Breakpoints are ordered by chromosome, then position."],["Callers and support","The callers that made the call, and the most reads any of them gives in support."],["Pileups","Supporting reads over all reads at each breakpoint in the tumour's alignments, left then right."],["Expression","For tumours with RNA: whether each gene's expression is high or low against each expression cohort (p63 is cohort project 63): at or above its 90th percentile, at or below its 10th, or neither (None). N/A means the cohort has no value for the gene."]],paragraphs:["Open a row to see both breakpoints, show them on the copy-number card, or copy their IGV loci."]},{heading:"Rearrangement signatures",paragraphs:["WGSPOST groups the tumour's rearrangements the way rearrangement signatures are described: clustered (rearrangements that sit unusually close together, as in chromothripsis) or dispersed, then by class and, except for translocations, by size from under 1 kb to over 1 Mb. Each bar is how many rearrangements fall in a group, grouped under its class; lighter bars are the clustered ones, in the shaded zone. A group with none shows a short stub on the baseline. Hover a bar for its name and its share of all rearrangements, or a class in the key to light its bars.","WGSPOST counts from its own copy of the calls, so its total can differ slightly from the report's rearrangements count."],terms:[["Deletion","A stretch of the genome lost between two breakpoints."],["Tandem duplication","A stretch copied next to itself."],["Inversion","A stretch turned around in place."],["Translocation","A join between two chromosomes."]]}]},signaturesHrd:{title:"Signatures and HRD",intro:"Which mutational processes left their mark on the tumour, set against tumours of the same disease, and whether it shows homologous recombination deficiency (HRD), as the report shows them.",sections:[{heading:"Mutational signatures",paragraphs:["WGSPOST fits known COSMIC substitution signatures to the tumour's somatic SNVs and estimates how many mutations each one accounts for. The left column is this tumour: each band is a signature's share of its mutations, the largest first.","The right column is the average of tumours of the same disease in the cohort (n is how many), each tumour's shares averaged and scaled to the cohort's average mutation count. A ribbon joins each signature's two bands, widening or narrowing with its share, so a signature can be followed from the tumour to its cohort; a label on the ribbon says how many percentage points the tumour leads or trails the cohort by, where the difference is at least 5. Hover a band, a ribbon or a row of the table for the numbers.","Seven signatures get colours of their own (eight when there are no more than eight); any beyond that are drawn together as Other. A tumour without a cohort to compare shows its own shares as one column."],terms:[["Signature","A pattern of substitutions, by the base change and its neighbours, that a mutational process leaves (SBS1, SBS5)."],["Aetiology","The process the report links a signature to, when it names one."]]},{heading:"HRD scores",paragraphs:["Two classifiers estimate whether the tumour has lost homologous recombination repair, as BRCA1 or BRCA2 loss does: HRDetect, from the substitution, indel and rearrangement patterns below, and CHORD, from its own set of mutation features. The report rates each HIGH at or above its threshold and LOW below it; the line on each gauge is the threshold."]},{heading:"HRDetect features",paragraphs:["The six features HRDetect weighs, for every tumour in the cohort and this one, each scaled from 0 (the cohort's lowest) to 1 (its highest). Each row is one feature: the pin is this tumour, the dots beneath are the cohort's samples, the shaded band is the middle half of the cohort and the line in it the median. With eight or more cohort samples a smoothed outline of how the samples are spread is drawn above the dots; with fewer it is left out, because it would suggest more than the data says. The words at the right say how many of the other cohort samples the tumour is above. Hover a row for the unscaled value. For FFPE samples the tumour's values come from its FFPE-filtered analysis."],terms:[["Del. MH","The share of deletions with microhomology at their ends, a sign of repair by end joining."],["SBS3 and SBS8","Substitution signatures 3 and 8."],["RS3 and RS5","Rearrangement signatures 3 (small tandem duplications) and 5 (deletions)."],["HRD index","Loss of heterozygosity, telomeric allelic imbalance and large-scale state transitions, combined."]]}]}},xj={summary:{BATTENBERG:"Tumour purity and ploidy, and the copy-number segments the ring's gains and losses are called from.","BATTENBERG cohort":"Project-wide Battenberg tables, which hold the FGA value and the cohort it is compared with.",CNV_UNMATCHED:"Copy-number segments of a tumour-only report (CNVkit), which the ring's gains and losses are called from.",MOSDEPTH:"The median sequencing coverage.",MSISENSOR:"The MSI score.",MSISENSOR_UNMATCHED:"The MSI score of a tumour-only report.",ANNOT_SNVS:"Somatic SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS:"Somatic indel calls: their count goes into TMB, and driver indels are marked on the ring.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls: their count goes into TMB, and driver SNVs are marked on the ring.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls: their count goes into TMB, and driver indels are marked on the ring.",WGSPOST:"Cancer cell fractions of the mutations, read together with the driver calls marked on the ring."},copyNumber:{BATTENBERG:"Every segment drawn: total copies, major and minor allele copies, and the ploidy the baseline is rounded from.","BATTENBERG cohort":"Project-wide Battenberg tables the report reads alongside this run; they hold the FGA, and are not drawn here.",CNV_UNMATCHED:"The segments of a tumour-only report (CNVkit), drawn against two copies."},mutations:{ANNOT_SNVS:"The tumour's PASS somatic SNVs and their annotation: gene, protein and cDNA change, effect, VAF, read counts, normal VAF and COSMIC.",ANNOT_INDELS:"The tumour's PASS somatic indels and their annotation, as for SNVs.",ANNOT_SNVS_UNMATCHED:"Tumour-only SNV calls and their annotation.",ANNOT_INDELS_UNMATCHED:"Tumour-only indel calls and their annotation.",WGSPOST:"Each mutation's cancer cell fraction (CCF) and how many copies carry it.",BATTENBERG:"Ploidy, which fills in the copy count where WGSPOST has none, and purity, which gives a CCF to hotspots recovered from the tumour's reads.",FFPERASE_SNVS:"FFPE samples: each SNV's artifact score. Calls scoring above the report's threshold are left out of the counts.",FFPERASE_INDELS:"FFPE samples: each indel's artifact score. Calls scoring above the report's threshold are left out of the counts."},structuralVariants:{ANNOT_SVS:"The high-confidence structural variants and their AnnotSV gene annotation: the rearrangements the report counts and the rows of its tables.",ANNOT_SVS_UNMATCHED:"Tumour-only structural variants and their annotation, kept when rare in the population.",SVABA:"Raw SvABA calls, searched for known rearrangements the high-confidence set missed (rescued events).",GRIDSS:"Raw GRIDSS calls, searched for rescued events like SvABA's.",SVABA_UNMATCHED:"Raw tumour-only SvABA calls, searched for rescued events.",GRIDSS_UNMATCHED:"Raw tumour-only GRIDSS calls, searched for rescued events.",WGSPOST:"The rearrangement-signature counts.",WGSPOST_UNMATCHED:"The rearrangement-signature counts of a tumour-only report."},signaturesHrd:{WGSPOST:"The tumour's signature contributions, its HRDetect and CHORD scores, and its HRDetect features.",WGSPOST_FFPE:"For an FFPE sample, the same from the FFPE-filtered calls.","WGSPOST cohort":"The cohort's signature contributions and HRDetect features, which the tumour is compared with."}};function Sj(n,s){const i=s.role==="cohort"||s.app.endsWith("Project Application"),r=s.app.replace(/ Project Application$/,""),u=xj[n];return(i?u[`${r} cohort`]:u[r])??(i?"A project-wide run the report reads for comparison with the cohort.":"An analysis the report reads to build this card.")}function bj({topic:n,lineage:s,subject:i,onClose:r}){const u=Lh[n],d=E.useId(),h=E.useRef(null),m=s.filter(T=>T.role!=="cohort"&&!T.app.endsWith("Project Application")),p=s.filter(T=>!m.includes(T)),y=E.useRef(r);y.current=r,E.useEffect(()=>{var Y;const T=document.activeElement;(Y=h.current)==null||Y.focus();const H=document.documentElement,D=H.style.overflow;H.style.overflow="hidden";const z=te=>{te.key==="Escape"&&y.current()};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z),H.style.overflow=D,T==null||T.focus()}},[]);const x=[...u.sections.map(T=>T.heading),"Sources"],v=x.map((T,H)=>`${d}-s${H}`),[b,w]=E.useState(0),C=E.useRef(null),N=E.useRef(!1),M=E.useRef(null),R=E.useRef(0);E.useEffect(()=>{const T=C.current;if(!T)return;const H=24,D=()=>{const te=T.getBoundingClientRect().top,k=Math.max(0,T.scrollHeight-T.clientHeight),ne=v.map(ee=>{const P=document.getElementById(ee);return P?P.getBoundingClientRect().top-te:1/0}),ie=Math.max(0,...ne.map(ee=>Number.isFinite(ee)?ee+T.scrollTop-k-H:0)),Ce=H+(k>0?ie*Math.min(1,T.scrollTop/k):0);let X=0;ne.forEach((ee,P)=>{ee<=Ce&&(X=P)}),w(X)},z=()=>{if(N.current){M.current===null?(window.clearTimeout(R.current),R.current=window.setTimeout(()=>M.current=T.scrollTop,160)):Math.abs(T.scrollTop-M.current)>4&&(N.current=!1,M.current=null,D());return}D()},Y=()=>{N.current&&M.current===null&&(window.clearTimeout(R.current),N.current=!1,D())};return D(),T.addEventListener("scroll",z,{passive:!0}),T.addEventListener("wheel",Y,{passive:!0}),T.addEventListener("touchstart",Y,{passive:!0}),()=>{window.clearTimeout(R.current),T.removeEventListener("scroll",z),T.removeEventListener("wheel",Y),T.removeEventListener("touchstart",Y)}},[]);const j=T=>{var D;const H=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;N.current=!0,M.current=null,w(T),window.clearTimeout(R.current),R.current=window.setTimeout(()=>{var z;return M.current=((z=C.current)==null?void 0:z.scrollTop)??0},160),(D=document.getElementById(v[T]))==null||D.scrollIntoView({behavior:H?"auto":"smooth",block:"start"})},F=T=>f.jsxs("li",{className:"info-source",children:[f.jsx("span",{className:`tb-dot ${Ei(T.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"info-source-text",children:[T.pk?f.jsxs("a",{className:"info-source-name info-source-link",href:j1(T.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsxs("span",{className:"mono",children:[T.app,T.version?` ${T.version}`:""]}),f.jsxs("span",{className:"mono info-source-pk",children:["#",T.pk]}),f.jsx(lC,{size:13,"aria-hidden":!0,className:"info-source-arrow"})]}):f.jsxs("span",{className:"info-source-name",children:[f.jsxs("span",{className:"mono",children:[T.app,T.version?` ${T.version}`:""]}),T.project?f.jsxs("span",{className:"info-source-pk",children:["project ",T.project]}):null]}),f.jsx("span",{className:"info-source-role",children:Sj(n,T)})]})]},Ft(T));return Wh.createPortal(f.jsx("div",{className:`info-backdrop ${Gn.theme}`,onMouseDown:T=>T.target===T.currentTarget&&r(),children:f.jsxs("div",{className:"info-dialog",role:"dialog","aria-modal":"true","aria-labelledby":d,children:[f.jsx("button",{ref:h,type:"button",className:"info-close","aria-label":"Close",onClick:r,children:f.jsx(Qu,{size:18,"aria-hidden":!0})}),f.jsxs("nav",{className:"info-rail","aria-label":"Contents",children:[f.jsx("span",{className:"info-kicker",children:i??"About"}),f.jsx("h2",{id:d,children:u.title}),f.jsx("ol",{children:x.map((T,H)=>f.jsx("li",{children:f.jsx("button",{type:"button","aria-current":H===b?"true":void 0,onClick:()=>j(H),children:T})},T))})]}),f.jsxs("div",{ref:C,className:"info-main",children:[f.jsx("p",{className:"info-intro",children:u.intro}),u.sections.map((T,H)=>{var D;return f.jsxs("section",{id:v[H],className:"info-section",children:[f.jsx("h3",{children:T.heading}),(D=T.paragraphs)==null?void 0:D.map(z=>f.jsx("p",{children:z},z)),T.terms&&f.jsx("dl",{children:T.terms.map(([z,Y])=>f.jsxs("div",{children:[f.jsx("dt",{children:z}),f.jsx("dd",{children:Y})]},z))})]},T.heading)}),f.jsxs("section",{id:v[v.length-1],className:"info-section","aria-label":"Sources",children:[f.jsx("h3",{children:"Sources"}),f.jsx("p",{children:"The analyses this card reads, with their version and Isabl id, and what each one is responsible for."}),s.length===0&&f.jsx("p",{children:"No analyses recorded for this card."}),f.jsx("ul",{className:"info-sources",children:m.map(F)}),p.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("h4",{children:"Cohort runs"}),f.jsx("ul",{className:"info-sources",children:p.map(F)})]})]})]})]})}),document.body)}function hy(n){return n.split(" ").map(s=>/^[A-Z0-9]{2,}$/.test(s)?s:s.toLowerCase()).join(" ")}function X1({topic:n,lineage:s,subject:i}){const[r,u]=E.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${hy(Lh[n].title)}`,title:`About ${hy(Lh[n].title)}`,"aria-haspopup":"dialog",onClick:()=>u(!0),children:f.jsx(cC,{size:15,"aria-hidden":!0})}),r&&f.jsx(bj,{topic:n,lineage:s,subject:i,onClose:()=>u(!1)})]})}function wj({lineage:n,children:s}){const[i,r]=E.useState(!1),u=n.filter(h=>h.role!=="cohort"),d=n.filter(h=>h.role==="cohort");return f.jsxs("div",{className:"sc-cf",children:[s,s&&f.jsx("span",{className:"flex-auto"}),n.length>0&&f.jsx("span",{className:"text-xs",style:{color:"var(--muted)"},children:"Sources"}),u.map(h=>h.pk?f.jsxs("a",{className:"sc-src sc-src-link",href:j1(h.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsx("span",{className:`tb-dot ${Ei(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""," #",h.pk]},Ft(h)):f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:`tb-dot ${Ei(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""]},Ft(h))),d.length>0&&f.jsxs("button",{type:"button",className:"sc-src",style:{border:0,cursor:"pointer"},"aria-expanded":i,onClick:()=>r(h=>!h),children:[i?"Hide":"+"," ",d.length," cohort ",d.length===1?"run":"runs"]}),i&&d.map(h=>f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),h.app,h.project?`, project ${h.project}`:""," ",h.pk?`#${h.pk}`:""]},Ft(h)))]})}function K1(...n){const s=new Map;for(const i of n.flat())i&&!s.has(Ft(i))&&s.set(Ft(i),i);return[...s.values()]}const Ku=E.forwardRef(function({title:s,subtitle:i,controls:r,lineage:u,picked:d,footer:h,className:m="",info:p,expandable:y,children:x},v){const b=!!d&&u.some(N=>Ft(N)===d),[w,C]=Cj();return f.jsxs(f.Fragment,{children:[w&&f.jsx("div",{className:"sc-full-backdrop","aria-hidden":!0,onClick:()=>C(!1)}),f.jsxs("section",{ref:v,className:`sc-card flex flex-col ${m}`,"data-picked":b,"data-full":w||void 0,"aria-label":s,children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 px-5 pt-5 pb-4",children:[f.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsx("h2",{className:"m-0 text-[19px] font-semibold tracking-tight",children:s}),i&&f.jsx("span",{className:"text-[13px]",style:{color:"var(--muted)"},children:i})]}),(r||p||y)&&f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,y&&f.jsx("button",{type:"button",className:"sc-ib","aria-label":w?"Exit full screen":`Expand ${s.toLowerCase()} to full screen`,title:w?"Exit full screen (Esc)":"Expand to full screen","aria-pressed":w,onClick:()=>C(!w),children:w?f.jsx(gC,{size:16,"aria-hidden":!0}):f.jsx(hC,{size:16,"aria-hidden":!0})}),p&&f.jsx(X1,{topic:p,lineage:u,subject:typeof i=="string"?i:void 0})]})]}),f.jsx("div",{className:"min-w-0 flex-auto",children:x}),(u.length>0||h)&&f.jsx(wj,{lineage:u,children:h})]})]})});function Cj(){const[n,s]=E.useState(!1);return E.useEffect(()=>{if(!n)return;const i=document.documentElement,r=i.style.overflow;i.style.overflow="hidden";const u=d=>{var h,m;d.key==="Escape"&&((m=(h=d.target)==null?void 0:h.closest)!=null&&m.call(h,"input, textarea, select")||document.querySelector(".info-backdrop")||s(!1))};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),i.style.overflow=r}},[n]),[n,s]}function Zr({label:n,envelope:s,loading:i,skeletonHeight:r=160,children:u}){return f.jsxs(f.Fragment,{children:[i&&!s&&f.jsx("div",{className:"px-5 py-3",children:f.jsx("div",{className:"skeleton",style:{height:r},"aria-label":`Loading ${n}`})}),s&&s.status!=="ok"&&f.jsx("div",{className:"px-5 py-4",children:f.jsx(es,{envelope:s})}),(s==null?void 0:s.status)==="ok"&&s.data!==null&&u(s.data),(s==null?void 0:s.status)==="ok"&&s.warnings.length>0&&f.jsx("div",{className:"px-5 pb-1 text-xs",style:{color:"var(--warn-ink)"},children:s.warnings.join(" ")})]})}function jj({title:n,subtitle:s,controls:i,envelope:r,loading:u,picked:d,skeletonHeight:h=160,footer:m,className:p="",info:y,children:x}){return f.jsx(Ku,{title:n,subtitle:s,controls:i,lineage:(r==null?void 0:r.lineage)??[],picked:d,footer:m,className:p,info:y,children:f.jsx(Zr,{label:n,envelope:r,loading:u,skeletonHeight:h,children:x})})}function Ej(n,s){const[i,r]=E.useState(null),[u,d]=E.useState(!1);return E.useLayoutEffect(()=>{const h=n.current;if(!h)return;const m=()=>{const y=h.querySelector('[aria-pressed="true"]');r(y?{x:y.offsetLeft,y:y.offsetTop,width:y.offsetWidth,height:y.offsetHeight}:null)};if(m(),typeof ResizeObserver>"u")return;const p=new ResizeObserver(m);p.observe(h);for(const y of Array.from(h.children))p.observe(y);return()=>p.disconnect()},[n,s]),E.useEffect(()=>{if(i&&!u){const h=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(h)}},[i,u]),{thumb:i,moving:u}}function Zu({label:n,options:s,value:i,onChange:r,className:u=""}){const d=E.useRef(null),{thumb:h,moving:m}=Ej(d,i);return f.jsxs("div",{ref:d,className:`sc-track ${u}`,role:"group","aria-label":n,children:[h&&f.jsx("span",{className:"sc-thumb","data-moving":m,"aria-hidden":!0,style:{width:h.width,height:h.height,transform:`translate(${h.x}px, ${h.y}px)`}}),s.map(p=>f.jsx("button",{type:"button",className:"sc-seg","aria-pressed":p.value===i,disabled:p.disabled,title:p.title,onClick:()=>r(p.value),children:p.label},p.value))]})}function Nj(n){var i;const s=[];return n.mode==="unmatched"&&s.push("Tumour only"),n.individual.germline_consent&&s.push("Germline consented"),(i=n.individual.dmp_id)!=null&&i.startsWith("P-")&&s.push("DMP linked"),s}function _j({data:n,onVersion:s}){const i=n.report,[r,u]=E.useState(!1),d=E.useRef(null);E.useEffect(()=>{if(!r)return;const m=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)},p=y=>{y.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",p)}},[r]);const h=Nj(n);return f.jsxs("div",{ref:d,className:"report-menu",children:[f.jsxs("button",{type:"button",className:"sc-btn sc-b2","aria-expanded":r,"aria-haspopup":"dialog",onClick:()=>u(m=>!m),children:["Report ",i.version,f.jsx(M1,{size:14,"aria-hidden":!0})]}),r&&f.jsxs("div",{className:"report-pop",role:"dialog","aria-label":"Report",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--muted)"},children:"Report version"}),f.jsx(Zu,{label:"Report version",value:i.version,onChange:m=>{s(m),u(!1)},options:n.versions.map(m=>({value:m.version,label:m.version}))})]}),f.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["WGTS_REPORT ",i.analysis?`run #${i.analysis}`:"run indexed by hand",i.built?`, built ${O1(i.built)}`:""]}),h.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(m=>f.jsx("span",{className:"sc-chip",children:m},m))})]})]})}const Uh=["purity","ploidy","coverage","tmb","msi","fga"];function Mj({value:n}){const i=2*Math.PI*13,r=Math.min(Math.max(n,0),1);return f.jsxs("svg",{viewBox:"0 0 34 34",className:"kpi-glyph h-[34px] w-[34px]","aria-hidden":!0,children:[f.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",className:"kpi-track"}),f.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",strokeLinecap:"round",className:"kpi-fill",strokeDasharray:`${r*i} ${i}`,transform:"rotate(-90 17 17)"})]})}function my({value:n,min:s,max:i,ticks:r,reference:u}){const d=h=>4+(Math.min(Math.max(h,s),i)-s)/(i-s)*64;return f.jsxs("svg",{viewBox:"0 0 72 20",className:"kpi-glyph h-[18px] w-[60px]","aria-hidden":!0,children:[f.jsx("line",{x1:"4",x2:"68",y1:"12",y2:"12",className:"kpi-track",strokeWidth:"2",strokeLinecap:"round"}),r.map(h=>f.jsx("line",{x1:d(h),x2:d(h),y1:h===u?5:9,y2:"15",className:"kpi-tick",strokeWidth:h===u?1.5:1},h)),f.jsx("circle",{cx:d(n),cy:"12",r:"4.5",className:"kpi-dot",strokeWidth:"2"})]})}function Rj({metric:n}){const s=n.value;if(s===null)return null;switch(n.key){case"purity":case"fga":return f.jsx(Mj,{value:s});case"ploidy":return f.jsx(my,{value:s,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return f.jsx(my,{value:Math.log10(Math.max(s,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const Tj={purity:"Share of tumour cells, 0 to 1",fga:"Share of the genome altered, 0 to 1",ploidy:"On a scale of 1 to 6 copies; the tall tick marks 2",tmb:"On a log scale from 0.01 to 100 mutations per Mb"};function Aj({metric:n,picked:s}){const i=n.value===null&&!n.text,r=!!s&&n.sources.some(u=>Ft(u)===s);return f.jsxs("div",{className:"kpi","data-picked":r,title:Tj[n.key],children:[f.jsxs("span",{className:"kpi-top",children:[f.jsx("span",{className:"kpi-label",children:n.label}),f.jsx(Rj,{metric:n})]}),f.jsx("span",{className:"kpi-value","data-empty":i,children:i?EC(n):jC(n)}),n.sources.length>0?f.jsx("span",{className:"flex flex-col gap-0.5",children:n.sources.map(u=>f.jsxs("span",{className:"kpi-src",children:[f.jsx("span",{className:`tb-dot ${Ei(u.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"min-w-0",children:B1(u)})]},Ft(u)))}):f.jsx("span",{className:"kpi-src",children:n.etl?`from ${n.etl}`:"no source"})]})}function Oj({sampleLabel:n,fingerprint:s,metrics:i,picked:r,lineage:u=[]}){var h;const d=(((h=i==null?void 0:i.data)==null?void 0:h.metrics)??[]).filter(m=>Uh.includes(m.key));return f.jsxs("section",{className:"sc-card relative flex flex-wrap items-center gap-x-8 gap-y-5 px-6 py-5","aria-label":`Genome fingerprint and summary of ${n}`,children:[f.jsx("span",{className:"absolute top-3 right-3",children:f.jsx(X1,{topic:"summary",lineage:u,subject:n})}),f.jsx(am,{fingerprint:s,size:"hero",title:n.split(" ")[0],subtitle:"tumour",className:"h-[210px] w-[210px] max-w-full flex-none"}),f.jsxs("div",{className:"flex min-w-0 flex-[1_1_230px] flex-col gap-3",children:[f.jsxs("h2",{className:"m-0 text-lg font-semibold tracking-tight",children:["Genome fingerprint of ",n]}),f.jsx("p",{className:"m-0 max-w-[46ch] text-[14.5px] leading-relaxed",style:{color:"var(--ink-2)"},children:s?z1(s):"No copy-number data for this sample."}),f.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-[12.5px]",style:{color:"var(--ink-2)"},children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--gain)"}}),"Gains, outer track"]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--loss)"}}),"Losses, inner track"]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-3 w-[5px] rounded-sm",style:{background:"var(--ink)"}}),"Drivers"]})]}),f.jsx("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:"Chromosome 1 starts at the top and the ring runs clockwise to X."})]}),f.jsxs("div",{className:"kpi-grid min-w-0 flex-[1.4_1_420px]",children:[i===void 0&&Uh.map(m=>f.jsx("div",{className:"kpi","aria-hidden":!0,children:f.jsx("div",{className:"skeleton h-[70px]"})},m)),i&&i.status!=="ok"&&f.jsx("div",{className:"col-span-full",children:f.jsx(es,{envelope:i})}),d.map(m=>f.jsx(Aj,{metric:m,picked:r},m.key))]})]})}function zj({sampleLabel:n,failures:s,analyses:i}){return s.length===0?null:f.jsx("div",{className:"flex flex-col gap-2.5",children:s.map(r=>{const u=i.filter(d=>d.modules.some(h=>h.etl===r.etl&&h.status==="failed"));return f.jsxs("div",{className:"sc-card flex flex-wrap items-center gap-x-4 gap-y-3 px-[18px] py-3.5",role:"status",children:[f.jsx("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-[10px]",style:{background:"var(--warn-soft)",color:"var(--warn-ink)"},children:f.jsx(A1,{size:18,"aria-hidden":!0})}),f.jsxs("div",{className:"flex min-w-0 flex-[1_1_360px] flex-col gap-0.5",children:[f.jsxs("span",{className:"text-[14.5px] font-semibold",children:[r.label," failed for ",n]}),f.jsx("span",{className:"text-[13.5px]",style:{color:"var(--ink-2)"},children:r.message.split(`
267
+ `)[0]}),u.length>0&&f.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["Reading ",u.map(B1).join(", ")]})]})]},`${r.etl}-${r.node}`)})})}function Dj({onSignedIn:n}){const[s,i]=E.useState("password"),[r,u]=E.useState(""),[d,h]=E.useState(""),[m,p]=E.useState(""),[y,x]=E.useState(null),[v,b]=E.useState(!1),w=s==="password"?!!r&&!!d:!!m.trim();return f.jsxs("form",{className:"sc-card mx-auto mt-16 flex w-[380px] max-w-full flex-col gap-3 p-6",onSubmit:async C=>{C.preventDefault(),b(!0),x(null);try{s==="password"?await QC(r,d):await qC(m.trim()),n()}catch(N){x(N.message)}finally{b(!1)}},children:[f.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Sign in to Isabl"}),f.jsx("p",{className:"m-0 text-sm",style:{color:"var(--ink-2)"},children:"The WGTS dashboard uses your Isabl account."}),s==="password"?f.jsxs(f.Fragment,{children:[f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"username",children:["Username",f.jsx("span",{className:"field",children:f.jsx("input",{id:"username",autoComplete:"username",value:r,onChange:C=>u(C.target.value)})})]}),f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"password",children:["Password",f.jsx("span",{className:"field",children:f.jsx("input",{id:"password",type:"password",autoComplete:"current-password",value:d,onChange:C=>h(C.target.value)})})]})]}):f.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"token",children:["API token",f.jsx("span",{className:"field",children:f.jsx("input",{id:"token",type:"password",autoComplete:"off",spellCheck:!1,value:m,onChange:C=>p(C.target.value)})}),f.jsx("span",{className:"text-xs font-normal",style:{color:"var(--muted)"},children:"The token the Isabl CLI uses. Admins find it under Auth Token in Django admin."})]}),y&&f.jsx("p",{className:"m-0 text-sm",style:{color:"var(--warn-ink)"},role:"alert",children:y}),f.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:v||!w,children:v?"Signing in":"Sign in"}),f.jsx("button",{type:"button",className:"self-start border-0 bg-transparent p-0 text-[13px] font-semibold",style:{color:"var(--link)",cursor:"pointer"},onClick:()=>{i(s==="password"?"token":"password"),x(null)},children:s==="password"?"Use an API token instead":"Use a username and password instead"})]})}const it=1e3,Vh=.35,Hj=8,Uu=.1;function Au(n,s){return(Hu(n,s)??0)*it}function ol(n){const[s,i]=Yu[n.replace(/^chr/,"")];return[s*it,i*it]}function qd(n,s,i){const[r,u]=n,d=Math.min(it,Math.max(Vh,(u-r)*i)),h=Math.min(Math.max(s-(s-r)/(u-r)*d,0),it-d);return[h,h+d]}function Nu(n,s){const i=n[1]-n[0],r=Math.min(Math.max(n[0]+s,0),it-i);return[r,r+i]}function Lj(n,s,i){const r=Math.min(Math.max(i,0),it);return s===0?[Math.min(r,n[1]-Vh),n[1]]:[n[0],Math.max(r,n[0]+Vh)]}function Uj(n,s,i){const r=(n[0]+n[1])/2+((s[0]+s[1])/2-(n[0]+n[1])/2)*i,[u,d]=[n[1]-n[0],s[1]-s[0]],h=Math.exp(Math.log(u)+(Math.log(d)-Math.log(u))*i),m=Math.min(Math.max(r-h/2,0),it-h);return[m,m+h]}function gy(n){return n[1]-n[0]<it-.5}function Vj(n){for(const[s]of On){const[i,r]=ol(s);if(n>=i&&n<=r)return s}return null}function $j(n,s){const i=n.segments.flatMap(u=>s==="total"?[u.total_cn]:[u.major_cn,u.minor_cn]),r=Math.max(...i.map(u=>u??0));return Math.min(Hj,Math.max(n.baseline+2,Math.ceil(r)))}function Fj(n){const s=10**Math.floor(Math.log10(n)),i=n/s;return(i<1.5?1:i<3.5?2:i<7.5?5:10)*s}function Bj(n,s,i=5){const r=On.filter(([b])=>{const[w,C]=ol(b);return C>n&&w<s});if(r.length!==1)return r.map(([b])=>{const[w,C]=ol(b);return{value:(w+C)/2,label:b}});const[u,d]=r[0],[h,m]=ol(u),p=(Math.max(n,h)-h)/(m-h)*d,y=(Math.min(s,m)-h)/(m-h)*d,x=Fj(Math.max(y-p,1)/i),v=[];for(let b=Math.ceil(p/x)*x;b<=y;b+=x)v.push({value:h+b/d*(m-h),label:Or(b,x)});return v}function kj(n,s){if(n<=.5&&s>=it-.5)return null;const i=Dh(n/it,"start"),r=Dh(s/it,"end");if(i.chrom===r.chrom){const u=(r.pos-i.pos)/10;return`chr${i.chrom}: ${Or(i.pos,u).replace(" Mb","")}–${Or(r.pos,u)}`}return`chr${i.chrom}:${Or(i.pos,1e6)} – chr${r.chrom}:${Or(r.pos,1e6)}`}function Gj(n){const{chrom:s,pos:i}=Dh(Math.min(Math.max(n,0),it)/it,"start");return`chr${s} · ${(i/1e6).toFixed(1)} Mb`}const Pu=n=>n.call??"neutral",qj={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},Z1={neutral:"var(--chev)",gain:"var(--gain)",amp:"var(--gain-strong)",loss:"var(--loss)"};function Qj(n){return{call:qj[Pu(n)],copies:n.total_cn===null?"? copies":`${n.total_cn} ${n.total_cn===1?"copy":"copies"}`,alleles:n.major_cn!==null&&n.minor_cn!==null?`${n.major_cn} + ${n.minor_cn}`:"",span:`chr${n.chrom}:${n.start.toLocaleString("en-US")}–${n.end.toLocaleString("en-US")}`,log2:n.log2!==null?n.log2.toFixed(2):""}}function Yj(n){const s=new Map;for(const i of n){const r=i.gene??"?",u=s.get(r)??{gene:r,x:Au(i.chrom,i.pos),chrom:i.chrom,pos:i.pos,changes:"",list:[]};i.protein_change&&u.list.push(i.protein_change),s.set(r,u)}return[...s.values()].map(({list:i,...r})=>({...r,changes:i.join(", ")})).sort((i,r)=>i.x-r.x)}function Qd(n,s,i){const r=s.replace(/^chr/,"");return n.segments.find(u=>u.chrom===r&&u.start<=i&&i<=u.end)}function Yd(n,s){return n?s==="total"?n.total_cn:n.major_cn:null}function Ij(n){const s=n.length;if(s===0)return"";const i=m=>m.toFixed(2);if(s===1)return`M${i(n[0][0])},${i(n[0][1])}`;const r=n.slice(1).map((m,p)=>m[0]-n[p][0]),u=n.slice(1).map((m,p)=>r[p]===0?0:(m[1]-n[p][1])/r[p]),d=n.map((m,p)=>p===0?u[0]:p===s-1?u[s-2]:u[p-1]*u[p]<=0?0:(u[p-1]+u[p])/2);for(let m=0;m<s-1;m++){if(u[m]===0){d[m]=0,d[m+1]=0;continue}const p=d[m]/u[m],y=d[m+1]/u[m],x=Math.hypot(p,y);x>3&&(d[m]=3*p*u[m]/x,d[m+1]=3*y*u[m]/x)}let h=`M${i(n[0][0])},${i(n[0][1])}`;for(let m=0;m<s-1;m++){const[p,y]=n[m],[x,v]=n[m+1];h+=` C${i(p+r[m]/3)},${i(y+d[m]*r[m]/3)} ${i(x-r[m]/3)},${i(v-d[m+1]*r[m]/3)} ${i(x)},${i(v)}`}return h}function $h(n,s){const i=[],r=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u].left-n[d].left).forEach(u=>{let d=i.findIndex(h=>h+s<=n[u].left);d===-1&&(d=i.push(0)-1),i[d]=n[u].left+n[u].width,r[u]=d}),r}function Xj(n,s=4){const i=Math.max(n,1)/s,r=10**Math.floor(Math.log10(i)),u=i/r,d=Math.max(1,(u<=1?1:u<=2?2:u<=5?5:10)*r),h=[];for(let m=0;m<Math.max(n,1)+d&&(h.push(m),!(m>=n&&h.length>1));m+=d);return h}const Kj=n=>1-(1-n)**3;function Sa(n,s,i=500){return n.length*s*(i>=600?.6:.56)}function Ni({x:n,y:s,width:i,above:r=!1,children:u}){const d=n>i-320,h=r?Math.min(Math.max(n,110),i-110):n,m=r?"translate(-50%, calc(-100% - 6px))":`translate(${d?"calc(-100% - 14px)":"14px"}, -50%)`;return f.jsx("div",{className:"ctip",style:{left:h,top:s,transform:m},role:"presentation",children:u})}function Fh(n,s,i){const r=n.clientX;let u=!1;const d=m=>{const p=m.clientX-r;Math.abs(p)>3&&(u=!0),s(p,m)},h=()=>{window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),i==null||i(u)};window.addEventListener("pointermove",d),window.addEventListener("pointerup",h),window.addEventListener("pointercancel",h)}function Pr(n=640){const s=E.useRef(null),[i,r]=E.useState(n);return E.useLayoutEffect(()=>{const u=s.current;if(!u)return;const d=()=>r(Math.round(u.clientWidth)||n);if(d(),typeof ResizeObserver>"u")return;const h=new ResizeObserver(d);return h.observe(u),()=>h.disconnect()},[n]),[s,i]}const py=36,Zj=14,zr=232,vy=22,oi=28,yy=19,Pj=480,Jj=E.memo(function({segments:s,spans:i,mode:r,shown:u,geo:d,hover:h,grad:m,onHover:p,onClick:y}){const x=u[1]-u[0],v=C=>d.plotL+(C-u[0])/x*d.plotW,b=C=>d.plotTop+(1-Math.min(Math.max(C,0),d.top)/d.top)*zr,w=b(d.baseline);return f.jsx("g",{children:s.map((C,N)=>{const[M,R]=i[N];if(R<u[0]-1||M>u[1]+1)return null;const j=Pu(C),F=v(M),T=Math.max(v(R)-F,j==="neutral"?2:7),H=h===N;if(r==="total"){if(C.total_cn===null)return null;const Y=b(C.total_cn);return f.jsxs("g",{className:"cn-seg","data-call":j,"data-on":H||void 0,children:[j!=="neutral"&&f.jsx("rect",{x:F,y:Math.min(Y,w),width:T,height:Math.abs(Y-w),fill:`url(#${m[j]})`,className:"cn-col"}),f.jsx("line",{x1:F,x2:F+T,y1:Y,y2:Y,style:{stroke:Z1[j]},className:"cn-line"}),f.jsx("rect",{x:F-2,y:Math.min(Y,w)-9,width:T+4,height:Math.abs(Y-w)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:F+T/2,y:Y}),onMouseLeave:()=>p(null),onClick:()=>y(C)})]},N)}if(C.major_cn===null||C.minor_cn===null)return null;const D=b(C.major_cn+Uu),z=b(C.minor_cn-Uu);return f.jsxs("g",{className:"cn-seg","data-on":H||void 0,children:[f.jsx("line",{x1:F,x2:F+T,y1:z,y2:z,className:"cn-line cn-minor"}),f.jsx("line",{x1:F,x2:F+T,y1:D,y2:D,className:"cn-line cn-major"}),f.jsx("rect",{x:F-2,y:Math.min(D,z)-9,width:T+4,height:Math.abs(D-z)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:F+T/2,y:D}),onMouseLeave:()=>p(null),onClick:()=>y(C)})]},N)})})}),Wj=E.memo(function({segments:s,spans:i,mode:r,top:u,baseline:d,plotL:h,plotW:m,y0:p}){const y=x=>p+3+(1-Math.min(x,u)/u)*(oi-6);return f.jsxs("g",{pointerEvents:"none",children:[On.map(([x],v)=>{const[b,w]=ol(x);return v%2===0?f.jsx("rect",{x:h+b/it*m,y:p,width:(w-b)/it*m,height:oi,className:"cn-mini-band"},x):null}),f.jsx("line",{x1:h,x2:h+m,y1:y(d),y2:y(d),className:"cn-mini-base"}),s.map((x,v)=>{const b=r==="total"?x.total_cn:x.major_cn;if(b===null)return null;const w=Pu(x),C=h+i[v][0]/it*m,N=Math.max((i[v][1]-i[v][0])/it*m,w==="neutral"?1:2);return f.jsx("line",{x1:C,x2:C+N,y1:y(b),y2:y(b),className:"cn-mini-line",style:{stroke:r==="total"?Z1[w]:"var(--ink-2)"}},v)})]})});function eE({data:n,mode:s,drivers:i,focus:r,locate:u,view:d,onView:h,onSegment:m,onGene:p}){const[y,x]=Pr(900),v=E.useRef(null),b=E.useId(),w={gain:`${b}-gain`,amp:`${b}-amp`,loss:`${b}-loss`},[C,N]=E.useState(d.window),M=E.useRef(C);M.current=C,E.useLayoutEffect(()=>{const Z=d.window,le=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!d.smooth||le){N(Z);return}const Me=M.current,Ve=performance.now();let Fe=0;const Ct=st=>{const et=Math.min(1,(st-Ve)/Pj);N(Uj(Me,Z,Kj(et))),et<1&&(Fe=requestAnimationFrame(Ct))};return Fe=requestAnimationFrame(Ct),()=>cancelAnimationFrame(Fe)},[d]);const[R,j]=E.useState(null),[F,T]=E.useState(null),[H,D]=E.useState(null),[z,Y]=E.useState(!1),te=E.useRef(!1),k=E.useMemo(()=>$j(n,s),[n,s]),ne=E.useMemo(()=>n.segments.some(Z=>Math.max(Z.total_cn??0,Z.major_cn??0)>k),[n,k]),ie=E.useMemo(()=>n.segments.map(Z=>[Au(Z.chrom,Z.start),Au(Z.chrom,Z.end)]),[n]),Ce=E.useMemo(()=>Yj(i),[i]),X=py,ee=Math.max(x-py-Zj,200),P=C[1]-C[0],J=Z=>X+(Z-C[0])/P*ee,ue=Z=>C[0]+(Z-X)/ee*P,Ee=Z=>Sa(Z,11.5,600)+14,je=E.useMemo(()=>{const Z=Ce.map(le=>({left:X+le.x/it*ee-Ee(le.gene)/2,width:Ee(le.gene)}));return Ce.length?Math.max(...$h(Z,4))+1:0},[Ce,X,ee]),Ie=(je?je*yy+8:4)+4,We=Ie+zr,A=We+10,V=A+vy+12,W=V+oi+6,se={plotL:X,plotW:ee,plotTop:Ie,top:k,baseline:n.baseline},he=Z=>Ie+(1-Math.min(Math.max(Z,0),k)/k)*zr,ye=Ce.map((Z,le)=>({m:Z,index:le,x:J(Z.x)})).filter(({x:Z})=>Z>=X-4&&Z<=X+ee+4),be=$h(ye.map(({m:Z,x:le})=>({left:le-Ee(Z.gene)/2,width:Ee(Z.gene)})),4),re=(Z,le)=>Z>=X&&Z<=X+ee&&le>=Ie&&le<=We,me=Z=>{const le=v.current.getBoundingClientRect();return[Z.clientX-le.left,Z.clientY-le.top]},rt=E.useCallback(Z=>h({window:Z,smooth:!1}),[h]),Bt=E.useCallback(Z=>h({window:Z,smooth:!0}),[h]),zn=E.useRef({shown:C,plotL:X,plotW:ee,plotTop:Ie,plotBottom:We,move:rt});zn.current={shown:C,plotL:X,plotW:ee,plotTop:Ie,plotBottom:We,move:rt},E.useEffect(()=>{const Z=y.current;if(!Z)return;const le=Me=>{if(!Me.ctrlKey||!v.current)return;const Ve=v.current.getBoundingClientRect(),Fe=Me.clientX-Ve.left,Ct=Me.clientY-Ve.top,st=zn.current;if(Fe<st.plotL||Fe>st.plotL+st.plotW||Ct<st.plotTop||Ct>st.plotBottom)return;Me.preventDefault();const et=st.shown[0]+(Fe-st.plotL)/st.plotW*(st.shown[1]-st.shown[0]),Yn=Math.max(-50,Math.min(50,Me.deltaY));st.move(qd(st.shown,et,Math.exp(Yn*.01)))};return Z.addEventListener("wheel",le,{passive:!1}),()=>Z.removeEventListener("wheel",le)},[y]),E.useEffect(()=>{u&&/^(\d+|X)$/.test(u.chrom.replace(/^chr/,""))&&Bt(ol(u.chrom))},[u,Bt]);const Nt=Z=>{if(Z.button!==0)return;const[le,Me]=me(Z);if(!re(le,Me)||!gy(C))return;Z.preventDefault();const Ve=C;Y(!0),Fh(Z,Fe=>rt(Nu(Ve,-(Fe/ee)*(Ve[1]-Ve[0]))),Fe=>{Y(!1),Fe&&(te.current=!0,setTimeout(()=>te.current=!1,0))})},ot=Z=>{const[le,Me]=me(Z);D(re(le,Me)?le:null)},Ge=Z=>{const[le,Me]=me(Z);if(!re(le,Me))return;const Ve=Vj(ue(le));Ve&&Bt(ol(Ve))},pt=Z=>{const le=(C[0]+C[1])/2;if(Z.key==="ArrowLeft"||Z.key==="ArrowRight")Z.preventDefault(),rt(Nu(C,(Z.key==="ArrowLeft"?-.15:.15)*P));else if(Z.key==="+"||Z.key==="=")Bt(qd(C,le,.6));else if(Z.key==="-")Bt(qd(C,le,1/.6));else if(Z.key==="0"||Z.key==="Home")Bt([0,it]);else return;Z.key!=="ArrowLeft"&&Z.key!=="ArrowRight"&&Z.preventDefault()},cl=E.useCallback(Z=>{te.current||m(Z)},[m]),At=On.map(([Z],le)=>{const[Me,Ve]=ol(Z);return{chrom:Z,i:le,x0:J(Me),x1:J(Ve)}}).filter(({x0:Z,x1:le})=>le>X&&Z<X+ee),nn=At.length===1?At[0]:null,qn=nn?Bj(C[0],C[1],Math.max(2,Math.round(ee/120))):[],ut=(()=>{if(!r)return null;const Z=Au(r.chrom,r.pos);if(Z<C[0]||Z>C[1])return null;const le=Qd(n,r.chrom,r.pos),Me=Yd(le,s),Ve=s==="allele"&&Me!==null?Uu:0;return{x:J(Z),y:he((Me??n.baseline)+Ve),copies:(le==null?void 0:le.total_cn)??null}})(),fl=R?n.segments[R.index]:null,It=fl?Qj(fl):null,kt=F!==null?Ce[F]:null,zl=Z=>X+Z/it*ee,Gt={x0:zl(C[0]),x1:zl(C[1])},Qn=gy(C),ln=(Z,le)=>{Z.stopPropagation(),Z.preventDefault();const Me=C;Y(!0),Fh(Z,Ve=>{const Fe=Ve/ee*it;rt(le==="move"?Nu(Me,Fe):Lj(Me,le,Me[le]+Fe))},()=>Y(!1))};return f.jsxs("div",{ref:y,className:"cn","data-dragging":z||void 0,"data-zoomed":Qn||void 0,tabIndex:0,role:"group","aria-label":`Copy number of ${n.sample} across the genome, against ${n.baseline} copies.`,"aria-keyshortcuts":"ArrowLeft ArrowRight + - 0",onKeyDown:pt,children:[f.jsxs("svg",{ref:v,width:x,height:W,"aria-hidden":!0,onPointerDown:Nt,onPointerMove:ot,onPointerLeave:()=>D(null),onDoubleClick:Ge,children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:w.gain,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--gain)"},stopOpacity:.46}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--gain)"},stopOpacity:.04})]}),f.jsxs("linearGradient",{id:w.amp,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--gain-strong)"},stopOpacity:.62}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--gain-strong)"},stopOpacity:.05})]}),f.jsxs("linearGradient",{id:w.loss,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--loss)"},stopOpacity:.04}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--loss)"},stopOpacity:.46})]}),f.jsx("clipPath",{id:`${b}-plot`,children:f.jsx("rect",{x:X-4,y:Ie-2,width:ee+8,height:zr+4})})]}),f.jsx("g",{clipPath:`url(#${b}-plot)`,children:On.map(([Z],le)=>{const[Me,Ve]=ol(Z),Fe=J(Me),Ct=J(Ve);return le%2===0&&Ct>X&&Fe<X+ee?f.jsx("rect",{x:Fe,y:Ie,width:Ct-Fe,height:zr,className:"cn-band"},Z):null})}),Array.from({length:k+1},(Z,le)=>f.jsxs("g",{children:[f.jsx("line",{x1:X,x2:X+ee,y1:he(le),y2:he(le),className:"cn-grid"}),f.jsx("text",{x:X-10,y:he(le)+4,textAnchor:"end",className:"cn-tick",children:le===k&&ne?`${le}+`:le})]},le)),f.jsx("line",{x1:X,x2:X+ee,y1:he(n.baseline),y2:he(n.baseline),className:"cn-baseline"}),f.jsxs("text",{x:X+8,y:he(n.baseline)-7,className:"cn-baseline-label",children:[n.baseline," copies"]}),f.jsx("g",{className:"cn-reveal",children:f.jsx("g",{clipPath:`url(#${b}-plot)`,children:f.jsx(Jj,{segments:n.segments,spans:ie,mode:s,shown:C,geo:se,hover:R?R.index:null,grad:w,onHover:j,onClick:cl})})}),H!==null&&!z&&!R&&F===null&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:H,x2:H,y1:Ie,y2:We,className:"cn-guide"}),f.jsxs("g",{transform:`translate(${Math.min(Math.max(H,X+52),X+ee-52)} ${We-24})`,children:[f.jsx("rect",{x:-50,width:100,height:18,rx:9,className:"cn-readout"}),f.jsx("text",{y:12.5,textAnchor:"middle",className:"cn-readout-text",children:Gj(ue(H))})]})]}),ye.map(({m:Z,x:le,index:Me},Ve)=>{const Fe=Qd(n,Z.chrom,Z.pos),Ct=Yd(Fe,s),st=he((Ct??n.baseline)+(s==="allele"&&Ct!==null?Uu:0)),et=Ee(Z.gene),Yn=4+be[Ve]*yy,Dl=F===Me;return f.jsxs("g",{className:"cn-driver","data-on":Dl||void 0,onPointerDown:ja=>ja.stopPropagation(),onMouseEnter:()=>T(Me),onMouseLeave:()=>T(null),onClick:()=>p(Z.gene),children:[f.jsx("line",{x1:le,x2:le,y1:Yn+16,y2:st,className:"cn-leader"}),f.jsx("rect",{x:le-et/2,y:Yn,width:et,height:16,rx:8,className:"cn-chip"}),f.jsx("text",{x:le,y:Yn+11.5,textAnchor:"middle",className:"cn-gene",children:Z.gene}),f.jsx("circle",{cx:le,cy:st,r:Dl?6.5:5,className:"cn-dot"})]},Z.gene)}),ut&&r&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:ut.x,x2:ut.x,y1:Ie,y2:We,className:"cn-focus-line"}),f.jsx("circle",{cx:ut.x,cy:ut.y,r:6.5,className:"cn-focus-dot"}),(()=>{const Z=`${r.gene??"?"}${ut.copies!==null?` ${ut.copies} copies`:""}`,le=Sa(Z,11.5,600)+14,Me=ut.x+12+le>X+ee;return f.jsxs("g",{transform:`translate(${Me?ut.x-12-le:ut.x+12} ${ut.y-12})`,children:[f.jsx("rect",{width:le,height:22,rx:7,className:"cn-focus-chip"}),f.jsx("text",{x:7,y:15,className:"cn-focus-text",children:Z})]})})()]}),f.jsxs("g",{className:"cn-strip",children:[At.map(({chrom:Z,i:le,x0:Me,x1:Ve})=>{const Fe=Math.max(Me,X),Ct=Math.min(Ve,X+ee),st=Ct-Fe,et=nn?`chr${Z}`:Z;return f.jsxs("g",{className:"cn-pill",onClick:()=>Bt(ol(Z)),role:"presentation",children:[f.jsx("title",{children:`Zoom to chromosome ${Z}`}),f.jsx("rect",{x:Fe+.5,y:A,width:Math.max(st-1,1),height:vy,rx:7,"data-odd":le%2?"":void 0}),st>=Sa(et,11,600)+3&&f.jsx("text",{x:nn?Fe+10:(Fe+Ct)/2,y:A+15,textAnchor:nn?"start":"middle",children:et})]},Z)}),nn&&qn.map(Z=>{const le=J(Z.value);return le>Math.max(nn.x0,X)+70&&le<X+ee-20?f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:le,x2:le,y1:A+3,y2:A+9,className:"cn-mb-tick"}),f.jsx("text",{x:le,y:A+18,textAnchor:"middle",className:"cn-mb",children:Z.label})]},Z.value):null})]}),f.jsx(Wj,{segments:n.segments,spans:ie,mode:s,top:k,baseline:n.baseline,plotL:X,plotW:ee,y0:V}),f.jsx("rect",{x:X,y:V,width:ee,height:oi,fill:"transparent",className:"cn-mini-track",onPointerDown:Z=>{const[le]=me(Z),Me=C[1]-C[0],Ve=(le-X)/ee*it;Bt(Nu([Ve-Me/2,Ve+Me/2],0))}}),Qn&&f.jsxs("g",{className:"cn-mini-window",children:[f.jsx("rect",{x:Gt.x0,y:V-1,width:Math.max(Gt.x1-Gt.x0,4),height:oi+2,rx:6,onPointerDown:Z=>ln(Z,"move"),className:"cn-mini-win"}),[0,1].map(Z=>f.jsx("rect",{x:(Z===0?Gt.x0:Gt.x1)-4,y:V+oi/2-9,width:8,height:18,rx:4,className:"cn-mini-handle",onPointerDown:le=>ln(le,Z)},Z))]})]}),It&&R&&f.jsxs(Ni,{x:R.x+0,y:R.y+0,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"cn-call-dot","data-call":Pu(fl),"aria-hidden":!0}),It.call,f.jsx("span",{className:"ctip-sub",children:It.copies})]}),It.alleles&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Alleles"}),f.jsx("b",{children:It.alleles})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Region"}),f.jsx("b",{className:"mono",children:It.span})]}),It.log2&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"log2 ratio"}),f.jsx("b",{children:It.log2})]}),f.jsx("span",{className:"ctip-note",children:"Click to list the mutations in this segment"})]}),kt&&F!==null&&f.jsxs(Ni,{x:J(kt.x),y:Ie+10,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:kt.gene}),kt.changes&&f.jsx("span",{className:"ctip-sub",children:kt.changes})]}),(()=>{const Z=Yd(Qd(n,kt.chrom,kt.pos),s);return Z!==null?f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Copy number here"}),f.jsx("b",{children:Z})]}):null})(),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function Cr({color:n,label:s}){return f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"h-1 w-3.5 rounded-sm",style:{background:n}}),s]})}function tE({envelope:n,loading:s,picked:i,sampleLabel:r,drivers:u,focus:d,locate:h,onSegment:m,onGene:p}){var M;const[y,x]=E.useState("total"),[v,b]=E.useState({window:[0,it],smooth:!1}),w=((M=n==null?void 0:n.data)==null?void 0:M.allele_specific)??!1,C=kj(...v.window),N=E.useCallback(()=>b({window:[0,it],smooth:!0}),[]);return f.jsx(jj,{title:"Copy number",subtitle:`Copy number across the genome, ${r}`,info:"copyNumber",envelope:n,loading:s,picked:i,skeletonHeight:250,controls:f.jsxs(f.Fragment,{children:[C&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:C}),f.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Show the whole genome",title:"Show the whole genome",onClick:N,children:f.jsx(CC,{size:15,"aria-hidden":!0})})]}),f.jsx(Zu,{label:"Copy number view",value:w?y:"total",onChange:x,options:[{value:"total",label:"Total"},{value:"allele",label:"Allele-specific",disabled:!w}]})]}),footer:f.jsxs("span",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]",style:{color:"var(--ink-2)"},children:[y==="total"||!w?f.jsxs(f.Fragment,{children:[f.jsx(Cr,{color:"var(--gain)",label:"Gain"}),f.jsx(Cr,{color:"var(--gain-strong)",label:"Amplification"}),f.jsx(Cr,{color:"var(--loss)",label:"Loss"})]}):f.jsxs(f.Fragment,{children:[f.jsx(Cr,{color:"var(--ink-2)",label:"Major allele"}),f.jsx(Cr,{color:"var(--chev)",label:"Minor allele"})]}),f.jsx("span",{style:{color:"var(--faint)"},children:"Pinch or Ctrl-scroll to zoom, drag to pan, or move the window in the overview. Double-click a chromosome, or click its name, to fill the view."})]}),children:R=>f.jsx(eE,{data:R,mode:w?y:"total",drivers:u,focus:d,locate:h,view:v,onView:b,onSegment:m,onGene:p})})}function nE(n){const[s,i]=n.range;return[[s,0],...n.bins.map(r=>[(r.x0+r.x1)/2,r.n]),[i,0]]}function Id(n,s){for(let i=1;i<n.length;i++){const[r,u]=n[i-1],[d,h]=n[i];if(s<=d)return d===r?h:u+(s-r)/(d-r)*(h-u)}return n[n.length-1][1]}function lE(n){return n==="ccf"?"CCF":"VAF"}function Ml(n,s){return Math.min(Math.max(s,n.range[0]),n.range[1])}function aE(n){const s=n.measure==="ccf"?.25:.1,i=[];for(let r=n.range[0];r<=n.range[1]+1e-9;r+=s)i.push(Math.round(r*100)/100);return i}function sE(n,s){return n.measure==="ccf"?s===1?"1.0":s.toFixed(2).replace(/0$/,""):s.toFixed(1)}const Ja=14,iE=22,jr=118,rE=40,li=19,xy=n=>Math.round(n*100)/100;function oE({data:n,range:s,focus:i,onRange:r,onGene:u}){const[d,h]=Pr(),m=E.useId(),p=E.useRef(null),[y,x]=E.useState(null),[v,b]=E.useState(null),[w,C]=n.range,N=h-iE,M=V=>Ja+(V-w)/(C-w)*(N-Ja),R=V=>w+(V-Ja)/(N-Ja)*(C-w),j=E.useMemo(()=>nE(n),[n]),F=Math.max(1,...j.map(V=>V[1])),T=V=>V*li+8+jr,H=(V,W)=>T(V)-W/(F*1.1)*jr,D=E.useMemo(()=>[...n.drivers].sort((V,W)=>V.value-W.value),[n.drivers]),z=D.map(V=>({left:M(Ml(n,V.value))-Sa(V.gene??"?",11.5,600)/2-6,width:Sa(V.gene??"?",11.5,600)+12})),Y=$h(z,4),te=D.length?Math.max(...Y)+1:0,k=T(te),ne=k+rE,ie=j.map(([V,W])=>[M(V),H(te,W)]),Ce=Ij(ie),X=`${Ce} L${M(C).toFixed(2)},${k} L${M(w).toFixed(2)},${k} Z`,ee=V=>V.kind==="new"?[Math.min(V.from,V.to),Math.max(V.from,V.to)]:V.kind==="edge"?[Math.min(V.fixed,V.to),Math.max(V.fixed,V.to)]:V.range,P=y?ee(y):s,J=V=>{const W=p.current.getBoundingClientRect();return R(Math.min(Math.max(V-W.left,Ja),N))},ue=(V,W,se)=>{V.preventDefault(),V.stopPropagation();let he=W(J(V.clientX));x(he),Fh(V,(ye,be)=>{he=se(he,J(be.clientX)),x(he)},()=>{const[ye,be]=ee(he);if(x(null),M(be)-M(ye)<4)return r(null);r([xy(Ml(n,ye)),xy(Ml(n,be))])})},Ee=(V,W)=>V.kind==="move"?V:{...V,to:W},je=(V,W)=>{if(V.kind!=="move")return V;const se=V.range[1]-V.range[0],he=Math.min(Math.max(V.range[0]+(W-V.grab),w),C-se);return{...V,grab:W,range:[he,he+se]}},$e=P?[M(Ml(n,P[0])),M(Ml(n,P[1]))]:null,Ie=lE(n.measure),We=i?n.measure==="ccf"?i.ccf:i.vaf:null,A=v!==null?D[v]:null;return f.jsxs("div",{ref:d,className:"dens","data-brushing":y?"":void 0,children:[f.jsxs("svg",{ref:p,width:h,height:ne,role:"img","aria-label":`${Ie} of ${n.total} variants in ${n.sample}${n.drivers.length?`, with ${n.drivers.map(V=>`${V.gene} at ${V.value.toFixed(2)}`).join(", ")}`:""}.`,onPointerDown:V=>{V.button===0&&ue(V,W=>({kind:"new",from:W,to:W}),Ee)},children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:`${m}-fill`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.42}),f.jsx("stop",{offset:"1",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.03})]}),f.jsx("clipPath",{id:`${m}-spot`,children:$e&&f.jsx("rect",{x:$e[0],y:0,width:Math.max($e[1]-$e[0],0),height:ne})})]}),aE(n).map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:M(V),x2:M(V),y1:te*li+8,y2:k,className:"dens-grid","data-clonal":n.measure==="ccf"&&V===1?"":void 0}),f.jsx("text",{x:M(V),y:k+18,textAnchor:"middle",className:"dens-tick",children:sE(n,V)})]},V)),n.measure==="ccf"&&w<=1&&C>=1&&f.jsx("text",{x:M(1),y:k+31,textAnchor:"middle",className:"dens-clonal",children:"clonal"}),f.jsxs("g",{className:"dens-curve","data-dim":$e?"":void 0,children:[f.jsx("path",{d:X,fill:`url(#${m}-fill)`}),f.jsx("path",{d:Ce,className:"dens-line"})]}),$e&&f.jsx("g",{className:"dens-curve dens-lit",children:f.jsxs("g",{clipPath:`url(#${m}-spot)`,children:[f.jsx("path",{d:X,fill:`url(#${m}-fill)`}),f.jsx("path",{d:Ce,className:"dens-line"})]})}),f.jsx("line",{x1:Ja,x2:N,y1:k,y2:k,className:"dens-axis"}),n.median!==null&&f.jsx("path",{d:`M${M(n.median)},${k+1} l4.5,-6 l-4.5,-6 l-4.5,6 z`,className:"dens-median",children:f.jsx("title",{children:`Median ${n.median.toFixed(2)}`})}),D.map((V,W)=>{const se=Ml(n,V.value),he=M(se),ye=H(te,Id(j,se)),be=V.gene??"?",re=Sa(be,11.5,600)+12,me=8+Y[W]*li,rt=v===W;return f.jsxs("g",{className:"dens-driver","data-on":rt||void 0,onPointerDown:Bt=>Bt.stopPropagation(),onMouseEnter:()=>b(W),onMouseLeave:()=>b(null),onClick:()=>V.gene&&u(V.gene),children:[f.jsx("line",{x1:he,x2:he,y1:me+15,y2:ye,className:"dens-leader"}),f.jsx("rect",{x:he-re/2,y:me,width:re,height:16,rx:8,className:"dens-chip"}),f.jsx("text",{x:he,y:me+11.5,textAnchor:"middle",className:"dens-gene",children:be}),f.jsx("circle",{cx:he,cy:ye,r:rt?7:5.5,className:"dens-dot"})]},`${be}-${W}`)}),We!=null&&f.jsx("g",{className:"dens-focus",pointerEvents:"none",children:(()=>{const V=Ml(n,We),W=M(V),se=H(te,Id(j,V)),he=`${(i==null?void 0:i.gene)??"?"} ${We.toFixed(2)}`,ye=Sa(he,11,600)+14,be=W+12+ye>h;return f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:W,x2:W,y1:se,y2:k,className:"dens-focus-line"}),f.jsx("circle",{cx:W,cy:se,r:6.5,className:"dens-focus-dot"}),f.jsxs("g",{transform:`translate(${be?W-12-ye:W+12} ${se-11})`,children:[f.jsx("rect",{width:ye,height:22,rx:7,className:"dens-focus-chip"}),f.jsx("text",{x:7,y:15,className:"dens-focus-text",children:he})]})]})})()}),P&&$e&&f.jsxs("g",{className:"dens-brush",children:[f.jsx("rect",{x:$e[0],y:te*li+4,width:Math.max($e[1]-$e[0],0),height:jr+8,className:"dens-sel",onPointerDown:V=>ue(V,W=>({kind:"move",grab:W,range:P}),je)}),[0,1].map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:$e[V],x2:$e[V],y1:te*li+4,y2:k,className:"dens-sel-edge"}),f.jsx("rect",{x:$e[V]-5,y:te*li+4,width:10,height:jr+8,className:"dens-edge",onPointerDown:W=>ue(W,()=>({kind:"edge",fixed:P[1-V],to:P[V]}),Ee)}),f.jsx("rect",{x:$e[V]-3,y:k-jr/2-10,width:6,height:20,rx:3,className:"dens-grip",pointerEvents:"none"})]},V)),f.jsxs("g",{transform:`translate(${Math.min(Math.max(($e[0]+$e[1])/2,Ja+48),N-48)} ${k-30})`,pointerEvents:"none",children:[f.jsx("rect",{x:-48,y:0,width:96,height:20,rx:10,className:"dens-readout"}),f.jsxs("text",{y:14,textAnchor:"middle",className:"dens-readout-text",children:[P[0].toFixed(2)," – ",P[1].toFixed(2)]})]})]})]}),A&&v!==null&&f.jsxs(Ni,{x:M(Ml(n,A.value)),y:H(te,Id(j,Ml(n,A.value)))-22,width:h,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:A.gene??"?"}),A.protein_change&&f.jsxs("span",{className:"ctip-sub",children:[" ",A.protein_change]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:Ie}),f.jsx("b",{children:A.value.toFixed(2)})]}),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function uE({envelope:n,loading:s,measure:i,onMeasure:r,range:u,focus:d,onRange:h,onGene:m}){const p=i==="ccf"?"Cancer cell fraction":"Variant allele fraction",y=(n==null?void 0:n.status)==="ok"?n.data:null;return f.jsxs("div",{className:"strip",children:[f.jsxs("div",{className:"strip-head",children:[f.jsx("span",{className:"text-[13px] font-semibold",children:p}),y&&f.jsxs("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:[y.median!==null?`Median ${y.median.toFixed(2)}. `:"","Drag across the plot to filter the table."]}),f.jsx("span",{className:"flex-auto"}),f.jsx(Zu,{label:"Measure",value:i,onChange:r,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),f.jsx(Zr,{label:p,envelope:n,loading:s,skeletonHeight:180,children:x=>f.jsx(oE,{data:x,range:u,focus:d,onRange:h,onGene:m})})]})}const cE=Object.keys(q1),fE=Object.keys(Q1);function Sy(n,s){return n.includes(s)?n.filter(i=>i!==s):[...n,s]}function Xd({label:n,count:s,active:i,onClick:r}){return f.jsxs("button",{type:"button",className:"facet","aria-pressed":i,"data-empty":!i&&s===0,onClick:r,children:[f.jsx("span",{className:"facet-check","aria-hidden":!0,children:i&&f.jsx(_1,{size:11,strokeWidth:3})}),f.jsx("span",{className:"truncate",children:n}),f.jsx("span",{className:"facet-n",children:s===void 0?"":s.toLocaleString("en-US")})]})}function dE({table:n,data:s,onChange:i}){const r=s==null?void 0:s.facets.effects,u=s==null?void 0:s.facets.flags,d=n.range;return f.jsxs("aside",{className:"facets","aria-label":"Filters",children:[f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Effect",children:[f.jsx("span",{className:"facet-title",children:"Effect"}),cE.map(h=>f.jsx(Xd,{label:q1[h],count:r==null?void 0:r[h],active:n.effects.includes(h),onClick:()=>i({effects:Sy(n.effects,h)})},h))]}),f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[f.jsx("span",{className:"facet-title",children:"Flags"}),fE.map(h=>f.jsx(Xd,{label:Q1[h],count:u==null?void 0:u[h],active:n.flags.includes(h),onClick:()=>i({flags:Sy(n.flags,h)})},h))]}),(s==null?void 0:s.ffpe)&&f.jsxs("div",{className:"facet-group",role:"group","aria-label":"FFPE filter",children:[f.jsx("span",{className:"facet-title",children:"FFPE filter"}),f.jsx(Xd,{label:"Show filtered calls",count:s.ffpe.removed,active:n.ffpe,onClick:()=>i({ffpe:!n.ffpe})}),f.jsx("span",{className:"facet-note",children:s.ffpe.threshold!==null?`As in the report, calls FFPERASE scores above ${s.ffpe.threshold} are left out of the counts.`:"As in the report, calls its FFPE filter removes are left out of the counts."})]}),d&&f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Range",children:[f.jsxs("span",{className:"facet-title",children:[d.measure==="ccf"?"CCF":"VAF"," range"]}),f.jsxs("span",{className:"facet-range",children:[f.jsxs("span",{className:"mono",children:[d.low.toFixed(2)," – ",d.high.toFixed(2)]}),f.jsx("button",{type:"button",className:"sc-ib xs","aria-label":"Remove the range",title:"Remove the range",onClick:()=>i({range:null}),children:f.jsx(Qu,{size:13,"aria-hidden":!0})})]})]}),G1(n)>0&&f.jsx("button",{type:"button",className:"facet-clear",onClick:()=>i({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}/**
254
268
  * table-core
255
269
  *
256
270
  * Copyright (c) TanStack
@@ -259,10 +273,10 @@ Error generating stack: `+a.message+`
259
273
  * LICENSE.md file in the root directory of this source tree.
260
274
  *
261
275
  * @license MIT
262
- */function Kl(l,i){return typeof l=="function"?l(i):l}function ln(l,i){return s=>{i.setState(u=>({...u,[l]:Kl(s,u[l])}))}}function gr(l){return l instanceof Function}function lw(l){return Array.isArray(l)&&l.every(i=>typeof i=="number")}function aw(l,i){const s=[],u=c=>{c.forEach(f=>{s.push(f);const g=i(f);g!=null&&g.length&&u(g)})};return u(l),s}function ce(l,i,s){let u=[],c;return f=>{let g;s.key&&s.debug&&(g=Date.now());const m=l(f);if(!(m.length!==u.length||m.some((y,x)=>u[x]!==y)))return c;u=m;let S;if(s.key&&s.debug&&(S=Date.now()),c=i(...m),s==null||s.onChange==null||s.onChange(c),s.key&&s.debug&&s!=null&&s.debug()){const y=Math.round((Date.now()-g)*100)/100,x=Math.round((Date.now()-S)*100)/100,C=x/16,R=(_,O)=>{for(_=String(_);_.length<O;)_=" "+_;return _};console.info(`%c⏱ ${R(x,5)} /${R(y,5)} ms`,`
276
+ */function ba(n,s){return typeof n=="function"?n(s):n}function Sn(n,s){return i=>{s.setState(r=>({...r,[n]:ba(i,r[n])}))}}function Ju(n){return n instanceof Function}function hE(n){return Array.isArray(n)&&n.every(s=>typeof s=="number")}function mE(n,s){const i=[],r=u=>{u.forEach(d=>{i.push(d);const h=s(d);h!=null&&h.length&&r(h)})};return r(n),i}function xe(n,s,i){let r=[],u;return d=>{let h;i.key&&i.debug&&(h=Date.now());const m=n(d);if(!(m.length!==r.length||m.some((x,v)=>r[v]!==x)))return u;r=m;let y;if(i.key&&i.debug&&(y=Date.now()),u=s(...m),i==null||i.onChange==null||i.onChange(u),i.key&&i.debug&&i!=null&&i.debug()){const x=Math.round((Date.now()-h)*100)/100,v=Math.round((Date.now()-y)*100)/100,b=v/16,w=(C,N)=>{for(C=String(C);C.length<N;)C=" "+C;return C};console.info(`%c⏱ ${w(v,5)} /${w(x,5)} ms`,`
263
277
  font-size: .6rem;
264
278
  font-weight: bold;
265
- color: hsl(${Math.max(0,Math.min(120-120*C,120))}deg 100% 31%);`,s==null?void 0:s.key)}return c}}function fe(l,i,s,u){return{debug:()=>{var c;return(c=l==null?void 0:l.debugAll)!=null?c:l[i]},key:!1,onChange:u}}function iw(l,i,s,u){const c=()=>{var g;return(g=f.getValue())!=null?g:l.options.renderFallbackValue},f={id:`${i.id}_${s.id}`,row:i,column:s,getValue:()=>i.getValue(u),renderValue:c,getContext:ce(()=>[l,s,i,f],(g,m,v,S)=>({table:g,column:m,row:v,cell:S,getValue:S.getValue,renderValue:S.renderValue}),fe(l.options,"debugCells"))};return l._features.forEach(g=>{g.createCell==null||g.createCell(f,s,i,l)},{}),f}function sw(l,i,s,u){var c,f;const m={...l._getDefaultColumnDef(),...i},v=m.accessorKey;let S=(c=(f=m.id)!=null?f:v?typeof String.prototype.replaceAll=="function"?v.replaceAll(".","_"):v.replace(/\./g,"_"):void 0)!=null?c:typeof m.header=="string"?m.header:void 0,y;if(m.accessorFn?y=m.accessorFn:v&&(v.includes(".")?y=C=>{let R=C;for(const O of v.split(".")){var _;R=(_=R)==null?void 0:_[O]}return R}:y=C=>C[m.accessorKey]),!S)throw new Error;let x={id:`${String(S)}`,accessorFn:y,parent:u,depth:s,columnDef:m,columns:[],getFlatColumns:ce(()=>[!0],()=>{var C;return[x,...(C=x.columns)==null?void 0:C.flatMap(R=>R.getFlatColumns())]},fe(l.options,"debugColumns")),getLeafColumns:ce(()=>[l._getOrderColumnsFn()],C=>{var R;if((R=x.columns)!=null&&R.length){let _=x.columns.flatMap(O=>O.getLeafColumns());return C(_)}return[x]},fe(l.options,"debugColumns"))};for(const C of l._features)C.createColumn==null||C.createColumn(x,l);return x}const Nt="debugHeaders";function vy(l,i,s){var u;let f={id:(u=s.id)!=null?u:i.id,column:i,index:s.index,isPlaceholder:!!s.isPlaceholder,placeholderId:s.placeholderId,depth:s.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const g=[],m=v=>{v.subHeaders&&v.subHeaders.length&&v.subHeaders.map(m),g.push(v)};return m(f),g},getContext:()=>({table:l,header:f,column:i})};return l._features.forEach(g=>{g.createHeader==null||g.createHeader(f,l)}),f}const uw={createTable:l=>{l.getHeaderGroups=ce(()=>[l.getAllColumns(),l.getVisibleLeafColumns(),l.getState().columnPinning.left,l.getState().columnPinning.right],(i,s,u,c)=>{var f,g;const m=(f=u==null?void 0:u.map(x=>s.find(C=>C.id===x)).filter(Boolean))!=null?f:[],v=(g=c==null?void 0:c.map(x=>s.find(C=>C.id===x)).filter(Boolean))!=null?g:[],S=s.filter(x=>!(u!=null&&u.includes(x.id))&&!(c!=null&&c.includes(x.id)));return Xo(i,[...m,...S,...v],l)},fe(l.options,Nt)),l.getCenterHeaderGroups=ce(()=>[l.getAllColumns(),l.getVisibleLeafColumns(),l.getState().columnPinning.left,l.getState().columnPinning.right],(i,s,u,c)=>(s=s.filter(f=>!(u!=null&&u.includes(f.id))&&!(c!=null&&c.includes(f.id))),Xo(i,s,l,"center")),fe(l.options,Nt)),l.getLeftHeaderGroups=ce(()=>[l.getAllColumns(),l.getVisibleLeafColumns(),l.getState().columnPinning.left],(i,s,u)=>{var c;const f=(c=u==null?void 0:u.map(g=>s.find(m=>m.id===g)).filter(Boolean))!=null?c:[];return Xo(i,f,l,"left")},fe(l.options,Nt)),l.getRightHeaderGroups=ce(()=>[l.getAllColumns(),l.getVisibleLeafColumns(),l.getState().columnPinning.right],(i,s,u)=>{var c;const f=(c=u==null?void 0:u.map(g=>s.find(m=>m.id===g)).filter(Boolean))!=null?c:[];return Xo(i,f,l,"right")},fe(l.options,Nt)),l.getFooterGroups=ce(()=>[l.getHeaderGroups()],i=>[...i].reverse(),fe(l.options,Nt)),l.getLeftFooterGroups=ce(()=>[l.getLeftHeaderGroups()],i=>[...i].reverse(),fe(l.options,Nt)),l.getCenterFooterGroups=ce(()=>[l.getCenterHeaderGroups()],i=>[...i].reverse(),fe(l.options,Nt)),l.getRightFooterGroups=ce(()=>[l.getRightHeaderGroups()],i=>[...i].reverse(),fe(l.options,Nt)),l.getFlatHeaders=ce(()=>[l.getHeaderGroups()],i=>i.map(s=>s.headers).flat(),fe(l.options,Nt)),l.getLeftFlatHeaders=ce(()=>[l.getLeftHeaderGroups()],i=>i.map(s=>s.headers).flat(),fe(l.options,Nt)),l.getCenterFlatHeaders=ce(()=>[l.getCenterHeaderGroups()],i=>i.map(s=>s.headers).flat(),fe(l.options,Nt)),l.getRightFlatHeaders=ce(()=>[l.getRightHeaderGroups()],i=>i.map(s=>s.headers).flat(),fe(l.options,Nt)),l.getCenterLeafHeaders=ce(()=>[l.getCenterFlatHeaders()],i=>i.filter(s=>{var u;return!((u=s.subHeaders)!=null&&u.length)}),fe(l.options,Nt)),l.getLeftLeafHeaders=ce(()=>[l.getLeftFlatHeaders()],i=>i.filter(s=>{var u;return!((u=s.subHeaders)!=null&&u.length)}),fe(l.options,Nt)),l.getRightLeafHeaders=ce(()=>[l.getRightFlatHeaders()],i=>i.filter(s=>{var u;return!((u=s.subHeaders)!=null&&u.length)}),fe(l.options,Nt)),l.getLeafHeaders=ce(()=>[l.getLeftHeaderGroups(),l.getCenterHeaderGroups(),l.getRightHeaderGroups()],(i,s,u)=>{var c,f,g,m,v,S;return[...(c=(f=i[0])==null?void 0:f.headers)!=null?c:[],...(g=(m=s[0])==null?void 0:m.headers)!=null?g:[],...(v=(S=u[0])==null?void 0:S.headers)!=null?v:[]].map(y=>y.getLeafHeaders()).flat()},fe(l.options,Nt))}};function Xo(l,i,s,u){var c,f;let g=0;const m=function(C,R){R===void 0&&(R=1),g=Math.max(g,R),C.filter(_=>_.getIsVisible()).forEach(_=>{var O;(O=_.columns)!=null&&O.length&&m(_.columns,R+1)},0)};m(l);let v=[];const S=(C,R)=>{const _={depth:R,id:[u,`${R}`].filter(Boolean).join("_"),headers:[]},O=[];C.forEach(b=>{const E=[...O].reverse()[0],U=b.column.depth===_.depth;let B,$=!1;if(U&&b.column.parent?B=b.column.parent:(B=b.column,$=!0),E&&(E==null?void 0:E.column)===B)E.subHeaders.push(b);else{const F=vy(s,B,{id:[u,R,B.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${O.filter(P=>P.column===B).length}`:void 0,depth:R,index:O.length});F.subHeaders.push(b),O.push(F)}_.headers.push(b),b.headerGroup=_}),v.push(_),R>0&&S(O,R-1)},y=i.map((C,R)=>vy(s,C,{depth:g,index:R}));S(y,g-1),v.reverse();const x=C=>C.filter(_=>_.column.getIsVisible()).map(_=>{let O=0,b=0,E=[0];_.subHeaders&&_.subHeaders.length?(E=[],x(_.subHeaders).forEach(B=>{let{colSpan:$,rowSpan:F}=B;O+=$,E.push(F)})):O=1;const U=Math.min(...E);return b=b+U,_.colSpan=O,_.rowSpan=b,{colSpan:O,rowSpan:b}});return x((c=(f=v[0])==null?void 0:f.headers)!=null?c:[]),v}const ow=(l,i,s,u,c,f,g)=>{let m={id:i,index:u,original:s,depth:c,parentId:g,_valuesCache:{},_uniqueValuesCache:{},getValue:v=>{if(m._valuesCache.hasOwnProperty(v))return m._valuesCache[v];const S=l.getColumn(v);if(S!=null&&S.accessorFn)return m._valuesCache[v]=S.accessorFn(m.original,u),m._valuesCache[v]},getUniqueValues:v=>{if(m._uniqueValuesCache.hasOwnProperty(v))return m._uniqueValuesCache[v];const S=l.getColumn(v);if(S!=null&&S.accessorFn)return S.columnDef.getUniqueValues?(m._uniqueValuesCache[v]=S.columnDef.getUniqueValues(m.original,u),m._uniqueValuesCache[v]):(m._uniqueValuesCache[v]=[m.getValue(v)],m._uniqueValuesCache[v])},renderValue:v=>{var S;return(S=m.getValue(v))!=null?S:l.options.renderFallbackValue},subRows:[],getLeafRows:()=>aw(m.subRows,v=>v.subRows),getParentRow:()=>m.parentId?l.getRow(m.parentId,!0):void 0,getParentRows:()=>{let v=[],S=m;for(;;){const y=S.getParentRow();if(!y)break;v.push(y),S=y}return v.reverse()},getAllCells:ce(()=>[l.getAllLeafColumns()],v=>v.map(S=>iw(l,m,S,S.id)),fe(l.options,"debugRows")),_getAllCellsByColumnId:ce(()=>[m.getAllCells()],v=>v.reduce((S,y)=>(S[y.column.id]=y,S),{}),fe(l.options,"debugRows"))};for(let v=0;v<l._features.length;v++){const S=l._features[v];S==null||S.createRow==null||S.createRow(m,l)}return m},rw={createColumn:(l,i)=>{l._getFacetedRowModel=i.options.getFacetedRowModel&&i.options.getFacetedRowModel(i,l.id),l.getFacetedRowModel=()=>l._getFacetedRowModel?l._getFacetedRowModel():i.getPreFilteredRowModel(),l._getFacetedUniqueValues=i.options.getFacetedUniqueValues&&i.options.getFacetedUniqueValues(i,l.id),l.getFacetedUniqueValues=()=>l._getFacetedUniqueValues?l._getFacetedUniqueValues():new Map,l._getFacetedMinMaxValues=i.options.getFacetedMinMaxValues&&i.options.getFacetedMinMaxValues(i,l.id),l.getFacetedMinMaxValues=()=>{if(l._getFacetedMinMaxValues)return l._getFacetedMinMaxValues()}}},B0=(l,i,s)=>{var u,c;const f=s==null||(u=s.toString())==null?void 0:u.toLowerCase();return!!(!((c=l.getValue(i))==null||(c=c.toString())==null||(c=c.toLowerCase())==null)&&c.includes(f))};B0.autoRemove=l=>Tn(l);const G0=(l,i,s)=>{var u;return!!(!((u=l.getValue(i))==null||(u=u.toString())==null)&&u.includes(s))};G0.autoRemove=l=>Tn(l);const q0=(l,i,s)=>{var u;return((u=l.getValue(i))==null||(u=u.toString())==null?void 0:u.toLowerCase())===(s==null?void 0:s.toLowerCase())};q0.autoRemove=l=>Tn(l);const F0=(l,i,s)=>{var u;return(u=l.getValue(i))==null?void 0:u.includes(s)};F0.autoRemove=l=>Tn(l);const $0=(l,i,s)=>!s.some(u=>{var c;return!((c=l.getValue(i))!=null&&c.includes(u))});$0.autoRemove=l=>Tn(l)||!(l!=null&&l.length);const k0=(l,i,s)=>s.some(u=>{var c;return(c=l.getValue(i))==null?void 0:c.includes(u)});k0.autoRemove=l=>Tn(l)||!(l!=null&&l.length);const Q0=(l,i,s)=>l.getValue(i)===s;Q0.autoRemove=l=>Tn(l);const Y0=(l,i,s)=>l.getValue(i)==s;Y0.autoRemove=l=>Tn(l);const ih=(l,i,s)=>{let[u,c]=s;const f=l.getValue(i);return f>=u&&f<=c};ih.resolveFilterValue=l=>{let[i,s]=l,u=typeof i!="number"?parseFloat(i):i,c=typeof s!="number"?parseFloat(s):s,f=i===null||Number.isNaN(u)?-1/0:u,g=s===null||Number.isNaN(c)?1/0:c;if(f>g){const m=f;f=g,g=m}return[f,g]};ih.autoRemove=l=>Tn(l)||Tn(l[0])&&Tn(l[1]);const rl={includesString:B0,includesStringSensitive:G0,equalsString:q0,arrIncludes:F0,arrIncludesAll:$0,arrIncludesSome:k0,equals:Q0,weakEquals:Y0,inNumberRange:ih};function Tn(l){return l==null||l===""}const cw={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:l=>({columnFilters:[],...l}),getDefaultOptions:l=>({onColumnFiltersChange:ln("columnFilters",l),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(l,i)=>{l.getAutoFilterFn=()=>{const s=i.getCoreRowModel().flatRows[0],u=s==null?void 0:s.getValue(l.id);return typeof u=="string"?rl.includesString:typeof u=="number"?rl.inNumberRange:typeof u=="boolean"||u!==null&&typeof u=="object"?rl.equals:Array.isArray(u)?rl.arrIncludes:rl.weakEquals},l.getFilterFn=()=>{var s,u;return gr(l.columnDef.filterFn)?l.columnDef.filterFn:l.columnDef.filterFn==="auto"?l.getAutoFilterFn():(s=(u=i.options.filterFns)==null?void 0:u[l.columnDef.filterFn])!=null?s:rl[l.columnDef.filterFn]},l.getCanFilter=()=>{var s,u,c;return((s=l.columnDef.enableColumnFilter)!=null?s:!0)&&((u=i.options.enableColumnFilters)!=null?u:!0)&&((c=i.options.enableFilters)!=null?c:!0)&&!!l.accessorFn},l.getIsFiltered=()=>l.getFilterIndex()>-1,l.getFilterValue=()=>{var s;return(s=i.getState().columnFilters)==null||(s=s.find(u=>u.id===l.id))==null?void 0:s.value},l.getFilterIndex=()=>{var s,u;return(s=(u=i.getState().columnFilters)==null?void 0:u.findIndex(c=>c.id===l.id))!=null?s:-1},l.setFilterValue=s=>{i.setColumnFilters(u=>{const c=l.getFilterFn(),f=u==null?void 0:u.find(y=>y.id===l.id),g=Kl(s,f?f.value:void 0);if(yy(c,g,l)){var m;return(m=u==null?void 0:u.filter(y=>y.id!==l.id))!=null?m:[]}const v={id:l.id,value:g};if(f){var S;return(S=u==null?void 0:u.map(y=>y.id===l.id?v:y))!=null?S:[]}return u!=null&&u.length?[...u,v]:[v]})}},createRow:(l,i)=>{l.columnFilters={},l.columnFiltersMeta={}},createTable:l=>{l.setColumnFilters=i=>{const s=l.getAllLeafColumns(),u=c=>{var f;return(f=Kl(i,c))==null?void 0:f.filter(g=>{const m=s.find(v=>v.id===g.id);if(m){const v=m.getFilterFn();if(yy(v,g.value,m))return!1}return!0})};l.options.onColumnFiltersChange==null||l.options.onColumnFiltersChange(u)},l.resetColumnFilters=i=>{var s,u;l.setColumnFilters(i?[]:(s=(u=l.initialState)==null?void 0:u.columnFilters)!=null?s:[])},l.getPreFilteredRowModel=()=>l.getCoreRowModel(),l.getFilteredRowModel=()=>(!l._getFilteredRowModel&&l.options.getFilteredRowModel&&(l._getFilteredRowModel=l.options.getFilteredRowModel(l)),l.options.manualFiltering||!l._getFilteredRowModel?l.getPreFilteredRowModel():l._getFilteredRowModel())}};function yy(l,i,s){return(l&&l.autoRemove?l.autoRemove(i,s):!1)||typeof i>"u"||typeof i=="string"&&!i}const fw=(l,i,s)=>s.reduce((u,c)=>{const f=c.getValue(l);return u+(typeof f=="number"?f:0)},0),dw=(l,i,s)=>{let u;return s.forEach(c=>{const f=c.getValue(l);f!=null&&(u>f||u===void 0&&f>=f)&&(u=f)}),u},hw=(l,i,s)=>{let u;return s.forEach(c=>{const f=c.getValue(l);f!=null&&(u<f||u===void 0&&f>=f)&&(u=f)}),u},gw=(l,i,s)=>{let u,c;return s.forEach(f=>{const g=f.getValue(l);g!=null&&(u===void 0?g>=g&&(u=c=g):(u>g&&(u=g),c<g&&(c=g)))}),[u,c]},mw=(l,i)=>{let s=0,u=0;if(i.forEach(c=>{let f=c.getValue(l);f!=null&&(f=+f)>=f&&(++s,u+=f)}),s)return u/s},pw=(l,i)=>{if(!i.length)return;const s=i.map(f=>f.getValue(l));if(!lw(s))return;if(s.length===1)return s[0];const u=Math.floor(s.length/2),c=s.sort((f,g)=>f-g);return s.length%2!==0?c[u]:(c[u-1]+c[u])/2},vw=(l,i)=>Array.from(new Set(i.map(s=>s.getValue(l))).values()),yw=(l,i)=>new Set(i.map(s=>s.getValue(l))).size,Sw=(l,i)=>i.length,ad={sum:fw,min:dw,max:hw,extent:gw,mean:mw,median:pw,unique:vw,uniqueCount:yw,count:Sw},xw={getDefaultColumnDef:()=>({aggregatedCell:l=>{var i,s;return(i=(s=l.getValue())==null||s.toString==null?void 0:s.toString())!=null?i:null},aggregationFn:"auto"}),getInitialState:l=>({grouping:[],...l}),getDefaultOptions:l=>({onGroupingChange:ln("grouping",l),groupedColumnMode:"reorder"}),createColumn:(l,i)=>{l.toggleGrouping=()=>{i.setGrouping(s=>s!=null&&s.includes(l.id)?s.filter(u=>u!==l.id):[...s??[],l.id])},l.getCanGroup=()=>{var s,u;return((s=l.columnDef.enableGrouping)!=null?s:!0)&&((u=i.options.enableGrouping)!=null?u:!0)&&(!!l.accessorFn||!!l.columnDef.getGroupingValue)},l.getIsGrouped=()=>{var s;return(s=i.getState().grouping)==null?void 0:s.includes(l.id)},l.getGroupedIndex=()=>{var s;return(s=i.getState().grouping)==null?void 0:s.indexOf(l.id)},l.getToggleGroupingHandler=()=>{const s=l.getCanGroup();return()=>{s&&l.toggleGrouping()}},l.getAutoAggregationFn=()=>{const s=i.getCoreRowModel().flatRows[0],u=s==null?void 0:s.getValue(l.id);if(typeof u=="number")return ad.sum;if(Object.prototype.toString.call(u)==="[object Date]")return ad.extent},l.getAggregationFn=()=>{var s,u;if(!l)throw new Error;return gr(l.columnDef.aggregationFn)?l.columnDef.aggregationFn:l.columnDef.aggregationFn==="auto"?l.getAutoAggregationFn():(s=(u=i.options.aggregationFns)==null?void 0:u[l.columnDef.aggregationFn])!=null?s:ad[l.columnDef.aggregationFn]}},createTable:l=>{l.setGrouping=i=>l.options.onGroupingChange==null?void 0:l.options.onGroupingChange(i),l.resetGrouping=i=>{var s,u;l.setGrouping(i?[]:(s=(u=l.initialState)==null?void 0:u.grouping)!=null?s:[])},l.getPreGroupedRowModel=()=>l.getFilteredRowModel(),l.getGroupedRowModel=()=>(!l._getGroupedRowModel&&l.options.getGroupedRowModel&&(l._getGroupedRowModel=l.options.getGroupedRowModel(l)),l.options.manualGrouping||!l._getGroupedRowModel?l.getPreGroupedRowModel():l._getGroupedRowModel())},createRow:(l,i)=>{l.getIsGrouped=()=>!!l.groupingColumnId,l.getGroupingValue=s=>{if(l._groupingValuesCache.hasOwnProperty(s))return l._groupingValuesCache[s];const u=i.getColumn(s);return u!=null&&u.columnDef.getGroupingValue?(l._groupingValuesCache[s]=u.columnDef.getGroupingValue(l.original),l._groupingValuesCache[s]):l.getValue(s)},l._groupingValuesCache={}},createCell:(l,i,s,u)=>{l.getIsGrouped=()=>i.getIsGrouped()&&i.id===s.groupingColumnId,l.getIsPlaceholder=()=>!l.getIsGrouped()&&i.getIsGrouped(),l.getIsAggregated=()=>{var c;return!l.getIsGrouped()&&!l.getIsPlaceholder()&&!!((c=s.subRows)!=null&&c.length)}}};function bw(l,i,s){if(!(i!=null&&i.length)||!s)return l;const u=l.filter(f=>!i.includes(f.id));return s==="remove"?u:[...i.map(f=>l.find(g=>g.id===f)).filter(Boolean),...u]}const Cw={getInitialState:l=>({columnOrder:[],...l}),getDefaultOptions:l=>({onColumnOrderChange:ln("columnOrder",l)}),createColumn:(l,i)=>{l.getIndex=ce(s=>[nu(i,s)],s=>s.findIndex(u=>u.id===l.id),fe(i.options,"debugColumns")),l.getIsFirstColumn=s=>{var u;return((u=nu(i,s)[0])==null?void 0:u.id)===l.id},l.getIsLastColumn=s=>{var u;const c=nu(i,s);return((u=c[c.length-1])==null?void 0:u.id)===l.id}},createTable:l=>{l.setColumnOrder=i=>l.options.onColumnOrderChange==null?void 0:l.options.onColumnOrderChange(i),l.resetColumnOrder=i=>{var s;l.setColumnOrder(i?[]:(s=l.initialState.columnOrder)!=null?s:[])},l._getOrderColumnsFn=ce(()=>[l.getState().columnOrder,l.getState().grouping,l.options.groupedColumnMode],(i,s,u)=>c=>{let f=[];if(!(i!=null&&i.length))f=c;else{const g=[...i],m=[...c];for(;m.length&&g.length;){const v=g.shift(),S=m.findIndex(y=>y.id===v);S>-1&&f.push(m.splice(S,1)[0])}f=[...f,...m]}return bw(f,s,u)},fe(l.options,"debugTable"))}},id=()=>({left:[],right:[]}),Ew={getInitialState:l=>({columnPinning:id(),...l}),getDefaultOptions:l=>({onColumnPinningChange:ln("columnPinning",l)}),createColumn:(l,i)=>{l.pin=s=>{const u=l.getLeafColumns().map(c=>c.id).filter(Boolean);i.setColumnPinning(c=>{var f,g;if(s==="right"){var m,v;return{left:((m=c==null?void 0:c.left)!=null?m:[]).filter(x=>!(u!=null&&u.includes(x))),right:[...((v=c==null?void 0:c.right)!=null?v:[]).filter(x=>!(u!=null&&u.includes(x))),...u]}}if(s==="left"){var S,y;return{left:[...((S=c==null?void 0:c.left)!=null?S:[]).filter(x=>!(u!=null&&u.includes(x))),...u],right:((y=c==null?void 0:c.right)!=null?y:[]).filter(x=>!(u!=null&&u.includes(x)))}}return{left:((f=c==null?void 0:c.left)!=null?f:[]).filter(x=>!(u!=null&&u.includes(x))),right:((g=c==null?void 0:c.right)!=null?g:[]).filter(x=>!(u!=null&&u.includes(x)))}})},l.getCanPin=()=>l.getLeafColumns().some(u=>{var c,f,g;return((c=u.columnDef.enablePinning)!=null?c:!0)&&((f=(g=i.options.enableColumnPinning)!=null?g:i.options.enablePinning)!=null?f:!0)}),l.getIsPinned=()=>{const s=l.getLeafColumns().map(m=>m.id),{left:u,right:c}=i.getState().columnPinning,f=s.some(m=>u==null?void 0:u.includes(m)),g=s.some(m=>c==null?void 0:c.includes(m));return f?"left":g?"right":!1},l.getPinnedIndex=()=>{var s,u;const c=l.getIsPinned();return c?(s=(u=i.getState().columnPinning)==null||(u=u[c])==null?void 0:u.indexOf(l.id))!=null?s:-1:0}},createRow:(l,i)=>{l.getCenterVisibleCells=ce(()=>[l._getAllVisibleCells(),i.getState().columnPinning.left,i.getState().columnPinning.right],(s,u,c)=>{const f=[...u??[],...c??[]];return s.filter(g=>!f.includes(g.column.id))},fe(i.options,"debugRows")),l.getLeftVisibleCells=ce(()=>[l._getAllVisibleCells(),i.getState().columnPinning.left],(s,u)=>(u??[]).map(f=>s.find(g=>g.column.id===f)).filter(Boolean).map(f=>({...f,position:"left"})),fe(i.options,"debugRows")),l.getRightVisibleCells=ce(()=>[l._getAllVisibleCells(),i.getState().columnPinning.right],(s,u)=>(u??[]).map(f=>s.find(g=>g.column.id===f)).filter(Boolean).map(f=>({...f,position:"right"})),fe(i.options,"debugRows"))},createTable:l=>{l.setColumnPinning=i=>l.options.onColumnPinningChange==null?void 0:l.options.onColumnPinningChange(i),l.resetColumnPinning=i=>{var s,u;return l.setColumnPinning(i?id():(s=(u=l.initialState)==null?void 0:u.columnPinning)!=null?s:id())},l.getIsSomeColumnsPinned=i=>{var s;const u=l.getState().columnPinning;if(!i){var c,f;return!!((c=u.left)!=null&&c.length||(f=u.right)!=null&&f.length)}return!!((s=u[i])!=null&&s.length)},l.getLeftLeafColumns=ce(()=>[l.getAllLeafColumns(),l.getState().columnPinning.left],(i,s)=>(s??[]).map(u=>i.find(c=>c.id===u)).filter(Boolean),fe(l.options,"debugColumns")),l.getRightLeafColumns=ce(()=>[l.getAllLeafColumns(),l.getState().columnPinning.right],(i,s)=>(s??[]).map(u=>i.find(c=>c.id===u)).filter(Boolean),fe(l.options,"debugColumns")),l.getCenterLeafColumns=ce(()=>[l.getAllLeafColumns(),l.getState().columnPinning.left,l.getState().columnPinning.right],(i,s,u)=>{const c=[...s??[],...u??[]];return i.filter(f=>!c.includes(f.id))},fe(l.options,"debugColumns"))}};function ww(l){return l||(typeof document<"u"?document:null)}const Zo={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},sd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Rw={getDefaultColumnDef:()=>Zo,getInitialState:l=>({columnSizing:{},columnSizingInfo:sd(),...l}),getDefaultOptions:l=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:ln("columnSizing",l),onColumnSizingInfoChange:ln("columnSizingInfo",l)}),createColumn:(l,i)=>{l.getSize=()=>{var s,u,c;const f=i.getState().columnSizing[l.id];return Math.min(Math.max((s=l.columnDef.minSize)!=null?s:Zo.minSize,(u=f??l.columnDef.size)!=null?u:Zo.size),(c=l.columnDef.maxSize)!=null?c:Zo.maxSize)},l.getStart=ce(s=>[s,nu(i,s),i.getState().columnSizing],(s,u)=>u.slice(0,l.getIndex(s)).reduce((c,f)=>c+f.getSize(),0),fe(i.options,"debugColumns")),l.getAfter=ce(s=>[s,nu(i,s),i.getState().columnSizing],(s,u)=>u.slice(l.getIndex(s)+1).reduce((c,f)=>c+f.getSize(),0),fe(i.options,"debugColumns")),l.resetSize=()=>{i.setColumnSizing(s=>{let{[l.id]:u,...c}=s;return c})},l.getCanResize=()=>{var s,u;return((s=l.columnDef.enableResizing)!=null?s:!0)&&((u=i.options.enableColumnResizing)!=null?u:!0)},l.getIsResizing=()=>i.getState().columnSizingInfo.isResizingColumn===l.id},createHeader:(l,i)=>{l.getSize=()=>{let s=0;const u=c=>{if(c.subHeaders.length)c.subHeaders.forEach(u);else{var f;s+=(f=c.column.getSize())!=null?f:0}};return u(l),s},l.getStart=()=>{if(l.index>0){const s=l.headerGroup.headers[l.index-1];return s.getStart()+s.getSize()}return 0},l.getResizeHandler=s=>{const u=i.getColumn(l.column.id),c=u==null?void 0:u.getCanResize();return f=>{if(!u||!c||(f.persist==null||f.persist(),ud(f)&&f.touches&&f.touches.length>1))return;const g=l.getSize(),m=l?l.getLeafHeaders().map(E=>[E.column.id,E.column.getSize()]):[[u.id,u.getSize()]],v=ud(f)?Math.round(f.touches[0].clientX):f.clientX,S={},y=(E,U)=>{typeof U=="number"&&(i.setColumnSizingInfo(B=>{var $,F;const P=i.options.columnResizeDirection==="rtl"?-1:1,X=(U-(($=B==null?void 0:B.startOffset)!=null?$:0))*P,Z=Math.max(X/((F=B==null?void 0:B.startSize)!=null?F:0),-.999999);return B.columnSizingStart.forEach(de=>{let[ve,Le]=de;S[ve]=Math.round(Math.max(Le+Le*Z,0)*100)/100}),{...B,deltaOffset:X,deltaPercentage:Z}}),(i.options.columnResizeMode==="onChange"||E==="end")&&i.setColumnSizing(B=>({...B,...S})))},x=E=>y("move",E),C=E=>{y("end",E),i.setColumnSizingInfo(U=>({...U,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},R=ww(s),_={moveHandler:E=>x(E.clientX),upHandler:E=>{R==null||R.removeEventListener("mousemove",_.moveHandler),R==null||R.removeEventListener("mouseup",_.upHandler),C(E.clientX)}},O={moveHandler:E=>(E.cancelable&&(E.preventDefault(),E.stopPropagation()),x(E.touches[0].clientX),!1),upHandler:E=>{var U;R==null||R.removeEventListener("touchmove",O.moveHandler),R==null||R.removeEventListener("touchend",O.upHandler),E.cancelable&&(E.preventDefault(),E.stopPropagation()),C((U=E.touches[0])==null?void 0:U.clientX)}},b=_w()?{passive:!1}:!1;ud(f)?(R==null||R.addEventListener("touchmove",O.moveHandler,b),R==null||R.addEventListener("touchend",O.upHandler,b)):(R==null||R.addEventListener("mousemove",_.moveHandler,b),R==null||R.addEventListener("mouseup",_.upHandler,b)),i.setColumnSizingInfo(E=>({...E,startOffset:v,startSize:g,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:u.id}))}}},createTable:l=>{l.setColumnSizing=i=>l.options.onColumnSizingChange==null?void 0:l.options.onColumnSizingChange(i),l.setColumnSizingInfo=i=>l.options.onColumnSizingInfoChange==null?void 0:l.options.onColumnSizingInfoChange(i),l.resetColumnSizing=i=>{var s;l.setColumnSizing(i?{}:(s=l.initialState.columnSizing)!=null?s:{})},l.resetHeaderSizeInfo=i=>{var s;l.setColumnSizingInfo(i?sd():(s=l.initialState.columnSizingInfo)!=null?s:sd())},l.getTotalSize=()=>{var i,s;return(i=(s=l.getHeaderGroups()[0])==null?void 0:s.headers.reduce((u,c)=>u+c.getSize(),0))!=null?i:0},l.getLeftTotalSize=()=>{var i,s;return(i=(s=l.getLeftHeaderGroups()[0])==null?void 0:s.headers.reduce((u,c)=>u+c.getSize(),0))!=null?i:0},l.getCenterTotalSize=()=>{var i,s;return(i=(s=l.getCenterHeaderGroups()[0])==null?void 0:s.headers.reduce((u,c)=>u+c.getSize(),0))!=null?i:0},l.getRightTotalSize=()=>{var i,s;return(i=(s=l.getRightHeaderGroups()[0])==null?void 0:s.headers.reduce((u,c)=>u+c.getSize(),0))!=null?i:0}}};let Ko=null;function _w(){if(typeof Ko=="boolean")return Ko;let l=!1;try{const i={get passive(){return l=!0,!1}},s=()=>{};window.addEventListener("test",s,i),window.removeEventListener("test",s)}catch{l=!1}return Ko=l,Ko}function ud(l){return l.type==="touchstart"}const Nw={getInitialState:l=>({columnVisibility:{},...l}),getDefaultOptions:l=>({onColumnVisibilityChange:ln("columnVisibility",l)}),createColumn:(l,i)=>{l.toggleVisibility=s=>{l.getCanHide()&&i.setColumnVisibility(u=>({...u,[l.id]:s??!l.getIsVisible()}))},l.getIsVisible=()=>{var s,u;const c=l.columns;return(s=c.length?c.some(f=>f.getIsVisible()):(u=i.getState().columnVisibility)==null?void 0:u[l.id])!=null?s:!0},l.getCanHide=()=>{var s,u;return((s=l.columnDef.enableHiding)!=null?s:!0)&&((u=i.options.enableHiding)!=null?u:!0)},l.getToggleVisibilityHandler=()=>s=>{l.toggleVisibility==null||l.toggleVisibility(s.target.checked)}},createRow:(l,i)=>{l._getAllVisibleCells=ce(()=>[l.getAllCells(),i.getState().columnVisibility],s=>s.filter(u=>u.column.getIsVisible()),fe(i.options,"debugRows")),l.getVisibleCells=ce(()=>[l.getLeftVisibleCells(),l.getCenterVisibleCells(),l.getRightVisibleCells()],(s,u,c)=>[...s,...u,...c],fe(i.options,"debugRows"))},createTable:l=>{const i=(s,u)=>ce(()=>[u(),u().filter(c=>c.getIsVisible()).map(c=>c.id).join("_")],c=>c.filter(f=>f.getIsVisible==null?void 0:f.getIsVisible()),fe(l.options,"debugColumns"));l.getVisibleFlatColumns=i("getVisibleFlatColumns",()=>l.getAllFlatColumns()),l.getVisibleLeafColumns=i("getVisibleLeafColumns",()=>l.getAllLeafColumns()),l.getLeftVisibleLeafColumns=i("getLeftVisibleLeafColumns",()=>l.getLeftLeafColumns()),l.getRightVisibleLeafColumns=i("getRightVisibleLeafColumns",()=>l.getRightLeafColumns()),l.getCenterVisibleLeafColumns=i("getCenterVisibleLeafColumns",()=>l.getCenterLeafColumns()),l.setColumnVisibility=s=>l.options.onColumnVisibilityChange==null?void 0:l.options.onColumnVisibilityChange(s),l.resetColumnVisibility=s=>{var u;l.setColumnVisibility(s?{}:(u=l.initialState.columnVisibility)!=null?u:{})},l.toggleAllColumnsVisible=s=>{var u;s=(u=s)!=null?u:!l.getIsAllColumnsVisible(),l.setColumnVisibility(l.getAllLeafColumns().reduce((c,f)=>({...c,[f.id]:s||!(f.getCanHide!=null&&f.getCanHide())}),{}))},l.getIsAllColumnsVisible=()=>!l.getAllLeafColumns().some(s=>!(s.getIsVisible!=null&&s.getIsVisible())),l.getIsSomeColumnsVisible=()=>l.getAllLeafColumns().some(s=>s.getIsVisible==null?void 0:s.getIsVisible()),l.getToggleAllColumnsVisibilityHandler=()=>s=>{var u;l.toggleAllColumnsVisible((u=s.target)==null?void 0:u.checked)}}};function nu(l,i){return i?i==="center"?l.getCenterVisibleLeafColumns():i==="left"?l.getLeftVisibleLeafColumns():l.getRightVisibleLeafColumns():l.getVisibleLeafColumns()}const Tw={createTable:l=>{l._getGlobalFacetedRowModel=l.options.getFacetedRowModel&&l.options.getFacetedRowModel(l,"__global__"),l.getGlobalFacetedRowModel=()=>l.options.manualFiltering||!l._getGlobalFacetedRowModel?l.getPreFilteredRowModel():l._getGlobalFacetedRowModel(),l._getGlobalFacetedUniqueValues=l.options.getFacetedUniqueValues&&l.options.getFacetedUniqueValues(l,"__global__"),l.getGlobalFacetedUniqueValues=()=>l._getGlobalFacetedUniqueValues?l._getGlobalFacetedUniqueValues():new Map,l._getGlobalFacetedMinMaxValues=l.options.getFacetedMinMaxValues&&l.options.getFacetedMinMaxValues(l,"__global__"),l.getGlobalFacetedMinMaxValues=()=>{if(l._getGlobalFacetedMinMaxValues)return l._getGlobalFacetedMinMaxValues()}}},Mw={getInitialState:l=>({globalFilter:void 0,...l}),getDefaultOptions:l=>({onGlobalFilterChange:ln("globalFilter",l),globalFilterFn:"auto",getColumnCanGlobalFilter:i=>{var s;const u=(s=l.getCoreRowModel().flatRows[0])==null||(s=s._getAllCellsByColumnId()[i.id])==null?void 0:s.getValue();return typeof u=="string"||typeof u=="number"}}),createColumn:(l,i)=>{l.getCanGlobalFilter=()=>{var s,u,c,f;return((s=l.columnDef.enableGlobalFilter)!=null?s:!0)&&((u=i.options.enableGlobalFilter)!=null?u:!0)&&((c=i.options.enableFilters)!=null?c:!0)&&((f=i.options.getColumnCanGlobalFilter==null?void 0:i.options.getColumnCanGlobalFilter(l))!=null?f:!0)&&!!l.accessorFn}},createTable:l=>{l.getGlobalAutoFilterFn=()=>rl.includesString,l.getGlobalFilterFn=()=>{var i,s;const{globalFilterFn:u}=l.options;return gr(u)?u:u==="auto"?l.getGlobalAutoFilterFn():(i=(s=l.options.filterFns)==null?void 0:s[u])!=null?i:rl[u]},l.setGlobalFilter=i=>{l.options.onGlobalFilterChange==null||l.options.onGlobalFilterChange(i)},l.resetGlobalFilter=i=>{l.setGlobalFilter(i?void 0:l.initialState.globalFilter)}}},jw={getInitialState:l=>({expanded:{},...l}),getDefaultOptions:l=>({onExpandedChange:ln("expanded",l),paginateExpandedRows:!0}),createTable:l=>{let i=!1,s=!1;l._autoResetExpanded=()=>{var u,c;if(!i){l._queue(()=>{i=!0});return}if((u=(c=l.options.autoResetAll)!=null?c:l.options.autoResetExpanded)!=null?u:!l.options.manualExpanding){if(s)return;s=!0,l._queue(()=>{l.resetExpanded(),s=!1})}},l.setExpanded=u=>l.options.onExpandedChange==null?void 0:l.options.onExpandedChange(u),l.toggleAllRowsExpanded=u=>{u??!l.getIsAllRowsExpanded()?l.setExpanded(!0):l.setExpanded({})},l.resetExpanded=u=>{var c,f;l.setExpanded(u?{}:(c=(f=l.initialState)==null?void 0:f.expanded)!=null?c:{})},l.getCanSomeRowsExpand=()=>l.getPrePaginationRowModel().flatRows.some(u=>u.getCanExpand()),l.getToggleAllRowsExpandedHandler=()=>u=>{u.persist==null||u.persist(),l.toggleAllRowsExpanded()},l.getIsSomeRowsExpanded=()=>{const u=l.getState().expanded;return u===!0||Object.values(u).some(Boolean)},l.getIsAllRowsExpanded=()=>{const u=l.getState().expanded;return typeof u=="boolean"?u===!0:!(!Object.keys(u).length||l.getRowModel().flatRows.some(c=>!c.getIsExpanded()))},l.getExpandedDepth=()=>{let u=0;return(l.getState().expanded===!0?Object.keys(l.getRowModel().rowsById):Object.keys(l.getState().expanded)).forEach(f=>{const g=f.split(".");u=Math.max(u,g.length)}),u},l.getPreExpandedRowModel=()=>l.getSortedRowModel(),l.getExpandedRowModel=()=>(!l._getExpandedRowModel&&l.options.getExpandedRowModel&&(l._getExpandedRowModel=l.options.getExpandedRowModel(l)),l.options.manualExpanding||!l._getExpandedRowModel?l.getPreExpandedRowModel():l._getExpandedRowModel())},createRow:(l,i)=>{l.toggleExpanded=s=>{i.setExpanded(u=>{var c;const f=u===!0?!0:!!(u!=null&&u[l.id]);let g={};if(u===!0?Object.keys(i.getRowModel().rowsById).forEach(m=>{g[m]=!0}):g=u,s=(c=s)!=null?c:!f,!f&&s)return{...g,[l.id]:!0};if(f&&!s){const{[l.id]:m,...v}=g;return v}return u})},l.getIsExpanded=()=>{var s;const u=i.getState().expanded;return!!((s=i.options.getIsRowExpanded==null?void 0:i.options.getIsRowExpanded(l))!=null?s:u===!0||u!=null&&u[l.id])},l.getCanExpand=()=>{var s,u,c;return(s=i.options.getRowCanExpand==null?void 0:i.options.getRowCanExpand(l))!=null?s:((u=i.options.enableExpanding)!=null?u:!0)&&!!((c=l.subRows)!=null&&c.length)},l.getIsAllParentsExpanded=()=>{let s=!0,u=l;for(;s&&u.parentId;)u=i.getRow(u.parentId,!0),s=u.getIsExpanded();return s},l.getToggleExpandedHandler=()=>{const s=l.getCanExpand();return()=>{s&&l.toggleExpanded()}}}},Vd=0,Bd=10,od=()=>({pageIndex:Vd,pageSize:Bd}),Aw={getInitialState:l=>({...l,pagination:{...od(),...l==null?void 0:l.pagination}}),getDefaultOptions:l=>({onPaginationChange:ln("pagination",l)}),createTable:l=>{let i=!1,s=!1;l._autoResetPageIndex=()=>{var u,c;if(!i){l._queue(()=>{i=!0});return}if((u=(c=l.options.autoResetAll)!=null?c:l.options.autoResetPageIndex)!=null?u:!l.options.manualPagination){if(s)return;s=!0,l._queue(()=>{l.resetPageIndex(),s=!1})}},l.setPagination=u=>{const c=f=>Kl(u,f);return l.options.onPaginationChange==null?void 0:l.options.onPaginationChange(c)},l.resetPagination=u=>{var c;l.setPagination(u?od():(c=l.initialState.pagination)!=null?c:od())},l.setPageIndex=u=>{l.setPagination(c=>{let f=Kl(u,c.pageIndex);const g=typeof l.options.pageCount>"u"||l.options.pageCount===-1?Number.MAX_SAFE_INTEGER:l.options.pageCount-1;return f=Math.max(0,Math.min(f,g)),{...c,pageIndex:f}})},l.resetPageIndex=u=>{var c,f;l.setPageIndex(u?Vd:(c=(f=l.initialState)==null||(f=f.pagination)==null?void 0:f.pageIndex)!=null?c:Vd)},l.resetPageSize=u=>{var c,f;l.setPageSize(u?Bd:(c=(f=l.initialState)==null||(f=f.pagination)==null?void 0:f.pageSize)!=null?c:Bd)},l.setPageSize=u=>{l.setPagination(c=>{const f=Math.max(1,Kl(u,c.pageSize)),g=c.pageSize*c.pageIndex,m=Math.floor(g/f);return{...c,pageIndex:m,pageSize:f}})},l.setPageCount=u=>l.setPagination(c=>{var f;let g=Kl(u,(f=l.options.pageCount)!=null?f:-1);return typeof g=="number"&&(g=Math.max(-1,g)),{...c,pageCount:g}}),l.getPageOptions=ce(()=>[l.getPageCount()],u=>{let c=[];return u&&u>0&&(c=[...new Array(u)].fill(null).map((f,g)=>g)),c},fe(l.options,"debugTable")),l.getCanPreviousPage=()=>l.getState().pagination.pageIndex>0,l.getCanNextPage=()=>{const{pageIndex:u}=l.getState().pagination,c=l.getPageCount();return c===-1?!0:c===0?!1:u<c-1},l.previousPage=()=>l.setPageIndex(u=>u-1),l.nextPage=()=>l.setPageIndex(u=>u+1),l.firstPage=()=>l.setPageIndex(0),l.lastPage=()=>l.setPageIndex(l.getPageCount()-1),l.getPrePaginationRowModel=()=>l.getExpandedRowModel(),l.getPaginationRowModel=()=>(!l._getPaginationRowModel&&l.options.getPaginationRowModel&&(l._getPaginationRowModel=l.options.getPaginationRowModel(l)),l.options.manualPagination||!l._getPaginationRowModel?l.getPrePaginationRowModel():l._getPaginationRowModel()),l.getPageCount=()=>{var u;return(u=l.options.pageCount)!=null?u:Math.ceil(l.getRowCount()/l.getState().pagination.pageSize)},l.getRowCount=()=>{var u;return(u=l.options.rowCount)!=null?u:l.getPrePaginationRowModel().rows.length}}},rd=()=>({top:[],bottom:[]}),Ow={getInitialState:l=>({rowPinning:rd(),...l}),getDefaultOptions:l=>({onRowPinningChange:ln("rowPinning",l)}),createRow:(l,i)=>{l.pin=(s,u,c)=>{const f=u?l.getLeafRows().map(v=>{let{id:S}=v;return S}):[],g=c?l.getParentRows().map(v=>{let{id:S}=v;return S}):[],m=new Set([...g,l.id,...f]);i.setRowPinning(v=>{var S,y;if(s==="bottom"){var x,C;return{top:((x=v==null?void 0:v.top)!=null?x:[]).filter(O=>!(m!=null&&m.has(O))),bottom:[...((C=v==null?void 0:v.bottom)!=null?C:[]).filter(O=>!(m!=null&&m.has(O))),...Array.from(m)]}}if(s==="top"){var R,_;return{top:[...((R=v==null?void 0:v.top)!=null?R:[]).filter(O=>!(m!=null&&m.has(O))),...Array.from(m)],bottom:((_=v==null?void 0:v.bottom)!=null?_:[]).filter(O=>!(m!=null&&m.has(O)))}}return{top:((S=v==null?void 0:v.top)!=null?S:[]).filter(O=>!(m!=null&&m.has(O))),bottom:((y=v==null?void 0:v.bottom)!=null?y:[]).filter(O=>!(m!=null&&m.has(O)))}})},l.getCanPin=()=>{var s;const{enableRowPinning:u,enablePinning:c}=i.options;return typeof u=="function"?u(l):(s=u??c)!=null?s:!0},l.getIsPinned=()=>{const s=[l.id],{top:u,bottom:c}=i.getState().rowPinning,f=s.some(m=>u==null?void 0:u.includes(m)),g=s.some(m=>c==null?void 0:c.includes(m));return f?"top":g?"bottom":!1},l.getPinnedIndex=()=>{var s,u;const c=l.getIsPinned();if(!c)return-1;const f=(s=c==="top"?i.getTopRows():i.getBottomRows())==null?void 0:s.map(g=>{let{id:m}=g;return m});return(u=f==null?void 0:f.indexOf(l.id))!=null?u:-1}},createTable:l=>{l.setRowPinning=i=>l.options.onRowPinningChange==null?void 0:l.options.onRowPinningChange(i),l.resetRowPinning=i=>{var s,u;return l.setRowPinning(i?rd():(s=(u=l.initialState)==null?void 0:u.rowPinning)!=null?s:rd())},l.getIsSomeRowsPinned=i=>{var s;const u=l.getState().rowPinning;if(!i){var c,f;return!!((c=u.top)!=null&&c.length||(f=u.bottom)!=null&&f.length)}return!!((s=u[i])!=null&&s.length)},l._getPinnedRows=(i,s,u)=>{var c;return((c=l.options.keepPinnedRows)==null||c?(s??[]).map(g=>{const m=l.getRow(g,!0);return m.getIsAllParentsExpanded()?m:null}):(s??[]).map(g=>i.find(m=>m.id===g))).filter(Boolean).map(g=>({...g,position:u}))},l.getTopRows=ce(()=>[l.getRowModel().rows,l.getState().rowPinning.top],(i,s)=>l._getPinnedRows(i,s,"top"),fe(l.options,"debugRows")),l.getBottomRows=ce(()=>[l.getRowModel().rows,l.getState().rowPinning.bottom],(i,s)=>l._getPinnedRows(i,s,"bottom"),fe(l.options,"debugRows")),l.getCenterRows=ce(()=>[l.getRowModel().rows,l.getState().rowPinning.top,l.getState().rowPinning.bottom],(i,s,u)=>{const c=new Set([...s??[],...u??[]]);return i.filter(f=>!c.has(f.id))},fe(l.options,"debugRows"))}},zw={getInitialState:l=>({rowSelection:{},...l}),getDefaultOptions:l=>({onRowSelectionChange:ln("rowSelection",l),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:l=>{l.setRowSelection=i=>l.options.onRowSelectionChange==null?void 0:l.options.onRowSelectionChange(i),l.resetRowSelection=i=>{var s;return l.setRowSelection(i?{}:(s=l.initialState.rowSelection)!=null?s:{})},l.toggleAllRowsSelected=i=>{l.setRowSelection(s=>{i=typeof i<"u"?i:!l.getIsAllRowsSelected();const u={...s},c=l.getPreGroupedRowModel().flatRows;return i?c.forEach(f=>{f.getCanSelect()&&(u[f.id]=!0)}):c.forEach(f=>{delete u[f.id]}),u})},l.toggleAllPageRowsSelected=i=>l.setRowSelection(s=>{const u=typeof i<"u"?i:!l.getIsAllPageRowsSelected(),c={...s};return l.getRowModel().rows.forEach(f=>{Gd(c,f.id,u,!0,l)}),c}),l.getPreSelectedRowModel=()=>l.getCoreRowModel(),l.getSelectedRowModel=ce(()=>[l.getState().rowSelection,l.getCoreRowModel()],(i,s)=>Object.keys(i).length?cd(l,s):{rows:[],flatRows:[],rowsById:{}},fe(l.options,"debugTable")),l.getFilteredSelectedRowModel=ce(()=>[l.getState().rowSelection,l.getFilteredRowModel()],(i,s)=>Object.keys(i).length?cd(l,s):{rows:[],flatRows:[],rowsById:{}},fe(l.options,"debugTable")),l.getGroupedSelectedRowModel=ce(()=>[l.getState().rowSelection,l.getSortedRowModel()],(i,s)=>Object.keys(i).length?cd(l,s):{rows:[],flatRows:[],rowsById:{}},fe(l.options,"debugTable")),l.getIsAllRowsSelected=()=>{const i=l.getFilteredRowModel().flatRows,{rowSelection:s}=l.getState();let u=!!(i.length&&Object.keys(s).length);return u&&i.some(c=>c.getCanSelect()&&!s[c.id])&&(u=!1),u},l.getIsAllPageRowsSelected=()=>{const i=l.getPaginationRowModel().flatRows.filter(c=>c.getCanSelect()),{rowSelection:s}=l.getState();let u=!!i.length;return u&&i.some(c=>!s[c.id])&&(u=!1),u},l.getIsSomeRowsSelected=()=>{var i;const s=Object.keys((i=l.getState().rowSelection)!=null?i:{}).length;return s>0&&s<l.getFilteredRowModel().flatRows.length},l.getIsSomePageRowsSelected=()=>{const i=l.getPaginationRowModel().flatRows;return l.getIsAllPageRowsSelected()?!1:i.filter(s=>s.getCanSelect()).some(s=>s.getIsSelected()||s.getIsSomeSelected())},l.getToggleAllRowsSelectedHandler=()=>i=>{l.toggleAllRowsSelected(i.target.checked)},l.getToggleAllPageRowsSelectedHandler=()=>i=>{l.toggleAllPageRowsSelected(i.target.checked)}},createRow:(l,i)=>{l.toggleSelected=(s,u)=>{const c=l.getIsSelected();i.setRowSelection(f=>{var g;if(s=typeof s<"u"?s:!c,l.getCanSelect()&&c===s)return f;const m={...f};return Gd(m,l.id,s,(g=u==null?void 0:u.selectChildren)!=null?g:!0,i),m})},l.getIsSelected=()=>{const{rowSelection:s}=i.getState();return sh(l,s)},l.getIsSomeSelected=()=>{const{rowSelection:s}=i.getState();return qd(l,s)==="some"},l.getIsAllSubRowsSelected=()=>{const{rowSelection:s}=i.getState();return qd(l,s)==="all"},l.getCanSelect=()=>{var s;return typeof i.options.enableRowSelection=="function"?i.options.enableRowSelection(l):(s=i.options.enableRowSelection)!=null?s:!0},l.getCanSelectSubRows=()=>{var s;return typeof i.options.enableSubRowSelection=="function"?i.options.enableSubRowSelection(l):(s=i.options.enableSubRowSelection)!=null?s:!0},l.getCanMultiSelect=()=>{var s;return typeof i.options.enableMultiRowSelection=="function"?i.options.enableMultiRowSelection(l):(s=i.options.enableMultiRowSelection)!=null?s:!0},l.getToggleSelectedHandler=()=>{const s=l.getCanSelect();return u=>{var c;s&&l.toggleSelected((c=u.target)==null?void 0:c.checked)}}}},Gd=(l,i,s,u,c)=>{var f;const g=c.getRow(i,!0);s?(g.getCanMultiSelect()||Object.keys(l).forEach(m=>delete l[m]),g.getCanSelect()&&(l[i]=!0)):delete l[i],u&&(f=g.subRows)!=null&&f.length&&g.getCanSelectSubRows()&&g.subRows.forEach(m=>Gd(l,m.id,s,u,c))};function cd(l,i){const s=l.getState().rowSelection,u=[],c={},f=function(g,m){return g.map(v=>{var S;const y=sh(v,s);if(y&&(u.push(v),c[v.id]=v),(S=v.subRows)!=null&&S.length&&(v={...v,subRows:f(v.subRows)}),y)return v}).filter(Boolean)};return{rows:f(i.rows),flatRows:u,rowsById:c}}function sh(l,i){var s;return(s=i[l.id])!=null?s:!1}function qd(l,i,s){var u;if(!((u=l.subRows)!=null&&u.length))return!1;let c=!0,f=!1;return l.subRows.forEach(g=>{if(!(f&&!c)&&(g.getCanSelect()&&(sh(g,i)?f=!0:c=!1),g.subRows&&g.subRows.length)){const m=qd(g,i);m==="all"?f=!0:(m==="some"&&(f=!0),c=!1)}}),c?"all":f?"some":!1}const Fd=/([0-9]+)/gm,Dw=(l,i,s)=>X0(Pl(l.getValue(s)).toLowerCase(),Pl(i.getValue(s)).toLowerCase()),Uw=(l,i,s)=>X0(Pl(l.getValue(s)),Pl(i.getValue(s))),Hw=(l,i,s)=>uh(Pl(l.getValue(s)).toLowerCase(),Pl(i.getValue(s)).toLowerCase()),Lw=(l,i,s)=>uh(Pl(l.getValue(s)),Pl(i.getValue(s))),Vw=(l,i,s)=>{const u=l.getValue(s),c=i.getValue(s);return u>c?1:u<c?-1:0},Bw=(l,i,s)=>uh(l.getValue(s),i.getValue(s));function uh(l,i){return l===i?0:l>i?1:-1}function Pl(l){return typeof l=="number"?isNaN(l)||l===1/0||l===-1/0?"":String(l):typeof l=="string"?l:""}function X0(l,i){const s=l.split(Fd).filter(Boolean),u=i.split(Fd).filter(Boolean);for(;s.length&&u.length;){const c=s.shift(),f=u.shift(),g=parseInt(c,10),m=parseInt(f,10),v=[g,m].sort();if(isNaN(v[0])){if(c>f)return 1;if(f>c)return-1;continue}if(isNaN(v[1]))return isNaN(g)?-1:1;if(g>m)return 1;if(m>g)return-1}return s.length-u.length}const Ws={alphanumeric:Dw,alphanumericCaseSensitive:Uw,text:Hw,textCaseSensitive:Lw,datetime:Vw,basic:Bw},Gw={getInitialState:l=>({sorting:[],...l}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:l=>({onSortingChange:ln("sorting",l),isMultiSortEvent:i=>i.shiftKey}),createColumn:(l,i)=>{l.getAutoSortingFn=()=>{const s=i.getFilteredRowModel().flatRows.slice(10);let u=!1;for(const c of s){const f=c==null?void 0:c.getValue(l.id);if(Object.prototype.toString.call(f)==="[object Date]")return Ws.datetime;if(typeof f=="string"&&(u=!0,f.split(Fd).length>1))return Ws.alphanumeric}return u?Ws.text:Ws.basic},l.getAutoSortDir=()=>{const s=i.getFilteredRowModel().flatRows[0];return typeof(s==null?void 0:s.getValue(l.id))=="string"?"asc":"desc"},l.getSortingFn=()=>{var s,u;if(!l)throw new Error;return gr(l.columnDef.sortingFn)?l.columnDef.sortingFn:l.columnDef.sortingFn==="auto"?l.getAutoSortingFn():(s=(u=i.options.sortingFns)==null?void 0:u[l.columnDef.sortingFn])!=null?s:Ws[l.columnDef.sortingFn]},l.toggleSorting=(s,u)=>{const c=l.getNextSortingOrder(),f=typeof s<"u"&&s!==null;i.setSorting(g=>{const m=g==null?void 0:g.find(R=>R.id===l.id),v=g==null?void 0:g.findIndex(R=>R.id===l.id);let S=[],y,x=f?s:c==="desc";if(g!=null&&g.length&&l.getCanMultiSort()&&u?m?y="toggle":y="add":g!=null&&g.length&&v!==g.length-1?y="replace":m?y="toggle":y="replace",y==="toggle"&&(f||c||(y="remove")),y==="add"){var C;S=[...g,{id:l.id,desc:x}],S.splice(0,S.length-((C=i.options.maxMultiSortColCount)!=null?C:Number.MAX_SAFE_INTEGER))}else y==="toggle"?S=g.map(R=>R.id===l.id?{...R,desc:x}:R):y==="remove"?S=g.filter(R=>R.id!==l.id):S=[{id:l.id,desc:x}];return S})},l.getFirstSortDir=()=>{var s,u;return((s=(u=l.columnDef.sortDescFirst)!=null?u:i.options.sortDescFirst)!=null?s:l.getAutoSortDir()==="desc")?"desc":"asc"},l.getNextSortingOrder=s=>{var u,c;const f=l.getFirstSortDir(),g=l.getIsSorted();return g?g!==f&&((u=i.options.enableSortingRemoval)==null||u)&&(!(s&&(c=i.options.enableMultiRemove)!=null)||c)?!1:g==="desc"?"asc":"desc":f},l.getCanSort=()=>{var s,u;return((s=l.columnDef.enableSorting)!=null?s:!0)&&((u=i.options.enableSorting)!=null?u:!0)&&!!l.accessorFn},l.getCanMultiSort=()=>{var s,u;return(s=(u=l.columnDef.enableMultiSort)!=null?u:i.options.enableMultiSort)!=null?s:!!l.accessorFn},l.getIsSorted=()=>{var s;const u=(s=i.getState().sorting)==null?void 0:s.find(c=>c.id===l.id);return u?u.desc?"desc":"asc":!1},l.getSortIndex=()=>{var s,u;return(s=(u=i.getState().sorting)==null?void 0:u.findIndex(c=>c.id===l.id))!=null?s:-1},l.clearSorting=()=>{i.setSorting(s=>s!=null&&s.length?s.filter(u=>u.id!==l.id):[])},l.getToggleSortingHandler=()=>{const s=l.getCanSort();return u=>{s&&(u.persist==null||u.persist(),l.toggleSorting==null||l.toggleSorting(void 0,l.getCanMultiSort()?i.options.isMultiSortEvent==null?void 0:i.options.isMultiSortEvent(u):!1))}}},createTable:l=>{l.setSorting=i=>l.options.onSortingChange==null?void 0:l.options.onSortingChange(i),l.resetSorting=i=>{var s,u;l.setSorting(i?[]:(s=(u=l.initialState)==null?void 0:u.sorting)!=null?s:[])},l.getPreSortedRowModel=()=>l.getGroupedRowModel(),l.getSortedRowModel=()=>(!l._getSortedRowModel&&l.options.getSortedRowModel&&(l._getSortedRowModel=l.options.getSortedRowModel(l)),l.options.manualSorting||!l._getSortedRowModel?l.getPreSortedRowModel():l._getSortedRowModel())}},qw=[uw,Nw,Cw,Ew,rw,cw,Tw,Mw,Gw,xw,jw,Aw,Ow,zw,Rw];function Fw(l){var i,s;const u=[...qw,...(i=l._features)!=null?i:[]];let c={_features:u};const f=c._features.reduce((C,R)=>Object.assign(C,R.getDefaultOptions==null?void 0:R.getDefaultOptions(c)),{}),g=C=>c.options.mergeOptions?c.options.mergeOptions(f,C):{...f,...C};let v={...{},...(s=l.initialState)!=null?s:{}};c._features.forEach(C=>{var R;v=(R=C.getInitialState==null?void 0:C.getInitialState(v))!=null?R:v});const S=[];let y=!1;const x={_features:u,options:{...f,...l},initialState:v,_queue:C=>{S.push(C),y||(y=!0,Promise.resolve().then(()=>{for(;S.length;)S.shift()();y=!1}).catch(R=>setTimeout(()=>{throw R})))},reset:()=>{c.setState(c.initialState)},setOptions:C=>{const R=Kl(C,c.options);c.options=g(R)},getState:()=>c.options.state,setState:C=>{c.options.onStateChange==null||c.options.onStateChange(C)},_getRowId:(C,R,_)=>{var O;return(O=c.options.getRowId==null?void 0:c.options.getRowId(C,R,_))!=null?O:`${_?[_.id,R].join("."):R}`},getCoreRowModel:()=>(c._getCoreRowModel||(c._getCoreRowModel=c.options.getCoreRowModel(c)),c._getCoreRowModel()),getRowModel:()=>c.getPaginationRowModel(),getRow:(C,R)=>{let _=(R?c.getPrePaginationRowModel():c.getRowModel()).rowsById[C];if(!_&&(_=c.getCoreRowModel().rowsById[C],!_))throw new Error;return _},_getDefaultColumnDef:ce(()=>[c.options.defaultColumn],C=>{var R;return C=(R=C)!=null?R:{},{header:_=>{const O=_.header.column.columnDef;return O.accessorKey?O.accessorKey:O.accessorFn?O.id:null},cell:_=>{var O,b;return(O=(b=_.renderValue())==null||b.toString==null?void 0:b.toString())!=null?O:null},...c._features.reduce((_,O)=>Object.assign(_,O.getDefaultColumnDef==null?void 0:O.getDefaultColumnDef()),{}),...C}},fe(l,"debugColumns")),_getColumnDefs:()=>c.options.columns,getAllColumns:ce(()=>[c._getColumnDefs()],C=>{const R=function(_,O,b){return b===void 0&&(b=0),_.map(E=>{const U=sw(c,E,b,O),B=E;return U.columns=B.columns?R(B.columns,U,b+1):[],U})};return R(C)},fe(l,"debugColumns")),getAllFlatColumns:ce(()=>[c.getAllColumns()],C=>C.flatMap(R=>R.getFlatColumns()),fe(l,"debugColumns")),_getAllFlatColumnsById:ce(()=>[c.getAllFlatColumns()],C=>C.reduce((R,_)=>(R[_.id]=_,R),{}),fe(l,"debugColumns")),getAllLeafColumns:ce(()=>[c.getAllColumns(),c._getOrderColumnsFn()],(C,R)=>{let _=C.flatMap(O=>O.getLeafColumns());return R(_)},fe(l,"debugColumns")),getColumn:C=>c._getAllFlatColumnsById()[C]};Object.assign(c,x);for(let C=0;C<c._features.length;C++){const R=c._features[C];R==null||R.createTable==null||R.createTable(c)}return c}function Z0(){return l=>ce(()=>[l.options.data],i=>{const s={rows:[],flatRows:[],rowsById:{}},u=function(c,f,g){f===void 0&&(f=0);const m=[];for(let S=0;S<c.length;S++){const y=ow(l,l._getRowId(c[S],S,g),c[S],S,f,void 0,g==null?void 0:g.id);if(s.flatRows.push(y),s.rowsById[y.id]=y,m.push(y),l.options.getSubRows){var v;y.originalSubRows=l.options.getSubRows(c[S],S),(v=y.originalSubRows)!=null&&v.length&&(y.subRows=u(y.originalSubRows,f+1,y))}}return m};return s.rows=u(i),s},fe(l.options,"debugTable","getRowModel",()=>l._autoResetPageIndex()))}function K0(){return l=>ce(()=>[l.getState().expanded,l.getPreExpandedRowModel(),l.options.paginateExpandedRows],(i,s,u)=>!s.rows.length||i!==!0&&!Object.keys(i??{}).length||!u?s:I0(s),fe(l.options,"debugTable"))}function I0(l){const i=[],s=u=>{var c;i.push(u),(c=u.subRows)!=null&&c.length&&u.getIsExpanded()&&u.subRows.forEach(s)};return l.rows.forEach(s),{rows:i,flatRows:l.flatRows,rowsById:l.rowsById}}function $w(l){return i=>ce(()=>[i.getState().pagination,i.getPrePaginationRowModel(),i.options.paginateExpandedRows?void 0:i.getState().expanded],(s,u)=>{if(!u.rows.length)return u;const{pageSize:c,pageIndex:f}=s;let{rows:g,flatRows:m,rowsById:v}=u;const S=c*f,y=S+c;g=g.slice(S,y);let x;i.options.paginateExpandedRows?x={rows:g,flatRows:m,rowsById:v}:x=I0({rows:g,flatRows:m,rowsById:v}),x.flatRows=[];const C=R=>{x.flatRows.push(R),R.subRows.length&&R.subRows.forEach(C)};return x.rows.forEach(C),x},fe(i.options,"debugTable"))}function kw(){return l=>ce(()=>[l.getState().sorting,l.getPreSortedRowModel()],(i,s)=>{if(!s.rows.length||!(i!=null&&i.length))return s;const u=l.getState().sorting,c=[],f=u.filter(v=>{var S;return(S=l.getColumn(v.id))==null?void 0:S.getCanSort()}),g={};f.forEach(v=>{const S=l.getColumn(v.id);S&&(g[v.id]={sortUndefined:S.columnDef.sortUndefined,invertSorting:S.columnDef.invertSorting,sortingFn:S.getSortingFn()})});const m=v=>{const S=v.map(y=>({...y}));return S.sort((y,x)=>{for(let R=0;R<f.length;R+=1){var C;const _=f[R],O=g[_.id],b=O.sortUndefined,E=(C=_==null?void 0:_.desc)!=null?C:!1;let U=0;if(b){const B=y.getValue(_.id),$=x.getValue(_.id),F=B===void 0,P=$===void 0;if(F||P){if(b==="first")return F?-1:1;if(b==="last")return F?1:-1;U=F&&P?0:F?b:-b}}if(U===0&&(U=O.sortingFn(y,x,_.id)),U!==0)return E&&(U*=-1),O.invertSorting&&(U*=-1),U}return y.index-x.index}),S.forEach(y=>{var x;c.push(y),(x=y.subRows)!=null&&x.length&&(y.subRows=m(y.subRows))}),S};return{rows:m(s.rows),flatRows:c,rowsById:s.rowsById}},fe(l.options,"debugTable","getSortedRowModel",()=>l._autoResetPageIndex()))}/**
279
+ color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,i==null?void 0:i.key)}return u}}function Se(n,s,i,r){return{debug:()=>{var u;return(u=n==null?void 0:n.debugAll)!=null?u:n[s]},key:!1,onChange:r}}function gE(n,s,i,r){const u=()=>{var h;return(h=d.getValue())!=null?h:n.options.renderFallbackValue},d={id:`${s.id}_${i.id}`,row:s,column:i,getValue:()=>s.getValue(r),renderValue:u,getContext:xe(()=>[n,i,s,d],(h,m,p,y)=>({table:h,column:m,row:p,cell:y,getValue:y.getValue,renderValue:y.renderValue}),Se(n.options,"debugCells"))};return n._features.forEach(h=>{h.createCell==null||h.createCell(d,i,s,n)},{}),d}function pE(n,s,i,r){var u,d;const m={...n._getDefaultColumnDef(),...s},p=m.accessorKey;let y=(u=(d=m.id)!=null?d:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?u:typeof m.header=="string"?m.header:void 0,x;if(m.accessorFn?x=m.accessorFn:p&&(p.includes(".")?x=b=>{let w=b;for(const N of p.split(".")){var C;w=(C=w)==null?void 0:C[N]}return w}:x=b=>b[m.accessorKey]),!y)throw new Error;let v={id:`${String(y)}`,accessorFn:x,parent:r,depth:i,columnDef:m,columns:[],getFlatColumns:xe(()=>[!0],()=>{var b;return[v,...(b=v.columns)==null?void 0:b.flatMap(w=>w.getFlatColumns())]},Se(n.options,"debugColumns")),getLeafColumns:xe(()=>[n._getOrderColumnsFn()],b=>{var w;if((w=v.columns)!=null&&w.length){let C=v.columns.flatMap(N=>N.getLeafColumns());return b(C)}return[v]},Se(n.options,"debugColumns"))};for(const b of n._features)b.createColumn==null||b.createColumn(v,n);return v}const Qt="debugHeaders";function by(n,s,i){var r;let d={id:(r=i.id)!=null?r:s.id,column:s,index:i.index,isPlaceholder:!!i.isPlaceholder,placeholderId:i.placeholderId,depth:i.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const h=[],m=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(m),h.push(p)};return m(d),h},getContext:()=>({table:n,header:d,column:s})};return n._features.forEach(h=>{h.createHeader==null||h.createHeader(d,n)}),d}const vE={createTable:n=>{n.getHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r,u)=>{var d,h;const m=(d=r==null?void 0:r.map(v=>i.find(b=>b.id===v)).filter(Boolean))!=null?d:[],p=(h=u==null?void 0:u.map(v=>i.find(b=>b.id===v)).filter(Boolean))!=null?h:[],y=i.filter(v=>!(r!=null&&r.includes(v.id))&&!(u!=null&&u.includes(v.id)));return _u(s,[...m,...y,...p],n)},Se(n.options,Qt)),n.getCenterHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r,u)=>(i=i.filter(d=>!(r!=null&&r.includes(d.id))&&!(u!=null&&u.includes(d.id))),_u(s,i,n,"center")),Se(n.options,Qt)),n.getLeftHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(s,i,r)=>{var u;const d=(u=r==null?void 0:r.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return _u(s,d,n,"left")},Se(n.options,Qt)),n.getRightHeaderGroups=xe(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(s,i,r)=>{var u;const d=(u=r==null?void 0:r.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return _u(s,d,n,"right")},Se(n.options,Qt)),n.getFooterGroups=xe(()=>[n.getHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getLeftFooterGroups=xe(()=>[n.getLeftHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getCenterFooterGroups=xe(()=>[n.getCenterHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getRightFooterGroups=xe(()=>[n.getRightHeaderGroups()],s=>[...s].reverse(),Se(n.options,Qt)),n.getFlatHeaders=xe(()=>[n.getHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getLeftFlatHeaders=xe(()=>[n.getLeftHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getCenterFlatHeaders=xe(()=>[n.getCenterHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getRightFlatHeaders=xe(()=>[n.getRightHeaderGroups()],s=>s.map(i=>i.headers).flat(),Se(n.options,Qt)),n.getCenterLeafHeaders=xe(()=>[n.getCenterFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getLeftLeafHeaders=xe(()=>[n.getLeftFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getRightLeafHeaders=xe(()=>[n.getRightFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),Se(n.options,Qt)),n.getLeafHeaders=xe(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(s,i,r)=>{var u,d,h,m,p,y;return[...(u=(d=s[0])==null?void 0:d.headers)!=null?u:[],...(h=(m=i[0])==null?void 0:m.headers)!=null?h:[],...(p=(y=r[0])==null?void 0:y.headers)!=null?p:[]].map(x=>x.getLeafHeaders()).flat()},Se(n.options,Qt))}};function _u(n,s,i,r){var u,d;let h=0;const m=function(b,w){w===void 0&&(w=1),h=Math.max(h,w),b.filter(C=>C.getIsVisible()).forEach(C=>{var N;(N=C.columns)!=null&&N.length&&m(C.columns,w+1)},0)};m(n);let p=[];const y=(b,w)=>{const C={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},N=[];b.forEach(M=>{const R=[...N].reverse()[0],j=M.column.depth===C.depth;let F,T=!1;if(j&&M.column.parent?F=M.column.parent:(F=M.column,T=!0),R&&(R==null?void 0:R.column)===F)R.subHeaders.push(M);else{const H=by(i,F,{id:[r,w,F.id,M==null?void 0:M.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${N.filter(D=>D.column===F).length}`:void 0,depth:w,index:N.length});H.subHeaders.push(M),N.push(H)}C.headers.push(M),M.headerGroup=C}),p.push(C),w>0&&y(N,w-1)},x=s.map((b,w)=>by(i,b,{depth:h,index:w}));y(x,h-1),p.reverse();const v=b=>b.filter(C=>C.column.getIsVisible()).map(C=>{let N=0,M=0,R=[0];C.subHeaders&&C.subHeaders.length?(R=[],v(C.subHeaders).forEach(F=>{let{colSpan:T,rowSpan:H}=F;N+=T,R.push(H)})):N=1;const j=Math.min(...R);return M=M+j,C.colSpan=N,C.rowSpan=M,{colSpan:N,rowSpan:M}});return v((u=(d=p[0])==null?void 0:d.headers)!=null?u:[]),p}const yE=(n,s,i,r,u,d,h)=>{let m={id:s,index:r,original:i,depth:u,parentId:h,_valuesCache:{},_uniqueValuesCache:{},getValue:p=>{if(m._valuesCache.hasOwnProperty(p))return m._valuesCache[p];const y=n.getColumn(p);if(y!=null&&y.accessorFn)return m._valuesCache[p]=y.accessorFn(m.original,r),m._valuesCache[p]},getUniqueValues:p=>{if(m._uniqueValuesCache.hasOwnProperty(p))return m._uniqueValuesCache[p];const y=n.getColumn(p);if(y!=null&&y.accessorFn)return y.columnDef.getUniqueValues?(m._uniqueValuesCache[p]=y.columnDef.getUniqueValues(m.original,r),m._uniqueValuesCache[p]):(m._uniqueValuesCache[p]=[m.getValue(p)],m._uniqueValuesCache[p])},renderValue:p=>{var y;return(y=m.getValue(p))!=null?y:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>mE(m.subRows,p=>p.subRows),getParentRow:()=>m.parentId?n.getRow(m.parentId,!0):void 0,getParentRows:()=>{let p=[],y=m;for(;;){const x=y.getParentRow();if(!x)break;p.push(x),y=x}return p.reverse()},getAllCells:xe(()=>[n.getAllLeafColumns()],p=>p.map(y=>gE(n,m,y,y.id)),Se(n.options,"debugRows")),_getAllCellsByColumnId:xe(()=>[m.getAllCells()],p=>p.reduce((y,x)=>(y[x.column.id]=x,y),{}),Se(n.options,"debugRows"))};for(let p=0;p<n._features.length;p++){const y=n._features[p];y==null||y.createRow==null||y.createRow(m,n)}return m},xE={createColumn:(n,s)=>{n._getFacetedRowModel=s.options.getFacetedRowModel&&s.options.getFacetedRowModel(s,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():s.getPreFilteredRowModel(),n._getFacetedUniqueValues=s.options.getFacetedUniqueValues&&s.options.getFacetedUniqueValues(s,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=s.options.getFacetedMinMaxValues&&s.options.getFacetedMinMaxValues(s,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},P1=(n,s,i)=>{var r,u;const d=i==null||(r=i.toString())==null?void 0:r.toLowerCase();return!!(!((u=n.getValue(s))==null||(u=u.toString())==null||(u=u.toLowerCase())==null)&&u.includes(d))};P1.autoRemove=n=>kn(n);const J1=(n,s,i)=>{var r;return!!(!((r=n.getValue(s))==null||(r=r.toString())==null)&&r.includes(i))};J1.autoRemove=n=>kn(n);const W1=(n,s,i)=>{var r;return((r=n.getValue(s))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(i==null?void 0:i.toLowerCase())};W1.autoRemove=n=>kn(n);const ex=(n,s,i)=>{var r;return(r=n.getValue(s))==null?void 0:r.includes(i)};ex.autoRemove=n=>kn(n);const tx=(n,s,i)=>!i.some(r=>{var u;return!((u=n.getValue(s))!=null&&u.includes(r))});tx.autoRemove=n=>kn(n)||!(n!=null&&n.length);const nx=(n,s,i)=>i.some(r=>{var u;return(u=n.getValue(s))==null?void 0:u.includes(r)});nx.autoRemove=n=>kn(n)||!(n!=null&&n.length);const lx=(n,s,i)=>n.getValue(s)===i;lx.autoRemove=n=>kn(n);const ax=(n,s,i)=>n.getValue(s)==i;ax.autoRemove=n=>kn(n);const im=(n,s,i)=>{let[r,u]=i;const d=n.getValue(s);return d>=r&&d<=u};im.resolveFilterValue=n=>{let[s,i]=n,r=typeof s!="number"?parseFloat(s):s,u=typeof i!="number"?parseFloat(i):i,d=s===null||Number.isNaN(r)?-1/0:r,h=i===null||Number.isNaN(u)?1/0:u;if(d>h){const m=d;d=h,h=m}return[d,h]};im.autoRemove=n=>kn(n)||kn(n[0])&&kn(n[1]);const Tl={includesString:P1,includesStringSensitive:J1,equalsString:W1,arrIncludes:ex,arrIncludesAll:tx,arrIncludesSome:nx,equals:lx,weakEquals:ax,inNumberRange:im};function kn(n){return n==null||n===""}const SE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:Sn("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,s)=>{n.getAutoFilterFn=()=>{const i=s.getCoreRowModel().flatRows[0],r=i==null?void 0:i.getValue(n.id);return typeof r=="string"?Tl.includesString:typeof r=="number"?Tl.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Tl.equals:Array.isArray(r)?Tl.arrIncludes:Tl.weakEquals},n.getFilterFn=()=>{var i,r;return Ju(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(i=(r=s.options.filterFns)==null?void 0:r[n.columnDef.filterFn])!=null?i:Tl[n.columnDef.filterFn]},n.getCanFilter=()=>{var i,r,u;return((i=n.columnDef.enableColumnFilter)!=null?i:!0)&&((r=s.options.enableColumnFilters)!=null?r:!0)&&((u=s.options.enableFilters)!=null?u:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var i;return(i=s.getState().columnFilters)==null||(i=i.find(r=>r.id===n.id))==null?void 0:i.value},n.getFilterIndex=()=>{var i,r;return(i=(r=s.getState().columnFilters)==null?void 0:r.findIndex(u=>u.id===n.id))!=null?i:-1},n.setFilterValue=i=>{s.setColumnFilters(r=>{const u=n.getFilterFn(),d=r==null?void 0:r.find(x=>x.id===n.id),h=ba(i,d?d.value:void 0);if(wy(u,h,n)){var m;return(m=r==null?void 0:r.filter(x=>x.id!==n.id))!=null?m:[]}const p={id:n.id,value:h};if(d){var y;return(y=r==null?void 0:r.map(x=>x.id===n.id?p:x))!=null?y:[]}return r!=null&&r.length?[...r,p]:[p]})}},createRow:(n,s)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=s=>{const i=n.getAllLeafColumns(),r=u=>{var d;return(d=ba(s,u))==null?void 0:d.filter(h=>{const m=i.find(p=>p.id===h.id);if(m){const p=m.getFilterFn();if(wy(p,h.value,m))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(r)},n.resetColumnFilters=s=>{var i,r;n.setColumnFilters(s?[]:(i=(r=n.initialState)==null?void 0:r.columnFilters)!=null?i:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function wy(n,s,i){return(n&&n.autoRemove?n.autoRemove(s,i):!1)||typeof s>"u"||typeof s=="string"&&!s}const bE=(n,s,i)=>i.reduce((r,u)=>{const d=u.getValue(n);return r+(typeof d=="number"?d:0)},0),wE=(n,s,i)=>{let r;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(r>d||r===void 0&&d>=d)&&(r=d)}),r},CE=(n,s,i)=>{let r;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(r<d||r===void 0&&d>=d)&&(r=d)}),r},jE=(n,s,i)=>{let r,u;return i.forEach(d=>{const h=d.getValue(n);h!=null&&(r===void 0?h>=h&&(r=u=h):(r>h&&(r=h),u<h&&(u=h)))}),[r,u]},EE=(n,s)=>{let i=0,r=0;if(s.forEach(u=>{let d=u.getValue(n);d!=null&&(d=+d)>=d&&(++i,r+=d)}),i)return r/i},NE=(n,s)=>{if(!s.length)return;const i=s.map(d=>d.getValue(n));if(!hE(i))return;if(i.length===1)return i[0];const r=Math.floor(i.length/2),u=i.sort((d,h)=>d-h);return i.length%2!==0?u[r]:(u[r-1]+u[r])/2},_E=(n,s)=>Array.from(new Set(s.map(i=>i.getValue(n))).values()),ME=(n,s)=>new Set(s.map(i=>i.getValue(n))).size,RE=(n,s)=>s.length,Kd={sum:bE,min:wE,max:CE,extent:jE,mean:EE,median:NE,unique:_E,uniqueCount:ME,count:RE},TE={getDefaultColumnDef:()=>({aggregatedCell:n=>{var s,i;return(s=(i=n.getValue())==null||i.toString==null?void 0:i.toString())!=null?s:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:Sn("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,s)=>{n.toggleGrouping=()=>{s.setGrouping(i=>i!=null&&i.includes(n.id)?i.filter(r=>r!==n.id):[...i??[],n.id])},n.getCanGroup=()=>{var i,r;return((i=n.columnDef.enableGrouping)!=null?i:!0)&&((r=s.options.enableGrouping)!=null?r:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var i;return(i=s.getState().grouping)==null?void 0:i.includes(n.id)},n.getGroupedIndex=()=>{var i;return(i=s.getState().grouping)==null?void 0:i.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const i=n.getCanGroup();return()=>{i&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const i=s.getCoreRowModel().flatRows[0],r=i==null?void 0:i.getValue(n.id);if(typeof r=="number")return Kd.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Kd.extent},n.getAggregationFn=()=>{var i,r;if(!n)throw new Error;return Ju(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(i=(r=s.options.aggregationFns)==null?void 0:r[n.columnDef.aggregationFn])!=null?i:Kd[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=s=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(s),n.resetGrouping=s=>{var i,r;n.setGrouping(s?[]:(i=(r=n.initialState)==null?void 0:r.grouping)!=null?i:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,s)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=i=>{if(n._groupingValuesCache.hasOwnProperty(i))return n._groupingValuesCache[i];const r=s.getColumn(i);return r!=null&&r.columnDef.getGroupingValue?(n._groupingValuesCache[i]=r.columnDef.getGroupingValue(n.original),n._groupingValuesCache[i]):n.getValue(i)},n._groupingValuesCache={}},createCell:(n,s,i,r)=>{n.getIsGrouped=()=>s.getIsGrouped()&&s.id===i.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&s.getIsGrouped(),n.getIsAggregated=()=>{var u;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((u=i.subRows)!=null&&u.length)}}};function AE(n,s,i){if(!(s!=null&&s.length)||!i)return n;const r=n.filter(d=>!s.includes(d.id));return i==="remove"?r:[...s.map(d=>n.find(h=>h.id===d)).filter(Boolean),...r]}const OE={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:Sn("columnOrder",n)}),createColumn:(n,s)=>{n.getIndex=xe(i=>[Hr(s,i)],i=>i.findIndex(r=>r.id===n.id),Se(s.options,"debugColumns")),n.getIsFirstColumn=i=>{var r;return((r=Hr(s,i)[0])==null?void 0:r.id)===n.id},n.getIsLastColumn=i=>{var r;const u=Hr(s,i);return((r=u[u.length-1])==null?void 0:r.id)===n.id}},createTable:n=>{n.setColumnOrder=s=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(s),n.resetColumnOrder=s=>{var i;n.setColumnOrder(s?[]:(i=n.initialState.columnOrder)!=null?i:[])},n._getOrderColumnsFn=xe(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(s,i,r)=>u=>{let d=[];if(!(s!=null&&s.length))d=u;else{const h=[...s],m=[...u];for(;m.length&&h.length;){const p=h.shift(),y=m.findIndex(x=>x.id===p);y>-1&&d.push(m.splice(y,1)[0])}d=[...d,...m]}return AE(d,i,r)},Se(n.options,"debugTable"))}},Zd=()=>({left:[],right:[]}),zE={getInitialState:n=>({columnPinning:Zd(),...n}),getDefaultOptions:n=>({onColumnPinningChange:Sn("columnPinning",n)}),createColumn:(n,s)=>{n.pin=i=>{const r=n.getLeafColumns().map(u=>u.id).filter(Boolean);s.setColumnPinning(u=>{var d,h;if(i==="right"){var m,p;return{left:((m=u==null?void 0:u.left)!=null?m:[]).filter(v=>!(r!=null&&r.includes(v))),right:[...((p=u==null?void 0:u.right)!=null?p:[]).filter(v=>!(r!=null&&r.includes(v))),...r]}}if(i==="left"){var y,x;return{left:[...((y=u==null?void 0:u.left)!=null?y:[]).filter(v=>!(r!=null&&r.includes(v))),...r],right:((x=u==null?void 0:u.right)!=null?x:[]).filter(v=>!(r!=null&&r.includes(v)))}}return{left:((d=u==null?void 0:u.left)!=null?d:[]).filter(v=>!(r!=null&&r.includes(v))),right:((h=u==null?void 0:u.right)!=null?h:[]).filter(v=>!(r!=null&&r.includes(v)))}})},n.getCanPin=()=>n.getLeafColumns().some(r=>{var u,d,h;return((u=r.columnDef.enablePinning)!=null?u:!0)&&((d=(h=s.options.enableColumnPinning)!=null?h:s.options.enablePinning)!=null?d:!0)}),n.getIsPinned=()=>{const i=n.getLeafColumns().map(m=>m.id),{left:r,right:u}=s.getState().columnPinning,d=i.some(m=>r==null?void 0:r.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"left":h?"right":!1},n.getPinnedIndex=()=>{var i,r;const u=n.getIsPinned();return u?(i=(r=s.getState().columnPinning)==null||(r=r[u])==null?void 0:r.indexOf(n.id))!=null?i:-1:0}},createRow:(n,s)=>{n.getCenterVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.left,s.getState().columnPinning.right],(i,r,u)=>{const d=[...r??[],...u??[]];return i.filter(h=>!d.includes(h.column.id))},Se(s.options,"debugRows")),n.getLeftVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.left],(i,r)=>(r??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"left"})),Se(s.options,"debugRows")),n.getRightVisibleCells=xe(()=>[n._getAllVisibleCells(),s.getState().columnPinning.right],(i,r)=>(r??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"right"})),Se(s.options,"debugRows"))},createTable:n=>{n.setColumnPinning=s=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(s),n.resetColumnPinning=s=>{var i,r;return n.setColumnPinning(s?Zd():(i=(r=n.initialState)==null?void 0:r.columnPinning)!=null?i:Zd())},n.getIsSomeColumnsPinned=s=>{var i;const r=n.getState().columnPinning;if(!s){var u,d;return!!((u=r.left)!=null&&u.length||(d=r.right)!=null&&d.length)}return!!((i=r[s])!=null&&i.length)},n.getLeftLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),Se(n.options,"debugColumns")),n.getRightLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),Se(n.options,"debugColumns")),n.getCenterLeafColumns=xe(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(s,i,r)=>{const u=[...i??[],...r??[]];return s.filter(d=>!u.includes(d.id))},Se(n.options,"debugColumns"))}};function DE(n){return n||(typeof document<"u"?document:null)}const Mu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Pd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),HE={getDefaultColumnDef:()=>Mu,getInitialState:n=>({columnSizing:{},columnSizingInfo:Pd(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Sn("columnSizing",n),onColumnSizingInfoChange:Sn("columnSizingInfo",n)}),createColumn:(n,s)=>{n.getSize=()=>{var i,r,u;const d=s.getState().columnSizing[n.id];return Math.min(Math.max((i=n.columnDef.minSize)!=null?i:Mu.minSize,(r=d??n.columnDef.size)!=null?r:Mu.size),(u=n.columnDef.maxSize)!=null?u:Mu.maxSize)},n.getStart=xe(i=>[i,Hr(s,i),s.getState().columnSizing],(i,r)=>r.slice(0,n.getIndex(i)).reduce((u,d)=>u+d.getSize(),0),Se(s.options,"debugColumns")),n.getAfter=xe(i=>[i,Hr(s,i),s.getState().columnSizing],(i,r)=>r.slice(n.getIndex(i)+1).reduce((u,d)=>u+d.getSize(),0),Se(s.options,"debugColumns")),n.resetSize=()=>{s.setColumnSizing(i=>{let{[n.id]:r,...u}=i;return u})},n.getCanResize=()=>{var i,r;return((i=n.columnDef.enableResizing)!=null?i:!0)&&((r=s.options.enableColumnResizing)!=null?r:!0)},n.getIsResizing=()=>s.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,s)=>{n.getSize=()=>{let i=0;const r=u=>{if(u.subHeaders.length)u.subHeaders.forEach(r);else{var d;i+=(d=u.column.getSize())!=null?d:0}};return r(n),i},n.getStart=()=>{if(n.index>0){const i=n.headerGroup.headers[n.index-1];return i.getStart()+i.getSize()}return 0},n.getResizeHandler=i=>{const r=s.getColumn(n.column.id),u=r==null?void 0:r.getCanResize();return d=>{if(!r||!u||(d.persist==null||d.persist(),Jd(d)&&d.touches&&d.touches.length>1))return;const h=n.getSize(),m=n?n.getLeafHeaders().map(R=>[R.column.id,R.column.getSize()]):[[r.id,r.getSize()]],p=Jd(d)?Math.round(d.touches[0].clientX):d.clientX,y={},x=(R,j)=>{typeof j=="number"&&(s.setColumnSizingInfo(F=>{var T,H;const D=s.options.columnResizeDirection==="rtl"?-1:1,z=(j-((T=F==null?void 0:F.startOffset)!=null?T:0))*D,Y=Math.max(z/((H=F==null?void 0:F.startSize)!=null?H:0),-.999999);return F.columnSizingStart.forEach(te=>{let[k,ne]=te;y[k]=Math.round(Math.max(ne+ne*Y,0)*100)/100}),{...F,deltaOffset:z,deltaPercentage:Y}}),(s.options.columnResizeMode==="onChange"||R==="end")&&s.setColumnSizing(F=>({...F,...y})))},v=R=>x("move",R),b=R=>{x("end",R),s.setColumnSizingInfo(j=>({...j,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=DE(i),C={moveHandler:R=>v(R.clientX),upHandler:R=>{w==null||w.removeEventListener("mousemove",C.moveHandler),w==null||w.removeEventListener("mouseup",C.upHandler),b(R.clientX)}},N={moveHandler:R=>(R.cancelable&&(R.preventDefault(),R.stopPropagation()),v(R.touches[0].clientX),!1),upHandler:R=>{var j;w==null||w.removeEventListener("touchmove",N.moveHandler),w==null||w.removeEventListener("touchend",N.upHandler),R.cancelable&&(R.preventDefault(),R.stopPropagation()),b((j=R.touches[0])==null?void 0:j.clientX)}},M=LE()?{passive:!1}:!1;Jd(d)?(w==null||w.addEventListener("touchmove",N.moveHandler,M),w==null||w.addEventListener("touchend",N.upHandler,M)):(w==null||w.addEventListener("mousemove",C.moveHandler,M),w==null||w.addEventListener("mouseup",C.upHandler,M)),s.setColumnSizingInfo(R=>({...R,startOffset:p,startSize:h,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:r.id}))}}},createTable:n=>{n.setColumnSizing=s=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(s),n.setColumnSizingInfo=s=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(s),n.resetColumnSizing=s=>{var i;n.setColumnSizing(s?{}:(i=n.initialState.columnSizing)!=null?i:{})},n.resetHeaderSizeInfo=s=>{var i;n.setColumnSizingInfo(s?Pd():(i=n.initialState.columnSizingInfo)!=null?i:Pd())},n.getTotalSize=()=>{var s,i;return(s=(i=n.getHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getLeftTotalSize=()=>{var s,i;return(s=(i=n.getLeftHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getCenterTotalSize=()=>{var s,i;return(s=(i=n.getCenterHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0},n.getRightTotalSize=()=>{var s,i;return(s=(i=n.getRightHeaderGroups()[0])==null?void 0:i.headers.reduce((r,u)=>r+u.getSize(),0))!=null?s:0}}};let Ru=null;function LE(){if(typeof Ru=="boolean")return Ru;let n=!1;try{const s={get passive(){return n=!0,!1}},i=()=>{};window.addEventListener("test",i,s),window.removeEventListener("test",i)}catch{n=!1}return Ru=n,Ru}function Jd(n){return n.type==="touchstart"}const UE={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:Sn("columnVisibility",n)}),createColumn:(n,s)=>{n.toggleVisibility=i=>{n.getCanHide()&&s.setColumnVisibility(r=>({...r,[n.id]:i??!n.getIsVisible()}))},n.getIsVisible=()=>{var i,r;const u=n.columns;return(i=u.length?u.some(d=>d.getIsVisible()):(r=s.getState().columnVisibility)==null?void 0:r[n.id])!=null?i:!0},n.getCanHide=()=>{var i,r;return((i=n.columnDef.enableHiding)!=null?i:!0)&&((r=s.options.enableHiding)!=null?r:!0)},n.getToggleVisibilityHandler=()=>i=>{n.toggleVisibility==null||n.toggleVisibility(i.target.checked)}},createRow:(n,s)=>{n._getAllVisibleCells=xe(()=>[n.getAllCells(),s.getState().columnVisibility],i=>i.filter(r=>r.column.getIsVisible()),Se(s.options,"debugRows")),n.getVisibleCells=xe(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(i,r,u)=>[...i,...r,...u],Se(s.options,"debugRows"))},createTable:n=>{const s=(i,r)=>xe(()=>[r(),r().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(d=>d.getIsVisible==null?void 0:d.getIsVisible()),Se(n.options,"debugColumns"));n.getVisibleFlatColumns=s("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=s("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=s("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=s("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=s("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=i=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(i),n.resetColumnVisibility=i=>{var r;n.setColumnVisibility(i?{}:(r=n.initialState.columnVisibility)!=null?r:{})},n.toggleAllColumnsVisible=i=>{var r;i=(r=i)!=null?r:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((u,d)=>({...u,[d.id]:i||!(d.getCanHide!=null&&d.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(i=>!(i.getIsVisible!=null&&i.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(i=>i.getIsVisible==null?void 0:i.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>i=>{var r;n.toggleAllColumnsVisible((r=i.target)==null?void 0:r.checked)}}};function Hr(n,s){return s?s==="center"?n.getCenterVisibleLeafColumns():s==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const VE={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},$E={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:Sn("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:s=>{var i;const r=(i=n.getCoreRowModel().flatRows[0])==null||(i=i._getAllCellsByColumnId()[s.id])==null?void 0:i.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(n,s)=>{n.getCanGlobalFilter=()=>{var i,r,u,d;return((i=n.columnDef.enableGlobalFilter)!=null?i:!0)&&((r=s.options.enableGlobalFilter)!=null?r:!0)&&((u=s.options.enableFilters)!=null?u:!0)&&((d=s.options.getColumnCanGlobalFilter==null?void 0:s.options.getColumnCanGlobalFilter(n))!=null?d:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>Tl.includesString,n.getGlobalFilterFn=()=>{var s,i;const{globalFilterFn:r}=n.options;return Ju(r)?r:r==="auto"?n.getGlobalAutoFilterFn():(s=(i=n.options.filterFns)==null?void 0:i[r])!=null?s:Tl[r]},n.setGlobalFilter=s=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(s)},n.resetGlobalFilter=s=>{n.setGlobalFilter(s?void 0:n.initialState.globalFilter)}}},FE={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:Sn("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let s=!1,i=!1;n._autoResetExpanded=()=>{var r,u;if(!s){n._queue(()=>{s=!0});return}if((r=(u=n.options.autoResetAll)!=null?u:n.options.autoResetExpanded)!=null?r:!n.options.manualExpanding){if(i)return;i=!0,n._queue(()=>{n.resetExpanded(),i=!1})}},n.setExpanded=r=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(r),n.toggleAllRowsExpanded=r=>{r??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=r=>{var u,d;n.setExpanded(r?{}:(u=(d=n.initialState)==null?void 0:d.expanded)!=null?u:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const r=n.getState().expanded;return r===!0||Object.values(r).some(Boolean)},n.getIsAllRowsExpanded=()=>{const r=n.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||n.getRowModel().flatRows.some(u=>!u.getIsExpanded()))},n.getExpandedDepth=()=>{let r=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(d=>{const h=d.split(".");r=Math.max(r,h.length)}),r},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,s)=>{n.toggleExpanded=i=>{s.setExpanded(r=>{var u;const d=r===!0?!0:!!(r!=null&&r[n.id]);let h={};if(r===!0?Object.keys(s.getRowModel().rowsById).forEach(m=>{h[m]=!0}):h=r,i=(u=i)!=null?u:!d,!d&&i)return{...h,[n.id]:!0};if(d&&!i){const{[n.id]:m,...p}=h;return p}return r})},n.getIsExpanded=()=>{var i;const r=s.getState().expanded;return!!((i=s.options.getIsRowExpanded==null?void 0:s.options.getIsRowExpanded(n))!=null?i:r===!0||r!=null&&r[n.id])},n.getCanExpand=()=>{var i,r,u;return(i=s.options.getRowCanExpand==null?void 0:s.options.getRowCanExpand(n))!=null?i:((r=s.options.enableExpanding)!=null?r:!0)&&!!((u=n.subRows)!=null&&u.length)},n.getIsAllParentsExpanded=()=>{let i=!0,r=n;for(;i&&r.parentId;)r=s.getRow(r.parentId,!0),i=r.getIsExpanded();return i},n.getToggleExpandedHandler=()=>{const i=n.getCanExpand();return()=>{i&&n.toggleExpanded()}}}},Bh=0,kh=10,Wd=()=>({pageIndex:Bh,pageSize:kh}),BE={getInitialState:n=>({...n,pagination:{...Wd(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:Sn("pagination",n)}),createTable:n=>{let s=!1,i=!1;n._autoResetPageIndex=()=>{var r,u;if(!s){n._queue(()=>{s=!0});return}if((r=(u=n.options.autoResetAll)!=null?u:n.options.autoResetPageIndex)!=null?r:!n.options.manualPagination){if(i)return;i=!0,n._queue(()=>{n.resetPageIndex(),i=!1})}},n.setPagination=r=>{const u=d=>ba(r,d);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=r=>{var u;n.setPagination(r?Wd():(u=n.initialState.pagination)!=null?u:Wd())},n.setPageIndex=r=>{n.setPagination(u=>{let d=ba(r,u.pageIndex);const h=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return d=Math.max(0,Math.min(d,h)),{...u,pageIndex:d}})},n.resetPageIndex=r=>{var u,d;n.setPageIndex(r?Bh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageIndex)!=null?u:Bh)},n.resetPageSize=r=>{var u,d;n.setPageSize(r?kh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageSize)!=null?u:kh)},n.setPageSize=r=>{n.setPagination(u=>{const d=Math.max(1,ba(r,u.pageSize)),h=u.pageSize*u.pageIndex,m=Math.floor(h/d);return{...u,pageIndex:m,pageSize:d}})},n.setPageCount=r=>n.setPagination(u=>{var d;let h=ba(r,(d=n.options.pageCount)!=null?d:-1);return typeof h=="number"&&(h=Math.max(-1,h)),{...u,pageCount:h}}),n.getPageOptions=xe(()=>[n.getPageCount()],r=>{let u=[];return r&&r>0&&(u=[...new Array(r)].fill(null).map((d,h)=>h)),u},Se(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:r}=n.getState().pagination,u=n.getPageCount();return u===-1?!0:u===0?!1:r<u-1},n.previousPage=()=>n.setPageIndex(r=>r-1),n.nextPage=()=>n.setPageIndex(r=>r+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var r;return(r=n.options.pageCount)!=null?r:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var r;return(r=n.options.rowCount)!=null?r:n.getPrePaginationRowModel().rows.length}}},eh=()=>({top:[],bottom:[]}),kE={getInitialState:n=>({rowPinning:eh(),...n}),getDefaultOptions:n=>({onRowPinningChange:Sn("rowPinning",n)}),createRow:(n,s)=>{n.pin=(i,r,u)=>{const d=r?n.getLeafRows().map(p=>{let{id:y}=p;return y}):[],h=u?n.getParentRows().map(p=>{let{id:y}=p;return y}):[],m=new Set([...h,n.id,...d]);s.setRowPinning(p=>{var y,x;if(i==="bottom"){var v,b;return{top:((v=p==null?void 0:p.top)!=null?v:[]).filter(N=>!(m!=null&&m.has(N))),bottom:[...((b=p==null?void 0:p.bottom)!=null?b:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)]}}if(i==="top"){var w,C;return{top:[...((w=p==null?void 0:p.top)!=null?w:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)],bottom:((C=p==null?void 0:p.bottom)!=null?C:[]).filter(N=>!(m!=null&&m.has(N)))}}return{top:((y=p==null?void 0:p.top)!=null?y:[]).filter(N=>!(m!=null&&m.has(N))),bottom:((x=p==null?void 0:p.bottom)!=null?x:[]).filter(N=>!(m!=null&&m.has(N)))}})},n.getCanPin=()=>{var i;const{enableRowPinning:r,enablePinning:u}=s.options;return typeof r=="function"?r(n):(i=r??u)!=null?i:!0},n.getIsPinned=()=>{const i=[n.id],{top:r,bottom:u}=s.getState().rowPinning,d=i.some(m=>r==null?void 0:r.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"top":h?"bottom":!1},n.getPinnedIndex=()=>{var i,r;const u=n.getIsPinned();if(!u)return-1;const d=(i=u==="top"?s.getTopRows():s.getBottomRows())==null?void 0:i.map(h=>{let{id:m}=h;return m});return(r=d==null?void 0:d.indexOf(n.id))!=null?r:-1}},createTable:n=>{n.setRowPinning=s=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(s),n.resetRowPinning=s=>{var i,r;return n.setRowPinning(s?eh():(i=(r=n.initialState)==null?void 0:r.rowPinning)!=null?i:eh())},n.getIsSomeRowsPinned=s=>{var i;const r=n.getState().rowPinning;if(!s){var u,d;return!!((u=r.top)!=null&&u.length||(d=r.bottom)!=null&&d.length)}return!!((i=r[s])!=null&&i.length)},n._getPinnedRows=(s,i,r)=>{var u;return((u=n.options.keepPinnedRows)==null||u?(i??[]).map(h=>{const m=n.getRow(h,!0);return m.getIsAllParentsExpanded()?m:null}):(i??[]).map(h=>s.find(m=>m.id===h))).filter(Boolean).map(h=>({...h,position:r}))},n.getTopRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(s,i)=>n._getPinnedRows(s,i,"top"),Se(n.options,"debugRows")),n.getBottomRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(s,i)=>n._getPinnedRows(s,i,"bottom"),Se(n.options,"debugRows")),n.getCenterRows=xe(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(s,i,r)=>{const u=new Set([...i??[],...r??[]]);return s.filter(d=>!u.has(d.id))},Se(n.options,"debugRows"))}},GE={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:Sn("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=s=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(s),n.resetRowSelection=s=>{var i;return n.setRowSelection(s?{}:(i=n.initialState.rowSelection)!=null?i:{})},n.toggleAllRowsSelected=s=>{n.setRowSelection(i=>{s=typeof s<"u"?s:!n.getIsAllRowsSelected();const r={...i},u=n.getPreGroupedRowModel().flatRows;return s?u.forEach(d=>{d.getCanSelect()&&(r[d.id]=!0)}):u.forEach(d=>{delete r[d.id]}),r})},n.toggleAllPageRowsSelected=s=>n.setRowSelection(i=>{const r=typeof s<"u"?s:!n.getIsAllPageRowsSelected(),u={...i};return n.getRowModel().rows.forEach(d=>{Gh(u,d.id,r,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getCoreRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getFilteredSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getGroupedSelectedRowModel=xe(()=>[n.getState().rowSelection,n.getSortedRowModel()],(s,i)=>Object.keys(s).length?th(n,i):{rows:[],flatRows:[],rowsById:{}},Se(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const s=n.getFilteredRowModel().flatRows,{rowSelection:i}=n.getState();let r=!!(s.length&&Object.keys(i).length);return r&&s.some(u=>u.getCanSelect()&&!i[u.id])&&(r=!1),r},n.getIsAllPageRowsSelected=()=>{const s=n.getPaginationRowModel().flatRows.filter(u=>u.getCanSelect()),{rowSelection:i}=n.getState();let r=!!s.length;return r&&s.some(u=>!i[u.id])&&(r=!1),r},n.getIsSomeRowsSelected=()=>{var s;const i=Object.keys((s=n.getState().rowSelection)!=null?s:{}).length;return i>0&&i<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const s=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:s.filter(i=>i.getCanSelect()).some(i=>i.getIsSelected()||i.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>s=>{n.toggleAllRowsSelected(s.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>s=>{n.toggleAllPageRowsSelected(s.target.checked)}},createRow:(n,s)=>{n.toggleSelected=(i,r)=>{const u=n.getIsSelected();s.setRowSelection(d=>{var h;if(i=typeof i<"u"?i:!u,n.getCanSelect()&&u===i)return d;const m={...d};return Gh(m,n.id,i,(h=r==null?void 0:r.selectChildren)!=null?h:!0,s),m})},n.getIsSelected=()=>{const{rowSelection:i}=s.getState();return rm(n,i)},n.getIsSomeSelected=()=>{const{rowSelection:i}=s.getState();return qh(n,i)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=s.getState();return qh(n,i)==="all"},n.getCanSelect=()=>{var i;return typeof s.options.enableRowSelection=="function"?s.options.enableRowSelection(n):(i=s.options.enableRowSelection)!=null?i:!0},n.getCanSelectSubRows=()=>{var i;return typeof s.options.enableSubRowSelection=="function"?s.options.enableSubRowSelection(n):(i=s.options.enableSubRowSelection)!=null?i:!0},n.getCanMultiSelect=()=>{var i;return typeof s.options.enableMultiRowSelection=="function"?s.options.enableMultiRowSelection(n):(i=s.options.enableMultiRowSelection)!=null?i:!0},n.getToggleSelectedHandler=()=>{const i=n.getCanSelect();return r=>{var u;i&&n.toggleSelected((u=r.target)==null?void 0:u.checked)}}}},Gh=(n,s,i,r,u)=>{var d;const h=u.getRow(s,!0);i?(h.getCanMultiSelect()||Object.keys(n).forEach(m=>delete n[m]),h.getCanSelect()&&(n[s]=!0)):delete n[s],r&&(d=h.subRows)!=null&&d.length&&h.getCanSelectSubRows()&&h.subRows.forEach(m=>Gh(n,m.id,i,r,u))};function th(n,s){const i=n.getState().rowSelection,r=[],u={},d=function(h,m){return h.map(p=>{var y;const x=rm(p,i);if(x&&(r.push(p),u[p.id]=p),(y=p.subRows)!=null&&y.length&&(p={...p,subRows:d(p.subRows)}),x)return p}).filter(Boolean)};return{rows:d(s.rows),flatRows:r,rowsById:u}}function rm(n,s){var i;return(i=s[n.id])!=null?i:!1}function qh(n,s,i){var r;if(!((r=n.subRows)!=null&&r.length))return!1;let u=!0,d=!1;return n.subRows.forEach(h=>{if(!(d&&!u)&&(h.getCanSelect()&&(rm(h,s)?d=!0:u=!1),h.subRows&&h.subRows.length)){const m=qh(h,s);m==="all"?d=!0:(m==="some"&&(d=!0),u=!1)}}),u?"all":d?"some":!1}const Qh=/([0-9]+)/gm,qE=(n,s,i)=>sx(wa(n.getValue(i)).toLowerCase(),wa(s.getValue(i)).toLowerCase()),QE=(n,s,i)=>sx(wa(n.getValue(i)),wa(s.getValue(i))),YE=(n,s,i)=>om(wa(n.getValue(i)).toLowerCase(),wa(s.getValue(i)).toLowerCase()),IE=(n,s,i)=>om(wa(n.getValue(i)),wa(s.getValue(i))),XE=(n,s,i)=>{const r=n.getValue(i),u=s.getValue(i);return r>u?1:r<u?-1:0},KE=(n,s,i)=>om(n.getValue(i),s.getValue(i));function om(n,s){return n===s?0:n>s?1:-1}function wa(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function sx(n,s){const i=n.split(Qh).filter(Boolean),r=s.split(Qh).filter(Boolean);for(;i.length&&r.length;){const u=i.shift(),d=r.shift(),h=parseInt(u,10),m=parseInt(d,10),p=[h,m].sort();if(isNaN(p[0])){if(u>d)return 1;if(d>u)return-1;continue}if(isNaN(p[1]))return isNaN(h)?-1:1;if(h>m)return 1;if(m>h)return-1}return i.length-r.length}const Er={alphanumeric:qE,alphanumericCaseSensitive:QE,text:YE,textCaseSensitive:IE,datetime:XE,basic:KE},ZE={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:Sn("sorting",n),isMultiSortEvent:s=>s.shiftKey}),createColumn:(n,s)=>{n.getAutoSortingFn=()=>{const i=s.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const u of i){const d=u==null?void 0:u.getValue(n.id);if(Object.prototype.toString.call(d)==="[object Date]")return Er.datetime;if(typeof d=="string"&&(r=!0,d.split(Qh).length>1))return Er.alphanumeric}return r?Er.text:Er.basic},n.getAutoSortDir=()=>{const i=s.getFilteredRowModel().flatRows[0];return typeof(i==null?void 0:i.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var i,r;if(!n)throw new Error;return Ju(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(i=(r=s.options.sortingFns)==null?void 0:r[n.columnDef.sortingFn])!=null?i:Er[n.columnDef.sortingFn]},n.toggleSorting=(i,r)=>{const u=n.getNextSortingOrder(),d=typeof i<"u"&&i!==null;s.setSorting(h=>{const m=h==null?void 0:h.find(w=>w.id===n.id),p=h==null?void 0:h.findIndex(w=>w.id===n.id);let y=[],x,v=d?i:u==="desc";if(h!=null&&h.length&&n.getCanMultiSort()&&r?m?x="toggle":x="add":h!=null&&h.length&&p!==h.length-1?x="replace":m?x="toggle":x="replace",x==="toggle"&&(d||u||(x="remove")),x==="add"){var b;y=[...h,{id:n.id,desc:v}],y.splice(0,y.length-((b=s.options.maxMultiSortColCount)!=null?b:Number.MAX_SAFE_INTEGER))}else x==="toggle"?y=h.map(w=>w.id===n.id?{...w,desc:v}:w):x==="remove"?y=h.filter(w=>w.id!==n.id):y=[{id:n.id,desc:v}];return y})},n.getFirstSortDir=()=>{var i,r;return((i=(r=n.columnDef.sortDescFirst)!=null?r:s.options.sortDescFirst)!=null?i:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=i=>{var r,u;const d=n.getFirstSortDir(),h=n.getIsSorted();return h?h!==d&&((r=s.options.enableSortingRemoval)==null||r)&&(!(i&&(u=s.options.enableMultiRemove)!=null)||u)?!1:h==="desc"?"asc":"desc":d},n.getCanSort=()=>{var i,r;return((i=n.columnDef.enableSorting)!=null?i:!0)&&((r=s.options.enableSorting)!=null?r:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var i,r;return(i=(r=n.columnDef.enableMultiSort)!=null?r:s.options.enableMultiSort)!=null?i:!!n.accessorFn},n.getIsSorted=()=>{var i;const r=(i=s.getState().sorting)==null?void 0:i.find(u=>u.id===n.id);return r?r.desc?"desc":"asc":!1},n.getSortIndex=()=>{var i,r;return(i=(r=s.getState().sorting)==null?void 0:r.findIndex(u=>u.id===n.id))!=null?i:-1},n.clearSorting=()=>{s.setSorting(i=>i!=null&&i.length?i.filter(r=>r.id!==n.id):[])},n.getToggleSortingHandler=()=>{const i=n.getCanSort();return r=>{i&&(r.persist==null||r.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?s.options.isMultiSortEvent==null?void 0:s.options.isMultiSortEvent(r):!1))}}},createTable:n=>{n.setSorting=s=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(s),n.resetSorting=s=>{var i,r;n.setSorting(s?[]:(i=(r=n.initialState)==null?void 0:r.sorting)!=null?i:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},PE=[vE,UE,OE,zE,xE,SE,VE,$E,ZE,TE,FE,BE,kE,GE,HE];function JE(n){var s,i;const r=[...PE,...(s=n._features)!=null?s:[]];let u={_features:r};const d=u._features.reduce((b,w)=>Object.assign(b,w.getDefaultOptions==null?void 0:w.getDefaultOptions(u)),{}),h=b=>u.options.mergeOptions?u.options.mergeOptions(d,b):{...d,...b};let p={...{},...(i=n.initialState)!=null?i:{}};u._features.forEach(b=>{var w;p=(w=b.getInitialState==null?void 0:b.getInitialState(p))!=null?w:p});const y=[];let x=!1;const v={_features:r,options:{...d,...n},initialState:p,_queue:b=>{y.push(b),x||(x=!0,Promise.resolve().then(()=>{for(;y.length;)y.shift()();x=!1}).catch(w=>setTimeout(()=>{throw w})))},reset:()=>{u.setState(u.initialState)},setOptions:b=>{const w=ba(b,u.options);u.options=h(w)},getState:()=>u.options.state,setState:b=>{u.options.onStateChange==null||u.options.onStateChange(b)},_getRowId:(b,w,C)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(b,w,C))!=null?N:`${C?[C.id,w].join("."):w}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(b,w)=>{let C=(w?u.getPrePaginationRowModel():u.getRowModel()).rowsById[b];if(!C&&(C=u.getCoreRowModel().rowsById[b],!C))throw new Error;return C},_getDefaultColumnDef:xe(()=>[u.options.defaultColumn],b=>{var w;return b=(w=b)!=null?w:{},{header:C=>{const N=C.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:C=>{var N,M;return(N=(M=C.renderValue())==null||M.toString==null?void 0:M.toString())!=null?N:null},...u._features.reduce((C,N)=>Object.assign(C,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...b}},Se(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:xe(()=>[u._getColumnDefs()],b=>{const w=function(C,N,M){return M===void 0&&(M=0),C.map(R=>{const j=pE(u,R,M,N),F=R;return j.columns=F.columns?w(F.columns,j,M+1):[],j})};return w(b)},Se(n,"debugColumns")),getAllFlatColumns:xe(()=>[u.getAllColumns()],b=>b.flatMap(w=>w.getFlatColumns()),Se(n,"debugColumns")),_getAllFlatColumnsById:xe(()=>[u.getAllFlatColumns()],b=>b.reduce((w,C)=>(w[C.id]=C,w),{}),Se(n,"debugColumns")),getAllLeafColumns:xe(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(b,w)=>{let C=b.flatMap(N=>N.getLeafColumns());return w(C)},Se(n,"debugColumns")),getColumn:b=>u._getAllFlatColumnsById()[b]};Object.assign(u,v);for(let b=0;b<u._features.length;b++){const w=u._features[b];w==null||w.createTable==null||w.createTable(u)}return u}function ix(){return n=>xe(()=>[n.options.data],s=>{const i={rows:[],flatRows:[],rowsById:{}},r=function(u,d,h){d===void 0&&(d=0);const m=[];for(let y=0;y<u.length;y++){const x=yE(n,n._getRowId(u[y],y,h),u[y],y,d,void 0,h==null?void 0:h.id);if(i.flatRows.push(x),i.rowsById[x.id]=x,m.push(x),n.options.getSubRows){var p;x.originalSubRows=n.options.getSubRows(u[y],y),(p=x.originalSubRows)!=null&&p.length&&(x.subRows=r(x.originalSubRows,d+1,x))}}return m};return i.rows=r(s),i},Se(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function rx(){return n=>xe(()=>[n.getState().expanded,n.getPreExpandedRowModel(),n.options.paginateExpandedRows],(s,i,r)=>!i.rows.length||s!==!0&&!Object.keys(s??{}).length||!r?i:WE(i),Se(n.options,"debugTable"))}function WE(n){const s=[],i=r=>{var u;s.push(r),(u=r.subRows)!=null&&u.length&&r.getIsExpanded()&&r.subRows.forEach(i)};return n.rows.forEach(i),{rows:s,flatRows:n.flatRows,rowsById:n.rowsById}}function eN(){return n=>xe(()=>[n.getState().sorting,n.getPreSortedRowModel()],(s,i)=>{if(!i.rows.length||!(s!=null&&s.length))return i;const r=n.getState().sorting,u=[],d=r.filter(p=>{var y;return(y=n.getColumn(p.id))==null?void 0:y.getCanSort()}),h={};d.forEach(p=>{const y=n.getColumn(p.id);y&&(h[p.id]={sortUndefined:y.columnDef.sortUndefined,invertSorting:y.columnDef.invertSorting,sortingFn:y.getSortingFn()})});const m=p=>{const y=p.map(x=>({...x}));return y.sort((x,v)=>{for(let w=0;w<d.length;w+=1){var b;const C=d[w],N=h[C.id],M=N.sortUndefined,R=(b=C==null?void 0:C.desc)!=null?b:!1;let j=0;if(M){const F=x.getValue(C.id),T=v.getValue(C.id),H=F===void 0,D=T===void 0;if(H||D){if(M==="first")return H?-1:1;if(M==="last")return H?1:-1;j=H&&D?0:H?M:-M}}if(j===0&&(j=N.sortingFn(x,v,C.id)),j!==0)return R&&(j*=-1),N.invertSorting&&(j*=-1),j}return x.index-v.index}),y.forEach(x=>{var v;u.push(x),(v=x.subRows)!=null&&v.length&&(x.subRows=m(x.subRows))}),y};return{rows:m(i.rows),flatRows:u,rowsById:i.rowsById}},Se(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
266
280
  * react-table
267
281
  *
268
282
  * Copyright (c) TanStack
@@ -271,4 +285,4 @@ Error generating stack: `+a.message+`
271
285
  * LICENSE.md file in the root directory of this source tree.
272
286
  *
273
287
  * @license MIT
274
- */function nr(l,i){return l?Qw(l)?j.createElement(l,i):l:null}function Qw(l){return Yw(l)||typeof l=="function"||Xw(l)}function Yw(l){return typeof l=="function"&&(()=>{const i=Object.getPrototypeOf(l);return i.prototype&&i.prototype.isReactComponent})()}function Xw(l){return typeof l=="object"&&typeof l.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(l.$$typeof.description)}function J0(l){const i={state:{},onStateChange:()=>{},renderFallbackValue:null,...l},[s]=j.useState(()=>({current:Fw(i)})),[u,c]=j.useState(()=>s.current.initialState);return s.current.setOptions(f=>({...f,...l,state:{...u,...l.state},onStateChange:g=>{c(g),l.onStateChange==null||l.onStateChange(g)}})),s.current}function fd({text:l,query:i}){const s=i.trim();if(!s||YC(s))return d.jsx(d.Fragment,{children:l});const u=[],c=l.toLowerCase(),f=s.toLowerCase();let g=0;for(let m=c.indexOf(f);m!==-1;m=c.indexOf(f,g))m>g&&u.push(l.slice(g,m)),u.push(d.jsx("mark",{children:l.slice(m,m+s.length)},m)),g=m+s.length;return u.push(l.slice(g)),d.jsx(d.Fragment,{children:u})}function Sy({value:l,max:i,clonal:s}){return l===null?d.jsx("span",{style:{color:"var(--chev)"},children:"–"}):d.jsxs("span",{className:"vbar",children:[d.jsx("span",{className:"vbar-n",children:Ad(l)}),d.jsxs("span",{className:"vbar-track","aria-hidden":!0,children:[d.jsx("span",{className:"vbar-fill",style:{width:`${Math.min(l/i,1)*100}%`}}),s&&d.jsx("span",{className:"vbar-tick",style:{left:`${1/i*100}%`}})]})]})}function Zw({variant:l,showDriver:i}){return d.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[i&&l.is_driver&&d.jsx("span",{className:"sc-pill p-neu",children:"Driver"}),l.hotspot&&d.jsx("span",{className:"sc-pill p-hot",children:"Hotspot"}),l.in_dmp&&d.jsx("span",{className:"sc-pill p-dmp",children:"In DMP"}),l.ffpe_removed&&d.jsx("span",{className:"sc-pill p-ffpe",title:"Left out of the report's counts by its FFPE artifact filter",children:"FFPE filtered"})]})}function Kw(l){return`${l.ref}>${l.alt}`}function Iw({variant:l,onLocate:i}){const[s,u]=j.useState(!1),c=`chr${l.chrom}:${l.pos}`,f=[["Variant",`${l.kind==="snv"?"SNV":l.kind==="indel"?"Indel":l.kind}, ${Kw(l)}`],...l.depth!==null?[["Reads",`${l.alt_reads??"?"} of ${l.depth}`]]:[],["Normal VAF",Ad(l.normal_vaf)],["Mutant copies",IC(l.mut_alleles)??"–"],["Consequence",(l.consequence??l.effect??"–").replace(/&/g,", ")],["COSMIC",KC(l.cosmic)??"–"],...l.ffpe_score!==null||l.ffpe_removed?[["FFPE artifact score",l.ffpe_score!==null?Ad(l.ffpe_score):"Not scored"]]:[],["Expression",l.gene_tpm!==null?`${l.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",JC(l)??"–"]];return d.jsxs("div",{className:"vt-detail-body",children:[d.jsx("dl",{className:"vt-facts",children:f.map(([g,m])=>d.jsxs("div",{children:[d.jsx("dt",{children:g}),d.jsx("dd",{children:m})]},g))}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i(l),children:[d.jsx(jd,{size:14,"aria-hidden":!0}),"Show on copy number"]}),d.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(c),u(!0),window.setTimeout(()=>u(!1),1500)}catch{window.prompt("Copy this locus",c)}},children:[d.jsx(r0,{size:14,"aria-hidden":!0}),s?"Copied":"Copy locus"]})]})]})}function Jw({data:l,pageSize:i,onPage:s,onPageSize:u}){const c=Math.max(1,Math.ceil(l.total/l.page_size)),f=(l.page-1)*l.page_size+1,g=Math.min(l.page*l.page_size,l.total),m=v=>v.toLocaleString("en-US");return d.jsxs("div",{className:"pager",children:[d.jsx("span",{children:l.total===0?"No mutations":`${m(f)}–${m(g)} of ${m(l.total)}`}),d.jsxs("span",{className:"flex items-center gap-4",children:[d.jsxs("label",{className:"flex items-center gap-2",children:["Rows",d.jsx("select",{value:i,onChange:v=>u(Number(v.target.value)),children:eh.map(v=>d.jsx("option",{value:v,children:v},v))})]}),d.jsxs("span",{children:["Page ",m(l.page)," of ",m(c)]}),d.jsxs("span",{className:"flex gap-1",children:[d.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Previous page",disabled:l.page<=1,onClick:()=>s(l.page-1),children:d.jsx(o0,{size:15,"aria-hidden":!0})}),d.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Next page",disabled:l.page>=c,onClick:()=>s(l.page+1),children:d.jsx(mu,{size:15,"aria-hidden":!0})})]})]})]})}function Pw({sort:l,current:i,onSort:s}){const u=i.replace(/^-/,"")===l.key,c=i.startsWith("-"),f=u?c?l.key:`-${l.key}`:l.descFirst?`-${l.key}`:l.key;return d.jsxs("button",{type:"button",className:"vt-sort","data-active":u,onClick:()=>s(f),title:`Sort by ${l.label.toLowerCase()}`,children:[l.label,u&&c?d.jsx(Wo,{size:12,"aria-hidden":!0}):u?d.jsx(u0,{size:12,"aria-hidden":!0}):d.jsx(Wo,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function Ww({data:l,table:i,fetching:s,showCcf:u,onTable:c,onHover:f,onLocate:g}){const[m,v]=j.useState({}),S=i.q,y=i.scope!=="drivers",x=j.useMemo(()=>[{id:"expand",header:()=>d.jsx("span",{className:"sr-only",children:"Details"}),meta:{className:"pin vt-x"},cell:({row:b})=>d.jsx("button",{type:"button",className:"vt-expand","aria-expanded":b.getIsExpanded(),"aria-label":`Details of ${b.original.gene??"this mutation"} ${b.original.protein_change??""}`.trim(),onClick:E=>{E.stopPropagation(),b.toggleExpanded()},onFocus:()=>f(b.original),children:d.jsx(mu,{size:14,"aria-hidden":!0})})},{id:"gene",header:"Gene",meta:{className:"pin vt-g",sorts:[{key:"gene",label:"Gene"},{key:"position",label:"Position"}]},cell:({row:{original:b}})=>d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"vt-gene",children:d.jsx(fd,{text:b.gene??"–",query:S})}),d.jsx("span",{className:"vt-sub mono",children:su(b.chrom,b.pos)})]})},{id:"change",header:"Change",cell:({row:{original:b}})=>d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mono block text-[12.5px] font-medium",children:d.jsx(fd,{text:b.protein_change??"–",query:S})}),b.cdna_change&&d.jsx("span",{className:"vt-sub mono",children:d.jsx(fd,{text:b.cdna_change,query:S})})]})},{id:"effect",header:"Effect",meta:{sorts:[{key:"effect",label:"Effect"}]},cell:({row:{original:b}})=>d.jsx("span",{className:b.effect_class==="truncating"?"font-semibold":void 0,children:RC(b.consequence,b.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:b}})=>d.jsx(Sy,{value:b.vaf,max:1})},...u?[{id:"ccf",header:"CCF",meta:{className:"n",sorts:[{key:"ccf",label:"CCF",descFirst:!0}]},cell:({row:{original:b}})=>d.jsx(Sy,{value:b.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:b}})=>d.jsx(Zw,{variant:b,showDriver:y})}],[S,y,u,f]),C=J0({data:l.rows,columns:x,getRowId:kC,getCoreRowModel:Z0(),getExpandedRowModel:K0(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:m},onExpandedChange:v}),R=i.sort.replace(/^-/,""),_=C.getVisibleLeafColumns().length,O=b0(i)>0;return d.jsxs("div",{className:"flex min-w-0 flex-col",children:[d.jsxs("div",{className:"vt-scroll",onMouseLeave:()=>f(null),"aria-busy":s,children:[s&&d.jsx("div",{className:"vt-progress","aria-hidden":!0}),d.jsxs("table",{className:"vt",children:[d.jsx("thead",{children:C.getHeaderGroups().map(b=>d.jsx("tr",{children:b.headers.map(E=>{var $;const U=E.column.columnDef.meta,B=($=U==null?void 0:U.sorts)==null?void 0:$.some(F=>F.key===R);return d.jsx("th",{className:U==null?void 0:U.className,"aria-sort":B?i.sort.startsWith("-")?"descending":"ascending":void 0,children:U!=null&&U.sorts?d.jsx("span",{className:"vt-sorts",children:U.sorts.map(F=>d.jsx(Pw,{sort:F,current:i.sort,onSort:P=>c({sort:P})},F.key))}):nr(E.column.columnDef.header,E.getContext())},E.id)})},b.id))}),d.jsxs("tbody",{children:[C.getRowModel().rows.map(b=>d.jsxs(j.Fragment,{children:[d.jsx("tr",{className:"vt-row","data-expanded":b.getIsExpanded(),onClick:()=>b.toggleExpanded(),onMouseEnter:()=>f(b.original),children:b.getVisibleCells().map(E=>{var U;return d.jsx("td",{className:(U=E.column.columnDef.meta)==null?void 0:U.className,children:nr(E.column.columnDef.cell,E.getContext())},E.id)})}),b.getIsExpanded()&&d.jsx("tr",{className:"vt-detail",children:d.jsx("td",{colSpan:_,children:d.jsx(Iw,{variant:b.original,onLocate:g})})})]},b.id)),l.rows.length===0&&d.jsx("tr",{children:d.jsx("td",{colSpan:_,children:d.jsx("div",{className:"vt-empty",children:O?d.jsxs(d.Fragment,{children:["No mutations match these filters.",d.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>c({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]}):`No ${i.scope==="all"?"":`${i.scope} `}mutations in this sample.`})})})]})]})]}),d.jsx(Jw,{data:l,pageSize:i.pageSize,onPage:b=>c({page:b}),onPageSize:b=>c({pageSize:b})})]})}const eR=j.forwardRef(function({variants:i,variantsLoading:s,variantsFetching:u,density:c,densityLoading:f,picked:g,measure:m,onMeasure:v,table:S,onTable:y,hovered:x,onHover:C,onLocate:R,showCcf:_},O){var P,X;const b=(i==null?void 0:i.status)==="ok"?i.data??void 0:void 0,E=b==null?void 0:b.counts,U=(c==null?void 0:c.status)==="ok"?(P=c.data)==null?void 0:P.total:void 0,B=(c==null?void 0:c.status)==="ok"?(X=c.data)==null?void 0:X.ffpe:null,$=Z=>Z===void 0?"":Z.toLocaleString("en-US"),F=S.range&&S.range.measure===m?[S.range.low,S.range.high]:null;return d.jsxs(th,{ref:O,title:"Mutations",subtitle:U!==void 0?`${$(U)} PASS SNVs and indels${B&&!B.shown?", after the FFPE filter":""}`:void 0,lineage:M0(c==null?void 0:c.lineage,i==null?void 0:i.lineage),picked:g,className:"mut",info:"mutations",controls:d.jsxs(d.Fragment,{children:[d.jsx(nw,{value:S.q,onChange:Z=>y({q:Z})}),d.jsx(hr,{label:"Which mutations",value:S.scope,onChange:Z=>y({scope:Z,sort:x0[Z]}),options:[{value:"drivers",label:d.jsxs(d.Fragment,{children:["Drivers",d.jsx("span",{className:"seg-n",children:$(E==null?void 0:E.drivers)})]})},{value:"coding",label:d.jsxs(d.Fragment,{children:["Coding",d.jsx("span",{className:"seg-n",children:$(E==null?void 0:E.coding)})]})},{value:"all",label:d.jsxs(d.Fragment,{children:["All",d.jsx("span",{className:"seg-n",children:$(E==null?void 0:E.all)})]})}]})]}),children:[d.jsx(PE,{envelope:c,loading:f,measure:m,onMeasure:v,range:F,focus:x,onRange:Z=>{!Z&&!S.range||y({range:Z?{measure:m,low:Z[0],high:Z[1]}:null})},onGene:Z=>y({q:Z})}),b&&i&&i.warnings.length>0&&d.jsx("div",{className:"px-5 py-2 text-xs",role:"note",style:{color:"var(--warn-ink)"},children:i.warnings.join(" ")}),b?d.jsxs("div",{className:"mut-body",children:[d.jsx(tw,{table:S,data:b,onChange:y}),d.jsx(Ww,{data:b,table:S,fetching:u,showCcf:_,onTable:y,onHover:C,onLocate:R})]}):d.jsx("div",{className:"mut-rule",children:d.jsx(dr,{label:"mutations",envelope:i,loading:s,skeletonHeight:240,children:()=>null})})]})}),P0={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},W0=["oncogene","tsg","both"],e1={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},tR={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function nR(l){return l?tR[l]??l:""}const lR={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function t1(l){return l?lR[l]??l:"–"}function aR(l){return l==null?"–":l>=1e6?`${(l/1e6).toLocaleString("en-US",{maximumFractionDigits:1})} Mb`:l>=1e3?`${(l/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} kb`:`${l.toLocaleString("en-US")} bp`}function iR(l){return l.some(i=>i.left_expression||i.right_expression||i.expression)}function sR(l){const i={oncogene:0,tsg:0,both:0};for(const s of l)s.role&&(i[s.role]+=1);return i}function n1(l,i){return{deletion:l.svDel,"tandem-duplication":l.svDup,inversion:l.svInv,translocation:l.svTra}[i]}function uR(l,i){const s=n1(l,i.sv_class);return i.clustered?Bl(s,.42):s}const oR={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function rR(l){return l.size?oR[l.size]??l.size:""}const cR={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."};function fR(l){const i=l.map(()=>"");let s=0;for(let u=1;u<=l.length;u++)u<l.length&&l[u].sv_class===l[s].sv_class&&l[u].clustered===l[s].clustered||(i[s+Math.floor((u-1-s)/2)]=cR[l[s].sv_class],s=u);return i}function dR(l){const i=`${l.clustered?"Clustered":"Dispersed"} ${e1[l.sv_class].toLowerCase()}s`;return l.size?`${i}, ${nR(l.size)}`:i}function hR(l,i){const s=l.map(S=>S.category),u=fR(l),c=l.findIndex(S=>!S.clustered),f=Math.max(0,...l.map(S=>S.count)),g=Math.max(2,Math.ceil(f*1.3)),m=[c!==0?[{name:"Clustered",xAxis:s[0],itemStyle:{color:Bl(i.ink,.035)}},{xAxis:s[(c>0?c:s.length)-1]}]:null,c>=0?[{name:"Dispersed",xAxis:s[c],itemStyle:{color:"transparent"}},{xAxis:s[s.length-1]}]:null].filter(Boolean),v={type:"category",data:s,position:"bottom",axisTick:{show:!1}};return{animation:!i.reducedMotion,animationDuration:500,textStyle:{fontFamily:i.font},grid:{left:34,right:10,top:14,bottom:44,containLabel:!1},tooltip:{...nh(i),trigger:"item",formatter:S=>{const y=l[S.dataIndex],x=y.count;return`${dR(y)}<br/><b>${x.toLocaleString("en-US")}</b> ${x===1?"rearrangement":"rearrangements"}`}},xAxis:[{...v,axisLine:{lineStyle:{color:i.axis}},axisLabel:{color:i.muted,fontSize:10,fontFamily:i.mono,interval:0,hideOverlap:!0,formatter:(S,y)=>rR(l[y])}},{...v,offset:16,axisLine:{show:!1},axisLabel:{color:i.ink2,fontSize:11,interval:0,hideOverlap:!0,formatter:(S,y)=>u[y]}}],yAxis:{type:"value",max:g,minInterval:1,axisLabel:{color:i.muted,fontSize:11},splitLine:{lineStyle:{color:i.grid}}},series:[{id:"categories",type:"bar",xAxisIndex:0,barCategoryGap:"28%",data:l.map(S=>({value:S.count,itemStyle:{color:uR(i,S),borderRadius:[3,3,0,0]},label:{show:S.count>0,position:"top",color:i.ink2,fontSize:10.5,fontFamily:i.mono}})),emphasis:{focus:"none"},markArea:{silent:!0,label:{show:!0,position:"insideTopLeft",color:i.muted,fontSize:11.5,offset:[2,2]},data:m}}]}}function gR({role:l}){return l?d.jsx("span",{className:`sc-pill p-${l==="oncogene"?"onco":l}`,children:P0[l]}):d.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function mR({rows:l,shown:i,onToggle:s}){const u=sR(l);return d.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:W0.filter(c=>u[c]>0).map(c=>d.jsxs("button",{type:"button",className:`sv-legend-item p-${c==="oncogene"?"onco":c}`,"aria-pressed":i.includes(c),onClick:()=>s(c),children:[P0[c],d.jsx("span",{className:"sv-legend-n",children:u[c]})]},c))})}function xy({gene:l,chrom:i,pos:s,loc:u}){return d.jsxs(d.Fragment,{children:[d.jsxs("span",{className:"sv-end",children:[d.jsx("span",{className:"vt-gene",children:l||"–"}),u&&d.jsx("span",{className:"sv-loc",children:u})]}),d.jsx("span",{className:"vt-sub mono",children:i&&s!==null?su(i,s):"–"})]})}function l1(l){return l?l.replace(/,\s*/g,", "):"–"}function pR({label:l,sorted:i,onClick:s}){return d.jsxs("button",{type:"button",className:"vt-sort","data-active":!!i,onClick:s,title:`Sort by ${l.toLowerCase()}`,children:[l,i==="desc"?d.jsx(Wo,{size:12,"aria-hidden":!0}):i==="asc"?d.jsx(u0,{size:12,"aria-hidden":!0}):d.jsx(Wo,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function vR({row:l,onLocate:i}){const[s,u]=j.useState(!1),c=l.left_chrom&&l.left_pos!==null?{chrom:l.left_chrom,pos:l.left_pos}:null,f=l.right_chrom&&l.right_pos!==null?{chrom:l.right_chrom,pos:l.right_pos}:null,g=[["Type",t1(l.sv_type)],["Left breakpoint",c?`${su(c.chrom,c.pos)}${l.left_loc?`, ${l.left_loc}`:""}`:"–"],["Right breakpoint",f?`${su(f.chrom,f.pos)}${l.right_loc?`, ${l.right_loc}`:""}`:"–"],["Pileups (left, right)",[l.left_pileup,l.right_pileup].filter(Boolean).join(", ")||"–"],["Orientation",l.orientation??"–"],["Callers",l1(l.callers)]],m=l.gene??l.left_gene,v=l.gene??l.right_gene;return d.jsxs("div",{className:"vt-detail-body",children:[d.jsx("dl",{className:"vt-facts",children:g.map(([S,y])=>d.jsxs("div",{children:[d.jsx("dt",{children:S}),d.jsx("dd",{children:y})]},S))}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c&&d.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i({...c,gene:m}),children:[d.jsx(jd,{size:14,"aria-hidden":!0}),"Show ",f&&f.chrom===c.chrom?"it":"left breakpoint"," on copy number"]}),f&&f.chrom!==(c==null?void 0:c.chrom)&&d.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i({...f,gene:v}),children:[d.jsx(jd,{size:14,"aria-hidden":!0}),"Show right breakpoint on copy number"]}),l.igv_locus&&d.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(l.igv_locus??""),u(!0),window.setTimeout(()=>u(!1),1500)}catch{window.prompt("Copy these IGV loci",l.igv_locus??"")}},children:[d.jsx(r0,{size:14,"aria-hidden":!0}),s?"Copied":"Copy IGV loci"]})]})]})}function by({kind:l,rows:i,onLocate:s}){const[u,c]=j.useState({}),[f,g]=j.useState([]),[m,v]=j.useState({pageIndex:0,pageSize:25}),S=iR(i),y=j.useMemo(()=>{const R={id:"expand",header:()=>d.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:b})=>d.jsx("button",{type:"button",className:"vt-expand","aria-expanded":b.getIsExpanded(),"aria-label":`Details of ${b.original.gene??[b.original.left_gene,b.original.right_gene].filter(Boolean).join(" and ")}`,onClick:E=>{E.stopPropagation(),b.toggleExpanded()},children:d.jsx(mu,{size:14,"aria-hidden":!0})})},_=[{id:"type",header:"Type",accessorFn:b=>b.sv_type??"",cell:({row:{original:b}})=>t1(b.sv_type)},{id:"role",header:"Role",accessorFn:b=>b.role?W0.indexOf(b.role):9,cell:({row:{original:b}})=>d.jsx(gR,{role:b.role})},{id:"callers",header:"Callers",accessorFn:b=>b.callers??"",cell:({row:{original:b}})=>d.jsx("span",{className:"text-[12.5px]",children:l1(b.callers)})},{id:"support",header:"Support",accessorFn:b=>b.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:b}})=>d.jsx("span",{className:"mono",children:b.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:b}})=>d.jsx("span",{className:"mono text-[12px]",children:[b.left_pileup,b.right_pileup].filter(Boolean).join(" · ")||"–"})}],O=S?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:b}})=>l==="whole_gene"?d.jsx("span",{className:"text-[12.5px]",children:b.expression??"–"}):d.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[d.jsx("span",{children:b.left_expression??"–"}),d.jsx("span",{style:{color:"var(--muted)"},children:b.right_expression??"–"})]})}]:[];return l==="whole_gene"?[R,{id:"gene",header:"Gene",accessorFn:b=>b.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:b}})=>d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"vt-gene",children:b.gene??"–"}),d.jsx("span",{className:"vt-sub mono",children:b.left_chrom&&b.left_pos!==null&&b.right_pos!==null?`${su(b.left_chrom,b.left_pos)}–${b.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:b=>b.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:b}})=>d.jsx("span",{className:"mono",children:aR(b.length)})},..._,...O]:[R,{id:"left",header:"Left",accessorFn:b=>b.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:b}})=>d.jsx(xy,{gene:b.left_gene,chrom:b.left_chrom,pos:b.left_pos,loc:b.left_loc})},{id:"right",header:"Right",accessorFn:b=>b.right_gene??"",cell:({row:{original:b}})=>d.jsx(xy,{gene:b.right_gene,chrom:b.right_chrom,pos:b.right_pos,loc:b.right_loc})},..._,...O]},[l,S]),x=J0({data:i,columns:y,getRowId:R=>`${l}-${R.row}`,getCoreRowModel:Z0(),getSortedRowModel:kw(),getExpandedRowModel:K0(),getPaginationRowModel:$w(),getRowCanExpand:()=>!0,paginateExpandedRows:!1,state:{expanded:u,sorting:f,pagination:m},onExpandedChange:c,onSortingChange:g,onPaginationChange:v}),C=x.getVisibleLeafColumns().length;return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"vt-scroll",children:d.jsxs("table",{className:"vt",children:[d.jsx("thead",{children:x.getHeaderGroups().map(R=>d.jsx("tr",{children:R.headers.map(_=>{const O=_.column.columnDef.meta,b=_.column.getIsSorted();return d.jsx("th",{className:O==null?void 0:O.className,"aria-sort":b?b==="desc"?"descending":"ascending":void 0,children:_.column.getCanSort()?d.jsx(pR,{label:String(_.column.columnDef.header),sorted:b,onClick:_.column.getToggleSortingHandler()}):nr(_.column.columnDef.header,_.getContext())},_.id)})},R.id))}),d.jsx("tbody",{children:x.getRowModel().rows.map(R=>d.jsxs(j.Fragment,{children:[d.jsx("tr",{className:"vt-row","data-expanded":R.getIsExpanded(),onClick:()=>R.toggleExpanded(),children:R.getVisibleCells().map(_=>{var O;return d.jsx("td",{className:(O=_.column.columnDef.meta)==null?void 0:O.className,children:nr(_.column.columnDef.cell,_.getContext())},_.id)})}),R.getIsExpanded()&&d.jsx("tr",{className:"vt-detail",children:d.jsx("td",{colSpan:C,children:d.jsx(vR,{row:R.original,onLocate:s})})})]},R.id))})]})}),i.length>eh[0]&&d.jsx(yR,{total:i.length,page:m.pageIndex,pageSize:m.pageSize,onPage:R=>v(_=>({..._,pageIndex:R})),onPageSize:R=>v({pageIndex:0,pageSize:R})})]})}function yR({total:l,page:i,pageSize:s,onPage:u,onPageSize:c}){const f=Math.max(1,Math.ceil(l/s)),g=i*s+1,m=Math.min((i+1)*s,l),v=S=>S.toLocaleString("en-US");return d.jsxs("div",{className:"pager",children:[d.jsx("span",{children:`${v(g)}–${v(m)} of ${v(l)}`}),d.jsxs("span",{className:"flex items-center gap-4",children:[d.jsxs("label",{className:"flex items-center gap-2",children:["Rows",d.jsx("select",{value:s,onChange:S=>c(Number(S.target.value)),children:eh.map(S=>d.jsx("option",{value:S,children:S},S))})]}),d.jsxs("span",{children:["Page ",v(i+1)," of ",v(f)]}),d.jsxs("span",{className:"flex gap-1",children:[d.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Previous page",disabled:i<=0,onClick:()=>u(i-1),children:d.jsx(o0,{size:15,"aria-hidden":!0})}),d.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Next page",disabled:i>=f-1,onClick:()=>u(i+1),children:d.jsx(mu,{size:15,"aria-hidden":!0})})]})]})]})}function lr(l,i,s){return`${l.toLocaleString("en-US")} ${l===1?i:s}`}function SR({categories:l,total:i}){const[s,u]=ah(),c=j.useMemo(()=>u?hR(l,u):null,[l,u]),f=[...new Set(l.map(g=>g.sv_class))];return d.jsxs("div",{ref:s,className:"sv-sigs",children:[d.jsxs("div",{className:"sv-sigs-head",children:[d.jsxs("h3",{className:"sv-h",children:["Rearrangement signatures",d.jsx("span",{className:"sv-h-n",children:lr(i,"rearrangement","rearrangements")})]}),d.jsxs("ul",{className:"sv-sigs-key","aria-label":"Classes",children:[f.map(g=>d.jsxs("li",{children:[d.jsx("span",{className:"sv-swatch",style:{background:u?n1(u,g):void 0},"aria-hidden":!0}),e1[g]]},g)),d.jsx("li",{className:"sv-sigs-note",children:"Lighter bars: clustered"})]})]}),c&&d.jsx(lh,{option:c,height:250,ariaLabel:`Rearrangement signatures: ${l.filter(g=>g.count>0).map(g=>`${g.category} ${g.count}`).join(", ")}`})]})}function xR({data:l,onLocate:i}){const[s,u]=j.useState([]),c=S=>u(y=>y.includes(S)?y.filter(x=>x!==S):[...y,S]),f=S=>s.length?S.filter(y=>y.role&&s.includes(y.role)):S,g=[...l.onco,...l.whole_gene],m=f(l.onco),v=f(l.whole_gene);return g.length===0?d.jsx("p",{className:"sv-empty",children:"No rearrangements with breakpoints in oncogenes or tumour suppressors."}):d.jsxs(d.Fragment,{children:[d.jsx(mR,{rows:g,shown:s,onToggle:c}),l.onco.length>0&&d.jsxs("section",{className:"sv-table","aria-label":"Rearranged oncogenes and tumour suppressors",children:[d.jsxs("h3",{className:"sv-h",children:["Rearranged oncogenes and tumour suppressors",d.jsx("span",{className:"sv-h-n",children:lr(m.length,"row","rows")})]}),d.jsx(by,{kind:"onco",rows:m,onLocate:i})]}),l.whole_gene.length>0&&d.jsxs("section",{className:"sv-table","aria-label":"Whole-gene rearrangements",children:[d.jsxs("h3",{className:"sv-h",children:["Whole-gene rearrangements",d.jsx("span",{className:"sv-h-n",children:lr(v.length,"row","rows")})]}),d.jsx(by,{kind:"whole_gene",rows:v,onLocate:i})]})]})}const bR=j.forwardRef(function({envelope:i,loading:s,picked:u,onLocate:c},f){const g=(i==null?void 0:i.status)==="ok"?i.data:null;return d.jsx(th,{ref:f,title:"Structural variants",subtitle:g?lr(g.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(i==null?void 0:i.lineage)??[],picked:u,info:"structuralVariants",children:d.jsx(dr,{label:"structural variants",envelope:i,loading:s,skeletonHeight:220,children:m=>d.jsxs("div",{className:"sv-body",children:[d.jsx(xR,{data:m,onLocate:c}),m.signatures&&d.jsx(SR,{categories:m.signatures.categories,total:m.signatures.total})]})})})});function CR(l){var u;const i=l.samples.filter(c=>c.category==="TUMOR");return(u=i.find(c=>Object.values(c.datasets??{}).some(f=>Object.values(f).includes("ok")))??i[0]??l.samples[0])==null?void 0:u.id}const ER=[];function wR(l){const i=j.useRef(!1);return j.useEffect(()=>{let s=0;const u=()=>{i.current=!0,window.clearTimeout(s),s=window.setTimeout(()=>i.current=!1,150)};return window.addEventListener("scroll",u,{passive:!0}),()=>{window.removeEventListener("scroll",u),window.clearTimeout(s)}},[]),j.useCallback(s=>{(s===null||!i.current)&&l(s)},[l])}function RR(l){var s,u;const i=(u=(s=l==null?void 0:l.samples.find(c=>{var f;return(f=c.disease)==null?void 0:f.name}))==null?void 0:s.disease)==null?void 0:u.name;return i?i.charAt(0)+i.slice(1).toLowerCase():void 0}function Io(l,i){const s=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;l==null||l.scrollIntoView({behavior:s?"auto":"smooth",block:i})}function _R(){var yn,la,aa,Yn,Fa,ia,$a,es,Sn,ka,Qa,pu,ts,Ya;const{individual:l=""}=C2(),[i,s]=J2(),u=i.get("version")??void 0,[c,f]=j.useState(null),[g,m]=j.useState(null),[v,S]=j.useState(cy),[y,x]=j.useState(null),C=wR(x),[R,_]=j.useState(null),O=j.useRef(null),[b,E]=j.useState(null),[U,B]=j.useState(!0),$=j.useRef(null),F=Dy();j.useEffect(OE,[]),j.useEffect(()=>{const I=b;if(!I||typeof IntersectionObserver>"u")return;const ut=new IntersectionObserver(([Mn])=>B(Mn.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return ut.observe(I),()=>ut.disconnect()},[b]),j.useEffect(()=>uE(l),[l]);const P=j.useCallback(I=>S(ut=>({...ut,page:1,...I})),[]),X=j.useCallback(I=>{P({q:XC(I.chrom,I.start,I.end),scope:"all",sort:"position"}),Io($.current,"start")},[P]),Z=j.useCallback(I=>{P({q:I}),Io($.current,"start")},[P]),de=j.useCallback(I=>{_({chrom:I.chrom,pos:I.pos,gene:I.gene,nonce:Date.now()}),Io(O.current,"center")},[]),ve=j.useCallback(I=>{_({...I,nonce:Date.now()}),Io(O.current,"center")},[]),Le=PC(l,u),ge=Le.data,ie=(ge==null?void 0:ge.status)==="ok"?ge.data??void 0:void 0,qe=i.get("sample")??(ie?CR(ie):void 0),Qe=ie==null?void 0:ie.samples.find(I=>I.id===qe),Y=(Qe==null?void 0:Qe.category)==="TUMOR"?qe:void 0,se=g??((ie==null?void 0:ie.mode)==="unmatched"?"vaf":"ccf"),ae=WC(l,ie?qe:void 0,u),Ne=eE(l,u),Ee=tE(l,Y,u),mt=nE(l,Y,se,v.ffpe,u),pt=aE(l,Y,v,u),Yt=lE(l,Y,u),T=(la=(yn=Ne.data)==null?void 0:yn.data)==null?void 0:la.samples.find(I=>I.sample===qe),k=j.useMemo(()=>(T==null?void 0:T.drivers)??ER,[T]),ne=j.useMemo(()=>y?{chrom:y.chrom,pos:y.pos,gene:y.gene}:R,[y,R]),te=j.useRef(null),[ye,xe]=j.useState(null),Me=[ae,Ee,mt,pt,Yt,Ne].some(I=>I.isFetching);j.useEffect(()=>{if(!ye||ye.sample!==qe||Me)return;const I=te.current,ut=I==null?void 0:I.querySelector("main"),Mn=I==null?void 0:I.querySelector(".topbar");if(!I||!ut||!Mn||!b)return xe(null);const mr=I.getBoundingClientRect().top+window.scrollY,jt=Math.max(mr+Mn.offsetHeight+ut.offsetHeight,window.innerHeight),pr=b.getBoundingClientRect().bottom+window.scrollY-Mn.offsetHeight+2,vu=Math.max(0,Math.min(pr,jt-window.innerHeight)),ns=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:vu,behavior:ns?"auto":"smooth"});const Xa=window.setTimeout(()=>xe(null),ns?0:520);return()=>window.clearTimeout(Xa)},[ye,qe,Me,b]),j.useEffect(()=>{if(!ye)return;const I=window.setTimeout(()=>xe(null),4e3);return()=>window.clearTimeout(I)},[ye]);const ee=I=>{var ut;I!==qe&&(xe({sample:I,height:document.documentElement.scrollHeight-(((ut=te.current)==null?void 0:ut.getBoundingClientRect().top)??0)-window.scrollY}),oe("sample",I))},oe=(I,ut)=>{const Mn=new URLSearchParams(i);Mn.set(I,ut),s(Mn,{replace:!1}),f(null),S(cy()),x(null),_(null)},an=[Le,ae,Ne,Ee,mt,pt,Yt].map(I=>I.error);if(an.some(I=>I instanceof cr))return d.jsx("div",{className:`wgts ${Qn.theme}`,children:d.jsx("main",{className:"page",children:d.jsx(_E,{onSignedIn:()=>F.invalidateQueries()})})});const na=an.find(I=>I instanceof v0),sn=Qe&&ie?Wd(Qe.id,ie.individual.id):"",Mt=ie&&qe&&ie.analyses[qe]||[],tt=(ie==null?void 0:ie.failures.filter(I=>I.sample===qe))??[],Fe=new Set(Mt.map(Rt)),Vt=new Set,un=I=>I==null?void 0:I.forEach(ut=>Fe.has(Rt(ut))&&Vt.add(Rt(ut)));for(const I of((Yn=(aa=ae.data)==null?void 0:aa.data)==null?void 0:Yn.metrics)??[])Ud.includes(I.key)&&un(I.sources);un((Fa=Ne.data)==null?void 0:Fa.lineage),un((ia=Ee.data)==null?void 0:ia.lineage),un(($a=mt.data)==null?void 0:$a.lineage),un((es=pt.data)==null?void 0:es.lineage),un((Sn=Yt.data)==null?void 0:Sn.lineage);for(const I of Mt)I.state==="failed"&&tt.length>0&&Vt.add(Rt(I));return d.jsxs("div",{className:`wgts ${Qn.theme}`,children:[d.jsx(fE,{individualId:l,sampleCount:(ie==null?void 0:ie.samples.length)??0,mode:ie==null?void 0:ie.mode,fingerprint:T,analyses:Mt,onPage:Vt,sampleLabel:sn,picked:c,onPick:f}),d.jsxs("div",{ref:te,className:"page",style:ye?{minHeight:ye.height}:void 0,children:[d.jsx(p0,{individualId:l,subtitle:[RR(ie),(ka=ie==null?void 0:ie.individual.sex)==null?void 0:ka.toLowerCase()].filter(Boolean).join(", ")||void 0,patientIcon:ie?d.jsx(OC,{sex:ie.individual.sex}):void 0,compact:ie&&qe?d.jsx(VC,{data:ie,sampleId:qe,fingerprint:((Qa=Ne.data)==null?void 0:Qa.data)??void 0,onSample:ee}):void 0,showCompact:!U}),d.jsxs("main",{className:"flex flex-col gap-5 px-8 pt-[18px] pb-10",children:[Le.isPending&&d.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),na&&d.jsx("div",{className:"sc-card px-6 py-5",children:d.jsx(Ma,{envelope:{status:"error",data:null,lineage:[],warnings:[na.message]}})}),Le.isError&&!na&&d.jsx("div",{className:"sc-card px-6 py-5",children:d.jsx(Ma,{envelope:{status:"error",data:null,lineage:[],warnings:[Le.error.message]}})}),ge&&ge.status!=="ok"&&d.jsx("div",{className:"sc-card px-6 py-5",children:d.jsx(Ma,{envelope:ge})}),(ge==null?void 0:ge.status)==="ok"&&ge.warnings.length>0&&d.jsx("div",{className:"sc-card px-6 py-4",children:d.jsx(Ma,{envelope:{...ge,status:"missing"}})}),ie&&qe&&d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:E,children:d.jsx(SE,{data:ie,fingerprint:((pu=Ne.data)==null?void 0:pu.data)??void 0,sampleId:qe,onSample:I=>oe("sample",I),onVersion:I=>oe("version",I)})}),d.jsx(RE,{sampleLabel:sn,failures:tt,analyses:Mt}),Y?d.jsxs(d.Fragment,{children:[d.jsx(wE,{sampleLabel:`${sn} tumour`,fingerprint:T,metrics:ae.data,picked:c,lineage:M0((ts=ae.data)==null?void 0:ts.lineage,(Ya=Ne.data)==null?void 0:Ya.lineage)}),d.jsx("div",{ref:O,children:d.jsx(XE,{envelope:Ee.data,loading:Ee.isPending,picked:c,sampleLabel:sn,drivers:k,focus:ne,locate:R,onSegment:X,onGene:Z})}),d.jsx(eR,{ref:$,variants:pt.data,variantsLoading:pt.isPending,variantsFetching:pt.isFetching&&pt.isPlaceholderData,density:mt.data,densityLoading:mt.isPending,picked:c,measure:se,onMeasure:I=>{m(I),v.range&&v.range.measure!==I&&P({range:null})},table:v,onTable:P,hovered:y,onHover:C,onLocate:de,showCcf:ie.mode!=="unmatched"}),d.jsx(bR,{envelope:Yt.data,loading:Yt.isPending,picked:c,onLocate:ve})]}):d.jsx("div",{className:"sc-card px-6 py-5",children:d.jsx(Ma,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${sn} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})}const NR=new Ub({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function TR(){return d.jsx(rb,{client:NR,children:d.jsx(Y2,{basename:Qn.basePath,children:d.jsxs(V2,{children:[d.jsx(Rd,{path:"/",element:d.jsx(rE,{})}),d.jsx(Rd,{path:"/:individual",element:d.jsx(_R,{})})]})})})}ob.createRoot(document.getElementById("root")).render(d.jsx(j.StrictMode,{children:d.jsx(TR,{})}));export{d as j,j as r};
288
+ */function Vu(n,s){return n?tN(n)?E.createElement(n,s):n:null}function tN(n){return nN(n)||typeof n=="function"||lN(n)}function nN(n){return typeof n=="function"&&(()=>{const s=Object.getPrototypeOf(n);return s.prototype&&s.prototype.isReactComponent})()}function lN(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function ox(n){const s={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[i]=E.useState(()=>({current:JE(s)})),[r,u]=E.useState(()=>i.current.initialState);return i.current.setOptions(d=>({...d,...n,state:{...r,...n.state},onStateChange:h=>{u(h),n.onStateChange==null||n.onStateChange(h)}})),i.current}function $u({value:n,onChange:s,label:i="Search mutations",placeholder:r="Search gene, change or locus",shortcut:u=!0,delay:d=250}){const[h,m]=E.useState(n),p=E.useRef(null),y=E.useRef(s);y.current=s,E.useEffect(()=>m(n),[n]),E.useEffect(()=>{if(h===n)return;const v=window.setTimeout(()=>y.current(h),d);return()=>window.clearTimeout(v)},[h,n,d]),E.useEffect(()=>{if(!u)return;const v=b=>{var w,C,N;b.key!=="/"||b.metaKey||b.ctrlKey||b.altKey||(C=(w=b.target)==null?void 0:w.closest)!=null&&C.call(w,"input, textarea, select, [contenteditable]")||(b.preventDefault(),(N=p.current)==null||N.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[u]);const x=()=>{m(""),s("")};return f.jsxs("div",{className:"tsearch",children:[f.jsx(Du,{size:15,"aria-hidden":!0}),f.jsx("input",{ref:p,type:"search","aria-label":i,placeholder:r,value:h,onChange:v=>{m(v.target.value),d===0&&s(v.target.value)},onKeyDown:v=>{v.key==="Escape"&&x(),v.key==="Enter"&&s(h)}}),h?f.jsx("button",{type:"button",className:"search-clear","aria-label":"Clear the search",onClick:x,children:f.jsx(Qu,{size:14,"aria-hidden":!0})}):u?f.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"}):null]})}const nh=n=>n.toLocaleString("en-US");function Wu({shown:n,total:s,noun:i,loaded:r=!1,note:u}){const h=n>=s?`${nh(s)} ${s===1?i[0]:i[1]}`:`${nh(n)} of ${nh(s)} ${i[1]}${r?" loaded":""}`;return f.jsxs("div",{className:"vt-foot",role:"status",children:[u?f.jsx("span",{className:"vt-foot-note",children:u}):null,f.jsx("span",{className:"vt-foot-count",children:h})]})}function aN(n){return typeof n=="object"?n.key:n}function sN(n,s){const i=n.length;return new Proxy(n,{get(r,u,d){if(typeof u=="string"){const h=u.charCodeAt(0);if(h>=48&&h<=57){const m=+u;if(Number.isInteger(m)&&m>=0&&m<i){let p=r[m];if(typeof p!="object"){const y=s[m*2];p=r[m]={index:m,key:p,start:y,size:s[m*2+1],end:y+s[m*2+1],lane:0}}return p}}if(u==="length")return i}return Reflect.get(r,u,d)}})}function ai(n,s,i){let r=i.initialDeps??[],u,d=!0;function h(){const m=n();return(m.length!==r.length||m.some((y,x)=>r[x]!==y))&&(r=m,u=s(...m),i!=null&&i.onChange&&!(d&&i.skipInitialOnChange)&&i.onChange(u),d=!1),u}return h.updateDeps=m=>{r=m},h}function Cy(n,s){if(n===void 0)throw new Error("Unexpected undefined");return n}const jy=(n,s)=>Math.abs(n-s)<1.01,iN=(n,s,i)=>{let r;return Object.assign(function(...u){n.clearTimeout(r),r=n.setTimeout(()=>s.apply(this,u),i)},{cancel:()=>{n.clearTimeout(r)}})};let Nr;const lh=()=>{if(Nr!==void 0)return Nr;if(typeof navigator>"u")return Nr=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Nr=!0;const n=navigator.maxTouchPoints;return Nr=navigator.platform==="MacIntel"&&n!==void 0&&n>0},Ey=n=>{const{offsetWidth:s,offsetHeight:i}=n;return{width:s,height:i}},rN=n=>n,oN=n=>{const s=Math.max(n.startIndex-n.overscan,0),r=Math.min(n.endIndex+n.overscan,n.count-1)-s+1,u=new Array(r);for(let d=0;d<r;d++)u[d]=s+d;return u},uN=(n,s)=>{const i=n.scrollElement;if(!i)return;const r=n.targetWindow;if(!r)return;const u=h=>{const{width:m,height:p}=h;s({width:Math.round(m),height:Math.round(p)})};if(u(Ey(i)),!r.ResizeObserver)return()=>{};const d=new r.ResizeObserver(h=>{const m=()=>{const p=h[0];if(p!=null&&p.borderBoxSize){const y=p.borderBoxSize[0];if(y){u({width:y.inlineSize,height:y.blockSize});return}}u(Ey(i))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(m):m()});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},Fu={passive:!0},cN=typeof window>"u"?!0:"onscrollend"in window,fN=(n,s,i)=>{const r=n.scrollElement;if(!r)return;const u=n.targetWindow;if(!u)return;const d=n.options.useScrollendEvent&&cN;let h=0;const m=d?null:iN(u,()=>s(i(r),!1),n.options.isScrollingResetDelay),p=v=>()=>{h=i(r),m==null||m(),s(h,v)},y=p(!0),x=p(!1);return r.addEventListener("scroll",y,Fu),d&&r.addEventListener("scrollend",x,Fu),()=>{r.removeEventListener("scroll",y),d&&r.removeEventListener("scrollend",x),m==null||m.cancel()}},dN=(n,s)=>fN(n,s,i=>{const{horizontal:r,isRtl:u}=n.options;return r?i.scrollLeft*(u&&-1||1):i.scrollTop}),hN=(n,s,i)=>{if(i.options.useCachedMeasurements){const r=i.indexFromElement(n),u=i.options.getItemKey(r);return i.itemSizeCache.get(u)??i.options.estimateSize(r)}if(s!=null&&s.borderBoxSize){const r=s.borderBoxSize[0];if(r)return Math.round(r[i.options.horizontal?"inlineSize":"blockSize"])}if(!s){const r=i.indexFromElement(n),u=i.options.getItemKey(r),d=i.itemSizeCache.get(u);if(d!==void 0)return d}return n[i.options.horizontal?"offsetWidth":"offsetHeight"]},mN=(n,{adjustments:s=0,behavior:i},r)=>{var u,d;(d=(u=r.scrollElement)==null?void 0:u.scrollTo)==null||d.call(u,{[r.options.horizontal?"left":"top"]:n+s,behavior:i})},gN=mN;function pN(n,s,i,r){if(s===0)return!1;const u=r(0),d=new Set;let h=0;for(;h<n;){const p=i(h);if(p===u)break;d.add(p),h++}const m=n-h;if(m===0||m>=s)return!1;for(let p=0;p<m;p++)if(r(p)!==i(h+p))return!1;for(let p=m;p<s;p++)if(d.has(r(p)))return!1;return!0}class vN{constructor(s){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.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var i,r,u;return((u=(r=(i=this.targetWindow)==null?void 0:i.performance)==null?void 0:r.now)==null?void 0:u.call(r))??Date.now()},this.observer=(()=>{let i=null;const r=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(u=>{u.forEach(d=>{const h=()=>{const m=d.target,p=this.indexFromElement(m);if(!m.isConnected){this.observer.unobserve(m);for(const[y,x]of this.elementsCache)if(x===m){this.elementsCache.delete(y);break}return}this.isIndexInRange(p)&&this.shouldMeasureDuringScroll(p)&&this.resizeItem(p,this.options.measureElement(m,d,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(h):h()})}));return{disconnect:()=>{var u;(u=r())==null||u.disconnect(),i=null},observe:u=>{var d;return(d=r())==null?void 0:d.observe(u,{box:"border-box"})},unobserve:u=>{var d;return(d=r())==null?void 0:d.unobserve(u)}}})(),this.range=null,this.setOptions=i=>{var r;const u={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rN,rangeExtractor:oN,onChange:()=>{},measureElement:hN,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(const v in i){const b=i[v];b!==void 0&&(u[v]=b)}const d=this.options;let h=null,m=null,p=!1;if(d!==void 0&&d.enabled&&u.enabled&&u.anchorTo==="end"&&this.scrollElement!==null){const v=d.count,b=u.count,w=this.getMeasurements(),C=((r=this._singleLaneMeasurements)==null?void 0:r.items)??w,N=T=>aN(C[T]),M=v>0?N(0):null,R=v>0?N(v-1):null;if(b!==v||v>0&&b>0&&(u.getItemKey(0)!==M||u.getItemKey(b-1)!==R)){p=!0;const T=v>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;T&&(h=[T.key,this.getScrollOffset()-T.start]);const H=u.followOnAppend===!0?"auto":u.followOnAppend||null;H&&b>0&&this.isAtEnd(d.scrollEndThreshold)&&(v===0||u.getItemKey(b-1)!==R)&&(b>v||pN(v,b,N,u.getItemKey))&&(m=H)}}this.options=u,p&&(this.pendingMin=0,this.itemSizeCacheVersion++);let y=!1,x=0;if(h&&this.scrollOffset!==null){const[v,b]=h,w=this.getMeasurements(),{count:C,getItemKey:N}=this.options;let M=0;for(;M<C&&N(M)!==v;)M++;if(M<C){const R=w[M];if(R){const j=Math.max(0,R.start+b);!m&&j!==this.scrollOffset&&(x=j-this.scrollOffset,this.scrollOffset=j,y=!0)}}}(y||m)&&(this.pendingScrollAnchor=[y?h[0]:null,y?h[1]:0,m,x])},this.notify=i=>{var r,u;(u=(r=this.options).onChange)==null||u.call(r,this,i)},this.maybeNotify=ai(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),i=>{this.notify(i)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i=>i()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i,r;const u=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==u){if(this.cleanup(),!u){this.maybeNotify();return}if(this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i=this.scrollElement)==null?void 0:i.window)??null,this.elementsCache.forEach(h=>{this.observer.observe(h)}),this.unsubs.push(this.options.observeElementRect(this,h=>{this.scrollRect=h,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(h,m)=>{if(m&&this._intendedScrollOffset===null&&h===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(h-this._intendedScrollOffset)<1.5&&(h=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(h-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const p=this.getScrollOffset();this.scrollDirection=m?p===h?this.scrollDirection:p<h?"forward":"backward":null,this.scrollOffset=h,this.isScrolling=m,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const h=this.scrollElement,m=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},p=()=>{this._iosTouching=!1,!(!lh()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};h.addEventListener("touchstart",m,Fu),h.addEventListener("touchend",p,Fu),this.unsubs.push(()=>{h.removeEventListener("touchstart",m),h.removeEventListener("touchend",p),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const d=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,d&&this.scrollElement&&this.options.enabled){const[h,m,p,y]=d;h!==null&&!p&&(lh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?y!==0&&(this._iosDeferredAdjustment+=y):((r=this.scrollState)==null?void 0:r.behavior)==="smooth"&&!jy(this.getScrollOffset()-y,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),p&&this.scrollToEnd({behavior:p})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:i,maxAtWrite:r}=this._clampedAdjustment,u=this.getMaxScrollOffset();u>r+.5&&(this._clampedAdjustment=i>u+.5?{target:i,maxAtWrite:u}:null,this._scrollToOffset(i,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const i=this.getScrollOffset(),r=this.getMaxScrollOffset();if(i<0||i>r)return;if(this._iosDeferredAdjustment<0&&i>=r-1){this._iosDeferredAdjustment=0;return}const u=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(i,{adjustments:this.scrollAdjustments+=u,behavior:void 0})},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=ai(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(i,r,u,d,h,m,p,y)=>(this.prevLanes!==void 0&&this.prevLanes!==m&&(this.lanesChangedFlag=!0),this.prevLanes=m,this.pendingMin=null,{count:i,paddingStart:r,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:p,gap:y}),{key:!1}),this.isIndexInRange=i=>i>=0&&i<this.options.count,this.getMeasurements=ai(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:i,paddingStart:r,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:p,gap:y},x)=>{var v;const b=this.itemSizeCache;if(!h)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>i)for(const j of this.laneAssignments.keys())j>=i&&this.laneAssignments.delete(j);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(j=>{this.itemSizeCache.set(j.key,j.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===i&&(this.lanesSettling=!1),m===1){const j=i*2;let F=(v=this._singleLaneMeasurements)==null?void 0:v.flat;if(!F||F.length<j){const z=new Float64Array(j);F&&w>0&&z.set(F.subarray(0,w*2)),F=z}const T=w===0?new Array(i):this._singleLaneMeasurements.items.slice();let H;if(w===0)H=r+u;else{const z=w-1;H=F[z*2]+F[z*2+1]+y}for(let z=w;z<i;z++){const Y=d(z);T[z]=Y;const te=b.get(Y),k=typeof te=="number"?te:this.options.estimateSize(z);F[z*2]=H,F[z*2+1]=k,H+=k+y}this._singleLaneMeasurements={flat:F,items:T};const D=sN(T,F);return this.measurementsCache=D,D}const C=this.measurementsCache.slice(0,w),N=new Array(m).fill(void 0),M=new Float64Array(m);let R=0;for(let j=0;j<w;j++){const F=C[j];F&&(N[F.lane]===void 0&&R++,N[F.lane]=j,M[F.lane]=F.end)}for(let j=w;j<i;j++){const F=d(j),T=this.laneAssignments.get(j);let H,D;const z=p==="estimate"||b.has(F);if(T!==void 0&&this.options.lanes>1){H=T;const ne=N[H],ie=ne!==void 0?C[ne]:void 0;D=ie?ie.end+y:r+u}else if(R===m){let ne=0,ie=M[0],Ce=N[0];for(let X=1;X<m;X++){const ee=M[X];(ee<ie||ee===ie&&N[X]<Ce)&&(ne=X,ie=ee,Ce=N[X])}H=ne,D=ie+y,z&&this.laneAssignments.set(j,H)}else H=j%this.options.lanes,D=r+u,z&&this.laneAssignments.set(j,H);const Y=b.get(F),te=typeof Y=="number"?Y:this.options.estimateSize(j),k=D+te;C[j]={index:j,start:D,size:te,end:k,key:F,lane:H},N[H]===void 0&&R++,N[H]=j,M[H]=k}return this.measurementsCache=C,C},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ai(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i,r,u,d)=>i.length===0||r===0?(this.range=null,null):(this.range=xN(i,r,u,d,d===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ai(()=>{let i=null,r=null;const u=this.calculateRange();return u&&(i=u.startIndex,r=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,i,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,i,r]},(i,r,u,d,h)=>d===null||h===null?[]:i({startIndex:d,endIndex:h,overscan:r,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=i=>{const r=this.options.indexAttribute,u=i.getAttribute(r);return u?parseInt(u,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=i=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const u=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(u!==void 0&&this.range){const d=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),h=Math.max(0,u-d),m=Math.min(this.options.count-1,u+d);return i>=h&&i<=m}return!0},this.measureElement=i=>{if(!i){this.elementsCache.forEach((h,m)=>{h.isConnected||(this.observer.unobserve(h),this.elementsCache.delete(m))});return}const r=this.indexFromElement(i);if(!this.isIndexInRange(r))return;const u=this.options.getItemKey(r),d=this.elementsCache.get(u);d!==i&&(d&&this.observer.unobserve(d),this.observer.observe(i),this.elementsCache.set(u,i)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(i,void 0,this))},this.resizeItem=(i,r)=>{var u,d,h;if(!this.isIndexInRange(i))return;let m,p,y;const x=(u=this._singleLaneMeasurements)==null?void 0:u.flat;if(this.options.lanes===1&&x!=null)y=this.options.getItemKey(i),p=x[i*2],m=x[i*2+1];else{const w=this.measurementsCache[i];if(!w)return;y=w.key,p=w.start,m=w.size}const v=this.itemSizeCache.get(y)??m,b=r-v;if(b!==0){const w=this.options.anchorTo==="end"&&((d=this.scrollState)==null?void 0:d.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,C=w?this.getTotalSize():0,N=this.getScrollOffset()+this.scrollAdjustments,R=!this.itemSizeCache.has(y)?p<N:p+v<=N&&this.scrollDirection!=="backward",j=((h=this.scrollState)==null?void 0:h.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[i]??{index:i,key:y,start:p,size:m,end:p+m,lane:0},b,this):R);(this.pendingMin===null||i<this.pendingMin)&&(this.pendingMin=i),this.itemSizeCache.set(y,r),this.itemSizeCacheVersion++;let F=!1;w?F=this.applyScrollAdjustment(this.getTotalSize()-C):j&&(F=this.applyScrollAdjustment(b)),this.notify(F),this._retryClampedAdjustment()}},this.getVirtualItems=ai(()=>[this.getVirtualIndexes(),this.getMeasurements()],(i,r)=>{const u=[];for(let d=0,h=i.length;d<h;d++){const m=i[d],p=r[m];u.push(p)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{var r;const u=this.getMeasurements();if(u.length===0)return;const d=(r=this._singleLaneMeasurements)==null?void 0:r.flat,h=this.options.lanes===1&&d!=null,m=ux(0,u.length-1,h?p=>d[p*2]:p=>Cy(u[p]).start,i);return Cy(u[m])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const i=this.scrollElement.document.documentElement;return this.options.horizontal?i.scrollWidth-this.scrollElement.innerWidth:i.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(i=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=i,this.getOffsetForAlignment=(i,r,u=0)=>{if(!this.scrollElement)return 0;const d=this.getSize(),h=this.getScrollOffset();r==="auto"&&(r=i>=h+d?"end":"start"),r==="center"?i+=(u-d)/2:r==="end"&&(i-=d);const m=this.getMaxScrollOffset();return Math.max(Math.min(m,i),0)},this.getOffsetForIndex=(i,r="auto")=>{i=Math.max(0,Math.min(i,this.options.count-1));const u=this.getSize(),d=this.getScrollOffset(),h=this.measurementsCache[i];if(!h)return;if(r==="auto")if(h.end>=d+u-this.options.scrollPaddingEnd)r="end";else if(h.start<=d+this.options.scrollPaddingStart)r="start";else return[d,r];if(r==="end"&&i===this.options.count-1)return[this.getMaxScrollOffset(),r];const m=r==="end"?h.end+this.options.scrollPaddingEnd:h.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,r,h.size),r]},this.scrollToOffset=(i,{align:r="start",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0;const d=this.getOffsetForAlignment(i,r),h=this.now();this.scrollState={index:null,align:r,behavior:u,startedAt:h,lastTargetOffset:d,stableFrames:0},this._scrollToOffset(d,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollToIndex=(i,{align:r="auto",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0,i=Math.max(0,Math.min(i,this.options.count-1));const d=this.getOffsetForIndex(i,r);if(!d)return;const[h,m]=d,p=this.now();this.scrollState={index:i,align:m,behavior:u,startedAt:p,lastTargetOffset:h,stableFrames:0},this._scrollToOffset(h,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollBy=(i,{behavior:r="auto"}={})=>{const u=this.getScrollOffset()+i,d=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:d,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:i="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:i});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:i})},this.getTotalSize=()=>{var i,r;const u=this.getMeasurements();let d;if(u.length===0)d=this.options.paddingStart;else if(this.options.lanes===1){const h=u.length-1,m=(i=this._singleLaneMeasurements)==null?void 0:i.flat;m!=null?d=m[h*2]+m[h*2+1]:d=((r=u[h])==null?void 0:r.end)??0}else{const h=Array(this.options.lanes).fill(null);let m=u.length-1;for(;m>=0&&h.some(p=>p===null);){const p=u[m];h[p.lane]===null&&(h[p.lane]=p.end),m--}d=Math.max(...h.filter(p=>p!==null))}return Math.max(d-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const i=[];if(this.itemSizeCache.size===0)return i;const r=this.getMeasurements();for(const u of r)u&&this.itemSizeCache.has(u.key)&&i.push({index:u.index,key:u.key,start:u.start,size:u.size,end:u.end,lane:u.lane});return i},this._scrollToOffset=(i,{adjustments:r,behavior:u})=>{this._intendedScrollOffset=i+(r??0),this.options.scrollToFn(i,{behavior:u,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(s)}applyScrollAdjustment(s,i){if(s===0)return!1;if(lh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=s,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+s,u=this.scrollElement,d=u!==null&&("scrollHeight"in u||"document"in u)?this.getMaxScrollOffset():null;return this._clampedAdjustment=d!==null&&r>d+.5?{target:r,maxAtWrite:d}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:i}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,u=r?r[0]:this.scrollState.lastTargetOffset,d=1,h=u!==this.scrollState.lastTargetOffset;if(!h&&jy(u,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=d){this.getScrollOffset()!==u&&this._scrollToOffset(u,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,h){const m=this.getSize()||600,p=Math.abs(u-this.getScrollOffset()),y=this.scrollState.behavior==="smooth"&&p>m;this.scrollState.lastTargetOffset=u,y||(this.scrollState.behavior="auto"),this._scrollToOffset(u,{adjustments:void 0,behavior:y?"smooth":"auto"})}this.scheduleScrollReconcile()}}const ux=(n,s,i,r)=>{for(;n<=s;){const u=(n+s)/2|0,d=i(u);if(d<r)n=u+1;else if(d>r)s=u-1;else return u}return n>0?n-1:0};function yN(n,s,i){let r=0;for(;r<=s;){const u=(r+s)/2|0,d=n[u*2];if(d<i)r=u+1;else if(d>i)s=u-1;else return u}return r>0?r-1:0}function xN(n,s,i,r,u){const d=n.length-1;if(n.length<=r)return{startIndex:0,endIndex:d};if(r===1&&u!==null){const y=yN(u,d,i);let x=y;const v=i+s;for(;x<d&&u[x*2]+u[x*2+1]<v;)x++;return{startIndex:y,endIndex:x}}let m=ux(0,d,y=>n[y].start,i),p=m;if(r===1)for(;p<d&&n[p].end<i+s;)p++;else if(r>1){const y=Array(r).fill(0);for(;p<d&&y.some(v=>v<i+s);){const v=n[p];y[v.lane]=v.end,p++}const x=Array(r).fill(i+s);for(;m>=0&&x.some(v=>v>=i);){const v=n[m];x[v.lane]=v.start,m--}m=Math.max(0,m-m%r),p=Math.min(d,p+(r-1-p%r))}return{startIndex:m,endIndex:p}}const ah=typeof document<"u"?E.useLayoutEffect:E.useEffect;function SN({useFlushSync:n=!0,directDomUpdates:s=!1,directDomUpdatesMode:i="transform",...r}){const u=E.useReducer(v=>v+1,0)[1],d=E.useRef({enabled:s,mode:i,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});d.current.enabled=s,d.current.mode=i;const h=E.useRef(!1),m=v=>{const b=d.current;if(!b.enabled||!b.container)return;const w=v.getTotalSize();if(w!==b.lastSize){b.lastSize=w;const C=v.options.horizontal?"width":"height";b.container.style[C]=`${w}px`}},p=v=>{const b=d.current;if(!b.enabled||!b.container)return;m(v);const w=!!v.options.horizontal,C=b.mode==="transform",N=w?"left":"top",M=v.options.scrollMargin,R=v.getVirtualItems();for(const j of R){const F=j.start-M,T=v.elementsCache.get(j.key);T&&b.lastPositions.get(T)!==F&&(b.lastPositions.set(T,F),C?T.style.transform=w?`translate3d(${F}px, 0, 0)`:`translate3d(0, ${F}px, 0)`:T.style[N]=`${F}px`)}},y={...r,onChange:(v,b)=>{var w;const C=d.current;let N=!0;if(C.enabled){p(v);const M=v.range,R=C.prevRange;N=!R||R.isScrolling!==v.isScrolling||R.startIndex!==(M==null?void 0:M.startIndex)||R.endIndex!==(M==null?void 0:M.endIndex),N&&(C.prevRange=M?{startIndex:M.startIndex,endIndex:M.endIndex,isScrolling:v.isScrolling}:null)}N&&(n&&b&&!h.current?Wh.flushSync(u):u()),(w=r.onChange)==null||w.call(r,v,b)}},[x]=E.useState(()=>{const v=new vN(y),b=v.measureElement;return v.measureElement=w=>{h.current=!0;try{b(w)}finally{h.current=!1}},Object.assign(v,{containerRef:w=>{const C=d.current;if(C.container=w,C.lastSize=null,w&&C.enabled){const N=v.getTotalSize();C.lastSize=N;const M=v.options.horizontal?"width":"height";w.style[M]=`${N}px`}}})});return x.setOptions(y),ah(()=>x._didMount(),[]),ah(()=>(m(x),x._willUpdate())),ah(()=>{p(x)}),x}function bN(n){return SN({observeElementRect:uN,observeElementOffset:dN,scrollToFn:gN,...n})}const cx=33,si=32,wN=25;function fx({items:n,scrollRef:s,columnCount:i,getKey:r,render:u,onEndReached:d,endThreshold:h=15,rowHeight:m=cx}){var M;const p=bN({count:n.length,getScrollElement:()=>s.current,estimateSize:()=>m,overscan:8,scrollMargin:si,getItemKey:R=>r(n[R],R),initialRect:{width:1e3,height:si+m*10}}),y=!((M=p.scrollRect)!=null&&M.height),x=y?n.slice(0,wN).map((R,j)=>({key:r(R,j),index:j,start:si+j*m,end:si+(j+1)*m})):p.getVirtualItems(),v=x[0],b=x[x.length-1],w=(b==null?void 0:b.index)??-1;E.useEffect(()=>{d&&w>=0&&w>=n.length-h&&d()},[w,n.length,h,d]);const C=!y&&v?v.start-si:0,N=!y&&b?p.getTotalSize()-(b.end-si):0;return f.jsxs(f.Fragment,{children:[C>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:C},children:f.jsx("td",{colSpan:i})})}),x.map(R=>f.jsx("tbody",{"data-index":R.index,ref:y?void 0:p.measureElement,children:u(n[R.index],R.index)},R.key)),N>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:N},children:f.jsx("td",{colSpan:i})})})]})}function ds({text:n,query:s}){const i=s.trim();if(!i||PC(i))return f.jsx(f.Fragment,{children:n});const r=[],u=n.toLowerCase(),d=i.toLowerCase();let h=0;for(let m=u.indexOf(d);m!==-1;m=u.indexOf(d,h))m>h&&r.push(n.slice(h,m)),r.push(f.jsx("mark",{children:n.slice(m,m+i.length)},m)),h=m+i.length;return r.push(n.slice(h)),f.jsx(f.Fragment,{children:r})}function Ny({value:n,max:s,clonal:i}){return n===null?f.jsx("span",{style:{color:"var(--chev)"},children:"–"}):f.jsxs("span",{className:"vbar",children:[f.jsx("span",{className:"vbar-n",children:Oh(n)}),f.jsxs("span",{className:"vbar-track","aria-hidden":!0,children:[f.jsx("span",{className:"vbar-fill",style:{width:`${Math.min(n/s,1)*100}%`}}),i&&f.jsx("span",{className:"vbar-tick",style:{left:`${1/s*100}%`}})]})]})}function CN({variant:n,showDriver:s}){return f.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[s&&n.is_driver&&f.jsx("span",{className:"sc-pill p-neu",children:"Driver"}),n.hotspot&&f.jsx("span",{className:"sc-pill p-hot",children:"Hotspot"}),n.in_dmp&&f.jsx("span",{className:"sc-pill p-dmp",children:"In DMP"}),n.ffpe_removed&&f.jsx("span",{className:"sc-pill p-ffpe",title:"Left out of the report's counts by its FFPE artifact filter",children:"FFPE filtered"})]})}function jN(n){return`${n.ref}>${n.alt}`}function EN({variant:n,onLocate:s}){const[i,r]=E.useState(!1),u=`chr${n.chrom}:${n.pos}`,d=[["Variant",`${n.kind==="snv"?"SNV":n.kind==="indel"?"Indel":n.kind}, ${jN(n)}`],...n.depth!==null?[["Reads",`${n.alt_reads??"?"} of ${n.depth}`]]:[],["Normal VAF",Oh(n.normal_vaf)],["Mutant copies",tj(n.mut_alleles)??"–"],["Consequence",(n.consequence??n.effect??"–").replace(/&/g,", ")],["COSMIC",ej(n.cosmic)??"–"],...n.ffpe_score!==null||n.ffpe_removed?[["FFPE artifact score",n.ffpe_score!==null?Oh(n.ffpe_score):"Not scored"]]:[],["Expression",n.gene_tpm!==null?`${n.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",nj(n)??"–"]];return f.jsxs("div",{className:"vt-detail-body",children:[f.jsx("dl",{className:"vt-facts",children:d.map(([h,m])=>f.jsxs("div",{children:[f.jsx("dt",{children:h}),f.jsx("dd",{children:m})]},h))}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s(n),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show on copy number"]}),f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(u),r(!0),window.setTimeout(()=>r(!1),1500)}catch{window.prompt("Copy this locus",u)}},children:[f.jsx(R1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy locus"]})]})]})}function NN({sort:n,current:s,onSort:i}){const r=s.replace(/^-/,"")===n.key,u=s.startsWith("-"),d=r?u?n.key:`-${n.key}`:n.descFirst?`-${n.key}`:n.key;return f.jsxs("button",{type:"button",className:"vt-sort","data-active":r,onClick:()=>i(d),title:`Sort by ${n.label.toLowerCase()}`,children:[n.label,r&&u?f.jsx(zu,{size:12,"aria-hidden":!0}):r?f.jsx(N1,{size:12,"aria-hidden":!0}):f.jsx(zu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function _N({data:n,rows:s,hasMore:i,loadingMore:r,onMore:u,table:d,fetching:h,showCcf:m,onTable:p,onHover:y,onLocate:x}){const[v,b]=E.useState({}),w=d.q,C=d.scope!=="drivers",N=E.useMemo(()=>[{id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),meta:{className:"pin vt-x"},cell:({row:D})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":D.getIsExpanded(),"aria-label":`Details of ${D.original.gene??"this mutation"} ${D.original.protein_change??""}`.trim(),onClick:z=>{z.stopPropagation(),D.toggleExpanded()},onFocus:()=>y(D.original),children:f.jsx(nm,{size:14,"aria-hidden":!0})})},{id:"gene",header:"Gene",meta:{className:"pin vt-g",sorts:[{key:"gene",label:"Gene"},{key:"position",label:"Position"}]},cell:({row:{original:D}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:D.gene??"–",query:w})}),f.jsx("span",{className:"vt-sub mono",children:Fr(D.chrom,D.pos)})]})},{id:"change",header:"Change",cell:({row:{original:D}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-[12.5px] font-medium",children:f.jsx(ds,{text:D.protein_change??"–",query:w})}),D.cdna_change&&f.jsx("span",{className:"vt-sub mono",children:f.jsx(ds,{text:D.cdna_change,query:w})})]})},{id:"effect",header:"Effect",meta:{sorts:[{key:"effect",label:"Effect"}]},cell:({row:{original:D}})=>f.jsx("span",{className:D.effect_class==="truncating"?"font-semibold":void 0,children:_C(D.consequence,D.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ny,{value:D.vaf,max:1})},...m?[{id:"ccf",header:"CCF",meta:{className:"n",sorts:[{key:"ccf",label:"CCF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ny,{value:D.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:D}})=>f.jsx(CN,{variant:D,showDriver:C})}],[w,C,m,y]),M=ox({data:s,columns:N,getRowId:ZC,getCoreRowModel:ix(),getExpandedRowModel:rx(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:v},onExpandedChange:b}),R=d.sort.replace(/^-/,""),j=M.getVisibleLeafColumns().length,F=G1(d)>0,T=E.useRef(null),H=JSON.stringify([d.scope,d.sort,d.q,d.effects,d.flags,d.range,d.ffpe]);return E.useEffect(()=>{T.current&&(T.current.scrollTop=0)},[H]),f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("div",{className:"tbar",children:f.jsx($u,{value:d.q,onChange:D=>p({q:D})})}),f.jsxs("div",{ref:T,className:"vt-scroll vt-viewport",onMouseLeave:()=>y(null),"aria-busy":h,children:[h&&f.jsx("div",{className:"vt-progress","aria-hidden":!0}),f.jsxs("table",{className:"vt",children:[f.jsx("thead",{children:M.getHeaderGroups().map(D=>f.jsx("tr",{children:D.headers.map(z=>{var k;const Y=z.column.columnDef.meta,te=(k=Y==null?void 0:Y.sorts)==null?void 0:k.some(ne=>ne.key===R);return f.jsx("th",{className:Y==null?void 0:Y.className,"aria-sort":te?d.sort.startsWith("-")?"descending":"ascending":void 0,children:Y!=null&&Y.sorts?f.jsx("span",{className:"vt-sorts",children:Y.sorts.map(ne=>f.jsx(NN,{sort:ne,current:d.sort,onSort:ie=>p({sort:ie})},ne.key))}):Vu(z.column.columnDef.header,z.getContext())},z.id)})},D.id))}),f.jsx(fx,{items:M.getRowModel().rows,scrollRef:T,columnCount:j,getKey:D=>D.id,onEndReached:i&&!r?u:void 0,render:D=>f.jsxs(f.Fragment,{children:[f.jsx("tr",{className:"vt-row","data-expanded":D.getIsExpanded(),onClick:()=>D.toggleExpanded(),onMouseEnter:()=>y(D.original),children:D.getVisibleCells().map(z=>{var Y;return f.jsx("td",{className:(Y=z.column.columnDef.meta)==null?void 0:Y.className,children:Vu(z.column.columnDef.cell,z.getContext())},z.id)})}),D.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:j,children:f.jsx(EN,{variant:D.original,onLocate:x})})})]})}),s.length===0&&f.jsx("tbody",{children:f.jsx("tr",{children:f.jsx("td",{colSpan:j,children:f.jsx("div",{className:"vt-empty",children:F?f.jsxs(f.Fragment,{children:["No mutations match these filters.",f.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>p({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]}):`No ${d.scope==="all"?"":`${d.scope} `}mutations in this sample.`})})})})]})]}),n.total>0&&f.jsx(Wu,{shown:s.length,total:n.total,noun:["mutation","mutations"],loaded:!0,note:r?"Loading more…":s.length<n.total?"Scroll the table for more":void 0})]})}const MN=E.forwardRef(function({variants:s,rows:i,hasMore:r,loadingMore:u,onMore:d,variantsLoading:h,variantsFetching:m,density:p,densityLoading:y,picked:x,measure:v,onMeasure:b,table:w,onTable:C,hovered:N,onHover:M,onLocate:R,showCcf:j},F){var k,ne;const T=(s==null?void 0:s.status)==="ok"?s.data??void 0:void 0,H=T==null?void 0:T.counts,D=(p==null?void 0:p.status)==="ok"?(k=p.data)==null?void 0:k.total:void 0,z=(p==null?void 0:p.status)==="ok"?(ne=p.data)==null?void 0:ne.ffpe:null,Y=ie=>ie===void 0?"":ie.toLocaleString("en-US"),te=w.range&&w.range.measure===v?[w.range.low,w.range.high]:null;return f.jsxs(Ku,{ref:F,title:"Mutations",subtitle:D!==void 0?`${Y(D)} PASS SNVs and indels${z&&!z.shown?", after the FFPE filter":""}`:void 0,lineage:K1(p==null?void 0:p.lineage,s==null?void 0:s.lineage),picked:x,className:"mut",info:"mutations",expandable:!0,controls:f.jsx(f.Fragment,{children:f.jsx(Zu,{label:"Which mutations",value:w.scope,onChange:ie=>C({scope:ie,sort:k1[ie]}),options:[{value:"drivers",label:f.jsxs(f.Fragment,{children:["Drivers",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.drivers)})]})},{value:"coding",label:f.jsxs(f.Fragment,{children:["Coding",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.coding)})]})},{value:"all",label:f.jsxs(f.Fragment,{children:["All",f.jsx("span",{className:"seg-n",children:Y(H==null?void 0:H.all)})]})}]})}),children:[f.jsx(uE,{envelope:p,loading:y,measure:v,onMeasure:b,range:te,focus:N,onRange:ie=>{!ie&&!w.range||C({range:ie?{measure:v,low:ie[0],high:ie[1]}:null})},onGene:ie=>C({q:ie})}),T&&s&&s.warnings.length>0&&f.jsx("div",{className:"px-5 py-2 text-xs",role:"note",style:{color:"var(--warn-ink)"},children:s.warnings.join(" ")}),T?f.jsxs("div",{className:"mut-body",children:[f.jsx(dE,{table:w,data:T,onChange:C}),f.jsx(_N,{data:T,rows:i,hasMore:r,loadingMore:u,onMore:d,table:w,fetching:m,showCcf:j,onTable:C,onHover:M,onLocate:R})]}):f.jsx("div",{className:"mut-rule",children:f.jsx(Zr,{label:"mutations",envelope:s,loading:h,skeletonHeight:240,children:()=>null})})]})}),um={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},dx=["oncogene","tsg","both"],cm={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},RN={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function TN(n){return n?RN[n]??n:""}const AN={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function fm(n){return n?AN[n]??n:"–"}function ON(n){return n==null?"–":n>=1e6?`${(n/1e6).toLocaleString("en-US",{maximumFractionDigits:1})} Mb`:n>=1e3?`${(n/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} kb`:`${n.toLocaleString("en-US")} bp`}function zN(n){return n.some(s=>s.left_expression||s.right_expression||s.expression)}function DN(n){const s={oncogene:0,tsg:0,both:0};for(const i of n)i.role&&(s[i.role]+=1);return s}function HN(n){const s=n.trim().match(Y1);if(!s)return null;const i=Number(s[2].replace(/,/g,"")),r=s[3]?Number(s[3].replace(/,/g,"")):i;return{chrom:s[1].toUpperCase(),start:Math.min(i,r),end:Math.max(i,r)}}function LN(n,s){const i=s.trim().toLowerCase();if(!i)return!0;const r=HN(s);if(r){const u=(d,h)=>(d==null?void 0:d.toUpperCase())===r.chrom&&h!==null&&h>=r.start&&h<=r.end;return u(n.left_chrom,n.left_pos)||u(n.right_chrom,n.right_pos)}return[n.gene,n.left_gene,n.right_gene,n.callers,n.left_loc,n.right_loc,n.sv_type,fm(n.sv_type),n.role?um[n.role]:null].some(u=>u==null?void 0:u.toLowerCase().includes(i))}const Wa={deletion:"var(--sv-del)","tandem-duplication":"var(--sv-dup)",inversion:"var(--sv-inv)",translocation:"var(--sv-tra)"},UN={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."},VN={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function $N(n){return n.size?VN[n.size]??n.size:""}function _y(n){const s=`${n.clustered?"Clustered":"Dispersed"} ${cm[n.sv_class].toLowerCase()}s`;return n.size?`${s}, ${TN(n.size)}`:s}function FN(n){const s=[];return n.forEach((i,r)=>{const u=s[s.length-1];u&&u.clustered===i.clustered&&u.sv_class===i.sv_class?u.end=r:s.push({clustered:i.clustered,sv_class:i.sv_class,start:r,end:r})}),s}function BN(n){const s=new Map;for(const i of n)s.set(i.sv_class,(s.get(i.sv_class)??0)+i.count);return[...s].map(([i,r])=>({sv_class:i,count:r}))}const kN=45;function GN({role:n}){return n?f.jsx("span",{className:`sc-pill p-${n==="oncogene"?"onco":n}`,children:um[n]}):f.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function qN({rows:n,shown:s,onToggle:i}){const r=DN(n);return f.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:dx.filter(u=>r[u]>0).map(u=>f.jsxs("button",{type:"button",className:`sv-legend-item p-${u==="oncogene"?"onco":u}`,"aria-pressed":s.includes(u),onClick:()=>i(u),children:[um[u],f.jsx("span",{className:"sv-legend-n",children:r[u]})]},u))})}function My({gene:n,chrom:s,pos:i,loc:r,query:u}){return f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"sv-end",children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:n||"–",query:u})}),r&&f.jsx("span",{className:"sv-loc",children:r})]}),f.jsx("span",{className:"vt-sub stack mono",children:s&&i!==null?Fr(s,i):"–"})]})}function hx(n){return n?n.replace(/,\s*/g,", "):"–"}function QN({label:n,sorted:s,onClick:i}){return f.jsxs("button",{type:"button",className:"vt-sort","data-active":!!s,onClick:i,title:`Sort by ${n.toLowerCase()}`,children:[n,s==="desc"?f.jsx(zu,{size:12,"aria-hidden":!0}):s==="asc"?f.jsx(N1,{size:12,"aria-hidden":!0}):f.jsx(zu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function YN({row:n,onLocate:s}){const[i,r]=E.useState(!1),u=n.left_chrom&&n.left_pos!==null?{chrom:n.left_chrom,pos:n.left_pos}:null,d=n.right_chrom&&n.right_pos!==null?{chrom:n.right_chrom,pos:n.right_pos}:null,h=[["Type",fm(n.sv_type)],["Left breakpoint",u?`${Fr(u.chrom,u.pos)}${n.left_loc?`, ${n.left_loc}`:""}`:"–"],["Right breakpoint",d?`${Fr(d.chrom,d.pos)}${n.right_loc?`, ${n.right_loc}`:""}`:"–"],["Pileups (left, right)",[n.left_pileup,n.right_pileup].filter(Boolean).join(", ")||"–"],["Orientation",n.orientation??"–"],["Callers",hx(n.callers)]],m=n.gene??n.left_gene,p=n.gene??n.right_gene;return f.jsxs("div",{className:"vt-detail-body",children:[f.jsx("dl",{className:"vt-facts",children:h.map(([y,x])=>f.jsxs("div",{children:[f.jsx("dt",{children:y}),f.jsx("dd",{children:x})]},y))}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s({...u,gene:m}),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show ",d&&d.chrom===u.chrom?"it":"left breakpoint"," on copy number"]}),d&&d.chrom!==(u==null?void 0:u.chrom)&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>s({...d,gene:p}),children:[f.jsx(Ah,{size:14,"aria-hidden":!0}),"Show right breakpoint on copy number"]}),n.igv_locus&&f.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.igv_locus??""),r(!0),window.setTimeout(()=>r(!1),1500)}catch{window.prompt("Copy these IGV loci",n.igv_locus??"")}},children:[f.jsx(R1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy IGV loci"]})]})]})}function Ry({kind:n,rows:s,total:i=s.length,query:r="",onLocate:u}){const[d,h]=E.useState({}),[m,p]=E.useState([]),y=E.useRef(null),x=zN(s);E.useEffect(()=>{y.current&&(y.current.scrollTop=0)},[r,s.length]);const v=E.useMemo(()=>{const N={id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:j})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":j.getIsExpanded(),"aria-label":`Details of ${j.original.gene??[j.original.left_gene,j.original.right_gene].filter(Boolean).join(" and ")}`,onClick:F=>{F.stopPropagation(),j.toggleExpanded()},children:f.jsx(nm,{size:14,"aria-hidden":!0})})},M=[{id:"type",header:"Type",accessorFn:j=>j.sv_type??"",cell:({row:{original:j}})=>fm(j.sv_type)},{id:"role",header:"Role",accessorFn:j=>j.role?dx.indexOf(j.role):9,cell:({row:{original:j}})=>f.jsx(GN,{role:j.role})},{id:"callers",header:"Callers",accessorFn:j=>j.callers??"",cell:({row:{original:j}})=>f.jsx("span",{className:"text-[12.5px]",children:hx(j.callers)})},{id:"support",header:"Support",accessorFn:j=>j.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:j}})=>f.jsx("span",{className:"mono",children:j.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:j}})=>f.jsx("span",{className:"mono text-[12px]",children:[j.left_pileup,j.right_pileup].filter(Boolean).join(" · ")||"–"})}],R=x?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:j}})=>n==="whole_gene"?f.jsx("span",{className:"text-[12.5px]",children:j.expression??"–"}):f.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[f.jsx("span",{children:j.left_expression??"–"}),f.jsx("span",{style:{color:"var(--muted)"},children:j.right_expression??"–"})]})}]:[];return n==="whole_gene"?[N,{id:"gene",header:"Gene",accessorFn:j=>j.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:j}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(ds,{text:j.gene??"–",query:r})}),f.jsx("span",{className:"vt-sub mono",children:j.left_chrom&&j.left_pos!==null&&j.right_pos!==null?`${Fr(j.left_chrom,j.left_pos)}–${j.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:j=>j.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:j}})=>f.jsx("span",{className:"mono",children:ON(j.length)})},...M,...R]:[N,{id:"left",header:"Left",accessorFn:j=>j.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:j}})=>f.jsx(My,{gene:j.left_gene,chrom:j.left_chrom,pos:j.left_pos,loc:j.left_loc,query:r})},{id:"right",header:"Right",accessorFn:j=>j.right_gene??"",cell:({row:{original:j}})=>f.jsx(My,{gene:j.right_gene,chrom:j.right_chrom,pos:j.right_pos,loc:j.right_loc,query:r})},...M,...R]},[n,x,r]),b=ox({data:s,columns:v,getRowId:N=>`${n}-${N.row}`,getCoreRowModel:ix(),getSortedRowModel:eN(),getExpandedRowModel:rx(),getRowCanExpand:()=>!0,state:{expanded:d,sorting:m},onExpandedChange:h,onSortingChange:p}),w=b.getVisibleLeafColumns().length,C=n==="onco"?kN:cx;return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:y,className:"vt-scroll vt-viewport",style:{"--row-h":`${C}px`},children:f.jsxs("table",{className:"vt",children:[f.jsx("thead",{children:b.getHeaderGroups().map(N=>f.jsx("tr",{children:N.headers.map(M=>{const R=M.column.columnDef.meta,j=M.column.getIsSorted();return f.jsx("th",{className:R==null?void 0:R.className,"aria-sort":j?j==="desc"?"descending":"ascending":void 0,children:M.column.getCanSort()?f.jsx(QN,{label:String(M.column.columnDef.header),sorted:j,onClick:M.column.getToggleSortingHandler()}):Vu(M.column.columnDef.header,M.getContext())},M.id)})},N.id))}),f.jsx(fx,{items:b.getRowModel().rows,scrollRef:y,columnCount:w,rowHeight:C,getKey:N=>N.id,render:N=>f.jsxs(f.Fragment,{children:[f.jsx("tr",{className:"vt-row","data-expanded":N.getIsExpanded(),onClick:()=>N.toggleExpanded(),children:N.getVisibleCells().map(M=>{var R;return f.jsx("td",{className:(R=M.column.columnDef.meta)==null?void 0:R.className,children:Vu(M.column.columnDef.cell,M.getContext())},M.id)})}),N.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:w,children:f.jsx(YN,{row:N.original,onLocate:u})})})]})})]})}),f.jsx(Wu,{shown:s.length,total:i,noun:["row","rows"]})]})}const _r=176,sh=34,ih=7,rh=22,Tu=30,IN={deletion:"Del","tandem-duplication":"Dup",inversion:"Inv",translocation:"Tra"};function XN(n,s){return[cm[n],UN[n],IN[n]].find(r=>Sa(r,12)+8<=s)??""}function KN(n,s,i,r,u){const d=Math.min(u,i/2,r);return`M${n},${s+r} V${s+d} Q${n},${s} ${n+d},${s} H${n+i-d} Q${n+i},${s} ${n+i},${s+d} V${s+r} Z`}function ZN({categories:n,total:s,litClass:i}){const[r,u]=Pr(),d=E.useId(),[h,m]=E.useState(null),p=FN(n),y=Math.max(0,...n.map(k=>k.count)),x=Xj(y,3),v=x[x.length-1],b=n.length,w=(p.length-1)*ih,C=n.some(k=>k.clustered)&&n.some(k=>!k.clustered),N=Math.max((u-Tu-6-w-(C?rh-ih:0))/b,4),M=Math.min(26,N*.64),R=[],j=[];let F=Tu;p.forEach((k,ne)=>{ne>0&&(F+=p[ne-1].clustered!==k.clustered?rh:ih);const ie=F;for(let ee=k.start;ee<=k.end;ee++)R[ee]=F+(N-M)/2,F+=N;const Ce=j.find(ee=>ee.clustered===k.clustered&&ee.x1>=ie-rh-1),X=n.slice(k.start,k.end+1).reduce((ee,P)=>ee+P.count,0);Ce?(Ce.x1=F,Ce.count+=X):j.push({clustered:k.clustered,x0:ie,x1:F,count:X})});const T=k=>sh+_r-k/v*_r,H=sh+_r,D=k=>h!==null?k===h:i?n[k].sv_class===i:!0,z=h===null?null:n[h],Y=z&&s?Math.round(z.count/s*100):0,te=H+62;return f.jsxs("div",{ref:r,className:"rs","data-lit":h!==null||i?"":void 0,children:[f.jsxs("svg",{width:u,height:te,role:"img","aria-label":`Rearrangement signatures: ${n.filter(k=>k.count>0).map(k=>`${k.category} ${k.count}`).join(", ")}`,children:[f.jsx("defs",{children:Object.keys(Wa).map(k=>f.jsxs("linearGradient",{id:`${d}-${k}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:Wa[k]}}),f.jsx("stop",{offset:"1",style:{stopColor:Wa[k]},stopOpacity:.72})]},k))}),j.map(k=>f.jsxs("g",{children:[C&&k.clustered&&f.jsx("rect",{x:k.x0-6,y:0,width:k.x1-k.x0+12,height:H+56,rx:14,className:"rs-zone"}),C&&f.jsxs("text",{x:k.x0,y:17,className:"rs-zone-name",children:[k.clustered?"Clustered":"Dispersed",f.jsxs("tspan",{className:"rs-zone-n",children:[" ",k.count.toLocaleString("en-US")]})]})]},k.clustered?"c":"d")),x.map(k=>f.jsxs("g",{children:[f.jsx("line",{x1:Tu-4,x2:u,y1:T(k),y2:T(k),className:k===0?"rs-base":"rs-grid"}),f.jsx("text",{x:Tu-10,y:T(k)+4,textAnchor:"end",className:"rs-tick",children:k.toLocaleString("en-US")})]},k)),n.map((k,ne)=>{const ie=k.count/v*_r,Ce=D(ne);return f.jsxs("g",{className:"rs-bar","data-off":Ce?void 0:"",children:[k.count>0?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:KN(R[ne],T(k.count),M,ie,6),fill:`url(#${d}-${k.sv_class})`,fillOpacity:k.clustered?.5:1}),f.jsx("text",{x:R[ne]+M/2,y:T(k.count)-7,textAnchor:"middle",className:"rs-count",children:k.count.toLocaleString("en-US")})]}):f.jsx("rect",{x:R[ne],y:H-3,width:M,height:3,rx:1.5,style:{fill:Wa[k.sv_class]},fillOpacity:.28}),k.size&&N>=26&&f.jsx("text",{x:R[ne]+M/2,y:H+16,textAnchor:"middle",className:"rs-size",children:$N(k)}),f.jsx("rect",{x:R[ne]-(N-M)/2,y:sh-8,width:N,height:_r+30,fill:"transparent",tabIndex:0,"aria-label":`${_y(k)}: ${k.count}`,onMouseEnter:()=>m(ne),onMouseLeave:()=>m(null),onFocus:()=>m(ne),onBlur:()=>m(null)})]},k.category)}),p.map(k=>{const ne=R[k.start],ie=R[k.end]+M,Ce=XN(k.sv_class,ie-ne+(N-M));return f.jsxs("g",{className:"rs-class","data-off":i&&i!==k.sv_class?"":void 0,children:[f.jsx("line",{x1:ne,x2:ie,y1:H+26,y2:H+26,style:{stroke:Wa[k.sv_class]},className:"rs-bracket"}),f.jsx("text",{x:(ne+ie)/2,y:H+44,textAnchor:"middle",className:"rs-class-name",children:Ce})]},`${k.clustered}-${k.sv_class}`)})]}),z&&h!==null&&f.jsxs(Ni,{x:R[h]+M/2,y:Math.max(T(z.count)-8,40),width:u,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:Wa[z.sv_class],opacity:z.clustered?.5:1},"aria-hidden":!0}),_y(z)]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Rearrangements"}),f.jsx("b",{children:z.count.toLocaleString("en-US")})]}),s>0&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Of all of them"}),f.jsxs("b",{children:[Y===0&&z.count>0?"<1":Y,"%"]})]})]})]})}function mx(n,s,i){return`${n.toLocaleString("en-US")} ${n===1?s:i}`}function PN({categories:n,total:s}){const[i,r]=E.useState(null),u=BN(n);return f.jsxs("div",{className:"sv-sigs",children:[f.jsxs("div",{className:"sv-sigs-head",children:[f.jsxs("h3",{className:"sv-h",children:["Rearrangement signatures",f.jsx("span",{className:"sv-h-n",children:mx(s,"rearrangement","rearrangements")})]}),f.jsxs("ul",{className:"sv-sigs-key","aria-label":"Classes",onMouseLeave:()=>r(null),children:[u.map(({sv_class:d,count:h})=>f.jsxs("li",{"data-on":i===d||void 0,onMouseEnter:()=>r(d),children:[f.jsx("span",{className:"sv-swatch",style:{background:Wa[d]},"aria-hidden":!0}),cm[d],f.jsx("span",{className:"sv-key-n",children:h.toLocaleString("en-US")})]},d)),f.jsx("li",{className:"sv-sigs-note",children:"Lighter bars: clustered"})]})]}),f.jsx("div",{className:"sv-sigs-plot",children:f.jsx(ZN,{categories:n,total:s,litClass:i})})]})}function JN({data:n,query:s,onQuery:i,onLocate:r}){const[u,d]=E.useState([]),h=w=>d(C=>C.includes(w)?C.filter(N=>N!==w):[...C,w]),m=w=>w.filter(C=>LN(C,s)),p=w=>u.length?w.filter(C=>C.role&&u.includes(C.role)):w,y=[...n.onco,...n.whole_gene],x=[...m(n.onco),...m(n.whole_gene)],v=p(m(n.onco)),b=p(m(n.whole_gene));return y.length===0?f.jsx("p",{className:"sv-empty",children:"No rearrangements with breakpoints in oncogenes or tumour suppressors."}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"tbar",children:[x.length>0&&f.jsx(qN,{rows:x,shown:u,onToggle:h}),f.jsx($u,{value:s,onChange:i,label:"Search structural variants",placeholder:"Search gene, caller or locus",shortcut:!1})]}),x.length===0&&f.jsxs("div",{className:"vt-empty sv-empty",children:["No rows match this search.",f.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i(""),children:"Clear the search"})]}),v.length>0&&f.jsxs("section",{className:"sv-table","aria-label":"Rearranged oncogenes and tumour suppressors",children:[f.jsx("h3",{className:"sv-h",children:"Rearranged oncogenes and tumour suppressors"}),f.jsx(Ry,{kind:"onco",rows:v,total:n.onco.length,query:s,onLocate:r})]}),b.length>0&&f.jsxs("section",{className:"sv-table","aria-label":"Whole-gene rearrangements",children:[f.jsx("h3",{className:"sv-h",children:"Whole-gene rearrangements"}),f.jsx(Ry,{kind:"whole_gene",rows:b,total:n.whole_gene.length,query:s,onLocate:r})]})]})}const WN=E.forwardRef(function({envelope:s,loading:i,picked:r,onLocate:u},d){const h=(s==null?void 0:s.status)==="ok"?s.data:null,[m,p]=E.useState("");return f.jsx(Ku,{ref:d,title:"Structural variants",subtitle:h?mx(h.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"structuralVariants",className:"svs",expandable:!0,children:f.jsx(Zr,{label:"structural variants",envelope:s,loading:i,skeletonHeight:220,children:y=>f.jsxs("div",{className:"sv-body",children:[f.jsx(JN,{data:y,query:m,onQuery:p,onLocate:u}),y.signatures&&f.jsx(PN,{categories:y.signatures.categories,total:y.signatures.total})]})})})}),e_={"del.mh.prop":{short:"Del. MH",long:"Deletions with microhomology (share of deletions)"},SNV3:{short:"SBS3",long:"Substitution signature 3"},SV3:{short:"RS3",long:"Rearrangement signature 3"},SV5:{short:"RS5",long:"Rearrangement signature 5"},hrd:{short:"HRD index",long:"HRD index (loss of heterozygosity, telomeric imbalance, large-scale transitions)"},SNV8:{short:"SBS8",long:"Substitution signature 8"}};function Ty(n,s="short"){var i;return((i=e_[n])==null?void 0:i[s])??n}const oh=8;function t_(n){const s=n.find(u=>u.group==="sample")??n[0],i=[...(s==null?void 0:s.signatures)??[]].sort((u,d)=>(d.proportion??0)-(u.proportion??0)).map(u=>u.signature),r=i.length>oh?oh-1:oh;return{shown:i.slice(0,r),other:i.slice(r)}}function Ay(n){return n.group==="sample"?"This tumour":`${n.label.replace(/\(\d+\)$/,"")} cohort${n.cohort_n?`, n = ${n.cohort_n}`:""}`}const Oy=["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],n_="#a3a3ab";function l_(n){const{shown:s,other:i}=t_(n),r=n.find(p=>p.group==="sample")??n[0],u=n.find(p=>p.group==="cohort")??null,d=(p,y,x)=>p?p.signatures.filter(v=>y.includes(v.signature)).reduce((v,b)=>v+(b[x]??0),0):null,h=(p,y,x)=>{var v,b;return{name:p,members:y,colour:x,share:d(r,y,"proportion")??0,cohortShare:d(u,y,"proportion"),count:d(r,y,"count")??0,cohortCount:d(u,y,"count"),aetiology:y.length===1?((v=r==null?void 0:r.signatures.find(w=>w.signature===p))==null?void 0:v.aetiology)??((b=u==null?void 0:u.signatures.find(w=>w.signature===p))==null?void 0:b.aetiology)??null:`${y.length} smaller signatures`}},m=s.map((p,y)=>h(p,[p],Oy[y%Oy.length]));return i.length&&m.push(h("Other",i,n_)),m}function ua(n){return n.cohortShare===null?null:(n.share-n.cohortShare)*100}function zy(n,s,i){const r=Math.max(s-i*Math.max(n.length-1,0),0),u=n.reduce((h,m)=>h+m,0)||1;let d=0;return n.map(h=>{const m=h/u*r,p={y0:d,y1:d+m};return d+=m+i,p})}function a_(n,s,i,r){const u=(n+i)/2,d=h=>h.toFixed(2);return`M${d(n)},${d(s.y0)} C${d(u)},${d(s.y0)} ${d(u)},${d(r.y0)} ${d(i)},${d(r.y0)} L${d(i)},${d(r.y1)} C${d(u)},${d(r.y1)} ${d(u)},${d(s.y1)} ${d(n)},${d(s.y1)} Z`}function Lr(n,s){const i=(n.length-1)*s,r=Math.floor(i),u=Math.ceil(i);return n[r]+(n[u]-n[r])*(i-r)}function gx(n){var u;const s=n.cohort.filter(d=>d!==null&&Number.isFinite(d)).sort((d,h)=>d-h);if(s.length===0)return null;const i=((u=n.sample)==null?void 0:u.value)??null,r=[...s];if(i!==null){const d=r.indexOf(i);d>=0&&r.splice(d,1)}return{values:s,q1:Lr(s,.25),median:Lr(s,.5),q3:Lr(s,.75),tumour:i,above:i===null?null:r.filter(d=>d<i).length,others:r.length}}function s_(n,s=64){const i=n.length,r=n.reduce((y,x)=>y+x,0)/i,u=Math.sqrt(n.reduce((y,x)=>y+(x-r)**2,0)/Math.max(i-1,1)),d=Math.min(u,(Lr(n,.75)-Lr(n,.25))/1.34)||u||.1,h=Math.max(.9*d*i**-.2,.02),m=Array.from({length:s+1},(y,x)=>{const v=x/s;return{x:v,y:n.reduce((b,w)=>b+Math.exp(-.5*((v-w)/h)**2),0)}}),p=Math.max(...m.map(y=>y.y))||1;return m.map(y=>({x:y.x,y:y.y/p}))}function i_(n,s){const i=[],r=new Array(n.length).fill(0);return[...n.keys()].sort((u,d)=>n[u]-n[d]).forEach(u=>{let d=0;for(;i.some(h=>h.level===d&&Math.abs(h.x-n[u])<s);)d+=1;i.push({x:n[u],level:d}),r[u]=d}),r}function uh(n){return n.above===null||n.others===0?"":n.above===n.others?n.others===1?"Above the other sample":"Highest in the cohort":n.above===0?"Lowest in the cohort":`Above ${n.above} of ${n.others} others`}function ui(n,s,i,r){const u=Math.PI*(1-Math.min(Math.max(r,0),1));return{x:n+i*Math.cos(u),y:s-i*Math.sin(u)}}const ca=n=>n==null?"–":n.toFixed(2),r_=8,o_=250,ke={w:232,h:148,cx:116,cy:122,r:92};function ch(n,s){const i=ui(ke.cx,ke.cy,ke.r,n),r=ui(ke.cx,ke.cy,ke.r,s);return`M${i.x.toFixed(2)},${i.y.toFixed(2)} A${ke.r},${ke.r} 0 0 1 ${r.x.toFixed(2)},${r.y.toFixed(2)}`}function u_({score:n}){const s=n.value===null?null:Math.min(Math.max(n.value,0),1),i=n.rating==="HIGH",r=n.threshold,u=r===null?null:[ui(ke.cx,ke.cy,ke.r-14,r),ui(ke.cx,ke.cy,ke.r+14,r),ui(ke.cx,ke.cy,ke.r+27,r)],d=s===null?null:ui(ke.cx,ke.cy,ke.r,s);return f.jsxs("div",{className:"hrd-score","data-high":i||void 0,children:[f.jsxs("div",{className:"hrd-score-head",children:[f.jsx("span",{className:"hrd-name",children:n.name}),n.rating&&f.jsx("span",{className:`sc-pill ${i?"p-warn":"p-neu"}`,children:n.rating})]}),f.jsxs("svg",{width:ke.w,height:ke.h,viewBox:`0 0 ${ke.w} ${ke.h}`,role:"img","aria-label":`${n.name} ${s===null?"has no score":`scores ${ca(n.value)}`}${n.rating?`, rated ${n.rating}`:""}`,className:"hrd-gauge",children:[f.jsx("path",{d:ch(0,1),pathLength:1,className:"hrd-track"}),r!==null&&f.jsx("path",{d:ch(r,1),pathLength:1,className:"hrd-zone"}),s!==null&&f.jsx("path",{d:ch(0,1),pathLength:1,className:"hrd-fill",style:{"--v":s}}),u&&f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:u[0].x,y1:u[0].y,x2:u[1].x,y2:u[1].y,className:"hrd-tick"}),f.jsx("text",{x:u[2].x,y:u[2].y+4,textAnchor:"middle",className:"hrd-tick-label",children:r})]}),d&&f.jsx("circle",{cx:d.x,cy:d.y,r:8.5,className:"hrd-end"}),f.jsx("text",{x:ke.cx,y:ke.cy-10,textAnchor:"middle",className:"hrd-num",children:s===null?"–":ca(n.value)}),f.jsx("text",{x:ke.cx-ke.r,y:ke.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"0"}),f.jsx("text",{x:ke.cx+ke.r,y:ke.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"1"})]}),n.threshold!==null&&f.jsxs("span",{className:"hrd-rule",children:["High at ",n.threshold," and above"]})]})}function c_(n){const s=n.filter(i=>i.stats&&i.stats.tumour!==null);return{above:s.filter(i=>i.stats.tumour>i.stats.median).length,of:s.length}}const f_="var(--font)";function d_({features:n}){var F;const[s,i]=Pr(720),[r,u]=E.useState(null),d=n.map(T=>({feature:T,stats:gx(T)})),h=i<640,m=h?0:116,p=h?0:168,y=m+10,x=i-p-14,v=T=>y+T*(x-y),b=h?28:0,w=h?100:70,C=b+38,N=30,M=d.length*w+14,R=M+22,j=r===null?null:d[r];return f.jsxs("div",{ref:s,className:"clouds",onMouseLeave:()=>u(null),children:[f.jsxs("svg",{width:i,height:R,role:"img","aria-label":"HRDetect features against the cohort",style:{fontFamily:f_},children:[[0,.25,.5,.75,1].map(T=>f.jsx("line",{x1:v(T),x2:v(T),y1:0,y2:M,className:"cloud-grid","data-major":T===0||T===1||void 0},T)),d.map(({feature:T,stats:H},D)=>{var Ce;const z=D*w,Y=Ty(T.feature),te=H&&H.values.length<=o_?H.values:[],k=i_(te.map(v),7.5),ne=H&&H.values.length>=r_?s_(H.values):null,ie=H&&H.tumour!==null?v(H.tumour):null;return f.jsxs("g",{transform:`translate(0 ${z})`,className:"cloud-row","data-on":r===D||void 0,onMouseEnter:()=>u(D),children:[f.jsx("rect",{x:0,y:2,width:i,height:w-4,rx:12,className:"cloud-hit"}),H&&f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:v(H.q1),y:b+4,width:Math.max(v(H.q3)-v(H.q1),2),height:w-b-10,rx:8,className:"cloud-iqr"}),f.jsx("line",{x1:v(H.median),x2:v(H.median),y1:b+10,y2:w-14,className:"cloud-median"}),ne&&f.jsxs(f.Fragment,{children:[f.jsx("path",{d:`M${v(0)},${C} ${ne.map(X=>`L${v(X.x).toFixed(1)},${(C-X.y*N).toFixed(1)}`).join(" ")} L${v(1)},${C} Z`,className:"cloud-area"}),f.jsx("path",{d:ne.map((X,ee)=>`${ee?"L":"M"}${v(X.x).toFixed(1)},${(C-X.y*N).toFixed(1)}`).join(" "),className:"cloud-line"})]}),te.map((X,ee)=>f.jsx("circle",{cx:v(X),cy:C+11+Math.min(k[ee],2)*7,r:3,className:"cloud-dot"},ee)),ie!==null&&f.jsxs("g",{className:"cloud-pin",transform:`translate(${ie} 0)`,children:[f.jsx("line",{y1:b+8,y2:C,className:"cloud-stem"}),f.jsx("circle",{cy:C,r:8,className:"cloud-pin-dot"})]})]}),f.jsx("text",{x:h?4:6,y:h?18:C-6,className:"cloud-name",children:Y}),!h&&f.jsxs("text",{x:6,y:C+10,className:"cloud-raw",children:["raw ",ca((Ce=T.sample)==null?void 0:Ce.raw)]}),H&&f.jsx("text",{x:i-4,y:h?18:C-6,textAnchor:"end",className:"cloud-rank",children:uh(H)}),!h&&H&&f.jsxs("text",{x:i-4,y:C+10,textAnchor:"end",className:"cloud-raw",children:["of ",H.values.length," in the cohort"]})]},T.feature)}),f.jsxs("g",{transform:`translate(0 ${M})`,className:"cloud-axis",children:[f.jsx("text",{x:v(0),y:12,textAnchor:"start",children:"0 · cohort lowest"}),f.jsx("text",{x:v(.5),y:12,textAnchor:"middle",children:"0.5"}),f.jsx("text",{x:v(1),y:12,textAnchor:"end",children:"cohort highest · 1"})]})]}),j&&r!==null&&j.stats&&f.jsxs(Ni,{x:j.stats.tumour!==null?v(j.stats.tumour):v(j.stats.median),y:r*w+C,width:i,children:[f.jsx("span",{className:"ctip-title",children:Ty(j.feature.feature,"long")}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[ca((F=j.feature.sample)==null?void 0:F.raw)," ",f.jsxs("i",{children:["scaled ",ca(j.stats.tumour)]})]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort median"}),f.jsx("b",{children:ca(j.stats.median)})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Middle half"}),f.jsxs("b",{children:[ca(j.stats.q1),"–",ca(j.stats.q3)]})]}),uh(j.stats)&&f.jsx("span",{className:"ctip-note",children:uh(j.stats)})]})]})}const Mr=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,Rr=n=>Math.round(n).toLocaleString("en-US"),h_=n=>`${n>=0?"+":"−"}${Math.abs(n).toFixed(Math.abs(n)>=10?0:1)}`,Dy=3,ii=26,ri=52;function m_({groups:n,bands:s,lit:i,onLight:r}){const[u,d]=Pr(),h=n.find(D=>D.group==="sample")??n[0],m=n.find(D=>D.group==="cohort")??null,p=m!==null,y=d>=440,x=y?d>=620?118:92:0,v=p?330:230,b=zy(s.map(D=>D.share),v,Dy),w=p?zy(s.map(D=>D.cohortShare??0),v,Dy):[],C=p?x:0,N=d-x-ii,M=C+ii,R=N,j=s.find(D=>D.name===i)??null,F=j?s.indexOf(j):-1,T=F<0?0:ri+((b[F].y0+b[F].y1)/2+(p?(w[F].y0+w[F].y1)/2:(b[F].y0+b[F].y1)/2))/2,H=(D,z,Y,te,k,ne)=>{const ie=D.y1-D.y0;if(!y||ie<17)return null;const Ce=ri+(D.y0+D.y1)/2,X=ie>=36;return f.jsxs("text",{x:k,y:Ce,textAnchor:ne,className:"flow-label",children:[f.jsxs("tspan",{x:k,dy:X?"-0.35em":"0.35em",className:"flow-name",children:[z.name,!X&&f.jsxs("tspan",{className:"flow-share",children:[" ",Mr(Y)]})]}),X&&f.jsxs("tspan",{x:k,dy:"1.35em",className:"flow-share",children:[Mr(Y),te]})]})};return f.jsxs("div",{ref:u,className:"flow","data-lit":i??void 0,children:[f.jsxs("svg",{width:d,height:ri+v+4,role:"img","aria-label":"Signature shares, tumour against cohort",children:[f.jsxs("g",{className:"flow-head",children:[f.jsx("text",{x:0,y:16,className:"flow-col",children:Ay(h)}),f.jsxs("text",{x:0,y:34,className:"flow-sub",children:[Rr(h.total)," mutations"]}),m&&f.jsxs(f.Fragment,{children:[f.jsx("text",{x:d,y:16,textAnchor:"end",className:"flow-col",children:Ay(m)}),f.jsxs("text",{x:d,y:34,textAnchor:"end",className:"flow-sub",children:["about ",Rr(m.total)," each, on average"]})]})]}),p&&f.jsx("g",{className:"flow-ribs",transform:`translate(0 ${ri})`,children:s.map((D,z)=>f.jsx("path",{d:a_(M,b[z],R,w[z]),fill:D.colour,className:"flow-rib","data-on":i===D.name||void 0,onMouseEnter:()=>r(D.name),onMouseLeave:()=>r(null)},D.name))}),s.map((D,z)=>{const Y=i===D.name||void 0,te=(k,ne)=>k.y1-k.y0>.4&&f.jsx("rect",{x:ne,y:ri+k.y0,width:ii,height:k.y1-k.y0,rx:Math.min(5,(k.y1-k.y0)/2),fill:D.colour,className:"flow-seg","data-on":Y,tabIndex:0,"aria-label":`${D.name}, ${Mr(D.share)} of this tumour`,onMouseEnter:()=>r(D.name),onMouseLeave:()=>r(null),onFocus:()=>r(D.name),onBlur:()=>r(null)});return f.jsxs("g",{className:"flow-band","data-on":Y,children:[te(b[z],C),p&&te(w[z],N),H(b[z],D,D.share,D.count?` · ${Rr(D.count)}`:"",p?C-10:C+ii+10,p?"end":"start"),p&&H(w[z],D,D.cohortShare??0,"",N+ii+10,"start")]},D.name)}),p&&d>=520&&s.map((D,z)=>{const Y=ua(D),te=b[z],k=w[z];if(Y===null||Math.abs(Y)<5||Math.min(te.y1-te.y0,k.y1-k.y0)<22)return null;const ne=(M+R)/2,ie=ri+(te.y0+te.y1+k.y0+k.y1)/4;return f.jsxs("g",{transform:`translate(${ne} ${ie})`,className:"flow-delta","data-on":i===D.name||void 0,children:[f.jsx("rect",{x:-30,y:-10,width:60,height:20,rx:10}),f.jsxs("text",{y:4,textAnchor:"middle",children:[h_(Y)," pts"]})]},D.name)})]}),j&&f.jsxs(Ni,{x:p?d/2:C+ii+x+20,y:T,width:d,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:j.colour},"aria-hidden":!0}),j.name]}),j.aetiology&&f.jsx("span",{className:"ctip-sub",children:j.aetiology}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[Mr(j.share)," ",f.jsxs("i",{children:[Rr(j.count)," mutations"]})]})]}),j.cohortShare!==null&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort"}),f.jsxs("b",{children:[Mr(j.cohortShare)," ",f.jsx("i",{children:j.cohortCount!==null?`about ${Rr(j.cohortCount)} each`:""})]})]}),ua(j)!==null&&f.jsx("span",{className:"ctip-note",children:Math.abs(ua(j))<1?"About the same as its cohort":`${Math.abs(ua(j)).toFixed(Math.abs(ua(j))>=10?0:1)} points ${ua(j)>0?"above":"below"} its cohort`})]})]})}const Hy=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,px=n=>Math.round(n).toLocaleString("en-US");function g_({points:n,reach:s}){if(n===null)return null;const i=Math.min(Math.abs(n)/s,1)*100;return f.jsx("span",{className:"lead","aria-hidden":!0,children:f.jsx("span",{className:"lead-bar","data-up":n>=0||void 0,style:{width:`${Math.max(i,n===0?0:3)}%`}})})}function p_({groups:n}){const[s,i]=E.useState(null),r=E.useMemo(()=>l_(n),[n]),u=n.find(h=>h.group==="cohort"),d=Math.max(10,...r.map(h=>Math.abs(ua(h)??0)));return f.jsxs("section",{className:"sig-section","aria-label":"Mutational signatures",children:[f.jsx("h3",{className:"sv-h",children:"Mutational signatures"}),f.jsxs("div",{className:"sig-grid",children:[f.jsx(m_,{groups:n,bands:r,lit:s,onLight:i}),f.jsxs("div",{className:"sig-tablebox",children:[f.jsxs("table",{className:"sig-table",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:"Signature"}),f.jsx("th",{className:"n",children:"This tumour"}),u&&f.jsx("th",{className:"n",children:"Cohort"}),u&&f.jsx("th",{className:"lead-h",children:"Against cohort"})]})}),f.jsx("tbody",{children:r.map(h=>{const m=ua(h);return f.jsxs("tr",{"data-lit":s===h.name||void 0,onMouseEnter:()=>i(h.name),onMouseLeave:()=>i(null),children:[f.jsxs("td",{children:[f.jsxs("span",{className:"sig-name",title:h.members.length>1?h.members.join(", "):void 0,children:[f.jsx("span",{className:"sv-swatch",style:{background:h.colour},"aria-hidden":!0}),h.name]}),h.aetiology&&f.jsx("span",{className:"sig-aetiology",children:h.aetiology})]}),f.jsxs("td",{className:"n",children:[f.jsx("span",{className:"mono",children:Hy(h.share)}),f.jsx("span",{className:"sig-count",children:px(h.count)})]}),u&&f.jsx("td",{className:"n mono",children:Hy(h.cohortShare??0)}),u&&f.jsx("td",{children:f.jsxs("span",{className:"lead-cell",children:[f.jsx(g_,{points:m,reach:d}),f.jsx("span",{className:"lead-n mono",children:m===null?"":`${m>=0?"+":"−"}${Math.abs(m).toFixed(0)}`})]})})]},h.name)})})]}),f.jsx(Wu,{shown:r.length,total:r.length,noun:["signature","signatures"]})]})]})]})}function v_({hrd:n}){const s=E.useMemo(()=>c_(n.features.map(i=>({feature:i,stats:gx(i)}))),[n.features]);return f.jsxs("section",{className:"sig-section","aria-label":"Homologous recombination deficiency",children:[f.jsx("h3",{className:"sv-h",children:"Homologous recombination deficiency"}),f.jsxs("div",{className:"hrd-body",children:[n.scores.length>0&&f.jsx("div",{className:"hrd-scores",children:n.scores.map(i=>f.jsx(u_,{score:i},i.name))}),n.features.length>0&&f.jsxs("div",{className:"hrd-chart",children:[f.jsxs("div",{className:"sv-sigs-head",children:[f.jsxs("h4",{className:"hrd-sub",children:["HRDetect features against the cohort",n.cohort_n?f.jsxs("span",{className:"sv-h-n",children:["n = ",n.cohort_n]}):null]}),f.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-pin","aria-hidden":!0}),"This tumour"]}),f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-dot","aria-hidden":!0}),"Cohort sample"]}),f.jsxs("li",{children:[f.jsx("span",{className:"hrd-key-band","aria-hidden":!0}),"Middle half of the cohort"]})]})]}),s.of>0&&f.jsxs("p",{className:"hrd-lede",children:["Above the cohort median on ",f.jsx("b",{children:s.above})," of ",s.of," features"]}),f.jsx(d_,{features:n.features})]})]})]})}const y_=E.forwardRef(function({envelope:s,loading:i,picked:r},u){var m;const d=(s==null?void 0:s.status)==="ok"?s.data:null,h=(m=d==null?void 0:d.signatures)==null?void 0:m.find(p=>p.group==="sample");return f.jsx(Ku,{ref:u,title:"Signatures and HRD",subtitle:h?`${px(h.total)} mutations attributed to signatures`:void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"signaturesHrd",className:"sigs",children:f.jsx(Zr,{label:"signatures and HRD",envelope:s,loading:i,skeletonHeight:300,children:p=>f.jsxs("div",{className:"sig-body",children:[p.signatures?f.jsx(p_,{groups:p.signatures}):f.jsx("p",{className:"sv-empty",children:"No signature contributions for this sample."}),p.hrd&&f.jsx(v_,{hrd:p.hrd})]})})})});function x_(n){var r;const s=n.samples.filter(u=>u.category==="TUMOR");return(r=s.find(u=>Object.values(u.datasets??{}).some(d=>Object.values(d).includes("ok")))??s[0]??n.samples[0])==null?void 0:r.id}const S_=[];function b_(n){const s=E.useRef(!1);return E.useEffect(()=>{let i=0;const r=()=>{s.current=!0,window.clearTimeout(i),i=window.setTimeout(()=>s.current=!1,150)};return window.addEventListener("scroll",r,{passive:!0}),()=>{window.removeEventListener("scroll",r),window.clearTimeout(i)}},[]),E.useCallback(i=>{(i===null||!s.current)&&n(i)},[n])}function w_(n){var i,r;const s=(r=(i=n==null?void 0:n.samples.find(u=>{var d;return(d=u.disease)==null?void 0:d.name}))==null?void 0:i.disease)==null?void 0:r.name;return s?s.charAt(0)+s.slice(1).toLowerCase():void 0}function Tr(n,s){const i=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;n==null||n.scrollIntoView({behavior:i?"auto":"smooth",block:s})}const Ly=160;function C_(n,s){const i=E.useRef(n);i.current=n;const r=E.useRef(null),u=E.useRef(null),d=E.useRef(0),h=E.useRef(()=>{}),m=E.useRef(()=>{});E.useEffect(()=>{let x=0;const v=()=>{var H;if(x=0,r.current)return;const M=i.current.filter(([,D])=>D.current).map(([D,z])=>[D,z.current.getBoundingClientRect().top]),R=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),j=Math.max(0,...M.map(([,D])=>D+window.scrollY-R-Ly)),F=Ly+(R>0?j*Math.min(1,window.scrollY/R):0);let T=((H=M[0])==null?void 0:H[0])??null;for(const[D,z]of M)z<=F&&(T=D);s.set(T)},b=()=>{r.current=null,u.current=null,v()};m.current=()=>{u.current=window.scrollY};const w=()=>{if(r.current){u.current===null?(window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)):Math.abs(window.scrollY-u.current)>4&&b();return}x||(x=requestAnimationFrame(v))},C=()=>{r.current&&u.current===null&&(window.clearTimeout(d.current),b())};return h.current=v,v(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),window.addEventListener("wheel",C,{passive:!0}),window.addEventListener("touchstart",C,{passive:!0}),window.addEventListener("keydown",C),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w),window.removeEventListener("wheel",C),window.removeEventListener("touchstart",C),window.removeEventListener("keydown",C),window.clearTimeout(d.current),x&&cancelAnimationFrame(x)}},[]);const p=E.useRef("");return E.useEffect(()=>{const x=n.filter(([,v])=>v.current).map(([v])=>v).join();x!==p.current&&(p.current=x,h.current())}),x=>{r.current=x,u.current=null,s.set(x),window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)}}function j_({held:n,sampleId:s,...i}){const r=Iu(n);return f.jsx($C,{...i,sampleId:r??s})}function E_(){var Z,le,Me,Ve,Fe,Ct,st,et,Yn,Dl,ja,Ea,Jr,Mi,Wr;const{individual:n=""}=Tw(),[s,i]=Pw(),r=s.get("version")??void 0,[u,d]=E.useState(null),[h,m]=E.useState(null),[p,y]=E.useState(fy),[x,v]=E.useState(null),b=b_(v),[w,C]=E.useState(null),N=E.useRef(null),[M,R]=E.useState(null),j=E.useRef(Dr(!0)).current,F=E.useRef(null),T=E.useRef(null),H=E.useRef(null),D=E.useRef(null),z=E.useRef(Dr(null)).current,Y=C_([["overview",T],["copyNumber",N],["mutations",F],["structuralVariants",H],["signatures",D]],z),te=Ky();E.useEffect(()=>{const fe=M;if(!fe||typeof IntersectionObserver>"u")return;const Pe=new IntersectionObserver(([nt])=>j.set(nt.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return Pe.observe(fe),()=>Pe.disconnect()},[M]);const k=E.useCallback(fe=>y(Pe=>({...Pe,...fe})),[]),ne=E.useCallback(fe=>{k({q:JC(fe.chrom,fe.start,fe.end),scope:"all",sort:"position"}),Tr(F.current,"start")},[k]),ie=E.useCallback(fe=>{k({q:fe}),Tr(F.current,"start")},[k]),Ce=E.useCallback(fe=>{C({chrom:fe.chrom,pos:fe.pos,gene:fe.gene,nonce:Date.now()}),Tr(N.current,"center")},[]),X=E.useCallback(fe=>{C({...fe,nonce:Date.now()}),Tr(N.current,"center")},[]),ee=lj(n,r),P=ee.data,J=(P==null?void 0:P.status)==="ok"?P.data??void 0:void 0,ue=s.get("sample")??(J?x_(J):void 0),Ee=J==null?void 0:J.samples.find(fe=>fe.id===ue),je=(Ee==null?void 0:Ee.category)==="TUMOR"?ue:void 0,$e=h??((J==null?void 0:J.mode)==="unmatched"?"vaf":"ccf"),Ie=aj(n,J?ue:void 0,r),We=sj(n,r),A=ij(n,je,r),V=rj(n,je,$e,p.ffpe,r),W=cj(n,je,p,r),se=(Z=W.data)==null?void 0:Z.pages[0],he=E.useMemo(()=>{var fe;return((fe=W.data)==null?void 0:fe.pages.flatMap(Pe=>Pe.status==="ok"&&Pe.data?Pe.data.rows:[]))??[]},[W.data]),{fetchNextPage:ye}=W,be=E.useCallback(()=>void ye(),[ye]),re=uj(n,je,r),me=oj(n,je,r),rt=(Me=(le=We.data)==null?void 0:le.data)==null?void 0:Me.samples.find(fe=>fe.sample===ue),Bt=E.useMemo(()=>(rt==null?void 0:rt.drivers)??S_,[rt]),zn=E.useMemo(()=>x?{chrom:x.chrom,pos:x.pos,gene:x.gene}:w,[x,w]),Nt=E.useRef(null),ot=E.useRef(Dr(null)).current,Ge=(fe,Pe)=>{var nt;(nt=Nt.current)==null||nt.toggleAttribute("data-gliding",fe),Nt.current&&(Nt.current.style.minHeight=fe&&Pe?`${Pe}px`:"")},pt=E.useRef(null);E.useEffect(()=>()=>{var fe;return(fe=pt.current)==null?void 0:fe.call(pt)},[]);const cl=fe=>{var _a,Ma;if(fe===ue)return;(_a=pt.current)==null||_a.call(pt);const Pe=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches,nt=50;if(Pe||window.scrollY<=nt)return window.scrollTo({top:0,behavior:"auto"}),At("sample",fe);const bn=window.scrollY,Xt=Math.min(520,240+bn*.12),ec=performance.now();Ge(!0,document.documentElement.scrollHeight-(((Ma=Nt.current)==null?void 0:Ma.getBoundingClientRect().top)??0)-bn),ot.set(ue??null),Y("overview"),E.startTransition(()=>At("sample",fe));let Ri=0;function In(){cancelAnimationFrame(Ri),window.removeEventListener("wheel",In),window.removeEventListener("touchstart",In),window.removeEventListener("keydown",In),pt.current=null,ot.set(null),Ge(!1)}const Na=dl=>{const Ra=Math.min(1,(dl-ec)/Xt),Hl=bn*(1-Ra)**3;window.scrollTo({top:Hl,behavior:"instant"}),Hl<=nt&&ot.set(null),Ra<1?Ri=requestAnimationFrame(Na):In()};window.addEventListener("wheel",In,{passive:!0}),window.addEventListener("touchstart",In,{passive:!0}),window.addEventListener("keydown",In),pt.current=In,Ri=requestAnimationFrame(Na)},At=(fe,Pe)=>{const nt=new URLSearchParams(s);nt.set(fe,Pe),i(nt,{replace:!1}),d(null),y(fy()),v(null),C(null)},nn=[ee,Ie,We,A,V,W,re,me].map(fe=>fe.error);if(nn.some(fe=>fe instanceof Xu))return f.jsx("div",{className:`wgts ${Gn.theme}`,children:f.jsx("main",{className:"page",children:f.jsx(Dj,{onSignedIn:()=>te.invalidateQueries()})})});const qn=nn.find(fe=>fe instanceof U1),ut=Ee&&J?lm(Ee.id,J.individual.id):"",fl=new Set(J?je?["overview","copyNumber","mutations","structuralVariants","signatures"]:["overview"]:[]),It=fe=>{if(Y(fe),fe==="overview"){const nt=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:nt?"auto":"smooth"});return}const Pe={copyNumber:N,mutations:F,structuralVariants:H,signatures:D}[fe];Tr((Pe==null?void 0:Pe.current)??null,"start")},kt=J&&ue&&J.analyses[ue]||[],zl=(J==null?void 0:J.failures.filter(fe=>fe.sample===ue))??[],Gt=new Set(kt.map(Ft)),Qn=new Set,ln=fe=>fe==null?void 0:fe.forEach(Pe=>Gt.has(Ft(Pe))&&Qn.add(Ft(Pe)));for(const fe of((Fe=(Ve=Ie.data)==null?void 0:Ve.data)==null?void 0:Fe.metrics)??[])Uh.includes(fe.key)&&ln(fe.sources);ln((Ct=We.data)==null?void 0:Ct.lineage),ln((st=A.data)==null?void 0:st.lineage),ln((et=V.data)==null?void 0:et.lineage),ln(se==null?void 0:se.lineage),ln((Yn=re.data)==null?void 0:Yn.lineage),ln((Dl=me.data)==null?void 0:Dl.lineage);for(const fe of kt)fe.state==="failed"&&zl.length>0&&Qn.add(Ft(fe));return f.jsxs("div",{className:`wgts ${Gn.theme}`,children:[f.jsx(yj,{analyses:kt,onPage:Qn,sampleLabel:ut,picked:u,onPick:d,sections:fl,activeStore:z,onSection:It}),f.jsxs("div",{ref:Nt,className:"page",children:[f.jsx(L1,{individualId:n,subtitle:[w_(J),(ja=J==null?void 0:J.individual.sex)==null?void 0:ja.toLowerCase(),(J==null?void 0:J.mode)==="unmatched"?"tumour only":void 0].filter(Boolean).join(", ")||void 0,patientIcon:J?f.jsx(DC,{sex:J.individual.sex}):void 0,report:J?f.jsx(_j,{data:J,onVersion:fe=>At("version",fe)}):void 0,compact:J&&ue?f.jsx(FC,{data:J,sampleId:ue,fingerprint:((Ea=We.data)==null?void 0:Ea.data)??void 0,onSample:cl}):void 0,headerInView:j}),f.jsxs("main",{className:"flex flex-1 flex-col",children:[J&&ue&&f.jsx("div",{className:"px-8 pt-1",children:f.jsx("div",{ref:R,children:f.jsx(j_,{held:ot,data:J,sampleId:ue,fingerprint:((Jr=We.data)==null?void 0:Jr.data)??void 0,onSample:fe=>At("sample",fe)})})}),f.jsxs("div",{className:"sheet",children:[ee.isPending&&f.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),qn&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"error",data:null,lineage:[],warnings:[qn.message]}})}),ee.isError&&!qn&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"error",data:null,lineage:[],warnings:[ee.error.message]}})}),P&&P.status!=="ok"&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:P})}),(P==null?void 0:P.status)==="ok"&&P.warnings.length>0&&f.jsx("div",{className:"sc-card px-6 py-4",children:f.jsx(es,{envelope:{...P,status:"missing"}})}),J&&ue&&f.jsxs(f.Fragment,{children:[f.jsx(zj,{sampleLabel:ut,failures:zl,analyses:kt}),je?f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:T,className:"page-section",children:f.jsx(Oj,{sampleLabel:`${ut} tumour`,fingerprint:rt,metrics:Ie.data,picked:u,lineage:K1((Mi=Ie.data)==null?void 0:Mi.lineage,(Wr=We.data)==null?void 0:Wr.lineage)})}),f.jsx("div",{ref:N,className:"page-section",children:f.jsx(tE,{envelope:A.data,loading:A.isPending,picked:u,sampleLabel:ut,drivers:Bt,focus:zn,locate:w,onSegment:ne,onGene:ie})}),f.jsx(MN,{ref:F,variants:se,rows:he,hasMore:W.hasNextPage,loadingMore:W.isFetchingNextPage,onMore:be,variantsLoading:W.isPending,variantsFetching:W.isFetching&&W.isPlaceholderData,density:V.data,densityLoading:V.isPending,picked:u,measure:$e,onMeasure:fe=>{m(fe),p.range&&p.range.measure!==fe&&k({range:null})},table:p,onTable:k,hovered:x,onHover:b,onLocate:Ce,showCcf:J.mode!=="unmatched"}),f.jsx(WN,{ref:H,envelope:re.data,loading:re.isPending,picked:u,onLocate:X}),f.jsx(y_,{ref:D,envelope:me.data,loading:me.isPending,picked:u})]}):f.jsx("div",{ref:T,className:"sc-card px-6 py-5",children:f.jsx(es,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${ut} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})]})}const fh=200,vx="wgts-picker-scope";function N_(){try{const n=localStorage.getItem(vx);return n&&/^\d+$/.test(n)?Number(n):"all"}catch{return"all"}}function __(n,s){const i=s.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(r=>{const u=`${r.individual} ${r.diseases.join(" ")} ${r.report_version}`.toLowerCase();return i.every(d=>u.includes(d))})}function M_(n,s){const i=s.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(r=>{const u=`${r.title} ${r.short_title??""} ${r.description??""}`.toLowerCase();return i.every(d=>u.includes(d))})}const dh=n=>n.toLocaleString("en-US");function R_(){return Iu(sm)?f.jsx(T_,{}):null}function T_(){var k,ne,ie,Ce;const n=tm(),s=((k=Mw("/:individual"))==null?void 0:k.params.individual)??"",i=E.useId(),r=E.useRef(null),[u,d]=E.useState(N_),[h,m]=E.useState(""),[p,y]=E.useState(""),[x,v]=E.useState(0),b=fj(),w=dj(u);E.useEffect(()=>{const X=document.activeElement,ee=document.documentElement,P=ee.style.overflow;return ee.style.overflow="hidden",requestAnimationFrame(()=>{var J;return(J=document.querySelector(".pick-main .tsearch input"))==null?void 0:J.focus()}),()=>{ee.style.overflow=P,X==null||X.focus()}},[]);const C=X=>{d(X),y(""),v(0);try{localStorage.setItem(vx,String(X))}catch{}requestAnimationFrame(()=>{var ee;return(ee=document.querySelector(".pick-main .tsearch input"))==null?void 0:ee.focus()})},N=((ne=b.data)==null?void 0:ne.results)??[],M=E.useMemo(()=>M_(N,h),[N,h]),R=u==="all"?null:N.find(X=>X.pk===u)??((ie=w.data)==null?void 0:ie.project)??null,j=((Ce=w.data)==null?void 0:Ce.results)??[],F=E.useMemo(()=>__(j,p),[j,p]),T=F.slice(0,fh),H=E.useRef(null),D=X=>{Eu(),X.individual!==s&&n(`/${encodeURIComponent(X.individual)}`)};E.useEffect(()=>{var X,ee,P;(P=(ee=(X=H.current)==null?void 0:X.querySelector(`[data-index="${x}"]`))==null?void 0:ee.scrollIntoView)==null||P.call(ee,{block:"nearest"})},[x]),E.useEffect(()=>v(0),[p]);const z=X=>{const ee=X.target,P=ee instanceof HTMLInputElement&&!!ee.closest(".pick-main");if(X.key==="Escape"){if(ee instanceof HTMLInputElement&&ee.value)return;Eu()}else if(P&&X.key==="ArrowDown")X.preventDefault(),v(J=>Math.min(J+1,T.length-1));else if(P&&X.key==="ArrowUp")X.preventDefault(),v(J=>Math.max(J-1,0));else if(P&&X.key==="Enter"&&T[x])X.preventDefault(),D(T[x]);else if(ee instanceof HTMLInputElement&&ee.closest(".pick-rail")&&X.key==="Enter"){X.preventDefault();const J=M[0];J&&C(J.pk)}},Y=b.isPending,te=b.isError||w.isError;return Wh.createPortal(f.jsx("div",{className:`info-backdrop ${Gn.theme}`,onMouseDown:X=>X.target===X.currentTarget&&Eu(),children:f.jsxs("div",{className:"info-dialog pick",role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,onKeyDown:z,children:[f.jsx("button",{ref:r,type:"button",className:"info-close","aria-label":"Close",onClick:Eu,children:f.jsx(Qu,{size:18,"aria-hidden":!0})}),f.jsxs("nav",{className:"info-rail pick-rail","aria-label":"Projects",children:[f.jsx("span",{className:"info-kicker",children:"Browse"}),f.jsx("h2",{id:i,children:"Projects"}),f.jsx($u,{value:h,onChange:m,label:"Search projects",placeholder:"Search projects",shortcut:!1,delay:0}),f.jsxs("ol",{children:[f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u==="all"?"true":void 0,onClick:()=>C("all"),children:[f.jsx("span",{className:"pick-name",children:f.jsxs("span",{children:[f.jsx(bC,{size:14,"aria-hidden":!0}),"All patients"]})}),f.jsx("span",{className:"pick-n",children:b.data?dh(b.data.total):""})]})}),M.map(X=>f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u===X.pk?"true":void 0,onClick:()=>C(X.pk),title:X.short_title?`${X.title} (${X.short_title})`:X.title,children:[f.jsx("span",{className:"pick-name",children:X.title}),f.jsx("span",{className:"pick-n",children:dh(X.patients)})]})},X.pk))]}),Y&&f.jsx("p",{className:"pick-note",children:"Loading projects…"}),!Y&&N.length>0&&M.length===0&&f.jsxs("p",{className:"pick-note",children:["No project matches “",h,"”."]}),!Y&&!b.isError&&N.length===0&&f.jsx("p",{className:"pick-note",children:"No project has a dashboard yet. “All patients” lists every one."})]}),f.jsxs("div",{className:"pick-main",children:[f.jsxs("header",{className:"pick-head",children:[f.jsx("span",{className:"info-kicker",children:(R==null?void 0:R.short_title)??(u==="all"?"Every project":"Project")}),f.jsx("h3",{children:(R==null?void 0:R.title)??"All patients"}),(R==null?void 0:R.description)&&f.jsx("p",{children:R.description})]}),f.jsx("div",{className:"tbar",children:f.jsx($u,{value:p,onChange:y,label:"Search patients",placeholder:"Search id or disease",shortcut:!1,delay:0})}),f.jsx("div",{ref:H,className:"pick-list",role:"group","aria-label":"Patients","aria-busy":w.isFetching,children:te?f.jsx("p",{className:"pick-note",children:"The patients could not be loaded. Close this window and try again."}):w.isPending?f.jsx("p",{className:"pick-note",children:"Loading patients…"}):T.length===0?f.jsx("p",{className:"pick-note",children:p?`No patient matches “${p}”.`:"No patients with a dashboard in this project yet."}):T.map((X,ee)=>f.jsxs("button",{type:"button",className:"pick-row","data-index":ee,"data-active":ee===x||void 0,"data-current":X.individual===s||void 0,onMouseEnter:()=>v(ee),onClick:()=>D(X),children:[f.jsx("span",{className:"pick-id mono",children:f.jsx(ds,{text:X.individual,query:p})}),f.jsx("span",{className:"pick-diseases",children:X.diseases.length>0?X.diseases.map(P=>f.jsx("span",{className:"sc-chip",children:f.jsx(ds,{text:P,query:p})},P)):f.jsx("span",{className:"pick-faint",children:"No tumour disease recorded"})}),f.jsx("span",{className:"pick-aside",children:X.individual===s?f.jsxs("span",{className:"pick-here",children:[f.jsx(_1,{size:13,"aria-hidden":!0}),"On this page"]}):f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[dh(X.samples)," ",X.samples===1?"sample":"samples"]}),f.jsxs("span",{className:"pick-faint",children:["report ",X.report_version,X.built?`, ${O1(X.built)}`:""]})]})})]},X.individual))}),w.data&&f.jsx(Wu,{shown:F.length,total:j.length,noun:["patient","patients"],note:F.length>fh?`Showing the first ${fh}; search to narrow`:void 0})]})]})}),document.body)}const A_=new q2({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function O_(){return f.jsx(v2,{client:A_,children:f.jsxs(Zw,{basename:Gn.basePath,children:[f.jsxs(Yw,{children:[f.jsx(_h,{path:"/",element:f.jsx(kC,{})}),f.jsx(_h,{path:"/:individual",element:f.jsx(E_,{})})]}),f.jsx(R_,{})]})})}p2.createRoot(document.getElementById("root")).render(f.jsx(E.StrictMode,{children:f.jsx(O_,{})}));