wgts-report 0.1.8 → 0.1.9

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 Bv=n=>{throw TypeError(n)};var Ld=(n,s,i)=>s.has(n)||Bv("Cannot "+i);var L=(n,s,i)=>(Ld(n,s,"read from private field"),i?i.call(n):s.get(n)),ye=(n,s,i)=>s.has(n)?Bv("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(n):s.set(n,i),fe=(n,s,i,r)=>(Ld(n,s,"write to private field"),r?r.call(n,i):s.set(n,i),i),De=(n,s,i)=>(Ld(n,s,"access private method"),i);var Ru=(n,s,i,r)=>({set _(u){fe(n,s,u,i)},get _(){return L(n,s,r)}});function m2(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 g2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ud={exports:{}},Mr={};/**
1
+ var Wv=n=>{throw TypeError(n)};var Yd=(n,a,i)=>a.has(n)||Wv("Cannot "+i);var U=(n,a,i)=>(Yd(n,a,"read from private field"),i?i.call(n):a.get(n)),ye=(n,a,i)=>a.has(n)?Wv("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,i),ce=(n,a,i,o)=>(Yd(n,a,"write to private field"),o?o.call(n,i):a.set(n,i),i),De=(n,a,i)=>(Yd(n,a,"access private method"),i);var ku=(n,a,i,o)=>({set _(u){ce(n,a,u,i)},get _(){return U(n,a,o)}});function T2(n,a){for(var i=0;i<a.length;i++){const o=a[i];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(o,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>o[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(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"&&o(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 o(u){if(u.ep)return;u.ep=!0;const d=i(u);fetch(u.href,d)}})();function R2(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Id={exports:{}},Uo={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var Bv=n=>{throw TypeError(n)};var Ld=(n,s,i)=>s.has(n)||Bv("Cannot "+i);var L=(
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 kv;function p2(){if(kv)return Mr;kv=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 Mr.Fragment=s,Mr.jsx=i,Mr.jsxs=i,Mr}var Gv;function v2(){return Gv||(Gv=1,Ud.exports=p2()),Ud.exports}var f=v2(),Vd={exports:{}},Ne={};/**
9
+ */var ey;function A2(){if(ey)return Uo;ey=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(o,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:o,key:h,ref:u!==void 0?u:null,props:d}}return Uo.Fragment=a,Uo.jsx=i,Uo.jsxs=i,Uo}var ty;function O2(){return ty||(ty=1,Id.exports=A2()),Id.exports}var c=O2(),Xd={exports:{}},Ee={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var Bv=n=>{throw TypeError(n)};var Ld=(n,s,i)=>s.has(n)||Bv("Cannot "+i);var L=(
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 qv;function y2(){if(qv)return Ne;qv=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 j(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 E(A,V,te){this.props=A,this.context=V,this.refs=R,this.updater=te||N}E.prototype.isReactComponent={},E.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")},E.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function U(){}U.prototype=E.prototype;function T(A,V,te){this.props=A,this.context=V,this.refs=R,this.updater=te||N}var H=T.prototype=new U;H.constructor=T,M(H,E.prototype),H.isPureReactComponent=!0;var D=Array.isArray;function O(){}var I={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function k(A,V,te){var ue=te.ref;return{$$typeof:n,type:A,key:V,ref:ue!==void 0?ue:null,props:te}}function ne(A,V){return k(A.type,V,A.props)}function oe(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function ie(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(te){return V[te]})}var Y=/\/+/g;function W(A,V){return typeof A=="object"&&A!==null&&A.key!=null?ie(""+A.key):V.toString(36)}function X(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(O,O):(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,te,ue,me){var Se=typeof A;(Se==="undefined"||Se==="boolean")&&(A=null);var Ce=!1;if(A===null)Ce=!0;else switch(Se){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(A.$$typeof){case n:case s:Ce=!0;break;case x:return Ce=A._init,J(Ce(A._payload),V,te,ue,me)}}if(Ce)return me=me(A),Ce=ue===""?"."+W(A,0):ue,D(me)?(te="",Ce!=null&&(te=Ce.replace(Y,"$&/")+"/"),J(me,V,te,"",function(ct){return ct})):me!=null&&(oe(me)&&(me=ne(me,te+(me.key==null||A&&A.key===me.key?"":(""+me.key).replace(Y,"$&/")+"/")+Ce)),V.push(me)),1;Ce=0;var ce=ue===""?".":ue+":";if(D(A))for(var ge=0;ge<A.length;ge++)ue=A[ge],Se=ce+W(ue,ge),Ce+=J(ue,V,te,Se,me);else if(ge=j(A),typeof ge=="function")for(A=ge.call(A),ge=0;!(ue=A.next()).done;)ue=ue.value,Se=ce+W(ue,ge++),Ce+=J(ue,V,te,Se,me);else if(Se==="object"){if(typeof A.then=="function")return J(X(A),V,te,ue,me);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 Ce}function le(A,V,te){if(A==null)return A;var ue=[],me=0;return J(A,ue,"","",function(Se){return V.call(te,Se,me++)}),ue}function ve(A){if(A._status===-1){var V=A._result,te=V();te.then(function(ue){(A._status===0||A._status===-1)&&(A._status=1,A._result=ue,te.status===void 0&&(te.status="fulfilled",te.value=ue))},function(ue){(A._status===0||A._status===-1)&&(A._status=2,A._result=ue,te.status===void 0&&(te.status="rejected",te.reason=ue))}),A._status===-1&&(A._status=0,A._result=te)}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 Le(A){var V=I.T,te={};te.types=V!==null?V.types:null,I.T=te;try{var ue=A(),me=I.S;me!==null&&me(te,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(O,je)}catch(Se){je(Se)}finally{V!==null&&te.types!==null&&(V.types=te.types),I.T=V}}function Be(A){var V=I.T;if(V!==null){var te=V.types;te===null?V.types=[A]:te.indexOf(A)===-1&&te.push(A)}else Le(Be.bind(null,A))}var Xe={map:le,forEach:function(A,V,te){le(A,function(){V.apply(this,arguments)},te)},count:function(A){var V=0;return le(A,function(){V++}),V},toArray:function(A){return le(A,function(V){return V})||[]},only:function(A){if(!oe(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ne.Activity=v,Ne.Children=Xe,Ne.Component=E,Ne.Fragment=i,Ne.Profiler=u,Ne.PureComponent=T,Ne.StrictMode=r,Ne.Suspense=p,Ne.ViewTransition=b,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(A){return I.H.useMemoCache(A)}},Ne.addTransitionType=Be,Ne.cache=function(A){return function(){return A.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(A,V,te){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ue=M({},A.props),me=A.key;if(V!=null)for(Se in V.key!==void 0&&(me=""+V.key),V)!ee.call(V,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&V.ref===void 0||(ue[Se]=V[Se]);var Se=arguments.length-2;if(Se===1)ue.children=te;else if(1<Se){for(var Ce=Array(Se),ce=0;ce<Se;ce++)Ce[ce]=arguments[ce+2];ue.children=Ce}return k(A.type,me,ue)},Ne.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},Ne.createElement=function(A,V,te){var ue,me={},Se=null;if(V!=null)for(ue in V.key!==void 0&&(Se=""+V.key),V)ee.call(V,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(me[ue]=V[ue]);var Ce=arguments.length-2;if(Ce===1)me.children=te;else if(1<Ce){for(var ce=Array(Ce),ge=0;ge<Ce;ge++)ce[ge]=arguments[ge+2];me.children=ce}if(A&&A.defaultProps)for(ue in Ce=A.defaultProps,Ce)me[ue]===void 0&&(me[ue]=Ce[ue]);return k(A,Se,me)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(A){return{$$typeof:m,render:A}},Ne.isValidElement=oe,Ne.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:ve}},Ne.memo=function(A,V){return{$$typeof:y,type:A,compare:V===void 0?null:V}},Ne.startTransition=Le,Ne.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ne.use=function(A){return I.H.use(A)},Ne.useActionState=function(A,V,te){return I.H.useActionState(A,V,te)},Ne.useCallback=function(A,V){return I.H.useCallback(A,V)},Ne.useContext=function(A){return I.H.useContext(A)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(A,V){return I.H.useDeferredValue(A,V)},Ne.useEffect=function(A,V){return I.H.useEffect(A,V)},Ne.useEffectEvent=function(A){return I.H.useEffectEvent(A)},Ne.useId=function(){return I.H.useId()},Ne.useImperativeHandle=function(A,V,te){return I.H.useImperativeHandle(A,V,te)},Ne.useInsertionEffect=function(A,V){return I.H.useInsertionEffect(A,V)},Ne.useLayoutEffect=function(A,V){return I.H.useLayoutEffect(A,V)},Ne.useMemo=function(A,V){return I.H.useMemo(A,V)},Ne.useOptimistic=function(A,V){return I.H.useOptimistic(A,V)},Ne.useReducer=function(A,V,te){return I.H.useReducer(A,V,te)},Ne.useRef=function(A){return I.H.useRef(A)},Ne.useState=function(A){return I.H.useState(A)},Ne.useSyncExternalStore=function(A,V,te){return I.H.useSyncExternalStore(A,V,te)},Ne.useTransition=function(){return I.H.useTransition()},Ne.version="19.3.1",Ne}var Qv;function lm(){return Qv||(Qv=1,Vd.exports=y2()),Vd.exports}var C=lm();const x2=g2(C),S2=m2({__proto__:null,default:x2},[C]);var $d={exports:{}},_r={},Fd={exports:{}},Bd={};/**
17
+ */var ny;function z2(){if(ny)return Ee;ny=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=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"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.for("react.view_transition"),w=Symbol.iterator;function j(L){return L===null||typeof L!="object"?null:(L=w&&L[w]||L["@@iterator"],typeof L=="function"?L:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function C(L,V,ne){this.props=L,this.context=V,this.refs=A,this.updater=ne||N}C.prototype.isReactComponent={},C.prototype.setState=function(L,V){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,V,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function D(){}D.prototype=C.prototype;function O(L,V,ne){this.props=L,this.context=V,this.refs=A,this.updater=ne||N}var z=O.prototype=new D;z.constructor=O,M(z,C.prototype),z.isPureReactComponent=!0;var _=Array.isArray;function R(){}var Q={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function $(L,V,ne){var re=ne.ref;return{$$typeof:n,type:L,key:V,ref:re!==void 0?re:null,props:ne}}function le(L,V){return $(L.type,V,L.props)}function oe(L){return typeof L=="object"&&L!==null&&L.$$typeof===n}function te(L){var V={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ne){return V[ne]})}var Y=/\/+/g;function ee(L,V){return typeof L=="object"&&L!==null&&L.key!=null?te(""+L.key):V.toString(36)}function X(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(R,R):(L.status="pending",L.then(function(V){L.status==="pending"&&(L.status="fulfilled",L.value=V)},function(V){L.status==="pending"&&(L.status="rejected",L.reason=V)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function W(L,V,ne,re,me){var be=typeof L;(be==="undefined"||be==="boolean")&&(L=null);var Ce=!1;if(L===null)Ce=!0;else switch(be){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(L.$$typeof){case n:case a:Ce=!0;break;case x:return Ce=L._init,W(Ce(L._payload),V,ne,re,me)}}if(Ce)return me=me(L),Ce=re===""?"."+ee(L,0):re,_(me)?(ne="",Ce!=null&&(ne=Ce.replace(Y,"$&/")+"/"),W(me,V,ne,"",function(rt){return rt})):me!=null&&(oe(me)&&(me=le(me,ne+(me.key==null||L&&L.key===me.key?"":(""+me.key).replace(Y,"$&/")+"/")+Ce)),V.push(me)),1;Ce=0;var ue=re===""?".":re+":";if(_(L))for(var ge=0;ge<L.length;ge++)re=L[ge],be=ue+ee(re,ge),Ce+=W(re,V,ne,be,me);else if(ge=j(L),typeof ge=="function")for(L=ge.call(L),ge=0;!(re=L.next()).done;)re=re.value,be=ue+ee(re,ge++),Ce+=W(re,V,ne,be,me);else if(be==="object"){if(typeof L.then=="function")return W(X(L),V,ne,re,me);throw V=String(L),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function ae(L,V,ne){if(L==null)return L;var re=[],me=0;return W(L,re,"","",function(be){return V.call(ne,be,me++)}),re}function ve(L){if(L._status===-1){var V=L._result,ne=V();ne.then(function(re){(L._status===0||L._status===-1)&&(L._status=1,L._result=re,ne.status===void 0&&(ne.status="fulfilled",ne.value=re))},function(re){(L._status===0||L._status===-1)&&(L._status=2,L._result=re,ne.status===void 0&&(ne.status="rejected",ne.reason=re))}),L._status===-1&&(L._status=0,L._result=ne)}if(L._status===1)return L._result.default;throw L._result}var xe=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)};function He(L){var V=Q.T,ne={};ne.types=V!==null?V.types:null,Q.T=ne;try{var re=L(),me=Q.S;me!==null&&me(ne,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(R,xe)}catch(be){xe(be)}finally{V!==null&&ne.types!==null&&(V.types=ne.types),Q.T=V}}function Fe(L){var V=Q.T;if(V!==null){var ne=V.types;ne===null?V.types=[L]:ne.indexOf(L)===-1&&ne.push(L)}else He(Fe.bind(null,L))}var Ye={map:ae,forEach:function(L,V,ne){ae(L,function(){V.apply(this,arguments)},ne)},count:function(L){var V=0;return ae(L,function(){V++}),V},toArray:function(L){return ae(L,function(V){return V})||[]},only:function(L){if(!oe(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Ee.Activity=v,Ee.Children=Ye,Ee.Component=C,Ee.Fragment=i,Ee.Profiler=u,Ee.PureComponent=O,Ee.StrictMode=o,Ee.Suspense=g,Ee.ViewTransition=S,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(L){return Q.H.useMemoCache(L)}},Ee.addTransitionType=Fe,Ee.cache=function(L){return function(){return L.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(L,V,ne){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var re=M({},L.props),me=L.key;if(V!=null)for(be in V.key!==void 0&&(me=""+V.key),V)!K.call(V,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&V.ref===void 0||(re[be]=V[be]);var be=arguments.length-2;if(be===1)re.children=ne;else if(1<be){for(var Ce=Array(be),ue=0;ue<be;ue++)Ce[ue]=arguments[ue+2];re.children=Ce}return $(L.type,me,re)},Ee.createContext=function(L){return L={$$typeof:h,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:d,_context:L},L},Ee.createElement=function(L,V,ne){var re,me={},be=null;if(V!=null)for(re in V.key!==void 0&&(be=""+V.key),V)K.call(V,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(me[re]=V[re]);var Ce=arguments.length-2;if(Ce===1)me.children=ne;else if(1<Ce){for(var ue=Array(Ce),ge=0;ge<Ce;ge++)ue[ge]=arguments[ge+2];me.children=ue}if(L&&L.defaultProps)for(re in Ce=L.defaultProps,Ce)me[re]===void 0&&(me[re]=Ce[re]);return $(L,be,me)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(L){return{$$typeof:m,render:L}},Ee.isValidElement=oe,Ee.lazy=function(L){return{$$typeof:x,_payload:{_status:-1,_result:L},_init:ve}},Ee.memo=function(L,V){return{$$typeof:y,type:L,compare:V===void 0?null:V}},Ee.startTransition=He,Ee.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},Ee.use=function(L){return Q.H.use(L)},Ee.useActionState=function(L,V,ne){return Q.H.useActionState(L,V,ne)},Ee.useCallback=function(L,V){return Q.H.useCallback(L,V)},Ee.useContext=function(L){return Q.H.useContext(L)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(L,V){return Q.H.useDeferredValue(L,V)},Ee.useEffect=function(L,V){return Q.H.useEffect(L,V)},Ee.useEffectEvent=function(L){return Q.H.useEffectEvent(L)},Ee.useId=function(){return Q.H.useId()},Ee.useImperativeHandle=function(L,V,ne){return Q.H.useImperativeHandle(L,V,ne)},Ee.useInsertionEffect=function(L,V){return Q.H.useInsertionEffect(L,V)},Ee.useLayoutEffect=function(L,V){return Q.H.useLayoutEffect(L,V)},Ee.useMemo=function(L,V){return Q.H.useMemo(L,V)},Ee.useOptimistic=function(L,V){return Q.H.useOptimistic(L,V)},Ee.useReducer=function(L,V,ne){return Q.H.useReducer(L,V,ne)},Ee.useRef=function(L){return Q.H.useRef(L)},Ee.useState=function(L){return Q.H.useState(L)},Ee.useSyncExternalStore=function(L,V,ne){return Q.H.useSyncExternalStore(L,V,ne)},Ee.useTransition=function(){return Q.H.useTransition()},Ee.version="19.3.1",Ee}var ly;function pm(){return ly||(ly=1,Xd.exports=z2()),Xd.exports}var E=pm();const D2=R2(E),L2=T2({__proto__:null,default:D2},[E]);var Kd={exports:{}},$o={},Pd={exports:{}},Zd={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var Bv=n=>{throw TypeError(n)};var Ld=(n,s,i)=>s.has(n)||Bv("Cannot "+i);var L=(
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 Yv;function b2(){return Yv||(Yv=1,(function(n){function s(X,J){var le=X.length;X.push(J);e:for(;0<le;){var ve=le-1>>>1,je=X[ve];if(0<u(je,J))X[ve]=J,X[le]=je,le=ve;else break e}}function i(X){return X.length===0?null:X[0]}function r(X){if(X.length===0)return null;var J=X[0],le=X.pop();if(le!==J){X[0]=le;e:for(var ve=0,je=X.length,Le=je>>>1;ve<Le;){var Be=2*(ve+1)-1,Xe=X[Be],A=Be+1,V=X[A];if(0>u(Xe,le))A<je&&0>u(V,Xe)?(X[ve]=V,X[A]=le,ve=A):(X[ve]=Xe,X[Be]=le,ve=Be);else if(A<je&&0>u(V,le))X[ve]=V,X[A]=le,ve=A;else break e}}return J}function u(X,J){var le=X.sortIndex-J.sortIndex;return le!==0?le:X.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,j=!1,N=!1,M=!1,R=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function T(X){for(var J=i(y);J!==null;){if(J.callback===null)r(y);else if(J.startTime<=X)r(y),J.sortIndex=J.expirationTime,s(p,J);else break;J=i(y)}}function H(X){if(N=!1,T(X),!j)if(i(p)!==null)j=!0,D||(D=!0,oe());else{var J=i(y);J!==null&&W(H,J.startTime-X)}}var D=!1,O=-1,I=5,ee=-1;function k(){return M?!0:!(n.unstable_now()-ee<I)}function ne(){if(M=!1,D){var X=n.unstable_now();ee=X;var J=!0;try{e:{j=!1,N&&(N=!1,E(O),O=-1),w=!0;var le=b;try{t:{for(T(X),v=i(p);v!==null&&!(v.expirationTime>X&&k());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,b=v.priorityLevel;var je=ve(v.expirationTime<=X);if(X=n.unstable_now(),typeof je=="function"){v.callback=je,T(X),J=!0;break t}v===i(p)&&r(p),T(X)}else r(p);v=i(p)}if(v!==null)J=!0;else{var Le=i(y);Le!==null&&W(H,Le.startTime-X),J=!1}}break e}finally{v=null,b=le,w=!1}J=void 0}}finally{J?oe():D=!1}}}var oe;if(typeof U=="function")oe=function(){U(ne)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,Y=ie.port2;ie.port1.onmessage=ne,oe=function(){Y.postMessage(null)}}else oe=function(){R(ne,0)};function W(X,J){O=R(function(){X(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(X){X.callback=null},n.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<X?Math.floor(1e3/X):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(X){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var le=b;b=J;try{return X()}finally{b=le}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(X,J){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var le=b;b=X;try{return J()}finally{b=le}},n.unstable_scheduleCallback=function(X,J,le){var ve=n.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?ve+le:ve):le=ve,X){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=le+je,X={id:x++,callback:J,priorityLevel:X,startTime:le,expirationTime:je,sortIndex:-1},le>ve?(X.sortIndex=le,s(y,X),i(p)===null&&X===i(y)&&(N?(E(O),O=-1):N=!0,W(H,le-ve))):(X.sortIndex=je,s(p,X),j||w||(j=!0,D||(D=!0,oe()))),X},n.unstable_shouldYield=k,n.unstable_wrapCallback=function(X){var J=b;return function(){var le=b;b=J;try{return X.apply(this,arguments)}finally{b=le}}}})(Bd)),Bd}var Iv;function w2(){return Iv||(Iv=1,Fd.exports=b2()),Fd.exports}var kd={exports:{}},Ut={};/**
25
+ */var ay;function H2(){return ay||(ay=1,(function(n){function a(X,W){var ae=X.length;X.push(W);e:for(;0<ae;){var ve=ae-1>>>1,xe=X[ve];if(0<u(xe,W))X[ve]=W,X[ae]=xe,ae=ve;else break e}}function i(X){return X.length===0?null:X[0]}function o(X){if(X.length===0)return null;var W=X[0],ae=X.pop();if(ae!==W){X[0]=ae;e:for(var ve=0,xe=X.length,He=xe>>>1;ve<He;){var Fe=2*(ve+1)-1,Ye=X[Fe],L=Fe+1,V=X[L];if(0>u(Ye,ae))L<xe&&0>u(V,Ye)?(X[ve]=V,X[L]=ae,ve=L):(X[ve]=Ye,X[Fe]=ae,ve=Fe);else if(L<xe&&0>u(V,ae))X[ve]=V,X[L]=ae,ve=L;else break e}}return W}function u(X,W){var ae=X.sortIndex-W.sortIndex;return ae!==0?ae:X.id-W.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 g=[],y=[],x=1,v=null,S=3,w=!1,j=!1,N=!1,M=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function O(X){for(var W=i(y);W!==null;){if(W.callback===null)o(y);else if(W.startTime<=X)o(y),W.sortIndex=W.expirationTime,a(g,W);else break;W=i(y)}}function z(X){if(N=!1,O(X),!j)if(i(g)!==null)j=!0,_||(_=!0,oe());else{var W=i(y);W!==null&&ee(z,W.startTime-X)}}var _=!1,R=-1,Q=5,K=-1;function $(){return M?!0:!(n.unstable_now()-K<Q)}function le(){if(M=!1,_){var X=n.unstable_now();K=X;var W=!0;try{e:{j=!1,N&&(N=!1,C(R),R=-1),w=!0;var ae=S;try{t:{for(O(X),v=i(g);v!==null&&!(v.expirationTime>X&&$());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,S=v.priorityLevel;var xe=ve(v.expirationTime<=X);if(X=n.unstable_now(),typeof xe=="function"){v.callback=xe,O(X),W=!0;break t}v===i(g)&&o(g),O(X)}else o(g);v=i(g)}if(v!==null)W=!0;else{var He=i(y);He!==null&&ee(z,He.startTime-X),W=!1}}break e}finally{v=null,S=ae,w=!1}W=void 0}}finally{W?oe():_=!1}}}var oe;if(typeof D=="function")oe=function(){D(le)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,Y=te.port2;te.port1.onmessage=le,oe=function(){Y.postMessage(null)}}else oe=function(){A(le,0)};function ee(X,W){R=A(function(){X(n.unstable_now())},W)}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(X){X.callback=null},n.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<X?Math.floor(1e3/X):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(X){switch(S){case 1:case 2:case 3:var W=3;break;default:W=S}var ae=S;S=W;try{return X()}finally{S=ae}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(X,W){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ae=S;S=X;try{return W()}finally{S=ae}},n.unstable_scheduleCallback=function(X,W,ae){var ve=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?ve+ae:ve):ae=ve,X){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=ae+xe,X={id:x++,callback:W,priorityLevel:X,startTime:ae,expirationTime:xe,sortIndex:-1},ae>ve?(X.sortIndex=ae,a(y,X),i(g)===null&&X===i(y)&&(N?(C(R),R=-1):N=!0,ee(z,ae-ve))):(X.sortIndex=xe,a(g,X),j||w||(j=!0,_||(_=!0,oe()))),X},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(X){var W=S;return function(){var ae=S;S=W;try{return X.apply(this,arguments)}finally{S=ae}}}})(Zd)),Zd}var sy;function U2(){return sy||(sy=1,Pd.exports=H2()),Pd.exports}var Jd={exports:{}},kt={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var Bv=n=>{throw TypeError(n)};var Ld=(n,s,i)=>s.has(n)||Bv("Cannot "+i);var L=(
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 Xv;function j2(){if(Xv)return Ut;Xv=1;var n=lm();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 Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ut.browser=function(x){return{$$typeof:d,_reason:x}},Ut.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)},Ut.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()}},Ut.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))},Ut.prefetchDNS=function(x){typeof x=="string"&&r.d.D(x)},Ut.preinit=function(x,v){if(typeof x=="string"&&v&&typeof v.as=="string"){var b=v.as,w=y(b,v.crossOrigin),j=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:j,fetchPriority:N}):b==="script"&&r.d.X(x,{crossOrigin:w,integrity:j,fetchPriority:N,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Ut.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)},Ut.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})}},Ut.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)},Ut.requestFormReset=function(x){r.d.r(x)},Ut.unstable_batchedUpdates=function(x,v){return x(v)},Ut.useFormState=function(x,v,b){return p.H.useFormState(x,v,b)},Ut.useFormStatus=function(){return p.H.useHostTransitionStatus()},Ut.version="19.3.1",Ut}var Kv;function ax(){if(Kv)return kd.exports;Kv=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(),kd.exports=j2(),kd.exports}/**
33
+ */var iy;function $2(){if(iy)return kt;iy=1;var n=pm();function a(x){var v="https://react.dev/errors/"+x;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}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 o={d:{f:i,r:function(){throw Error(a(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,S){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:S}}var g=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 kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,kt.browser=function(x){return{$$typeof:d,_reason:x}},kt.createPortal=function(x,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(a(299));return m(x,v,null,S)},kt.flushSync=function(x){var v=g.T,S=o.p;try{if(g.T=null,o.p=2,x)return x()}finally{g.T=v,o.p=S,o.d.f()}},kt.preconnect=function(x,v){typeof x=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,o.d.C(x,v))},kt.prefetchDNS=function(x){typeof x=="string"&&o.d.D(x)},kt.preinit=function(x,v){if(typeof x=="string"&&v&&typeof v.as=="string"){var S=v.as,w=y(S,v.crossOrigin),j=typeof v.integrity=="string"?v.integrity:void 0,N=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?o.d.S(x,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:w,integrity:j,fetchPriority:N}):S==="script"&&o.d.X(x,{crossOrigin:w,integrity:j,fetchPriority:N,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},kt.preinitModule=function(x,v){if(typeof x=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=y(v.as,v.crossOrigin);o.d.M(x,{crossOrigin:S,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&&o.d.M(x)},kt.preload=function(x,v){if(typeof x=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,w=y(S,v.crossOrigin);o.d.L(x,S,{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})}},kt.preloadModule=function(x,v){if(typeof x=="string")if(v){var S=y(v.as,v.crossOrigin);o.d.m(x,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,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 o.d.m(x)},kt.requestFormReset=function(x){o.d.r(x)},kt.unstable_batchedUpdates=function(x,v){return x(v)},kt.useFormState=function(x,v,S){return g.H.useFormState(x,v,S)},kt.useFormStatus=function(){return g.H.useHostTransitionStatus()},kt.version="19.3.1",kt}var oy;function Sx(){if(oy)return Jd.exports;oy=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(a){console.error(a)}}return n(),Jd.exports=$2(),Jd.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,15 +38,15 @@ var Bv=n=>{throw TypeError(n)};var Ld=(n,s,i)=>s.has(n)||Bv("Cannot "+i);var L=(
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 Zv;function C2(){if(Zv)return _r;Zv=1;var n=w2(),s=lm(),i=ax();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 j(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,E=null;function U(e,t,l){return e===l?!0:e===t?(R=e,!0):!1}function T(e,t,l){return e===l?(E=e,!1):e===t?(E!==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 O=Object.assign,I=Symbol.for("react.element"),ee=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),W=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),je=Symbol.for("react.lazy"),Le=Symbol.for("react.activity"),Be=Symbol.for("react.legacy_hidden"),Xe=Symbol.for("react.memo_cache_sentinel"),A=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),te=Symbol.iterator;function ue(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function Se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ne:return"Fragment";case ie:return"Profiler";case oe:return"StrictMode";case J:return"Suspense";case le:return"SuspenseList";case Le:return"Activity";case A:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case W:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ve:return t=e.displayName||null,t!==null?t:Se(e.type)||"Memo";case je:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}var Ce=Array.isArray,ce=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ct={pending:!1,data:null,method:null,action:null},vt=[],Dn=-1;function en(e){return{current:e}}function st(e){0>Dn||(e.current=vt[Dn],vt[Dn]=null,Dn--)}function $e(e,t){Dn++,vt[Dn]=e.current,e.current=t}var Qt=en(null),Ft=en(null),tn=en(null),Bt=en(null);function dl(e,t){switch($e(tn,t),$e(Ft,e),$e(Qt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Z0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Z0(t),e=P0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}st(Qt),$e(Qt,e)}function ht(){st(Qt),st(Ft),st(tn)}function fn(e){var t=e.memoizedState;t!==null&&(ni._currentValue=t.memoizedState,$e(Bt,e)),t=Qt.current;var l=P0(t,e.type);t!==l&&($e(Ft,e),$e(Qt,l))}function Yt(e){Ft.current===e&&(st(Qt),st(Ft)),Bt.current===e&&(st(Bt),ni._currentValue=ct)}var dn,Yn;function Tt(e){if(dn===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);dn=t&&t[1]||"",Yn=-1<l.stack.indexOf(`
41
+ */var ry;function V2(){if(ry)return $o;ry=1;var n=U2(),a=pm(),i=Sx();function o(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 g(e){if(d(e)!==e)throw Error(o(188))}function y(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,s=t;;){var r=l.return;if(r===null)break;var f=r.alternate;if(f===null){if(s=r.return,s!==null){l=s;continue}break}if(r.child===f.child){for(f=r.child;f;){if(f===l)return g(r),e;if(f===s)return g(r),t;f=f.sibling}throw Error(o(188))}if(l.return!==s.return)l=r,s=f;else{for(var p=!1,b=r.child;b;){if(b===l){p=!0,l=r,s=f;break}if(b===s){p=!0,s=r,l=f;break}b=b.sibling}if(!p){for(b=f.child;b;){if(b===l){p=!0,l=f,s=r;break}if(b===s){p=!0,s=f,l=r;break}b=b.sibling}if(!p)throw Error(o(189))}}if(l.alternate!==s)throw Error(o(190))}if(l.tag!==3)throw Error(o(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,s,r,f){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,s,r,f)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&v(e.child,t,l,s,r,f))return!0;e=e.sibling}return!1}function S(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 j(e){var t=[null,null],l=S(e);return l===null||N(t,e,l.child,{foundSelf:!1}),t}function N(e,t,l,s){for(;l!==null;){if(l===t)s.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(s.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&N(e,t,l.child,s))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(o(559))}}var A=null,C=null;function D(e,t,l){return e===l?!0:e===t?(A=e,!0):!1}function O(e,t,l){return e===l?(C=e,!1):e===t?(C!==null&&(A=e),!0):!1}function z(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 _(e,t,l){for(var s=0,r=e;r;r=l(r))s++;r=0;for(var f=t;f;f=l(f))r++;for(;0<s-r;)e=l(e),s--;for(;0<r-s;)t=l(t),r--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var R=Object.assign,Q=Symbol.for("react.element"),K=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),le=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),He=Symbol.for("react.activity"),Fe=Symbol.for("react.legacy_hidden"),Ye=Symbol.for("react.memo_cache_sentinel"),L=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),ne=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case le:return"Fragment";case te:return"Profiler";case oe:return"StrictMode";case W:return"Suspense";case ae:return"SuspenseList";case He:return"Activity";case L:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case $:return"Portal";case ee:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ve:return t=e.displayName||null,t!==null?t:be(e.type)||"Memo";case xe:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}var Ce=Array.isArray,ue=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt={pending:!1,data:null,method:null,action:null},jt=[],mn=-1;function Et(e){return{current:e}}function mt(e){0>mn||(e.current=jt[mn],jt[mn]=null,mn--)}function Ie(e,t){mn++,jt[mn]=e.current,e.current=t}var Mt=Et(null),Cn=Et(null),Pt=Et(null),pt=Et(null);function $l(e,t){switch(Ie(Pt,t),Ie(Cn,e),Ie(Mt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?rv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=rv(t),e=uv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}mt(Mt),Ie(Mt,e)}function ut(){mt(Mt),mt(Cn),mt(Pt)}function Zn(e){var t=e.memoizedState;t!==null&&(ui._currentValue=t.memoizedState,Ie(pt,e)),t=Mt.current;var l=uv(t,e.type);t!==l&&(Ie(Cn,e),Ie(Mt,l))}function Ot(e){Cn.current===e&&(mt(Mt),mt(Cn)),pt.current===e&&(mt(pt),ui._currentValue=rt)}var zt,za;function qt(e){if(zt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);zt=t&&t[1]||"",za=-1<l.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+dn+e+Yn}var Dl=!1;function In(e,t){if(!e||Dl)return"";Dl=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(se){var $=se}Reflect.construct(e,[],P)}else{try{P.call()}catch(se){$=se}P=!1;try{var q=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),P=!0,new e}finally{P&&(q!==void 0?Object.defineProperty(e.prototype,"props",q):delete e.prototype.props)}}}else{try{throw Error()}catch(se){$=se}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(se){if(se&&$&&typeof se.stack=="string")return[se.stack,$.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{Dl=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Tt(l):""}function K(e,t){switch(e.tag){case 26:case 27:case 5:return Tt(e.type);case 16:return Tt("Lazy");case 13:return e.child!==t&&t!==null?Tt("Suspense Fallback"):Tt("Suspense");case 19:return Tt("SuspenseList");case 0:case 15:return In(e.type,!1);case 11:return In(e.type.render,!1);case 1:return In(e.type,!0);case 31:return Tt("Activity");case 30:return Tt("ViewTransition");default:return""}}function ae(e){try{var t="",l=null;do t+=K(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
- Error generating stack: `+a.message+`
48
- `+a.stack}}var _e=Object.prototype.hasOwnProperty,Fe=n.unstable_scheduleCallback,ke=n.unstable_cancelCallback,jt=n.unstable_shouldYield,it=n.unstable_requestPaint,et=n.unstable_now,Xn=n.unstable_getCurrentPriorityLevel,Hl=n.unstable_ImmediatePriority,Na=n.unstable_UserBlockingPriority,Ea=n.unstable_NormalPriority,no=n.unstable_LowPriority,zi=n.unstable_IdlePriority,lo=n.log,ao=n.unstable_setDisableYieldValue,Ll=null,re=null;function Qe(e){if(typeof lo=="function"&&ao(e),re&&typeof re.setStrictMode=="function")try{re.setStrictMode(Ll,e)}catch{}}var nt=Math.clz32?Math.clz32:rc,Di=Math.log,ic=Math.LN2;function rc(e){return e>>>=0,e===0?32:31-(Di(e)/ic|0)|0}var Ul=256,hn=262144,Ma=4194304;function Kn(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 _a(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=Kn(a):(g&=S,g!==0?o=Kn(g):l||(l=S&~e,l!==0&&(o=Kn(l))))):(S=a&~c,S!==0?o=Kn(S):g!==0?o=Kn(g):l||(l=a&~e,l!==0&&(o=Kn(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 Ra(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Hi(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-nt(l),o=1<<a;t|=e[a],l&=~o}return t}function so(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 jm(){var e=Ma;return Ma<<=1,(Ma&62914560)===0&&(Ma=4194304),e}function oc(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function R1(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-nt(l),P=1<<Q;S[Q]=0,_[Q]=-1;var $=B[Q];if($!==null)for(B[Q]=null,Q=0;Q<$.length;Q++){var q=$[Q];q!==null&&(q.lane&=-536870913)}l&=~P}a!==0&&Cm(e,a,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(g&~t))}function Cm(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-nt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Nm(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-nt(l),o=1<<a;o&t|e[a]&t&&(e[a]|=t),l&=~o}}function Em(e,t){var l=t&-t;return l=(l&42)!==0?1:uc(l),(l&(e.suspendedLanes|t))!==0?0:l}function uc(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 cc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mm(){var e=ge.p;return e!==0?e:(e=window.event,e===void 0?32:Dv(e.type))}function _m(e,t){var l=ge.p;try{return ge.p=e,t()}finally{ge.p=l}}var hl=Math.random().toString(36).slice(2),At="__reactFiber$"+hl,nn="__reactProps$"+hl,ps="__reactContainer$"+hl,Rm="__reactEvents$"+hl,T1="__reactListeners$"+hl,A1="__reactHandles$"+hl,Tm="__reactResources$"+hl,Ui="__reactMarker$"+hl,io="__reactLoad$"+hl;function ro(e){delete e[At],delete e[nn],delete e[T1],delete e[A1]}function Ta(e){var t;if(t=e[At])return t;for(var l=e.parentNode;l;){if(t=l[ps]||l[At]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=mv(e);e!==null;){if(l=e[At])return l;e=mv(e)}return t}e=l,l=e.parentNode}return null}function vs(e){if(e=e[At]||e[ps]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Vi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ys(e){var t=e[Tm];return t||(t=e[Tm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Et(e){e[Ui]=!0}function Am(e){e[io]=void 0}var Om=new Set,zm={};function Aa(e,t){xs(e,t),xs(e+"Capture",t)}function xs(e,t){for(zm[e]=t,e=0;e<t.length;e++)Om.add(t[e])}var O1=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]*$"),Dm={},Hm={};function z1(e){return _e.call(Hm,e)?!0:_e.call(Dm,e)?!1:O1.test(e)?Hm[e]=!0:(Dm[e]=!0,!1)}var Ge=!1;function Lm(){var e=Ge;return Ge=!1,e}function oo(e,t,l){if(z1(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 uo(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 mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Um(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function D1(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 fc(e){if(!e._valueTracker){var t=Um(e)?"checked":"value";e._valueTracker=D1(e,t,""+e[t])}}function Vm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Um(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}var H1=/[\n"\\]/g;function jn(e){return e.replace(H1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function dc(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=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?g==="number"&&e.value==t?hc(e,mn(e.value)):hc(e,mn(t)):l!=null?hc(e,mn(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=""+mn(S):e.removeAttribute("name")}function $m(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)){fc(e);return}l=l!=null?""+mn(l):"",t=t!=null?""+mn(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),fc(e)}function hc(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Ss(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=""+mn(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 Fm(e,t,l){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+mn(l):""}function Bm(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(Ce(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=mn(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),fc(e)}function bs(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var L1=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 km(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||L1.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Gm(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]="",Ge=!0);for(var o in t)a=t[o],t.hasOwnProperty(o)&&l[o]!==a&&(km(e,o,a),Ge=!0)}else for(var c in t)t.hasOwnProperty(c)&&km(e,c,t[c])}function mc(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 U1=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"]]),V1=/^[\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 co(e){return V1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var gc=null;function pc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ws=null,js=null;function qm(e){var t=vs(e);if(t&&(e=t.stateNode)){var l=e[nn]||null;e:switch(e=t.stateNode,t.type){case"input":if(dc(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="'+jn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var o=a[nn]||null;if(!o)throw Error(r(90));dc(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&&Vm(a)}break e;case"textarea":Fm(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ss(e,!!l.multiple,t,!1)}}}var vc=!1;function Qm(e,t,l){if(vc)return e(t,l);vc=!0;try{var a=e(t);return a}finally{if(vc=!1,(ws!==null||js!==null)&&(fu(),ws&&(t=ws,e=js,js=ws=null,qm(t),e)))for(t=0;t<e.length;t++)qm(e[t])}}function $i(e,t){var l=e.stateNode;if(l===null)return null;var a=l[nn]||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"),yc=!1;if(gl)try{var Fi={};Object.defineProperty(Fi,"passive",{get:function(){yc=!0}}),window.addEventListener("test",Fi,Fi),window.removeEventListener("test",Fi,Fi)}catch{yc=!1}var Vl=null,xc=null,fo=null;function Ym(){if(fo)return fo;var e,t=xc,l=t.length,a,o="value"in Vl?Vl.value:Vl.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 fo=o.slice(e,1<a?1-a:void 0)}function ho(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 mo(){return!0}function Im(){return!1}function It(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)?mo:Im,this.isPropagationStopped=Im,this}return O(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=mo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=mo)},persist:function(){},isPersistent:mo}),t}var $l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},go=It($l),Bi=O({},$l,{view:0,detail:0}),$1=It(Bi),Sc,bc,ki,po=O({},Bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jc,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!==ki&&(ki&&e.type==="mousemove"?(Sc=e.screenX-ki.screenX,bc=e.screenY-ki.screenY):bc=Sc=0,ki=e),Sc)},movementY:function(e){return"movementY"in e?e.movementY:bc}}),Xm=It(po),F1=O({},po,{dataTransfer:0}),B1=It(F1),k1=O({},Bi,{relatedTarget:0}),wc=It(k1),G1=O({},$l,{animationName:0,elapsedTime:0,pseudoElement:0}),q1=It(G1),Q1=O({},$l,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Y1=It(Q1),I1=O({},$l,{data:0}),Km=It(I1),X1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K1={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"},Z1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function P1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Z1[e])?!!t[e]:!1}function jc(){return P1}var J1=O({},Bi,{key:function(e){if(e.key){var t=X1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ho(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?K1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jc,charCode:function(e){return e.type==="keypress"?ho(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ho(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),W1=It(J1),eS=O({},po,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zm=It(eS),tS=O({},$l,{submitter:0}),nS=It(tS),lS=O({},Bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jc}),aS=It(lS),sS=O({},$l,{propertyName:0,elapsedTime:0,pseudoElement:0}),iS=It(sS),rS=O({},po,{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}),oS=It(rS),uS=O({},$l,{newState:0,oldState:0,source:0}),cS=It(uS),fS=[9,13,27,32],Cc=gl&&"CompositionEvent"in window,Gi=null;gl&&"documentMode"in document&&(Gi=document.documentMode);var dS=gl&&"TextEvent"in window&&!Gi,Pm=gl&&(!Cc||Gi&&8<Gi&&11>=Gi),Jm=" ",Wm=!1;function eg(e,t){switch(e){case"keyup":return fS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function hS(e,t){switch(e){case"compositionend":return tg(t);case"keypress":return t.which!==32?null:(Wm=!0,Jm);case"textInput":return e=t.data,e===Jm&&Wm?null:e;default:return null}}function mS(e,t){if(Cs)return e==="compositionend"||!Cc&&eg(e,t)?(e=Ym(),fo=xc=Vl=null,Cs=!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 Pm&&t.locale!=="ko"?null:t.data;default:return null}}var gS={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 ng(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gS[e.type]:t==="textarea"}function lg(e,t,l,a){ws?js?js.push(a):js=[a]:ws=a,t=vu(t,"onChange"),0<t.length&&(l=new go("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var qi=null,Qi=null;function pS(e){q0(e,0)}function vo(e){var t=Vi(e);if(Vm(t))return e}function ag(e,t){if(e==="change")return t}var sg=!1;if(gl){var Nc;if(gl){var Ec="oninput"in document;if(!Ec){var ig=document.createElement("div");ig.setAttribute("oninput","return;"),Ec=typeof ig.oninput=="function"}Nc=Ec}else Nc=!1;sg=Nc&&(!document.documentMode||9<document.documentMode)}function rg(){qi&&(qi.detachEvent("onpropertychange",og),Qi=qi=null)}function og(e){if(e.propertyName==="value"&&vo(Qi)){var t=[];lg(t,Qi,e,pc(e)),Qm(pS,t)}}function vS(e,t,l){e==="focusin"?(rg(),qi=t,Qi=l,qi.attachEvent("onpropertychange",og)):e==="focusout"&&rg()}function yS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vo(Qi)}function xS(e,t){if(e==="click")return vo(t)}function SS(e,t){if(e==="input"||e==="change")return vo(t)}function bS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gn=typeof Object.is=="function"?Object.is:bS;function Yi(e,t){if(gn(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(!_e.call(t,o)||!gn(e[o],t[o]))return!1}return!0}function Mc(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 ug(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cg(e,t){var l=ug(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=ug(l)}}function fg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mc(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=Mc(e.document)}return t}function _c(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 wS=gl&&"documentMode"in document&&11>=document.documentMode,Ns=null,Rc=null,Ii=null,Tc=!1;function hg(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Tc||Ns==null||Ns!==Mc(a)||(a=Ns,"selectionStart"in a&&_c(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}),Ii&&Yi(Ii,a)||(Ii=a,a=vu(Rc,"onSelect"),0<a.length&&(t=new go("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ns)))}function Oa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Es={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")},Ac={},mg={};gl&&(mg=document.createElement("div").style,"AnimationEvent"in window||(delete Es.animationend.animation,delete Es.animationiteration.animation,delete Es.animationstart.animation),"TransitionEvent"in window||delete Es.transitionend.transition);function za(e){if(Ac[e])return Ac[e];if(!Es[e])return e;var t=Es[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in mg)return Ac[e]=t[l];return e}var gg=za("animationend"),pg=za("animationiteration"),vg=za("animationstart"),jS=za("transitionrun"),CS=za("transitionstart"),NS=za("transitioncancel"),yg=za("transitionend"),xg=new Map,Oc="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(" ");Oc.push("scrollEnd");function Hn(e,t){xg.set(e,t),Aa(t,[e])}var ES=0;function pl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=$n.identifierPrefix;var l=ES++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function Sg(e){if(e==null||typeof e=="string")return e;var t=null,l=Ys;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=Sg(e),t=Sg(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var yo=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=[],Ms=0,zc=0;function xo(){for(var e=Ms,t=zc=Ms=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&&bg(l,o,c)}}function So(e,t,l,a){Cn[Ms++]=e,Cn[Ms++]=t,Cn[Ms++]=l,Cn[Ms++]=a,zc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Dc(e,t,l,a){return So(e,t,l,a),bo(e)}function Da(e,t){return So(e,null,null,t),bo(e)}function bg(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-nt(l),e=c.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=l|536870912),c):null}function bo(e){if(50<gr)throw gr=0,cu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _s={};function MS(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 ln(e,t,l,a){return new MS(e,t,l,a)}function Hc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yl(e,t){var l=e.alternate;return l===null?(l=ln(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 wg(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 wo(e,t,l,a,o,c){var g=0;if(a=e,typeof a=="function")Hc(a)&&(g=1);else if(typeof a=="string")g=t2(e,l,Qt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(a){case Le:return e=ln(31,l,t,o),e.elementType=Le,e.lanes=c,e;case ne:return Ha(l.children,o,c,t);case oe:g=8,o|=24;break;case ie:return e=ln(12,l,t,o|2),e.elementType=ie,e.lanes=c,e;case J:return e=ln(13,l,t,o),e.elementType=J,e.lanes=c,e;case le:return e=ln(19,l,t,o),e.elementType=le,e.lanes=c,e;case Be:case A:return e=o|32,e=ln(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 W:g=10;break e;case Y:g=9;break e;case X:g=11;break e;case ve: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=ln(g,l,t,o),t.elementType=e,t.type=a,t.lanes=c,t}function Ha(e,t,l,a){return e=ln(7,e,a,t),e.lanes=l,e}function Lc(e,t,l){return e=ln(6,e,null,t),e.lanes=l,e}function jg(e){var t=ln(18,null,null,0);return t.stateNode=e,t}function Uc(e,t,l){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Cg=new WeakMap;function Nn(e,t){if(typeof e=="object"&&e!==null){var l=Cg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:ae(t)},Cg.set(e,t),t)}return{value:e,source:t,stack:ae(t)}}var Rs=[],Ts=0,jo=null,Xi=0,En=[],Mn=0,Fl=null,Pn=1,Jn="";function xl(e,t){Rs[Ts++]=Xi,Rs[Ts++]=jo,jo=e,Xi=t}function Ng(e,t,l){En[Mn++]=Pn,En[Mn++]=Jn,En[Mn++]=Fl,Fl=e;var a=Pn;e=Jn;var o=32-nt(a)-1;a&=~(1<<o),l+=1;var c=32-nt(t)+o;if(30<c){var g=o-o%5;c=(a&(1<<g)-1).toString(32),a>>=g,o-=g,Pn=1<<32-nt(t)+o|l<<o|a,Jn=c+e}else Pn=1<<c|l<<o|a,Jn=e}function Co(e){e.return!==null&&(xl(e,1),Ng(e,1,0))}function Vc(e){for(;e===jo;)jo=Rs[--Ts],Rs[Ts]=null,Xi=Rs[--Ts],Rs[Ts]=null;for(;e===Fl;)Fl=En[--Mn],En[Mn]=null,Jn=En[--Mn],En[Mn]=null,Pn=En[--Mn],En[Mn]=null}function Eg(e,t){En[Mn++]=Pn,En[Mn++]=Jn,En[Mn++]=Fl,Pn=t.id,Jn=t.overflow,Fl=e}var Mt=null,lt=null,Re=!1,Bl=null,_n=!1,$c=Error(r(519));function kl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ki(Nn(t,e)),$c}function Mg(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[At]=e,t[nn]=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<vr.length;l++)Ae(vr[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),$m(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),Bm(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||X0(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=Zn),t=!0):t=!1,t||kl(e,!0)}function No(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 As(e){if(e!==Mt)return!1;if(!Re)return No(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")||pd(e.type,e.memoizedProps)),l=!l),l&&lt&&kl(e),No(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=hv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=hv(e)}else t===27?(t=lt,aa(e.type)?(e=Nd,Nd=null,lt=e):lt=t):lt=Mt?Tn(e.stateNode.nextSibling):null;return!0}function La(){lt=Mt=null,Re=!1}function Fc(){var e=Bl;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),Bl=null),e}function Ki(e){Bl===null?Bl=[e]:Bl.push(e)}var Bc=en(null),Ua=null,Sl=null;function Gl(e,t,l){$e(Bc,t._currentValue),t._currentValue=l}function bl(e){e._currentValue=Bc.current,st(Bc)}function Eo(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 kc(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),Eo(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),Eo(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),Eo(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;gn(o.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(o===Bt.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ni):e=[ni])}o=o.return}return e!==null&&kc(t,e,l,a),t.flags|=262144,e!==null}function Mo(e){for(e=e.firstContext;e!==null;){if(!gn(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 Ot(e){return _g(Ua,e)}function _o(e,t){return Ua===null&&$a(e),_g(e,t)}function _g(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 _S=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()})}},RS=n.unstable_scheduleCallback,TS=n.unstable_NormalPriority,yt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gc(){return{controller:new _S,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&RS(TS,function(){e.controller.abort()})}function Rg(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 Pi=null;function AS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ji=null,qc=0,Fa=0,Os=null;function OS(e,t){if(Ji===null){var l=Ji=[];qc=0,Fa=rd(),Os={status:"pending",value:void 0,then:function(a){l.push(a)}}}return qc++,t.then(Tg,Tg),t}function Tg(){if(--qc===0&&(Pi=null,Ji!==null)){Os!==null&&(Os.status="fulfilled");var e=Ji;Ji=null,Fa=0,Os=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function zS(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 Ag=ce.S;ce.S=function(e,t){if(j0=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&OS(e,t),Pi!==null)for(var l=Zs;l!==null;)Rg(l,Pi),l=l.next;if(l=e.types,l!==null){for(var a=Zs;a!==null;)Rg(a,l),a=a.next;if(Fa!==0){a=Pi,a===null&&(a=Pi=[]);for(var o=0;o<l.length;o++){var c=l[o];a.indexOf(c)===-1&&a.push(c)}}}Ag!==null&&Ag(e,t)};var Ba=en(null);function Qc(){var e=Ba.current;return e!==null?e:tt.pooledCache}function Ro(e,t){t===null?$e(Ba,Ba.current):$e(Ba,t.pool)}function Og(){var e=Qc();return e===null?null:{parent:yt._currentValue,pool:e}}var zs=Error(r(460)),Yc=Error(r(474)),To=Error(r(542)),Ao={then:function(){}};function zg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Dg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Zn,Zn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lg(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(Zn,Zn);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,Lg(e),e}throw Ga=t,zs}}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,zs):l}}var Ga=null;function Hg(){if(Ga===null)throw Error(r(459));var e=Ga;return Ga=null,e}function Lg(e){if(e===zs||e===To)throw Error(r(483))}var Ds=null,Wi=0;function Oo(e){var t=Wi;return Wi+=1,Ds===null&&(Ds=[]),Dg(Ds,e,t)}function ql(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zo(e,t){throw t.$$typeof===I?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ug(e){function t(F,z){if(e){var G=F.deletions;G===null?(F.deletions=[z],F.flags|=16):G.push(z)}}function l(F,z){if(!e)return null;for(;z!==null;)t(F,z),z=z.sibling;return null}function a(F){for(var z=new Map;F!==null;)F.key===null?z.set(F.index,F):z.set(F.key,F),F=F.sibling;return z}function o(F,z){return F=yl(F,z),F.index=0,F.sibling=null,F}function c(F,z,G){return F.index=G,e?(G=F.alternate,G!==null?(G=G.index,G<z?(F.flags|=2,z):G):(F.flags|=134217730,z)):(F.flags|=1048576,z)}function g(F){return e&&F.alternate===null&&(F.flags|=134217730),F}function S(F,z,G,Z){return z===null||z.tag!==6?(z=Lc(G,F.mode,Z),z.return=F,z):(z=o(z,G),z.return=F,z)}function _(F,z,G,Z){var de=G.type;return de===ne?(F=Q(F,z,G.props.children,Z,G.key),ql(F,G),F):z!==null&&(z.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===je&&ka(de)===z.type)?(z=o(z,G.props),ql(z,G),z.return=F,z):(z=wo(G.type,G.key,G.props,null,F.mode,Z),ql(z,G),z.return=F,z)}function B(F,z,G,Z){return z===null||z.tag!==4||z.stateNode.containerInfo!==G.containerInfo||z.stateNode.implementation!==G.implementation?(z=Uc(G,F.mode,Z),z.return=F,z):(z=o(z,G.children||[]),z.return=F,z)}function Q(F,z,G,Z,de){return z===null||z.tag!==7?(z=Ha(G,F.mode,Z,de),z.return=F,z):(z=o(z,G),z.return=F,z)}function P(F,z,G){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Lc(""+z,F.mode,G),z.return=F,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case ee:return G=wo(z.type,z.key,z.props,null,F.mode,G),ql(G,z),G.return=F,G;case k:return z=Uc(z,F.mode,G),z.return=F,z;case je:return z=ka(z),P(F,z,G)}if(Ce(z)||ue(z))return z=Ha(z,F.mode,G,null),z.return=F,z;if(typeof z.then=="function")return P(F,Oo(z),G);if(z.$$typeof===W)return P(F,_o(F,z),G);zo(F,z)}return null}function $(F,z,G,Z){var de=z!==null?z.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return de!==null?null:S(F,z,""+G,Z);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case ee:return G.key===de?_(F,z,G,Z):null;case k:return G.key===de?B(F,z,G,Z):null;case je:return G=ka(G),$(F,z,G,Z)}if(Ce(G)||ue(G))return de!==null?null:Q(F,z,G,Z,null);if(typeof G.then=="function")return $(F,z,Oo(G),Z);if(G.$$typeof===W)return $(F,z,_o(F,G),Z);zo(F,G)}return null}function q(F,z,G,Z,de){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return F=F.get(G)||null,S(z,F,""+Z,de);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case ee:return F=F.get(Z.key===null?G:Z.key)||null,_(z,F,Z,de);case k:return F=F.get(Z.key===null?G:Z.key)||null,B(z,F,Z,de);case je:return Z=ka(Z),q(F,z,G,Z,de)}if(Ce(Z)||ue(Z))return F=F.get(G)||null,Q(z,F,Z,de,null);if(typeof Z.then=="function")return q(F,z,G,Oo(Z),de);if(Z.$$typeof===W)return q(F,z,G,_o(z,Z),de);zo(z,Z)}return null}function se(F,z,G,Z){for(var de=null,ze=null,pe=z,xe=z=0,bt=null;pe!==null&&xe<G.length;xe++){pe.index>xe?(bt=pe,pe=null):bt=pe.sibling;var Ue=$(F,pe,G[xe],Z);if(Ue===null){pe===null&&(pe=bt);break}e&&pe&&Ue.alternate===null&&t(F,pe),z=c(Ue,z,xe),ze===null?de=Ue:ze.sibling=Ue,ze=Ue,pe=bt}if(xe===G.length)return l(F,pe),Re&&xl(F,xe),de;if(pe===null){for(;xe<G.length;xe++)pe=P(F,G[xe],Z),pe!==null&&(z=c(pe,z,xe),ze===null?de=pe:ze.sibling=pe,ze=pe);return Re&&xl(F,xe),de}for(pe=a(pe);xe<G.length;xe++)bt=q(pe,F,xe,G[xe],Z),bt!==null&&(e&&(Ue=bt.alternate,Ue!==null&&pe.delete(Ue.key===null?xe:Ue.key)),z=c(bt,z,xe),ze===null?de=bt:ze.sibling=bt,ze=bt);return e&&pe.forEach(function(ua){return t(F,ua)}),Re&&xl(F,xe),de}function he(F,z,G,Z){if(G==null)throw Error(r(151));for(var de=null,ze=null,pe=z,xe=z=0,bt=null,Ue=G.next();pe!==null&&!Ue.done;xe++,Ue=G.next()){pe.index>xe?(bt=pe,pe=null):bt=pe.sibling;var ua=$(F,pe,Ue.value,Z);if(ua===null){pe===null&&(pe=bt);break}e&&pe&&ua.alternate===null&&t(F,pe),z=c(ua,z,xe),ze===null?de=ua:ze.sibling=ua,ze=ua,pe=bt}if(Ue.done)return l(F,pe),Re&&xl(F,xe),de;if(pe===null){for(;!Ue.done;xe++,Ue=G.next())Ue=P(F,Ue.value,Z),Ue!==null&&(z=c(Ue,z,xe),ze===null?de=Ue:ze.sibling=Ue,ze=Ue);return Re&&xl(F,xe),de}for(pe=a(pe);!Ue.done;xe++,Ue=G.next())Ue=q(pe,F,xe,Ue.value,Z),Ue!==null&&(e&&(bt=Ue.alternate,bt!==null&&pe.delete(bt.key===null?xe:bt.key)),z=c(Ue,z,xe),ze===null?de=Ue:ze.sibling=Ue,ze=Ue);return e&&pe.forEach(function(h2){return t(F,h2)}),Re&&xl(F,xe),de}function Me(F,z,G,Z){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 ee:e:{for(var de=G.key;z!==null;){if(z.key===de){if(de=G.type,de===ne){if(z.tag===7){l(F,z.sibling),Z=o(z,G.props.children),ql(Z,G),Z.return=F,F=Z;break e}}else if(z.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===je&&ka(de)===z.type){l(F,z.sibling),Z=o(z,G.props),ql(Z,G),Z.return=F,F=Z;break e}l(F,z);break}else t(F,z);z=z.sibling}G.type===ne?(Z=Ha(G.props.children,F.mode,Z,G.key),ql(Z,G),Z.return=F,F=Z):(Z=wo(G.type,G.key,G.props,null,F.mode,Z),ql(Z,G),Z.return=F,F=Z)}return g(F);case k:e:{for(de=G.key;z!==null;){if(z.key===de)if(z.tag===4&&z.stateNode.containerInfo===G.containerInfo&&z.stateNode.implementation===G.implementation){l(F,z.sibling),Z=o(z,G.children||[]),Z.return=F,F=Z;break e}else{l(F,z);break}else t(F,z);z=z.sibling}Z=Uc(G,F.mode,Z),Z.return=F,F=Z}return g(F);case je:return G=ka(G),Me(F,z,G,Z)}if(Ce(G))return se(F,z,G,Z);if(ue(G)){if(de=ue(G),typeof de!="function")throw Error(r(150));return G=de.call(G),he(F,z,G,Z)}if(typeof G.then=="function")return Me(F,z,Oo(G),Z);if(G.$$typeof===W)return Me(F,z,_o(F,G),Z);zo(F,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,z!==null&&z.tag===6?(l(F,z.sibling),Z=o(z,G),Z.return=F,F=Z):(l(F,z),Z=Lc(G,F.mode,Z),Z.return=F,F=Z),g(F)):l(F,z)}return function(F,z,G,Z){try{Wi=0;var de=Me(F,z,G,Z);return Ds=null,de}catch(pe){if(pe===zs||pe===To)throw pe;var ze=ln(29,pe,null,F.mode);return ze.lanes=Z,ze.return=F,ze}finally{}}}var qa=Ug(!0),Vg=Ug(!1),Ql=!1;function Ic(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xc(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 Yl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Il(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ye&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=bo(e),bg(e,null,l),t}return So(e,a,t,l),bo(e)}function er(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,Nm(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 Zc=!1;function tr(){if(Zc){var e=Os;if(e!==null)throw e}}function nr(e,t,l,a){Zc=!1;var o=e.updateQueue;Ql=!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 P=o.baseState;g=0,Q=B=_=null,S=c;do{var $=S.lane&-536870913,q=$!==S.lane;if(q?(Oe&$)===$:(a&$)===$){$!==0&&$===Fa&&(Zc=!0),Q!==null&&(Q=Q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var se=e,he=S;$=t;var Me=l;switch(he.tag){case 1:if(se=he.payload,typeof se=="function"){P=se.call(Me,P,$);break e}P=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=he.payload,$=typeof se=="function"?se.call(Me,P,$):se,$==null)break e;P=O({},P,$);break e;case 2:Ql=!0}}$=S.callback,$!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[$]:q.push($))}else q={lane:$,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Q===null?(B=Q=q,_=P):Q=Q.next=q,g|=$;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&&(_=P),o.baseState=_,o.firstBaseUpdate=B,o.lastBaseUpdate=Q,c===null&&(o.shared.lanes=0),ea|=g,e.lanes=g,e.memoizedState=P}}function $g(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Fg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)$g(l[e],t)}var Xl=en(null),Do=en(0);function Bg(e,t){e=El,$e(Do,e),$e(Xl,t),El=e|t.baseLanes}function Pc(){$e(Do,El),$e(Xl,Xl.current)}function Jc(){El=Do.current,st(Xl),st(Do)}var zt=en(null),kt=null;function Kl(e){var t=e.alternate;$e(Dt,Dt.current&1),$e(zt,e),kt===null&&(t===null||Xl.current!==null||t.memoizedState!==null)&&(kt=e)}function Wc(e){$e(Dt,Dt.current),$e(zt,e),kt===null&&(kt=e)}function kg(e){e.tag===22?($e(Dt,Dt.current),$e(zt,e),kt===null&&(kt=e)):Zl()}function Zl(){$e(Dt,Dt.current),$e(zt,zt.current)}function pn(e){st(zt),kt===e&&(kt=null),st(Dt)}var Dt=en(0);function lr(e,t){$e(zt,zt.current),$e(Dt,t)}function ef(e){st(Dt),st(zt),kt===e&&(kt=null)}function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||jd(l)||Cd(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,Ee=null,We=null,xt=null,Lo=!1,Hs=!1,Qa=!1,Uo=0,ar=0,Ls=null,DS=0;function mt(){throw Error(r(321))}function tf(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!gn(e[l],t[l]))return!1;return!0}function nf(e,t,l,a,o,c){return wl=c,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ce.H=e===null||e.memoizedState===null?Np:Ep,Qa=!1,c=l(a,o),Qa=!1,Hs&&(c=qg(t,l,a,o)),Gg(e),c}function Gg(e){ce.H=qo;var t=We!==null&&We.next!==null;if(wl=0,xt=We=Ee=null,Lo=!1,ar=0,Ls=null,t)throw Error(r(300));e===null||St||(e=e.dependencies,e!==null&&Mo(e)&&(St=!0))}function qg(e,t,l,a){Ee=e;var o=0;do{if(Hs&&(Ls=null),ar=0,Hs=!1,25<=o)throw Error(r(301));if(o+=1,xt=We=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}ce.H=kS,c=t(l,a)}while(Hs);return c}function HS(){var e=ce.H,t=e.useState()[0];return t=typeof t.then=="function"?sr(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Ee.flags|=1024),t}function lf(){var e=Uo!==0;return Uo=0,e}function af(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function sf(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}wl=0,xt=We=Ee=null,Hs=!1,ar=Uo=0,Ls=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Ee.memoizedState=xt=e:xt=xt.next=e,xt}function pt(){if(We===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=xt===null?Ee.memoizedState:xt.next;if(t!==null)xt=t,We=e;else{if(e===null)throw Ee.alternate===null?Error(r(467)):Error(r(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},xt===null?Ee.memoizedState=xt=e:xt=xt.next=e}return xt}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sr(e){var t=ar;return ar+=1,Ls===null&&(Ls=[]),e=Dg(Ls,e,t),t=Ee,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,ce.H=t===null||t.memoizedState===null?Np:Ep),e}function $o(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return sr(e);if(e.$$typeof===V)return;if(e.$$typeof===W)return Ot(e)}throw Error(r(438,String(e)))}function rf(e){var t=null,l=Ee.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=Ee.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=Vo(),Ee.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]=Xe;return t.index++,l}function jl(e,t){return typeof t=="function"?t(e):t}function Fo(e){var t=pt();return of(t,We,e)}function of(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 P=B.lane&-536870913;if(P!==B.lane?(Oe&P)===P:(wl&P)===P){var $=B.revertLane;if($===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),P===Fa&&(Q=!0);else if((wl&$)===$){B=B.next,$===Fa&&(Q=!0);continue}else P={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=P,g=c):_=_.next=P,Ee.lanes|=$,ea|=$;P=B.action,Qa&&l(c,P),c=B.hasEagerState?B.eagerState:l(c,P)}else $={lane:P,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=$,g=c):_=_.next=$,Ee.lanes|=P,ea|=P;B=B.next}while(B!==null&&B!==t);if(_===null?g=c:_.next=S,!gn(c,e.memoizedState)&&(St=!0,Q&&(l=Os,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 uf(e){var t=pt(),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);gn(c,t.memoizedState)||(St=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function Qg(e,t,l){var a=Ee,o=pt(),c=Re;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var g=!gn((We||o).memoizedState,l);if(g&&(o.memoizedState=l,St=!0),o=o.queue,df(Xg.bind(null,a,o,e),[e]),e=o.getSnapshot!==t||g||xt!==null&&(xt.memoizedState.tag&1)!==0,Us(e?9:8,{destroy:void 0},Ig.bind(null,a,o,l,t),null),e){if(a.flags|=2048,tt===null)throw Error(r(349));c||(wl&127)!==0||Yg(a,t,l)}return l}function Yg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ee.updateQueue,t===null?(t=Vo(),Ee.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Ig(e,t,l,a){t.value=l,t.getSnapshot=a,Kg(t)&&Zg(e)}function Xg(e,t,l){return l(function(){Kg(t)&&Zg(e)})}function Kg(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!gn(e,l)}catch{return!0}}function Zg(e){var t=Da(e,2);t!==null&&on(t,e,2)}function cf(e){var t=Xt();if(typeof e=="function"){var l=e;if(e=l(),Qa){Qe(!0);try{l()}finally{Qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:e},t}function Pg(e,t,l,a){return e.baseState=l,of(e,We,typeof a=="function"?a:jl)}function LS(e,t,l,a,o){if(Go(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)}};ce.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,Jg(t,c)):(c.next=l.next,t.pending=l.next=c)}}function Jg(e,t){var l=t.action,a=t.payload,o=e.state;if(t.isTransition){var c=ce.T,g={};g.types=c!==null?c.types:null,ce.T=g;try{var S=l(o,a),_=ce.S;_!==null&&_(g,S),Wg(e,t,S)}catch(B){ff(e,t,B)}finally{c!==null&&g.types!==null&&(c.types=g.types),ce.T=c}}else try{c=l(o,a),Wg(e,t,c)}catch(B){ff(e,t,B)}}function Wg(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){ep(e,t,a)},function(a){return ff(e,t,a)}):ep(e,t,l)}function ep(e,t,l){t.status="fulfilled",t.value=l,tp(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Jg(e,l)))}function ff(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,tp(t),t=t.next;while(t!==a)}e.action=null}function tp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function np(e,t){return t}function lp(e,t){if(Re){var l=tt.formState;if(l!==null){e:{var a=Ee;if(Re){if(lt){t:{for(var o=lt,c=_n;o.nodeType!==8;){if(!c){o=null;break t}if(o=Tn(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){lt=Tn(o.nextSibling),a=o.data==="F!";break e}}kl(a)}a=!1}a&&(t=l[0])}}return l=Xt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:np,lastRenderedState:t},l.queue=a,l=wp.bind(null,Ee,a),a.dispatch=l,a=cf(!1),c=vf.bind(null,Ee,!1,a.queue),a=Xt(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,l=LS.bind(null,Ee,o,c,l),o.dispatch=l,a.memoizedState=e,[t,l,!1]}function ap(e){var t=pt();return sp(t,We,e)}function sp(e,t,l){if(t=of(e,t,np)[0],e=Fo(jl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=sr(t)}catch(g){throw g===zs?To:g}else a=t;t=pt();var o=t.queue,c=o.dispatch;return l!==t.memoizedState&&(Ee.flags|=2048,Us(9,{destroy:void 0},US.bind(null,o,l),null)),[a,c,e]}function US(e,t){e.action=t}function ip(e){var t=pt(),l=We;if(l!==null)return sp(t,l,e);pt(),t=t.memoizedState,l=pt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Us(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Vo(),Ee.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 rp(){return pt().memoizedState}function Bo(e,t,l,a){var o=Xt();Ee.flags|=e,o.memoizedState=Us(1|t,{destroy:void 0},l,a===void 0?null:a)}function ko(e,t,l,a){var o=pt();a=a===void 0?null:a;var c=o.memoizedState.inst;We!==null&&a!==null&&tf(a,We.memoizedState.deps)?o.memoizedState=Us(t,c,l,a):(Ee.flags|=e,o.memoizedState=Us(1|t,c,l,a))}function op(e,t){Bo(8390656,8,e,t)}function df(e,t){ko(2048,8,e,t)}function VS(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Vo(),Ee.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function up(e){var t=pt().memoizedState;return VS({ref:t,nextImpl:e}),function(){if((Ye&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function cp(e,t){return ko(4,2,e,t)}function fp(e,t){return ko(4,4,e,t)}function dp(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 hp(e,t,l){l=l!=null?l.concat([e]):null,ko(4,4,dp.bind(null,t,e),l)}function hf(){}function mp(e,t){var l=pt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&tf(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function gp(e,t){var l=pt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&tf(t,a[1]))return a[0];if(a=e(),Qa){Qe(!0);try{e()}finally{Qe(!1)}}return l.memoizedState=[a,t],a}function mf(e,t,l){return l===void 0||(wl&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=N0(),Ee.lanes|=e,ea|=e,l)}function pp(e,t,l,a){return gn(l,t)?l:Xl.current!==null?(e=mf(e,l,a),gn(e,t)||(St=!0),e):(wl&106)===0||(wl&1073741824)!==0&&(Oe&261930)===0?(St=!0,e.memoizedState=l):(e=N0(),Ee.lanes|=e,ea|=e,t)}function vp(e,t,l,a,o){var c=ge.p;ge.p=c!==0&&8>c?c:8;var g=ce.T,S={};S.types=g!==null?g.types:null,ce.T=S,vf(e,!1,t,l);try{var _=o(),B=ce.S;if(B!==null&&B(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Q=zS(_,a);ir(e,t,Q,Sn(e))}else ir(e,t,a,Sn(e))}catch(P){ir(e,t,{then:function(){},status:"rejected",reason:P},Sn())}finally{ge.p=c,g!==null&&S.types!==null&&(g.types=S.types),ce.T=g}}function $S(){}function gf(e,t,l,a){if(e.tag!==5)throw Error(r(476));var o=yp(e).queue;vp(e,o,t,ct,l===null?$S:function(){return xp(e),l(a)})}function yp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ct,baseState:ct,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:ct},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xp(e){var t=yp(e);t.next===null&&(t=e.alternate.memoizedState),ir(e,t.next.queue,{},Sn())}function pf(){return Ot(ni)}function Sp(){return pt().memoizedState}function bp(){return pt().memoizedState}function FS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Sn();e=Yl(l);var a=Il(t,e,l);a!==null&&(on(a,t,l),er(a,t,l)),t={cache:Gc()},e.payload=t;return}t=t.return}}function BS(e,t,l){var a=Sn();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Go(e)?jp(t,l):(l=Dc(e,t,l,a),l!==null&&(on(l,e,a),Cp(l,t,a)))}function wp(e,t,l){var a=Sn();ir(e,t,l,a)}function ir(e,t,l,a){var o={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Go(e))jp(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,gn(S,g))return So(e,t,o,0),tt===null&&xo(),!1}catch{}finally{}if(l=Dc(e,t,o,a),l!==null)return on(l,e,a),Cp(l,t,a),!0}return!1}function vf(e,t,l,a){if(a={lane:2,revertLane:rd(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Go(e)){if(t)throw Error(r(479))}else t=Dc(e,l,a,2),t!==null&&on(t,e,2)}function Go(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function jp(e,t){Hs=Lo=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Cp(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Nm(e,l)}}var qo={readContext:Ot,use:$o,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},Np={readContext:Ot,use:$o,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:op,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Bo(4194308,4,dp.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Bo(4194308,4,e,t)},useInsertionEffect:function(e,t){Bo(4,2,e,t)},useMemo:function(e,t){var l=Xt();t=t===void 0?null:t;var a=e();if(Qa){Qe(!0);try{e()}finally{Qe(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Xt();if(l!==void 0){var o=l(t);if(Qa){Qe(!0);try{l(t)}finally{Qe(!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=BS.bind(null,Ee,e),[a.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=cf(e);var t=e.queue,l=wp.bind(null,Ee,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:hf,useDeferredValue:function(e,t){var l=Xt();return mf(l,e,t)},useTransition:function(){var e=cf(!1);return e=vp.bind(null,Ee,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=Ee,o=Xt();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||Yg(a,t,l)}o.memoizedState=l;var c={value:l,getSnapshot:t};return o.queue=c,op(Xg.bind(null,a,c,e),[e]),a.flags|=2048,Us(9,{destroy:void 0},Ig.bind(null,a,c,l,t),null),l},useId:function(){var e=Xt(),t=tt.identifierPrefix;if(Re){var l=Jn,a=Pn;l=(a&~(1<<32-nt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Uo++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=DS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:pf,useFormState:lp,useActionState:lp,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=vf.bind(null,Ee,!0,l),l.dispatch=t,[e,t]},useMemoCache:rf,useCacheRefresh:function(){return Xt().memoizedState=FS.bind(null,Ee)},useEffectEvent:function(e){var t=Xt(),l={impl:e};return t.memoizedState=l,function(){if((Ye&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Ep={readContext:Ot,use:$o,useCallback:mp,useContext:Ot,useEffect:df,useImperativeHandle:hp,useInsertionEffect:cp,useLayoutEffect:fp,useMemo:gp,useReducer:Fo,useRef:rp,useState:function(){return Fo(jl)},useDebugValue:hf,useDeferredValue:function(e,t){var l=pt();return pp(l,We.memoizedState,e,t)},useTransition:function(){var e=Fo(jl)[0],t=pt().memoizedState;return[typeof e=="boolean"?e:sr(e),t]},useSyncExternalStore:Qg,useId:Sp,useHostTransitionStatus:pf,useFormState:ap,useActionState:ap,useOptimistic:function(e,t){var l=pt();return Pg(l,We,e,t)},useMemoCache:rf,useCacheRefresh:bp,useEffectEvent:up},kS={readContext:Ot,use:$o,useCallback:mp,useContext:Ot,useEffect:df,useImperativeHandle:hp,useInsertionEffect:cp,useLayoutEffect:fp,useMemo:gp,useReducer:uf,useRef:rp,useState:function(){return uf(jl)},useDebugValue:hf,useDeferredValue:function(e,t){var l=pt();return We===null?mf(l,e,t):pp(l,We.memoizedState,e,t)},useTransition:function(){var e=uf(jl)[0],t=pt().memoizedState;return[typeof e=="boolean"?e:sr(e),t]},useSyncExternalStore:Qg,useId:Sp,useHostTransitionStatus:pf,useFormState:ip,useActionState:ip,useOptimistic:function(e,t){var l=pt();return We!==null?Pg(l,We,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:rf,useCacheRefresh:bp,useEffectEvent:up};function yf(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:O({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var xf={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Sn(),o=Yl(a);o.payload=t,l!=null&&(o.callback=l),t=Il(e,o,a),t!==null&&(on(t,e,a),er(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Sn(),o=Yl(a);o.tag=1,o.payload=t,l!=null&&(o.callback=l),t=Il(e,o,a),t!==null&&(on(t,e,a),er(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Sn(),a=Yl(l);a.tag=2,t!=null&&(a.callback=t),t=Il(e,a,l),t!==null&&(on(t,e,l),er(t,e,l))}};function Mp(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?!Yi(l,a)||!Yi(o,c):!0}function _p(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&&xf.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=O({},l));for(var o in e)l[o]===void 0&&(l[o]=e[o])}return l}function Rp(e){yo(e)}function Tp(e){console.error(e)}function Ap(e){yo(e)}function Qo(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Op(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 Sf(e,t,l){return l=Yl(l),l.tag=3,l.payload={element:null},l.callback=function(){Qo(e,t)},l}function zp(e){return e=Yl(e),e.tag=3,e}function Dp(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(){Op(t,l,a)}}var g=l.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Op(t,l,a),typeof o!="function"&&(ta===null?ta=new Set([this]):ta.add(this));var S=a.stack;this.componentDidCatch(a.value,{componentStack:S!==null?S:""})})}function GS(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=zt.current,l!==null){switch(l.tag){case 31:case 13:case 19:return kt===null?du():l.alternate===null&&gt===0&&(gt=3),l.flags&=-257,l.flags|=65536,l.lanes=o,a===Ao?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),ad(e,a,o)),!1;case 22:return l.flags|=65536,a===Ao?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)),ad(e,a,o)),!1}throw Error(r(435,l.tag))}return ad(e,a,o),du(),!1}if(Re)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==$c&&(e=Error(r(422),{cause:a}),Ki(Nn(e,l)))):(a!==$c&&(t=Error(r(423),{cause:a}),Ki(Nn(t,l))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=Nn(a,l),o=Sf(e.stateNode,a,o),Kc(e,o),gt!==4&&(gt=2)),!1;var c=Error(r(520),{cause:a});if(c=Nn(c,l),mr===null?mr=[c]:mr.push(c),gt!==4&&(gt=2),t===null)return!0;a=Nn(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=o&-o,l.lanes|=e,e=Sf(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"&&(ta===null||!ta.has(c))))return l.flags|=65536,o&=-o,l.lanes|=o,o=zp(o),Dp(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 bf=Error(r(461)),St=!1;function Ct(e,t,l,a){t.child=e===null?Vg(t,null,l,a):qa(t,e.child,l,a)}function Hp(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=nf(e,t,l,g,c,o),S=lf(),e!==null&&!St?(af(e,t,o),Cl(e,t,o)):(Re&&S&&Co(t),t.flags|=1,Ct(e,t,a,o),t.child)}function Lp(e,t,l,a,o){if(e===null){var c=l.type;return typeof c=="function"&&!Hc(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,Up(e,t,c,a,o)):(e=wo(l.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Rf(e,o)){var g=c.memoizedProps;if(l=l.compare,l=l!==null?l:Yi,l(g,a)&&e.ref===t.ref)return Cl(e,t,o)}return t.flags|=1,e=yl(c,a),e.ref=t.ref,e.return=t,t.child=e}function Up(e,t,l,a,o){if(e!==null){var c=e.memoizedProps;if(Yi(c,a)&&e.ref===t.ref)if(St=!1,t.pendingProps=a=c,Rf(e,o))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,Cl(e,t,o)}return wf(e,t,l,a,o)}function Vp(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 $p(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ro(t,c!==null?c.cachePool:null),c!==null?Bg(t,c):Pc(),kg(t);else return a=t.lanes=536870912,$p(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(Ro(t,c.cachePool),Bg(t,c),Zl(),t.memoizedState=null):(e!==null&&Ro(t,null),Pc(),Zl());return Ct(e,t,o,l),t.child}function rr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $p(e,t,l,a,o){var c=Qc();return c=c===null?null:{parent:yt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Ro(t,null),Pc(),kg(t),e!==null&&Va(e,t,a,!0),t.childLanes=o,null}function Yo(e,t){return t=Io({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fp(e,t,l){return qa(t,e.child,null,l),e=Yo(t,t.pendingProps),e.flags|=2,pn(t),t.memoizedState=null,e}function qS(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=Yo(t,a),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},rr(null,e);if(Wc(t),(e=lt)?(e=dv(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fl!==null?{id:Pn,overflow:Jn}:null,retryLane:536870912,hydrationErrors:null},l=jg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw kl(t);return t.lanes=536870912,null}return Yo(t,a)}var c=e.memoizedState;if(c!==null){var g=c.dehydrated;if(Wc(t),o)if(t.flags&256)t.flags&=-257,t=Fp(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(Xl.current===null){if(a=tt,a!==null&&(g=Em(a,l),g!==0&&g!==c.retryLane))throw c.retryLane=g,Da(e,g),on(a,e,g),bf;du()}t=Fp(e,t,l)}else e=c.treeContext,lt=Tn(g.nextSibling),Mt=t,Re=!0,Bl=null,_n=!1,e!==null&&Eg(t,e),t=Yo(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 Vs(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 wf(e,t,l,a,o){return $a(t),l=nf(e,t,l,a,void 0,o),a=lf(),e!==null&&!St?(af(e,t,o),Cl(e,t,o)):(Re&&a&&Co(t),t.flags|=1,Ct(e,t,l,o),t.child)}function Bp(e,t,l,a,o,c){return $a(t),t.updateQueue=null,l=qg(t,a,l,o),Gg(e),a=lf(),e!==null&&!St?(af(e,t,c),Cl(e,t,c)):(Re&&a&&Co(t),t.flags|=1,Ct(e,t,l,c),t.child)}function kp(e,t,l,a,o){if($a(t),t.stateNode===null){var c=_s,g=l.contextType;typeof g=="object"&&g!==null&&(c=Ot(g)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=xf,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},Ic(t),g=l.contextType,c.context=typeof g=="object"&&g!==null?Ot(g):_s,c.state=t.memoizedState,g=l.getDerivedStateFromProps,typeof g=="function"&&(yf(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&&xf.enqueueReplaceState(c,c.state,null),nr(t,a,c,o),tr(),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=_s,typeof Q=="object"&&Q!==null&&(g=Ot(Q));var P=l.getDerivedStateFromProps;Q=typeof P=="function"||typeof c.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(S||B!==g)&&_p(t,c,a,g),Ql=!1;var $=t.memoizedState;c.state=$,nr(t,a,c,o),tr(),B=t.memoizedState,S||$!==B||Ql?(typeof P=="function"&&(yf(t,l,P,a),B=t.memoizedState),(_=Ql||Mp(t,l,_,a,$,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,Xc(e,t),g=t.memoizedProps,Q=Ya(l,g),c.props=Q,P=t.pendingProps,$=c.context,B=l.contextType,_=_s,typeof B=="object"&&B!==null&&(_=Ot(B)),S=l.getDerivedStateFromProps,(B=typeof S=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g!==P||$!==_)&&_p(t,c,a,_),Ql=!1,$=t.memoizedState,c.state=$,nr(t,a,c,o),tr();var q=t.memoizedState;g!==P||$!==q||Ql||e!==null&&e.dependencies!==null&&Mo(e.dependencies)?(typeof S=="function"&&(yf(t,l,S,a),q=t.memoizedState),(Q=Ql||Mp(t,l,Q,a,$,q,_)||e!==null&&e.dependencies!==null&&Mo(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&&$===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&$===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&&$===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,Vs(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)):Ct(e,t,l,o),t.memoizedState=c.state,e=t.child):e=Cl(e,t,o),e}function Gp(e,t,l,a){return La(),t.flags|=256,Ct(e,t,l,a),t.child}var jf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cf(e){return{baseLanes:e,cachePool:Og()}}function Nf(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=xn),e}function qp(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:(Dt.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(o?Kl(t):Zl(),(e=lt)?(e=dv(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fl!==null?{id:Pn,overflow:Jn}:null,retryLane:536870912,hydrationErrors:null},l=jg(e),l.return=t,t.child=l,Mt=t,lt=null)):e=null,e===null)throw kl(t);return Cd(e)?t.lanes=32:t.lanes=536870912,null}return c=a.children,a=a.fallback,o?(Zl(),o=t.mode,c=Io({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=Cf(l),a.childLanes=Nf(e,g,l),t.memoizedState=jf,rr(null,a)):(Kl(t),Ef(t,c))}var S=e.memoizedState;if(S!==null){var _=S.dehydrated;if(_!==null)return QS(e,t,c,g,a,_,S,l)}return o?(Zl(),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,rr(null,a),a=t.child,o=e.child.memoizedState,o===null?o=Cf(l):(c=o.cachePool,c!==null?(S=yt._currentValue,c=c.parent!==S?{parent:S,pool:S}:c):c=Og(),o={baseLanes:o.baseLanes|l,cachePool:c}),a.memoizedState=o,a.childLanes=Nf(e,g,l),t.memoizedState=jf,rr(e.child,a)):(Kl(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 Ef(e,t){return t=Io({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Io(e,t){return e=ln(22,e,null,t),e.lanes=0,e}function Xo(e,t,l){return qa(t,e.child,null,l),e=Ef(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function QS(e,t,l,a,o,c,g,S){if(l)return t.flags&256?(Kl(t),t.flags&=-257,Xo(e,t,S)):t.memoizedState!==null?(Zl(),t.child=e.child,t.flags|=128,null):(Zl(),c=o.fallback,g=t.mode,o=Io({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=Cf(S),o.childLanes=Nf(e,a,S),t.memoizedState=jf,rr(null,o));if(Kl(t),Cd(c)){if(a=c.nextSibling&&c.nextSibling.dataset,a)var _=a.dgst;return a=_,a!==""&&(o=Error(r(419)),o.stack="",o.digest=a,Ki({value:o,source:null,stack:null})),Xo(e,t,S)}if(St||Va(e,t,S,!1),a=(S&e.childLanes)!==0,St||a){if(Xl.current!==null)return Xo(e,t,S);if(a=tt,a!==null&&(o=Em(a,S),o!==0&&o!==g.retryLane))throw g.retryLane=o,Da(e,o),on(a,e,o),bf;return jd(c)||du(),Xo(e,t,S)}return jd(c)?(t.flags|=192,t.child=e.child,null):(e=g.treeContext,lt=Tn(c.nextSibling),Mt=t,Re=!0,Bl=null,_n=!1,e!==null&&Eg(t,e),t=Ef(t,o.children),t.flags|=134221824,t)}function Qp(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Eo(e.return,t,l)}function Yp(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Ho(l)===null&&(t=e),e=e.sibling}return t}function Ko(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 Mf(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 _f(e,t,l){var a=t.pendingProps,o=a.revealOrder,c=a.tail;a=a.children;var g=Dt.current;if(t.flags&128)return lr(t,g),null;var S=(g&2)!==0;if(S?(g=g&1|2,t.flags|=128):g&=1,lr(t,g),o==="backwards"&&e!==null?(Mf(e),Ct(e,t,a,l),Mf(e)):Ct(e,t,a,l),a=Re?Xi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qp(e,l,t);else if(e.tag===19)Qp(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=Yp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null,Mf(t)),Ko(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&&Ho(e)===null){t.child=o;break}e=o.sibling,o.sibling=l,l=o,o=e}Ko(t,!0,l,null,c,a);break;case"together":Ko(t,!1,null,null,void 0,a);break;case"independent":t.memoizedState=null;break;default:l=Yp(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null),Ko(t,!1,o,l,c,a)}return t.child}function Ip(e,t,l){var a=t.pendingProps;return Gl(t,t.type,a.value),Ct(e,t,a.children,l),t.child}function Cl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ea|=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 Rf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Mo(e)))}function YS(e,t,l){switch(t.tag){case 3:dl(t,t.stateNode.containerInfo),Gl(t,yt,e.memoizedState.cache),La();break;case 27:case 5:fn(t);break;case 4:dl(t,t.stateNode.containerInfo);break;case 10:Gl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Wc(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return Kl(t),t.flags|=128,null;a=Va(e,t,l,!1);var o=t.child.childLanes;return a||(l&o)!==0?qp(e,t,l):(Kl(t),e=Cl(e,t,l),e!==null?e.sibling:null)}Kl(t);break;case 19:if(t.flags&128)return _f(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 _f(e,t,l);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),lr(t,Dt.current),a)break;return null;case 22:return t.lanes=0,Vp(e,t,l,t.pendingProps);case 24:Gl(t,yt,e.memoizedState.cache)}return Cl(e,t,l)}function Xp(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!Rf(e,l)&&(t.flags&128)===0)return St=!1,YS(e,t,l);St=(e.flags&131072)!==0}else St=!1,Re&&(t.flags&1048576)!==0&&Ng(t,Xi,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")Hc(e)?(a=Ya(e,a),t.tag=1,t=kp(null,t,e,a,l)):(t.tag=0,t=wf(null,t,e,a,l));else{if(e!=null){var o=e.$$typeof;if(o===X){t.tag=11,t=Hp(null,t,e,a,l);break e}else if(o===ve){t.tag=14,t=Lp(null,t,e,a,l);break e}else if(o===W){t.tag=10,t.type=e,t=Ip(null,t,l);break e}}throw t=Se(e)||e,Error(r(306,t,""))}}return t;case 0:return wf(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,o=Ya(a,t.pendingProps),kp(e,t,a,o,l);case 3:e:{if(dl(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;o=c.element,Xc(e,t),nr(t,a,null,l);var g=t.memoizedState;if(a=g.cache,Gl(t,yt,a),a!==c.cache&&kc(t,[yt],l,!0),tr(),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=Gp(e,t,a,l);break e}else if(a!==o){o=Nn(Error(r(424)),t),Ki(o),t=Gp(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=Tn(e.firstChild),Mt=t,Re=!0,Bl=null,_n=!0,l=Vg(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(La(),a===o){t=Cl(e,t,l);break e}Ct(e,t,a,l)}t=t.child}return t;case 26:return Vs(e,t),e===null?(l=xv(t.type,null,t.pendingProps,null))?t.memoizedState=l:Re||(t.stateNode=J0(t.type,t.pendingProps,tn.current,t)):t.memoizedState=xv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fn(t),e===null&&Re&&(a=t.stateNode=gv(t.type,t.pendingProps,tn.current),Mt=t,_n=!0,o=lt,aa(t.type)?(Nd=o,lt=Tn(a.firstChild)):lt=o),Ct(e,t,t.pendingProps.children,l),Vs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((o=a=lt)&&(a=Fb(a,t.type,t.pendingProps,_n),a!==null?(t.stateNode=a,Mt=t,lt=Tn(a.firstChild),_n=!1,o=!0):o=!1),o||kl(t)),fn(t),o=t.type,c=t.pendingProps,g=e!==null?e.memoizedProps:null,a=c.children,pd(o,c)?a=null:g!==null&&pd(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=nf(e,t,HS,null,null,l),ni._currentValue=o),Vs(e,t),Ct(e,t,a,l),t.child;case 6:return e===null&&Re&&((e=l=lt)&&(l=Bb(l,t.pendingProps,_n),l!==null?(t.stateNode=l,Mt=t,lt=null,e=!0):e=!1),e||kl(t)),null;case 13:return qp(e,t,l);case 4:return dl(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=qa(t,null,a,l):Ct(e,t,a,l),t.child;case 11:return Hp(e,t,t.type,t.pendingProps,l);case 7:return a=t.pendingProps,Vs(e,t),Ct(e,t,a,l),t.child;case 8:return Ct(e,t,t.pendingProps.children,l),t.child;case 12:return Ct(e,t,t.pendingProps.children,l),t.child;case 10:return Ip(e,t,l);case 9:return o=t.type._context,a=t.pendingProps.children,$a(t),o=Ot(o),a=a(o),t.flags|=1,Ct(e,t,a,l),t.child;case 14:return Lp(e,t,t.type,t.pendingProps,l);case 15:return Up(e,t,t.type,t.pendingProps,l);case 19:return _f(e,t,l);case 31:return qS(e,t,l);case 22:return Vp(e,t,l,t.pendingProps);case 24:return $a(t),a=Ot(yt),e===null?(o=Qc(),o===null&&(o=tt,c=Gc(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=l),o=c),t.memoizedState={parent:a,cache:o},Ic(t),Gl(t,yt,o)):((e.lanes&l)!==0&&(Xc(e,t),nr(t,null,null,l),tr()),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),Gl(t,yt,a)):(a=c.cache,Gl(t,yt,a),a!==o.cache&&kc(t,[yt],l,!0))),Ct(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&&Co(t),e!==null&&e.memoizedProps.name!==a.name?t.flags|=4194816:Vs(e,t),Ct(e,t,a.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Nl(e){e.flags|=4}function Tf(e,t,l,a,o){var c;if((c=(e.mode&32)!==0)&&(c=l===null?jv(t,a):jv(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(R0())e.flags|=8192;else throw Ga=Ao,Yc}else e.flags&=-16777217}function Kp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cv(t))if(R0())e.flags|=8192;else throw Ga=Ao,Yc}function Zo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jm():536870912,e.lanes|=t,Gs|=t)}function or(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 IS(e,t,l){var a=t.pendingProps;switch(Vc(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),ht(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(As(t)?Nl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fc())),at(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(Nl(t),c!==null?(at(t),Kp(t,c)):(at(t),Tf(t,o,null,a,l))):c?c!==e.memoizedState?(Nl(t),at(t),Kp(t,c)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Nl(t),at(t),Tf(t,o,e,a,l)),null;case 27:if(Yt(t),l=tn.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Nl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}e=Qt.current,As(t)?Mg(t):(e=gv(o,a,l),t.stateNode=e,Nl(t))}return at(t),t.subtreeFlags&=-33554433,null;case 5:if(Yt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Nl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return at(t),t.subtreeFlags&=-33554433,null}if(c=Qt.current,As(t))Mg(t);else{var g=xr(tn.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[At]=t,c[nn]=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(Lt(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&&Nl(t)}}return at(t),t.subtreeFlags&=-33554433,Tf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Nl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=tn.current,As(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[At]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||X0(e.nodeValue,l)),e||kl(t,!0)}else e=xr(e).createTextNode(a),e[At]=t,t.stateNode=e}return at(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=As(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[At]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else l=Fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(pn(t),t):(pn(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=As(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[At]=t}else La(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),o=!1}else o=Fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(pn(t),t):(pn(t),null)}return pn(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),Zo(t,t.updateQueue),at(t),null);case 4:return ht(),e===null&&fd(t.stateNode.containerInfo),t.flags|=67108864,at(t),null;case 10:return bl(t.type),at(t),null;case 19:if(ef(t),a=t.memoizedState,a===null)return at(t),null;if(o=(t.flags&128)!==0,c=a.rendering,c===null)if(o)or(a,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Ho(e),c!==null){for(t.flags|=128,or(a,!1),e=c.updateQueue,t.updateQueue=e,Zo(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)wg(l,e),l=l.sibling;return lr(t,Dt.current&1|2),Re&&xl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&et()>ou&&(t.flags|=128,o=!0,or(a,!1),t.lanes=4194304)}else{if(!o)if(e=Ho(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Zo(t,e),or(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!c.alternate&&!Re)return at(t),null}else 2*et()-a.renderingStartTime>ou&&l!==536870912&&(t.flags|=128,o=!0,or(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=Dt.current,c=o?c&1|2:c&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||Re?lr(t,c):(l=c,$e(zt,t),$e(Dt,l),kt===null&&(kt=t)),Re&&xl(t,a.treeForkCount),e}return at(t),null;case 22:case 23:return pn(t),Jc(),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&&Zo(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&&st(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 XS(e,t){switch(Vc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bl(yt),ht(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Yt(t),null;case 31:if(t.memoizedState!==null){if(pn(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(pn(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 ef(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 ht(),null;case 10:return bl(t.type),null;case 22:case 23:return pn(t),Jc(),e!==null&&st(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 Zp(e,t){switch(Vc(t),t.tag){case 3:bl(yt),ht();break;case 26:case 27:case 5:Yt(t);break;case 4:ht();break;case 31:t.memoizedState!==null&&pn(t);break;case 13:pn(t);break;case 19:ef(t);break;case 10:bl(t.type);break;case 22:case 23:pn(t),Jc(),e!==null&&st(Ba);break;case 24:bl(yt)}}function ur(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){Pe(t,t.return,S)}}function Pl(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){Pe(o,_,Q)}}}a=a.next}while(a!==c)}}catch(Q){Pe(t,t.return,Q)}}function Pp(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Fg(t,l)}catch(a){Pe(e,e.return,a)}}}function Jp(e,t,l){l.props=Ya(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Pe(e,t,a)}}function Wn(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=sv(c)),a=o.ref;break;case 7:if(e.stateNode===null){var g=new bn(e);v(e.child,!1,Vb,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){Pe(e,t,S)}}function Ht(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(o){Pe(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){Pe(e,t,o)}else l.current=null}function Po(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++)fv(e.stateNode,t[l])}function Wp(e){for(var t=e.return;t!==null&&(Of(t)&&fv(e.stateNode,t.stateNode),!Af(t));)t=t.return}function cr(e){for(var t=e.return;t!==null&&(Of(t)&&$b(e.stateNode,t.stateNode),!Af(t));)t=t.return}function Af(e){return e.tag===5||e.tag===3||e.tag===27}function Of(e){return e&&e.tag===7&&e.stateNode!==null}function zf(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){Pe(e,e.return,o)}}function Df(e,t,l){try{var a=e.stateNode;Sb(a,e.type,l,t),a[nn]=t}catch(o){Pe(e,e.return,o)}}function e0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&aa(e.type)||e.tag===4}function Hf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||e0(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&&aa(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 Lf(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=Zn)),Po(e,a),Ge=!0;else if(o!==4&&(o===27&&(Po(e,a),a=null,aa(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(Lf(e,t,l,a),e=e.sibling;e!==null;)Lf(e,t,l,a),e=e.sibling}function Jo(e,t,l,a){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?l.insertBefore(o,t):l.appendChild(o),Po(e,a),Ge=!0;else if(o!==4&&(o===27&&(Po(e,a),a=null,aa(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Jo(e,t,l,a),e=e.sibling;e!==null;)Jo(e,t,l,a),e=e.sibling}function t0(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Lt(t,a,l),t[At]=e,t[nn]=l}catch(c){Pe(e,e.return,c)}}var Wo=!1,vn=null;function n0(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Wo=!0)}var el=null;function l0(){var e=el;return el=null,e}var an=0;function $s(e,t,l,a,o){return an=0,a0(e.child,t,l,a,o)}function a0(e,t,l,a,o){for(var c=!1;e!==null;){if(e.tag===5){var g=e.stateNode;if(a!==null){var S=xd(g);a.push(S),S.view&&(c=!0)}else c||xd(g).view&&(c=!0);Wo=!0,lv(g,an===0?t:t+"_"+an,l),an++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||a0(e.child,t,l,a,o)&&(c=!0));e=e.sibling}return c}function tl(e,t){for(;e!==null;)e.tag===5?av(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||tl(e.child,t)),e=e.sibling}function eu(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(eu(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"&&($s(e,l,t,null,!1)||tl(e.child,!1))}e=e.sibling}}function Uf(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"?$s(e,o,c,null,!1)?(eu(e),l.paired||t||Is(e,a.onEnter)):tl(e.child,!1):eu(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Uf(e,t),e=e.sibling;else eu(e)}function Vf(e){if(vn!==null&&vn.size!==0){var t=vn;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"&&($s(e,a,c,null,!1)?(c=e.stateNode,o.paired=c,c.paired=o,Is(e,l.onShare)):tl(e.child,!1)),t.delete(a),t.size===0)break}}}Vf(e)}e=e.sibling}}}function $f(e){if(e.tag===30){var t=e.memoizedProps,l=pl(t,e.stateNode),a=vn!==null?vn.get(l):void 0,o=vl(t.default,a!==void 0?t.share:t.exit);o!=="none"&&($s(e,l,o,null,!1)?a!==void 0?(o=e.stateNode,a.paired=o,o.paired=a,vn.delete(l),Is(e,t.onShare)):Is(e,t.onExit):tl(e.child,!1)),vn!==null&&Vf(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)$f(e),e=e.sibling;else vn!==null&&Vf(e)}function s0(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"&&$s(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&s0(e);e=e.sibling}}function Ff(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,tl(e.child,!1))}Ff(e)}e=e.sibling}}function tu(e){if(e.tag===30)e.stateNode.paired=null,tl(e.child,!1),Ff(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)tu(e),e=e.sibling;else Ff(e)}function i0(e){for(e=e.child;e!==null;)e.tag===30?tl(e.child,!1):(e.subtreeFlags&33554432)!==0&&i0(e),e=e.sibling}function Bf(e,t,l,a,o,c,g){for(var S=!1;t!==null;){if(t.tag===5){var _=t.stateNode;if(c!==null&&an<c.length){var B=c[an],Q=xd(_);(B.view||Q.view)&&(S=!0);var P;if(P=(e.flags&4)===0)if(Q.clip)P=!0;else{P=B.rect;var $=Q.rect;P=P.y!==$.y||P.x!==$.x||P.height!==$.height||P.width!==$.width}P&&(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&&lv(_,an===0?l:l+"_"+an,o),S&&(e.flags&4)!==0||(el===null&&(el=[]),el.push(_,an===0?a:a+"_"+an,t.memoizedProps)),an++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&g?e.flags|=t.flags&32:Bf(e,t.child,l,a,o,c,g)&&(S=!0));t=t.sibling}return S}function r0(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;an=0,o=Bf(a,S,o,o,c,g,!1),(e.flags&4)!==0&&o&&Is(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&r0(e);e=e.sibling}}var _t=!1,Ke=!1,nl=!1,kf=!1,o0=typeof WeakSet=="function"?WeakSet:Set,Rt=null,ll=!1,fr=!1,nu=!1,Gf=!1;function KS(e,t,l){if(e=e.containerInfo,md=li,e=dg(e),_c(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,P=0,$=e,q=null;t:for(;;){for(var se;$!==a||c!==0&&$.nodeType!==3||(_=S+c),$!==g||o!==0&&$.nodeType!==3||(B=S+o),$.nodeType===3&&(S+=$.nodeValue.length),(se=$.firstChild)!==null;)q=$,$=se;for(;;){if($===e)break t;if(q===a&&++Q===c&&(_=S),q===g&&++P===o&&(B=S),(se=$.nextSibling)!==null)break;$=q,q=$.parentNode}$=se}a=_===-1||B===-1?null:{start:_,end:B}}else a=null}a=a||{start:0,end:0}}else a=null;for(gd={focusedElem:e,selectionRange:a},li=!1,l=(l&335544064)===l,Rt=t,t=l?9270:1024;Rt!==null;){if(e=Rt,l&&(a=e.deletions,a!==null))for(c=0;c<a.length;c++)l&&$f(a[c]);if(e.alternate===null&&(e.flags&2)!==0)l&&n0(e),lu(l);else{if(e.tag===22){if(a=e.alternate,e.memoizedState!==null){a!==null&&a.memoizedState===null&&l&&$f(a),lu(l);continue}else if(a!==null&&a.memoizedState!==null){l&&n0(e),lu(l);continue}}a=e.child,(e.subtreeFlags&t)!==0&&a!==null?(a.return=e,Rt=a):(l&&s0(e),lu(l))}}vn=null}function lu(e){for(;Rt!==null;){var t=Rt,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){Pe(t,t.return,S)}}break;case 3:if((o&1024)!==0){if(a=t.stateNode.containerInfo,l=a.nodeType,l===9)wd(a);else if(l===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":wd(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"&&$s(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,Rt=a;break}Rt=t.return}}function u0(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:al(e,l),a&4&&ur(5,l);break;case 1:if(al(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(g){Pe(l,l.return,g)}else{var o=Ya(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Pe(l,l.return,g)}}a&64&&Pp(l),a&512&&Wn(l,l.return);break;case 3:if(al(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{Fg(e,t)}catch(g){Pe(l,l.return,g)}}break;case 27:t===null&&a&4&&t0(l);case 26:case 5:al(e,l),t===null&&a&4&&zf(l),a&512&&Wn(l,l.return);break;case 12:al(e,l);break;case 31:al(e,l),a&4&&h0(e,l);break;case 13:al(e,l),a&4&&m0(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=rb.bind(null,l),kb(e,l))));break;case 22:if(a=l.memoizedState!==null||_t,!a){var c=t!==null&&t.memoizedState!==null||Ke;t=_t,o=Ke,_t=a,(Ke=c)&&!o?(a=2,(l.subtreeFlags&8772)!==0&&(a|=1),Vn(e,l,a)):al(e,l),_t=t,Ke=o}break;case 30:al(e,l),a&512&&Wn(l,l.return);break;case 7:a&512&&Wn(l,l.return);default:al(e,l)}}function qf(e,t){for(e=e.child;e!==null;)c0(e,t),e=e.sibling}function c0(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(_){Pe(e,e.return,_)}Qf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ge=!0}catch(_){Pe(e,e.return,_)}break;case 18:try{var S=e.stateNode;t?nv(S,!0):nv(e.stateNode,!1)}catch(_){Pe(e,e.return,_)}break;case 22:case 23:e.memoizedState===null&&qf(e,t);break;default:qf(e,t)}}function Qf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,a=t;switch(l.tag){case 4:c0(l,a);break e;case 22:l.memoizedState===null&&Qf(l,a);break e;default:Qf(l,a)}}e=e.sibling}}function f0(e){var t=e.alternate;t!==null&&(e.alternate=null,f0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ro(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 ot=null,sn=!1;function Ln(e,t,l){for(l=l.child;l!==null;)d0(e,t,l),l=l.sibling}function d0(e,t,l){if(re&&typeof re.onCommitFiberUnmount=="function")try{re.onCommitFiberUnmount(Ll,l)}catch{}switch(l.tag){case 26:Ke||Ht(l,t),Ln(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ke&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ke||Ht(l,t),cr(l);var a=ot,o=sn;aa(l.type)&&(ot=l.stateNode,sn=!1),Ln(e,t,l),pv(l.stateNode,l.type,l.memoizedProps),ot=a,sn=o;break;case 5:Ke||Ht(l,t),cr(l);case 6:if(l.tag===6&&cr(l),a=ot,o=sn,ot=null,Ln(e,t,l),ot=a,sn=o,ot!==null)if(sn)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(l.stateNode),Ge=!0}catch(c){Pe(l,t,c)}else try{ot.removeChild(l.stateNode),Ge=!0}catch(c){Pe(l,t,c)}break;case 18:ot!==null&&(sn?(e=ot,tv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ai(e)):tv(ot,l.stateNode));break;case 4:a=ot,o=sn,ot=l.stateNode.containerInfo,sn=!0,Ln(e,t,l),ot=a,sn=o;break;case 0:case 11:case 14:case 15:Pl(2,l,t),Ke||Pl(4,l,t),Ln(e,t,l);break;case 1:Ke||(Ht(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Jp(l,t,a)),Ln(e,t,l);break;case 21:Ln(e,t,l);break;case 22:Ke=(a=Ke)||l.memoizedState!==null,Ln(e,t,l),Ke=a;break;case 30:Ht(l,t),Ln(e,t,l);break;case 7:Ke||Ht(l,t),Ln(e,t,l);break;default:Ln(e,t,l)}}function h0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ai(e)}catch(l){Pe(t,t.return,l)}}}function m0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ai(e)}catch(l){Pe(t,t.return,l)}}function ZS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new o0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new o0),t;default:throw Error(r(435,e.tag))}}function au(e,t){var l=ZS(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var o=ob.bind(null,e,a);a.then(o,o)}})}function Kt(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(aa(_.type)){ot=_.stateNode,sn=!1;break e}break;case 5:ot=_.stateNode,sn=!1;break e;case 3:case 4:ot=_.stateNode.containerInfo,sn=!0;break e}_=_.return}if(ot===null)throw Error(r(160));d0(g,S,c),ot=null,sn=!1,g=c.alternate,g!==null&&(g.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)g0(t,e,l),t=t.sibling}var Un=null;function g0(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}Kt(t,e,l),Zt(e),o&4&&(Pl(3,e,e.return),ur(3,e),Pl(5,e,e.return));break;case 1:Kt(t,e,l),Zt(e),o&512&&(Ke||a===null||Ht(a,a.return)),o&64&&_t&&(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=Un,Kt(t,e,l),Zt(e),o&512&&(Ke||a===null||Ht(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(_t)e.stateNode=J0(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[Ui]||a[At]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=o.createElement(t),o.head.insertBefore(a,o.querySelector("head > title"))),Lt(a,t,l),a[At]=e,Et(a),t=a;break e;case"link":if(c=wv("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),Lt(a,t,l),o.head.appendChild(a);break;case"meta":if(c=wv("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),Lt(a,t,l),o.head.appendChild(a);break;default:throw Error(r(468,t))}a[At]=e,Et(a),t=a}e.stateNode=t}else _t||Rd(c,e.type,e.stateNode);else e.stateNode=bv(c,l,e.memoizedProps);else o!==l?(o===null?(t=a.stateNode,t===null||Ke||t.parentNode.removeChild(t)):o.count--,l===null?_t||Rd(c,e.type,e.stateNode):bv(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Df(e,e.memoizedProps,a.memoizedProps);break;case 27:Kt(t,e,l),Zt(e),o&512&&(Ke||a===null||Ht(a,a.return)),a!==null&&o&4&&Df(e,e.memoizedProps,a.memoizedProps);break;case 5:if(c=nl,nl=!1,Kt(t,e,l),nl=c,Zt(e),o&512&&(Ke||a===null||Ht(a,a.return)),e.flags&32){t=e.stateNode;try{bs(t,""),Ge=!0}catch(Q){Pe(e,e.return,Q)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,Df(e,t,a!==null?a.memoizedProps:t)),o&1024&&(kf=!0);break;case 6:if(Kt(t,e,l),Zt(e),o&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Ge=!0}catch(Q){Pe(e,e.return,Q)}}break;case 3:if(Ge=!1,xu=null,c=Un,Un=Sr(t.containerInfo),Kt(t,e,l),Un=c,Zt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{ai(t.containerInfo)}catch(Q){Pe(e,e.return,Q)}kf&&(kf=!1,p0(e)),Ge=!1;break;case 4:o=nl,nl=_t,a=Lm(),c=Un,Un=Sr(e.stateNode.containerInfo),Kt(t,e,l),Zt(e),Un=c,Ge&&fr&&(nu=!0),Ge=a,nl=o;break;case 12:Kt(t,e,l),Zt(e);break;case 31:Kt(t,e,l),Zt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,au(e,t)));break;case 13:Kt(t,e,l),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ru=et()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,au(e,t)));break;case 22:c=e.memoizedState!==null,g=a!==null&&a.memoizedState!==null;var S=_t,_=Ke,B=nl;_t=S||c,nl=B||c,Ke=_||g,Kt(t,e,l),Ke=_,nl=B,_t=S,Zt(e),o&8192&&(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,!c||a===null||g||_t||Ke||(t=g||Ke,l=_t,a=Ke,_t=c||_t,Ke=t,Jl(e,2),_t=l,Ke=a),!c&&nl||qf(e,c)),o&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,au(e,l))));break;case 19:Kt(t,e,l),Zt(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,au(e,t)));break;case 30:o&512&&(Ke||a===null||Ht(a,a.return)),o=Lm(),c=fr,g=(l&335544064)===l,S=e.memoizedProps,fr=g&&vl(S.default,S.update)!=="none",Kt(t,e,l),Zt(e),g&&a!==null&&Ge&&(e.flags|=4),fr=c,Ge=o;break;case 21:break;case 7:o&512&&(Ke||a===null||Ht(a,a.return)),a&&a.stateNode!==null&&(a.stateNode._fragmentFiber=e);default:Kt(t,e,l),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(e0(a)){l=a;break}a=a.return}a=null;for(var o=e.return;o!==null;){if(Of(o)){var c=o.stateNode;a===null?a=[c]:a.push(c)}if(Af(o))break;o=o.return}var g=a;if(l==null)throw Error(r(160));switch(l.tag){case 27:var S=l.stateNode,_=Hf(e);Jo(e,_,S,g);break;case 5:var B=l.stateNode;l.flags&32&&(bs(B,""),l.flags&=-33);var Q=Hf(e);Jo(e,Q,B,g);break;case 3:case 4:var P=l.stateNode.containerInfo,$=Hf(e);Lf(e,$,P,g);break;default:throw Error(r(161))}}catch(q){Pe(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function p0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;p0(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,li=!0,t.reset(),li=!1),e=e.sibling}}function Fs(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)v0(t,e),t=t.sibling;else r0(t)}function v0(e,t){var l=e.alternate;if(l===null)Uf(e,!1);else switch(e.tag){case 3:if(Gf=ll=!1,l0(),Fs(t,e),!ll&&!nu){if(e=el,e!==null)for(var a=0;a<e.length;a+=3){l=e[a];var o=e[a+1];av(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"})),Gf=!0}el=null;break;case 5:Fs(t,e);break;case 4:a=ll,ll=!1,Fs(t,e),ll&&(nu=!0),ll=a;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?Uf(e,!1):Fs(t,e));break;case 30:a=ll,o=l0(),ll=!1,Fs(t,e),ll&&(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,an=0,t=Bf(e,l,t,g,S,c,!0),an!==(c===null?0:c.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Is(e,e.memoizedProps.onUpdate),el=o):o!==null&&(o.push.apply(o,el),el=o),ll=(e.flags&32)!==0?!0:a;break;default:Fs(t,e)}}function al(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)u0(e,t.alternate,t),t=t.sibling}function Jl(e,t){for(e=e.child;e!==null;){var l=e,a=t;switch(l.tag){case 0:case 11:case 14:case 15:Pl(4,l,l.return),Jl(l,a);break;case 1:Ht(l,l.return);var o=l.stateNode;typeof o.componentWillUnmount=="function"&&Jp(l,l.return,o),Jl(l,a);break;case 27:(a&2)!==0&&pv(l.stateNode,l.type,l.memoizedProps);case 5:Ht(l,l.return),l.tag!==5&&l.tag!==27||cr(l),Jl(l,a);break;case 6:cr(l);break;case 26:Ht(l,l.return),o=l.stateNode,l.memoizedState!==null||o===null||Ke||o.parentNode.removeChild(o),Jl(l,a);break;case 22:l.memoizedState===null&&Jl(l,a);break;case 30:Ht(l,l.return),Jl(l,a);break;case 7:Ht(l,l.return);default:Jl(l,a)}e=e.sibling}}function Vn(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:Vn(o,c,l),ur(4,c);break;case 1:if(Vn(o,c,l),a=c,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(Q){Pe(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++)$g(B[o],_)}catch(Q){Pe(a,a.return,Q)}}S&&g&64&&Pp(c),Wn(c,c.return);break;case 27:(l&2)!==0&&t0(c);case 5:c.tag!==5&&c.tag!==27||Wp(c),Vn(o,c,l),S&&a===null&&g&4&&zf(c),Wn(c,c.return);break;case 6:Wp(c);break;case 26:_=c.stateNode,c.memoizedState!==null||_===null||_t||Rd(Sr(_.ownerDocument),c.type,_),Vn(o,c,l),S&&a===null&&g&4&&zf(c),Wn(c,c.return);break;case 12:Vn(o,c,l);break;case 31:Vn(o,c,l),S&&g&4&&h0(o,c);break;case 13:Vn(o,c,l),S&&g&4&&m0(o,c);break;case 22:c.memoizedState===null&&Vn(o,c,l),Wn(c,c.return);break;case 30:Vn(o,c,l),Wn(c,c.return);break;case 7:Wn(c,c.return);default:Vn(o,c,l)}t=t.sibling}}function Yf(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&&Zi(l))}function If(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e))}function Rn(e,t,l,a){var o=(l&335544064)===l;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)y0(e,t,l,a),t=t.sibling;else o&&i0(t)}function y0(e,t,l,a){var o=(l&335544064)===l;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&tu(t);var c=t.flags;switch(t.tag){case 0:case 11:case 15:Rn(e,t,l,a),c&2048&&ur(9,t);break;case 1:Rn(e,t,l,a);break;case 3:Rn(e,t,l,a),o&&Gf&&(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&&Zi(c)));break;case 12:if(c&2048){Rn(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){Pe(t,t.return,B)}}else Rn(e,t,l,a);break;case 31:Rn(e,t,l,a);break;case 13:Rn(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&&tu(S),g._visibility&2?Rn(e,t,l,a):dr(e,t)):(o&&S!==null&&S.memoizedState!==null&&tu(t),g._visibility&2?Rn(e,t,l,a):(g._visibility|=2,Bs(e,t,l,a,(t.subtreeFlags&10256)!==0||!1))),c&2048&&Yf(S,t);break;case 24:Rn(e,t,l,a),c&2048&&If(t.alternate,t);break;case 30:o&&(c=t.alternate,c!==null&&(tl(c.child,!0),tl(t.child,!0))),Rn(e,t,l,a);break;default:Rn(e,t,l,a)}}function Bs(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:Bs(c,g,S,_,o),ur(8,g);break;case 23:break;case 22:var Q=g.stateNode;g.memoizedState!==null?Q._visibility&2?Bs(c,g,S,_,o):dr(c,g):(Q._visibility|=2,Bs(c,g,S,_,o)),o&&B&2048&&Yf(g.alternate,g);break;case 24:Bs(c,g,S,_,o),o&&B&2048&&If(g.alternate,g);break;default:Bs(c,g,S,_,o)}t=t.sibling}}function dr(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:dr(l,a),o&2048&&Yf(a.alternate,a);break;case 24:dr(l,a),o&2048&&If(a.alternate,a);break;default:dr(l,a)}t=t.sibling}}var Ia=8192;function Xa(e,t,l){if(e.subtreeFlags&Ia)for(e=e.child;e!==null;)x0(e,t,l),e=e.sibling}function x0(e,t,l){switch(e.tag){case 26:Xa(e,t,l),e.flags&Ia&&(e.memoizedState!==null?n2(l,Un,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Ev(l,e)));break;case 5:Xa(e,t,l),e.flags&Ia&&(e=e.stateNode,(t&335544128)===t&&Ev(l,e));break;case 3:case 4:var a=Un;Un=Sr(e.stateNode.containerInfo),Xa(e,t,l),Un=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,vn===null&&(vn=new Map),vn.set(a,o)}Xa(e,t,l);break;default:Xa(e,t,l)}}function S0(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 hr(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];Rt=a,w0(a,e)}S0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)b0(e),e=e.sibling}function b0(e){switch(e.tag){case 0:case 11:case 15:hr(e),e.flags&2048&&Pl(9,e,e.return);break;case 3:hr(e);break;case 12:hr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,su(e)):hr(e);break;default:hr(e)}}function su(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];Rt=a,w0(a,e)}S0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pl(8,t,t.return),su(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,su(t));break;default:su(t)}e=e.sibling}}function w0(e,t){for(;Rt!==null;){var l=Rt;switch(l.tag){case 0:case 11:case 15:Pl(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:Zi(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Rt=a;else e:for(l=e;Rt!==null;){a=Rt;var o=a.sibling,c=a.return;if(f0(a),a===l){Rt=null;break e}if(o!==null){o.return=c,Rt=o;break e}Rt=c}}}var PS={getCacheForType:function(e){var t=Ot(yt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Ot(yt).controller.signal}},JS=typeof WeakMap=="function"?WeakMap:Map,Ye=0,tt=null,Te=null,Oe=0,Ze=0,yn=null,Wl=!1,ks=!1,Xf=!1,El=0,gt=0,ea=0,Ka=0,iu=0,xn=0,Gs=0,mr=null,rn=null,Kf=!1,ru=0,j0=0,ou=1/0,uu=null,ta=null,ft=0,$n=null,Za=null,sl=0,Zf=0,Pf=null,C0=null,qs=null,Qs=null,Ys=null,gr=0,cu=null;function Sn(){return(Ye&2)!==0&&Oe!==0?Oe&-Oe:ce.T!==null?rd():Mm()}function N0(){if(xn===0)if((Oe&536870912)===0||Re){var e=hn;hn<<=1,(hn&3932160)===0&&(hn=262144),xn=e}else xn=536870912;return e=zt.current,e!==null&&(e.flags|=32),xn}function Is(e,t){if(t!=null){var l=e.stateNode,a=l.ref;a===null&&(a=l.ref=sv(pl(e.memoizedProps,l))),Qs===null&&(Qs=[]),Qs.push(t.bind(null,a))}}function on(e,t,l){(e===tt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),na(e,Oe,xn,!1)),Li(e,l),((Ye&2)===0||e!==tt)&&(e===tt&&((Ye&2)===0&&(Ka|=l),gt===4&&na(e,Oe,xn,!1)),il(e))}function E0(e,t,l){if((Ye&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ra(e,t),o=a?tb(e,t):Wf(e,t,!0),c=a;do{if(o===0){ks&&!a&&na(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!WS(l)){o=Wf(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=mr;var _=S.current.memoizedState.isDehydrated;if(_&&(Xs(S,g).flags|=256),g=Wf(S,g,!1),g!==2&&g!==6){if(Xf&&!_){S.errorRecoveryDisabledLanes|=c,Ka|=c,o=4;break e}c=rn,rn=o,c!==null&&(rn===null?rn=c:rn.push.apply(rn,c))}o=g}if(c=!1,o!==2)continue}}if(o===1){Xs(e,0),na(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:na(a,t,xn,!Wl);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=ru+300-et(),10<o)){if(na(a,t,xn,!Wl),_a(a,0,!0)!==0)break e;sl=t,a.timeoutHandle=yd(M0.bind(null,a,l,rn,uu,Kf,t,xn,Ka,Gs,Wl,c,"Throttled",-0,0),o);break e}M0(a,l,rn,uu,Kf,t,xn,Ka,Gs,Wl,c,null,-0,0)}}break}while(!0);il(e)}function M0(e,t,l,a,o,c,g,S,_,B,Q,P,$,q){e.timeoutHandle=-1;var se=t.subtreeFlags,he=(c&335544064)===c;if(P=null,(he||se&8192||(se&16785408)===16785408)&&(P={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},vn=null,x0(t,c,P),he&&(se=P,he=e.containerInfo,he=(he.nodeType===9?he:he.ownerDocument).__reactViewTransition,he!=null&&(se.count++,se.waitingForViewTransition=!0,se=jr.bind(se),he.finished.then(se,se))),se=(c&62914560)===c?ru-et():(c&4194048)===c?j0-et():0,se=l2(P,se),se!==null)){sl=c,e.cancelPendingCommit=se(H0.bind(null,e,t,c,l,a,o,g,S,_,B,Q,P,null,$,q)),na(e,c,g,!B);return}H0(e,t,c,l,a,o,g,S,_,B,Q,P)}function WS(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(!gn(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 na(e,t,l,a){t=Hi(e,t),t&=~iu,t&=~Ka,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var c=31-nt(o),g=1<<c;a[c]=-1,o&=~g}l!==0&&Cm(e,l,t)}function fu(){return(Ye&6)===0?(pr(0),!1):!0}function Jf(){if(Te!==null){if(Ze===0)var e=Te.return;else e=Te,Sl=Ua=null,sf(e),Ds=null,Wi=0,e=Te;for(;e!==null;)Zp(e.alternate,e),e=e.return;Te=null}}function Xs(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,jb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),sl=0,Jf(),tt=e,Te=l=yl(e.current,null),Oe=t,Ze=0,yn=null,Wl=!1,ks=Ra(e,t),Xf=!1,Gs=xn=iu=Ka=ea=gt=0,rn=mr=null,Kf=!1,El=Hi(e,t),xo(),l}function _0(e,t){Ee=null,ce.H=qo,t===zs||t===To?(t=Hg(),Ze=3):t===Yc?(t=Hg(),Ze=4):Ze=t===bf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yn=t,Te===null&&(gt=1,Qo(e,Nn(t,e.current)))}function R0(){var e=zt.current;return e===null?!0:(Oe&4194048)===Oe?kt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===kt:!1}function T0(){var e=ce.H;return ce.H=qo,e===null?qo:e}function A0(){var e=ce.A;return ce.A=PS,e}function du(){gt=4,Wl||(Oe&4194048)!==Oe&&zt.current!==null||(ks=!0),(ea&134217727)===0&&(Ka&134217727)===0||tt===null||na(tt,Oe,xn,!1)}function Wf(e,t,l){var a=Ye;Ye|=2;var o=T0(),c=A0();(tt!==e||Oe!==t)&&(uu=null,Xs(e,t)),t=!1;var g=gt;e:do try{if(Ze!==0&&Te!==null){var S=Te,_=yn;switch(Ze){case 8:Jf(),g=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var B=Ze;if(Ze=0,yn=null,Ks(e,S,_,B),l&&ks){g=0;break e}break;default:B=Ze,Ze=0,yn=null,Ks(e,S,_,B)}}eb(),g=gt;break}catch(Q){_0(e,Q)}while(!0);return t&&e.shellSuspendCounter++,Sl=Ua=null,Ye=a,ce.H=o,ce.A=c,Te===null&&(tt=null,Oe=0,xo()),g}function eb(){for(;Te!==null;)O0(Te)}function tb(e,t){var l=Ye;Ye|=2;var a=T0(),o=A0();tt!==e||Oe!==t?(uu=null,ou=et()+500,Xs(e,t)):ks=Ra(e,t);e:do try{if(Ze!==0&&Te!==null){t=Te;var c=yn;t:switch(Ze){case 1:Ze=0,yn=null,Ks(e,t,c,1);break;case 2:case 9:if(zg(c)){Ze=0,yn=null,z0(t);break}t=function(){Ze!==2&&Ze!==9||tt!==e||(Ze=7),il(e)},c.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:zg(c)?(Ze=0,yn=null,z0(t)):(Ze=0,yn=null,Ks(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?Cv(g):S.stateNode.complete){Ze=0,yn=null;var _=S.sibling;if(_!==null)Te=_;else{var B=S.return;B!==null?(Te=B,hu(B)):Te=null}break t}}Ze=0,yn=null,Ks(e,t,c,5);break;case 6:Ze=0,yn=null,Ks(e,t,c,6);break;case 8:Jf(),gt=6;break e;default:throw Error(r(462))}}nb();break}catch(Q){_0(e,Q)}while(!0);return Sl=Ua=null,ce.H=a,ce.A=o,Ye=l,Te!==null?0:(tt=null,Oe=0,xo(),gt)}function nb(){for(;Te!==null&&!jt();)O0(Te)}function O0(e){var t=Xp(e.alternate,e,El);e.memoizedProps=e.pendingProps,t===null?hu(e):Te=t}function z0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Bp(l,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Bp(l,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:sf(t);var a=t;a===Mt&&(Re?(No(a),a.tag===5&&a.stateNode!=null&&(lt=a.stateNode)):(No(a),Re=!0));default:Zp(l,t),t=Te=wg(t,El),t=Xp(l,t,El)}e.memoizedProps=e.pendingProps,t===null?hu(e):Te=t}function Ks(e,t,l,a){Sl=Ua=null,sf(t),Ds=null,Wi=0;var o=t.return;try{if(GS(e,o,t,l,Oe)){gt=1,Qo(e,Nn(l,e.current)),Te=null;return}}catch(c){if(o!==null)throw Te=o,c;gt=1,Qo(e,Nn(l,e.current)),Te=null;return}t.flags&32768?(Re||a===1?e=!0:ks||(Oe&536870912)!==0?e=!1:(Wl=e=!0,(a===2||a===9||a===3||a===6)&&(a=zt.current,a!==null&&a.tag===13&&(a.flags|=16384))),D0(t,e)):hu(t)}function hu(e){var t=e;do{if((t.flags&32768)!==0){D0(t,Wl);return}e=t.return;var l=IS(t.alternate,t,El);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 D0(e,t){do{var l=XS(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 H0(e,t,l,a,o,c,g,S,_,B,Q,P){e.cancelPendingCommit=null;do mu();while(ft!==0);if((Ye&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,$n=e,sl=l,Pf=o,C0=a,lb(e,t,l,g,S,_,P)}}function lb(e,t,l,a,o,c,g){var S=t.lanes|t.childLanes;if(Zf=S,S|=zc,R1(e,l,S,a,o,c),Qs=null,(l&335544064)===l?(Ys=AS(e),a=10262):(Ys=null,a=10256),(t.subtreeFlags&a)!==0||(t.flags&a)!==0?(e.callbackNode=null,e.callbackPriority=0,ub(Ea,function(){return ld(),null})):(e.callbackNode=null,e.callbackPriority=0),Wo=!1,a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=ce.T,ce.T=null,o=ge.p,ge.p=2,c=Ye,Ye|=4;try{KS(e,t,l)}finally{Ye=c,ge.p=o,ce.T=a}}ft=1,Wo?qs=Rb(g,e.containerInfo,Ys,ed,td,sb,nd,ld,ab):(ed(),td(),nd())}function ab(e){if(ft!==0){var t=$n.onRecoverableError;t(e,{componentStack:null})}}function sb(){ft===3&&(ft=0,v0(Za,$n),ft=4)}function ed(){if(ft===1){ft=0;var e=$n,t=Za,l=sl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=ce.T,ce.T=null;var o=ge.p;ge.p=2;var c=Ye;Ye|=4;try{fr=nu=!1,g0(t,e,l),l=gd;var g=dg(e.containerInfo),S=l.focusedElem,_=l.selectionRange;if(g!==S&&S&&S.ownerDocument&&fg(S.ownerDocument.documentElement,S)){if(_!==null&&_c(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 P=S.ownerDocument||document,$=P&&P.defaultView||window;if($.getSelection){var q=$.getSelection(),se=S.textContent.length,he=Math.min(_.start,se),Me=_.end===void 0?he:Math.min(_.end,se);!q.extend&&he>Me&&(g=Me,Me=he,he=g);var F=cg(S,he),z=cg(S,Me);if(F&&z&&(q.rangeCount!==1||q.anchorNode!==F.node||q.anchorOffset!==F.offset||q.focusNode!==z.node||q.focusOffset!==z.offset)){var G=P.createRange();G.setStart(F.node,F.offset),q.removeAllRanges(),he>Me?(q.addRange(G),q.extend(z.node,z.offset)):(G.setEnd(z.node,z.offset),q.addRange(G))}}}}for(P=[],q=S;q=q.parentNode;)q.nodeType===1&&P.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<P.length;S++){var Z=P[S];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}li=!!md,gd=md=null}finally{Ye=c,ge.p=o,ce.T=a}}e.current=t,ft=2}}function td(){if(ft===2){ft=0;var e=$n,t=Za,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=ce.T,ce.T=null;var a=ge.p;ge.p=2;var o=Ye;Ye|=4;try{u0(e,t.alternate,t)}finally{Ye=o,ge.p=a,ce.T=l}}ft=3}}function nd(){if(ft===4||ft===3){ft=0;var e=qs;qs=null,it();var t=$n,l=Za,a=sl,o=C0,c=(a&335544064)===a?10262:10256;if((l.subtreeFlags&c)!==0||(l.flags&c)!==0?ft=5:(ft=0,Za=$n=null,L0(t,t.pendingLanes)),c=t.pendingLanes,c===0&&(ta=null),cc(a),l=l.stateNode,re&&typeof re.onCommitFiberRoot=="function")try{re.onCommitFiberRoot(Ll,l,void 0,(l.current.flags&128)===128)}catch{}if(o!==null){l=ce.T,c=ge.p,ge.p=2,ce.T=null;try{for(var g=t.onRecoverableError,S=0;S<o.length;S++){var _=o[S];g(_.value,{componentStack:_.stack})}}finally{ce.T=l,ge.p=c}}if(o=Qs,g=Ys,Ys=null,o!==null&&(Qs=null,g===null&&(g=[]),e!==null))for(_=0;_<o.length;_++)l=(0,o[_])(g),l!==void 0&&e.finished.finally(l);(sl&3)!==0&&mu(),il(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===cu?gr++:(gr=0,cu=t):(gr=0,cu=null),pr(0)}}function L0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zi(t)))}function mu(){return qs!==null&&(qs.skipTransition(),qs=null),ed(),td(),nd(),ld()}function ld(){if(ft!==5)return!1;var e=$n,t=Zf;Zf=0;var l=cc(sl),a=ce.T,o=ge.p;try{ge.p=32>l?32:l,ce.T=null,l=Pf,Pf=null;var c=$n,g=sl;if(ft=0,Za=$n=null,sl=0,(Ye&6)!==0)throw Error(r(331));var S=Ye;if(Ye|=4,b0(c.current),y0(c,c.current,g,l),Ye=S,pr(0,!1),re&&typeof re.onPostCommitFiberRoot=="function")try{re.onPostCommitFiberRoot(Ll,c)}catch{}return!0}finally{ge.p=o,ce.T=a,L0(e,t)}}function U0(e,t,l){t=Nn(l,t),t=Sf(e.stateNode,t,2),e=Il(e,t,2),e!==null&&(Li(e,2),il(e))}function Pe(e,t,l){if(e.tag===3)U0(e,e,l);else for(;t!==null;){if(t.tag===3){U0(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ta===null||!ta.has(a))){e=Nn(l,e),l=zp(2),a=Il(t,l,2),a!==null&&(Dp(l,a,t,e),Li(a,2),il(a));break}}t=t.return}}function ad(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new JS;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)||(Xf=!0,o.add(l),e=ib.bind(null,e,t,l),t.then(e,e))}function ib(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()-ru)&&(Ye&2)===0?Xs(e,0):iu|=l,Gs===Oe&&(Gs=0)),il(e)}function V0(e,t){t===0&&(t=jm()),e=Da(e,t),e!==null&&(Li(e,t),il(e))}function rb(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),V0(e,l)}function ob(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),V0(e,l)}function ub(e,t){return Fe(e,t)}var Zs=null,Ps=null,sd=!1,gu=!1,id=!1,la=0;function il(e){e!==Ps&&e.next===null&&(Ps===null?Zs=Ps=e:Ps=Ps.next=e),gu=!0,sd||(sd=!0,fb())}function pr(e,t){if(!id&&gu){id=!0;do for(var l=!1,a=Zs;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-nt(42|e)+1)-1,c&=o&~(g&~S),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,k0(a,c))}else c=Oe,c=_a(a,a===tt?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Ra(a,c)||(l=!0,k0(a,c));a=a.next}while(l);id=!1}}function cb(){$0()}function $0(){gu=sd=!1;var e=0;la!==0&&wb()&&(e=la);for(var t=et(),l=null,a=Zs;a!==null;){var o=a.next,c=F0(a,t);c===0?(a.next=null,l===null?Zs=o:l.next=o,o===null&&(Ps=l)):(l=a,(e!==0||(c&3)!==0)&&(gu=!0)),a=o}ft!==0&&ft!==5||pr(e),la!==0&&(la=0)}function F0(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var g=31-nt(c),S=1<<g,_=o[g];_===-1?((S&l)===0||(S&a)!==0)&&(o[g]=so(S,t)):_<=t&&(e.expiredLanes|=S),c&=~S}if(t=tt,l=Oe,l=_a(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ke(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ra(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&ke(a),cc(l)){case 2:case 8:l=Na;break;case 32:l=Ea;break;case 268435456:l=zi;break;default:l=Ea}return a=B0.bind(null,e),l=Fe(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&ke(a),e.callbackPriority=2,e.callbackNode=null,2}function B0(e,t){if(ft!==0&&ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(mu()&&e.callbackNode!==l)return null;var a=Oe;return a=_a(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(E0(e,a,t),F0(e,et()),e.callbackNode!=null&&e.callbackNode===l?B0.bind(null,e):null)}function k0(e,t){if(mu())return null;E0(e,t,!0)}function fb(){Cb(function(){(Ye&6)!==0?Fe(Hl,cb):$0()})}function rd(){if(la===0){var e=Fa;e===0&&(e=Ul,Ul<<=1,(Ul&261888)===0&&(Ul=256)),la=e}return la}function G0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:co(e)}function db(e,t,l,a,o){if(t==="submit"&&l&&l.stateNode===o){var c=G0((o[nn]||null).action),g=a.submitter;g&&(t=(t=g[nn]||null)?G0(t.formAction):g.getAttribute("formAction"),t!==null&&(c=t,g=null));var S=new go("action","action",null,a,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(la!==0){var _=new FormData(o,g);gf(l,{pending:!0,data:_,method:o.method,action:c},null,_)}}else typeof c=="function"&&(S.preventDefault(),_=new FormData(o,g),gf(l,{pending:!0,data:_,method:o.method,action:c},c,_))},currentTarget:o}]})}}for(var od=0;od<Oc.length;od++){var ud=Oc[od],hb=ud.toLowerCase(),mb=ud[0].toUpperCase()+ud.slice(1);Hn(hb,"on"+mb)}Hn(gg,"onAnimationEnd"),Hn(pg,"onAnimationIteration"),Hn(vg,"onAnimationStart"),Hn("dblclick","onDoubleClick"),Hn("focusin","onFocus"),Hn("focusout","onBlur"),Hn(jS,"onTransitionRun"),Hn(CS,"onTransitionStart"),Hn(NS,"onTransitionCancel"),Hn(yg,"onTransitionEnd"),xs("onMouseEnter",["mouseout","mouseover"]),xs("onMouseLeave",["mouseout","mouseover"]),xs("onPointerEnter",["pointerout","pointerover"]),xs("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 vr="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(" "),gb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vr));function q0(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){yo(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){yo(Q)}o.currentTarget=null,c=_}}}}function Ae(e,t){var l=t[Rm];l===void 0&&(l=t[Rm]=new Set);var a=e+"__bubble";l.has(a)||(Q0(t,e,2,!1),l.add(a))}function cd(e,t,l){var a=0;t&&(a|=4),Q0(l,e,a,t)}var pu="_reactListening"+Math.random().toString(36).slice(2);function fd(e){if(!e[pu]){e[pu]=!0,Om.forEach(function(l){l!=="selectionchange"&&(gb.has(l)||cd(l,!1,e),cd(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pu]||(t[pu]=!0,cd("selectionchange",!1,t))}}function Q0(e,t,l,a){switch(Dv(t)){case 2:var o=r2;break;case 8:o=o2;break;default:o=Ad}l=o.bind(null,t,l,e),o=void 0,!yc||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 dd(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}Qm(function(){var B=c,Q=pc(l),P=[];e:{var $=xg.get(e);if($!==void 0){var q=go,se=e;switch(e){case"keypress":if(ho(l)===0)break e;case"keydown":case"keyup":q=W1;break;case"focusin":se="focus",q=wc;break;case"focusout":se="blur",q=wc;break;case"beforeblur":case"afterblur":q=wc;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=Xm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=B1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=aS;break;case gg:case pg:case vg:q=q1;break;case yg:q=iS;break;case"scroll":case"scrollend":q=$1;break;case"wheel":q=oS;break;case"copy":case"cut":case"paste":q=Y1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Zm;break;case"submit":q=nS;break;case"toggle":case"beforetoggle":q=cS}var he=(t&4)!==0,Me=!he&&(e==="scroll"||e==="scrollend"),F=he?$!==null?$+"Capture":null:$;he=[];for(var z=B,G;z!==null;){var Z=z;if(G=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||G===null||F===null||(Z=$i(z,F),Z!=null&&he.push(yr(z,Z,G))),Me)break;z=z.return}0<he.length&&($=new q($,se,null,l,Q),P.push({event:$,listeners:he}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",$=e==="mouseout"||e==="pointerout",q&&l!==gc&&(se=l.relatedTarget||l.fromElement)&&(Ta(se)||se[ps]))break e;($||q)&&(se=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,$?(q=l.relatedTarget||l.toElement,$=B,q=q?Ta(q):null,q!==null&&(Me=d(q),he=q.tag,q!==Me||he!==5&&he!==27&&he!==6)&&(q=null)):($=null,q=B),$!==q&&(he=Xm,Z="onMouseLeave",F="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(he=Zm,Z="onPointerLeave",F="onPointerEnter",z="pointer"),Me=$==null?se:Vi($),G=q==null?se:Vi(q),se=new he(Z,z+"leave",$,l,Q),se.target=Me,se.relatedTarget=G,Z=null,Ta(Q)===B&&(he=new he(F,z+"enter",q,l,Q),he.target=G,he.relatedTarget=Me,Z=he),Me=Z,he=$&&q?D($,q,pb):null,$!==null&&Y0(P,se,$,he,!1),q!==null&&Me!==null&&Y0(P,Me,q,he,!0)))}e:{if($=B?Vi(B):window,q=$.nodeName&&$.nodeName.toLowerCase(),q==="select"||q==="input"&&$.type==="file")var de=ag;else if(ng($))if(sg)de=SS;else{de=yS;var ze=vS}else q=$.nodeName,!q||q.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?B&&mc(B.elementType)&&(de=ag):de=xS;if(de&&(de=de(e,B))){lg(P,de,l,Q);break e}ze&&ze(e,$,B)}switch(ze=B?Vi(B):window,e){case"focusin":(ng(ze)||ze.contentEditable==="true")&&(Ns=ze,Rc=B,Ii=null);break;case"focusout":Ii=Rc=Ns=null;break;case"mousedown":Tc=!0;break;case"contextmenu":case"mouseup":case"dragend":Tc=!1,hg(P,l,Q);break;case"selectionchange":if(wS)break;case"keydown":case"keyup":hg(P,l,Q)}var pe;if(Cc)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else Cs?eg(e,l)&&(xe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(xe="onCompositionStart");xe&&(Pm&&l.locale!=="ko"&&(Cs||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&Cs&&(pe=Ym()):(Vl=Q,xc="value"in Vl?Vl.value:Vl.textContent,Cs=!0)),ze=vu(B,xe),0<ze.length&&(xe=new Km(xe,e,null,l,Q),P.push({event:xe,listeners:ze}),pe?xe.data=pe:(pe=tg(l),pe!==null&&(xe.data=pe)))),(pe=dS?hS(e,l):mS(e,l))&&(xe=vu(B,"onBeforeInput"),0<xe.length&&(ze=new Km("onBeforeInput","beforeinput",null,l,Q),P.push({event:ze,listeners:xe}),ze.data=pe)),db(P,e,B,l,Q)}q0(P,t)})}function yr(e,t,l){return{instance:e,listener:t,currentTarget:l}}function vu(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=$i(e,l),o!=null&&a.unshift(yr(e,o,c)),o=$i(e,t),o!=null&&a.push(yr(e,o,c))),e.tag===3)return a;e=e.return}return[]}function pb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Y0(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=$i(l,c),B!=null&&g.unshift(yr(l,B,_))):o||(B=$i(l,c),B!=null&&g.push(yr(l,B,_)))),l=l.return}g.length!==0&&e.push({event:t,listeners:g})}var vb=/\r\n?/g,yb=/\u0000|\uFFFD/g;function I0(e){return(typeof e=="string"?e:""+e).replace(vb,`
49
- `).replace(yb,"")}function X0(e,t){return t=I0(t),I0(e)===t}function Je(e,t,l,a,o,c){switch(l){case"children":if(typeof a=="string")t==="body"||t==="textarea"&&a===""||bs(e,a);else if(typeof a=="number"||typeof a=="bigint")t!=="body"&&bs(e,""+a);else return;break;case"className":uo(e,"class",a);break;case"tabIndex":uo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(e,l,a);break;case"style":Gm(e,a,c);return;case"data":if(t!=="object"){uo(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=co(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"&&Je(e,t,"name",o.name,o,null),Je(e,t,"formEncType",o.formEncType,o,null),Je(e,t,"formMethod",o.formMethod,o,null),Je(e,t,"formTarget",o.formTarget,o,null)):(Je(e,t,"encType",o.encType,o,null),Je(e,t,"method",o.method,o,null),Je(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=co(a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Zn);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=co(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),oo(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":oo(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=U1.get(l)||l,oo(e,l,a);else return}Ge=!0}function hd(e,t,l,a,o,c){switch(l){case"style":Gm(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")bs(e,a);else if(typeof a=="number"||typeof a=="bigint")bs(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=Zn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!zm.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[nn]||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}Ge=!0,l in e?e[l]=a:a===!0?e.setAttribute(l,""):oo(e,l,a)}return}Ge=!0}function Lt(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:Je(e,t,c,g,l,null)}}o&&Je(e,t,"srcSet",l.srcSet,l,null),a&&Je(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:Je(e,t,a,Q,l,null)}}$m(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:Je(e,t,o,S,l,null)}t=c,l=g,e.multiple=!!a,t!=null?Ss(e,!!a,t,!1):l!=null&&Ss(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:Je(e,t,g,S,l,null)}Bm(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:Je(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<vr.length;a++)Ae(vr[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:Je(e,t,B,a,l,null)}return;default:if(mc(t)){for(Q in l)l.hasOwnProperty(Q)&&(a=l[Q],a!==void 0&&hd(e,t,Q,a,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(a=l[S],a!=null&&Je(e,t,S,a,l,null))}var xb={};function Sb(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 P=l[q];if(l.hasOwnProperty(q)&&P!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":_=P;default:a.hasOwnProperty(q)||Je(e,t,q,null,a,P)}}for(var $ in a){var q=a[$];if(P=l[$],a.hasOwnProperty($)&&(q!=null||P!=null))switch($){case"type":q!==P&&(Ge=!0),c=q;break;case"name":q!==P&&(Ge=!0),o=q;break;case"checked":q!==P&&(Ge=!0),B=q;break;case"defaultChecked":q!==P&&(Ge=!0),Q=q;break;case"value":q!==P&&(Ge=!0),g=q;break;case"defaultValue":q!==P&&(Ge=!0),S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:q!==P&&Je(e,t,$,q,a,P)}}dc(e,g,S,_,B,Q,c,o);return;case"select":q=g=S=$=null;for(c in l)if(_=l[c],l.hasOwnProperty(c)&&_!=null)switch(c){case"value":break;case"multiple":q=_;default:a.hasOwnProperty(c)||Je(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!==_&&(Ge=!0),$=c;break;case"defaultValue":c!==_&&(Ge=!0),S=c;break;case"multiple":c!==_&&(Ge=!0),g=c;default:c!==_&&Je(e,t,o,c,a,_)}t=S,l=g,a=q,$!=null?Ss(e,!!l,$,!1):!!a!=!!l&&(t!=null?Ss(e,!!l,t,!0):Ss(e,!!l,l?[]:"",!1));return;case"textarea":q=$=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:Je(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&&(Ge=!0),$=o;break;case"defaultValue":o!==c&&(Ge=!0),q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Je(e,t,g,o,a,c)}Fm(e,$,q);return;case"option":for(var se in l)if($=l[se],l.hasOwnProperty(se)&&$!=null&&!a.hasOwnProperty(se))switch(se){case"selected":e.selected=!1;break;default:Je(e,t,se,null,a,$)}for(_ in a)if($=a[_],q=l[_],a.hasOwnProperty(_)&&$!==q&&($!=null||q!=null))switch(_){case"selected":$!==q&&(Ge=!0),e.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:Je(e,t,_,$,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 he in l)$=l[he],l.hasOwnProperty(he)&&$!=null&&!a.hasOwnProperty(he)&&Je(e,t,he,null,a,$);for(B in a)if($=a[B],q=l[B],a.hasOwnProperty(B)&&$!==q&&($!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,t));break;default:Je(e,t,B,$,a,q)}return;default:if(mc(t)){for(var Me in l)$=l[Me],l.hasOwnProperty(Me)&&$!==void 0&&!a.hasOwnProperty(Me)&&hd(e,t,Me,void 0,a,$);for(Q in a)$=a[Q],q=l[Q],!a.hasOwnProperty(Q)||$===q||$===void 0&&q===void 0||hd(e,t,Q,$,a,q);return}}for(var F in l)$=l[F],l.hasOwnProperty(F)&&$!=null&&!a.hasOwnProperty(F)&&Je(e,t,F,null,a,$);for(P in a)$=a[P],q=l[P],!a.hasOwnProperty(P)||$===q||$==null&&q==null||Je(e,t,P,$,a,q)}function K0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bb(){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&&K0(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,P=_.initiatorType;Q&&K0(P)&&(_=_.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 md=null,gd=null;function xr(e){return e.nodeType===9?e:e.ownerDocument}function Z0(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 P0(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 J0(e,t,l,a){return l=xr(l).createElement(e),l[At]=a,l[nn]=t,Lt(l,e,t),Et(l),l}function pd(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 vd=null;function wb(){var e=window.event;return e&&e.type==="popstate"?e===vd?!1:(vd=e,!0):(vd=null,!1)}var yd=typeof setTimeout=="function"?setTimeout:void 0,jb=typeof clearTimeout=="function"?clearTimeout:void 0,W0=typeof Promise=="function"?Promise:void 0,ev=typeof requestAnimationFrame=="function"?requestAnimationFrame:yd,Cb=typeof queueMicrotask=="function"?queueMicrotask:typeof W0<"u"?function(e){return W0.resolve(null).then(e).catch(Nb)}:yd;function Nb(e){setTimeout(function(){throw e})}function aa(e){return e==="head"}function tv(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),ai(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Ed(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ed(l);for(var c=l.firstChild;c;){var g=c.nextSibling,S=c.nodeName;c[Ui]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=g}}else l==="body"&&Ed(e.ownerDocument.body);l=o}while(l);ai(t)}function nv(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 lv(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 av(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 Eb(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 xd(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return Eb(t,l,e)}function Mb(e){return e.documentElement.clientHeight}function _b(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Rb(e,t,l,a,o,c,g,S,_){var B=t.nodeType===9?t:t.ownerDocument;try{var Q=B.startViewTransition({update:function(){var $=B.defaultView,q=$.navigation&&$.navigation.transition,se=B.fonts.status;a();var he=[];if(se==="loaded"&&(Mb(B),B.fonts.status==="loading"&&he.push(B.fonts.ready)),se=he.length,e!==null)for(var Me=e.suspenseyImages,F=0,z=0;z<Me.length;z++){var G=Me[z];if(!G.complete){var Z=G.getBoundingClientRect();if(0<Z.bottom&&0<Z.right&&Z.top<$.innerHeight&&Z.left<$.innerWidth){if(F+=Nv(G),F>Su){he.length=se;break}G=new Promise(_b.bind(G)),he.push(G)}}}if(0<he.length)return $=Promise.race([Promise.all(he),new Promise(function(de){return setTimeout(de,500)})]).then(o,o),(q?Promise.allSettled([q.finished,$]):$).then(c,c);if(o(),q)return q.finished.then(c,c);c()},types:l});B.__reactViewTransition=Q;var P=[];return Q.ready.then(function(){for(var $=B.documentElement.getAnimations({subtree:!0}),q=0;q<$.length;q++){var se=$[q],he=se.effect,Me=he.pseudoElement;if(Me!=null&&Me.startsWith("::view-transition")){P.push(se),se=he.getKeyframes();for(var F=Me=void 0,z=!0,G=0;G<se.length;G++){var Z=se[G],de=Z.width;if(Me===void 0)Me=de;else if(Me!==de){z=!1;break}if(de=Z.height,F===void 0)F=de;else if(F!==de){z=!1;break}delete Z.width,delete Z.height,Z.transform==="none"&&delete Z.transform}z&&Me!==void 0&&F!==void 0&&(he.setKeyframes(se),z=getComputedStyle(he.target,he.pseudoElement),z.width!==Me||z.height!==F)&&(z=se[0],z.width=Me,z.height=F,z=se[se.length-1],z.width=Me,z.height=F,he.setKeyframes(se))}}g()},function($){B.__reactViewTransition===Q&&(B.__reactViewTransition=null);try{if(typeof $=="object"&&$!==null)switch($.name){case"InvalidStateError":($.message==="View transition was skipped because document visibility state is hidden."||$.message==="Skipping view transition because document visibility state has become hidden."||$.message==="Skipping view transition because viewport size changed."||$.message==="Transition was aborted because of invalid state")&&($=null)}$!==null&&_($)}finally{a(),o(),g()}}),Q.finished.finally(function(){for(var $=0;$<P.length;$++)P[$].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}:O({},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 sv(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 bn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}bn.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(rv(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=Js(l),c.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:S,cleanup:o}),v(this._fragmentFiber.child,!1,Tb,e,S,a)}this._eventListeners=c}};function Tb(e,t,l,a){return M(e).addEventListener(t,l,a),!1}bn.prototype.removeEventListener=function(e,t,l){var a=this._eventListeners;if(a!==null&&(t=rv(a,e,t,l),t!==-1)){var o=a[t];l=o.attachedListener;var c=o.cleanup;o=Js(o.optionsOrUseCapture),v(this._fragmentFiber.child,!1,Ab,e,l,o),a.splice(t,1),c!==null&&c()}};function Ab(e,t,l,a){return M(e).removeEventListener(t,l,a),!1}function Js(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function iv(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function rv(e,t,l,a){if(e.length===0)return-1;a=iv(a);for(var o=0;o<e.length;o++){var c=e[o];if(c.type===t&&c.listener===l&&iv(c.optionsOrUseCapture)===a)return o}return-1}bn.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,Js(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,Js(c.optionsOrUseCapture));return t.removeChild(a),e}return t.dispatchEvent(e)},bn.prototype.focus=function(e){v(this._fragmentFiber.child,!0,ov,e,void 0,void 0)};function ov(e,t){return e.tag===6?!1:(e=M(e),Gb(e,t))}bn.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,Sd,t,void 0,void 0);for(var l=t.length-1;0<=l&&!ov(t[l],e);l--);};function Sd(e,t){return t.push(e),!1}bn.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=M(e),e=xr(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,Ob,e,void 0,void 0))};function Ob(e,t){return e.tag===6?!1:(e=M(e),e===t||e.contains(t)?(t.blur(),!0):!1)}bn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,zb,e,void 0,void 0)};function zb(e,t){return e.tag===6||(e=M(e),t.observe(e)),!1}bn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,Db,e,void 0,void 0);for(var l=t=0;l<Fn.length;l++){var a=Fn[l];a.fragmentInstance===this&&a.observer===e?e.unobserve(a.instance):Fn[t++]=a}Fn.length=t}};function Db(e,t){return e.tag===6||(e=M(e),t.unobserve(e)),!1}var Fn=[],bd=!1;function Hb(e,t,l){Fn.push({fragmentInstance:e,observer:t,instance:l}),bd||(bd=!0,qb(function(){bd=!1;var a=Fn;Fn=[];for(var o=0;o<a.length;o++){var c=a[o];c.observer.unobserve(c.instance)}}))}bn.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,Lb,e,void 0,void 0),e};function Lb(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}bn.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:M(t).getRootNode(e)},bn.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,Sd,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=j(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||Ub(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Ub(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,U,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,E=R=null,t=c!==null)),t):!1}function uv(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)}bn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];v(this._fragmentFiber.child,!1,Sd,t,void 0,void 0);var l=e!==!1;if(t.length===0){var a=j(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),uv(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),uv(o,l)):M(o).scrollIntoView(e),a+=l?-1:1}};function Vb(e,t){return e=M(e),cv(e,t),!1}function cv(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function fv(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,Js(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){for(var g=0,S=0;S<Fn.length;S++){var _=Fn[S];(_.fragmentInstance!==t||_.observer!==c||_.instance!==e)&&(Fn[g++]=_)}Fn.length=g,c.observe(e)}),cv(e,t))}function $b(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,Js(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(c){typeof c.rootMargin=="string"?Hb(t,c,e):c.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function wd(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":wd(l),ro(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Fb(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[Ui])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=Tn(e.nextSibling),e===null)break}return null}function Bb(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Tn(e.nextSibling),e===null))return null;return e}function dv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Tn(e.nextSibling),e===null))return null;return e}function jd(e){return e.data==="$?"||e.data==="$~"}function Cd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function kb(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 Tn(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 Nd=null;function hv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Tn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function mv(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 Gb(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 qb(e){ev(function(){ev(function(t){return e(t)})})}function gv(e,t,l){switch(t=xr(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 pv(e,t,l){for(var a in l){var o=l[a];l.hasOwnProperty(a)&&o!=null&&Je(e,t,a,null,xb,o)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Zn&&(e.onclick=null),ro(e)}function Ed(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ro(e)}var An=new Map,vv=new Set;function Sr(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 Ml=ge.d;ge.d={f:Qb,r:Yb,D:Ib,C:Xb,L:Kb,m:Zb,X:Jb,S:Pb,M:Wb};function Qb(){var e=Ml.f(),t=fu();return e||t}function Yb(e){var t=vs(e);t!==null&&t.tag===5&&t.type==="form"?xp(t):Ml.r(e)}var Ws=typeof document>"u"?null:document;function yv(e,t,l){var a=Ws;if(a&&typeof t=="string"&&t){var o=jn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),vv.has(o)||(vv.add(o),e={rel:e,crossOrigin:l,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),Lt(t,"link",e),Et(t),a.head.appendChild(t)))}}function Ib(e){Ml.D(e),yv("dns-prefetch",e,null)}function Xb(e,t){Ml.C(e,t),yv("preconnect",e,t)}function Kb(e,t,l){Ml.L(e,t,l);var a=Ws;if(a&&e&&t){var o='link[rel="preload"][as="'+jn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+jn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+jn(l.imageSizes)+'"]')):o+='[href="'+jn(e)+'"]';var c=o;switch(t){case"style":c=ei(e);break;case"script":c=ti(e)}if(!(An.has(c)||(e=O({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),An.set(c,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(br(c))||t==="script"&&a.querySelector(wr(c))))){var g=a.createElement("link");Lt(g,"link",e),t==="style"&&(g[io]=!0,g.onload=g.onerror=function(){Am(g)}),Et(g),a.head.appendChild(g)}}}function Zb(e,t){Ml.m(e,t);var l=Ws;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+jn(a)+'"][href="'+jn(e)+'"]',c=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ti(e)}if(!An.has(c)&&(e=O({rel:"modulepreload",href:e},t),An.set(c,e),l.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(wr(c)))return}a=l.createElement("link"),Lt(a,"link",e),Et(a),l.head.appendChild(a)}}}function Pb(e,t,l){Ml.S(e,t,l);var a=Ws;if(a&&e){var o=ys(a).hoistableStyles,c=ei(e);t=t||"default";var g=o.get(c);if(!g){var S={loading:0,preload:null};if(g=a.querySelector(br(c)))S.loading=5;else{e=O({rel:"stylesheet",href:e,"data-precedence":t},l),(l=An.get(c))&&Md(e,l);var _=g=a.createElement("link");Et(_),Lt(_,"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,yu(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:S},o.set(c,g)}}}function Jb(e,t){Ml.X(e,t);var l=Ws;if(l&&e){var a=ys(l).hoistableScripts,o=ti(e),c=a.get(o);c||(c=l.querySelector(wr(o)),c||(e=O({src:e,async:!0},t),(t=An.get(o))&&_d(e,t),c=l.createElement("script"),Et(c),Lt(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function Wb(e,t){Ml.M(e,t);var l=Ws;if(l&&e){var a=ys(l).hoistableScripts,o=ti(e),c=a.get(o);c||(c=l.querySelector(wr(o)),c||(e=O({src:e,async:!0,type:"module"},t),(t=An.get(o))&&_d(e,t),c=l.createElement("script"),Et(c),Lt(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(o,c))}}function xv(e,t,l,a){var o=(o=tn.current)?Sr(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=ei(l.href),t=ys(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=ei(l.href);var c=ys(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(br(e)))?c._p||(g.instance=c,g.state.loading=5):(c=An.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},An.set(e,c)),e2(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=ti(l),t=ys(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 ei(e){return'href="'+jn(e)+'"'}function br(e){return'link[rel="stylesheet"]['+e+"]"}function Sv(e){return O({},e,{"data-precedence":e.precedence,precedence:null})}function e2(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[io]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[io]=!0,t.onload=t.onerror=Am.bind(null,t),Lt(t,"link",l),Et(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 ti(e){return'[src="'+jn(e)+'"]'}function wr(e){return"script[async]"+e}function bv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+jn(l.href)+'"]');if(a)return t.instance=a,Et(a),a;var o=O({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Et(a),Lt(a,"style",o),yu(a,l.precedence,e),t.instance=a;case"stylesheet":o=ei(l.href);var c=e.querySelector(br(o));if(c)return t.state.loading|=4,t.instance=c,Et(c),c;a=Sv(l),(o=An.get(o))&&Md(a,o),c=(e.ownerDocument||e).createElement("link"),Et(c);var g=c;return g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Lt(c,"link",a),t.state.loading|=4,yu(c,l.precedence,e),t.instance=c;case"script":return c=ti(l.src),(o=e.querySelector(wr(c)))?(t.instance=o,Et(o),o):(a=l,(o=An.get(c))&&(a=O({},l),_d(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),Et(o),Lt(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,yu(a,l.precedence,e));return t.instance}function yu(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 Md(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function _d(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xu=null;function wv(e,t,l){if(xu===null){var a=new Map,o=xu=new Map;o.set(l,a)}else o=xu,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[Ui]||c[At]||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 Rd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function t2(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 jv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Cv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Nv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Ev(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Nv(t),e.suspenseyImages.push(t)),e=a2.bind(e),t.decode().then(e,e))}function n2(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=ei(a.href),c=t.querySelector(br(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=jr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,Et(c);return}c=t.ownerDocument||t,a=Sv(a),(o=An.get(o))&&Md(a,o),c=c.createElement("link"),Et(c);var g=c;g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),Lt(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=jr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Su=0;function l2(e,t){return e.stylesheets&&e.count===0&&wu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&wu(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Su===0&&(Su=62500*bb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Su?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function Mv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)wu(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function jr(){this.count--,Mv(this)}function a2(){this.imgCount--,Mv(this)}var bu=null;function wu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bu=new Map,t.forEach(s2,e),bu=null,jr.call(e))}function s2(e,t){if(!(t.state.loading&4)){var l=bu.get(e);if(l)var a=l.get(null);else{l=new Map,bu.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=jr.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 ni={$$typeof:W,Provider:null,Consumer:null,_currentValue:ct,_currentValue2:ct,_threadCount:0};function i2(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=oc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oc(0),this.hiddenUpdates=oc(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 _v(e,t,l,a,o,c,g,S,_,B,Q,P){return e=new i2(e,t,l,g,_,B,Q,P,S),t=1,c===!0&&(t|=24),c=ln(3,null,null,t),e.current=c,c.stateNode=e,t=Gc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},Ic(c),e}function Rv(e){return e?(e=_s,e):_s}function Tv(e,t,l,a,o,c){o=Rv(o),a.context===null?a.context=o:a.pendingContext=o,a=Yl(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=Il(e,a,t),l!==null&&(on(l,e,t),er(l,e,t))}function Av(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Td(e,t){Av(e,t),(e=e.alternate)&&Av(e,t)}function Ov(e){if(e.tag===13||e.tag===31){var t=Da(e,67108864);t!==null&&on(t,e,67108864),Td(e,67108864)}}function zv(e){if(e.tag===13||e.tag===31){var t=Sn();t=uc(t);var l=Da(e,t);l!==null&&on(l,e,t),Td(e,t)}}var li=!0;function r2(e,t,l,a){var o=ce.T;ce.T=null;var c=ge.p;try{ge.p=2,Ad(e,t,l,a)}finally{ge.p=c,ce.T=o}}function o2(e,t,l,a){var o=ce.T;ce.T=null;var c=ge.p;try{ge.p=8,Ad(e,t,l,a)}finally{ge.p=c,ce.T=o}}function Ad(e,t,l,a){if(li){var o=Od(a);if(o===null)dd(e,t,a,ju,l),Hv(e,a);else if(c2(o,e,t,l,a))a.stopPropagation();else if(Hv(e,a),t&4&&-1<u2.indexOf(e)){for(;o!==null;){var c=vs(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var g=Kn(c.pendingLanes);if(g!==0){var S=c;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var _=1<<31-nt(g);S.entanglements[1]|=_,g&=~_}il(c),(Ye&6)===0&&(ou=et()+500,pr(0))}}break;case 31:case 13:S=Da(c,2),S!==null&&on(S,c,2),fu(),Td(c,2)}if(c=Od(a),c===null&&dd(e,t,a,ju,l),c===o)break;o=c}o!==null&&a.stopPropagation()}else dd(e,t,a,null,l)}}function Od(e){return e=pc(e),zd(e)}var ju=null;function zd(e){if(ju=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 ju=e,null}function Dv(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(Xn()){case Hl:return 2;case Na:return 8;case Ea:case no:return 32;case zi:return 268435456;default:return 32}default:return 32}}var Dd=!1,sa=null,ia=null,ra=null,Cr=new Map,Nr=new Map,oa=[],u2="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 Hv(e,t){switch(e){case"focusin":case"focusout":sa=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":ra=null;break;case"pointerover":case"pointerout":Cr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nr.delete(t.pointerId)}}function Er(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=vs(t),t!==null&&Ov(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function c2(e,t,l,a,o){switch(t){case"focusin":return sa=Er(sa,e,t,l,a,o),!0;case"dragenter":return ia=Er(ia,e,t,l,a,o),!0;case"mouseover":return ra=Er(ra,e,t,l,a,o),!0;case"pointerover":var c=o.pointerId;return Cr.set(c,Er(Cr.get(c)||null,e,t,l,a,o)),!0;case"gotpointercapture":return c=o.pointerId,Nr.set(c,Er(Nr.get(c)||null,e,t,l,a,o)),!0}return!1}function Lv(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,_m(e.priority,function(){zv(l)});return}}else if(t===31){if(t=m(l),t!==null){e.blockedOn=t,_m(e.priority,function(){zv(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 Cu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Od(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);gc=a,l.target.dispatchEvent(a),gc=null}else return t=vs(l),t!==null&&Ov(t),e.blockedOn=l,!1;t.shift()}return!0}function Uv(e,t,l){Cu(e)&&l.delete(t)}function f2(){Dd=!1,sa!==null&&Cu(sa)&&(sa=null),ia!==null&&Cu(ia)&&(ia=null),ra!==null&&Cu(ra)&&(ra=null),Cr.forEach(Uv),Nr.forEach(Uv)}function Nu(e,t){e.blockedOn===t&&(e.blockedOn=null,Dd||(Dd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,f2)))}var Eu=null;function Vv(e){Eu!==e&&(Eu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Eu===e&&(Eu=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(zd(a||l)===null)continue;break}var c=vs(l);c!==null&&(e.splice(t,3),t-=3,gf(c,{pending:!0,data:o,method:l.method,action:a},a,o))}}))}function ai(e){function t(_){return Nu(_,e)}sa!==null&&Nu(sa,e),ia!==null&&Nu(ia,e),ra!==null&&Nu(ra,e),Cr.forEach(t),Nr.forEach(t);for(var l=0;l<oa.length;l++){var a=oa[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<oa.length&&(l=oa[0],l.blockedOn===null);)Lv(l),l.blockedOn===null&&oa.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[nn]||null;if(typeof c=="function")g||Vv(l);else if(g){var S=null;if(c&&c.hasAttribute("formAction")){if(o=c,g=c[nn]||null)S=g.formAction;else if(zd(o)!==null)continue}else S=g.action;typeof S=="function"?l[a+1]=S:(l.splice(a,3),a-=3),Vv(l)}}}function $v(){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 Hd(e){this._internalRoot=e}Mu.prototype.render=Hd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Sn();Tv(l,a,e,t,null,null)},Mu.prototype.unmount=Hd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Tv(e.current,2,null,e,null,null),fu(),t[ps]=null}};function Mu(e){this._internalRoot=e}Mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mm();e={blockedOn:null,target:e,priority:t};for(var l=0;l<oa.length&&t!==0&&t<oa[l].priority;l++);oa.splice(l,0,e),l===0&&Lv(e)}};var Fv=s.version;if(Fv!=="19.3.1")throw Error(r(527,Fv,"19.3.1"));ge.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 d2={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_u.isDisabled&&_u.supportsFiber)try{Ll=_u.inject(d2),re=_u}catch{}}return _r.createRoot=function(e,t){if(!u(e))throw Error(r(299));var l=!1,a="",o=Rp,c=Tp,g=Ap;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=_v(e,1,!1,null,null,l,a,null,o,c,g,$v),e[ps]=t.current,fd(e),new Hd(t)},_r.hydrateRoot=function(e,t,l){if(!u(e))throw Error(r(299));var a=!1,o="",c=Rp,g=Tp,S=Ap,_=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=_v(e,1,!0,t,l??null,a,o,_,c,g,S,$v),t.context=Rv(null),l=t.current,a=Sn(),a=uc(a),o=Yl(a),o.callback=null,Il(l,o,a),l=a,t.current.lanes=l,Li(t,l),il(t),e[ps]=t.current,fd(e),new Mu(t)},_r.version="19.3.1",_r}var Pv;function N2(){if(Pv)return $d.exports;Pv=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(),$d.exports=C2(),$d.exports}var E2=N2();const sx=C.createContext(void 0),ix=n=>{const s=C.useContext(sx);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},M2=({client:n,children:s})=>(C.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(sx.Provider,{value:n,children:s})),_2={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)};var ha,nm,Xy,R2=(Xy=class{constructor(){ye(this,ha,_2);ye(this,nm,!1)}setTimeoutProvider(n){fe(this,ha,n)}setTimeout(n,s){return L(this,ha).setTimeout(n,s)}clearTimeout(n){L(this,ha).clearTimeout(n)}setInterval(n,s){return L(this,ha).setInterval(n,s)}clearInterval(n){L(this,ha).clearInterval(n)}},ha=new WeakMap,nm=new WeakMap,Xy);const ns=new R2;function T2(n){setTimeout(n,0)}const A2=typeof window>"u"||"Deno"in globalThis;function cn(){}function O2(n,s){return typeof n=="function"?n(s):n}function rx(n){return typeof n=="number"&&n>=0&&n!==1/0}function ox(n,s){return Math.max(n+(s||0)-Date.now(),0)}function ut(n,s){return typeof n=="function"?n(s):n}function Jv(n,s){const{type:i="all",exact:r,fetchStatus:u,predicate:d,queryKey:h,stale:m}=n;if(h){if(r){if(s.queryHash!==am(h,s.options))return!1}else if(!Mi(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 Wv(n,s){const{exact:i,status:r,predicate:u,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(i){if(Gr(s.options.mutationKey)!==Gr(d))return!1}else if(!Mi(s.options.mutationKey,d))return!1}return!(r&&s.state.status!==r||u&&!u(s))}function am(n,s){return((s==null?void 0:s.queryKeyHashFn)||Gr)(n)}function Gr(n){return JSON.stringify(n,(s,i)=>jh(i)?Object.keys(i).sort().reduce((r,u)=>(r[u]=i[u],r),{}):i)}function Mi(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(!Mi(n[r],s[r]))return!1;return!0}const i=Object.keys(s);for(const r of i)if(!Mi(n[r],s[r]))return!1;return!0}return!1}const z2=Object.prototype.hasOwnProperty;function ux(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=ey(n)&&ey(s);if(!r&&!(jh(n)&&jh(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:z2.call(n,x))&&p++;continue}if(v===null||b===null||typeof v!="object"||typeof b!="object"){m[x]=b;continue}const w=ux(v,b,i+1);m[x]=w,w===v&&p++}return u===h&&p===u?n:m}function Gd(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 ey(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function jh(n){if(!ty(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!(!ty(r)||!r.hasOwnProperty("isPrototypeOf")||s!==Object.prototype)}function ty(n){return Object.prototype.toString.call(n)==="[object Object]"}function D2(n){return new Promise(s=>{ns.setTimeout(s,n)})}function Ch(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?ux(n,s):s}function cx(n){return n}function H2(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function L2(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}const sm=Symbol();function fx(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===sm?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function dx(n,s){return typeof n=="function"?n(...s):!!n}function U2(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 V2=()=>A2;const im=()=>V2();var Wr=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(){}},ls,ma,mi,Ky,$2=(Ky=class extends Wr{constructor(){super();ye(this,ls);ye(this,ma);ye(this,mi);fe(this,mi,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){L(this,ma)||this.setEventListener(L(this,mi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,ma))==null||s.call(this),fe(this,ma,void 0))}setEventListener(s){var i;fe(this,mi,s),(i=L(this,ma))==null||i.call(this),fe(this,ma,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){L(this,ls)!==s&&(fe(this,ls,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof L(this,ls)=="boolean"?L(this,ls):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},ls=new WeakMap,ma=new WeakMap,mi=new WeakMap,Ky);const rm=new $2,F2=T2;function B2(){let n=[],s=0,i=m=>{m()},r=m=>{m()},u=F2;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 Vt=B2();var gi,ga,pi,Zy,k2=(Zy=class extends Wr{constructor(){super();ye(this,gi,!0);ye(this,ga);ye(this,pi);fe(this,pi,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,ga)||this.setEventListener(L(this,pi))}onUnsubscribe(){var s;this.hasListeners()||((s=L(this,ga))==null||s.call(this),fe(this,ga,void 0))}setEventListener(s){var i;fe(this,pi,s),(i=L(this,ga))==null||i.call(this),fe(this,ga,s(this.setOnline.bind(this)))}setOnline(s){L(this,gi)!==s&&(fe(this,gi,s),this.listeners.forEach(i=>{i(s)}))}isOnline(){return L(this,gi)}},gi=new WeakMap,ga=new WeakMap,pi=new WeakMap,Zy);const $u=new k2;function G2(n){return Math.min(1e3*2**n,3e4)}function hx(n){return(n??"online")==="online"?$u.isOnline():!0}var Nh=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function mx(n){let s=!1,i=0,r,u="pending",d,h;const m=new Promise((E,U)=>{d=E,h=U});m.catch(cn);const p=()=>u!=="pending",y=E=>{var U;if(!p()){const T=new Nh(E);N(T),(U=n.onCancel)==null||U.call(n,T)}},x=()=>{s=!0},v=()=>{s=!1},b=()=>rm.isFocused()&&(n.networkMode==="always"||$u.isOnline())&&n.canRun(),w=()=>hx(n.networkMode)&&n.canRun(),j=E=>{p()||(r==null||r(),u="resolved",d(E))},N=E=>{p()||(r==null||r(),u="rejected",h(E))},M=E=>new Promise(U=>{var T;r=H=>{(p()||E())&&U(H)},(T=n.onPause)==null||T.call(n)}).then(()=>{var U;r=void 0,p()||(U=n.onContinue)==null||U.call(n)}),R=()=>{if(p())return;let E;const U=i===0?n.initialPromise:void 0;try{E=U??n.fn()}catch(T){E=Promise.reject(T)}Promise.resolve(E).then(j).catch(T=>{var ee;if(p())return;const H=n.retry??(im()?0:3),D=n.retryDelay??G2,O=typeof D=="function"?D(i,T):D,I=H===!0||typeof H=="number"&&i<H||typeof H=="function"&&H(i,T);if(s||!I){N(T);return}i++,(ee=n.onFail)==null||ee.call(n,i,T),D2(O).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 as,Py,gx=(Py=class{constructor(){ye(this,as)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rx(this.gcTime)&&fe(this,as,ns.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(im()?1/0:3e5))}clearGcTimeout(){L(this,as)!==void 0&&(ns.clearTimeout(L(this,as)),fe(this,as,void 0))}},as=new WeakMap,Py);function q2(n){return{onFetch:(s,i)=>{var x,v,b,w,j;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=((j=s.state.data)==null?void 0:j.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const y=async()=>{let N=!1;const M=U=>{U2(U,()=>s.signal,()=>N=!0)},R=fx(s.options,s.fetchOptions),E=async(U,T,H)=>{if(N)return Promise.reject(s.signal.reason);if(T==null&&U.pages.length)return Promise.resolve(U);const O=(()=>{const ne={client:s.client,queryKey:s.queryKey,pageParam:T,direction:H?"backward":"forward",meta:s.options.meta};return M(ne),ne})(),I=await R(O),{maxPages:ee}=s.options,k=H?L2:H2;return{pages:k(U.pages,I,ee),pageParams:k(U.pageParams,T,ee)}};if(u&&d.length){const U=u==="backward",T=U?px:Eh,H={pages:d,pageParams:h};m=await E(H,T(r,H),U)}else{const U=n??d.length;do{const T=p===0?h[0]===void 0?r.initialPageParam:h[0]:Eh(r,m);if(p>0&&T==null)break;m=await E(m,T),p++}while(p<U)}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 Eh(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 px(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 Q2(n,s){return s?Eh(n,s)!=null:!1}function Y2(n,s){return!s||!n.getPreviousPageParam?!1:px(n,s)!=null}var vi,ss,yi,On,is,Nt,Xr,rs,Bn,Tl,Jy,I2=(Jy=class extends gx{constructor(s){super();ye(this,Bn);ye(this,vi);ye(this,ss);ye(this,yi);ye(this,On);ye(this,is);ye(this,Nt);ye(this,Xr);ye(this,rs);fe(this,rs,!1),fe(this,Xr,s.defaultOptions),this.setOptions(s.options),this.observers=[],fe(this,is,s.client),fe(this,On,L(this,is).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,fe(this,ss,ly(this.options)),this.state=s.state??L(this,ss),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,vi)}get promise(){var s;return(s=L(this,Nt))==null?void 0:s.promise}setOptions(s){if(this.options={...L(this,Xr),...s},s!=null&&s._type&&fe(this,vi,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=ly(this.options);i.data!==void 0&&(this.setState(ny(i.data,i.dataUpdatedAt)),fe(this,ss,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,On).remove(this)}setData(s,i){const r=Ch(this.state.data,s,this.options);return De(this,Bn,Tl).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,Bn,Tl).call(this,{type:"setState",state:s})}cancel(s){var r,u;const i=(r=L(this,Nt))==null?void 0:r.promise;return(u=L(this,Nt))==null||u.cancel(s),i?i.then(cn).catch(cn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,ss)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>ut(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>ut(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:!ox(this.state.dataUpdatedAt,s)}onFocus(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Nt))==null||i.continue()}onOnline(){var s,i;(s=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||s.refetch({cancelRefetch:!1}),(i=L(this,Nt))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),L(this,On).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,Nt)&&(L(this,rs)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,Nt).cancel({revert:!0}):L(this,Nt).cancelRetry()),this.scheduleGc()),L(this,On).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Bn,Tl).call(this,{type:"invalidate"})}async fetch(s,i){var y,x,v,b,w,j,N,M,R,E,U,T;if(this.state.fetchStatus!=="idle"&&((y=L(this,Nt))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(L(this,Nt))return L(this,Nt).continueRetry(),L(this,Nt).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:()=>(fe(this,rs,!0),r.signal)})},d=()=>{const H=fx(this.options,i),O=(()=>{const I={client:L(this,is),queryKey:this.queryKey,meta:this.meta};return u(I),I})();return fe(this,rs,!1),this.options.persister?this.options.persister(H,O,this):H(O)},m=(()=>{const H={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:L(this,is),state:this.state,fetchFn:d};return u(H),H})();(x=L(this,vi)==="infinite"?q2(this.options.pages):this.options.behavior)==null||x.onFetch(m,this),fe(this,yi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&De(this,Bn,Tl).call(this,{type:"fetch",meta:(b=m.fetchOptions)==null?void 0:b.meta});const p=fe(this,Nt,mx({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:H=>{H instanceof Nh&&H.revert&&this.setState({...L(this,yi),fetchStatus:"idle"}),r.abort()},onFail:(H,D)=>{De(this,Bn,Tl).call(this,{type:"failed",failureCount:H,error:D})},onPause:()=>{De(this,Bn,Tl).call(this,{type:"pause"})},onContinue:()=>{De(this,Bn,Tl).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),(j=(w=L(this,On).config).onSuccess)==null||j.call(w,H,this),(M=(N=L(this,On).config).onSettled)==null||M.call(N,H,this.state.error,this),H}catch(H){if(H instanceof Nh){if(H.silent)return L(this,Nt).promise;if(H.revert){if(this.state.data===void 0)throw H;return this.state.data}}throw De(this,Bn,Tl).call(this,{type:"error",error:H}),(E=(R=L(this,On).config).onError)==null||E.call(R,H,this),(T=(U=L(this,On).config).onSettled)==null||T.call(U,this.state.data,H,this),H}finally{L(this,Nt)===p&&fe(this,Nt,void 0),this.scheduleGc()}}},vi=new WeakMap,ss=new WeakMap,yi=new WeakMap,On=new WeakMap,is=new WeakMap,Nt=new WeakMap,Xr=new WeakMap,rs=new WeakMap,Bn=new WeakSet,Tl=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,...vx(r.data,this.options),fetchMeta:s.meta??null};case"success":const u={...r,...ny(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,yi,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),Vt.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),L(this,On).notify({query:this,type:"updated",action:s})})},Jy);function vx(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hx(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function ny(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ly(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 Jt,He,Kr,Wt,os,xi,Ol,Zr,Si,bi,us,cs,pa,wi,Ie,Ur,Mh,_h,Rh,Th,Ah,Oh,zh,Dh,Wy,yx=(Wy=class extends Wr{constructor(s,i){super();ye(this,Ie);ye(this,Jt);ye(this,He);ye(this,Kr);ye(this,Wt);ye(this,os);ye(this,xi);ye(this,Ol);ye(this,Zr);ye(this,Si);ye(this,bi);ye(this,us);ye(this,cs);ye(this,pa);ye(this,wi,new Set);this.options=i,fe(this,Jt,s),fe(this,Ol,null),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,He).addObserver(this),ay(L(this,He),this.options)?De(this,Ie,Ur).call(this):this.updateResult(),De(this,Ie,Ah).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Hh(L(this,He),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Hh(L(this,He),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Ie,Oh).call(this),De(this,Ie,zh).call(this),L(this,He).removeObserver(this)}setOptions(s){const i=this.options,r=L(this,He);if(this.options=L(this,Jt).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ut(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,Ie,Dh).call(this),L(this,He).setOptions(this.options),i._defaulted&&!Gd(this.options,i)&&L(this,Jt).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,He),observer:this});const u=this.hasListeners();u&&sy(L(this,He),r,this.options,i)&&De(this,Ie,Ur).call(this),this.updateResult(),u&&(L(this,He)!==r||ut(this.options.enabled,L(this,He))!==ut(i.enabled,L(this,He))||ut(this.options.staleTime,L(this,He))!==ut(i.staleTime,L(this,He)))&&De(this,Ie,_h).call(this);const d=De(this,Ie,Rh).call(this);u&&(L(this,He)!==r||ut(this.options.enabled,L(this,He))!==ut(i.enabled,L(this,He))||d!==L(this,pa))&&De(this,Ie,Th).call(this,d)}getOptimisticResult(s){const i=L(this,Jt).getQueryCache().build(L(this,Jt),s),r=this.createResult(i,s);return Gd(this.getCurrentResult(),r)||(fe(this,Wt,r),fe(this,xi,this.options),fe(this,os,L(this,He).state)),r}getCurrentResult(){return L(this,Wt)}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,wi).add(s)}getCurrentQuery(){return L(this,He)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=L(this,Jt).defaultQueryOptions(s),r=L(this,Jt).getQueryCache().build(L(this,Jt),i);let u=()=>{},d;const h=new Promise(m=>{d=m,u=L(this,Jt).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,Ie,Ur).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,Wt)))}createResult(s,i){var D;const r=L(this,He),u=this.options,d=L(this,Wt),h=L(this,os),m=L(this,xi),p=s!==r?s.state:L(this,Kr),{state:y}=s;let x={...y},v=!1,b;if(i._optimisticResults){const O=this.hasListeners(),I=!O&&ay(s,i),ee=O&&sy(s,r,i,u);(I||ee)&&(x={...x,...vx(y.data,s.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:w,errorUpdatedAt:j,status:N}=x;b=x.data;let M=!1;if(i.placeholderData!==void 0&&b===void 0&&N==="pending"){let O;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(O=d.data,M=!0):O=typeof i.placeholderData=="function"?i.placeholderData((D=L(this,bi))==null?void 0:D.state.data,L(this,bi)):i.placeholderData,O!==void 0&&(N="success",b=Ch(d==null?void 0:d.data,O,i),v=!0)}if(i.select&&b!==void 0&&!M)if(d&&b===(h==null?void 0:h.data)&&i.select===L(this,Zr))b=L(this,Si);else try{fe(this,Zr,i.select),b=i.select(b),b=Ch(d==null?void 0:d.data,b,i),fe(this,Si,b),fe(this,Ol,null)}catch(O){fe(this,Ol,O)}else b===void 0&&fe(this,Ol,null);L(this,Ol)&&(w=L(this,Ol),b=L(this,Si),j=Date.now(),N="error",v=!1);const R=x.fetchStatus==="fetching",E=N==="pending",U=N==="error",T=E&&R,H=b!==void 0;return{status:N,fetchStatus:x.fetchStatus,isPending:E,isSuccess:N==="success",isError:U,isInitialLoading:T,isLoading:T,data:b,dataUpdatedAt:x.dataUpdatedAt,error:w,errorUpdatedAt:j,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&&!E,isLoadingError:U&&!H,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:U&&H,isStale:om(s,i),refetch:this.refetch,isEnabled:ut(i.enabled,s)!==!1}}updateResult(){const s=L(this,Wt),i=this.createResult(L(this,He),this.options);if(fe(this,os,L(this,He).state),fe(this,xi,this.options),L(this,os).data!==void 0&&fe(this,bi,L(this,He)),Gd(i,s))return;fe(this,Wt,i);const u=(()=>{if(!s)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!L(this,wi).size)return!0;const m=new Set(h??L(this,wi));return this.options.throwOnError&&m.add("error"),Object.keys(L(this,Wt)).some(p=>{const y=p;return L(this,Wt)[y]!==s[y]&&m.has(y)})})();Vt.batch(()=>{u&&this.listeners.forEach(d=>{d(L(this,Wt))}),L(this,Jt).getQueryCache().notify({query:L(this,He),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Ie,Ah).call(this)}},Jt=new WeakMap,He=new WeakMap,Kr=new WeakMap,Wt=new WeakMap,os=new WeakMap,xi=new WeakMap,Ol=new WeakMap,Zr=new WeakMap,Si=new WeakMap,bi=new WeakMap,us=new WeakMap,cs=new WeakMap,pa=new WeakMap,wi=new WeakMap,Ie=new WeakSet,Ur=function(s){De(this,Ie,Dh).call(this);let i=L(this,He).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(cn)),i},Mh=function(s){return!im()&&ut(this.options.enabled,L(this,He))!==!1&&rx(s)},_h=function(){De(this,Ie,Oh).call(this);const s=ut(this.options.staleTime,L(this,He));if(L(this,Wt).isStale||!De(this,Ie,Mh).call(this,s))return;const i=ox(L(this,Wt).dataUpdatedAt,s)+1;fe(this,us,ns.setTimeout(()=>{L(this,Wt).isStale||this.updateResult()},i))},Rh=function(){return ut(this.options.refetchInterval,L(this,He))??!1},Th=function(s){De(this,Ie,zh).call(this),fe(this,pa,s),!(L(this,pa)===0||!De(this,Ie,Mh).call(this,L(this,pa)))&&fe(this,cs,ns.setInterval(()=>{(this.options.refetchIntervalInBackground||rm.isFocused())&&De(this,Ie,Ur).call(this)},L(this,pa)))},Ah=function(){De(this,Ie,_h).call(this),De(this,Ie,Th).call(this,De(this,Ie,Rh).call(this))},Oh=function(){L(this,us)!==void 0&&(ns.clearTimeout(L(this,us)),fe(this,us,void 0))},zh=function(){L(this,cs)!==void 0&&(ns.clearInterval(L(this,cs)),fe(this,cs,void 0))},Dh=function(){const s=L(this,Jt).getQueryCache().build(L(this,Jt),this.options);if(s===L(this,He))return;const i=L(this,He);fe(this,He,s),fe(this,Kr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},Wy);function X2(n,s){return ut(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&ut(s.retryOnMount,n)===!1)}function ay(n,s){return X2(n,s)||n.state.data!==void 0&&Hh(n,s,s.refetchOnMount)}function Hh(n,s,i){if(ut(s.enabled,n)!==!1&&ut(s.staleTime,n)!=="static"){const r=ut(i,n);return r==="always"||r!==!1&&om(n,s)}return!1}function sy(n,s,i,r){return(n!==s||ut(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&om(n,i)}function om(n,s){return ut(s.enabled,n)!==!1&&n.isStaleByTime(ut(s.staleTime,n))}var K2=class extends yx{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,j;const{state:i}=n,r=super.createResult(n,s),{isFetching:u,isRefetching:d,isError:h,isRefetchError:m}=r,p=(j=(w=i.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:j.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:Q2(s,i.data),hasPreviousPage:Y2(s,i.data),isFetchNextPageError:y,isFetchingNextPage:x,isFetchPreviousPageError:v,isFetchingPreviousPage:b,isRefetchError:m&&!y&&!v,isRefetching:d&&!x&&!b}}},Pr,rl,qt,fs,ol,ca,ex,Z2=(ex=class extends gx{constructor(s){super();ye(this,ol);ye(this,Pr);ye(this,rl);ye(this,qt);ye(this,fs);fe(this,Pr,s.client),this.mutationId=s.mutationId,fe(this,qt,s.mutationCache),fe(this,rl,[]),this.state=s.state||P2(),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,rl).includes(s)||(L(this,rl).push(s),this.clearGcTimeout(),L(this,qt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){fe(this,rl,L(this,rl).filter(i=>i!==s)),this.scheduleGc(),L(this,qt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){L(this,rl).length||(this.state.status==="pending"?this.scheduleGc():L(this,qt).remove(this))}continue(){var s;return((s=L(this,fs))==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,j,N,M,R,E,U,T,H,D,O,I;const i=()=>{De(this,ol,ca).call(this,{type:"continue"})},r={client:L(this,Pr),meta:this.options.meta,mutationKey:this.options.mutationKey},u=fe(this,fs,mx({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(ee,k)=>{De(this,ol,ca).call(this,{type:"failed",failureCount:ee,error:k})},onPause:()=>{De(this,ol,ca).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,qt).canRun(this)})),d=this.state.status==="pending",h=!u.canStart();try{if(d)i();else{De(this,ol,ca).call(this,{type:"pending",variables:s,isPaused:h}),L(this,qt).config.onMutate&&await L(this,qt).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,ol,ca).call(this,{type:"pending",context:k,variables:s,isPaused:h})}const ee=await u.start();return await((x=(y=L(this,qt).config).onSuccess)==null?void 0:x.call(y,ee,s,this.state.context,this,r)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,ee,s,this.state.context,r)),await((j=(w=L(this,qt).config).onSettled)==null?void 0:j.call(w,ee,null,this.state.variables,this.state.context,this,r)),await((M=(N=this.options).onSettled)==null?void 0:M.call(N,ee,null,s,this.state.context,r)),De(this,ol,ca).call(this,{type:"success",data:ee}),ee}catch(ee){try{await((E=(R=L(this,qt).config).onError)==null?void 0:E.call(R,ee,s,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((T=(U=this.options).onError)==null?void 0:T.call(U,ee,s,this.state.context,r))}catch(k){Promise.reject(k)}try{await((D=(H=L(this,qt).config).onSettled)==null?void 0:D.call(H,void 0,ee,this.state.variables,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((I=(O=this.options).onSettled)==null?void 0:I.call(O,void 0,ee,s,this.state.context,r))}catch(k){Promise.reject(k)}throw De(this,ol,ca).call(this,{type:"error",error:ee}),ee}finally{L(this,fs)===u&&fe(this,fs,void 0),L(this,qt).runNext(this)}}},Pr=new WeakMap,rl=new WeakMap,qt=new WeakMap,fs=new WeakMap,ol=new WeakSet,ca=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),Vt.batch(()=>{L(this,rl).forEach(r=>{r.onMutationUpdate(s)}),L(this,qt).notify({mutation:this,type:"updated",action:s})})},ex);function P2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var va,kn,Jr,tx,J2=(tx=class extends Wr{constructor(s={}){super();ye(this,va);ye(this,kn);ye(this,Jr);this.config=s,fe(this,va,new Set),fe(this,kn,new Map),fe(this,Jr,0)}build(s,i,r){const u=new Z2({client:s,mutationCache:this,mutationId:++Ru(this,Jr)._,options:s.defaultMutationOptions(i),state:r});return this.add(u),u}add(s){L(this,va).add(s);const i=Tu(s);if(typeof i=="string"){const r=L(this,kn).get(i);r?r.push(s):L(this,kn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(L(this,va).delete(s)){const i=Tu(s);if(typeof i=="string"){const r=L(this,kn).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,kn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){var r;const i=Tu(s);if(typeof i=="string"){const u=(r=L(this,kn).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=Tu(s);return typeof i=="string"?((u=(r=L(this,kn).get(i))==null?void 0:r.find(d=>d!==s&&d.state.isPaused))==null?void 0:u.continue())??Promise.resolve():Promise.resolve()}clear(){Vt.batch(()=>{const s=this.getAll();L(this,va).clear(),L(this,kn).clear(),s.forEach(i=>{this.notify({type:"removed",mutation:i})})})}getAll(){return Array.from(L(this,va))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Wv(i,r))}findAll(s={}){return this.getAll().filter(i=>Wv(s,i))}notify(s){Vt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return Vt.batch(()=>Promise.all(s.map(i=>i.continue().catch(cn))))}},va=new WeakMap,kn=new WeakMap,Jr=new WeakMap,tx);function Tu(n){var s;return(s=n.options.scope)==null?void 0:s.id}var ul,nx,W2=(nx=class extends Wr{constructor(s={}){super();ye(this,ul);this.config=s,fe(this,ul,new Map)}build(s,i,r){const u=i.queryKey,d=i.queryHash??am(u,i);let h=this.get(d);return h||(h=new I2({client:s,queryKey:u,queryHash:d,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(u)}),this.add(h)),h}add(s){L(this,ul).has(s.queryHash)||(L(this,ul).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){L(this,ul).get(s.queryHash)===s&&(s.destroy(),L(this,ul).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){Vt.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return L(this,ul).get(s)}getAll(){return[...L(this,ul).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Jv(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>Jv(s,r)):i}notify(s){Vt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){Vt.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){Vt.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},ul=new WeakMap,nx),dt,ya,xa,ji,Ci,Sa,Ni,Ei,lx,ew=(lx=class{constructor(n={}){ye(this,dt);ye(this,ya);ye(this,xa);ye(this,ji);ye(this,Ci);ye(this,Sa);ye(this,Ni);ye(this,Ei);fe(this,dt,n.queryCache||new W2),fe(this,ya,n.mutationCache||new J2),fe(this,xa,n.defaultOptions||{}),fe(this,ji,new Map),fe(this,Ci,new Map),fe(this,Sa,0)}mount(){Ru(this,Sa)._++,L(this,Sa)===1&&(fe(this,Ni,rm.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,dt).onFocus())})),fe(this,Ei,$u.subscribe(async n=>{n&&(await this.resumePausedMutations(),L(this,dt).onOnline())})))}unmount(){var n,s;Ru(this,Sa)._--,L(this,Sa)===0&&((n=L(this,Ni))==null||n.call(this),fe(this,Ni,void 0),(s=L(this,Ei))==null||s.call(this),fe(this,Ei,void 0))}isFetching(n){return L(this,dt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return L(this,ya).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=L(this,dt).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=L(this,dt).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ut(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return L(this,dt).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,dt).get(r.queryHash))==null?void 0:h.state.data,d=O2(s,u);if(d!==void 0)return L(this,dt).build(this,r).setData(d,{...i,manual:!0})}setQueriesData(n,s,i){return Vt.batch(()=>L(this,dt).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,dt).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=L(this,dt);Vt.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=L(this,dt);return Vt.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=Vt.batch(()=>L(this,dt).findAll(n).map(u=>u.cancel(i)));return Promise.all(r).then(cn).catch(cn)}invalidateQueries(n,s={}){return Vt.batch(()=>(L(this,dt).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=Vt.batch(()=>L(this,dt).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,i);return i.throwOnError||(d=d.catch(cn)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(cn)}async query(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=L(this,dt).build(this,s),r=i.isStaleByTime(ut(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,dt).build(this,s);return i.isStaleByTime(ut(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(cn).catch(cn)}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(cn).catch(cn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return $u.isOnline()?L(this,ya).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,dt)}getMutationCache(){return L(this,ya)}getDefaultOptions(){return L(this,xa)}setDefaultOptions(n){fe(this,xa,n)}setQueryDefaults(n,s){L(this,ji).set(Gr(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...L(this,ji).values()],i={};return s.forEach(r=>{Mi(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){L(this,Ci).set(Gr(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...L(this,Ci).values()],i={};return s.forEach(r=>{Mi(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const s={...L(this,xa).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=am(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===sm&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...L(this,xa).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){L(this,dt).clear(),L(this,ya).clear()}},dt=new WeakMap,ya=new WeakMap,xa=new WeakMap,ji=new WeakMap,Ci=new WeakMap,Sa=new WeakMap,Ni=new WeakMap,Ei=new WeakMap,lx);const xx=C.createContext(!1),tw=()=>C.useContext(xx);xx.Provider;function nw(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const lw=C.createContext(nw()),aw=()=>C.useContext(lw),sw=(n,s,i)=>{const r=(i==null?void 0:i.state.status)==="error"&&typeof n.throwOnError=="function"?dx(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||r)&&(s.isReset()||(n.retryOnMount=!1))},iw=n=>{C.useEffect(()=>{n.clearReset()},[n])},rw=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:u})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(u&&n.data===void 0||dx(i,[n.error,r])),ow=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))}},uw=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,cw=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function Sx(n,s,i){const r=tw(),u=aw(),d=ix(),h=d.defaultQueryOptions(n),m=d.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,ow(h),sw(h,u,m),iw(u);const[y]=C.useState(()=>new s(d,h)),x=y.getOptimisticResult(h),v=!r&&p;if(C.useSyncExternalStore(C.useCallback(b=>{const w=v?y.subscribe(Vt.batchCalls(b)):cn;return y.updateResult(),w},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),C.useEffect(()=>{y.setOptions(h)},[h,y]),uw(h,x))throw cw(h,y,u);if(rw({result:x,errorResetBoundary:u,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw x.error;return h.notifyOnChangeProps?x:y.trackResult(x)}function fl(n,s){return Sx(n,yx)}function fw(n,s){return Sx(n,K2)}var um=ax();/**
43
+ `+zt+e+za}var $n=!1;function gl(e,t){if(!e||$n)return"";$n=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(ie){var F=ie}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(ie){F=ie}Z=!1;try{var q=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),Z=!0,new e}finally{Z&&(q!==void 0?Object.defineProperty(e.prototype,"props",q):delete e.prototype.props)}}}else{try{throw Error()}catch(ie){F=ie}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(ie){if(ie&&F&&typeof ie.stack=="string")return[ie.stack,F.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),p=f[0],b=f[1];if(p&&b){var T=p.split(`
44
+ `),B=b.split(`
45
+ `);for(r=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;r<B.length&&!B[r].includes("DetermineComponentFrameRoot");)r++;if(s===T.length||r===B.length)for(s=T.length-1,r=B.length-1;1<=s&&0<=r&&T[s]!==B[r];)r--;for(;1<=s&&0<=r;s--,r--)if(T[s]!==B[r]){if(s!==1||r!==1)do if(s--,r--,0>r||T[s]!==B[r]){var I=`
46
+ `+T[s].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=s&&0<=r);break}}}finally{$n=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?qt(l):""}function J(e,t){switch(e.tag){case 26:case 27:case 5:return qt(e.type);case 16:return qt("Lazy");case 13:return e.child!==t&&t!==null?qt("Suspense Fallback"):qt("Suspense");case 19:return qt("SuspenseList");case 0:case 15:return gl(e.type,!1);case 11:return gl(e.type.render,!1);case 1:return gl(e.type,!0);case 31:return qt("Activity");case 30:return qt("ViewTransition");default:return""}}function se(e){try{var t="",l=null;do t+=J(e,l),l=e,e=e.return;while(e);return t}catch(s){return`
47
+ Error generating stack: `+s.message+`
48
+ `+s.stack}}var je=Object.prototype.hasOwnProperty,Ve=n.unstable_scheduleCallback,ke=n.unstable_cancelCallback,wt=n.unstable_shouldYield,lt=n.unstable_requestPaint,We=n.unstable_now,Jn=n.unstable_getCurrentPriorityLevel,Vl=n.unstable_ImmediatePriority,Da=n.unstable_UserBlockingPriority,La=n.unstable_NormalPriority,hr=n.unstable_LowPriority,Bi=n.unstable_IdlePriority,mr=n.log,gr=n.unstable_setDisableYieldValue,Fl=null,Qt=null;function Vn(e){if(typeof mr=="function"&&gr(e),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(Fl,e)}catch{}}var Yt=Math.clz32?Math.clz32:st,pr=Math.log,de=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(pr(e)/de|0)|0}var Dt=256,kl=262144,js=4194304;function pl(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 Bl(e,t,l){var s=e.pendingLanes;if(s===0)return 0;var r=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~f,s!==0?r=pl(s):(p&=b,p!==0?r=pl(p):l||(l=b&~e,l!==0&&(r=pl(l))))):(b=s&~f,b!==0?r=pl(b):p!==0?r=pl(p):l||(l=s&~e,l!==0&&(r=pl(l)))),r===0?0:t!==0&&t!==r&&(t&f)===0&&(f=r&-r,l=t&-t,f>=l||f===32&&(l&4194048)!==0)?t:r}function an(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Gi(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var s=31-Yt(l),r=1<<s;t|=e[s],l&=~r}return t}function vr(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 qi(){var e=js;return js<<=1,(js&62914560)===0&&(js=4194304),e}function Qi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Gl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yr(e,t,l,s,r,f){var p=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 b=e.entanglements,T=e.expirationTimes,B=e.hiddenUpdates;for(l=p&~l;0<l;){var I=31-Yt(l),Z=1<<I;b[I]=0,T[I]=-1;var F=B[I];if(F!==null)for(B[I]=null,I=0;I<F.length;I++){var q=F[I];q!==null&&(q.lane&=-536870913)}l&=~Z}s!==0&&Hm(e,s,0),f!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~t))}function Hm(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Yt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|l&261930}function Um(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var s=31-Yt(l),r=1<<s;r&t|e[s]&t&&(e[s]|=t),l&=~r}}function $m(e,t){var l=t&-t;return l=(l&42)!==0?1:xc(l),(l&(e.suspendedLanes|t))!==0?0:l}function xc(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 Sc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vm(){var e=ge.p;return e!==0?e:(e=window.event,e===void 0?32:Yv(e.type))}function Fm(e,t){var l=ge.p;try{return ge.p=e,t()}finally{ge.p=l}}var vl=Math.random().toString(36).slice(2),Lt="__reactFiber$"+vl,sn="__reactProps$"+vl,ws="__reactContainer$"+vl,km="__reactEvents$"+vl,Q1="__reactListeners$"+vl,Y1="__reactHandles$"+vl,Bm="__reactResources$"+vl,Yi="__reactMarker$"+vl,xr="__reactLoad$"+vl;function Sr(e){delete e[Lt],delete e[sn],delete e[Q1],delete e[Y1]}function Ha(e){var t;if(t=e[Lt])return t;for(var l=e.parentNode;l;){if(t=l[ws]||l[Lt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Ev(e);e!==null;){if(l=e[Lt])return l;e=Ev(e)}return t}e=l,l=e.parentNode}return null}function Ns(e){if(e=e[Lt]||e[ws]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ii(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Cs(e){var t=e[Bm];return t||(t=e[Bm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Yi]=!0}function Gm(e){e[xr]=void 0}var qm=new Set,Qm={};function Ua(e,t){Es(e,t),Es(e+"Capture",t)}function Es(e,t){for(Qm[e]=t,e=0;e<t.length;e++)qm.add(t[e])}var I1=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]*$"),Ym={},Im={};function X1(e){return je.call(Im,e)?!0:je.call(Ym,e)?!1:I1.test(e)?Im[e]=!0:(Ym[e]=!0,!1)}var Be=!1;function Xm(){var e=Be;return Be=!1,e}function br(e,t,l){if(X1(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function jr(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 yl(e,t,l,s){if(s===null)e.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,s)}}function gn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Km(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function K1(e,t,l){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(p){l=""+p,f.call(this,p)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(p){l=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bc(e){if(!e._valueTracker){var t=Km(e)?"checked":"value";e._valueTracker=K1(e,t,""+e[t])}}function Pm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),s="";return e&&(s=Km(e)?e.checked?"true":"false":e.value),e=s,e!==l?(t.setValue(e),!0):!1}var P1=/[\n"\\]/g;function En(e){return e.replace(P1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function jc(e,t,l,s,r,f,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+gn(t)):e.value!==""+gn(t)&&(e.value=""+gn(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?p==="number"&&e.value==t?wc(e,gn(e.value)):wc(e,gn(t)):l!=null?wc(e,gn(l)):s!=null&&e.removeAttribute("value"),r==null&&f!=null&&(e.defaultChecked=!!f),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+gn(b):e.removeAttribute("name")}function Zm(e,t,l,s,r,f,p,b){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||l!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){bc(e);return}l=l!=null?""+gn(l):"",t=t!=null?""+gn(t):l,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),bc(e)}function wc(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Ms(e,t,l,s){if(e=e.options,t){t={};for(var r=0;r<l.length;r++)t["$"+l[r]]=!0;for(l=0;l<e.length;l++)r=t.hasOwnProperty("$"+e[l].value),e[l].selected!==r&&(e[l].selected=r),r&&s&&(e[l].defaultSelected=!0)}else{for(l=""+gn(l),t=null,r=0;r<e.length;r++){if(e[r].value===l){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Jm(e,t,l){if(t!=null&&(t=""+gn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+gn(l):""}function Wm(e,t,l,s){if(t==null){if(s!=null){if(l!=null)throw Error(o(92));if(Ce(s)){if(1<s.length)throw Error(o(93));s=s[0]}l=s}l==null&&(l=""),t=l}l=gn(t),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),bc(e)}function _s(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Z1=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 eg(e,t,l){var s=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,l):typeof l!="number"||l===0||Z1.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function tg(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",Be=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&l[r]!==s&&(eg(e,r,s),Be=!0)}else for(var f in t)t.hasOwnProperty(f)&&eg(e,f,t[f])}function Nc(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 J1=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"]]),W1=/^[\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 wr(e){return W1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Wn(){}var Cc=null;function Ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ts=null,Rs=null;function ng(e){var t=Ns(e);if(t&&(e=t.stateNode)){var l=e[sn]||null;e:switch(e=t.stateNode,t.type){case"input":if(jc(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="'+En(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var s=l[t];if(s!==e&&s.form===e.form){var r=s[sn]||null;if(!r)throw Error(o(90));jc(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<l.length;t++)s=l[t],s.form===e.form&&Pm(s)}break e;case"textarea":Jm(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ms(e,!!l.multiple,t,!1)}}}var Mc=!1;function lg(e,t,l){if(Mc)return e(t,l);Mc=!0;try{var s=e(t);return s}finally{if(Mc=!1,(Ts!==null||Rs!==null)&&(wu(),Ts&&(t=Ts,e=Rs,Rs=Ts=null,ng(t),e)))for(t=0;t<e.length;t++)ng(e[t])}}function Xi(e,t){var l=e.stateNode;if(l===null)return null;var s=l[sn]||null;if(s===null)return null;l=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var xl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(xl)try{var Ki={};Object.defineProperty(Ki,"passive",{get:function(){_c=!0}}),window.addEventListener("test",Ki,Ki),window.removeEventListener("test",Ki,Ki)}catch{_c=!1}var ql=null,Tc=null,Nr=null;function ag(){if(Nr)return Nr;var e,t=Tc,l=t.length,s,r="value"in ql?ql.value:ql.textContent,f=r.length;for(e=0;e<l&&t[e]===r[e];e++);var p=l-e;for(s=1;s<=p&&t[l-s]===r[f-s];s++);return Nr=r.slice(e,1<s?1-s:void 0)}function Cr(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 Er(){return!0}function sg(){return!1}function Zt(e){function t(l,s,r,f,p){this._reactName=l,this._targetInst=r,this.type=s,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(l=e[b],this[b]=l?l(f):f[b]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Er:sg,this.isPropagationStopped=sg,this}return R(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=Er)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Er)},persist:function(){},isPersistent:Er}),t}var Ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mr=Zt(Ql),Pi=R({},Ql,{view:0,detail:0}),eS=Zt(Pi),Rc,Ac,Zi,_r=R({},Pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zc,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!==Zi&&(Zi&&e.type==="mousemove"?(Rc=e.screenX-Zi.screenX,Ac=e.screenY-Zi.screenY):Ac=Rc=0,Zi=e),Rc)},movementY:function(e){return"movementY"in e?e.movementY:Ac}}),ig=Zt(_r),tS=R({},_r,{dataTransfer:0}),nS=Zt(tS),lS=R({},Pi,{relatedTarget:0}),Oc=Zt(lS),aS=R({},Ql,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=Zt(aS),iS=R({},Ql,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),oS=Zt(iS),rS=R({},Ql,{data:0}),og=Zt(rS),uS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cS={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"},fS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fS[e])?!!t[e]:!1}function zc(){return dS}var hS=R({},Pi,{key:function(e){if(e.key){var t=uS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zc,charCode:function(e){return e.type==="keypress"?Cr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mS=Zt(hS),gS=R({},_r,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rg=Zt(gS),pS=R({},Ql,{submitter:0}),vS=Zt(pS),yS=R({},Pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zc}),xS=Zt(yS),SS=R({},Ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),bS=Zt(SS),jS=R({},_r,{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}),wS=Zt(jS),NS=R({},Ql,{newState:0,oldState:0,source:0}),CS=Zt(NS),ES=[9,13,27,32],Dc=xl&&"CompositionEvent"in window,Ji=null;xl&&"documentMode"in document&&(Ji=document.documentMode);var MS=xl&&"TextEvent"in window&&!Ji,ug=xl&&(!Dc||Ji&&8<Ji&&11>=Ji),cg=" ",fg=!1;function dg(e,t){switch(e){case"keyup":return ES.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var As=!1;function _S(e,t){switch(e){case"compositionend":return hg(t);case"keypress":return t.which!==32?null:(fg=!0,cg);case"textInput":return e=t.data,e===cg&&fg?null:e;default:return null}}function TS(e,t){if(As)return e==="compositionend"||!Dc&&dg(e,t)?(e=ag(),Nr=Tc=ql=null,As=!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 ug&&t.locale!=="ko"?null:t.data;default:return null}}var RS={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 mg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!RS[e.type]:t==="textarea"}function gg(e,t,l,s){Ts?Rs?Rs.push(s):Rs=[s]:Ts=s,t=Tu(t,"onChange"),0<t.length&&(l=new Mr("onChange","change",null,l,s),e.push({event:l,listeners:t}))}var Wi=null,eo=null;function AS(e){nv(e,0)}function Tr(e){var t=Ii(e);if(Pm(t))return e}function pg(e,t){if(e==="change")return t}var vg=!1;if(xl){var Lc;if(xl){var Hc="oninput"in document;if(!Hc){var yg=document.createElement("div");yg.setAttribute("oninput","return;"),Hc=typeof yg.oninput=="function"}Lc=Hc}else Lc=!1;vg=Lc&&(!document.documentMode||9<document.documentMode)}function xg(){Wi&&(Wi.detachEvent("onpropertychange",Sg),eo=Wi=null)}function Sg(e){if(e.propertyName==="value"&&Tr(eo)){var t=[];gg(t,eo,e,Ec(e)),lg(AS,t)}}function OS(e,t,l){e==="focusin"?(xg(),Wi=t,eo=l,Wi.attachEvent("onpropertychange",Sg)):e==="focusout"&&xg()}function zS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Tr(eo)}function DS(e,t){if(e==="click")return Tr(t)}function LS(e,t){if(e==="input"||e==="change")return Tr(t)}function HS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:HS;function to(e,t){if(pn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),s=Object.keys(t);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var r=l[s];if(!je.call(t,r)||!pn(e[r],t[r]))return!1}return!0}function Uc(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 bg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jg(e,t){var l=bg(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=t&&s>=t)return{node:l,offset:t-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=bg(l)}}function wg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wg(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=Uc(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=Uc(e.document)}return t}function $c(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 US=xl&&"documentMode"in document&&11>=document.documentMode,Os=null,Vc=null,no=null,Fc=!1;function Cg(e,t,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Fc||Os==null||Os!==Uc(s)||(s=Os,"selectionStart"in s&&$c(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),no&&to(no,s)||(no=s,s=Tu(Vc,"onSelect"),0<s.length&&(t=new Mr("onSelect","select",null,t,l),e.push({event:t,listeners:s}),t.target=Os)))}function $a(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var zs={animationend:$a("Animation","AnimationEnd"),animationiteration:$a("Animation","AnimationIteration"),animationstart:$a("Animation","AnimationStart"),transitionrun:$a("Transition","TransitionRun"),transitionstart:$a("Transition","TransitionStart"),transitioncancel:$a("Transition","TransitionCancel"),transitionend:$a("Transition","TransitionEnd")},kc={},Eg={};xl&&(Eg=document.createElement("div").style,"AnimationEvent"in window||(delete zs.animationend.animation,delete zs.animationiteration.animation,delete zs.animationstart.animation),"TransitionEvent"in window||delete zs.transitionend.transition);function Va(e){if(kc[e])return kc[e];if(!zs[e])return e;var t=zs[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Eg)return kc[e]=t[l];return e}var Mg=Va("animationend"),_g=Va("animationiteration"),Tg=Va("animationstart"),$S=Va("transitionrun"),VS=Va("transitionstart"),FS=Va("transitioncancel"),Rg=Va("transitionend"),Ag=new Map,Bc="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(" ");Bc.push("scrollEnd");function Fn(e,t){Ag.set(e,t),Ua(t,[e])}var kS=0;function Sl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=qn.identifierPrefix;var l=kS++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function Og(e){if(e==null||typeof e=="string")return e;var t=null,l=Ws;if(l!==null)for(var s=0;s<l.length;s++){var r=e[l[s]];if(r!=null){if(r==="none")return"none";t=t==null?r:t+(" "+r)}}return t??e.default}function bl(e,t){return e=Og(e),t=Og(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Rr=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)},Mn=[],Ds=0,Gc=0;function Ar(){for(var e=Ds,t=Gc=Ds=0;t<e;){var l=Mn[t];Mn[t++]=null;var s=Mn[t];Mn[t++]=null;var r=Mn[t];Mn[t++]=null;var f=Mn[t];if(Mn[t++]=null,s!==null&&r!==null){var p=s.pending;p===null?r.next=r:(r.next=p.next,p.next=r),s.pending=r}f!==0&&zg(l,r,f)}}function Or(e,t,l,s){Mn[Ds++]=e,Mn[Ds++]=t,Mn[Ds++]=l,Mn[Ds++]=s,Gc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function qc(e,t,l,s){return Or(e,t,l,s),zr(e)}function Fa(e,t){return Or(e,null,null,t),zr(e)}function zg(e,t,l){e.lanes|=l;var s=e.alternate;s!==null&&(s.lanes|=l);for(var r=!1,f=e.return;f!==null;)f.childLanes|=l,s=f.alternate,s!==null&&(s.childLanes|=l),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(r=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,r&&t!==null&&(r=31-Yt(l),e=f.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=l|536870912),f):null}function zr(e){if(50<Co)throw Co=0,ju=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ls={};function BS(e,t,l,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,l,s){return new BS(e,t,l,s)}function Qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jl(e,t){var l=e.alternate;return l===null?(l=on(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 Dr(e,t,l,s,r,f){var p=0;if(s=e,typeof s=="function")Qc(s)&&(p=1);else if(typeof s=="string")p=p2(e,l,Mt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case He:return e=on(31,l,t,r),e.elementType=He,e.lanes=f,e;case le:return ka(l.children,r,f,t);case oe:p=8,r|=24;break;case te:return e=on(12,l,t,r|2),e.elementType=te,e.lanes=f,e;case W:return e=on(13,l,t,r),e.elementType=W,e.lanes=f,e;case ae:return e=on(19,l,t,r),e.elementType=ae,e.lanes=f,e;case Fe:case L:return e=r|32,e=on(30,l,t,e),e.elementType=L,e.lanes=f,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case ee:p=10;break e;case Y:p=9;break e;case X:p=11;break e;case ve:p=14;break e;case xe:p=16,s=null;break e}p=29,l=Error(o(130,e===null?"null":typeof e,"")),s=null}return t=on(p,l,t,r),t.elementType=e,t.type=s,t.lanes=f,t}function ka(e,t,l,s){return e=on(7,e,s,t),e.lanes=l,e}function Yc(e,t,l){return e=on(6,e,null,t),e.lanes=l,e}function Lg(e){var t=on(18,null,null,0);return t.stateNode=e,t}function Ic(e,t,l){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hg=new WeakMap;function _n(e,t){if(typeof e=="object"&&e!==null){var l=Hg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:se(t)},Hg.set(e,t),t)}return{value:e,source:t,stack:se(t)}}var Hs=[],Us=0,Lr=null,lo=0,Tn=[],Rn=0,Yl=null,el=1,tl="";function wl(e,t){Hs[Us++]=lo,Hs[Us++]=Lr,Lr=e,lo=t}function Ug(e,t,l){Tn[Rn++]=el,Tn[Rn++]=tl,Tn[Rn++]=Yl,Yl=e;var s=el;e=tl;var r=32-Yt(s)-1;s&=~(1<<r),l+=1;var f=32-Yt(t)+r;if(30<f){var p=r-r%5;f=(s&(1<<p)-1).toString(32),s>>=p,r-=p,el=1<<32-Yt(t)+r|l<<r|s,tl=f+e}else el=1<<f|l<<r|s,tl=e}function Hr(e){e.return!==null&&(wl(e,1),Ug(e,1,0))}function Xc(e){for(;e===Lr;)Lr=Hs[--Us],Hs[Us]=null,lo=Hs[--Us],Hs[Us]=null;for(;e===Yl;)Yl=Tn[--Rn],Tn[Rn]=null,tl=Tn[--Rn],Tn[Rn]=null,el=Tn[--Rn],Tn[Rn]=null}function $g(e,t){Tn[Rn++]=el,Tn[Rn++]=tl,Tn[Rn++]=Yl,el=t.id,tl=t.overflow,Yl=e}var Tt=null,tt=null,Te=!1,Il=null,An=!1,Kc=Error(o(519));function Xl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ao(_n(t,e)),Kc}function Vg(e){var t=e.stateNode,l=e.type,s=e.memoizedProps;switch(t[Lt]=e,t[sn]=s,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<Mo.length;l++)Ae(Mo[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),Zm(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Wm(t,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||s.suppressHydrationWarning===!0||iv(t.textContent,l)?(s.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),s.onScroll!=null&&Ae("scroll",t),s.onScrollEnd!=null&&Ae("scrollend",t),s.onClick!=null&&(t.onclick=Wn),t=!0):t=!1,t||Xl(e,!0)}function Ur(e){for(Tt=e.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:Tt=Tt.return}}function $s(e){if(e!==Tt)return!1;if(!Te)return Ur(e),Te=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Ed(e.type,e.memoizedProps)),l=!l),l&&tt&&Xl(e),Ur(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));tt=Cv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));tt=Cv(e)}else t===27?(t=tt,ca(e.type)?(e=Ld,Ld=null,tt=e):tt=t):tt=Tt?zn(e.stateNode.nextSibling):null;return!0}function Ba(){tt=Tt=null,Te=!1}function Pc(){var e=Il;return e!==null&&(cn===null?cn=e:cn.push.apply(cn,e),Il=null),e}function ao(e){Il===null?Il=[e]:Il.push(e)}var Zc=Et(null),Ga=null,Nl=null;function Kl(e,t,l){Ie(Zc,t._currentValue),t._currentValue=l}function Cl(e){e._currentValue=Zc.current,mt(Zc)}function $r(e,t,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===l)break;e=e.return}}function Jc(e,t,l,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var f=r.dependencies;if(f!==null){var p=r.child;f=f.firstContext;e:for(;f!==null;){var b=f;f=r;for(var T=0;T<t.length;T++)if(b.context===t[T]){f.lanes|=l,b=f.alternate,b!==null&&(b.lanes|=l),$r(f.return,l,e),s||(p=null);break e}f=b.next}}else if(r.tag===18){if(p=r.return,p===null)throw Error(o(341));p.lanes|=l,f=p.alternate,f!==null&&(f.lanes|=l),$r(p,l,e),p=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=l,p=r.alternate,p!==null&&(p.lanes|=l),$r(r.return,l,e),p=r.child,p=p!==null?p.sibling:null):p=r.child;if(p!==null)p.return=r;else for(p=r;p!==null;){if(p===e){p=null;break}if(r=p.sibling,r!==null){r.return=p.return,p=r;break}p=p.return}r=p}}function qa(e,t,l,s){e=null;for(var r=t,f=!1;r!==null;){if(!f){if((r.flags&524288)!==0)f=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var p=r.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var b=r.type;pn(r.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(r===pt.current){if(p=r.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ui):e=[ui])}r=r.return}return e!==null&&Jc(t,e,l,s),t.flags|=262144,e!==null}function Vr(e){for(e=e.firstContext;e!==null;){if(!pn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qa(e){Ga=e,Nl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return Fg(Ga,e)}function Fr(e,t){return Ga===null&&Qa(e),Fg(e,t)}function Fg(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Nl===null){if(e===null)throw Error(o(308));Nl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Nl=Nl.next=t;return l}var GS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},qS=n.unstable_scheduleCallback,QS=n.unstable_NormalPriority,vt={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wc(){return{controller:new GS,data:new Map,refCount:0}}function so(e){e.refCount--,e.refCount===0&&qS(QS,function(){e.controller.abort()})}function kg(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];l.indexOf(s)===-1&&l.push(s)}}}var io=null;function YS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var oo=null,ef=0,Ya=0,Vs=null;function IS(e,t){if(oo===null){var l=oo=[];ef=0,Ya=vd(),Vs={status:"pending",value:void 0,then:function(s){l.push(s)}}}return ef++,t.then(Bg,Bg),t}function Bg(){if(--ef===0&&(io=null,oo!==null)){Vs!==null&&(Vs.status="fulfilled");var e=oo;oo=null,Ya=0,Vs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function XS(e,t){var l=[],s={status:"pending",value:null,reason:null,then:function(r){l.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<l.length;r++)(0,l[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<l.length;r++)(0,l[r])(void 0)}),s}var Gg=ue.S;ue.S=function(e,t){if(L0=We(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&IS(e,t),io!==null)for(var l=li;l!==null;)kg(l,io),l=l.next;if(l=e.types,l!==null){for(var s=li;s!==null;)kg(s,l),s=s.next;if(Ya!==0){s=io,s===null&&(s=io=[]);for(var r=0;r<l.length;r++){var f=l[r];s.indexOf(f)===-1&&s.push(f)}}}Gg!==null&&Gg(e,t)};var Ia=Et(null);function tf(){var e=Ia.current;return e!==null?e:et.pooledCache}function kr(e,t){t===null?Ie(Ia,Ia.current):Ie(Ia,t.pool)}function qg(){var e=tf();return e===null?null:{parent:vt._currentValue,pool:e}}var Fs=Error(o(460)),nf=Error(o(474)),Br=Error(o(542)),Gr={then:function(){}};function Qg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Wn,Wn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xg(e),e===void 0&&!("reason"in t)?Error(o(600)):e;default:if(typeof t.status=="string")t.then(Wn,Wn);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xg(e),e}throw Ka=t,Fs}}function Xa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ka=l,Fs):l}}var Ka=null;function Ig(){if(Ka===null)throw Error(o(459));var e=Ka;return Ka=null,e}function Xg(e){if(e===Fs||e===Br)throw Error(o(483))}var ks=null,ro=0;function qr(e){var t=ro;return ro+=1,ks===null&&(ks=[]),Yg(ks,e,t)}function Pl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Qr(e,t){throw t.$$typeof===Q?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kg(e){function t(k,H){if(e){var G=k.deletions;G===null?(k.deletions=[H],k.flags|=16):G.push(H)}}function l(k,H){if(!e)return null;for(;H!==null;)t(k,H),H=H.sibling;return null}function s(k){for(var H=new Map;k!==null;)k.key===null?H.set(k.index,k):H.set(k.key,k),k=k.sibling;return H}function r(k,H){return k=jl(k,H),k.index=0,k.sibling=null,k}function f(k,H,G){return k.index=G,e?(G=k.alternate,G!==null?(G=G.index,G<H?(k.flags|=2,H):G):(k.flags|=134217730,H)):(k.flags|=1048576,H)}function p(k){return e&&k.alternate===null&&(k.flags|=134217730),k}function b(k,H,G,P){return H===null||H.tag!==6?(H=Yc(G,k.mode,P),H.return=k,H):(H=r(H,G),H.return=k,H)}function T(k,H,G,P){var fe=G.type;return fe===le?(k=I(k,H,G.props.children,P,G.key),Pl(k,G),k):H!==null&&(H.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===xe&&Xa(fe)===H.type)?(H=r(H,G.props),Pl(H,G),H.return=k,H):(H=Dr(G.type,G.key,G.props,null,k.mode,P),Pl(H,G),H.return=k,H)}function B(k,H,G,P){return H===null||H.tag!==4||H.stateNode.containerInfo!==G.containerInfo||H.stateNode.implementation!==G.implementation?(H=Ic(G,k.mode,P),H.return=k,H):(H=r(H,G.children||[]),H.return=k,H)}function I(k,H,G,P,fe){return H===null||H.tag!==7?(H=ka(G,k.mode,P,fe),H.return=k,H):(H=r(H,G),H.return=k,H)}function Z(k,H,G){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Yc(""+H,k.mode,G),H.return=k,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case K:return G=Dr(H.type,H.key,H.props,null,k.mode,G),Pl(G,H),G.return=k,G;case $:return H=Ic(H,k.mode,G),H.return=k,H;case xe:return H=Xa(H),Z(k,H,G)}if(Ce(H)||re(H))return H=ka(H,k.mode,G,null),H.return=k,H;if(typeof H.then=="function")return Z(k,qr(H),G);if(H.$$typeof===ee)return Z(k,Fr(k,H),G);Qr(k,H)}return null}function F(k,H,G,P){var fe=H!==null?H.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return fe!==null?null:b(k,H,""+G,P);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case K:return G.key===fe?T(k,H,G,P):null;case $:return G.key===fe?B(k,H,G,P):null;case xe:return G=Xa(G),F(k,H,G,P)}if(Ce(G)||re(G))return fe!==null?null:I(k,H,G,P,null);if(typeof G.then=="function")return F(k,H,qr(G),P);if(G.$$typeof===ee)return F(k,H,Fr(k,G),P);Qr(k,G)}return null}function q(k,H,G,P,fe){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return k=k.get(G)||null,b(H,k,""+P,fe);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case K:return k=k.get(P.key===null?G:P.key)||null,T(H,k,P,fe);case $:return k=k.get(P.key===null?G:P.key)||null,B(H,k,P,fe);case xe:return P=Xa(P),q(k,H,G,P,fe)}if(Ce(P)||re(P))return k=k.get(G)||null,I(H,k,P,fe,null);if(typeof P.then=="function")return q(k,H,G,qr(P),fe);if(P.$$typeof===ee)return q(k,H,G,Fr(H,P),fe);Qr(H,P)}return null}function ie(k,H,G,P){for(var fe=null,ze=null,pe=H,Se=H=0,St=null;pe!==null&&Se<G.length;Se++){pe.index>Se?(St=pe,pe=null):St=pe.sibling;var Ue=F(k,pe,G[Se],P);if(Ue===null){pe===null&&(pe=St);break}e&&pe&&Ue.alternate===null&&t(k,pe),H=f(Ue,H,Se),ze===null?fe=Ue:ze.sibling=Ue,ze=Ue,pe=St}if(Se===G.length)return l(k,pe),Te&&wl(k,Se),fe;if(pe===null){for(;Se<G.length;Se++)pe=Z(k,G[Se],P),pe!==null&&(H=f(pe,H,Se),ze===null?fe=pe:ze.sibling=pe,ze=pe);return Te&&wl(k,Se),fe}for(pe=s(pe);Se<G.length;Se++)St=q(pe,k,Se,G[Se],P),St!==null&&(e&&(Ue=St.alternate,Ue!==null&&pe.delete(Ue.key===null?Se:Ue.key)),H=f(St,H,Se),ze===null?fe=St:ze.sibling=St,ze=St);return e&&pe.forEach(function(ga){return t(k,ga)}),Te&&wl(k,Se),fe}function he(k,H,G,P){if(G==null)throw Error(o(151));for(var fe=null,ze=null,pe=H,Se=H=0,St=null,Ue=G.next();pe!==null&&!Ue.done;Se++,Ue=G.next()){pe.index>Se?(St=pe,pe=null):St=pe.sibling;var ga=F(k,pe,Ue.value,P);if(ga===null){pe===null&&(pe=St);break}e&&pe&&ga.alternate===null&&t(k,pe),H=f(ga,H,Se),ze===null?fe=ga:ze.sibling=ga,ze=ga,pe=St}if(Ue.done)return l(k,pe),Te&&wl(k,Se),fe;if(pe===null){for(;!Ue.done;Se++,Ue=G.next())Ue=Z(k,Ue.value,P),Ue!==null&&(H=f(Ue,H,Se),ze===null?fe=Ue:ze.sibling=Ue,ze=Ue);return Te&&wl(k,Se),fe}for(pe=s(pe);!Ue.done;Se++,Ue=G.next())Ue=q(pe,k,Se,Ue.value,P),Ue!==null&&(e&&(St=Ue.alternate,St!==null&&pe.delete(St.key===null?Se:St.key)),H=f(Ue,H,Se),ze===null?fe=Ue:ze.sibling=Ue,ze=Ue);return e&&pe.forEach(function(_2){return t(k,_2)}),Te&&wl(k,Se),fe}function _e(k,H,G,P){if(typeof G=="object"&&G!==null&&G.type===le&&G.key===null&&G.props.ref===void 0&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case K:e:{for(var fe=G.key;H!==null;){if(H.key===fe){if(fe=G.type,fe===le){if(H.tag===7){l(k,H.sibling),P=r(H,G.props.children),Pl(P,G),P.return=k,k=P;break e}}else if(H.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===xe&&Xa(fe)===H.type){l(k,H.sibling),P=r(H,G.props),Pl(P,G),P.return=k,k=P;break e}l(k,H);break}else t(k,H);H=H.sibling}G.type===le?(P=ka(G.props.children,k.mode,P,G.key),Pl(P,G),P.return=k,k=P):(P=Dr(G.type,G.key,G.props,null,k.mode,P),Pl(P,G),P.return=k,k=P)}return p(k);case $:e:{for(fe=G.key;H!==null;){if(H.key===fe)if(H.tag===4&&H.stateNode.containerInfo===G.containerInfo&&H.stateNode.implementation===G.implementation){l(k,H.sibling),P=r(H,G.children||[]),P.return=k,k=P;break e}else{l(k,H);break}else t(k,H);H=H.sibling}P=Ic(G,k.mode,P),P.return=k,k=P}return p(k);case xe:return G=Xa(G),_e(k,H,G,P)}if(Ce(G))return ie(k,H,G,P);if(re(G)){if(fe=re(G),typeof fe!="function")throw Error(o(150));return G=fe.call(G),he(k,H,G,P)}if(typeof G.then=="function")return _e(k,H,qr(G),P);if(G.$$typeof===ee)return _e(k,H,Fr(k,G),P);Qr(k,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,H!==null&&H.tag===6?(l(k,H.sibling),P=r(H,G),P.return=k,k=P):(l(k,H),P=Yc(G,k.mode,P),P.return=k,k=P),p(k)):l(k,H)}return function(k,H,G,P){try{ro=0;var fe=_e(k,H,G,P);return ks=null,fe}catch(pe){if(pe===Fs||pe===Br)throw pe;var ze=on(29,pe,null,k.mode);return ze.lanes=P,ze.return=k,ze}finally{}}}var Pa=Kg(!0),Pg=Kg(!1),Zl=!1;function lf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function af(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 Jl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wl(e,t,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(qe&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=zr(e),zg(e,null,l),t}return Or(e,s,t,l),zr(e)}function uo(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Um(e,l)}}function sf(e,t){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var r=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var p={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};f===null?r=f=p:f=f.next=p,l=l.next}while(l!==null);f===null?r=f=t:f=f.next=t}else r=f=t;l={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:f,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var of=!1;function co(){if(of){var e=Vs;if(e!==null)throw e}}function fo(e,t,l,s){of=!1;var r=e.updateQueue;Zl=!1;var f=r.firstBaseUpdate,p=r.lastBaseUpdate,b=r.shared.pending;if(b!==null){r.shared.pending=null;var T=b,B=T.next;T.next=null,p===null?f=B:p.next=B,p=T;var I=e.alternate;I!==null&&(I=I.updateQueue,b=I.lastBaseUpdate,b!==p&&(b===null?I.firstBaseUpdate=B:b.next=B,I.lastBaseUpdate=T))}if(f!==null){var Z=r.baseState;p=0,I=B=T=null,b=f;do{var F=b.lane&-536870913,q=F!==b.lane;if(q?(Oe&F)===F:(s&F)===F){F!==0&&F===Ya&&(of=!0),I!==null&&(I=I.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ie=e,he=b;F=t;var _e=l;switch(he.tag){case 1:if(ie=he.payload,typeof ie=="function"){Z=ie.call(_e,Z,F);break e}Z=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=he.payload,F=typeof ie=="function"?ie.call(_e,Z,F):ie,F==null)break e;Z=R({},Z,F);break e;case 2:Zl=!0}}F=b.callback,F!==null&&(e.flags|=64,q&&(e.flags|=8192),q=r.callbacks,q===null?r.callbacks=[F]:q.push(F))}else q={lane:F,tag:b.tag,payload:b.payload,callback:b.callback,next:null},I===null?(B=I=q,T=Z):I=I.next=q,p|=F;if(b=b.next,b===null){if(b=r.shared.pending,b===null)break;q=b,b=q.next,q.next=null,r.lastBaseUpdate=q,r.shared.pending=null}}while(!0);I===null&&(T=Z),r.baseState=T,r.firstBaseUpdate=B,r.lastBaseUpdate=I,f===null&&(r.shared.lanes=0),ia|=p,e.lanes=p,e.memoizedState=Z}}function Zg(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Jg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Zg(l[e],t)}var ea=Et(null),Yr=Et(0);function Wg(e,t){e=Rl,Ie(Yr,e),Ie(ea,t),Rl=e|t.baseLanes}function rf(){Ie(Yr,Rl),Ie(ea,ea.current)}function uf(){Rl=Yr.current,mt(ea),mt(Yr)}var Ut=Et(null),It=null;function ta(e){var t=e.alternate;Ie($t,$t.current&1),Ie(Ut,e),It===null&&(t===null||ea.current!==null||t.memoizedState!==null)&&(It=e)}function cf(e){Ie($t,$t.current),Ie(Ut,e),It===null&&(It=e)}function ep(e){e.tag===22?(Ie($t,$t.current),Ie(Ut,e),It===null&&(It=e)):na()}function na(){Ie($t,$t.current),Ie(Ut,Ut.current)}function vn(e){mt(Ut),It===e&&(It=null),mt($t)}var $t=Et(0);function ho(e,t){Ie(Ut,Ut.current),Ie($t,t)}function ff(e){mt($t),mt(Ut),It===e&&(It=null)}function Ir(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||zd(l)||Dd(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 El=0,Me=null,Je=null,yt=null,Xr=!1,Bs=!1,Za=!1,Kr=0,mo=0,Gs=null,KS=0;function dt(){throw Error(o(321))}function df(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!pn(e[l],t[l]))return!1;return!0}function hf(e,t,l,s,r,f){return El=f,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?Up:$p,Za=!1,f=l(s,r),Za=!1,Bs&&(f=np(t,l,s,r)),tp(e),f}function tp(e){ue.H=nu;var t=Je!==null&&Je.next!==null;if(El=0,yt=Je=Me=null,Xr=!1,mo=0,Gs=null,t)throw Error(o(300));e===null||xt||(e=e.dependencies,e!==null&&Vr(e)&&(xt=!0))}function np(e,t,l,s){Me=e;var r=0;do{if(Bs&&(Gs=null),mo=0,Bs=!1,25<=r)throw Error(o(301));if(r+=1,yt=Je=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}ue.H=lb,f=t(l,s)}while(Bs);return f}function PS(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?go(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Me.flags|=1024),t}function mf(){var e=Kr!==0;return Kr=0,e}function gf(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function pf(e){if(Xr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xr=!1}El=0,yt=Je=Me=null,Bs=!1,mo=Kr=0,Gs=null}function Jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Me.memoizedState=yt=e:yt=yt.next=e,yt}function gt(){if(Je===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=yt===null?Me.memoizedState:yt.next;if(t!==null)yt=t,Je=e;else{if(e===null)throw Me.alternate===null?Error(o(467)):Error(o(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},yt===null?Me.memoizedState=yt=e:yt=yt.next=e}return yt}function Pr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function go(e){var t=mo;return mo+=1,Gs===null&&(Gs=[]),e=Yg(Gs,e,t),t=Me,(yt===null?t.memoizedState:yt.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?Up:$p),e}function Zr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return go(e);if(e.$$typeof===V)return;if(e.$$typeof===ee)return Ht(e)}throw Error(o(438,String(e)))}function vf(e){var t=null,l=Me.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var s=Me.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Pr(),Me.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),s=0;s<e;s++)l[s]=Ye;return t.index++,l}function Ml(e,t){return typeof t=="function"?t(e):t}function Jr(e){var t=gt();return yf(t,Je,e)}function yf(e,t,l){var s=e.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=l;var r=e.baseQueue,f=s.pending;if(f!==null){if(r!==null){var p=r.next;r.next=f.next,f.next=p}t.baseQueue=r=f,s.pending=null}if(f=e.baseState,r===null)e.memoizedState=f;else{t=r.next;var b=p=null,T=null,B=t,I=!1;do{var Z=B.lane&-536870913;if(Z!==B.lane?(Oe&Z)===Z:(El&Z)===Z){var F=B.revertLane;if(F===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),Z===Ya&&(I=!0);else if((El&F)===F){B=B.next,F===Ya&&(I=!0);continue}else Z={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},T===null?(b=T=Z,p=f):T=T.next=Z,Me.lanes|=F,ia|=F;Z=B.action,Za&&l(f,Z),f=B.hasEagerState?B.eagerState:l(f,Z)}else F={lane:Z,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},T===null?(b=T=F,p=f):T=T.next=F,Me.lanes|=Z,ia|=Z;B=B.next}while(B!==null&&B!==t);if(T===null?p=f:T.next=b,!pn(f,e.memoizedState)&&(xt=!0,I&&(l=Vs,l!==null)))throw l;e.memoizedState=f,e.baseState=p,e.baseQueue=T,s.lastRenderedState=f}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function xf(e){var t=gt(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var s=l.dispatch,r=l.pending,f=t.memoizedState;if(r!==null){l.pending=null;var p=r=r.next;do f=e(f,p.action),p=p.next;while(p!==r);pn(f,t.memoizedState)||(xt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),l.lastRenderedState=f}return[f,s]}function lp(e,t,l){var s=Me,r=gt(),f=Te;if(f){if(l===void 0)throw Error(o(407));l=l()}else l=t();var p=!pn((Je||r).memoizedState,l);if(p&&(r.memoizedState=l,xt=!0),r=r.queue,jf(ip.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||p||yt!==null&&(yt.memoizedState.tag&1)!==0,qs(e?9:8,{destroy:void 0},sp.bind(null,s,r,l,t),null),e){if(s.flags|=2048,et===null)throw Error(o(349));f||(El&127)!==0||ap(s,t,l)}return l}function ap(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Me.updateQueue,t===null?(t=Pr(),Me.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function sp(e,t,l,s){t.value=l,t.getSnapshot=s,op(t)&&rp(e)}function ip(e,t,l){return l(function(){op(t)&&rp(e)})}function op(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!pn(e,l)}catch{return!0}}function rp(e){var t=Fa(e,2);t!==null&&fn(t,e,2)}function Sf(e){var t=Jt();if(typeof e=="function"){var l=e;if(e=l(),Za){Vn(!0);try{l()}finally{Vn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:e},t}function up(e,t,l,s){return e.baseState=l,yf(e,Je,typeof s=="function"?s:Ml)}function ZS(e,t,l,s,r){if(tu(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};ue.T!==null?l(!0):f.isTransition=!1,s(f),l=t.pending,l===null?(f.next=t.pending=f,cp(t,f)):(f.next=l.next,t.pending=l.next=f)}}function cp(e,t){var l=t.action,s=t.payload,r=e.state;if(t.isTransition){var f=ue.T,p={};p.types=f!==null?f.types:null,ue.T=p;try{var b=l(r,s),T=ue.S;T!==null&&T(p,b),fp(e,t,b)}catch(B){bf(e,t,B)}finally{f!==null&&p.types!==null&&(f.types=p.types),ue.T=f}}else try{f=l(r,s),fp(e,t,f)}catch(B){bf(e,t,B)}}function fp(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){dp(e,t,s)},function(s){return bf(e,t,s)}):dp(e,t,l)}function dp(e,t,l){t.status="fulfilled",t.value=l,hp(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,cp(e,l)))}function bf(e,t,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=l,hp(t),t=t.next;while(t!==s)}e.action=null}function hp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mp(e,t){return t}function gp(e,t){if(Te){var l=et.formState;if(l!==null){e:{var s=Me;if(Te){if(tt){t:{for(var r=tt,f=An;r.nodeType!==8;){if(!f){r=null;break t}if(r=zn(r.nextSibling),r===null){r=null;break t}}f=r.data,r=f==="F!"||f==="F"?r:null}if(r){tt=zn(r.nextSibling),s=r.data==="F!";break e}}Xl(s)}s=!1}s&&(t=l[0])}}return l=Jt(),l.memoizedState=l.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mp,lastRenderedState:t},l.queue=s,l=Dp.bind(null,Me,s),s.dispatch=l,s=Sf(!1),f=Mf.bind(null,Me,!1,s.queue),s=Jt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,l=ZS.bind(null,Me,r,f,l),r.dispatch=l,s.memoizedState=e,[t,l,!1]}function pp(e){var t=gt();return vp(t,Je,e)}function vp(e,t,l){if(t=yf(e,t,mp)[0],e=Jr(Ml)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=go(t)}catch(p){throw p===Fs?Br:p}else s=t;t=gt();var r=t.queue,f=r.dispatch;return l!==t.memoizedState&&(Me.flags|=2048,qs(9,{destroy:void 0},JS.bind(null,r,l),null)),[s,f,e]}function JS(e,t){e.action=t}function yp(e){var t=gt(),l=Je;if(l!==null)return vp(t,l,e);gt(),t=t.memoizedState,l=gt();var s=l.queue.dispatch;return l.memoizedState=e,[t,s,!1]}function qs(e,t,l,s){return e={tag:e,create:l,deps:s,inst:t,next:null},t=Me.updateQueue,t===null&&(t=Pr(),Me.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,t.lastEffect=e),e}function xp(){return gt().memoizedState}function Wr(e,t,l,s){var r=Jt();Me.flags|=e,r.memoizedState=qs(1|t,{destroy:void 0},l,s===void 0?null:s)}function eu(e,t,l,s){var r=gt();s=s===void 0?null:s;var f=r.memoizedState.inst;Je!==null&&s!==null&&df(s,Je.memoizedState.deps)?r.memoizedState=qs(t,f,l,s):(Me.flags|=e,r.memoizedState=qs(1|t,f,l,s))}function Sp(e,t){Wr(8390656,8,e,t)}function jf(e,t){eu(2048,8,e,t)}function WS(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=Pr(),Me.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function bp(e){var t=gt().memoizedState;return WS({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function jp(e,t){return eu(4,2,e,t)}function wp(e,t){return eu(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 Cp(e,t,l){l=l!=null?l.concat([e]):null,eu(4,4,Np.bind(null,t,e),l)}function wf(){}function Ep(e,t){var l=gt();t=t===void 0?null:t;var s=l.memoizedState;return t!==null&&df(t,s[1])?s[0]:(l.memoizedState=[e,t],e)}function Mp(e,t){var l=gt();t=t===void 0?null:t;var s=l.memoizedState;if(t!==null&&df(t,s[1]))return s[0];if(s=e(),Za){Vn(!0);try{e()}finally{Vn(!1)}}return l.memoizedState=[s,t],s}function Nf(e,t,l){return l===void 0||(El&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=U0(),Me.lanes|=e,ia|=e,l)}function _p(e,t,l,s){return pn(l,t)?l:ea.current!==null?(e=Nf(e,l,s),pn(e,t)||(xt=!0),e):(El&106)===0||(El&1073741824)!==0&&(Oe&261930)===0?(xt=!0,e.memoizedState=l):(e=U0(),Me.lanes|=e,ia|=e,t)}function Tp(e,t,l,s,r){var f=ge.p;ge.p=f!==0&&8>f?f:8;var p=ue.T,b={};b.types=p!==null?p.types:null,ue.T=b,Mf(e,!1,t,l);try{var T=r(),B=ue.S;if(B!==null&&B(b,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var I=XS(T,s);po(e,t,I,bn(e))}else po(e,t,s,bn(e))}catch(Z){po(e,t,{then:function(){},status:"rejected",reason:Z},bn())}finally{ge.p=f,p!==null&&b.types!==null&&(p.types=b.types),ue.T=p}}function eb(){}function Cf(e,t,l,s){if(e.tag!==5)throw Error(o(476));var r=Rp(e).queue;Tp(e,r,t,rt,l===null?eb:function(){return Ap(e),l(s)})}function Rp(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:Ml,lastRenderedState:rt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ap(e){var t=Rp(e);t.next===null&&(t=e.alternate.memoizedState),po(e,t.next.queue,{},bn())}function Ef(){return Ht(ui)}function Op(){return gt().memoizedState}function zp(){return gt().memoizedState}function tb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=bn();e=Jl(l);var s=Wl(t,e,l);s!==null&&(fn(s,t,l),uo(s,t,l)),t={cache:Wc()},e.payload=t;return}t=t.return}}function nb(e,t,l){var s=bn();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},tu(e)?Lp(t,l):(l=qc(e,t,l,s),l!==null&&(fn(l,e,s),Hp(l,t,s)))}function Dp(e,t,l){var s=bn();po(e,t,l,s)}function po(e,t,l,s){var r={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(tu(e))Lp(t,r);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var p=t.lastRenderedState,b=f(p,l);if(r.hasEagerState=!0,r.eagerState=b,pn(b,p))return Or(e,t,r,0),et===null&&Ar(),!1}catch{}finally{}if(l=qc(e,t,r,s),l!==null)return fn(l,e,s),Hp(l,t,s),!0}return!1}function Mf(e,t,l,s){if(s={lane:2,revertLane:vd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tu(e)){if(t)throw Error(o(479))}else t=qc(e,l,s,2),t!==null&&fn(t,e,2)}function tu(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function Lp(e,t){Bs=Xr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Hp(e,t,l){if((l&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,Um(e,l)}}var nu={readContext:Ht,use:Zr,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt,useEffectEvent:dt},Up={readContext:Ht,use:Zr,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:Sp,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Wr(4194308,4,Np.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Wr(4194308,4,e,t)},useInsertionEffect:function(e,t){Wr(4,2,e,t)},useMemo:function(e,t){var l=Jt();t=t===void 0?null:t;var s=e();if(Za){Vn(!0);try{e()}finally{Vn(!1)}}return l.memoizedState=[s,t],s},useReducer:function(e,t,l){var s=Jt();if(l!==void 0){var r=l(t);if(Za){Vn(!0);try{l(t)}finally{Vn(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=nb.bind(null,Me,e),[s.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:function(e){e=Sf(e);var t=e.queue,l=Dp.bind(null,Me,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:wf,useDeferredValue:function(e,t){var l=Jt();return Nf(l,e,t)},useTransition:function(){var e=Sf(!1);return e=Tp.bind(null,Me,e.queue,!0,!1),Jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var s=Me,r=Jt();if(Te){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),et===null)throw Error(o(349));(Oe&127)!==0||ap(s,t,l)}r.memoizedState=l;var f={value:l,getSnapshot:t};return r.queue=f,Sp(ip.bind(null,s,f,e),[e]),s.flags|=2048,qs(9,{destroy:void 0},sp.bind(null,s,f,l,t),null),l},useId:function(){var e=Jt(),t=et.identifierPrefix;if(Te){var l=tl,s=el;l=(s&~(1<<32-Yt(s)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Kr++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=KS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ef,useFormState:gp,useActionState:gp,useOptimistic:function(e){var t=Jt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Mf.bind(null,Me,!0,l),l.dispatch=t,[e,t]},useMemoCache:vf,useCacheRefresh:function(){return Jt().memoizedState=tb.bind(null,Me)},useEffectEvent:function(e){var t=Jt(),l={impl:e};return t.memoizedState=l,function(){if((qe&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},$p={readContext:Ht,use:Zr,useCallback:Ep,useContext:Ht,useEffect:jf,useImperativeHandle:Cp,useInsertionEffect:jp,useLayoutEffect:wp,useMemo:Mp,useReducer:Jr,useRef:xp,useState:function(){return Jr(Ml)},useDebugValue:wf,useDeferredValue:function(e,t){var l=gt();return _p(l,Je.memoizedState,e,t)},useTransition:function(){var e=Jr(Ml)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:go(e),t]},useSyncExternalStore:lp,useId:Op,useHostTransitionStatus:Ef,useFormState:pp,useActionState:pp,useOptimistic:function(e,t){var l=gt();return up(l,Je,e,t)},useMemoCache:vf,useCacheRefresh:zp,useEffectEvent:bp},lb={readContext:Ht,use:Zr,useCallback:Ep,useContext:Ht,useEffect:jf,useImperativeHandle:Cp,useInsertionEffect:jp,useLayoutEffect:wp,useMemo:Mp,useReducer:xf,useRef:xp,useState:function(){return xf(Ml)},useDebugValue:wf,useDeferredValue:function(e,t){var l=gt();return Je===null?Nf(l,e,t):_p(l,Je.memoizedState,e,t)},useTransition:function(){var e=xf(Ml)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:go(e),t]},useSyncExternalStore:lp,useId:Op,useHostTransitionStatus:Ef,useFormState:yp,useActionState:yp,useOptimistic:function(e,t){var l=gt();return Je!==null?up(l,Je,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:vf,useCacheRefresh:zp,useEffectEvent:bp};function _f(e,t,l,s){t=e.memoizedState,l=l(s,t),l=l==null?t:R({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Tf={enqueueSetState:function(e,t,l){e=e._reactInternals;var s=bn(),r=Jl(s);r.payload=t,l!=null&&(r.callback=l),t=Wl(e,r,s),t!==null&&(fn(t,e,s),uo(t,e,s))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var s=bn(),r=Jl(s);r.tag=1,r.payload=t,l!=null&&(r.callback=l),t=Wl(e,r,s),t!==null&&(fn(t,e,s),uo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=bn(),s=Jl(l);s.tag=2,t!=null&&(s.callback=t),t=Wl(e,s,l),t!==null&&(fn(t,e,l),uo(t,e,l))}};function Vp(e,t,l,s,r,f,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,p):t.prototype&&t.prototype.isPureReactComponent?!to(l,s)||!to(r,f):!0}function Fp(e,t,l,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,s),t.state!==e&&Tf.enqueueReplaceState(t,t.state,null)}function Ja(e,t){var l=t;if("ref"in t){l={};for(var s in t)s!=="ref"&&(l[s]=t[s])}if(e=e.defaultProps){l===t&&(l=R({},l));for(var r in e)l[r]===void 0&&(l[r]=e[r])}return l}function kp(e){Rr(e)}function Bp(e){console.error(e)}function Gp(e){Rr(e)}function lu(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function qp(e,t,l){try{var s=e.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Rf(e,t,l){return l=Jl(l),l.tag=3,l.payload={element:null},l.callback=function(){lu(e,t)},l}function Qp(e){return e=Jl(e),e.tag=3,e}function Yp(e,t,l,s){var r=l.type.getDerivedStateFromError;if(typeof r=="function"){var f=s.value;e.payload=function(){return r(f)},e.callback=function(){qp(t,l,s)}}var p=l.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){qp(t,l,s),typeof r!="function"&&(oa===null?oa=new Set([this]):oa.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function ab(e,t,l,s,r){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=l.alternate,t!==null&&qa(t,l,r,!0),l=Ut.current,l!==null){switch(l.tag){case 31:case 13:case 19:return It===null?Nu():l.alternate===null&&ht===0&&(ht=3),l.flags&=-257,l.flags|=65536,l.lanes=r,s===Gr?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([s]):t.add(s),md(e,s,r)),!1;case 22:return l.flags|=65536,s===Gr?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([s]):l.add(s)),md(e,s,r)),!1}throw Error(o(435,l.tag))}return md(e,s,r),Nu(),!1}if(Te)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Kc&&(e=Error(o(422),{cause:s}),ao(_n(e,l)))):(s!==Kc&&(t=Error(o(423),{cause:s}),ao(_n(t,l))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=_n(s,l),r=Rf(e.stateNode,s,r),sf(e,r),ht!==4&&(ht=2)),!1;var f=Error(o(520),{cause:s});if(f=_n(f,l),No===null?No=[f]:No.push(f),ht!==4&&(ht=2),t===null)return!0;s=_n(s,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=r&-r,l.lanes|=e,e=Rf(l.stateNode,s,e),sf(l,e),!1;case 1:if(t=l.type,f=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(oa===null||!oa.has(f))))return l.flags|=65536,r&=-r,l.lanes|=r,r=Qp(r),Yp(r,e,l,s),sf(l,r),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Af=Error(o(461)),xt=!1;function Nt(e,t,l,s){t.child=e===null?Pg(t,null,l,s):Pa(t,e.child,l,s)}function Ip(e,t,l,s,r){l=l.render;var f=t.ref;if("ref"in s){var p={};for(var b in s)b!=="ref"&&(p[b]=s[b])}else p=s;return Qa(t),s=hf(e,t,l,p,f,r),b=mf(),e!==null&&!xt?(gf(e,t,r),_l(e,t,r)):(Te&&b&&Hr(t),t.flags|=1,Nt(e,t,s,r),t.child)}function Xp(e,t,l,s,r){if(e===null){var f=l.type;return typeof f=="function"&&!Qc(f)&&f.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=f,Kp(e,t,f,s,r)):(e=Dr(l.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Vf(e,r)){var p=f.memoizedProps;if(l=l.compare,l=l!==null?l:to,l(p,s)&&e.ref===t.ref)return _l(e,t,r)}return t.flags|=1,e=jl(f,s),e.ref=t.ref,e.return=t,t.child=e}function Kp(e,t,l,s,r){if(e!==null){var f=e.memoizedProps;if(to(f,s)&&e.ref===t.ref)if(xt=!1,t.pendingProps=s=f,Vf(e,r))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,_l(e,t,r)}return Of(e,t,l,s,r)}function Pp(e,t,l,s){var r=s.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|l:l,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~f}else s=0,t.child=null;return Zp(e,t,f,l,s)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&kr(t,f!==null?f.cachePool:null),f!==null?Wg(t,f):rf(),ep(t);else return s=t.lanes=536870912,Zp(e,t,f!==null?f.baseLanes|l:l,l,s)}else f!==null?(kr(t,f.cachePool),Wg(t,f),na(),t.memoizedState=null):(e!==null&&kr(t,null),rf(),na());return Nt(e,t,r,l),t.child}function vo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Zp(e,t,l,s,r){var f=tf();return f=f===null?null:{parent:vt._currentValue,pool:f},t.memoizedState={baseLanes:l,cachePool:f},e!==null&&kr(t,null),rf(),ep(t),e!==null&&qa(e,t,s,!0),t.childLanes=r,null}function au(e,t){return t=su({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jp(e,t,l){return Pa(t,e.child,null,l),e=au(t,t.pendingProps),e.flags|=2,vn(t),t.memoizedState=null,e}function sb(e,t,l){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=au(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},vo(null,e);if(cf(t),(e=tt)?(e=Nv(e,An),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yl!==null?{id:el,overflow:tl}:null,retryLane:536870912,hydrationErrors:null},l=Lg(e),l.return=t,t.child=l,Tt=t,tt=null)):e=null,e===null)throw Xl(t);return t.lanes=536870912,null}return au(t,s)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(cf(t),r)if(t.flags&256)t.flags&=-257,t=Jp(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(xt||qa(e,t,l,!1),r=(l&e.childLanes)!==0,xt||r){if(ea.current===null){if(s=et,s!==null&&(p=$m(s,l),p!==0&&p!==f.retryLane))throw f.retryLane=p,Fa(e,p),fn(s,e,p),Af;Nu()}t=Jp(e,t,l)}else e=f.treeContext,tt=zn(p.nextSibling),Tt=t,Te=!0,Il=null,An=!1,e!==null&&$g(t,e),t=au(t,s),t.flags|=134221824;return t}return e=jl(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Qs(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(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Of(e,t,l,s,r){return Qa(t),l=hf(e,t,l,s,void 0,r),s=mf(),e!==null&&!xt?(gf(e,t,r),_l(e,t,r)):(Te&&s&&Hr(t),t.flags|=1,Nt(e,t,l,r),t.child)}function Wp(e,t,l,s,r,f){return Qa(t),t.updateQueue=null,l=np(t,s,l,r),tp(e),s=mf(),e!==null&&!xt?(gf(e,t,f),_l(e,t,f)):(Te&&s&&Hr(t),t.flags|=1,Nt(e,t,l,f),t.child)}function e0(e,t,l,s,r){if(Qa(t),t.stateNode===null){var f=Ls,p=l.contextType;typeof p=="object"&&p!==null&&(f=Ht(p)),f=new l(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Tf,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},lf(t),p=l.contextType,f.context=typeof p=="object"&&p!==null?Ht(p):Ls,f.state=t.memoizedState,p=l.getDerivedStateFromProps,typeof p=="function"&&(_f(t,l,p,s),f.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(p=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&Tf.enqueueReplaceState(f,f.state,null),fo(t,s,f,r),co(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var b=t.memoizedProps,T=Ja(l,b);f.props=T;var B=f.context,I=l.contextType;p=Ls,typeof I=="object"&&I!==null&&(p=Ht(I));var Z=l.getDerivedStateFromProps;I=typeof Z=="function"||typeof f.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,I||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b||B!==p)&&Fp(t,f,s,p),Zl=!1;var F=t.memoizedState;f.state=F,fo(t,s,f,r),co(),B=t.memoizedState,b||F!==B||Zl?(typeof Z=="function"&&(_f(t,l,Z,s),B=t.memoizedState),(T=Zl||Vp(t,l,T,s,F,B,p))?(I||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=B),f.props=s,f.state=B,f.context=p,s=T):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,af(e,t),p=t.memoizedProps,I=Ja(l,p),f.props=I,Z=t.pendingProps,F=f.context,B=l.contextType,T=Ls,typeof B=="object"&&B!==null&&(T=Ht(B)),b=l.getDerivedStateFromProps,(B=typeof b=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(p!==Z||F!==T)&&Fp(t,f,s,T),Zl=!1,F=t.memoizedState,f.state=F,fo(t,s,f,r),co();var q=t.memoizedState;p!==Z||F!==q||Zl||e!==null&&e.dependencies!==null&&Vr(e.dependencies)?(typeof b=="function"&&(_f(t,l,b,s),q=t.memoizedState),(I=Zl||Vp(t,l,I,s,F,q,T)||e!==null&&e.dependencies!==null&&Vr(e.dependencies))?(B||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,q,T),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,q,T)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=q),f.props=s,f.state=q,f.context=T,s=I):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,Qs(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=Pa(t,e.child,null,r),t.child=Pa(t,null,l,r)):Nt(e,t,l,r),t.memoizedState=f.state,e=t.child):e=_l(e,t,r),e}function t0(e,t,l,s){return Ba(),t.flags|=256,Nt(e,t,l,s),t.child}var zf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Df(e){return{baseLanes:e,cachePool:qg()}}function Lf(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Sn),e}function n0(e,t,l){var s=t.pendingProps,r=!1,f=(t.flags&128)!==0,p;if((p=f)||(p=e!==null&&e.memoizedState===null?!1:($t.current&2)!==0),p&&(r=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?ta(t):na(),(e=tt)?(e=Nv(e,An),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yl!==null?{id:el,overflow:tl}:null,retryLane:536870912,hydrationErrors:null},l=Lg(e),l.return=t,t.child=l,Tt=t,tt=null)):e=null,e===null)throw Xl(t);return Dd(e)?t.lanes=32:t.lanes=536870912,null}return f=s.children,s=s.fallback,r?(na(),r=t.mode,f=su({mode:"hidden",children:f},r),s=ka(s,r,l,null),f.return=t,s.return=t,f.sibling=s,t.child=f,s=t.child,s.memoizedState=Df(l),s.childLanes=Lf(e,p,l),t.memoizedState=zf,vo(null,s)):(ta(t),Hf(t,f))}var b=e.memoizedState;if(b!==null){var T=b.dehydrated;if(T!==null)return ib(e,t,f,p,s,T,b,l)}return r?(na(),r=s.fallback,f=t.mode,b=e.child,T=b.sibling,s=jl(b,{mode:"hidden",children:s.children}),s.subtreeFlags=b.subtreeFlags&1206910976,T!==null?r=jl(T,r):(r=ka(r,f,l,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,vo(null,s),s=t.child,r=e.child.memoizedState,r===null?r=Df(l):(f=r.cachePool,f!==null?(b=vt._currentValue,f=f.parent!==b?{parent:b,pool:b}:f):f=qg(),r={baseLanes:r.baseLanes|l,cachePool:f}),s.memoizedState=r,s.childLanes=Lf(e,p,l),t.memoizedState=zf,vo(e.child,s)):(ta(t),l=e.child,e=l.sibling,l=jl(l,{mode:"visible",children:s.children}),l.return=t,l.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=l,t.memoizedState=null,l)}function Hf(e,t){return t=su({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function su(e,t){return e=on(22,e,null,t),e.lanes=0,e}function iu(e,t,l){return Pa(t,e.child,null,l),e=Hf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ib(e,t,l,s,r,f,p,b){if(l)return t.flags&256?(ta(t),t.flags&=-257,iu(e,t,b)):t.memoizedState!==null?(na(),t.child=e.child,t.flags|=128,null):(na(),f=r.fallback,p=t.mode,r=su({mode:"visible",children:r.children},p),f=ka(f,p,b,null),f.flags|=2,r.return=t,f.return=t,r.sibling=f,t.child=r,Pa(t,e.child,null,b),r=t.child,r.memoizedState=Df(b),r.childLanes=Lf(e,s,b),t.memoizedState=zf,vo(null,r));if(ta(t),Dd(f)){if(s=f.nextSibling&&f.nextSibling.dataset,s)var T=s.dgst;return s=T,s!==""&&(r=Error(o(419)),r.stack="",r.digest=s,ao({value:r,source:null,stack:null})),iu(e,t,b)}if(xt||qa(e,t,b,!1),s=(b&e.childLanes)!==0,xt||s){if(ea.current!==null)return iu(e,t,b);if(s=et,s!==null&&(r=$m(s,b),r!==0&&r!==p.retryLane))throw p.retryLane=r,Fa(e,r),fn(s,e,r),Af;return zd(f)||Nu(),iu(e,t,b)}return zd(f)?(t.flags|=192,t.child=e.child,null):(e=p.treeContext,tt=zn(f.nextSibling),Tt=t,Te=!0,Il=null,An=!1,e!==null&&$g(t,e),t=Hf(t,r.children),t.flags|=134221824,t)}function l0(e,t,l){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),$r(e.return,t,l)}function a0(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Ir(l)===null&&(t=e),e=e.sibling}return t}function ou(e,t,l,s,r,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:r,treeForkCount:f}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=s,p.tail=l,p.tailMode=r,p.treeForkCount=f)}function Uf(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 $f(e,t,l){var s=t.pendingProps,r=s.revealOrder,f=s.tail;s=s.children;var p=$t.current;if(t.flags&128)return ho(t,p),null;var b=(p&2)!==0;if(b?(p=p&1|2,t.flags|=128):p&=1,ho(t,p),r==="backwards"&&e!==null?(Uf(e),Nt(e,t,s,l),Uf(e)):Nt(e,t,s,l),s=Te?lo:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&l0(e,l,t);else if(e.tag===19)l0(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(r){case"backwards":l=a0(t.child),l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null,Uf(t)),ou(t,!0,r,null,f,s);break;case"unstable_legacy-backwards":for(l=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Ir(e)===null){t.child=r;break}e=r.sibling,r.sibling=l,l=r,r=e}ou(t,!0,l,null,f,s);break;case"together":ou(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:l=a0(t.child),l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null),ou(t,!1,r,l,f,s)}return t.child}function s0(e,t,l){var s=t.pendingProps;return Kl(t,t.type,s.value),Nt(e,t,s.children,l),t.child}function _l(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ia|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(qa(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=jl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=jl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Vf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vr(e)))}function ob(e,t,l){switch(t.tag){case 3:$l(t,t.stateNode.containerInfo),Kl(t,vt,e.memoizedState.cache),Ba();break;case 27:case 5:Zn(t);break;case 4:$l(t,t.stateNode.containerInfo);break;case 10:Kl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cf(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return ta(t),t.flags|=128,null;s=qa(e,t,l,!1);var r=t.child.childLanes;return s||(l&r)!==0?n0(e,t,l):(ta(t),e=_l(e,t,l),e!==null?e.sibling:null)}ta(t);break;case 19:if(t.flags&128)return $f(e,t,l);if(r=(e.flags&128)!==0,s=(l&t.childLanes)!==0,s||(qa(e,t,l,!1),s=(l&t.childLanes)!==0),r){if(s)return $f(e,t,l);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ho(t,$t.current),s)break;return null;case 22:return t.lanes=0,Pp(e,t,l,t.pendingProps);case 24:Kl(t,vt,e.memoizedState.cache)}return _l(e,t,l)}function i0(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!Vf(e,l)&&(t.flags&128)===0)return xt=!1,ob(e,t,l);xt=(e.flags&131072)!==0}else xt=!1,Te&&(t.flags&1048576)!==0&&Ug(t,lo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Xa(t.elementType),t.type=e,typeof e=="function")Qc(e)?(s=Ja(e,s),t.tag=1,t=e0(null,t,e,s,l)):(t.tag=0,t=Of(null,t,e,s,l));else{if(e!=null){var r=e.$$typeof;if(r===X){t.tag=11,t=Ip(null,t,e,s,l);break e}else if(r===ve){t.tag=14,t=Xp(null,t,e,s,l);break e}else if(r===ee){t.tag=10,t.type=e,t=s0(null,t,l);break e}}throw t=be(e)||e,Error(o(306,t,""))}}return t;case 0:return Of(e,t,t.type,t.pendingProps,l);case 1:return s=t.type,r=Ja(s,t.pendingProps),e0(e,t,s,r,l);case 3:e:{if($l(t,t.stateNode.containerInfo),e===null)throw Error(o(387));s=t.pendingProps;var f=t.memoizedState;r=f.element,af(e,t),fo(t,s,null,l);var p=t.memoizedState;if(s=p.cache,Kl(t,vt,s),s!==f.cache&&Jc(t,[vt],l,!0),co(),s=p.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=t0(e,t,s,l);break e}else if(s!==r){r=_n(Error(o(424)),t),ao(r),t=t0(e,t,s,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(tt=zn(e.firstChild),Tt=t,Te=!0,Il=null,An=!0,l=Pg(t,null,s,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(Ba(),s===r){t=_l(e,t,l);break e}Nt(e,t,s,l)}t=t.child}return t;case 26:return Qs(e,t),e===null?(l=Av(t.type,null,t.pendingProps,null))?t.memoizedState=l:Te||(t.stateNode=cv(t.type,t.pendingProps,Pt.current,t)):t.memoizedState=Av(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Zn(t),e===null&&Te&&(s=t.stateNode=Mv(t.type,t.pendingProps,Pt.current),Tt=t,An=!0,r=tt,ca(t.type)?(Ld=r,tt=zn(s.firstChild)):tt=r),Nt(e,t,t.pendingProps.children,l),Qs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=s=tt)&&(s=t2(s,t.type,t.pendingProps,An),s!==null?(t.stateNode=s,Tt=t,tt=zn(s.firstChild),An=!1,r=!0):r=!1),r||Xl(t)),Zn(t),r=t.type,f=t.pendingProps,p=e!==null?e.memoizedProps:null,s=f.children,Ed(r,f)?s=null:p!==null&&Ed(r,p)&&(t.flags|=32),t.memoizedState!==null&&(r=hf(e,t,PS,null,null,l),ui._currentValue=r),Qs(e,t),Nt(e,t,s,l),t.child;case 6:return e===null&&Te&&((e=l=tt)&&(l=n2(l,t.pendingProps,An),l!==null?(t.stateNode=l,Tt=t,tt=null,e=!0):e=!1),e||Xl(t)),null;case 13:return n0(e,t,l);case 4:return $l(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Pa(t,null,s,l):Nt(e,t,s,l),t.child;case 11:return Ip(e,t,t.type,t.pendingProps,l);case 7:return s=t.pendingProps,Qs(e,t),Nt(e,t,s,l),t.child;case 8:return Nt(e,t,t.pendingProps.children,l),t.child;case 12:return Nt(e,t,t.pendingProps.children,l),t.child;case 10:return s0(e,t,l);case 9:return r=t.type._context,s=t.pendingProps.children,Qa(t),r=Ht(r),s=s(r),t.flags|=1,Nt(e,t,s,l),t.child;case 14:return Xp(e,t,t.type,t.pendingProps,l);case 15:return Kp(e,t,t.type,t.pendingProps,l);case 19:return $f(e,t,l);case 31:return sb(e,t,l);case 22:return Pp(e,t,l,t.pendingProps);case 24:return Qa(t),s=Ht(vt),e===null?(r=tf(),r===null&&(r=et,f=Wc(),r.pooledCache=f,f.refCount++,f!==null&&(r.pooledCacheLanes|=l),r=f),t.memoizedState={parent:s,cache:r},lf(t),Kl(t,vt,r)):((e.lanes&l)!==0&&(af(e,t),fo(t,null,null,l),co()),r=e.memoizedState,f=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Kl(t,vt,s)):(s=f.cache,Kl(t,vt,s),s!==r.cache&&Jc(t,[vt],l,!0))),Nt(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:Te&&Hr(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:Qs(e,t),Nt(e,t,s.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Tl(e){e.flags|=4}function Ff(e,t,l,s,r){var f;if((f=(e.mode&32)!==0)&&(f=l===null?Lv(t,s):Lv(t,s)&&(s.src!==l.src||s.srcSet!==l.srcSet)),f){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(k0())e.flags|=8192;else throw Ka=Gr,nf}else e.flags&=-16777217}function o0(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hv(t))if(k0())e.flags|=8192;else throw Ka=Gr,nf}function ru(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?qi():536870912,e.lanes|=t,Ps|=t)}function yo(e,t){if(!Te)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.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 nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(t)for(var r=e.child;r!==null;)l|=r.lanes|r.childLanes,s|=r.subtreeFlags&1206910976,s|=r.flags&1206910976,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)l|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=l,t}function rb(e,t,l){var s=t.pendingProps;switch(Xc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return l=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Cl(vt),ut(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&($s(t)?Tl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Pc())),nt(t),null;case 26:var r=t.type,f=t.memoizedState;return e===null?(Tl(t),f!==null?(nt(t),o0(t,f)):(nt(t),Ff(t,r,null,s,l))):f?f!==e.memoizedState?(Tl(t),nt(t),o0(t,f)):(nt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Tl(t),nt(t),Ff(t,r,e,s,l)),null;case 27:if(Ot(t),l=Pt.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Tl(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return nt(t),t.subtreeFlags&=-33554433,null}e=Mt.current,$s(t)?Vg(t):(e=Mv(r,s,l),t.stateNode=e,Tl(t))}return nt(t),t.subtreeFlags&=-33554433,null;case 5:if(Ot(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Tl(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return nt(t),t.subtreeFlags&=-33554433,null}if(f=Mt.current,$s(t))Vg(t);else{var p=To(Pt.current);switch(f){case 1:f=p.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:f=p.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":f=p.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":f=p.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":f=p.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof s.is=="string"?p.createElement("select",{is:s.is}):p.createElement("select"),s.multiple?f.multiple=!0:s.size&&(f.size=s.size);break;default:f=typeof s.is=="string"?p.createElement(r,{is:s.is}):p.createElement(r)}}f[Lt]=t,f[sn]=s;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=f;e:switch(Ft(f,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Tl(t)}}return nt(t),t.subtreeFlags&=-33554433,Ff(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Tl(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(o(166));if(e=Pt.current,$s(t)){if(e=t.stateNode,l=t.memoizedProps,s=null,r=Tt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||iv(e.nodeValue,l)),e||Xl(t,!0)}else e=To(e).createTextNode(s),e[Lt]=t,t.stateNode=e}return nt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(s=$s(t),l!==null){if(e===null){if(!s)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Lt]=t}else Ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),e=!1}else l=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(vn(t),t):(vn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return nt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=$s(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Lt]=t}else Ba(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),r=!1}else r=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(vn(t),t):(vn(t),null)}return vn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==r&&(s.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ru(t,t.updateQueue),nt(t),null);case 4:return ut(),e===null&&bd(t.stateNode.containerInfo),t.flags|=67108864,nt(t),null;case 10:return Cl(t.type),nt(t),null;case 19:if(ff(t),s=t.memoizedState,s===null)return nt(t),null;if(r=(t.flags&128)!==0,f=s.rendering,f===null)if(r)yo(s,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ir(e),f!==null){for(t.flags|=128,yo(s,!1),e=f.updateQueue,t.updateQueue=e,ru(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Dg(l,e),l=l.sibling;return ho(t,$t.current&1|2),Te&&wl(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&We()>Su&&(t.flags|=128,r=!0,yo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Ir(f),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ru(t,e),yo(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!f.alternate&&!Te)return nt(t),null}else 2*We()-s.renderingStartTime>Su&&l!==536870912&&(t.flags|=128,r=!0,yo(s,!1),t.lanes=4194304);s.isBackwards?(f.sibling=t.child,t.child=f):(e=s.last,e!==null?e.sibling=f:t.child=f,s.last=f)}if(s.tail!==null){e=s.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=We(),e.sibling=null,f=$t.current,f=r?f&1|2:f&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!l||Te?ho(t,f):(l=f,Ie(Ut,t),Ie($t,l),It===null&&(It=t)),Te&&wl(t,s.treeForkCount),e}return nt(t),null;case 22:case 23:return vn(t),uf(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(l&536870912)!==0&&(t.flags&128)===0&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),l=t.updateQueue,l!==null&&ru(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==l&&(t.flags|=2048),e!==null&&mt(Ia),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Cl(vt),nt(t),null;case 25:return null;case 30:return t.flags|=33554432,nt(t),null}throw Error(o(156,t.tag))}function ub(e,t){switch(Xc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cl(vt),ut(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ot(t),null;case 31:if(t.memoizedState!==null){if(vn(t),t.alternate===null)throw Error(o(340));Ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ba()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ff(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 Cl(t.type),null;case 22:case 23:return vn(t),uf(),e!==null&&mt(Ia),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Cl(vt),null;case 25:return null;default:return null}}function r0(e,t){switch(Xc(t),t.tag){case 3:Cl(vt),ut();break;case 26:case 27:case 5:Ot(t);break;case 4:ut();break;case 31:t.memoizedState!==null&&vn(t);break;case 13:vn(t);break;case 19:ff(t);break;case 10:Cl(t.type);break;case 22:case 23:vn(t),uf(),e!==null&&mt(Ia);break;case 24:Cl(vt)}}function xo(e,t){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var r=s.next;l=r;do{if((l.tag&e)===e){s=void 0;var f=l.create,p=l.inst;s=f(),p.destroy=s}l=l.next}while(l!==r)}}catch(b){Pe(t,t.return,b)}}function la(e,t,l){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var f=r.next;s=f;do{if((s.tag&e)===e){var p=s.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,r=t;var T=l,B=b;try{B()}catch(I){Pe(r,T,I)}}}s=s.next}while(s!==f)}}catch(I){Pe(t,t.return,I)}}function u0(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Jg(t,l)}catch(s){Pe(e,e.return,s)}}}function c0(e,t,l){l.props=Ja(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){Pe(e,t,s)}}function nl(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var r=e.stateNode,f=Sl(e.memoizedProps,r);(r.ref===null||r.ref.name!==f)&&(r.ref=vv(f)),s=r.ref;break;case 7:if(e.stateNode===null){var p=new jn(e);v(e.child,!1,Wb,p,void 0,void 0),e.stateNode=p}s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(b){Pe(e,t,b)}}function Vt(e,t){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(r){Pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(r){Pe(e,t,r)}else l.current=null}function uu(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++)wv(e.stateNode,t[l])}function f0(e){for(var t=e.return;t!==null&&(Bf(t)&&wv(e.stateNode,t.stateNode),!kf(t));)t=t.return}function So(e){for(var t=e.return;t!==null&&(Bf(t)&&e2(e.stateNode,t.stateNode),!kf(t));)t=t.return}function kf(e){return e.tag===5||e.tag===3||e.tag===27}function Bf(e){return e&&e.tag===7&&e.stateNode!==null}function Gf(e){var t=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(r){Pe(e,e.return,r)}}function qf(e,t,l){try{var s=e.stateNode;Lb(s,e.type,l,t),s[sn]=t}catch(r){Pe(e,e.return,r)}}function d0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ca(e.type)||e.tag===4}function Qf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||d0(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&&ca(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 Yf(e,t,l,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(r),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Wn)),uu(e,s),Be=!0;else if(r!==4&&(r===27&&(uu(e,s),s=null,ca(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(Yf(e,t,l,s),e=e.sibling;e!==null;)Yf(e,t,l,s),e=e.sibling}function cu(e,t,l,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?l.insertBefore(r,t):l.appendChild(r),uu(e,s),Be=!0;else if(r!==4&&(r===27&&(uu(e,s),s=null,ca(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(cu(e,t,l,s),e=e.sibling;e!==null;)cu(e,t,l,s),e=e.sibling}function h0(e){var t=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ft(t,s,l),t[Lt]=e,t[sn]=l}catch(f){Pe(e,e.return,f)}}var fu=!1,yn=null;function m0(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(fu=!0)}var ll=null;function g0(){var e=ll;return ll=null,e}var rn=0;function Ys(e,t,l,s,r){return rn=0,p0(e.child,t,l,s,r)}function p0(e,t,l,s,r){for(var f=!1;e!==null;){if(e.tag===5){var p=e.stateNode;if(s!==null){var b=Td(p);s.push(b),b.view&&(f=!0)}else f||Td(p).view&&(f=!0);fu=!0,gv(p,rn===0?t:t+"_"+rn,l),rn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||p0(e.child,t,l,s,r)&&(f=!0));e=e.sibling}return f}function al(e,t){for(;e!==null;)e.tag===5?pv(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||al(e.child,t)),e=e.sibling}function du(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(du(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(o(544));var l=t.name;t=bl(t.default,t.share),t!=="none"&&(Ys(e,l,t,null,!1)||al(e.child,!1))}e=e.sibling}}function If(e,t){if(e.tag===30){var l=e.stateNode,s=e.memoizedProps,r=Sl(s,l),f=bl(s.default,l.paired?s.share:s.enter);f!=="none"?Ys(e,r,f,null,!1)?(du(e),l.paired||t||ei(e,s.onEnter)):al(e.child,!1):du(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)If(e,t),e=e.sibling;else du(e)}function Xf(e){if(yn!==null&&yn.size!==0){var t=yn;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,s=l.name;if(s!=null&&s!=="auto"){var r=t.get(s);if(r!==void 0){var f=bl(l.default,l.share);if(f!=="none"&&(Ys(e,s,f,null,!1)?(f=e.stateNode,r.paired=f,f.paired=r,ei(e,l.onShare)):al(e.child,!1)),t.delete(s),t.size===0)break}}}Xf(e)}e=e.sibling}}}function Kf(e){if(e.tag===30){var t=e.memoizedProps,l=Sl(t,e.stateNode),s=yn!==null?yn.get(l):void 0,r=bl(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(Ys(e,l,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,yn.delete(l),ei(e,t.onShare)):ei(e,t.onExit):al(e.child,!1)),yn!==null&&Xf(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Kf(e),e=e.sibling;else yn!==null&&Xf(e)}function v0(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=Sl(t,e.stateNode);t=bl(t.default,t.update),e.flags&=-5,t!=="none"&&Ys(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&v0(e);e=e.sibling}}function Pf(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,al(e.child,!1))}Pf(e)}e=e.sibling}}function hu(e){if(e.tag===30)e.stateNode.paired=null,al(e.child,!1),Pf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)hu(e),e=e.sibling;else Pf(e)}function y0(e){for(e=e.child;e!==null;)e.tag===30?al(e.child,!1):(e.subtreeFlags&33554432)!==0&&y0(e),e=e.sibling}function Zf(e,t,l,s,r,f,p){for(var b=!1;t!==null;){if(t.tag===5){var T=t.stateNode;if(f!==null&&rn<f.length){var B=f[rn],I=Td(T);(B.view||I.view)&&(b=!0);var Z;if(Z=(e.flags&4)===0)if(I.clip)Z=!0;else{Z=B.rect;var F=I.rect;Z=Z.y!==F.y||Z.x!==F.x||Z.height!==F.height||Z.width!==F.width}Z&&(e.flags|=4),I.abs?I=!B.abs:(B=B.rect,I=I.rect,I=B.height!==I.height||B.width!==I.width),I&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&gv(T,rn===0?l:l+"_"+rn,r),b&&(e.flags&4)!==0||(ll===null&&(ll=[]),ll.push(T,rn===0?s:s+"_"+rn,t.memoizedProps)),rn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&p?e.flags|=t.flags&32:Zf(e,t.child,l,s,r,f,p)&&(b=!0));t=t.sibling}return b}function x0(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,s=e.stateNode,r=Sl(l,s),f=bl(l.default,l.update),p;p=e.memoizedState,e.memoizedState=null,s=e;var b=e.child;rn=0,r=Zf(s,b,r,r,f,p,!1),(e.flags&4)!==0&&r&&ei(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&x0(e);e=e.sibling}}var Rt=!1,Xe=!1,sl=!1,Jf=!1,S0=typeof WeakSet=="function"?WeakSet:Set,At=null,il=!1,bo=!1,mu=!1,Wf=!1;function cb(e,t,l){if(e=e.containerInfo,Nd=ci,e=Ng(e),$c(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var f=r.anchorOffset,p=r.focusNode;r=r.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var b=0,T=-1,B=-1,I=0,Z=0,F=e,q=null;t:for(;;){for(var ie;F!==s||f!==0&&F.nodeType!==3||(T=b+f),F!==p||r!==0&&F.nodeType!==3||(B=b+r),F.nodeType===3&&(b+=F.nodeValue.length),(ie=F.firstChild)!==null;)q=F,F=ie;for(;;){if(F===e)break t;if(q===s&&++I===f&&(T=b),q===p&&++Z===r&&(B=b),(ie=F.nextSibling)!==null)break;F=q,q=F.parentNode}F=ie}s=T===-1||B===-1?null:{start:T,end:B}}else s=null}s=s||{start:0,end:0}}else s=null;for(Cd={focusedElem:e,selectionRange:s},ci=!1,l=(l&335544064)===l,At=t,t=l?9270:1024;At!==null;){if(e=At,l&&(s=e.deletions,s!==null))for(f=0;f<s.length;f++)l&&Kf(s[f]);if(e.alternate===null&&(e.flags&2)!==0)l&&m0(e),gu(l);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&l&&Kf(s),gu(l);continue}else if(s!==null&&s.memoizedState!==null){l&&m0(e),gu(l);continue}}s=e.child,(e.subtreeFlags&t)!==0&&s!==null?(s.return=e,At=s):(l&&v0(e),gu(l))}}yn=null}function gu(e){for(;At!==null;){var t=At,l=e,s=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((r&1024)!==0&&s!==null){l=void 0,r=s.memoizedProps,s=s.memoizedState;var f=t.stateNode;try{var p=Ja(t.type,r);l=f.getSnapshotBeforeUpdate(p,s),f.__reactInternalSnapshotBeforeUpdate=l}catch(b){Pe(t,t.return,b)}}break;case 3:if((r&1024)!==0){if(s=t.stateNode.containerInfo,l=s.nodeType,l===9)Od(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Od(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&s!==null&&(l=Sl(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=bl(r.default,r.update),r!=="none"&&Ys(s,l,r,s.memoizedState=[],!0));break;default:if((r&1024)!==0)throw Error(o(163))}if(s=t.sibling,s!==null){s.return=t.return,At=s;break}At=t.return}}function b0(e,t,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:ol(e,l),s&4&&xo(5,l);break;case 1:if(ol(e,l),s&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(p){Pe(l,l.return,p)}else{var r=Ja(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Pe(l,l.return,p)}}s&64&&u0(l),s&512&&nl(l,l.return);break;case 3:if(ol(e,l),s&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{Jg(e,t)}catch(p){Pe(l,l.return,p)}}break;case 27:t===null&&s&4&&h0(l);case 26:case 5:ol(e,l),t===null&&s&4&&Gf(l),s&512&&nl(l,l.return);break;case 12:ol(e,l);break;case 31:ol(e,l),s&4&&C0(e,l);break;case 13:ol(e,l),s&4&&E0(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=jb.bind(null,l),l2(e,l))));break;case 22:if(s=l.memoizedState!==null||Rt,!s){var f=t!==null&&t.memoizedState!==null||Xe;t=Rt,r=Xe,Rt=s,(Xe=f)&&!r?(s=2,(l.subtreeFlags&8772)!==0&&(s|=1),Gn(e,l,s)):ol(e,l),Rt=t,Xe=r}break;case 30:ol(e,l),s&512&&nl(l,l.return);break;case 7:s&512&&nl(l,l.return);default:ol(e,l)}}function ed(e,t){for(e=e.child;e!==null;)j0(e,t),e=e.sibling}function j0(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var s=l.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var r=e.stateNode,f=e.memoizedProps.style,p=f!=null&&f.hasOwnProperty("display")?f.display:null;r.style.display=p==null||typeof p=="boolean"?"":(""+p).trim()}}catch(T){Pe(e,e.return,T)}td(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Be=!0}catch(T){Pe(e,e.return,T)}break;case 18:try{var b=e.stateNode;t?mv(b,!0):mv(e.stateNode,!1)}catch(T){Pe(e,e.return,T)}break;case 22:case 23:e.memoizedState===null&&ed(e,t);break;default:ed(e,t)}}function td(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,s=t;switch(l.tag){case 4:j0(l,s);break e;case 22:l.memoizedState===null&&td(l,s);break e;default:td(l,s)}}e=e.sibling}}function w0(e){var t=e.alternate;t!==null&&(e.alternate=null,w0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Sr(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 it=null,un=!1;function kn(e,t,l){for(l=l.child;l!==null;)N0(e,t,l),l=l.sibling}function N0(e,t,l){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Fl,l)}catch{}switch(l.tag){case 26:Xe||Vt(l,t),kn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Xe&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Xe||Vt(l,t),So(l);var s=it,r=un;ca(l.type)&&(it=l.stateNode,un=!1),kn(e,t,l),_v(l.stateNode,l.type,l.memoizedProps),it=s,un=r;break;case 5:Xe||Vt(l,t),So(l);case 6:if(l.tag===6&&So(l),s=it,r=un,it=null,kn(e,t,l),it=s,un=r,it!==null)if(un)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(l.stateNode),Be=!0}catch(f){Pe(l,t,f)}else try{it.removeChild(l.stateNode),Be=!0}catch(f){Pe(l,t,f)}break;case 18:it!==null&&(un?(e=it,hv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),fi(e)):hv(it,l.stateNode));break;case 4:s=it,r=un,it=l.stateNode.containerInfo,un=!0,kn(e,t,l),it=s,un=r;break;case 0:case 11:case 14:case 15:la(2,l,t),Xe||la(4,l,t),kn(e,t,l);break;case 1:Xe||(Vt(l,t),s=l.stateNode,typeof s.componentWillUnmount=="function"&&c0(l,t,s)),kn(e,t,l);break;case 21:kn(e,t,l);break;case 22:Xe=(s=Xe)||l.memoizedState!==null,kn(e,t,l),Xe=s;break;case 30:Vt(l,t),kn(e,t,l);break;case 7:Xe||Vt(l,t),kn(e,t,l);break;default:kn(e,t,l)}}function C0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{fi(e)}catch(l){Pe(t,t.return,l)}}}function E0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{fi(e)}catch(l){Pe(t,t.return,l)}}function fb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new S0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new S0),t;default:throw Error(o(435,e.tag))}}function pu(e,t){var l=fb(e);t.forEach(function(s){if(!l.has(s)){l.add(s);var r=wb.bind(null,e,s);s.then(r,r)}})}function Wt(e,t,l){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var f=s[r],p=e,b=t,T=b;e:for(;T!==null;){switch(T.tag){case 27:if(ca(T.type)){it=T.stateNode,un=!1;break e}break;case 5:it=T.stateNode,un=!1;break e;case 3:case 4:it=T.stateNode.containerInfo,un=!0;break e}T=T.return}if(it===null)throw Error(o(160));N0(p,b,f),it=null,un=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)M0(t,e,l),t=t.sibling}var Bn=null;function M0(e,t,l){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(r&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var f=0;f<s.length;f++){var p=s[f];p.ref.impl=p.nextImpl}Wt(t,e,l),en(e),r&4&&(la(3,e,e.return),xo(3,e),la(5,e,e.return));break;case 1:Wt(t,e,l),en(e),r&512&&(Xe||s===null||Vt(s,s.return)),r&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(f=Bn,Wt(t,e,l),en(e),r&512&&(Xe||s===null||Vt(s,s.return)),r&4)if(r=s!==null?s.memoizedState:null,l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null)if(Rt)e.stateNode=cv(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,r=f.ownerDocument||f;t:switch(t){case"title":s=r.getElementsByTagName("title")[0],(!s||s[Yi]||s[Lt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),Ft(s,t,l),s[Lt]=e,_t(s),t=s;break e;case"link":if(f=Dv("link","href",r).get(t+(l.href||""))){for(p=0;p<f.length;p++)if(s=f[p],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){f.splice(p,1);break t}}s=r.createElement(t),Ft(s,t,l),r.head.appendChild(s);break;case"meta":if(f=Dv("meta","content",r).get(t+(l.content||""))){for(p=0;p<f.length;p++)if(s=f[p],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){f.splice(p,1);break t}}s=r.createElement(t),Ft(s,t,l),r.head.appendChild(s);break;default:throw Error(o(468,t))}s[Lt]=e,_t(s),t=s}e.stateNode=t}else Rt||Vd(f,e.type,e.stateNode);else e.stateNode=zv(f,l,e.memoizedProps);else r!==l?(r===null?(t=s.stateNode,t===null||Xe||t.parentNode.removeChild(t)):r.count--,l===null?Rt||Vd(f,e.type,e.stateNode):zv(f,l,e.memoizedProps)):l===null&&e.stateNode!==null&&qf(e,e.memoizedProps,s.memoizedProps);break;case 27:Wt(t,e,l),en(e),r&512&&(Xe||s===null||Vt(s,s.return)),s!==null&&r&4&&qf(e,e.memoizedProps,s.memoizedProps);break;case 5:if(f=sl,sl=!1,Wt(t,e,l),sl=f,en(e),r&512&&(Xe||s===null||Vt(s,s.return)),e.flags&32){t=e.stateNode;try{_s(t,""),Be=!0}catch(I){Pe(e,e.return,I)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,qf(e,t,s!==null?s.memoizedProps:t)),r&1024&&(Jf=!0);break;case 6:if(Wt(t,e,l),en(e),r&4){if(e.stateNode===null)throw Error(o(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Be=!0}catch(I){Pe(e,e.return,I)}}break;case 3:if(Be=!1,Au=null,f=Bn,Bn=Ro(t.containerInfo),Wt(t,e,l),Bn=f,en(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{fi(t.containerInfo)}catch(I){Pe(e,e.return,I)}Jf&&(Jf=!1,_0(e)),Be=!1;break;case 4:r=sl,sl=Rt,s=Xm(),f=Bn,Bn=Ro(e.stateNode.containerInfo),Wt(t,e,l),en(e),Bn=f,Be&&bo&&(mu=!0),Be=s,sl=r;break;case 12:Wt(t,e,l),en(e);break;case 31:Wt(t,e,l),en(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,pu(e,t)));break;case 13:Wt(t,e,l),en(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(xu=We()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,pu(e,t)));break;case 22:f=e.memoizedState!==null,p=s!==null&&s.memoizedState!==null;var b=Rt,T=Xe,B=sl;Rt=b||f,sl=B||f,Xe=T||p,Wt(t,e,l),Xe=T,sl=B,Rt=b,en(e),r&8192&&(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,!f||s===null||p||Rt||Xe||(t=p||Xe,l=Rt,s=Xe,Rt=f||Rt,Xe=t,aa(e,2),Rt=l,Xe=s),!f&&sl||ed(e,f)),r&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,pu(e,l))));break;case 19:Wt(t,e,l),en(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,pu(e,t)));break;case 30:r&512&&(Xe||s===null||Vt(s,s.return)),r=Xm(),f=bo,p=(l&335544064)===l,b=e.memoizedProps,bo=p&&bl(b.default,b.update)!=="none",Wt(t,e,l),en(e),p&&s!==null&&Be&&(e.flags|=4),bo=f,Be=r;break;case 21:break;case 7:r&512&&(Xe||s===null||Vt(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:Wt(t,e,l),en(e)}}function en(e){var t=e.flags;if(t&2){try{for(var l,s=e.return;s!==null;){if(d0(s)){l=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(Bf(r)){var f=r.stateNode;s===null?s=[f]:s.push(f)}if(kf(r))break;r=r.return}var p=s;if(l==null)throw Error(o(160));switch(l.tag){case 27:var b=l.stateNode,T=Qf(e);cu(e,T,b,p);break;case 5:var B=l.stateNode;l.flags&32&&(_s(B,""),l.flags&=-33);var I=Qf(e);cu(e,I,B,p);break;case 3:case 4:var Z=l.stateNode.containerInfo,F=Qf(e);Yf(e,F,Z,p);break;default:throw Error(o(161))}}catch(q){Pe(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_0(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ci=!0,t.reset(),ci=!1),e=e.sibling}}function Is(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)T0(t,e),t=t.sibling;else x0(t)}function T0(e,t){var l=e.alternate;if(l===null)If(e,!1);else switch(e.tag){case 3:if(Wf=il=!1,g0(),Is(t,e),!il&&!mu){if(e=ll,e!==null)for(var s=0;s<e.length;s+=3){l=e[s];var r=e[s+1];pv(l,e[s+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+r+")"})}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"})),Wf=!0}ll=null;break;case 5:Is(t,e);break;case 4:s=il,il=!1,Is(t,e),il&&(mu=!0),il=s;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?If(e,!1):Is(t,e));break;case 30:s=il,r=g0(),il=!1,Is(t,e),il&&(e.flags|=4);var f=e.memoizedProps,p=e.stateNode;t=Sl(f,p),p=Sl(l.memoizedProps,p);var b=bl(f.default,f.update);b==="none"?t=!1:(f=l.memoizedState,l.memoizedState=null,l=e.child,rn=0,t=Zf(e,l,t,p,b,f,!0),rn!==(f===null?0:f.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(ei(e,e.memoizedProps.onUpdate),ll=r):r!==null&&(r.push.apply(r,ll),ll=r),il=(e.flags&32)!==0?!0:s;break;default:Is(t,e)}}function ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)b0(e,t.alternate,t),t=t.sibling}function aa(e,t){for(e=e.child;e!==null;){var l=e,s=t;switch(l.tag){case 0:case 11:case 14:case 15:la(4,l,l.return),aa(l,s);break;case 1:Vt(l,l.return);var r=l.stateNode;typeof r.componentWillUnmount=="function"&&c0(l,l.return,r),aa(l,s);break;case 27:(s&2)!==0&&_v(l.stateNode,l.type,l.memoizedProps);case 5:Vt(l,l.return),l.tag!==5&&l.tag!==27||So(l),aa(l,s);break;case 6:So(l);break;case 26:Vt(l,l.return),r=l.stateNode,l.memoizedState!==null||r===null||Xe||r.parentNode.removeChild(r),aa(l,s);break;case 22:l.memoizedState===null&&aa(l,s);break;case 30:Vt(l,l.return),aa(l,s);break;case 7:Vt(l,l.return);default:aa(l,s)}e=e.sibling}}function Gn(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var s=t.alternate,r=e,f=t,p=f.flags,b=(l&1)!==0;switch(f.tag){case 0:case 11:case 15:Gn(r,f,l),xo(4,f);break;case 1:if(Gn(r,f,l),s=f,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(I){Pe(s,s.return,I)}if(s=f,r=s.updateQueue,r!==null){var T=s.stateNode;try{var B=r.shared.hiddenCallbacks;if(B!==null)for(r.shared.hiddenCallbacks=null,r=0;r<B.length;r++)Zg(B[r],T)}catch(I){Pe(s,s.return,I)}}b&&p&64&&u0(f),nl(f,f.return);break;case 27:(l&2)!==0&&h0(f);case 5:f.tag!==5&&f.tag!==27||f0(f),Gn(r,f,l),b&&s===null&&p&4&&Gf(f),nl(f,f.return);break;case 6:f0(f);break;case 26:T=f.stateNode,f.memoizedState!==null||T===null||Rt||Vd(Ro(T.ownerDocument),f.type,T),Gn(r,f,l),b&&s===null&&p&4&&Gf(f),nl(f,f.return);break;case 12:Gn(r,f,l);break;case 31:Gn(r,f,l),b&&p&4&&C0(r,f);break;case 13:Gn(r,f,l),b&&p&4&&E0(r,f);break;case 22:f.memoizedState===null&&Gn(r,f,l),nl(f,f.return);break;case 30:Gn(r,f,l),nl(f,f.return);break;case 7:nl(f,f.return);default:Gn(r,f,l)}t=t.sibling}}function nd(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&&so(l))}function ld(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&so(e))}function On(e,t,l,s){var r=(l&335544064)===l;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)R0(e,t,l,s),t=t.sibling;else r&&y0(t)}function R0(e,t,l,s){var r=(l&335544064)===l;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&hu(t);var f=t.flags;switch(t.tag){case 0:case 11:case 15:On(e,t,l,s),f&2048&&xo(9,t);break;case 1:On(e,t,l,s);break;case 3:On(e,t,l,s),r&&Wf&&(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="")),f&2048&&(f=null,t.alternate!==null&&(f=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==f&&(t.refCount++,f!=null&&so(f)));break;case 12:if(f&2048){On(e,t,l,s),f=t.stateNode;try{var p=t.memoizedProps,b=p.id,T=p.onPostCommit;typeof T=="function"&&T(b,t.alternate===null?"mount":"update",f.passiveEffectDuration,-0)}catch(B){Pe(t,t.return,B)}}else On(e,t,l,s);break;case 31:On(e,t,l,s);break;case 13:On(e,t,l,s);break;case 23:break;case 22:p=t.stateNode,b=t.alternate,t.memoizedState!==null?(r&&b!==null&&b.memoizedState===null&&hu(b),p._visibility&2?On(e,t,l,s):jo(e,t)):(r&&b!==null&&b.memoizedState!==null&&hu(t),p._visibility&2?On(e,t,l,s):(p._visibility|=2,Xs(e,t,l,s,(t.subtreeFlags&10256)!==0||!1))),f&2048&&nd(b,t);break;case 24:On(e,t,l,s),f&2048&&ld(t.alternate,t);break;case 30:r&&(f=t.alternate,f!==null&&(al(f.child,!0),al(t.child,!0))),On(e,t,l,s);break;default:On(e,t,l,s)}}function Xs(e,t,l,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,p=t,b=l,T=s,B=p.flags;switch(p.tag){case 0:case 11:case 15:Xs(f,p,b,T,r),xo(8,p);break;case 23:break;case 22:var I=p.stateNode;p.memoizedState!==null?I._visibility&2?Xs(f,p,b,T,r):jo(f,p):(I._visibility|=2,Xs(f,p,b,T,r)),r&&B&2048&&nd(p.alternate,p);break;case 24:Xs(f,p,b,T,r),r&&B&2048&&ld(p.alternate,p);break;default:Xs(f,p,b,T,r)}t=t.sibling}}function jo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,s=t,r=s.flags;switch(s.tag){case 22:jo(l,s),r&2048&&nd(s.alternate,s);break;case 24:jo(l,s),r&2048&&ld(s.alternate,s);break;default:jo(l,s)}t=t.sibling}}var Wa=8192;function es(e,t,l){if(e.subtreeFlags&Wa)for(e=e.child;e!==null;)A0(e,t,l),e=e.sibling}function A0(e,t,l){switch(e.tag){case 26:es(e,t,l),e.flags&Wa&&(e.memoizedState!==null?v2(l,Bn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&$v(l,e)));break;case 5:es(e,t,l),e.flags&Wa&&(e=e.stateNode,(t&335544128)===t&&$v(l,e));break;case 3:case 4:var s=Bn;Bn=Ro(e.stateNode.containerInfo),es(e,t,l),Bn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Wa,Wa=16777216,es(e,t,l),Wa=s):es(e,t,l));break;case 30:if((e.flags&Wa)!==0&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,yn===null&&(yn=new Map),yn.set(s,r)}es(e,t,l);break;default:es(e,t,l)}}function O0(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 wo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];At=s,D0(s,e)}O0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)z0(e),e=e.sibling}function z0(e){switch(e.tag){case 0:case 11:case 15:wo(e),e.flags&2048&&la(9,e,e.return);break;case 3:wo(e);break;case 12:wo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vu(e)):wo(e);break;default:wo(e)}}function vu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];At=s,D0(s,e)}O0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:la(8,t,t.return),vu(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,vu(t));break;default:vu(t)}e=e.sibling}}function D0(e,t){for(;At!==null;){var l=At;switch(l.tag){case 0:case 11:case 15:la(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:so(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,At=s;else e:for(l=e;At!==null;){s=At;var r=s.sibling,f=s.return;if(w0(s),s===l){At=null;break e}if(r!==null){r.return=f,At=r;break e}At=f}}}var db={getCacheForType:function(e){var t=Ht(vt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Ht(vt).controller.signal}},hb=typeof WeakMap=="function"?WeakMap:Map,qe=0,et=null,Re=null,Oe=0,Ke=0,xn=null,sa=!1,Ks=!1,ad=!1,Rl=0,ht=0,ia=0,ts=0,yu=0,Sn=0,Ps=0,No=null,cn=null,sd=!1,xu=0,L0=0,Su=1/0,bu=null,oa=null,ct=0,qn=null,ns=null,rl=0,id=0,od=null,H0=null,Zs=null,Js=null,Ws=null,Co=0,ju=null;function bn(){return(qe&2)!==0&&Oe!==0?Oe&-Oe:ue.T!==null?vd():Vm()}function U0(){if(Sn===0)if((Oe&536870912)===0||Te){var e=kl;kl<<=1,(kl&3932160)===0&&(kl=262144),Sn=e}else Sn=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Sn}function ei(e,t){if(t!=null){var l=e.stateNode,s=l.ref;s===null&&(s=l.ref=vv(Sl(e.memoizedProps,l))),Js===null&&(Js=[]),Js.push(t.bind(null,s))}}function fn(e,t,l){(e===et&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(ti(e,0),ra(e,Oe,Sn,!1)),Gl(e,l),((qe&2)===0||e!==et)&&(e===et&&((qe&2)===0&&(ts|=l),ht===4&&ra(e,Oe,Sn,!1)),ul(e))}function $0(e,t,l){if((qe&6)!==0)throw Error(o(327));var s=!l&&(t&127)===0&&(t&e.expiredLanes)===0||an(e,t),r=s?pb(e,t):ud(e,t,!0),f=s;do{if(r===0){Ks&&!s&&ra(e,t,0,!1);break}else{if(l=e.current.alternate,f&&!mb(l)){r=ud(e,t,!1),f=!1;continue}if(r===2){if(f=t,e.errorRecoveryDisabledLanes&f)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var b=e;r=No;var T=b.current.memoizedState.isDehydrated;if(T&&(ti(b,p).flags|=256),p=ud(b,p,!1),p!==2&&p!==6){if(ad&&!T){b.errorRecoveryDisabledLanes|=f,ts|=f,r=4;break e}f=cn,cn=r,f!==null&&(cn===null?cn=f:cn.push.apply(cn,f))}r=p}if(f=!1,r!==2)continue}}if(r===1){ti(e,0),ra(e,t,0,!0);break}e:{switch(s=e,f=r,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:ra(s,t,Sn,!sa);break e;case 2:cn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=xu+300-We(),10<r)){if(ra(s,t,Sn,!sa),Bl(s,0,!0)!==0)break e;rl=t,s.timeoutHandle=_d(V0.bind(null,s,l,cn,bu,sd,t,Sn,ts,Ps,sa,f,"Throttled",-0,0),r);break e}V0(s,l,cn,bu,sd,t,Sn,ts,Ps,sa,f,null,-0,0)}}break}while(!0);ul(e)}function V0(e,t,l,s,r,f,p,b,T,B,I,Z,F,q){e.timeoutHandle=-1;var ie=t.subtreeFlags,he=(f&335544064)===f;if(Z=null,(he||ie&8192||(ie&16785408)===16785408)&&(Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wn},yn=null,A0(t,f,Z),he&&(ie=Z,he=e.containerInfo,he=(he.nodeType===9?he:he.ownerDocument).__reactViewTransition,he!=null&&(ie.count++,ie.waitingForViewTransition=!0,ie=zo.bind(ie),he.finished.then(ie,ie))),ie=(f&62914560)===f?xu-We():(f&4194048)===f?L0-We():0,ie=y2(Z,ie),ie!==null)){rl=f,e.cancelPendingCommit=ie(I0.bind(null,e,t,f,l,s,r,p,b,T,B,I,Z,null,F,q)),ra(e,f,p,!B);return}I0(e,t,f,l,s,r,p,b,T,B,I,Z)}function mb(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 s=0;s<l.length;s++){var r=l[s],f=r.getSnapshot;r=r.value;try{if(!pn(f(),r))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 ra(e,t,l,s){t=Gi(e,t),t&=~yu,t&=~ts,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var f=31-Yt(r),p=1<<f;s[f]=-1,r&=~p}l!==0&&Hm(e,l,t)}function wu(){return(qe&6)===0?(Eo(0),!1):!0}function rd(){if(Re!==null){if(Ke===0)var e=Re.return;else e=Re,Nl=Ga=null,pf(e),ks=null,ro=0,e=Re;for(;e!==null;)r0(e.alternate,e),e=e.return;Re=null}}function ti(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,$b(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),rl=0,rd(),et=e,Re=l=jl(e.current,null),Oe=t,Ke=0,xn=null,sa=!1,Ks=an(e,t),ad=!1,Ps=Sn=yu=ts=ia=ht=0,cn=No=null,sd=!1,Rl=Gi(e,t),Ar(),l}function F0(e,t){Me=null,ue.H=nu,t===Fs||t===Br?(t=Ig(),Ke=3):t===nf?(t=Ig(),Ke=4):Ke=t===Af?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,xn=t,Re===null&&(ht=1,lu(e,_n(t,e.current)))}function k0(){var e=Ut.current;return e===null?!0:(Oe&4194048)===Oe?It===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===It:!1}function B0(){var e=ue.H;return ue.H=nu,e===null?nu:e}function G0(){var e=ue.A;return ue.A=db,e}function Nu(){ht=4,sa||(Oe&4194048)!==Oe&&Ut.current!==null||(Ks=!0),(ia&134217727)===0&&(ts&134217727)===0||et===null||ra(et,Oe,Sn,!1)}function ud(e,t,l){var s=qe;qe|=2;var r=B0(),f=G0();(et!==e||Oe!==t)&&(bu=null,ti(e,t)),t=!1;var p=ht;e:do try{if(Ke!==0&&Re!==null){var b=Re,T=xn;switch(Ke){case 8:rd(),p=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var B=Ke;if(Ke=0,xn=null,ni(e,b,T,B),l&&Ks){p=0;break e}break;default:B=Ke,Ke=0,xn=null,ni(e,b,T,B)}}gb(),p=ht;break}catch(I){F0(e,I)}while(!0);return t&&e.shellSuspendCounter++,Nl=Ga=null,qe=s,ue.H=r,ue.A=f,Re===null&&(et=null,Oe=0,Ar()),p}function gb(){for(;Re!==null;)q0(Re)}function pb(e,t){var l=qe;qe|=2;var s=B0(),r=G0();et!==e||Oe!==t?(bu=null,Su=We()+500,ti(e,t)):Ks=an(e,t);e:do try{if(Ke!==0&&Re!==null){t=Re;var f=xn;t:switch(Ke){case 1:Ke=0,xn=null,ni(e,t,f,1);break;case 2:case 9:if(Qg(f)){Ke=0,xn=null,Q0(t);break}t=function(){Ke!==2&&Ke!==9||et!==e||(Ke=7),ul(e)},f.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Qg(f)?(Ke=0,xn=null,Q0(t)):(Ke=0,xn=null,ni(e,t,f,7));break;case 5:var p=null;switch(Re.tag){case 26:p=Re.memoizedState;case 5:case 27:var b=Re;if(p?Hv(p):b.stateNode.complete){Ke=0,xn=null;var T=b.sibling;if(T!==null)Re=T;else{var B=b.return;B!==null?(Re=B,Cu(B)):Re=null}break t}}Ke=0,xn=null,ni(e,t,f,5);break;case 6:Ke=0,xn=null,ni(e,t,f,6);break;case 8:rd(),ht=6;break e;default:throw Error(o(462))}}vb();break}catch(I){F0(e,I)}while(!0);return Nl=Ga=null,ue.H=s,ue.A=r,qe=l,Re!==null?0:(et=null,Oe=0,Ar(),ht)}function vb(){for(;Re!==null&&!wt();)q0(Re)}function q0(e){var t=i0(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,t===null?Cu(e):Re=t}function Q0(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Wp(l,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Wp(l,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:pf(t);var s=t;s===Tt&&(Te?(Ur(s),s.tag===5&&s.stateNode!=null&&(tt=s.stateNode)):(Ur(s),Te=!0));default:r0(l,t),t=Re=Dg(t,Rl),t=i0(l,t,Rl)}e.memoizedProps=e.pendingProps,t===null?Cu(e):Re=t}function ni(e,t,l,s){Nl=Ga=null,pf(t),ks=null,ro=0;var r=t.return;try{if(ab(e,r,t,l,Oe)){ht=1,lu(e,_n(l,e.current)),Re=null;return}}catch(f){if(r!==null)throw Re=r,f;ht=1,lu(e,_n(l,e.current)),Re=null;return}t.flags&32768?(Te||s===1?e=!0:Ks||(Oe&536870912)!==0?e=!1:(sa=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ut.current,s!==null&&s.tag===13&&(s.flags|=16384))),Y0(t,e)):Cu(t)}function Cu(e){var t=e;do{if((t.flags&32768)!==0){Y0(t,sa);return}e=t.return;var l=rb(t.alternate,t,Rl);if(l!==null){Re=l;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);ht===0&&(ht=5)}function Y0(e,t){do{var l=ub(e.alternate,e);if(l!==null){l.flags&=32767,Re=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=l}while(e!==null);ht=6,Re=null}function I0(e,t,l,s,r,f,p,b,T,B,I,Z){e.cancelPendingCommit=null;do Eu();while(ct!==0);if((qe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));e===et&&(Re=et=null,Oe=0),ns=t,qn=e,rl=l,od=r,H0=s,yb(e,t,l,p,b,T,Z)}}function yb(e,t,l,s,r,f,p){var b=t.lanes|t.childLanes;if(id=b,b|=Gc,yr(e,l,b,s,r,f),Js=null,(l&335544064)===l?(Ws=YS(e),s=10262):(Ws=null,s=10256),(t.subtreeFlags&s)!==0||(t.flags&s)!==0?(e.callbackNode=null,e.callbackPriority=0,Nb(La,function(){return hd(),null})):(e.callbackNode=null,e.callbackPriority=0),fu=!1,s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=ue.T,ue.T=null,r=ge.p,ge.p=2,f=qe,qe|=4;try{cb(e,t,l)}finally{qe=f,ge.p=r,ue.T=s}}ct=1,fu?Zs=qb(p,e.containerInfo,Ws,cd,fd,Sb,dd,hd,xb):(cd(),fd(),dd())}function xb(e){if(ct!==0){var t=qn.onRecoverableError;t(e,{componentStack:null})}}function Sb(){ct===3&&(ct=0,T0(ns,qn),ct=4)}function cd(){if(ct===1){ct=0;var e=qn,t=ns,l=rl,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=ue.T,ue.T=null;var r=ge.p;ge.p=2;var f=qe;qe|=4;try{bo=mu=!1,M0(t,e,l),l=Cd;var p=Ng(e.containerInfo),b=l.focusedElem,T=l.selectionRange;if(p!==b&&b&&b.ownerDocument&&wg(b.ownerDocument.documentElement,b)){if(T!==null&&$c(b)){var B=T.start,I=T.end;if(I===void 0&&(I=B),"selectionStart"in b)b.selectionStart=B,b.selectionEnd=Math.min(I,b.value.length);else{var Z=b.ownerDocument||document,F=Z&&Z.defaultView||window;if(F.getSelection){var q=F.getSelection(),ie=b.textContent.length,he=Math.min(T.start,ie),_e=T.end===void 0?he:Math.min(T.end,ie);!q.extend&&he>_e&&(p=_e,_e=he,he=p);var k=jg(b,he),H=jg(b,_e);if(k&&H&&(q.rangeCount!==1||q.anchorNode!==k.node||q.anchorOffset!==k.offset||q.focusNode!==H.node||q.focusOffset!==H.offset)){var G=Z.createRange();G.setStart(k.node,k.offset),q.removeAllRanges(),he>_e?(q.addRange(G),q.extend(H.node,H.offset)):(G.setEnd(H.node,H.offset),q.addRange(G))}}}}for(Z=[],q=b;q=q.parentNode;)q.nodeType===1&&Z.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Z.length;b++){var P=Z[b];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}ci=!!Nd,Cd=Nd=null}finally{qe=f,ge.p=r,ue.T=s}}e.current=t,ct=2}}function fd(){if(ct===2){ct=0;var e=qn,t=ns,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=ue.T,ue.T=null;var s=ge.p;ge.p=2;var r=qe;qe|=4;try{b0(e,t.alternate,t)}finally{qe=r,ge.p=s,ue.T=l}}ct=3}}function dd(){if(ct===4||ct===3){ct=0;var e=Zs;Zs=null,lt();var t=qn,l=ns,s=rl,r=H0,f=(s&335544064)===s?10262:10256;if((l.subtreeFlags&f)!==0||(l.flags&f)!==0?ct=5:(ct=0,ns=qn=null,X0(t,t.pendingLanes)),f=t.pendingLanes,f===0&&(oa=null),Sc(s),l=l.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Fl,l,void 0,(l.current.flags&128)===128)}catch{}if(r!==null){l=ue.T,f=ge.p,ge.p=2,ue.T=null;try{for(var p=t.onRecoverableError,b=0;b<r.length;b++){var T=r[b];p(T.value,{componentStack:T.stack})}}finally{ue.T=l,ge.p=f}}if(r=Js,p=Ws,Ws=null,r!==null&&(Js=null,p===null&&(p=[]),e!==null))for(T=0;T<r.length;T++)l=(0,r[T])(p),l!==void 0&&e.finished.finally(l);(rl&3)!==0&&Eu(),ul(t),f=t.pendingLanes,(s&261930)!==0&&(f&42)!==0?t===ju?Co++:(Co=0,ju=t):(Co=0,ju=null),Eo(0)}}function X0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,so(t)))}function Eu(){return Zs!==null&&(Zs.skipTransition(),Zs=null),cd(),fd(),dd(),hd()}function hd(){if(ct!==5)return!1;var e=qn,t=id;id=0;var l=Sc(rl),s=ue.T,r=ge.p;try{ge.p=32>l?32:l,ue.T=null,l=od,od=null;var f=qn,p=rl;if(ct=0,ns=qn=null,rl=0,(qe&6)!==0)throw Error(o(331));var b=qe;if(qe|=4,z0(f.current),R0(f,f.current,p,l),qe=b,Eo(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Fl,f)}catch{}return!0}finally{ge.p=r,ue.T=s,X0(e,t)}}function K0(e,t,l){t=_n(l,t),t=Rf(e.stateNode,t,2),e=Wl(e,t,2),e!==null&&(Gl(e,2),ul(e))}function Pe(e,t,l){if(e.tag===3)K0(e,e,l);else for(;t!==null;){if(t.tag===3){K0(t,e,l);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(oa===null||!oa.has(s))){e=_n(l,e),l=Qp(2),s=Wl(t,l,2),s!==null&&(Yp(l,s,t,e),Gl(s,2),ul(s));break}}t=t.return}}function md(e,t,l){var s=e.pingCache;if(s===null){s=e.pingCache=new hb;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(l)||(ad=!0,r.add(l),e=bb.bind(null,e,t,l),t.then(e,e))}function bb(e,t,l){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,et===e&&(Oe&l)===l&&((ht===4||ht===3&&(Oe&62914560)===Oe&&300>We()-xu)&&(qe&2)===0?ti(e,0):yu|=l,Ps===Oe&&(Ps=0)),ul(e)}function P0(e,t){t===0&&(t=qi()),e=Fa(e,t),e!==null&&(Gl(e,t),ul(e))}function jb(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),P0(e,l)}function wb(e,t){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(l=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(t),P0(e,l)}function Nb(e,t){return Ve(e,t)}var li=null,ai=null,gd=!1,Mu=!1,pd=!1,ua=0;function ul(e){e!==ai&&e.next===null&&(ai===null?li=ai=e:ai=ai.next=e),Mu=!0,gd||(gd=!0,Eb())}function Eo(e,t){if(!pd&&Mu){pd=!0;do for(var l=!1,s=li;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var f=0;else{var p=s.suspendedLanes,b=s.pingedLanes;f=(1<<31-Yt(42|e)+1)-1,f&=r&~(p&~b),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(l=!0,ev(s,f))}else f=Oe,f=Bl(s,s===et?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||an(s,f)||(l=!0,ev(s,f));s=s.next}while(l);pd=!1}}function Cb(){Z0()}function Z0(){Mu=gd=!1;var e=0;ua!==0&&Ub()&&(e=ua);for(var t=We(),l=null,s=li;s!==null;){var r=s.next,f=J0(s,t);f===0?(s.next=null,l===null?li=r:l.next=r,r===null&&(ai=l)):(l=s,(e!==0||(f&3)!==0)&&(Mu=!0)),s=r}ct!==0&&ct!==5||Eo(e),ua!==0&&(ua=0)}function J0(e,t){for(var l=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var p=31-Yt(f),b=1<<p,T=r[p];T===-1?((b&l)===0||(b&s)!==0)&&(r[p]=vr(b,t)):T<=t&&(e.expiredLanes|=b),f&=~b}if(t=et,l=Oe,l=Bl(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,l===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&ke(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||an(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(s!==null&&ke(s),Sc(l)){case 2:case 8:l=Da;break;case 32:l=La;break;case 268435456:l=Bi;break;default:l=La}return s=W0.bind(null,e),l=Ve(l,s),e.callbackPriority=t,e.callbackNode=l,t}return s!==null&&s!==null&&ke(s),e.callbackPriority=2,e.callbackNode=null,2}function W0(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Eu()&&e.callbackNode!==l)return null;var s=Oe;return s=Bl(e,e===et?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:($0(e,s,t),J0(e,We()),e.callbackNode!=null&&e.callbackNode===l?W0.bind(null,e):null)}function ev(e,t){if(Eu())return null;$0(e,t,!0)}function Eb(){Vb(function(){(qe&6)!==0?Ve(Vl,Cb):Z0()})}function vd(){if(ua===0){var e=Ya;e===0&&(e=Dt,Dt<<=1,(Dt&261888)===0&&(Dt=256)),ua=e}return ua}function tv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:wr(e)}function Mb(e,t,l,s,r){if(t==="submit"&&l&&l.stateNode===r){var f=tv((r[sn]||null).action),p=s.submitter;p&&(t=(t=p[sn]||null)?tv(t.formAction):p.getAttribute("formAction"),t!==null&&(f=t,p=null));var b=new Mr("action","action",null,s,r);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ua!==0){var T=new FormData(r,p);Cf(l,{pending:!0,data:T,method:r.method,action:f},null,T)}}else typeof f=="function"&&(b.preventDefault(),T=new FormData(r,p),Cf(l,{pending:!0,data:T,method:r.method,action:f},f,T))},currentTarget:r}]})}}for(var yd=0;yd<Bc.length;yd++){var xd=Bc[yd],_b=xd.toLowerCase(),Tb=xd[0].toUpperCase()+xd.slice(1);Fn(_b,"on"+Tb)}Fn(Mg,"onAnimationEnd"),Fn(_g,"onAnimationIteration"),Fn(Tg,"onAnimationStart"),Fn("dblclick","onDoubleClick"),Fn("focusin","onFocus"),Fn("focusout","onBlur"),Fn($S,"onTransitionRun"),Fn(VS,"onTransitionStart"),Fn(FS,"onTransitionCancel"),Fn(Rg,"onTransitionEnd"),Es("onMouseEnter",["mouseout","mouseover"]),Es("onMouseLeave",["mouseout","mouseover"]),Es("onPointerEnter",["pointerout","pointerover"]),Es("onPointerLeave",["pointerout","pointerover"]),Ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ua("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mo="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(" "),Rb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mo));function nv(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],r=s.event;s=s.listeners;e:{var f=void 0;if(t)for(var p=s.length-1;0<=p;p--){var b=s[p],T=b.instance,B=b.currentTarget;if(b=b.listener,T!==f&&r.isPropagationStopped())break e;f=b,r.currentTarget=B;try{f(r)}catch(I){Rr(I)}r.currentTarget=null,f=T}else for(p=0;p<s.length;p++){if(b=s[p],T=b.instance,B=b.currentTarget,b=b.listener,T!==f&&r.isPropagationStopped())break e;f=b,r.currentTarget=B;try{f(r)}catch(I){Rr(I)}r.currentTarget=null,f=T}}}}function Ae(e,t){var l=t[km];l===void 0&&(l=t[km]=new Set);var s=e+"__bubble";l.has(s)||(lv(t,e,2,!1),l.add(s))}function Sd(e,t,l){var s=0;t&&(s|=4),lv(l,e,s,t)}var _u="_reactListening"+Math.random().toString(36).slice(2);function bd(e){if(!e[_u]){e[_u]=!0,qm.forEach(function(l){l!=="selectionchange"&&(Rb.has(l)||Sd(l,!1,e),Sd(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_u]||(t[_u]=!0,Sd("selectionchange",!1,t))}}function lv(e,t,l,s){switch(Yv(t)){case 2:var r=j2;break;case 8:r=w2;break;default:r=kd}l=r.bind(null,t,l,e),r=void 0,!_c||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,l,{capture:!0,passive:r}):e.addEventListener(t,l,!0):r!==void 0?e.addEventListener(t,l,{passive:r}):e.addEventListener(t,l,!1)}function jd(e,t,l,s,r){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var p=s.tag;if(p===3||p===4){var b=s.stateNode.containerInfo;if(b===r)break;if(p===4)for(p=s.return;p!==null;){var T=p.tag;if((T===3||T===4)&&p.stateNode.containerInfo===r)return;p=p.return}for(;b!==null;){if(p=Ha(b),p===null)return;if(T=p.tag,T===5||T===6||T===26||T===27){s=f=p;continue e}b=b.parentNode}}s=s.return}lg(function(){var B=f,I=Ec(l),Z=[];e:{var F=Ag.get(e);if(F!==void 0){var q=Mr,ie=e;switch(e){case"keypress":if(Cr(l)===0)break e;case"keydown":case"keyup":q=mS;break;case"focusin":ie="focus",q=Oc;break;case"focusout":ie="blur",q=Oc;break;case"beforeblur":case"afterblur":q=Oc;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=ig;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=nS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=xS;break;case Mg:case _g:case Tg:q=sS;break;case Rg:q=bS;break;case"scroll":case"scrollend":q=eS;break;case"wheel":q=wS;break;case"copy":case"cut":case"paste":q=oS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=rg;break;case"submit":q=vS;break;case"toggle":case"beforetoggle":q=CS}var he=(t&4)!==0,_e=!he&&(e==="scroll"||e==="scrollend"),k=he?F!==null?F+"Capture":null:F;he=[];for(var H=B,G;H!==null;){var P=H;if(G=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||G===null||k===null||(P=Xi(H,k),P!=null&&he.push(_o(H,P,G))),_e)break;H=H.return}0<he.length&&(F=new q(F,ie,null,l,I),Z.push({event:F,listeners:he}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",F=e==="mouseout"||e==="pointerout",q&&l!==Cc&&(ie=l.relatedTarget||l.fromElement)&&(Ha(ie)||ie[ws]))break e;(F||q)&&(ie=I.window===I?I:(q=I.ownerDocument)?q.defaultView||q.parentWindow:window,F?(q=l.relatedTarget||l.toElement,F=B,q=q?Ha(q):null,q!==null&&(_e=d(q),he=q.tag,q!==_e||he!==5&&he!==27&&he!==6)&&(q=null)):(F=null,q=B),F!==q&&(he=ig,P="onMouseLeave",k="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(he=rg,P="onPointerLeave",k="onPointerEnter",H="pointer"),_e=F==null?ie:Ii(F),G=q==null?ie:Ii(q),ie=new he(P,H+"leave",F,l,I),ie.target=_e,ie.relatedTarget=G,P=null,Ha(I)===B&&(he=new he(k,H+"enter",q,l,I),he.target=G,he.relatedTarget=_e,P=he),_e=P,he=F&&q?_(F,q,Ab):null,F!==null&&av(Z,ie,F,he,!1),q!==null&&_e!==null&&av(Z,_e,q,he,!0)))}e:{if(F=B?Ii(B):window,q=F.nodeName&&F.nodeName.toLowerCase(),q==="select"||q==="input"&&F.type==="file")var fe=pg;else if(mg(F))if(vg)fe=LS;else{fe=zS;var ze=OS}else q=F.nodeName,!q||q.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?B&&Nc(B.elementType)&&(fe=pg):fe=DS;if(fe&&(fe=fe(e,B))){gg(Z,fe,l,I);break e}ze&&ze(e,F,B)}switch(ze=B?Ii(B):window,e){case"focusin":(mg(ze)||ze.contentEditable==="true")&&(Os=ze,Vc=B,no=null);break;case"focusout":no=Vc=Os=null;break;case"mousedown":Fc=!0;break;case"contextmenu":case"mouseup":case"dragend":Fc=!1,Cg(Z,l,I);break;case"selectionchange":if(US)break;case"keydown":case"keyup":Cg(Z,l,I)}var pe;if(Dc)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else As?dg(e,l)&&(Se="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(ug&&l.locale!=="ko"&&(As||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&As&&(pe=ag()):(ql=I,Tc="value"in ql?ql.value:ql.textContent,As=!0)),ze=Tu(B,Se),0<ze.length&&(Se=new og(Se,e,null,l,I),Z.push({event:Se,listeners:ze}),pe?Se.data=pe:(pe=hg(l),pe!==null&&(Se.data=pe)))),(pe=MS?_S(e,l):TS(e,l))&&(Se=Tu(B,"onBeforeInput"),0<Se.length&&(ze=new og("onBeforeInput","beforeinput",null,l,I),Z.push({event:ze,listeners:Se}),ze.data=pe)),Mb(Z,e,B,l,I)}nv(Z,t)})}function _o(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Tu(e,t){for(var l=t+"Capture",s=[];e!==null;){var r=e,f=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||f===null||(r=Xi(e,l),r!=null&&s.unshift(_o(e,r,f)),r=Xi(e,t),r!=null&&s.push(_o(e,r,f))),e.tag===3)return s;e=e.return}return[]}function Ab(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function av(e,t,l,s,r){for(var f=t._reactName,p=[];l!==null&&l!==s;){var b=l,T=b.alternate,B=b.stateNode;if(b=b.tag,T!==null&&T===s)break;b!==5&&b!==26&&b!==27||B===null||(T=B,r?(B=Xi(l,f),B!=null&&p.unshift(_o(l,B,T))):r||(B=Xi(l,f),B!=null&&p.push(_o(l,B,T)))),l=l.return}p.length!==0&&e.push({event:t,listeners:p})}var Ob=/\r\n?/g,zb=/\u0000|\uFFFD/g;function sv(e){return(typeof e=="string"?e:""+e).replace(Ob,`
49
+ `).replace(zb,"")}function iv(e,t){return t=sv(t),sv(e)===t}function Ze(e,t,l,s,r,f){switch(l){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||_s(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&_s(e,""+s);else return;break;case"className":jr(e,"class",s);break;case"tabIndex":jr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":jr(e,l,s);break;case"style":tg(e,s,f);return;case"data":if(t!=="object"){jr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=wr(s),e.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="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 f=="function"&&(l==="formAction"?(t!=="input"&&Ze(e,t,"name",r.name,r,null),Ze(e,t,"formEncType",r.formEncType,r,null),Ze(e,t,"formMethod",r.formMethod,r,null),Ze(e,t,"formTarget",r.formTarget,r,null)):(Ze(e,t,"encType",r.encType,r,null),Ze(e,t,"method",r.method,r,null),Ze(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=wr(s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=Wn);return;case"onScroll":s!=null&&Ae("scroll",e);return;case"onScrollEnd":s!=null&&Ae("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(l=s.__html,l!=null){if(r.children!=null)throw Error(o(60));(f!=null?f.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}l=wr(s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":s===!0?e.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(l,s):e.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(l):e.setAttribute(l,s);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),br(e,"popover",s);break;case"xlinkActuate":yl(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":yl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":yl(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":yl(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":yl(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":yl(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":yl(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":yl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":yl(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":br(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=J1.get(l)||l,br(e,l,s);else return}Be=!0}function wd(e,t,l,s,r,f){switch(l){case"style":tg(e,s,f);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(l=s.__html,l!=null){if(r.children!=null)throw Error(o(60));(f!=null?f.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof s=="string")_s(e,s);else if(typeof s=="number"||typeof s=="bigint")_s(e,""+s);else return;break;case"onScroll":s!=null&&Ae("scroll",e);return;case"onScrollEnd":s!=null&&Ae("scrollend",e);return;case"onClick":s!=null&&(e.onclick=Wn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Qm.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(r=l.endsWith("Capture"),f=l.slice(2,r?l.length-7:void 0),t=e[sn]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(f,t,r),typeof s=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(f,s,r);break e}Be=!0,l in e?e[l]=s:s===!0?e.setAttribute(l,""):br(e,l,s)}return}Be=!0}function Ft(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 s=!1,r=!1,f;for(f in l)if(l.hasOwnProperty(f)){var p=l[f];if(p!=null)switch(f){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ze(e,t,f,p,l,null)}}r&&Ze(e,t,"srcSet",l.srcSet,l,null),s&&Ze(e,t,"src",l.src,l,null);return;case"input":Ae("invalid",e);var b=f=p=r=null,T=null,B=null;for(s in l)if(l.hasOwnProperty(s)){var I=l[s];if(I!=null)switch(s){case"name":r=I;break;case"type":p=I;break;case"checked":T=I;break;case"defaultChecked":B=I;break;case"value":f=I;break;case"defaultValue":b=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(137,t));break;default:Ze(e,t,s,I,l,null)}}Zm(e,f,b,T,B,p,r,!1);return;case"select":Ae("invalid",e),s=p=f=null;for(r in l)if(l.hasOwnProperty(r)&&(b=l[r],b!=null))switch(r){case"value":f=b;break;case"defaultValue":p=b;break;case"multiple":s=b;default:Ze(e,t,r,b,l,null)}t=f,l=p,e.multiple=!!s,t!=null?Ms(e,!!s,t,!1):l!=null&&Ms(e,!!s,l,!0);return;case"textarea":Ae("invalid",e),f=r=s=null;for(p in l)if(l.hasOwnProperty(p)&&(b=l[p],b!=null))switch(p){case"value":s=b;break;case"defaultValue":r=b;break;case"children":f=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:Ze(e,t,p,b,l,null)}Wm(e,s,r,f);return;case"option":for(T in l)if(l.hasOwnProperty(T)&&(s=l[T],s!=null))switch(T){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ze(e,t,T,s,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(s=0;s<Mo.length;s++)Ae(Mo[s],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)&&(s=l[B],s!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ze(e,t,B,s,l,null)}return;default:if(Nc(t)){for(I in l)l.hasOwnProperty(I)&&(s=l[I],s!==void 0&&wd(e,t,I,s,l,void 0));return}}for(b in l)l.hasOwnProperty(b)&&(s=l[b],s!=null&&Ze(e,t,b,s,l,null))}var Db={};function Lb(e,t,l,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,f=null,p=null,b=null,T=null,B=null,I=null;for(q in l){var Z=l[q];if(l.hasOwnProperty(q)&&Z!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":T=Z;default:s.hasOwnProperty(q)||Ze(e,t,q,null,s,Z)}}for(var F in s){var q=s[F];if(Z=l[F],s.hasOwnProperty(F)&&(q!=null||Z!=null))switch(F){case"type":q!==Z&&(Be=!0),f=q;break;case"name":q!==Z&&(Be=!0),r=q;break;case"checked":q!==Z&&(Be=!0),B=q;break;case"defaultChecked":q!==Z&&(Be=!0),I=q;break;case"value":q!==Z&&(Be=!0),p=q;break;case"defaultValue":q!==Z&&(Be=!0),b=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(137,t));break;default:q!==Z&&Ze(e,t,F,q,s,Z)}}jc(e,p,b,T,B,I,f,r);return;case"select":q=p=b=F=null;for(f in l)if(T=l[f],l.hasOwnProperty(f)&&T!=null)switch(f){case"value":break;case"multiple":q=T;default:s.hasOwnProperty(f)||Ze(e,t,f,null,s,T)}for(r in s)if(f=s[r],T=l[r],s.hasOwnProperty(r)&&(f!=null||T!=null))switch(r){case"value":f!==T&&(Be=!0),F=f;break;case"defaultValue":f!==T&&(Be=!0),b=f;break;case"multiple":f!==T&&(Be=!0),p=f;default:f!==T&&Ze(e,t,r,f,s,T)}t=b,l=p,s=q,F!=null?Ms(e,!!l,F,!1):!!s!=!!l&&(t!=null?Ms(e,!!l,t,!0):Ms(e,!!l,l?[]:"",!1));return;case"textarea":q=F=null;for(b in l)if(r=l[b],l.hasOwnProperty(b)&&r!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ze(e,t,b,null,s,r)}for(p in s)if(r=s[p],f=l[p],s.hasOwnProperty(p)&&(r!=null||f!=null))switch(p){case"value":r!==f&&(Be=!0),F=r;break;case"defaultValue":r!==f&&(Be=!0),q=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==f&&Ze(e,t,p,r,s,f)}Jm(e,F,q);return;case"option":for(var ie in l)if(F=l[ie],l.hasOwnProperty(ie)&&F!=null&&!s.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Ze(e,t,ie,null,s,F)}for(T in s)if(F=s[T],q=l[T],s.hasOwnProperty(T)&&F!==q&&(F!=null||q!=null))switch(T){case"selected":F!==q&&(Be=!0),e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:Ze(e,t,T,F,s,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 he in l)F=l[he],l.hasOwnProperty(he)&&F!=null&&!s.hasOwnProperty(he)&&Ze(e,t,he,null,s,F);for(B in s)if(F=s[B],q=l[B],s.hasOwnProperty(B)&&F!==q&&(F!=null||q!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(o(137,t));break;default:Ze(e,t,B,F,s,q)}return;default:if(Nc(t)){for(var _e in l)F=l[_e],l.hasOwnProperty(_e)&&F!==void 0&&!s.hasOwnProperty(_e)&&wd(e,t,_e,void 0,s,F);for(I in s)F=s[I],q=l[I],!s.hasOwnProperty(I)||F===q||F===void 0&&q===void 0||wd(e,t,I,F,s,q);return}}for(var k in l)F=l[k],l.hasOwnProperty(k)&&F!=null&&!s.hasOwnProperty(k)&&Ze(e,t,k,null,s,F);for(Z in s)F=s[Z],q=l[Z],!s.hasOwnProperty(Z)||F===q||F==null&&q==null||Ze(e,t,Z,F,s,q)}function ov(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var r=l[s],f=r.transferSize,p=r.initiatorType,b=r.duration;if(f&&b&&ov(p)){for(p=0,b=r.responseEnd,s+=1;s<l.length;s++){var T=l[s],B=T.startTime;if(B>b)break;var I=T.transferSize,Z=T.initiatorType;I&&ov(Z)&&(T=T.responseEnd,p+=I*(T<b?1:(b-B)/(T-B)))}if(--s,t+=8*(f+p)/(r.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 Nd=null,Cd=null;function To(e){return e.nodeType===9?e:e.ownerDocument}function rv(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 uv(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 cv(e,t,l,s){return l=To(l).createElement(e),l[Lt]=s,l[sn]=t,Ft(l,e,t),_t(l),l}function Ed(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 Md=null;function Ub(){var e=window.event;return e&&e.type==="popstate"?e===Md?!1:(Md=e,!0):(Md=null,!1)}var _d=typeof setTimeout=="function"?setTimeout:void 0,$b=typeof clearTimeout=="function"?clearTimeout:void 0,fv=typeof Promise=="function"?Promise:void 0,dv=typeof requestAnimationFrame=="function"?requestAnimationFrame:_d,Vb=typeof queueMicrotask=="function"?queueMicrotask:typeof fv<"u"?function(e){return fv.resolve(null).then(e).catch(Fb)}:_d;function Fb(e){setTimeout(function(){throw e})}function ca(e){return e==="head"}function hv(e,t){var l=t,s=0;do{var r=l.nextSibling;if(e.removeChild(l),r&&r.nodeType===8)if(l=r.data,l==="/$"||l==="/&"){if(s===0){e.removeChild(r),fi(t);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")Hd(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Hd(l);for(var f=l.firstChild;f;){var p=f.nextSibling,b=f.nodeName;f[Yi]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&f.rel.toLowerCase()==="stylesheet"||l.removeChild(f),f=p}}else l==="body"&&Hd(e.ownerDocument.body);l=r}while(l);fi(t)}function mv(e,t){var l=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=s}while(l)}function gv(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 s=1;else for(var r=s=0;r<t.length;r++){var f=t[r];0<f.width&&0<f.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function pv(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 kb(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 Td(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return kb(t,l,e)}function Bb(e){return e.documentElement.clientHeight}function Gb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function qb(e,t,l,s,r,f,p,b,T){var B=t.nodeType===9?t:t.ownerDocument;try{var I=B.startViewTransition({update:function(){var F=B.defaultView,q=F.navigation&&F.navigation.transition,ie=B.fonts.status;s();var he=[];if(ie==="loaded"&&(Bb(B),B.fonts.status==="loading"&&he.push(B.fonts.ready)),ie=he.length,e!==null)for(var _e=e.suspenseyImages,k=0,H=0;H<_e.length;H++){var G=_e[H];if(!G.complete){var P=G.getBoundingClientRect();if(0<P.bottom&&0<P.right&&P.top<F.innerHeight&&P.left<F.innerWidth){if(k+=Uv(G),k>Ou){he.length=ie;break}G=new Promise(Gb.bind(G)),he.push(G)}}}if(0<he.length)return F=Promise.race([Promise.all(he),new Promise(function(fe){return setTimeout(fe,500)})]).then(r,r),(q?Promise.allSettled([q.finished,F]):F).then(f,f);if(r(),q)return q.finished.then(f,f);f()},types:l});B.__reactViewTransition=I;var Z=[];return I.ready.then(function(){for(var F=B.documentElement.getAnimations({subtree:!0}),q=0;q<F.length;q++){var ie=F[q],he=ie.effect,_e=he.pseudoElement;if(_e!=null&&_e.startsWith("::view-transition")){Z.push(ie),ie=he.getKeyframes();for(var k=_e=void 0,H=!0,G=0;G<ie.length;G++){var P=ie[G],fe=P.width;if(_e===void 0)_e=fe;else if(_e!==fe){H=!1;break}if(fe=P.height,k===void 0)k=fe;else if(k!==fe){H=!1;break}delete P.width,delete P.height,P.transform==="none"&&delete P.transform}H&&_e!==void 0&&k!==void 0&&(he.setKeyframes(ie),H=getComputedStyle(he.target,he.pseudoElement),H.width!==_e||H.height!==k)&&(H=ie[0],H.width=_e,H.height=k,H=ie[ie.length-1],H.width=_e,H.height=k,he.setKeyframes(ie))}}p()},function(F){B.__reactViewTransition===I&&(B.__reactViewTransition=null);try{if(typeof F=="object"&&F!==null)switch(F.name){case"InvalidStateError":(F.message==="View transition was skipped because document visibility state is hidden."||F.message==="Skipping view transition because document visibility state has become hidden."||F.message==="Skipping view transition because viewport size changed."||F.message==="Transition was aborted because of invalid state")&&(F=null)}F!==null&&T(F)}finally{s(),r(),p()}}),I.finished.finally(function(){for(var F=0;F<Z.length;F++)Z[F].cancel();B.__reactViewTransition===I&&(B.__reactViewTransition=null),b()}),I}catch{return s(),r(),p(),null}}function ls(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}ls.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:R({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},ls.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),s=[],r=0;r<l.length;r++){var f=l[r].effect;f!==null&&f.target===e&&f.pseudoElement===t&&s.push(l[r])}return s},ls.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function vv(e){return{name:e,group:new ls("group",e),imagePair:new ls("image-pair",e),old:new ls("old",e),new:new ls("new",e)}}function jn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}jn.prototype.addEventListener=function(e,t,l){var s=null,r=null;if(!(l!=null&&typeof l!="boolean"&&(s=l.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var f=this._eventListeners;if(xv(f,e,t,l)===-1){var p=this,b=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(b=function(T){p.removeEventListener(e,t,l),typeof t=="function"?t.call(this,T):t.handleEvent(T)}),s!==null&&(r=p.removeEventListener.bind(p,e,t,l),s.addEventListener("abort",r,{once:!0}),r=s.removeEventListener.bind(s,"abort",r)),s=si(l),f.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:b,cleanup:r}),v(this._fragmentFiber.child,!1,Qb,e,b,s)}this._eventListeners=f}};function Qb(e,t,l,s){return M(e).addEventListener(t,l,s),!1}jn.prototype.removeEventListener=function(e,t,l){var s=this._eventListeners;if(s!==null&&(t=xv(s,e,t,l),t!==-1)){var r=s[t];l=r.attachedListener;var f=r.cleanup;r=si(r.optionsOrUseCapture),v(this._fragmentFiber.child,!1,Yb,e,l,r),s.splice(t,1),f!==null&&f()}};function Yb(e,t,l,s){return M(e).removeEventListener(t,l,s),!1}function si(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function yv(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function xv(e,t,l,s){if(e.length===0)return-1;s=yv(s);for(var r=0;r<e.length;r++){var f=e[r];if(f.type===t&&f.listener===l&&yv(f.optionsOrUseCapture)===s)return r}return-1}jn.prototype.dispatchEvent=function(e){var t=S(this._fragmentFiber);if(t===null)return!0;t=M(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var r=0;r<l.length;r++){var f=l[r];s.addEventListener(f.type,f.attachedListener,si(f.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),l)for(r=0;r<l.length;r++)f=l[r],s.removeEventListener(f.type,f.attachedListener,si(f.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)},jn.prototype.focus=function(e){v(this._fragmentFiber.child,!0,Sv,e,void 0,void 0)};function Sv(e,t){return e.tag===6?!1:(e=M(e),a2(e,t))}jn.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,Rd,t,void 0,void 0);for(var l=t.length-1;0<=l&&!Sv(t[l],e);l--);};function Rd(e,t){return t.push(e),!1}jn.prototype.blur=function(){var e=S(this._fragmentFiber);e!==null&&(e=M(e),e=To(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,Ib,e,void 0,void 0))};function Ib(e,t){return e.tag===6?!1:(e=M(e),e===t||e.contains(t)?(t.blur(),!0):!1)}jn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,Xb,e,void 0,void 0)};function Xb(e,t){return e.tag===6||(e=M(e),t.observe(e)),!1}jn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,Kb,e,void 0,void 0);for(var l=t=0;l<Qn.length;l++){var s=Qn[l];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Qn[t++]=s}Qn.length=t}};function Kb(e,t){return e.tag===6||(e=M(e),t.unobserve(e)),!1}var Qn=[],Ad=!1;function Pb(e,t,l){Qn.push({fragmentInstance:e,observer:t,instance:l}),Ad||(Ad=!0,s2(function(){Ad=!1;var s=Qn;Qn=[];for(var r=0;r<s.length;r++){var f=s[r];f.observer.unobserve(f.instance)}}))}jn.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,Zb,e,void 0,void 0),e};function Zb(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}jn.prototype.getRootNode=function(e){var t=S(this._fragmentFiber);return t===null?this:M(t).getRootNode(e)},jn.prototype.compareDocumentPosition=function(e){var t=S(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,Rd,l,void 0,void 0);var s=M(t);if(l.length===0){if(l=s,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 r=s=l.compareDocumentPosition(e);return l===e?r=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=j(t)[1],l===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=M(l).compareDocumentPosition(e),r=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),r|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=M(l[0]),r=M(l[l.length-1]);var f=w(this._fragmentFiber)?t.parentElement:s;if(f==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=f.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,f=f.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var p=t.compareDocumentPosition(e),b=r.compareDocumentPosition(e),T=p&Node.DOCUMENT_POSITION_CONTAINED_BY||b&Node.DOCUMENT_POSITION_CONTAINED_BY;return b=s&&f&&p&Node.DOCUMENT_POSITION_FOLLOWING&&b&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||f&&r===e||T||b?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!f&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:p,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Jb(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Jb(e,t,l,s,r){var f=Ha(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!f)e:{for(;f!==null;){if(f.tag===7&&(f===t||f.alternate===t)){l=!0;break e}f=f.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(f===null)return f=r.ownerDocument,r===f||r===f.documentElement||r===f.body;e:{for(f=t,t=S(t);f!==null;){if(!(f.tag!==5&&f.tag!==3&&f.tag!==27||f!==t&&f.alternate!==t)){f=!0;break e}f=f.return}f=!1}return f}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!f)&&!(t=f===l)&&(t=_(l,f,z),t===null?t=!1:(v(t,!0,D,f,l),f=A,A=null,t=f!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!f)&&!(t=f===s)&&(t=_(s,f,z),t===null?t=!1:(v(t,!0,O,f,s),f=A,C=A=null,t=f!==null)),t):!1}function bv(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)}jn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(o(566));var t=[];v(this._fragmentFiber.child,!1,Rd,t,void 0,void 0);var l=e!==!1;if(t.length===0){var s=j(this._fragmentFiber);if(s=l?s[1]||s[0]||S(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=M(s),bv(e,l);return}if(s=M(s),s.nodeType!==9){if(s.nodeType===11){l="host"in s?s.host:null,l!==null&&l.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=l?t.length-1:0;s!==(l?-1:t.length);){var r=t[s];r.tag===6?(r=M(r),bv(r,l)):M(r).scrollIntoView(e),s+=l?-1:1}};function Wb(e,t){return e=M(e),jv(e,t),!1}function jv(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function wv(e,t){var l=t._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var r=l[s];e.addEventListener(r.type,r.attachedListener,si(r.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(f){for(var p=0,b=0;b<Qn.length;b++){var T=Qn[b];(T.fragmentInstance!==t||T.observer!==f||T.instance!==e)&&(Qn[p++]=T)}Qn.length=p,f.observe(e)}),jv(e,t))}function e2(e,t){var l=t._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var r=l[s];e.removeEventListener(r.type,r.attachedListener,si(r.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(f){typeof f.rootMargin=="string"?Pb(t,f,e):f.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Od(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":Od(l),Sr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function t2(e,t,l,s){for(;e.nodeType===1;){var r=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Yi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=zn(e.nextSibling),e===null)break}return null}function n2(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=zn(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=zn(e.nextSibling),e===null))return null;return e}function zd(e){return e.data==="$?"||e.data==="$~"}function Dd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function l2(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var s=function(){t(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function zn(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 Ld=null;function Cv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return zn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Ev(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 a2(e,t){function l(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return s}function s2(e){dv(function(){dv(function(t){return e(t)})})}function Mv(e,t,l){switch(t=To(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function _v(e,t,l){for(var s in l){var r=l[s];l.hasOwnProperty(s)&&r!=null&&Ze(e,t,s,null,Db,r)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Wn&&(e.onclick=null),Sr(e)}function Hd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Sr(e)}var Dn=new Map,Tv=new Set;function Ro(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 Al=ge.d;ge.d={f:i2,r:o2,D:r2,C:u2,L:c2,m:f2,X:h2,S:d2,M:m2};function i2(){var e=Al.f(),t=wu();return e||t}function o2(e){var t=Ns(e);t!==null&&t.tag===5&&t.type==="form"?Ap(t):Al.r(e)}var ii=typeof document>"u"?null:document;function Rv(e,t,l){var s=ii;if(s&&typeof t=="string"&&t){var r=En(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof l=="string"&&(r+='[crossorigin="'+l+'"]'),Tv.has(r)||(Tv.add(r),e={rel:e,crossOrigin:l,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Ft(t,"link",e),_t(t),s.head.appendChild(t)))}}function r2(e){Al.D(e),Rv("dns-prefetch",e,null)}function u2(e,t){Al.C(e,t),Rv("preconnect",e,t)}function c2(e,t,l){Al.L(e,t,l);var s=ii;if(s&&e&&t){var r='link[rel="preload"][as="'+En(t)+'"]';t==="image"&&l&&l.imageSrcSet?(r+='[imagesrcset="'+En(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(r+='[imagesizes="'+En(l.imageSizes)+'"]')):r+='[href="'+En(e)+'"]';var f=r;switch(t){case"style":f=oi(e);break;case"script":f=ri(e)}if(!(Dn.has(f)||(e=R({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Dn.set(f,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Ao(f))||t==="script"&&s.querySelector(Oo(f))))){var p=s.createElement("link");Ft(p,"link",e),t==="style"&&(p[xr]=!0,p.onload=p.onerror=function(){Gm(p)}),_t(p),s.head.appendChild(p)}}}function f2(e,t){Al.m(e,t);var l=ii;if(l&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+En(s)+'"][href="'+En(e)+'"]',f=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=ri(e)}if(!Dn.has(f)&&(e=R({rel:"modulepreload",href:e},t),Dn.set(f,e),l.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Oo(f)))return}s=l.createElement("link"),Ft(s,"link",e),_t(s),l.head.appendChild(s)}}}function d2(e,t,l){Al.S(e,t,l);var s=ii;if(s&&e){var r=Cs(s).hoistableStyles,f=oi(e);t=t||"default";var p=r.get(f);if(!p){var b={loading:0,preload:null};if(p=s.querySelector(Ao(f)))b.loading=5;else{e=R({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Dn.get(f))&&Ud(e,l);var T=p=s.createElement("link");_t(T),Ft(T,"link",e),T._p=new Promise(function(B,I){T.onload=B,T.onerror=I}),T.addEventListener("load",function(){b.loading|=1}),T.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Ru(p,t,s)}p={type:"stylesheet",instance:p,count:1,state:b},r.set(f,p)}}}function h2(e,t){Al.X(e,t);var l=ii;if(l&&e){var s=Cs(l).hoistableScripts,r=ri(e),f=s.get(r);f||(f=l.querySelector(Oo(r)),f||(e=R({src:e,async:!0},t),(t=Dn.get(r))&&$d(e,t),f=l.createElement("script"),_t(f),Ft(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(r,f))}}function m2(e,t){Al.M(e,t);var l=ii;if(l&&e){var s=Cs(l).hoistableScripts,r=ri(e),f=s.get(r);f||(f=l.querySelector(Oo(r)),f||(e=R({src:e,async:!0,type:"module"},t),(t=Dn.get(r))&&$d(e,t),f=l.createElement("script"),_t(f),Ft(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(r,f))}}function Av(e,t,l,s){var r=(r=Pt.current)?Ro(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=oi(l.href),t=Cs(r).hoistableStyles,s=t.get(l),s||(s={type:"style",instance:null,count:0,state:null},t.set(l,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=oi(l.href);var f=Cs(r).hoistableStyles,p=f.get(e);if(p||(r=r.ownerDocument||r,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,p),(f=r.querySelector(Ao(e)))?f._p||(p.instance=f,p.state.loading=5):(f=Dn.get(e),f||(f={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Dn.set(e,f)),g2(r,e,f,p.state))),t&&s===null)throw Error(o(528,""));return p}if(t&&s!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=ri(l),t=Cs(r).hoistableScripts,s=t.get(l),s||(s={type:"script",instance:null,count:0,state:null},t.set(l,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function oi(e){return'href="'+En(e)+'"'}function Ao(e){return'link[rel="stylesheet"]['+e+"]"}function Ov(e){return R({},e,{"data-precedence":e.precedence,precedence:null})}function g2(e,t,l,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[xr]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[xr]=!0,t.onload=t.onerror=Gm.bind(null,t),Ft(t,"link",l),_t(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function ri(e){return'[src="'+En(e)+'"]'}function Oo(e){return"script[async]"+e}function zv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+En(l.href)+'"]');if(s)return t.instance=s,_t(s),s;var r=R({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),_t(s),Ft(s,"style",r),Ru(s,l.precedence,e),t.instance=s;case"stylesheet":r=oi(l.href);var f=e.querySelector(Ao(r));if(f)return t.state.loading|=4,t.instance=f,_t(f),f;s=Ov(l),(r=Dn.get(r))&&Ud(s,r),f=(e.ownerDocument||e).createElement("link"),_t(f);var p=f;return p._p=new Promise(function(b,T){p.onload=b,p.onerror=T}),Ft(f,"link",s),t.state.loading|=4,Ru(f,l.precedence,e),t.instance=f;case"script":return f=ri(l.src),(r=e.querySelector(Oo(f)))?(t.instance=r,_t(r),r):(s=l,(r=Dn.get(f))&&(s=R({},l),$d(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),_t(r),Ft(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Ru(s,l.precedence,e));return t.instance}function Ru(e,t,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,f=r,p=0;p<s.length;p++){var b=s[p];if(b.dataset.precedence===t)f=b;else if(f!==r)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Ud(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $d(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Au=null;function Dv(e,t,l){if(Au===null){var s=new Map,r=Au=new Map;r.set(l,s)}else r=Au,s=r.get(l),s||(s=new Map,r.set(l,s));if(s.has(e))return s;for(s.set(e,null),l=l.getElementsByTagName(e),r=0;r<l.length;r++){var f=l[r];if(!(f[Yi]||f[Lt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var p=f.getAttribute(t)||"";p=e+p;var b=s.get(p);b?b.push(f):s.set(p,[f])}}return s}function Vd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function p2(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 Lv(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Hv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Uv(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function $v(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Uv(t),e.suspenseyImages.push(t)),e=x2.bind(e),t.decode().then(e,e))}function v2(e,t,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var r=oi(s.href),f=t.querySelector(Ao(r));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zo.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=f,_t(f);return}f=t.ownerDocument||t,s=Ov(s),(r=Dn.get(r))&&Ud(s,r),f=f.createElement("link"),_t(f);var p=f;p._p=new Promise(function(b,T){p.onload=b,p.onerror=T}),Ft(f,"link",s),l.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=zo.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ou=0;function y2(e,t){return e.stylesheets&&e.count===0&&Du(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&Du(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Ou===0&&(Ou=62500*Hb());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Du(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Ou?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Vv(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Du(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function zo(){this.count--,Vv(this)}function x2(){this.imgCount--,Vv(this)}var zu=null;function Du(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zu=new Map,t.forEach(S2,e),zu=null,zo.call(e))}function S2(e,t){if(!(t.state.loading&4)){var l=zu.get(e);if(l)var s=l.get(null);else{l=new Map,zu.set(e,l);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<r.length;f++){var p=r[f];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(l.set(p.dataset.precedence,p),s=p)}s&&l.set(null,s)}r=t.instance,p=r.getAttribute("data-precedence"),f=l.get(p)||s,f===s&&l.set(null,r),l.set(p,r),this.count++,s=zo.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),f?f.parentNode.insertBefore(r,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ui={$$typeof:ee,Provider:null,Consumer:null,_currentValue:rt,_currentValue2:rt,_threadCount:0};function b2(e,t,l,s,r,f,p,b,T){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=Qi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qi(0),this.hiddenUpdates=Qi(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.transitionTypes=null,this.incompleteTransitions=new Map}function Fv(e,t,l,s,r,f,p,b,T,B,I,Z){return e=new b2(e,t,l,p,T,B,I,Z,b),t=1,f===!0&&(t|=24),f=on(3,null,null,t),e.current=f,f.stateNode=e,t=Wc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:l,cache:t},lf(f),e}function kv(e){return e?(e=Ls,e):Ls}function Bv(e,t,l,s,r,f){r=kv(r),s.context===null?s.context=r:s.pendingContext=r,s=Jl(t),s.payload={element:l},f=f===void 0?null:f,f!==null&&(s.callback=f),l=Wl(e,s,t),l!==null&&(fn(l,e,t),uo(l,e,t))}function Gv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Fd(e,t){Gv(e,t),(e=e.alternate)&&Gv(e,t)}function qv(e){if(e.tag===13||e.tag===31){var t=Fa(e,67108864);t!==null&&fn(t,e,67108864),Fd(e,67108864)}}function Qv(e){if(e.tag===13||e.tag===31){var t=bn();t=xc(t);var l=Fa(e,t);l!==null&&fn(l,e,t),Fd(e,t)}}var ci=!0;function j2(e,t,l,s){var r=ue.T;ue.T=null;var f=ge.p;try{ge.p=2,kd(e,t,l,s)}finally{ge.p=f,ue.T=r}}function w2(e,t,l,s){var r=ue.T;ue.T=null;var f=ge.p;try{ge.p=8,kd(e,t,l,s)}finally{ge.p=f,ue.T=r}}function kd(e,t,l,s){if(ci){var r=Bd(s);if(r===null)jd(e,t,s,Lu,l),Iv(e,s);else if(C2(r,e,t,l,s))s.stopPropagation();else if(Iv(e,s),t&4&&-1<N2.indexOf(e)){for(;r!==null;){var f=Ns(r);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=pl(f.pendingLanes);if(p!==0){var b=f;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var T=1<<31-Yt(p);b.entanglements[1]|=T,p&=~T}ul(f),(qe&6)===0&&(Su=We()+500,Eo(0))}}break;case 31:case 13:b=Fa(f,2),b!==null&&fn(b,f,2),wu(),Fd(f,2)}if(f=Bd(s),f===null&&jd(e,t,s,Lu,l),f===r)break;r=f}r!==null&&s.stopPropagation()}else jd(e,t,s,null,l)}}function Bd(e){return e=Ec(e),Gd(e)}var Lu=null;function Gd(e){if(Lu=null,e=Ha(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 Lu=e,null}function Yv(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(Jn()){case Vl:return 2;case Da:return 8;case La:case hr:return 32;case Bi:return 268435456;default:return 32}default:return 32}}var qd=!1,fa=null,da=null,ha=null,Do=new Map,Lo=new Map,ma=[],N2="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 Iv(e,t){switch(e){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":da=null;break;case"mouseover":case"mouseout":ha=null;break;case"pointerover":case"pointerout":Do.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lo.delete(t.pointerId)}}function Ho(e,t,l,s,r,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:l,eventSystemFlags:s,nativeEvent:f,targetContainers:[r]},t!==null&&(t=Ns(t),t!==null&&qv(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function C2(e,t,l,s,r){switch(t){case"focusin":return fa=Ho(fa,e,t,l,s,r),!0;case"dragenter":return da=Ho(da,e,t,l,s,r),!0;case"mouseover":return ha=Ho(ha,e,t,l,s,r),!0;case"pointerover":var f=r.pointerId;return Do.set(f,Ho(Do.get(f)||null,e,t,l,s,r)),!0;case"gotpointercapture":return f=r.pointerId,Lo.set(f,Ho(Lo.get(f)||null,e,t,l,s,r)),!0}return!1}function Xv(e){var t=Ha(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,Fm(e.priority,function(){Qv(l)});return}}else if(t===31){if(t=m(l),t!==null){e.blockedOn=t,Fm(e.priority,function(){Qv(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 Hu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Bd(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);Cc=s,l.target.dispatchEvent(s),Cc=null}else return t=Ns(l),t!==null&&qv(t),e.blockedOn=l,!1;t.shift()}return!0}function Kv(e,t,l){Hu(e)&&l.delete(t)}function E2(){qd=!1,fa!==null&&Hu(fa)&&(fa=null),da!==null&&Hu(da)&&(da=null),ha!==null&&Hu(ha)&&(ha=null),Do.forEach(Kv),Lo.forEach(Kv)}function Uu(e,t){e.blockedOn===t&&(e.blockedOn=null,qd||(qd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,E2)))}var $u=null;function Pv(e){$u!==e&&($u=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){$u===e&&($u=null);for(var t=0;t<e.length;t+=3){var l=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(Gd(s||l)===null)continue;break}var f=Ns(l);f!==null&&(e.splice(t,3),t-=3,Cf(f,{pending:!0,data:r,method:l.method,action:s},s,r))}}))}function fi(e){function t(T){return Uu(T,e)}fa!==null&&Uu(fa,e),da!==null&&Uu(da,e),ha!==null&&Uu(ha,e),Do.forEach(t),Lo.forEach(t);for(var l=0;l<ma.length;l++){var s=ma[l];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ma.length&&(l=ma[0],l.blockedOn===null);)Xv(l),l.blockedOn===null&&ma.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var r=l[s],f=l[s+1],p=r[sn]||null;if(typeof f=="function")p||Pv(l);else if(p){var b=null;if(f&&f.hasAttribute("formAction")){if(r=f,p=f[sn]||null)b=p.formAction;else if(Gd(r)!==null)continue}else b=p.action;typeof b=="function"?l[s+1]=b:(l.splice(s,3),s-=3),Pv(l)}}}function Zv(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return r=p})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Qd(e){this._internalRoot=e}Vu.prototype.render=Qd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,s=bn();Bv(l,s,e,t,null,null)},Vu.prototype.unmount=Qd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bv(e.current,2,null,e,null,null),wu(),t[ws]=null}};function Vu(e){this._internalRoot=e}Vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vm();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ma.length&&t!==0&&t<ma[l].priority;l++);ma.splice(l,0,e),l===0&&Xv(e)}};var Jv=a.version;if(Jv!=="19.3.1")throw Error(o(527,Jv,"19.3.1"));ge.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=y(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var M2={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{Fl=Fu.inject(M2),Qt=Fu}catch{}}return $o.createRoot=function(e,t){if(!u(e))throw Error(o(299));var l=!1,s="",r=kp,f=Bp,p=Gp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=Fv(e,1,!1,null,null,l,s,null,r,f,p,Zv),e[ws]=t.current,bd(e),new Qd(t)},$o.hydrateRoot=function(e,t,l){if(!u(e))throw Error(o(299));var s=!1,r="",f=kp,p=Bp,b=Gp,T=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(r=l.identifierPrefix),l.onUncaughtError!==void 0&&(f=l.onUncaughtError),l.onCaughtError!==void 0&&(p=l.onCaughtError),l.onRecoverableError!==void 0&&(b=l.onRecoverableError),l.formState!==void 0&&(T=l.formState)),t=Fv(e,1,!0,t,l??null,s,r,T,f,p,b,Zv),t.context=kv(null),l=t.current,s=bn(),s=xc(s),r=Jl(s),r.callback=null,Wl(l,r,s),l=s,t.current.lanes=l,Gl(t,l),ul(t),e[ws]=t.current,bd(e),new Vu(t)},$o.version="19.3.1",$o}var uy;function F2(){if(uy)return Kd.exports;uy=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(a){console.error(a)}}return n(),Kd.exports=V2(),Kd.exports}var k2=F2();const bx=E.createContext(void 0),jx=n=>{const a=E.useContext(bx);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},B2=({client:n,children:a})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),c.jsx(bx.Provider,{value:n,children:a})),G2={setTimeout:(n,a)=>setTimeout(n,a),clearTimeout:n=>clearTimeout(n),setInterval:(n,a)=>setInterval(n,a),clearInterval:n=>clearInterval(n)};var xa,gm,cx,q2=(cx=class{constructor(){ye(this,xa,G2);ye(this,gm,!1)}setTimeoutProvider(n){ce(this,xa,n)}setTimeout(n,a){return U(this,xa).setTimeout(n,a)}clearTimeout(n){U(this,xa).clearTimeout(n)}setInterval(n,a){return U(this,xa).setInterval(n,a)}clearInterval(n){U(this,xa).clearInterval(n)}},xa=new WeakMap,gm=new WeakMap,cx);const rs=new q2;function Q2(n){setTimeout(n,0)}const Y2=typeof window>"u"||"Deno"in globalThis;function hn(){}function I2(n,a){return typeof n=="function"?n(a):n}function wx(n){return typeof n=="number"&&n>=0&&n!==1/0}function Nx(n,a){return Math.max(n+(a||0)-Date.now(),0)}function ot(n,a){return typeof n=="function"?n(a):n}function cy(n,a){const{type:i="all",exact:o,fetchStatus:u,predicate:d,queryKey:h,stale:m}=n;if(h){if(o){if(a.queryHash!==vm(h,a.options))return!1}else if(!Vi(a.queryKey,h))return!1}if(i!=="all"){const g=a.isActive();if(i==="active"&&!g||i==="inactive"&&g)return!1}return!(typeof m=="boolean"&&a.isStale()!==m||u&&u!==a.state.fetchStatus||d&&!d(a))}function fy(n,a){const{exact:i,status:o,predicate:u,mutationKey:d}=n;if(d){if(!a.options.mutationKey)return!1;if(i){if(er(a.options.mutationKey)!==er(d))return!1}else if(!Vi(a.options.mutationKey,d))return!1}return!(o&&a.state.status!==o||u&&!u(a))}function vm(n,a){return((a==null?void 0:a.queryKeyHashFn)||er)(n)}function er(n){return JSON.stringify(n,(a,i)=>Lh(i)?Object.keys(i).sort().reduce((o,u)=>(o[u]=i[u],o),{}):i)}function Vi(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(n&&a&&typeof n=="object"&&typeof a=="object"){if(Array.isArray(n)&&Array.isArray(a)){if(a.length>n.length)return!1;for(let o=0;o<a.length;o++)if(!Vi(n[o],a[o]))return!1;return!0}const i=Object.keys(a);for(const o of i)if(!Vi(n[o],a[o]))return!1;return!0}return!1}const X2=Object.prototype.hasOwnProperty;function Cx(n,a,i=0){if(n===a)return n;if(i>500)return a;const o=dy(n)&&dy(a);if(!o&&!(Lh(n)&&Lh(a)))return a;const u=(o?n:Object.keys(n)).length,d=o?a:Object.keys(a),h=d.length,m=o?new Array(h):{};let g=0;for(let y=0;y<h;y++){const x=o?y:d[y],v=n[x],S=a[x];if(v===S){m[x]=v,(o?y<u:X2.call(n,x))&&g++;continue}if(v===null||S===null||typeof v!="object"||typeof S!="object"){m[x]=S;continue}const w=Cx(v,S,i+1);m[x]=w,w===v&&g++}return u===h&&g===u?n:m}function Wd(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const i in n)if(n[i]!==a[i])return!1;return!0}function dy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Lh(n){if(!hy(n))return!1;const a=Object.getPrototypeOf(n),i=a==null?void 0:a.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const o=i.prototype;return!(!hy(o)||!o.hasOwnProperty("isPrototypeOf")||a!==Object.prototype)}function hy(n){return Object.prototype.toString.call(n)==="[object Object]"}function K2(n){return new Promise(a=>{rs.setTimeout(a,n)})}function Hh(n,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,a):i.structuralSharing!==!1?Cx(n,a):a}function Ex(n){return n}function P2(n,a,i=0){const o=[...n,a];return i&&o.length>i?o.slice(1):o}function Z2(n,a,i=0){const o=[a,...n];return i&&o.length>i?o.slice(0,-1):o}const ym=Symbol();function Mx(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===ym?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function _x(n,a){return typeof n=="function"?n(...a):!!n}function J2(n,a,i){let o=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=a()),o||(o=!0,u.aborted?i():u.addEventListener("abort",i,{once:!0})),u)}),n}let W2=()=>Y2;const xm=()=>W2();var cr=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(){}},us,Sa,Ei,fx,ej=(fx=class extends cr{constructor(){super();ye(this,us);ye(this,Sa);ye(this,Ei);ce(this,Ei,a=>{if(typeof window<"u"&&window.addEventListener){const i=()=>a();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){U(this,Sa)||this.setEventListener(U(this,Ei))}onUnsubscribe(){var a;this.hasListeners()||((a=U(this,Sa))==null||a.call(this),ce(this,Sa,void 0))}setEventListener(a){var i;ce(this,Ei,a),(i=U(this,Sa))==null||i.call(this),ce(this,Sa,a(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(a){U(this,us)!==a&&(ce(this,us,a),this.onFocus())}onFocus(){const a=this.isFocused();this.listeners.forEach(i=>{i(a)})}isFocused(){var a;return typeof U(this,us)=="boolean"?U(this,us):((a=globalThis.document)==null?void 0:a.visibilityState)!=="hidden"}},us=new WeakMap,Sa=new WeakMap,Ei=new WeakMap,fx);const Sm=new ej,tj=Q2;function nj(){let n=[],a=0,i=m=>{m()},o=m=>{m()},u=tj;const d=m=>{a?n.push(m):u(()=>{i(m)})},h=()=>{const m=n;n=[],m.length&&u(()=>{o(()=>{m.forEach(g=>{i(g)})})})};return{batch:m=>{let g;a++;try{g=m()}finally{a--,a||h()}return g},batchCalls:m=>(...g)=>{d(()=>{m(...g)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{o=m},setScheduler:m=>{u=m}}}const Bt=nj();var Mi,ba,_i,dx,lj=(dx=class extends cr{constructor(){super();ye(this,Mi,!0);ye(this,ba);ye(this,_i);ce(this,_i,a=>{if(typeof window<"u"&&window.addEventListener){const i=()=>a(!0),o=()=>a(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",o)}}})}onSubscribe(){U(this,ba)||this.setEventListener(U(this,_i))}onUnsubscribe(){var a;this.hasListeners()||((a=U(this,ba))==null||a.call(this),ce(this,ba,void 0))}setEventListener(a){var i;ce(this,_i,a),(i=U(this,ba))==null||i.call(this),ce(this,ba,a(this.setOnline.bind(this)))}setOnline(a){U(this,Mi)!==a&&(ce(this,Mi,a),this.listeners.forEach(i=>{i(a)}))}isOnline(){return U(this,Mi)}},Mi=new WeakMap,ba=new WeakMap,_i=new WeakMap,dx);const Zu=new lj;function aj(n){return Math.min(1e3*2**n,3e4)}function Tx(n){return(n??"online")==="online"?Zu.isOnline():!0}var Uh=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Rx(n){let a=!1,i=0,o,u="pending",d,h;const m=new Promise((C,D)=>{d=C,h=D});m.catch(hn);const g=()=>u!=="pending",y=C=>{var D;if(!g()){const O=new Uh(C);N(O),(D=n.onCancel)==null||D.call(n,O)}},x=()=>{a=!0},v=()=>{a=!1},S=()=>Sm.isFocused()&&(n.networkMode==="always"||Zu.isOnline())&&n.canRun(),w=()=>Tx(n.networkMode)&&n.canRun(),j=C=>{g()||(o==null||o(),u="resolved",d(C))},N=C=>{g()||(o==null||o(),u="rejected",h(C))},M=C=>new Promise(D=>{var O;o=z=>{(g()||C())&&D(z)},(O=n.onPause)==null||O.call(n)}).then(()=>{var D;o=void 0,g()||(D=n.onContinue)==null||D.call(n)}),A=()=>{if(g())return;let C;const D=i===0?n.initialPromise:void 0;try{C=D??n.fn()}catch(O){C=Promise.reject(O)}Promise.resolve(C).then(j).catch(O=>{var K;if(g())return;const z=n.retry??(xm()?0:3),_=n.retryDelay??aj,R=typeof _=="function"?_(i,O):_,Q=z===!0||typeof z=="number"&&i<z||typeof z=="function"&&z(i,O);if(a||!Q){N(O);return}i++,(K=n.onFail)==null||K.call(n,i,O),K2(R).then(()=>S()?void 0:M(S)).then(()=>{a?N(O):A()})})};return{promise:m,status:()=>u,cancel:y,continue:()=>(o==null||o(),m),cancelRetry:x,continueRetry:v,canStart:w,start:()=>(w()?A():M(w).then(A),m)}}var cs,hx,Ax=(hx=class{constructor(){ye(this,cs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wx(this.gcTime)&&ce(this,cs,rs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(xm()?1/0:3e5))}clearGcTimeout(){U(this,cs)!==void 0&&(rs.clearTimeout(U(this,cs)),ce(this,cs,void 0))}},cs=new WeakMap,hx);function sj(n){return{onFetch:(a,i)=>{var x,v,S,w,j;const o=a.options,u=(S=(v=(x=a.fetchOptions)==null?void 0:x.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,d=((w=a.state.data)==null?void 0:w.pages)||[],h=((j=a.state.data)==null?void 0:j.pageParams)||[];let m={pages:[],pageParams:[]},g=0;const y=async()=>{let N=!1;const M=D=>{J2(D,()=>a.signal,()=>N=!0)},A=Mx(a.options,a.fetchOptions),C=async(D,O,z)=>{if(N)return Promise.reject(a.signal.reason);if(O==null&&D.pages.length)return Promise.resolve(D);const R=(()=>{const le={client:a.client,queryKey:a.queryKey,pageParam:O,direction:z?"backward":"forward",meta:a.options.meta};return M(le),le})(),Q=await A(R),{maxPages:K}=a.options,$=z?Z2:P2;return{pages:$(D.pages,Q,K),pageParams:$(D.pageParams,O,K)}};if(u&&d.length){const D=u==="backward",O=D?Ox:$h,z={pages:d,pageParams:h};m=await C(z,O(o,z),D)}else{const D=n??d.length;do{const O=g===0?h[0]===void 0?o.initialPageParam:h[0]:$h(o,m);if(g>0&&O==null)break;m=await C(m,O),g++}while(g<D)}return m};a.options.persister?a.fetchFn=()=>{var N,M;return(M=(N=a.options).persister)==null?void 0:M.call(N,y,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i)}:a.fetchFn=y}}}function $h(n,{pages:a,pageParams:i}){const o=a.length-1;return a.length>0?n.getNextPageParam(a[o],a,i[o],i):void 0}function Ox(n,{pages:a,pageParams:i}){var o;return a.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,a[0],a,i[0],i):void 0}function ij(n,a){return a?$h(n,a)!=null:!1}function oj(n,a){return!a||!n.getPreviousPageParam?!1:Ox(n,a)!=null}var Ti,fs,Ri,Ln,ds,Ct,sr,hs,Yn,Dl,mx,rj=(mx=class extends Ax{constructor(a){super();ye(this,Yn);ye(this,Ti);ye(this,fs);ye(this,Ri);ye(this,Ln);ye(this,ds);ye(this,Ct);ye(this,sr);ye(this,hs);ce(this,hs,!1),ce(this,sr,a.defaultOptions),this.setOptions(a.options),this.observers=[],ce(this,ds,a.client),ce(this,Ln,U(this,ds).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,ce(this,fs,gy(this.options)),this.state=a.state??U(this,fs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return U(this,Ti)}get promise(){var a;return(a=U(this,Ct))==null?void 0:a.promise}setOptions(a){if(this.options={...U(this,sr),...a},a!=null&&a._type&&ce(this,Ti,a._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=gy(this.options);i.data!==void 0&&(this.setState(my(i.data,i.dataUpdatedAt)),ce(this,fs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,Ln).remove(this)}setData(a,i){const o=Hh(this.state.data,a,this.options);return De(this,Yn,Dl).call(this,{data:o,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),o}setState(a){De(this,Yn,Dl).call(this,{type:"setState",state:a})}cancel(a){var o,u;const i=(o=U(this,Ct))==null?void 0:o.promise;return(u=U(this,Ct))==null||u.cancel(a),i?i.then(hn).catch(hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return U(this,fs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(a=>ot(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ym||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>ot(a.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(a=>a.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(a=0){return this.state.data===void 0?!0:a==="static"?!1:this.state.isInvalidated?!0:!Nx(this.state.dataUpdatedAt,a)}onFocus(){var a,i;(a=this.observers.find(o=>o.shouldFetchOnWindowFocus()))==null||a.refetch({cancelRefetch:!1}),(i=U(this,Ct))==null||i.continue()}onOnline(){var a,i;(a=this.observers.find(o=>o.shouldFetchOnReconnect()))==null||a.refetch({cancelRefetch:!1}),(i=U(this,Ct))==null||i.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),U(this,Ln).notify({type:"observerAdded",query:this,observer:a}))}removeObserver(a){const i=this.observers.indexOf(a);i!==-1&&(this.observers.splice(i,1),this.observers.length||(U(this,Ct)&&(U(this,hs)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?U(this,Ct).cancel({revert:!0}):U(this,Ct).cancelRetry()),this.scheduleGc()),U(this,Ln).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Yn,Dl).call(this,{type:"invalidate"})}async fetch(a,i){var y,x,v,S,w,j,N,M,A,C,D,O;if(this.state.fetchStatus!=="idle"&&((y=U(this,Ct))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(U(this,Ct))return U(this,Ct).continueRetry(),U(this,Ct).promise}if(a&&this.setOptions(a),!this.options.queryFn){const z=this.observers.find(_=>_.options.queryFn);z&&this.setOptions(z.options)}const o=new AbortController,u=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(ce(this,hs,!0),o.signal)})},d=()=>{const z=Mx(this.options,i),R=(()=>{const Q={client:U(this,ds),queryKey:this.queryKey,meta:this.meta};return u(Q),Q})();return ce(this,hs,!1),this.options.persister?this.options.persister(z,R,this):z(R)},m=(()=>{const z={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:U(this,ds),state:this.state,fetchFn:d};return u(z),z})();(x=U(this,Ti)==="infinite"?sj(this.options.pages):this.options.behavior)==null||x.onFetch(m,this),ce(this,Ri,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&De(this,Yn,Dl).call(this,{type:"fetch",meta:(S=m.fetchOptions)==null?void 0:S.meta});const g=ce(this,Ct,Rx({initialPromise:i==null?void 0:i.initialPromise,fn:m.fetchFn,onCancel:z=>{z instanceof Uh&&z.revert&&this.setState({...U(this,Ri),fetchStatus:"idle"}),o.abort()},onFail:(z,_)=>{De(this,Yn,Dl).call(this,{type:"failed",failureCount:z,error:_})},onPause:()=>{De(this,Yn,Dl).call(this,{type:"pause"})},onContinue:()=>{De(this,Yn,Dl).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const z=await g.start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(j=(w=U(this,Ln).config).onSuccess)==null||j.call(w,z,this),(M=(N=U(this,Ln).config).onSettled)==null||M.call(N,z,this.state.error,this),z}catch(z){if(z instanceof Uh){if(z.silent)return U(this,Ct).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw De(this,Yn,Dl).call(this,{type:"error",error:z}),(C=(A=U(this,Ln).config).onError)==null||C.call(A,z,this),(O=(D=U(this,Ln).config).onSettled)==null||O.call(D,this.state.data,z,this),z}finally{U(this,Ct)===g&&ce(this,Ct,void 0),this.scheduleGc()}}},Ti=new WeakMap,fs=new WeakMap,Ri=new WeakMap,Ln=new WeakMap,ds=new WeakMap,Ct=new WeakMap,sr=new WeakMap,hs=new WeakMap,Yn=new WeakSet,Dl=function(a){const i=o=>{switch(a.type){case"failed":return{...o,fetchFailureCount:a.failureCount,fetchFailureReason:a.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...zx(o.data,this.options),fetchMeta:a.meta??null};case"success":const u={...o,...my(a.data,a.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!a.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ce(this,Ri,a.manual?u:void 0),u;case"error":const d=a.error;return{...o,error:d,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...a.state}}};this.state=i(this.state),Bt.batch(()=>{this.observers.slice().forEach(o=>{o.onQueryUpdate()}),U(this,Ln).notify({query:this,type:"updated",action:a})})},mx);function zx(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Tx(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function my(n,a){return{data:n,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function gy(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,i=a!==void 0,o=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var nn,Le,ir,ln,ms,Ai,Hl,or,Oi,zi,gs,ps,ja,Di,Qe,Ko,Vh,Fh,kh,Bh,Gh,qh,Qh,Yh,gx,Dx=(gx=class extends cr{constructor(a,i){super();ye(this,Qe);ye(this,nn);ye(this,Le);ye(this,ir);ye(this,ln);ye(this,ms);ye(this,Ai);ye(this,Hl);ye(this,or);ye(this,Oi);ye(this,zi);ye(this,gs);ye(this,ps);ye(this,ja);ye(this,Di,new Set);this.options=i,ce(this,nn,a),ce(this,Hl,null),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,Le).addObserver(this),py(U(this,Le),this.options)?De(this,Qe,Ko).call(this):this.updateResult(),De(this,Qe,Gh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ih(U(this,Le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ih(U(this,Le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Qe,qh).call(this),De(this,Qe,Qh).call(this),U(this,Le).removeObserver(this)}setOptions(a){const i=this.options,o=U(this,Le);if(this.options=U(this,nn).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ot(this.options.enabled,U(this,Le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Qe,Yh).call(this),U(this,Le).setOptions(this.options),i._defaulted&&!Wd(this.options,i)&&U(this,nn).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,Le),observer:this});const u=this.hasListeners();u&&vy(U(this,Le),o,this.options,i)&&De(this,Qe,Ko).call(this),this.updateResult(),u&&(U(this,Le)!==o||ot(this.options.enabled,U(this,Le))!==ot(i.enabled,U(this,Le))||ot(this.options.staleTime,U(this,Le))!==ot(i.staleTime,U(this,Le)))&&De(this,Qe,Fh).call(this);const d=De(this,Qe,kh).call(this);u&&(U(this,Le)!==o||ot(this.options.enabled,U(this,Le))!==ot(i.enabled,U(this,Le))||d!==U(this,ja))&&De(this,Qe,Bh).call(this,d)}getOptimisticResult(a){const i=U(this,nn).getQueryCache().build(U(this,nn),a),o=this.createResult(i,a);return Wd(this.getCurrentResult(),o)||(ce(this,ln,o),ce(this,Ai,this.options),ce(this,ms,U(this,Le).state)),o}getCurrentResult(){return U(this,ln)}trackResult(a,i){return new Proxy(a,{get:(o,u)=>(this.trackProp(u),i==null||i(u),Reflect.get(o,u))})}trackProp(a){U(this,Di).add(a)}getCurrentQuery(){return U(this,Le)}refetch({...a}={}){return this.fetch({...a})}fetchOptimistic(a){const i=U(this,nn).defaultQueryOptions(a),o=U(this,nn).getQueryCache().build(U(this,nn),i);let u=()=>{},d;const h=new Promise(m=>{d=m,u=U(this,nn).getQueryCache().subscribe(g=>{g.type==="updated"&&g.query.queryHash===o.queryHash&&o.state.data!==void 0&&(u(),m(this.createResult(o,i)))})});return Promise.race([o.fetch(i).then(()=>{const m=this.createResult(o,i);return d==null||d(m),m}).finally(()=>{u()}),h])}fetch(a){return De(this,Qe,Ko).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,ln)))}createResult(a,i){var _;const o=U(this,Le),u=this.options,d=U(this,ln),h=U(this,ms),m=U(this,Ai),g=a!==o?a.state:U(this,ir),{state:y}=a;let x={...y},v=!1,S;if(i._optimisticResults){const R=this.hasListeners(),Q=!R&&py(a,i),K=R&&vy(a,o,i,u);(Q||K)&&(x={...x,...zx(y.data,a.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:w,errorUpdatedAt:j,status:N}=x;S=x.data;let M=!1;if(i.placeholderData!==void 0&&S===void 0&&N==="pending"){let R;d!=null&&d.isPlaceholderData&&i.placeholderData===(m==null?void 0:m.placeholderData)?(R=d.data,M=!0):R=typeof i.placeholderData=="function"?i.placeholderData((_=U(this,zi))==null?void 0:_.state.data,U(this,zi)):i.placeholderData,R!==void 0&&(N="success",S=Hh(d==null?void 0:d.data,R,i),v=!0)}if(i.select&&S!==void 0&&!M)if(d&&S===(h==null?void 0:h.data)&&i.select===U(this,or))S=U(this,Oi);else try{ce(this,or,i.select),S=i.select(S),S=Hh(d==null?void 0:d.data,S,i),ce(this,Oi,S),ce(this,Hl,null)}catch(R){ce(this,Hl,R)}else S===void 0&&ce(this,Hl,null);U(this,Hl)&&(w=U(this,Hl),S=U(this,Oi),j=Date.now(),N="error",v=!1);const A=x.fetchStatus==="fetching",C=N==="pending",D=N==="error",O=C&&A,z=S!==void 0;return{status:N,fetchStatus:x.fetchStatus,isPending:C,isSuccess:N==="success",isError:D,isInitialLoading:O,isLoading:O,data:S,dataUpdatedAt:x.dataUpdatedAt,error:w,errorUpdatedAt:j,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:a.isFetched(),isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:A,isRefetching:A&&!C,isLoadingError:D&&!z,isPaused:x.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:D&&z,isStale:bm(a,i),refetch:this.refetch,isEnabled:ot(i.enabled,a)!==!1}}updateResult(){const a=U(this,ln),i=this.createResult(U(this,Le),this.options);if(ce(this,ms,U(this,Le).state),ce(this,Ai,this.options),U(this,ms).data!==void 0&&ce(this,zi,U(this,Le)),Wd(i,a))return;ce(this,ln,i);const u=(()=>{if(!a)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!U(this,Di).size)return!0;const m=new Set(h??U(this,Di));return this.options.throwOnError&&m.add("error"),Object.keys(U(this,ln)).some(g=>{const y=g;return U(this,ln)[y]!==a[y]&&m.has(y)})})();Bt.batch(()=>{u&&this.listeners.forEach(d=>{d(U(this,ln))}),U(this,nn).getQueryCache().notify({query:U(this,Le),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Qe,Gh).call(this)}},nn=new WeakMap,Le=new WeakMap,ir=new WeakMap,ln=new WeakMap,ms=new WeakMap,Ai=new WeakMap,Hl=new WeakMap,or=new WeakMap,Oi=new WeakMap,zi=new WeakMap,gs=new WeakMap,ps=new WeakMap,ja=new WeakMap,Di=new WeakMap,Qe=new WeakSet,Ko=function(a){De(this,Qe,Yh).call(this);let i=U(this,Le).fetch(this.options,a);return a!=null&&a.throwOnError||(i=i.catch(hn)),i},Vh=function(a){return!xm()&&ot(this.options.enabled,U(this,Le))!==!1&&wx(a)},Fh=function(){De(this,Qe,qh).call(this);const a=ot(this.options.staleTime,U(this,Le));if(U(this,ln).isStale||!De(this,Qe,Vh).call(this,a))return;const i=Nx(U(this,ln).dataUpdatedAt,a)+1;ce(this,gs,rs.setTimeout(()=>{U(this,ln).isStale||this.updateResult()},i))},kh=function(){return ot(this.options.refetchInterval,U(this,Le))??!1},Bh=function(a){De(this,Qe,Qh).call(this),ce(this,ja,a),!(U(this,ja)===0||!De(this,Qe,Vh).call(this,U(this,ja)))&&ce(this,ps,rs.setInterval(()=>{(this.options.refetchIntervalInBackground||Sm.isFocused())&&De(this,Qe,Ko).call(this)},U(this,ja)))},Gh=function(){De(this,Qe,Fh).call(this),De(this,Qe,Bh).call(this,De(this,Qe,kh).call(this))},qh=function(){U(this,gs)!==void 0&&(rs.clearTimeout(U(this,gs)),ce(this,gs,void 0))},Qh=function(){U(this,ps)!==void 0&&(rs.clearInterval(U(this,ps)),ce(this,ps,void 0))},Yh=function(){const a=U(this,nn).getQueryCache().build(U(this,nn),this.options);if(a===U(this,Le))return;const i=U(this,Le);ce(this,Le,a),ce(this,ir,a.state),this.hasListeners()&&(i==null||i.removeObserver(this),a.addObserver(this))},gx);function uj(n,a){return ot(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&ot(a.retryOnMount,n)===!1)}function py(n,a){return uj(n,a)||n.state.data!==void 0&&Ih(n,a,a.refetchOnMount)}function Ih(n,a,i){if(ot(a.enabled,n)!==!1&&ot(a.staleTime,n)!=="static"){const o=ot(i,n);return o==="always"||o!==!1&&bm(n,a)}return!1}function vy(n,a,i,o){return(n!==a||ot(o.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&bm(n,i)}function bm(n,a){return ot(a.enabled,n)!==!1&&n.isStaleByTime(ot(a.staleTime,n))}var cj=class extends Dx{constructor(n,a){super(n,a)}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,a){var w,j;const{state:i}=n,o=super.createResult(n,a),{isFetching:u,isRefetching:d,isError:h,isRefetchError:m}=o,g=(j=(w=i.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:j.direction,y=h&&g==="forward",x=u&&g==="forward",v=h&&g==="backward",S=u&&g==="backward";return{...o,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ij(a,i.data),hasPreviousPage:oj(a,i.data),isFetchNextPageError:y,isFetchingNextPage:x,isFetchPreviousPageError:v,isFetchingPreviousPage:S,isRefetchError:m&&!y&&!v,isRefetching:d&&!x&&!S}}},rr,cl,Kt,vs,fl,pa,px,fj=(px=class extends Ax{constructor(a){super();ye(this,fl);ye(this,rr);ye(this,cl);ye(this,Kt);ye(this,vs);ce(this,rr,a.client),this.mutationId=a.mutationId,ce(this,Kt,a.mutationCache),ce(this,cl,[]),this.state=a.state||dj(),this.setOptions(a.options),this.scheduleGc()}setOptions(a){this.options=a,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(a){U(this,cl).includes(a)||(U(this,cl).push(a),this.clearGcTimeout(),U(this,Kt).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){ce(this,cl,U(this,cl).filter(i=>i!==a)),this.scheduleGc(),U(this,Kt).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){U(this,cl).length||(this.state.status==="pending"?this.scheduleGc():U(this,Kt).remove(this))}continue(){var a;return((a=U(this,vs))==null?void 0:a.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(a){var m,g,y,x,v,S,w,j,N,M,A,C,D,O,z,_,R,Q;const i=()=>{De(this,fl,pa).call(this,{type:"continue"})},o={client:U(this,rr),meta:this.options.meta,mutationKey:this.options.mutationKey},u=ce(this,vs,Rx({fn:()=>this.options.mutationFn?this.options.mutationFn(a,o):Promise.reject(new Error("No mutationFn found")),onFail:(K,$)=>{De(this,fl,pa).call(this,{type:"failed",failureCount:K,error:$})},onPause:()=>{De(this,fl,pa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,Kt).canRun(this)})),d=this.state.status==="pending",h=!u.canStart();try{if(d)i();else{De(this,fl,pa).call(this,{type:"pending",variables:a,isPaused:h}),U(this,Kt).config.onMutate&&await U(this,Kt).config.onMutate(a,this,o);const $=await((g=(m=this.options).onMutate)==null?void 0:g.call(m,a,o));$!==this.state.context&&De(this,fl,pa).call(this,{type:"pending",context:$,variables:a,isPaused:h})}const K=await u.start();return await((x=(y=U(this,Kt).config).onSuccess)==null?void 0:x.call(y,K,a,this.state.context,this,o)),await((S=(v=this.options).onSuccess)==null?void 0:S.call(v,K,a,this.state.context,o)),await((j=(w=U(this,Kt).config).onSettled)==null?void 0:j.call(w,K,null,this.state.variables,this.state.context,this,o)),await((M=(N=this.options).onSettled)==null?void 0:M.call(N,K,null,a,this.state.context,o)),De(this,fl,pa).call(this,{type:"success",data:K}),K}catch(K){try{await((C=(A=U(this,Kt).config).onError)==null?void 0:C.call(A,K,a,this.state.context,this,o))}catch($){Promise.reject($)}try{await((O=(D=this.options).onError)==null?void 0:O.call(D,K,a,this.state.context,o))}catch($){Promise.reject($)}try{await((_=(z=U(this,Kt).config).onSettled)==null?void 0:_.call(z,void 0,K,this.state.variables,this.state.context,this,o))}catch($){Promise.reject($)}try{await((Q=(R=this.options).onSettled)==null?void 0:Q.call(R,void 0,K,a,this.state.context,o))}catch($){Promise.reject($)}throw De(this,fl,pa).call(this,{type:"error",error:K}),K}finally{U(this,vs)===u&&ce(this,vs,void 0),U(this,Kt).runNext(this)}}},rr=new WeakMap,cl=new WeakMap,Kt=new WeakMap,vs=new WeakMap,fl=new WeakSet,pa=function(a){const i=o=>{switch(a.type){case"failed":return{...o,failureCount:a.failureCount,failureReason:a.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:a.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:a.isPaused,status:"pending",variables:a.variables,submittedAt:Date.now()};case"success":return{...o,data:a.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:a.error,failureCount:o.failureCount+1,failureReason:a.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Bt.batch(()=>{U(this,cl).forEach(o=>{o.onMutationUpdate(a)}),U(this,Kt).notify({mutation:this,type:"updated",action:a})})},px);function dj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wa,In,ur,vx,hj=(vx=class extends cr{constructor(a={}){super();ye(this,wa);ye(this,In);ye(this,ur);this.config=a,ce(this,wa,new Set),ce(this,In,new Map),ce(this,ur,0)}build(a,i,o){const u=new fj({client:a,mutationCache:this,mutationId:++ku(this,ur)._,options:a.defaultMutationOptions(i),state:o});return this.add(u),u}add(a){U(this,wa).add(a);const i=Bu(a);if(typeof i=="string"){const o=U(this,In).get(i);o?o.push(a):U(this,In).set(i,[a])}this.notify({type:"added",mutation:a})}remove(a){if(U(this,wa).delete(a)){const i=Bu(a);if(typeof i=="string"){const o=U(this,In).get(i);if(o)if(o.length>1){const u=o.indexOf(a);u!==-1&&o.splice(u,1)}else o[0]===a&&U(this,In).delete(i)}}this.notify({type:"removed",mutation:a})}canRun(a){var o;const i=Bu(a);if(typeof i=="string"){const u=(o=U(this,In).get(i))==null?void 0:o.find(d=>d.state.status==="pending");return!u||u===a}else return!0}runNext(a){var o,u;const i=Bu(a);return typeof i=="string"?((u=(o=U(this,In).get(i))==null?void 0:o.find(d=>d!==a&&d.state.isPaused))==null?void 0:u.continue())??Promise.resolve():Promise.resolve()}clear(){Bt.batch(()=>{const a=this.getAll();U(this,wa).clear(),U(this,In).clear(),a.forEach(i=>{this.notify({type:"removed",mutation:i})})})}getAll(){return Array.from(U(this,wa))}find(a){const i={exact:!0,...a};return this.getAll().find(o=>fy(i,o))}findAll(a={}){return this.getAll().filter(i=>fy(a,i))}notify(a){Bt.batch(()=>{this.listeners.forEach(i=>{i(a)})})}resumePausedMutations(){const a=this.getAll().filter(i=>i.state.isPaused);return Bt.batch(()=>Promise.all(a.map(i=>i.continue().catch(hn))))}},wa=new WeakMap,In=new WeakMap,ur=new WeakMap,vx);function Bu(n){var a;return(a=n.options.scope)==null?void 0:a.id}var dl,yx,mj=(yx=class extends cr{constructor(a={}){super();ye(this,dl);this.config=a,ce(this,dl,new Map)}build(a,i,o){const u=i.queryKey,d=i.queryHash??vm(u,i);let h=this.get(d);return h||(h=new rj({client:a,queryKey:u,queryHash:d,options:a.defaultQueryOptions(i),state:o,defaultOptions:a.getQueryDefaults(u)}),this.add(h)),h}add(a){U(this,dl).has(a.queryHash)||(U(this,dl).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){U(this,dl).get(a.queryHash)===a&&(a.destroy(),U(this,dl).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){Bt.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return U(this,dl).get(a)}getAll(){return[...U(this,dl).values()]}find(a){const i={exact:!0,...a};return this.getAll().find(o=>cy(i,o))}findAll(a={}){const i=this.getAll();return Object.keys(a).length>0?i.filter(o=>cy(a,o)):i}notify(a){Bt.batch(()=>{this.listeners.forEach(i=>{i(a)})})}onFocus(){Bt.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){Bt.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},dl=new WeakMap,yx),ft,Na,Ca,Li,Hi,Ea,Ui,$i,xx,gj=(xx=class{constructor(n={}){ye(this,ft);ye(this,Na);ye(this,Ca);ye(this,Li);ye(this,Hi);ye(this,Ea);ye(this,Ui);ye(this,$i);ce(this,ft,n.queryCache||new mj),ce(this,Na,n.mutationCache||new hj),ce(this,Ca,n.defaultOptions||{}),ce(this,Li,new Map),ce(this,Hi,new Map),ce(this,Ea,0)}mount(){ku(this,Ea)._++,U(this,Ea)===1&&(ce(this,Ui,Sm.subscribe(async n=>{n&&(await this.resumePausedMutations(),U(this,ft).onFocus())})),ce(this,$i,Zu.subscribe(async n=>{n&&(await this.resumePausedMutations(),U(this,ft).onOnline())})))}unmount(){var n,a;ku(this,Ea)._--,U(this,Ea)===0&&((n=U(this,Ui))==null||n.call(this),ce(this,Ui,void 0),(a=U(this,$i))==null||a.call(this),ce(this,$i,void 0))}isFetching(n){return U(this,ft).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return U(this,Na).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const a=this.defaultQueryOptions({queryKey:n});return(i=U(this,ft).get(a.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),i=U(this,ft).build(this,a),o=i.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ot(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(o))}getQueriesData(n){return U(this,ft).findAll(n).map(({queryKey:a,state:i})=>[a,i.data])}setQueryData(n,a,i){var h;const o=this.defaultQueryOptions({queryKey:n}),u=(h=U(this,ft).get(o.queryHash))==null?void 0:h.state.data,d=I2(a,u);if(d!==void 0)return U(this,ft).build(this,o).setData(d,{...i,manual:!0})}setQueriesData(n,a,i){return Bt.batch(()=>U(this,ft).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,a,i)]))}getQueryState(n){var i;const a=this.defaultQueryOptions({queryKey:n});return(i=U(this,ft).get(a.queryHash))==null?void 0:i.state}removeQueries(n){const a=U(this,ft);Bt.batch(()=>{a.findAll(n).forEach(i=>{a.remove(i)})})}resetQueries(n,a){const i=U(this,ft);return Bt.batch(()=>{const o=i.findAll(n),u=new Set(o);return o.forEach(d=>{d.reset()}),this.refetchQueries({type:"active",predicate:d=>u.has(d)},a)})}cancelQueries(n,a={}){const i={revert:!0,...a},o=Bt.batch(()=>U(this,ft).findAll(n).map(u=>u.cancel(i)));return Promise.all(o).then(hn).catch(hn)}invalidateQueries(n,a={}){return Bt.batch(()=>(U(this,ft).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"},a)))}refetchQueries(n,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},o=Bt.batch(()=>U(this,ft).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,i);return i.throwOnError||(d=d.catch(hn)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(o).then(hn)}async query(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const i=U(this,ft).build(this,a),o=i.isStaleByTime(ot(a.staleTime,i))?await i.fetch(a):i.state.data,u=a.select;return u?u(o):o}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const i=U(this,ft).build(this,a);return i.isStaleByTime(ot(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(hn).catch(hn)}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(hn).catch(hn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Zu.isOnline()?U(this,Na).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,ft)}getMutationCache(){return U(this,Na)}getDefaultOptions(){return U(this,Ca)}setDefaultOptions(n){ce(this,Ca,n)}setQueryDefaults(n,a){U(this,Li).set(er(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[...U(this,Li).values()],i={};return a.forEach(o=>{Vi(n,o.queryKey)&&Object.assign(i,o.defaultOptions)}),i}setMutationDefaults(n,a){U(this,Hi).set(er(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[...U(this,Hi).values()],i={};return a.forEach(o=>{Vi(n,o.mutationKey)&&Object.assign(i,o.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const a={...U(this,Ca).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=vm(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===ym&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...U(this,Ca).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){U(this,ft).clear(),U(this,Na).clear()}},ft=new WeakMap,Na=new WeakMap,Ca=new WeakMap,Li=new WeakMap,Hi=new WeakMap,Ea=new WeakMap,Ui=new WeakMap,$i=new WeakMap,xx);const Lx=E.createContext(!1),pj=()=>E.useContext(Lx);Lx.Provider;function vj(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const yj=E.createContext(vj()),xj=()=>E.useContext(yj),Sj=(n,a,i)=>{const o=(i==null?void 0:i.state.status)==="error"&&typeof n.throwOnError=="function"?_x(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||o)&&(a.isReset()||(n.retryOnMount=!1))},bj=n=>{E.useEffect(()=>{n.clearReset()},[n])},jj=({result:n,errorResetBoundary:a,throwOnError:i,query:o,suspense:u})=>n.isError&&!a.isReset()&&!n.isFetching&&o&&(u&&n.data===void 0||_x(i,[n.error,o])),wj=n=>{if(n.suspense){const i=u=>u==="static"?u:Math.max(u??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...u)=>i(o(...u)):i(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Nj=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,Cj=(n,a,i)=>a.fetchOptimistic(n).catch(()=>{i.clearReset()});function Hx(n,a,i){const o=pj(),u=xj(),d=jx(),h=d.defaultQueryOptions(n),m=d.getQueryCache().get(h.queryHash),g=n.subscribed!==!1;h._optimisticResults=o?"isRestoring":g?"optimistic":void 0,wj(h),Sj(h,u,m),bj(u);const[y]=E.useState(()=>new a(d,h)),x=y.getOptimisticResult(h),v=!o&&g;if(E.useSyncExternalStore(E.useCallback(S=>{const w=v?y.subscribe(Bt.batchCalls(S)):hn;return y.updateResult(),w},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),E.useEffect(()=>{y.setOptions(h)},[h,y]),Nj(h,x))throw Cj(h,y,u);if(jj({result:x,errorResetBoundary:u,throwOnError:h.throwOnError,query:m,suspense:h.suspense}))throw x.error;return h.notifyOnChangeProps?x:y.trackResult(x)}function Un(n,a){return Hx(n,Dx)}function Ej(n,a){return Hx(n,cj)}var jm=Sx();/**
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 qr(){return qr=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},qr.apply(null,arguments)}var ba;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(ba||(ba={}));const iy="popstate";function dw(n){n===void 0&&(n={});function s(r,u){let{pathname:d,search:h,hash:m}=r.location;return Lh("",{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:wx(u)}return mw(s,i,null,n)}function wt(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function bx(n,s){if(!n){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function hw(){return Math.random().toString(36).substr(2,8)}function ry(n,s){return{usr:n.state,key:n.key,idx:s}}function Lh(n,s,i,r){return i===void 0&&(i=null),qr({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof s=="string"?Ti(s):s,{state:i,key:s&&s.key||r||hw()})}function wx(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 Ti(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 mw(n,s,i,r){r===void 0&&(r={});let{window:u=document.defaultView,v5Compat:d=!1}=r,h=u.history,m=ba.Pop,p=null,y=x();y==null&&(y=0,h.replaceState(qr({},h.state,{idx:y}),""));function x(){return(h.state||{idx:null}).idx}function v(){m=ba.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=ba.Push;let E=Lh(N.location,M,R);y=x()+1;let U=ry(E,y),T=N.createHref(E);try{h.pushState(U,"",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=ba.Replace;let E=Lh(N.location,M,R);y=x();let U=ry(E,y),T=N.createHref(E);h.replaceState(U,"",T),d&&p&&p({action:m,location:N.location,delta:0})}function j(M){let R=u.location.origin!=="null"?u.location.origin:u.location.href,E=typeof M=="string"?M:wx(M);return E=E.replace(/ $/,"%20"),wt(R,"No window.location.(origin|href) available to create URL for href: "+E),new URL(E,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(iy,v),p=M,()=>{u.removeEventListener(iy,v),p=null}},createHref(M){return s(u,M)},createURL:j,encodeLocation(M){let R=j(M);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:b,replace:w,go(M){return h.go(M)}};return N}var oy;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(oy||(oy={}));function gw(n,s,i){return i===void 0&&(i="/"),pw(n,s,i)}function pw(n,s,i,r){let u=typeof s=="string"?Ti(s):s,d=Mx(u.pathname||"/",i);if(d==null)return null;let h=jx(n);vw(h);let m=null,p=Ex(d);for(let y=0;m==null&&y<h.length;++y)m=Ew(h[y],p);return m}function jx(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=ds([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+'".')),jx(d.children,s,x,y)),!(d.path==null&&!d.index)&&s.push({path:y,score:Cw(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 Cx(d.path))u(d,h,p)}),s}function Cx(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=Cx(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 vw(n){n.sort((s,i)=>s.score!==i.score?i.score-s.score:Nw(s.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}const yw=/^:[\w-]+$/,xw=3,Sw=2,bw=1,ww=10,jw=-2,uy=n=>n==="*";function Cw(n,s){let i=n.split("/"),r=i.length;return i.some(uy)&&(r+=jw),s&&(r+=Sw),i.filter(u=>!uy(u)).reduce((u,d)=>u+(yw.test(d)?xw:d===""?bw:ww),r)}function Nw(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 Ew(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=Nx({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:ds([d,v.pathname]),pathnameBase:Ow(ds([d,v.pathnameBase])),route:b}),v.pathnameBase!=="/"&&(d=ds([d,v.pathnameBase]))}return h}function Nx(n,s){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,r]=Mw(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 j=m[v];return w&&!j?y[b]=void 0:y[b]=(j||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:h,pattern:n}}function Mw(n,s,i){s===void 0&&(s=!1),i===void 0&&(i=!0),bx(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 Ex(n){try{return n.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return bx(!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 Mx(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 _w(n,s){s===void 0&&(s="/");let{pathname:i,search:r="",hash:u=""}=typeof n=="string"?Ti(n):n,d;return i?(i=_x(i),i.startsWith("/")?d=cy(i.substring(1),"/"):d=cy(i,s)):d=s,{pathname:d,search:zw(r),hash:Dw(u)}}function cy(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 qd(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 Rw(n){return n.filter((s,i)=>i===0||s.route.path&&s.route.path.length>0)}function Tw(n,s){let i=Rw(n);return s?i.map((r,u)=>u===i.length-1?r.pathname:r.pathnameBase):i.map(r=>r.pathnameBase)}function Aw(n,s,i,r){r===void 0&&(r=!1);let u;typeof n=="string"?u=Ti(n):(u=qr({},n),wt(!u.pathname||!u.pathname.includes("?"),qd("?","pathname","search",u)),wt(!u.pathname||!u.pathname.includes("#"),qd("#","pathname","hash",u)),wt(!u.search||!u.search.includes("#"),qd("#","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=_w(u,m),y=h&&h!=="/"&&h.endsWith("/"),x=(d||h===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(y||x)&&(p.pathname+="/"),p}const _x=n=>n.replace(/\/\/+/g,"/"),ds=n=>_x(n.join("/")),Ow=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),zw=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Dw=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Hw(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const Rx=["post","put","patch","delete"];new Set(Rx);const Lw=["get",...Rx];new Set(Lw);/**
58
+ */function tr(){return tr=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var o in i)({}).hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},tr.apply(null,arguments)}var Ma;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(Ma||(Ma={}));const yy="popstate";function Mj(n){n===void 0&&(n={});function a(o,u){let{pathname:d,search:h,hash:m}=o.location;return Xh("",{pathname:d,search:h,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function i(o,u){return typeof u=="string"?u:$x(u)}return Tj(a,i,null,n)}function bt(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Ux(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function _j(){return Math.random().toString(36).substr(2,8)}function xy(n,a){return{usr:n.state,key:n.key,idx:a}}function Xh(n,a,i,o){return i===void 0&&(i=null),tr({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof a=="string"?ki(a):a,{state:i,key:a&&a.key||o||_j()})}function $x(n){let{pathname:a="/",search:i="",hash:o=""}=n;return i&&i!=="?"&&(a+=i.charAt(0)==="?"?i:"?"+i),o&&o!=="#"&&(a+=o.charAt(0)==="#"?o:"#"+o),a}function ki(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substr(i),n=n.substr(0,i));let o=n.indexOf("?");o>=0&&(a.search=n.substr(o),n=n.substr(0,o)),n&&(a.pathname=n)}return a}function Tj(n,a,i,o){o===void 0&&(o={});let{window:u=document.defaultView,v5Compat:d=!1}=o,h=u.history,m=Ma.Pop,g=null,y=x();y==null&&(y=0,h.replaceState(tr({},h.state,{idx:y}),""));function x(){return(h.state||{idx:null}).idx}function v(){m=Ma.Pop;let M=x(),A=M==null?null:M-y;y=M,g&&g({action:m,location:N.location,delta:A})}function S(M,A){m=Ma.Push;let C=Xh(N.location,M,A);y=x()+1;let D=xy(C,y),O=N.createHref(C);try{h.pushState(D,"",O)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;u.location.assign(O)}d&&g&&g({action:m,location:N.location,delta:1})}function w(M,A){m=Ma.Replace;let C=Xh(N.location,M,A);y=x();let D=xy(C,y),O=N.createHref(C);h.replaceState(D,"",O),d&&g&&g({action:m,location:N.location,delta:0})}function j(M){let A=u.location.origin!=="null"?u.location.origin:u.location.href,C=typeof M=="string"?M:$x(M);return C=C.replace(/ $/,"%20"),bt(A,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,A)}let N={get action(){return m},get location(){return n(u,h)},listen(M){if(g)throw new Error("A history only accepts one active listener");return u.addEventListener(yy,v),g=M,()=>{u.removeEventListener(yy,v),g=null}},createHref(M){return a(u,M)},createURL:j,encodeLocation(M){let A=j(M);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:S,replace:w,go(M){return h.go(M)}};return N}var Sy;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Sy||(Sy={}));function Rj(n,a,i){return i===void 0&&(i="/"),Aj(n,a,i)}function Aj(n,a,i,o){let u=typeof a=="string"?ki(a):a,d=Gx(u.pathname||"/",i);if(d==null)return null;let h=Vx(n);Oj(h);let m=null,g=Bx(d);for(let y=0;m==null&&y<h.length;++y)m=kj(h[y],g);return m}function Vx(n,a,i,o){a===void 0&&(a=[]),i===void 0&&(i=[]),o===void 0&&(o="");let u=(d,h,m)=>{let g={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};g.relativePath.startsWith("/")&&(bt(g.relativePath.startsWith(o),'Absolute route path "'+g.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),g.relativePath=g.relativePath.slice(o.length));let y=ys([o,g.relativePath]),x=i.concat(g);d.children&&d.children.length>0&&(bt(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),Vx(d.children,a,x,y)),!(d.path==null&&!d.index)&&a.push({path:y,score:Vj(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 g of Fx(d.path))u(d,h,g)}),a}function Fx(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,u=i.endsWith("?"),d=i.replace(/\?$/,"");if(o.length===0)return u?[d,""]:[d];let h=Fx(o.join("/")),m=[];return m.push(...h.map(g=>g===""?d:[d,g].join("/"))),u&&m.push(...h),m.map(g=>n.startsWith("/")&&g===""?"/":g)}function Oj(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:Fj(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}const zj=/^:[\w-]+$/,Dj=3,Lj=2,Hj=1,Uj=10,$j=-2,by=n=>n==="*";function Vj(n,a){let i=n.split("/"),o=i.length;return i.some(by)&&(o+=$j),a&&(o+=Lj),i.filter(u=>!by(u)).reduce((u,d)=>u+(zj.test(d)?Dj:d===""?Hj:Uj),o)}function Fj(n,a){return n.length===a.length&&n.slice(0,-1).every((o,u)=>o===a[u])?n[n.length-1]-a[a.length-1]:0}function kj(n,a,i){let{routesMeta:o}=n,u={},d="/",h=[];for(let m=0;m<o.length;++m){let g=o[m],y=m===o.length-1,x=d==="/"?a:a.slice(d.length)||"/",v=kx({path:g.relativePath,caseSensitive:g.caseSensitive,end:y},x),S=g.route;if(!v)return null;Object.assign(u,v.params),h.push({params:u,pathname:ys([d,v.pathname]),pathnameBase:Ij(ys([d,v.pathnameBase])),route:S}),v.pathnameBase!=="/"&&(d=ys([d,v.pathnameBase]))}return h}function kx(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=Bj(n.path,n.caseSensitive,n.end),u=a.match(i);if(!u)return null;let d=u[0],h=d.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:o.reduce((y,x,v)=>{let{paramName:S,isOptional:w}=x;if(S==="*"){let N=m[v]||"";h=d.slice(0,d.length-N.length).replace(/(.)\/+$/,"$1")}const j=m[v];return w&&!j?y[S]=void 0:y[S]=(j||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:h,pattern:n}}function Bj(n,a,i){a===void 0&&(a=!1),i===void 0&&(i=!0),Ux(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 o=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,m,g)=>(o.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(o.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,a?void 0:"i"),o]}function Bx(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Ux(!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 ("+a+").")),n}}function Gx(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=n.charAt(i);return o&&o!=="/"?null:n.slice(i)||"/"}function Gj(n,a){a===void 0&&(a="/");let{pathname:i,search:o="",hash:u=""}=typeof n=="string"?ki(n):n,d;return i?(i=qx(i),i.startsWith("/")?d=jy(i.substring(1),"/"):d=jy(i,a)):d=a,{pathname:d,search:Xj(o),hash:Kj(u)}}function jy(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?i.length>1&&i.pop():u!=="."&&i.push(u)}),i.length>1?i.join("/"):"/"}function eh(n,a,i,o){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(o)+"]. 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 qj(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Qj(n,a){let i=qj(n);return a?i.map((o,u)=>u===i.length-1?o.pathname:o.pathnameBase):i.map(o=>o.pathnameBase)}function Yj(n,a,i,o){o===void 0&&(o=!1);let u;typeof n=="string"?u=ki(n):(u=tr({},n),bt(!u.pathname||!u.pathname.includes("?"),eh("?","pathname","search",u)),bt(!u.pathname||!u.pathname.includes("#"),eh("#","pathname","hash",u)),bt(!u.search||!u.search.includes("#"),eh("#","search","hash",u)));let d=n===""||u.pathname==="",h=d?"/":u.pathname,m;if(h==null)m=i;else{let v=a.length-1;if(!o&&h.startsWith("..")){let S=h.split("/");for(;S[0]==="..";)S.shift(),v-=1;u.pathname=S.join("/")}m=v>=0?a[v]:"/"}let g=Gj(u,m),y=h&&h!=="/"&&h.endsWith("/"),x=(d||h===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(y||x)&&(g.pathname+="/"),g}const qx=n=>n.replace(/\/\/+/g,"/"),ys=n=>qx(n.join("/")),Ij=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Xj=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Kj=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Pj(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const Qx=["post","put","patch","delete"];new Set(Qx);const Zj=["get",...Qx];new Set(Zj);/**
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 Qr(){return Qr=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},Qr.apply(null,arguments)}const cm=C.createContext(null),Uw=C.createContext(null),Xu=C.createContext(null),Ku=C.createContext(null),gs=C.createContext({outlet:null,matches:[],isDataRoute:!1}),Tx=C.createContext(null);function eo(){return C.useContext(Ku)!=null}function Zu(){return eo()||wt(!1),C.useContext(Ku).location}function Vw(n){eo()||wt(!1);let{pathname:s}=Zu();return C.useMemo(()=>Nx(n,Ex(s)),[s,n])}function Ax(n){C.useContext(Xu).static||C.useLayoutEffect(n)}function fm(){let{isDataRoute:n}=C.useContext(gs);return n?Jw():$w()}function $w(){eo()||wt(!1);let n=C.useContext(cm),{basename:s,future:i,navigator:r}=C.useContext(Xu),{matches:u}=C.useContext(gs),{pathname:d}=Zu(),h=JSON.stringify(Tw(u,i.v7_relativeSplatPath)),m=C.useRef(!1);return Ax(()=>{m.current=!0}),C.useCallback(function(y,x){if(x===void 0&&(x={}),!m.current)return;if(typeof y=="number"){r.go(y);return}let v=Aw(y,JSON.parse(h),d,x.relative==="path");n==null&&s!=="/"&&(v.pathname=v.pathname==="/"?s:ds([s,v.pathname])),(x.replace?r.replace:r.push)(v,x.state,x)},[s,r,h,d,n])}function Fw(){let{matches:n}=C.useContext(gs),s=n[n.length-1];return s?s.params:{}}function Bw(n,s){return kw(n,s)}function kw(n,s,i,r){eo()||wt(!1);let{navigator:u}=C.useContext(Xu),{matches:d}=C.useContext(gs),h=d[d.length-1],m=h?h.params:{};h&&h.pathname;let p=h?h.pathnameBase:"/";h&&h.route;let y=Zu(),x;if(s){var v;let M=typeof s=="string"?Ti(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 j=gw(n,{pathname:w}),N=Iw(j&&j.map(M=>Object.assign({},M,{params:Object.assign({},m,M.params),pathname:ds([p,u.encodeLocation?u.encodeLocation(M.pathname).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?p:ds([p,u.encodeLocation?u.encodeLocation(M.pathnameBase).pathname:M.pathnameBase])})),d,i,r);return s&&N?C.createElement(Ku.Provider,{value:{location:Qr({pathname:"/",search:"",hash:"",state:null,key:"default"},x),navigationType:ba.Pop}},N):N}function Gw(){let n=Pw(),s=Hw(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 C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},s),i?C.createElement("pre",{style:u},i):null,null)}const qw=C.createElement(Gw,null);class Qw extends C.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?C.createElement(gs.Provider,{value:this.props.routeContext},C.createElement(Tx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Yw(n){let{routeContext:s,match:i,children:r}=n,u=C.useContext(cm);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),C.createElement(gs.Provider,{value:s},r)}function Iw(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,j=v.route.loader&&b[v.route.id]===void 0&&(!w||w[v.route.id]===void 0);if(v.route.lazy||j){p=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}return h.reduceRight((x,v,b)=>{let w,j=!1,N=null,M=null;i&&(w=m&&v.route.id?m[v.route.id]:void 0,N=v.route.errorElement||qw,p&&(y<0&&b===0?(Ww("route-fallback"),j=!0,M=null):y===b&&(j=!0,M=v.route.hydrateFallbackElement||null)));let R=s.concat(h.slice(0,b+1)),E=()=>{let U;return w?U=N:j?U=M:v.route.Component?U=C.createElement(v.route.Component,null):v.route.element?U=v.route.element:U=x,C.createElement(Yw,{match:v,routeContext:{outlet:x,matches:R,isDataRoute:i!=null},children:U})};return i&&(v.route.ErrorBoundary||v.route.errorElement||b===0)?C.createElement(Qw,{location:i.location,revalidation:i.revalidation,component:N,error:w,children:E(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):E()},null)}var Ox=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Ox||{}),zx=(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})(zx||{});function Xw(n){let s=C.useContext(cm);return s||wt(!1),s}function Kw(n){let s=C.useContext(Uw);return s||wt(!1),s}function Zw(n){let s=C.useContext(gs);return s||wt(!1),s}function Dx(n){let s=Zw(),i=s.matches[s.matches.length-1];return i.route.id||wt(!1),i.route.id}function Pw(){var n;let s=C.useContext(Tx),i=Kw(),r=Dx();return s!==void 0?s:(n=i.errors)==null?void 0:n[r]}function Jw(){let{router:n}=Xw(Ox.UseNavigateStable),s=Dx(zx.UseNavigateStable),i=C.useRef(!1);return Ax(()=>{i.current=!0}),C.useCallback(function(u,d){d===void 0&&(d={}),i.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,Qr({fromRouteId:s},d)))},[n,s])}const fy={};function Ww(n,s,i){fy[n]||(fy[n]=!0)}function ej(n,s){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Uh(n){wt(!1)}function tj(n){let{basename:s="/",children:i=null,location:r,navigationType:u=ba.Pop,navigator:d,static:h=!1,future:m}=n;eo()&&wt(!1);let p=s.replace(/^\/*/,"/"),y=C.useMemo(()=>({basename:p,navigator:d,static:h,future:Qr({v7_relativeSplatPath:!1},m)}),[p,m,d,h]);typeof r=="string"&&(r=Ti(r));let{pathname:x="/",search:v="",hash:b="",state:w=null,key:j="default"}=r,N=C.useMemo(()=>{let M=Mx(x,p);return M==null?null:{location:{pathname:M,search:v,hash:b,state:w,key:j},navigationType:u}},[p,x,v,b,w,j,u]);return N==null?null:C.createElement(Xu.Provider,{value:y},C.createElement(Ku.Provider,{children:i,value:N}))}function nj(n){let{children:s,location:i}=n;return Bw(Vh(s),i)}new Promise(()=>{});function Vh(n,s){s===void 0&&(s=[]);let i=[];return C.Children.forEach(n,(r,u)=>{if(!C.isValidElement(r))return;let d=[...s,u];if(r.type===C.Fragment){i.push.apply(i,Vh(r.props.children,d));return}r.type!==Uh&&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=Vh(r.props.children,d)),i.push(h)}),i}/**
67
+ */function nr(){return nr=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var o in i)({}).hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},nr.apply(null,arguments)}const wm=E.createContext(null),Jj=E.createContext(null),ic=E.createContext(null),oc=E.createContext(null),bs=E.createContext({outlet:null,matches:[],isDataRoute:!1}),Yx=E.createContext(null);function fr(){return E.useContext(oc)!=null}function rc(){return fr()||bt(!1),E.useContext(oc).location}function Wj(n){fr()||bt(!1);let{pathname:a}=rc();return E.useMemo(()=>kx(n,Bx(a)),[a,n])}function Ix(n){E.useContext(ic).static||E.useLayoutEffect(n)}function Nm(){let{isDataRoute:n}=E.useContext(bs);return n?hw():ew()}function ew(){fr()||bt(!1);let n=E.useContext(wm),{basename:a,future:i,navigator:o}=E.useContext(ic),{matches:u}=E.useContext(bs),{pathname:d}=rc(),h=JSON.stringify(Qj(u,i.v7_relativeSplatPath)),m=E.useRef(!1);return Ix(()=>{m.current=!0}),E.useCallback(function(y,x){if(x===void 0&&(x={}),!m.current)return;if(typeof y=="number"){o.go(y);return}let v=Yj(y,JSON.parse(h),d,x.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:ys([a,v.pathname])),(x.replace?o.replace:o.push)(v,x.state,x)},[a,o,h,d,n])}function tw(){let{matches:n}=E.useContext(bs),a=n[n.length-1];return a?a.params:{}}function nw(n,a){return lw(n,a)}function lw(n,a,i,o){fr()||bt(!1);let{navigator:u}=E.useContext(ic),{matches:d}=E.useContext(bs),h=d[d.length-1],m=h?h.params:{};h&&h.pathname;let g=h?h.pathnameBase:"/";h&&h.route;let y=rc(),x;if(a){var v;let M=typeof a=="string"?ki(a):a;g==="/"||(v=M.pathname)!=null&&v.startsWith(g)||bt(!1),x=M}else x=y;let S=x.pathname||"/",w=S;if(g!=="/"){let M=g.replace(/^\//,"").split("/");w="/"+S.replace(/^\//,"").split("/").slice(M.length).join("/")}let j=Rj(n,{pathname:w}),N=rw(j&&j.map(M=>Object.assign({},M,{params:Object.assign({},m,M.params),pathname:ys([g,u.encodeLocation?u.encodeLocation(M.pathname).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?g:ys([g,u.encodeLocation?u.encodeLocation(M.pathnameBase).pathname:M.pathnameBase])})),d,i,o);return a&&N?E.createElement(oc.Provider,{value:{location:nr({pathname:"/",search:"",hash:"",state:null,key:"default"},x),navigationType:Ma.Pop}},N):N}function aw(){let n=dw(),a=Pj(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"}},a),i?E.createElement("pre",{style:u},i):null,null)}const sw=E.createElement(aw,null);class iw extends E.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,i){return i.location!==a.location||i.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:i.error,location:i.location,revalidation:a.revalidation||i.revalidation}}componentDidCatch(a,i){console.error("React Router caught the following error during render",a,i)}render(){return this.state.error!==void 0?E.createElement(bs.Provider,{value:this.props.routeContext},E.createElement(Yx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ow(n){let{routeContext:a,match:i,children:o}=n,u=E.useContext(wm);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),E.createElement(bs.Provider,{value:a},o)}function rw(n,a,i,o){var u;if(a===void 0&&(a=[]),i===void 0&&(i=null),o===void 0&&(o=null),n==null){var d;if(!i)return null;if(i.errors)n=i.matches;else if((d=o)!=null&&d.v7_partialHydration&&a.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||bt(!1),h=h.slice(0,Math.min(h.length,x+1))}let g=!1,y=-1;if(i&&o&&o.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:S,errors:w}=i,j=v.route.loader&&S[v.route.id]===void 0&&(!w||w[v.route.id]===void 0);if(v.route.lazy||j){g=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}return h.reduceRight((x,v,S)=>{let w,j=!1,N=null,M=null;i&&(w=m&&v.route.id?m[v.route.id]:void 0,N=v.route.errorElement||sw,g&&(y<0&&S===0?(mw("route-fallback"),j=!0,M=null):y===S&&(j=!0,M=v.route.hydrateFallbackElement||null)));let A=a.concat(h.slice(0,S+1)),C=()=>{let D;return w?D=N:j?D=M:v.route.Component?D=E.createElement(v.route.Component,null):v.route.element?D=v.route.element:D=x,E.createElement(ow,{match:v,routeContext:{outlet:x,matches:A,isDataRoute:i!=null},children:D})};return i&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?E.createElement(iw,{location:i.location,revalidation:i.revalidation,component:N,error:w,children:C(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):C()},null)}var Xx=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Xx||{}),Kx=(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})(Kx||{});function uw(n){let a=E.useContext(wm);return a||bt(!1),a}function cw(n){let a=E.useContext(Jj);return a||bt(!1),a}function fw(n){let a=E.useContext(bs);return a||bt(!1),a}function Px(n){let a=fw(),i=a.matches[a.matches.length-1];return i.route.id||bt(!1),i.route.id}function dw(){var n;let a=E.useContext(Yx),i=cw(),o=Px();return a!==void 0?a:(n=i.errors)==null?void 0:n[o]}function hw(){let{router:n}=uw(Xx.UseNavigateStable),a=Px(Kx.UseNavigateStable),i=E.useRef(!1);return Ix(()=>{i.current=!0}),E.useCallback(function(u,d){d===void 0&&(d={}),i.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,nr({fromRouteId:a},d)))},[n,a])}const wy={};function mw(n,a,i){wy[n]||(wy[n]=!0)}function gw(n,a){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Kh(n){bt(!1)}function pw(n){let{basename:a="/",children:i=null,location:o,navigationType:u=Ma.Pop,navigator:d,static:h=!1,future:m}=n;fr()&&bt(!1);let g=a.replace(/^\/*/,"/"),y=E.useMemo(()=>({basename:g,navigator:d,static:h,future:nr({v7_relativeSplatPath:!1},m)}),[g,m,d,h]);typeof o=="string"&&(o=ki(o));let{pathname:x="/",search:v="",hash:S="",state:w=null,key:j="default"}=o,N=E.useMemo(()=>{let M=Gx(x,g);return M==null?null:{location:{pathname:M,search:v,hash:S,state:w,key:j},navigationType:u}},[g,x,v,S,w,j,u]);return N==null?null:E.createElement(ic.Provider,{value:y},E.createElement(oc.Provider,{children:i,value:N}))}function vw(n){let{children:a,location:i}=n;return nw(Ph(a),i)}new Promise(()=>{});function Ph(n,a){a===void 0&&(a=[]);let i=[];return E.Children.forEach(n,(o,u)=>{if(!E.isValidElement(o))return;let d=[...a,u];if(o.type===E.Fragment){i.push.apply(i,Ph(o.props.children,d));return}o.type!==Kh&&bt(!1),!o.props.index||!o.props.children||bt(!1);let h={id:o.props.id||d.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(h.children=Ph(o.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,198 +73,198 @@ 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 $h(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 lj(n,s){let i=$h(n);return s&&s.forEach((r,u)=>{i.has(u)||s.getAll(u).forEach(d=>{i.append(u,d)})}),i}const aj="6";try{window.__reactRouterVersion=aj}catch{}const sj="startTransition",dy=S2[sj];function ij(n){let{basename:s,children:i,future:r,window:u}=n,d=C.useRef();d.current==null&&(d.current=dw({window:u,v5Compat:!0}));let h=d.current,[m,p]=C.useState({action:h.action,location:h.location}),{v7_startTransition:y}=r||{},x=C.useCallback(v=>{y&&dy?dy(()=>p(v)):p(v)},[p,y]);return C.useLayoutEffect(()=>h.listen(x),[h,x]),C.useEffect(()=>ej(r),[r]),C.createElement(tj,{basename:s,children:i,location:m.location,navigationType:m.action,navigator:h,future:r})}var hy;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(hy||(hy={}));var my;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(my||(my={}));function rj(n){let s=C.useRef($h(n)),i=C.useRef(!1),r=Zu(),u=C.useMemo(()=>lj(r.search,i.current?null:s.current),[r.search]),d=fm(),h=C.useCallback((m,p)=>{const y=$h(typeof m=="function"?m(u):m);i.current=!0,d("?"+y,p)},[d,u]);return[u,h]}function oj(n){const s=n.replace(/^\/+/,"").replace(/\/+$/,"");return s?`/${s}`:""}const Pt=typeof window>"u"?void 0:window.$isabl,qn={apiHost:((Pt==null?void 0:Pt.apiHost)??"").replace(/\/$/,""),basePath:oj((Pt==null?void 0:Pt.basePath)??"/wgts"),theme:(Pt==null?void 0:Pt.theme)==="sand"?"th-sand":(Pt==null?void 0:Pt.theme)==="msk"?"th-msk":"th-clean",isablUiUrl:((Pt==null?void 0:Pt.isablUiUrl)??"/beta").replace(/\/+$/,"")};function Hx(n){return`${qn.isablUiUrl}/explorer?r=analyses:${n}`}const Fh="user-token";/**
76
+ */function Zh(n){return n===void 0&&(n=""),new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,i)=>{let o=n[i];return a.concat(Array.isArray(o)?o.map(u=>[i,u]):[[i,o]])},[]))}function yw(n,a){let i=Zh(n);return a&&a.forEach((o,u)=>{i.has(u)||a.getAll(u).forEach(d=>{i.append(u,d)})}),i}const xw="6";try{window.__reactRouterVersion=xw}catch{}const Sw="startTransition",Ny=L2[Sw];function bw(n){let{basename:a,children:i,future:o,window:u}=n,d=E.useRef();d.current==null&&(d.current=Mj({window:u,v5Compat:!0}));let h=d.current,[m,g]=E.useState({action:h.action,location:h.location}),{v7_startTransition:y}=o||{},x=E.useCallback(v=>{y&&Ny?Ny(()=>g(v)):g(v)},[g,y]);return E.useLayoutEffect(()=>h.listen(x),[h,x]),E.useEffect(()=>gw(o),[o]),E.createElement(pw,{basename:a,children:i,location:m.location,navigationType:m.action,navigator:h,future:o})}var Cy;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(Cy||(Cy={}));var Ey;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(Ey||(Ey={}));function jw(n){let a=E.useRef(Zh(n)),i=E.useRef(!1),o=rc(),u=E.useMemo(()=>yw(o.search,i.current?null:a.current),[o.search]),d=Nm(),h=E.useCallback((m,g)=>{const y=Zh(typeof m=="function"?m(u):m);i.current=!0,d("?"+y,g)},[d,u]);return[u,h]}function ww(n){const a=n.replace(/^\/+/,"").replace(/\/+$/,"");return a?`/${a}`:""}const tn=typeof window>"u"?void 0:window.$isabl,Kn={apiHost:((tn==null?void 0:tn.apiHost)??"").replace(/\/$/,""),basePath:ww((tn==null?void 0:tn.basePath)??"/wgts"),theme:(tn==null?void 0:tn.theme)==="sand"?"th-sand":(tn==null?void 0:tn.theme)==="msk"?"th-msk":"th-clean",isablUiUrl:((tn==null?void 0:tn.isablUiUrl)??"/beta").replace(/\/+$/,"")};function Zx(n){return`${Kn.isablUiUrl}/explorer?r=analyses:${n}`}const Jh="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 uj=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Lx=(...n)=>n.filter((s,i,r)=>!!s&&s.trim()!==""&&r.indexOf(s)===i).join(" ").trim();/**
81
+ */const Nw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jx=(...n)=>n.filter((a,i,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===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.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */var cj={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
86
+ */var Cw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
87
87
  * @license lucide-react v0.468.0 - ISC
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 fj=C.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:u="",children:d,iconNode:h,...m},p)=>C.createElement("svg",{ref:p,...cj,width:s,height:s,stroke:n,strokeWidth:r?Number(i)*24/Number(s):i,className:Lx("lucide",u),...m},[...h.map(([y,x])=>C.createElement(y,x)),...Array.isArray(d)?d:[d]]));/**
91
+ */const Ew=E.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:d,iconNode:h,...m},g)=>E.createElement("svg",{ref:g,...Cw,width:a,height:a,stroke:n,strokeWidth:o?Number(i)*24/Number(a):i,className:Jx("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 Ve=(n,s)=>{const i=C.forwardRef(({className:r,...u},d)=>C.createElement(fj,{ref:d,iconNode:s,className:Lx(`lucide-${uj(n)}`,r),...u}));return i.displayName=`${n}`,i};/**
96
+ */const $e=(n,a)=>{const i=E.forwardRef(({className:o,...u},d)=>E.createElement(Ew,{ref:d,iconNode:a,className:Jx(`lucide-${Nw(n)}`,o),...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 dj=Ve("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 Mw=$e("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 Fu=Ve("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
106
+ */const Ju=$e("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 hj=Ve("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
111
+ */const _w=$e("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 Ux=Ve("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
116
+ */const Wx=$e("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 mj=Ve("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 Tw=$e("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 gj=Ve("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 Rw=$e("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 Vx=Ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
131
+ */const e1=$e("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 $x=Ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
136
+ */const t1=$e("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 dm=Ve("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
141
+ */const Cm=$e("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 pj=Ve("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 Aw=$e("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 vj=Ve("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
151
+ */const Ow=$e("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 yj=Ve("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 zw=$e("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 Fx=Ve("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 n1=$e("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 Bh=Ve("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"}]]);/**
166
+ */const Wh=$e("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 Pu=Ve("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"}]]);/**
171
+ */const uc=$e("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 Bx=Ve("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"}]]);/**
176
+ */const l1=$e("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 xj=Ve("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"}]]);/**
181
+ */const Dw=$e("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 Sj=Ve("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
186
+ */const Lw=$e("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 bj=Ve("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"}]]);/**
191
+ */const Hw=$e("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 wj=Ve("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"}]]);/**
196
+ */const Uw=$e("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 jj=Ve("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"}]]);/**
201
+ */const $w=$e("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 Cj=Ve("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"}]]);/**
206
+ */const Vw=$e("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 Nj=Ve("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"}]]);/**
211
+ */const Fw=$e("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 Ej=Ve("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"}]]);/**
216
+ */const kw=$e("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 Mj=Ve("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"}]]);/**
221
+ */const Bw=$e("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 Bu=Ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
226
+ */const Wu=$e("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 _j=Ve("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"}]]);/**
231
+ */const Gw=$e("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 Rj=Ve("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"}]]);/**
236
+ */const qw=$e("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 kx=Ve("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"}]]);/**
241
+ */const a1=$e("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 Tj=Ve("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
246
+ */const Qw=$e("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 Aj=Ve("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"}]]);/**
251
+ */const Yw=$e("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
252
  * @license lucide-react v0.468.0 - ISC
253
253
  *
254
254
  * This source code is licensed under the ISC license.
255
255
  * See the LICENSE file in the root directory of this source tree.
256
- */const Oj=Ve("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"}]]);/**
256
+ */const Iw=$e("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
257
  * @license lucide-react v0.468.0 - ISC
258
258
  *
259
259
  * This source code is licensed under the ISC license.
260
260
  * See the LICENSE file in the root directory of this source tree.
261
- */const Ju=Ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
261
+ */const cc=$e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
262
262
  * @license lucide-react v0.468.0 - ISC
263
263
  *
264
264
  * This source code is licensed under the ISC license.
265
265
  * See the LICENSE file in the root directory of this source tree.
266
- */const zj=Ve("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 Dj(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 Hj(n){return n.status==="failed"?"Failed":n.status==="skipped"?"Not in this mode":"Not run"}const Lj=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function Gx(n){if(!n)return"";const s=new Date(n);return Number.isNaN(s.getTime())?"":Lj.format(s)}function hm(n,s){return n.startsWith(`${s}_`)?n.slice(s.length+1):n}function kh(n){return n==null?"–":n.toFixed(2)}const gy={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 Uj(n,s){const i=(n??s??"").split("&")[0];if(!i)return"–";if(gy[i])return gy[i];const r=i.replace(/_/g," ");return r.charAt(0).toUpperCase()+r.slice(1)}function Yr(n,s){return`chr${n}:${s.toLocaleString("en-US")}`}const zn=[["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]],Gh=.0025,Vj=zn.reduce((n,[,s])=>n+s,0),$j=1-Gh*zn.length,Wu=(()=>{const n={};let s=Gh/2;for(const[i,r]of zn){const u=r/Vj*$j;n[i]=[s,s+u],s+=u+Gh}return n})(),py=Object.fromEntries(zn);function ku(n,s){const i=n.replace(/^chr/,""),r=Wu[i];if(!r)return null;const u=Math.min(Math.max(s,0),py[i]);return r[0]+u/py[i]*(r[1]-r[0])}function vy(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 Qd(n,s,i,r,u){const[d,h]=vy(n,s,i,r),[m,p]=vy(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 qh(n,s="start"){let i=null;for(const d of zn){const[h,m]=d,[p,y]=Wu[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]=zn[zn.length-1];return{chrom:r,pos:u}}function Vr(n,s){const i=s>=1e6?0:s>=1e5?1:2;return`${(n/1e6).toFixed(i)} Mb`}const Fj={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}},yy=.004,xy=.003;function Bj(n,s,i){const r=ku(n,s),u=ku(n,i);return r===null||u===null?null:u-r<yy?[r,r+yy]:[r,u]}function Yd(n){return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function kj(n,s,i){return n===1?`one ${s}`:`${n} ${i}`}function qx(n){const i=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([h,m,p])=>{const y=n.events.filter(j=>j.kind===h);if(y.length===0)return[];const x=[...new Set(y.map(j=>j.chrom))],v=x.length>6?[...x.slice(0,6),`${x.length-6} more`]:x,b=x.length===1?`chromosome ${x[0]}`:`chromosomes ${Yd(v)}`,w=h==="amp"&&y.length===1&&y[0].total_cn!==null?` (${Math.round(y[0].total_cn)} copies)`:"";return[`${kj(y.length,m,p)} on ${b}${w}`]}),r=i.length?Yd(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 ${Yd(u)}.`:"No drivers.";return`${r.charAt(0).toUpperCase()}${r.slice(1)}. ${d}`}function mm({fingerprint:n,size:s,title:i,subtitle:r,className:u}){const d=Fj[s],h=d.box/2,m=(n==null?void 0:n.events)??[],p=(n==null?void 0:n.drivers)??[],y=n?`Genome fingerprint: ${qx(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(Wu).map(([x,[v,b]])=>f.jsx("path",{className:"r-neu",strokeWidth:d.ringW,d:Qd(h,h,d.ring,v,b)},x)),m.map((x,v)=>{const b=Bj(x.chrom,x.start,x.end);if(!b)return null;const w=x.kind==="loss"?d.loss:x.kind==="amp"?d.amp:d.gain,j=x.kind==="loss"?d.lossW:x.kind==="amp"?d.ampW:d.gainW;return f.jsx("path",{className:`r-${x.kind}`,strokeWidth:j,d:Qd(h,h,w,b[0],b[1])},`${x.chrom}-${x.start}-${v}`)}),d.drvW>0&&p.map((x,v)=>{const b=ku(x.chrom,x.pos);return b===null?null:f.jsx("path",{className:"r-drv",strokeWidth:d.drvW,d:Qd(h,h,d.drv,b-xy/2,b+xy/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 Gj={"DNA|WG":{label:"WGS",icon:Pu},"RNA|WT":{label:"RNA",icon:mj}};function Sy({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 qj({sex:n}){const s=n==null?void 0:n.toUpperCase();return s==="MALE"?f.jsxs(Sy,{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(Sy,{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(Tj,{size:16,"aria-hidden":!0})}const Qx="wgts-patient-root";function Qj(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 Yx=8;function Id(n,s,i,r){const u=i>=n.x?1:-1,d=Math.min(Yx,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 Yj(n,s,i){const r=i.x>s.x?1:-1,u=Math.min(Yx,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 Ij(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 Xj(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 Kj({data:n,sampleId:s,fingerprint:i,onSample:r}){const u=C.useRef(null),[d,h]=C.useState(null),[m,p]=C.useState(!1);C.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=C.useRef(s),[v,b]=C.useState(null);C.useEffect(()=>{if(x.current===s)return;const R=x.current;x.current=s,b(E=>({from:R,to:s,n:((E==null?void 0:E.n)??0)+1}))},[s]);const w=Xj(n,s);C.useLayoutEffect(()=>{const R=u.current;if(!R)return;const E=()=>{const T=R.getBoundingClientRect(),H=document.getElementById(Qx);if(!H)return;const D=Array.from(R.querySelectorAll("[data-sample]")).map(ee=>{const k=ee.getBoundingClientRect();return{id:ee.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}}),O=Qj(H,T),I=Math.min(...D.map(ee=>ee.top));h({root:O,trunk:I-12,tabs:D})};if(E(),typeof ResizeObserver>"u")return;const U=new ResizeObserver(E);return U.observe(R),()=>U.disconnect()},[n,s]);const j=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:Id(d.root,d.trunk,R.x,R.top)},R.id)),j&&f.jsxs(f.Fragment,{children:[f.jsx("path",{className:"ltabs-haze","data-moving":m,style:{d:`path("${Id(d.root,d.trunk,j.x,j.top)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":m,style:{d:`path("${Id(d.root,d.trunk,j.x,j.top)}")`}}),M&&v&&v.to===j.id&&f.jsx("path",{className:"ltabs-bead",pathLength:1,d:Yj(d.trunk,M,j)},`bead-${v.n}`)]}),j&&N&&f.jsxs("g",{className:"ltabs-match",children:[f.jsx("path",{d:Ij(d.trunk,j,N)}),f.jsx("text",{x:(j.left+j.width/2+N.left+N.width/2)/2,y:d.trunk-27,children:"matched normal"})]})]}),j&&f.jsx("span",{className:"ltabs-thumb","data-moving":m,"aria-hidden":!0,style:{width:j.width,height:j.bottom-j.top,transform:`translate(${j.left}px, ${j.top}px)`}}),f.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:n.samples.map(R=>{const E=R.id===s,U=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":E,className:"ltab",onClick:()=>r(R.id),children:[f.jsxs("span",{className:"ltab-name",children:[R.category==="TUMOR"?f.jsx(mm,{fingerprint:U,size:"mini",className:"h-[18px] w-[18px] flex-none"}):f.jsx(Bx,{size:15,"aria-hidden":!0,className:"flex-none"}),hm(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=Gj[H.technique],O=(D==null?void 0:D.icon)??Pu;return f.jsxs("span",{title:H.id,children:[f.jsx(O,{size:12,"aria-hidden":!0}),(D==null?void 0:D.label)??H.technique]},H.id)})]})]},R.id)})})]})}function Zj({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(mm,{fingerprint:d,size:"mini",className:"h-[16px] w-[16px] flex-none"}):f.jsx(Bx,{size:14,"aria-hidden":!0,className:"flex-none"}),hm(u.id,n.individual.id)," ",u.category==="TUMOR"?"tumour":"normal"]},u.id)})})}function Fr(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 ec(n){return C.useSyncExternalStore(n.subscribe,n.get,n.get)}const gm=Fr(!1),Ir=()=>gm.set(!0),Au=()=>gm.set(!1),Pj=Fr(!0);function Ix({individualId:n,subtitle:s,patientIcon:i,report:r,compact:u,headerInView:d=Pj}){const h=!ec(d),[m,p]=C.useState(!1),[y,x]=C.useState(!1);C.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:Ir,title:"Browse projects and patients",children:"Patients"}),n&&f.jsxs(f.Fragment,{children:[f.jsx(dm,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),i&&f.jsx("span",{id:Qx,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(wj,{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 Jj(){const n=fm(),[s,i]=C.useState("");return f.jsxs("div",{className:`wgts ${qn.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(Pu,{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:Ir,children:f.jsx(Bu,{size:17,"aria-hidden":!0})})]})}),f.jsxs("div",{className:"page",children:[f.jsx(Ix,{}),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:Ir,children:[f.jsx(xj,{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(Bu,{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 tc extends Error{}class Xx extends Error{}function Wj(){try{return localStorage.getItem(Fh)}catch{return null}}function Kx(n){try{n?localStorage.setItem(Fh,n):localStorage.removeItem(Fh)}catch{}}function Zx(){const n=Wj();return{Accept:"application/json",...n?{Authorization:`Token ${n}`}:{}}}async function zl(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(`${qn.apiHost}/wgts/api/${n}${r?`?${r}`:""}`,{headers:Zx()});if(u.status===401)throw new tc;if(u.status===403){const d=await u.json().catch(()=>({}));throw new Xx(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 eC(n){if(!(await fetch(`${qn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${n}`}})).ok)throw new Error("Isabl did not accept that token.");Kx(n)}async function tC(n,s){const i=await fetch(`${qn.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();Kx(r.key)}async function Px(n){const s=await fetch(`${qn.apiHost}/wgts/api/${n}`,{headers:Zx()});if(s.status===401)throw new tc;if(!s.ok)throw new Error(`The dashboard API answered ${s.status}.`);return await s.json()}const nC=()=>Px("projects/"),lC=n=>Px(`projects/${n}/individuals/`);function Qh(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 _i(n){return`fam-${Qh(n)}`}function Jx(n){return n.pk?`${n.app} #${n.pk}`:n.app}function $t(n){return`${n.app}#${n.pk??""}`}const Wx={drivers:"gene",coding:"position",all:"position"},aC=100;function by(){return{scope:"drivers",sort:Wx.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function e1(n){return(n.q.trim()?1:0)+n.effects.length+n.flags.length+(n.range?1:0)}function sC(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 t1={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},n1={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function iC(n){return`${n.chrom}:${n.pos}:${n.ref}>${n.alt}`}const l1=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function rC(n){return l1.test(n.trim())}function oC(n,s,i){return`chr${n}:${s.toLocaleString("en-US")}-${i.toLocaleString("en-US")}`}const uC={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function cC(n){var d;if(!n)return null;const s=n.split(";"),i=(d=n.match(/SOM=(\d+)/))==null?void 0:d[1],r=uC[s[0]];return!i&&!r?n:[i?`${Number(i).toLocaleString("en-US")} somatic ${i==="1"?"sample":"samples"}`:"",r].filter(Boolean).join(", ")}function fC(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 dC(n){return n.oncogene&&n.tsg?"Oncogene and TSG":n.oncogene?"Oncogene":n.tsg?"TSG":null}const Qn=(n,s)=>!(s instanceof tc)&&n<2;function hC(n,s){return fl({queryKey:["individual",n,s??null],queryFn:()=>zl(`individuals/${encodeURIComponent(n)}/`,{version:s}),retry:Qn})}function mC(n,s,i){return fl({queryKey:["metrics",n,s,i??null],queryFn:()=>zl(`individuals/${encodeURIComponent(n)}/metrics/`,{sample:s,version:i}),enabled:!!s,retry:Qn})}function gC(n,s){return fl({queryKey:["fingerprint",n,s??null],queryFn:()=>zl(`individuals/${encodeURIComponent(n)}/fingerprint/`,{version:s}),retry:Qn})}const Ai=(n,s)=>`individuals/${encodeURIComponent(n)}/${s}/`;function pC(n,s,i){return fl({queryKey:["cn",n,s,i??null],queryFn:()=>zl(Ai(n,"cn"),{sample:s,version:i}),enabled:!!s,retry:Qn})}function vC(n,s,i,r,u){return fl({queryKey:["ccf",n,s,i,r,u??null],queryFn:()=>zl(Ai(n,"ccf"),{sample:s,measure:i,version:u,ffpe:r?"all":void 0}),enabled:!!s,retry:Qn})}function yC(n,s,i){return fl({queryKey:["signatures",n,s,i??null],queryFn:()=>zl(Ai(n,"signatures"),{sample:s,version:i}),enabled:!!s,retry:Qn})}function xC(n,s,i){return fl({queryKey:["context",n,s,i??null],queryFn:()=>zl(Ai(n,"context"),{sample:s,version:i}),enabled:!!s,retry:Qn})}function SC(n,s,i){return fl({queryKey:["svs",n,s,i??null],queryFn:()=>zl(Ai(n,"svs"),{sample:s,version:i}),enabled:!!s,retry:Qn})}function bC(n,s,i,r){return fw({queryKey:["variants",n,s,i,r??null],queryFn:({pageParam:u})=>zl(Ai(n,"variants"),{sample:s,version:r,...sC(i),page:String(u),page_size:String(aC)}),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:cx,retry:Qn})}function wC(){return fl({queryKey:["picker","projects"],queryFn:nC,staleTime:6e4,retry:Qn})}function jC(n){return fl({queryKey:["picker","patients",n],queryFn:()=>lC(n),staleTime:6e4,placeholderData:cx,retry:Qn})}const hi=6,CC=16,a1=7,Gu=6;function Xd(n){const s=Math.min(a1,(n-Gu)/2);return`M${hi},${Gu} V${n-s}`}function Kd(n){const s=Math.min(a1,(n-Gu)/2);return`M${hi},${n-s} Q${hi},${n} ${hi+s},${n} H${CC}`}function NC(n,s){return`M${hi},${n} V${s}`}function EC(n,s,i,r){const[u,d]=C.useState(null),[h,m]=C.useState([]),[p,y]=C.useState(!1),[x,v]=C.useState(null),[b,w]=C.useState(280),j=n.map(D=>`${D.key}:${D.available}`).join();C.useLayoutEffect(()=>{if(!u)return;const D=()=>{const I=Array.from(u.querySelectorAll(i));m(n.flatMap((ee,k)=>{const ne=I[k];if(!ne)return[];const oe=ne.offsetTop,ie=ne.offsetHeight;return[{key:ee.key,cy:oe+ie/2,top:oe,height:ie,available:ee.available}]}))};if(D(),typeof ResizeObserver>"u")return;const O=new ResizeObserver(D);return O.observe(u),()=>O.disconnect()},[u,j,i,r]);const N=h.find(D=>D.key===s&&D.available),M=N?{top:N.top,height:N.height}:null;C.useEffect(()=>{if(!N||p)return;const D=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(D)},[N,p]);const[R,E]=C.useState(s);C.useEffect(()=>{if(R===s)return;const D=R;E(s),D&&s&&v(O=>({from:D,to:s,n:((O==null?void 0:O.n)??0)+1}))},[s,R]);const U=x?h.find(D=>D.key===x.from):void 0,[T,H]=C.useState(null);return C.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:U,duration:b}}function MC({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:hi,cy:Gu,r:"2.5",className:"side-root"}),f.jsx("path",{d:Xd(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("${Xd(s.cy)}")`}}),f.jsx("path",{className:"ltabs-on","data-moving":r,style:{d:`path("${Xd(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:NC(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 Zd=[{key:"overview",label:"Overview",icon:bj},{key:"copyNumber",label:"Copy number",icon:dj},{key:"mutations",label:"Mutations",icon:Cj},{key:"structuralVariants",label:"Structural variants",icon:Rj},{key:"signatures",label:"Signatures and HRD",icon:gj},{key:"rna",label:"RNA",icon:Oj,soon:!0},{key:"germline",label:"Germline",icon:_j,soon:!0},{key:"quality",label:"Quality",icon:vj,soon:!0}],wy="wgts-side-collapsed";function _C(){const[n,s]=C.useState(()=>{try{return localStorage.getItem(wy)==="1"}catch{return!1}});return[n,r=>{s(r);try{localStorage.setItem(wy,r?"1":"0")}catch{}}]}function RC({analyses:n,onPage:s,sampleLabel:i,picked:r,onPick:u,sections:d,activeStore:h,onSection:m}){const p=ec(h),[y,x]=_C(),{setBox:v,...b}=EC(Zd.map(({key:O})=>({key:O,available:d.has(O)})),p,".sc-nav",y),[w,j]=C.useState(!1),[N,M]=C.useState(!1),R=["cn","mut","msi","other"],E=(O,I)=>R.indexOf(Qh(O.app))-R.indexOf(Qh(I.app))||O.app.localeCompare(I.app),U=N||r!==null;C.useEffect(()=>{const O=I=>{I.key.toLowerCase()==="k"&&(I.metaKey||I.ctrlKey)&&(I.preventDefault(),Ir())};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[]);const T=n.filter(O=>O.role==="input"),H=T.filter(O=>s.has($t(O))).sort(E),D=[...T.filter(O=>!s.has($t(O))).sort(E),...n.filter(O=>O.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(Pu,{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:Ir,children:f.jsx(Bu,{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(Mj,{size:17,"aria-hidden":!0}):f.jsx(Ej,{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(MC,{...b}),Zd.map(({key:O,label:I,icon:ee,soon:k},ne)=>{const oe=d.has(O);return f.jsxs("div",{className:"contents",children:[k&&!Zd[ne-1].soon&&f.jsx("span",{className:"side-group",children:"Coming soon"}),f.jsxs("button",{type:"button",className:"sc-nav","aria-current":oe&&p===O?"location":void 0,"aria-label":I,disabled:!oe,title:y?I:oe?void 0:"Not available for this sample yet",onClick:()=>m(O),children:[f.jsx(ee,{size:17,strokeWidth:1.7,"aria-hidden":!0}),f.jsx("span",{className:"side-text",children:I})]})]},O)})]}),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":U,onClick:()=>M(O=>!O),children:["Analyses on this page",f.jsx("span",{className:"side-count",children:H.length}),f.jsx($x,{size:14,"aria-hidden":!0,"data-open":U})]}),U&&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","."]}),U&&H.map(O=>{const I=$t(O),ee=O.state==="failed",k=O.modules.filter(ne=>ne.status==="failed");return f.jsxs("button",{type:"button",className:`tb-src${ee?" fail":""}`,"aria-pressed":r===I,title:ee?k.map(ne=>`${ne.label} failed`).join("; "):"Show what it feeds",onClick:()=>u(r===I?null:I),children:[ee?f.jsx(kx,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):f.jsx("span",{className:`tb-dot ${_i(O.app)}`,"aria-hidden":!0}),f.jsxs("span",{className:"truncate",children:[O.app," ",O.version??""]}),ee&&f.jsx("span",{className:"sr-only",children:", failed"}),f.jsx("span",{className:"tb-n",children:O.pk?`#${O.pk}`:""})]},I)}),U&&D.length>0&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"tb-src","aria-expanded":w,onClick:()=>j(O=>!O),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(O=>f.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[f.jsx("span",{className:`tb-dot ${_i(O.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"truncate",children:O.role==="cohort"?`${O.app}${O.project?`, project ${O.project}`:""}`:`${O.app} ${O.version??""}`}),f.jsx("span",{className:"tb-n",children:O.pk?`#${O.pk}`:""})]},$t(O)))]}),U&&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 ts({envelope:n}){const s=n.status==="error",i=s?pj:yj;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 Yh={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:"96 mutational contexts",paragraphs:["Every substitution is one of six kinds (C>A, C>G, C>T, T>A, T>C, T>G, naming the pyrimidine base of the pair) and sits between two neighbouring bases, which gives 96 contexts. The top panel counts the tumour's SNVs in each, as WGSPOST's MutationalPatterns step does. The middle panel is what the fitted signatures rebuild: each signature's probabilities for the 96 contexts, weighted by its contribution above and added up. The bottom panel is the first minus the second, so a bar above the line is a context with more SNVs than the signatures explain.","Share draws each profile as percentages of its own total, which is how the report's figure compares the two; Count draws SNVs. Both profiles share one scale, and the difference its own. Click a class in the header to open it and name its sixteen contexts, written as the base before, the mutated base in colour, and the base after. Hover a column to read all three panels at once.","Cosine similarity and RSS are the report's own measures of the fit: the closer to 1 (cosine) and to 0 (RSS), the better the signatures explain the tumour. They are computed by the report from the relative profiles, as MutationalPatterns does. For an FFPE sample, switch between the run the report uses (its FFPE-filtered calls) and the unfiltered one. When the report did not include the signature matrix its fit used, only the observed profile is drawn."]},{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."]]}]}},TC={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 SNV counts in the 96 mutational contexts, 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 AC(n,s){const i=s.role==="cohort"||s.app.endsWith("Project Application"),r=s.app.replace(/ Project Application$/,""),u=TC[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 OC({topic:n,lineage:s,subject:i,onClose:r}){const u=Yh[n],d=C.useId(),h=C.useRef(null),m=s.filter(T=>T.role!=="cohort"&&!T.app.endsWith("Project Application")),p=s.filter(T=>!m.includes(T)),y=C.useRef(r);y.current=r,C.useEffect(()=>{var I;const T=document.activeElement;(I=h.current)==null||I.focus();const H=document.documentElement,D=H.style.overflow;H.style.overflow="hidden";const O=ee=>{ee.key==="Escape"&&y.current()};return document.addEventListener("keydown",O),()=>{document.removeEventListener("keydown",O),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]=C.useState(0),j=C.useRef(null),N=C.useRef(!1),M=C.useRef(null),R=C.useRef(0);C.useEffect(()=>{const T=j.current;if(!T)return;const H=24,D=()=>{const ee=T.getBoundingClientRect().top,k=Math.max(0,T.scrollHeight-T.clientHeight),ne=v.map(W=>{const X=document.getElementById(W);return X?X.getBoundingClientRect().top-ee:1/0}),oe=Math.max(0,...ne.map(W=>Number.isFinite(W)?W+T.scrollTop-k-H:0)),ie=H+(k>0?oe*Math.min(1,T.scrollTop/k):0);let Y=0;ne.forEach((W,X)=>{W<=ie&&(Y=X)}),w(Y)},O=()=>{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()},I=()=>{N.current&&M.current===null&&(window.clearTimeout(R.current),N.current=!1,D())};return D(),T.addEventListener("scroll",O,{passive:!0}),T.addEventListener("wheel",I,{passive:!0}),T.addEventListener("touchstart",I,{passive:!0}),()=>{window.clearTimeout(R.current),T.removeEventListener("scroll",O),T.removeEventListener("wheel",I),T.removeEventListener("touchstart",I)}},[]);const E=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 O;return M.current=((O=j.current)==null?void 0:O.scrollTop)??0},160),(D=document.getElementById(v[T]))==null||D.scrollIntoView({behavior:H?"auto":"smooth",block:"start"})},U=T=>f.jsxs("li",{className:"info-source",children:[f.jsx("span",{className:`tb-dot ${_i(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:Hx(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(hj,{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:AC(n,T)})]})]},$t(T));return um.createPortal(f.jsx("div",{className:`info-backdrop ${qn.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(Ju,{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:()=>E(H),children:T})},T))})]}),f.jsxs("div",{ref:j,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(O=>f.jsx("p",{children:O},O)),T.terms&&f.jsx("dl",{children:T.terms.map(([O,I])=>f.jsxs("div",{children:[f.jsx("dt",{children:O}),f.jsx("dd",{children:I})]},O))})]},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(U)}),p.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("h4",{children:"Cohort runs"}),f.jsx("ul",{className:"info-sources",children:p.map(U)})]})]})]})]})}),document.body)}function jy(n){return n.split(" ").map(s=>/^[A-Z0-9]{2,}$/.test(s)?s:s.toLowerCase()).join(" ")}function s1({topic:n,lineage:s,subject:i}){const[r,u]=C.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${jy(Yh[n].title)}`,title:`About ${jy(Yh[n].title)}`,"aria-haspopup":"dialog",onClick:()=>u(!0),children:f.jsx(Sj,{size:15,"aria-hidden":!0})}),r&&f.jsx(OC,{topic:n,lineage:s,subject:i,onClose:()=>u(!1)})]})}function zC({lineage:n,children:s}){const[i,r]=C.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:Hx(h.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[f.jsx("span",{className:`tb-dot ${_i(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""," #",h.pk]},$t(h)):f.jsxs("span",{className:"sc-src",children:[f.jsx("span",{className:`tb-dot ${_i(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""]},$t(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}`:""]},$t(h)))]})}function pm(...n){const s=new Map;for(const i of n.flat())i&&!s.has($t(i))&&s.set($t(i),i);return[...s.values()]}const nc=C.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=>$t(N)===d),[w,j]=DC();return f.jsxs(f.Fragment,{children:[w&&f.jsx("div",{className:"sc-full-backdrop","aria-hidden":!0,onClick:()=>j(!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:()=>j(!w),children:w?f.jsx(Nj,{size:16,"aria-hidden":!0}):f.jsx(jj,{size:16,"aria-hidden":!0})}),p&&f.jsx(s1,{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(zC,{lineage:u,children:h})]})]})});function DC(){const[n,s]=C.useState(!1);return C.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 to({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(ts,{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 HC({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(nc,{title:n,subtitle:s,controls:i,lineage:(r==null?void 0:r.lineage)??[],picked:d,footer:m,className:p,info:y,children:f.jsx(to,{label:n,envelope:r,loading:u,skeletonHeight:h,children:x})})}function LC(n,s){const[i,r]=C.useState(null),[u,d]=C.useState(!1);return C.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]),C.useEffect(()=>{if(i&&!u){const h=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(h)}},[i,u]),{thumb:i,moving:u}}function Ri({label:n,options:s,value:i,onChange:r,className:u=""}){const d=C.useRef(null),{thumb:h,moving:m}=LC(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 UC(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 VC({data:n,onVersion:s}){const i=n.report,[r,u]=C.useState(!1),d=C.useRef(null);C.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=UC(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($x,{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(Ri,{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 ${Gx(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 Ih=["purity","ploidy","coverage","tmb","msi","fga"];function $C({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 Cy({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 FC({metric:n}){const s=n.value;if(s===null)return null;switch(n.key){case"purity":case"fga":return f.jsx($C,{value:s});case"ploidy":return f.jsx(Cy,{value:s,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return f.jsx(Cy,{value:Math.log10(Math.max(s,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const BC={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 kC({metric:n,picked:s}){const i=n.value===null&&!n.text,r=!!s&&n.sources.some(u=>$t(u)===s);return f.jsxs("div",{className:"kpi","data-picked":r,title:BC[n.key],children:[f.jsxs("span",{className:"kpi-top",children:[f.jsx("span",{className:"kpi-label",children:n.label}),f.jsx(FC,{metric:n})]}),f.jsx("span",{className:"kpi-value","data-empty":i,children:i?Hj(n):Dj(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 ${_i(u.app)}`,"aria-hidden":!0}),f.jsx("span",{className:"min-w-0",children:Jx(u)})]},$t(u)))}):f.jsx("span",{className:"kpi-src",children:n.etl?`from ${n.etl}`:"no source"})]})}function GC({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=>Ih.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(s1,{topic:"summary",lineage:u,subject:n})}),f.jsx(mm,{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?qx(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&&Ih.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(ts,{envelope:i})}),d.map(m=>f.jsx(kC,{metric:m,picked:r},m.key))]})]})}function qC({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(kx,{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(Jx).join(", ")]})]})]},`${r.etl}-${r.node}`)})})}function QC({onSignedIn:n}){const[s,i]=C.useState("password"),[r,u]=C.useState(""),[d,h]=C.useState(""),[m,p]=C.useState(""),[y,x]=C.useState(null),[v,b]=C.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 j=>{j.preventDefault(),b(!0),x(null);try{s==="password"?await tC(r,d):await eC(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:j=>u(j.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:j=>h(j.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:j=>p(j.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 rt=1e3,Xh=.35,YC=8,qu=.1;function Vu(n,s){return(ku(n,s)??0)*rt}function cl(n){const[s,i]=Wu[n.replace(/^chr/,"")];return[s*rt,i*rt]}function Pd(n,s,i){const[r,u]=n,d=Math.min(rt,Math.max(Xh,(u-r)*i)),h=Math.min(Math.max(s-(s-r)/(u-r)*d,0),rt-d);return[h,h+d]}function Ou(n,s){const i=n[1]-n[0],r=Math.min(Math.max(n[0]+s,0),rt-i);return[r,r+i]}function IC(n,s,i){const r=Math.min(Math.max(i,0),rt);return s===0?[Math.min(r,n[1]-Xh),n[1]]:[n[0],Math.max(r,n[0]+Xh)]}function XC(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),rt-h);return[m,m+h]}function Ny(n){return n[1]-n[0]<rt-.5}function KC(n){for(const[s]of zn){const[i,r]=cl(s);if(n>=i&&n<=r)return s}return null}function ZC(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(YC,Math.max(n.baseline+2,Math.ceil(r)))}function PC(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 JC(n,s,i=5){const r=zn.filter(([b])=>{const[w,j]=cl(b);return j>n&&w<s});if(r.length!==1)return r.map(([b])=>{const[w,j]=cl(b);return{value:(w+j)/2,label:b}});const[u,d]=r[0],[h,m]=cl(u),p=(Math.max(n,h)-h)/(m-h)*d,y=(Math.min(s,m)-h)/(m-h)*d,x=PC(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:Vr(b,x)});return v}function WC(n,s){if(n<=.5&&s>=rt-.5)return null;const i=qh(n/rt,"start"),r=qh(s/rt,"end");if(i.chrom===r.chrom){const u=(r.pos-i.pos)/10;return`chr${i.chrom}: ${Vr(i.pos,u).replace(" Mb","")}–${Vr(r.pos,u)}`}return`chr${i.chrom}:${Vr(i.pos,1e6)} – chr${r.chrom}:${Vr(r.pos,1e6)}`}function eN(n){const{chrom:s,pos:i}=qh(Math.min(Math.max(n,0),rt)/rt,"start");return`chr${s} · ${(i/1e6).toFixed(1)} Mb`}const lc=n=>n.call??"neutral",tN={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},i1={neutral:"var(--chev)",gain:"var(--gain)",amp:"var(--gain-strong)",loss:"var(--loss)"};function nN(n){return{call:tN[lc(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 lN(n){const s=new Map;for(const i of n){const r=i.gene??"?",u=s.get(r)??{gene:r,x:Vu(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 Jd(n,s,i){const r=s.replace(/^chr/,"");return n.segments.find(u=>u.chrom===r&&u.start<=i&&i<=u.end)}function Wd(n,s){return n?s==="total"?n.total_cn:n.major_cn:null}function aN(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 Kh(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 r1(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 sN=n=>1-(1-n)**3;function wa(n,s,i=500){return n.length*s*(i>=600?.6:.56)}function ms({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 Zh(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 Oi(n=640){const s=C.useRef(null),[i,r]=C.useState(n);return C.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 Ey=36,iN=14,$r=232,My=22,fi=28,_y=19,rN=480,oN=C.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=j=>d.plotL+(j-u[0])/x*d.plotW,b=j=>d.plotTop+(1-Math.min(Math.max(j,0),d.top)/d.top)*$r,w=b(d.baseline);return f.jsx("g",{children:s.map((j,N)=>{const[M,R]=i[N];if(R<u[0]-1||M>u[1]+1)return null;const E=lc(j),U=v(M),T=Math.max(v(R)-U,E==="neutral"?2:7),H=h===N;if(r==="total"){if(j.total_cn===null)return null;const I=b(j.total_cn);return f.jsxs("g",{className:"cn-seg","data-call":E,"data-on":H||void 0,children:[E!=="neutral"&&f.jsx("rect",{x:U,y:Math.min(I,w),width:T,height:Math.abs(I-w),fill:`url(#${m[E]})`,className:"cn-col"}),f.jsx("line",{x1:U,x2:U+T,y1:I,y2:I,style:{stroke:i1[E]},className:"cn-line"}),f.jsx("rect",{x:U-2,y:Math.min(I,w)-9,width:T+4,height:Math.abs(I-w)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:U+T/2,y:I}),onMouseLeave:()=>p(null),onClick:()=>y(j)})]},N)}if(j.major_cn===null||j.minor_cn===null)return null;const D=b(j.major_cn+qu),O=b(j.minor_cn-qu);return f.jsxs("g",{className:"cn-seg","data-on":H||void 0,children:[f.jsx("line",{x1:U,x2:U+T,y1:O,y2:O,className:"cn-line cn-minor"}),f.jsx("line",{x1:U,x2:U+T,y1:D,y2:D,className:"cn-line cn-major"}),f.jsx("rect",{x:U-2,y:Math.min(D,O)-9,width:T+4,height:Math.abs(D-O)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>p({index:N,x:U+T/2,y:D}),onMouseLeave:()=>p(null),onClick:()=>y(j)})]},N)})})}),uN=C.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)*(fi-6);return f.jsxs("g",{pointerEvents:"none",children:[zn.map(([x],v)=>{const[b,w]=cl(x);return v%2===0?f.jsx("rect",{x:h+b/rt*m,y:p,width:(w-b)/rt*m,height:fi,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=lc(x),j=h+i[v][0]/rt*m,N=Math.max((i[v][1]-i[v][0])/rt*m,w==="neutral"?1:2);return f.jsx("line",{x1:j,x2:j+N,y1:y(b),y2:y(b),className:"cn-mini-line",style:{stroke:r==="total"?i1[w]:"var(--ink-2)"}},v)})]})});function cN({data:n,mode:s,drivers:i,focus:r,locate:u,view:d,onView:h,onSegment:m,onGene:p}){const[y,x]=Oi(900),v=C.useRef(null),b=C.useId(),w={gain:`${b}-gain`,amp:`${b}-amp`,loss:`${b}-loss`},[j,N]=C.useState(d.window),M=C.useRef(j);M.current=j,C.useLayoutEffect(()=>{const K=d.window,ae=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!d.smooth||ae){N(K);return}const _e=M.current,Fe=performance.now();let ke=0;const jt=it=>{const et=Math.min(1,(it-Fe)/rN);N(XC(_e,K,sN(et))),et<1&&(ke=requestAnimationFrame(jt))};return ke=requestAnimationFrame(jt),()=>cancelAnimationFrame(ke)},[d]);const[R,E]=C.useState(null),[U,T]=C.useState(null),[H,D]=C.useState(null),[O,I]=C.useState(!1),ee=C.useRef(!1),k=C.useMemo(()=>ZC(n,s),[n,s]),ne=C.useMemo(()=>n.segments.some(K=>Math.max(K.total_cn??0,K.major_cn??0)>k),[n,k]),oe=C.useMemo(()=>n.segments.map(K=>[Vu(K.chrom,K.start),Vu(K.chrom,K.end)]),[n]),ie=C.useMemo(()=>lN(i),[i]),Y=Ey,W=Math.max(x-Ey-iN,200),X=j[1]-j[0],J=K=>Y+(K-j[0])/X*W,le=K=>j[0]+(K-Y)/W*X,ve=K=>wa(K,11.5,600)+14,je=C.useMemo(()=>{const K=ie.map(ae=>({left:Y+ae.x/rt*W-ve(ae.gene)/2,width:ve(ae.gene)}));return ie.length?Math.max(...Kh(K,4))+1:0},[ie,Y,W]),Be=(je?je*_y+8:4)+4,Xe=Be+$r,A=Xe+10,V=A+My+12,te=V+fi+6,ue={plotL:Y,plotW:W,plotTop:Be,top:k,baseline:n.baseline},me=K=>Be+(1-Math.min(Math.max(K,0),k)/k)*$r,Se=ie.map((K,ae)=>({m:K,index:ae,x:J(K.x)})).filter(({x:K})=>K>=Y-4&&K<=Y+W+4),Ce=Kh(Se.map(({m:K,x:ae})=>({left:ae-ve(K.gene)/2,width:ve(K.gene)})),4),ce=(K,ae)=>K>=Y&&K<=Y+W&&ae>=Be&&ae<=Xe,ge=K=>{const ae=v.current.getBoundingClientRect();return[K.clientX-ae.left,K.clientY-ae.top]},ct=C.useCallback(K=>h({window:K,smooth:!1}),[h]),vt=C.useCallback(K=>h({window:K,smooth:!0}),[h]),Dn=C.useRef({shown:j,plotL:Y,plotW:W,plotTop:Be,plotBottom:Xe,move:ct});Dn.current={shown:j,plotL:Y,plotW:W,plotTop:Be,plotBottom:Xe,move:ct},C.useEffect(()=>{const K=y.current;if(!K)return;const ae=_e=>{if(!_e.ctrlKey||!v.current)return;const Fe=v.current.getBoundingClientRect(),ke=_e.clientX-Fe.left,jt=_e.clientY-Fe.top,it=Dn.current;if(ke<it.plotL||ke>it.plotL+it.plotW||jt<it.plotTop||jt>it.plotBottom)return;_e.preventDefault();const et=it.shown[0]+(ke-it.plotL)/it.plotW*(it.shown[1]-it.shown[0]),Xn=Math.max(-50,Math.min(50,_e.deltaY));it.move(Pd(it.shown,et,Math.exp(Xn*.01)))};return K.addEventListener("wheel",ae,{passive:!1}),()=>K.removeEventListener("wheel",ae)},[y]),C.useEffect(()=>{u&&/^(\d+|X)$/.test(u.chrom.replace(/^chr/,""))&&vt(cl(u.chrom))},[u,vt]);const en=K=>{if(K.button!==0)return;const[ae,_e]=ge(K);if(!ce(ae,_e)||!Ny(j))return;K.preventDefault();const Fe=j;I(!0),Zh(K,ke=>ct(Ou(Fe,-(ke/W)*(Fe[1]-Fe[0]))),ke=>{I(!1),ke&&(ee.current=!0,setTimeout(()=>ee.current=!1,0))})},st=K=>{const[ae,_e]=ge(K);D(ce(ae,_e)?ae:null)},$e=K=>{const[ae,_e]=ge(K);if(!ce(ae,_e))return;const Fe=KC(le(ae));Fe&&vt(cl(Fe))},Qt=K=>{const ae=(j[0]+j[1])/2;if(K.key==="ArrowLeft"||K.key==="ArrowRight")K.preventDefault(),ct(Ou(j,(K.key==="ArrowLeft"?-.15:.15)*X));else if(K.key==="+"||K.key==="=")vt(Pd(j,ae,.6));else if(K.key==="-")vt(Pd(j,ae,1/.6));else if(K.key==="0"||K.key==="Home")vt([0,rt]);else return;K.key!=="ArrowLeft"&&K.key!=="ArrowRight"&&K.preventDefault()},Ft=C.useCallback(K=>{ee.current||m(K)},[m]),tn=zn.map(([K],ae)=>{const[_e,Fe]=cl(K);return{chrom:K,i:ae,x0:J(_e),x1:J(Fe)}}).filter(({x0:K,x1:ae})=>ae>Y&&K<Y+W),Bt=tn.length===1?tn[0]:null,dl=Bt?JC(j[0],j[1],Math.max(2,Math.round(W/120))):[],ht=(()=>{if(!r)return null;const K=Vu(r.chrom,r.pos);if(K<j[0]||K>j[1])return null;const ae=Jd(n,r.chrom,r.pos),_e=Wd(ae,s),Fe=s==="allele"&&_e!==null?qu:0;return{x:J(K),y:me((_e??n.baseline)+Fe),copies:(ae==null?void 0:ae.total_cn)??null}})(),fn=R?n.segments[R.index]:null,Yt=fn?nN(fn):null,dn=U!==null?ie[U]:null,Yn=K=>Y+K/rt*W,Tt={x0:Yn(j[0]),x1:Yn(j[1])},Dl=Ny(j),In=(K,ae)=>{K.stopPropagation(),K.preventDefault();const _e=j;I(!0),Zh(K,Fe=>{const ke=Fe/W*rt;ct(ae==="move"?Ou(_e,ke):IC(_e,ae,_e[ae]+ke))},()=>I(!1))};return f.jsxs("div",{ref:y,className:"cn","data-dragging":O||void 0,"data-zoomed":Dl||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:Qt,children:[f.jsxs("svg",{ref:v,width:x,height:te,"aria-hidden":!0,onPointerDown:en,onPointerMove:st,onPointerLeave:()=>D(null),onDoubleClick:$e,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:Y-4,y:Be-2,width:W+8,height:$r+4})})]}),f.jsx("g",{clipPath:`url(#${b}-plot)`,children:zn.map(([K],ae)=>{const[_e,Fe]=cl(K),ke=J(_e),jt=J(Fe);return ae%2===0&&jt>Y&&ke<Y+W?f.jsx("rect",{x:ke,y:Be,width:jt-ke,height:$r,className:"cn-band"},K):null})}),Array.from({length:k+1},(K,ae)=>f.jsxs("g",{children:[f.jsx("line",{x1:Y,x2:Y+W,y1:me(ae),y2:me(ae),className:"cn-grid"}),f.jsx("text",{x:Y-10,y:me(ae)+4,textAnchor:"end",className:"cn-tick",children:ae===k&&ne?`${ae}+`:ae})]},ae)),f.jsx("line",{x1:Y,x2:Y+W,y1:me(n.baseline),y2:me(n.baseline),className:"cn-baseline"}),f.jsxs("text",{x:Y+8,y:me(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(oN,{segments:n.segments,spans:oe,mode:s,shown:j,geo:ue,hover:R?R.index:null,grad:w,onHover:E,onClick:Ft})})}),H!==null&&!O&&!R&&U===null&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:H,x2:H,y1:Be,y2:Xe,className:"cn-guide"}),f.jsxs("g",{transform:`translate(${Math.min(Math.max(H,Y+52),Y+W-52)} ${Xe-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:eN(le(H))})]})]}),Se.map(({m:K,x:ae,index:_e},Fe)=>{const ke=Jd(n,K.chrom,K.pos),jt=Wd(ke,s),it=me((jt??n.baseline)+(s==="allele"&&jt!==null?qu:0)),et=ve(K.gene),Xn=4+Ce[Fe]*_y,Hl=U===_e;return f.jsxs("g",{className:"cn-driver","data-on":Hl||void 0,onPointerDown:Na=>Na.stopPropagation(),onMouseEnter:()=>T(_e),onMouseLeave:()=>T(null),onClick:()=>p(K.gene),children:[f.jsx("line",{x1:ae,x2:ae,y1:Xn+16,y2:it,className:"cn-leader"}),f.jsx("rect",{x:ae-et/2,y:Xn,width:et,height:16,rx:8,className:"cn-chip"}),f.jsx("text",{x:ae,y:Xn+11.5,textAnchor:"middle",className:"cn-gene",children:K.gene}),f.jsx("circle",{cx:ae,cy:it,r:Hl?6.5:5,className:"cn-dot"})]},K.gene)}),ht&&r&&f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:ht.x,x2:ht.x,y1:Be,y2:Xe,className:"cn-focus-line"}),f.jsx("circle",{cx:ht.x,cy:ht.y,r:6.5,className:"cn-focus-dot"}),(()=>{const K=`${r.gene??"?"}${ht.copies!==null?` ${ht.copies} copies`:""}`,ae=wa(K,11.5,600)+14,_e=ht.x+12+ae>Y+W;return f.jsxs("g",{transform:`translate(${_e?ht.x-12-ae:ht.x+12} ${ht.y-12})`,children:[f.jsx("rect",{width:ae,height:22,rx:7,className:"cn-focus-chip"}),f.jsx("text",{x:7,y:15,className:"cn-focus-text",children:K})]})})()]}),f.jsxs("g",{className:"cn-strip",children:[tn.map(({chrom:K,i:ae,x0:_e,x1:Fe})=>{const ke=Math.max(_e,Y),jt=Math.min(Fe,Y+W),it=jt-ke,et=Bt?`chr${K}`:K;return f.jsxs("g",{className:"cn-pill",onClick:()=>vt(cl(K)),role:"presentation",children:[f.jsx("title",{children:`Zoom to chromosome ${K}`}),f.jsx("rect",{x:ke+.5,y:A,width:Math.max(it-1,1),height:My,rx:7,"data-odd":ae%2?"":void 0}),it>=wa(et,11,600)+3&&f.jsx("text",{x:Bt?ke+10:(ke+jt)/2,y:A+15,textAnchor:Bt?"start":"middle",children:et})]},K)}),Bt&&dl.map(K=>{const ae=J(K.value);return ae>Math.max(Bt.x0,Y)+70&&ae<Y+W-20?f.jsxs("g",{pointerEvents:"none",children:[f.jsx("line",{x1:ae,x2:ae,y1:A+3,y2:A+9,className:"cn-mb-tick"}),f.jsx("text",{x:ae,y:A+18,textAnchor:"middle",className:"cn-mb",children:K.label})]},K.value):null})]}),f.jsx(uN,{segments:n.segments,spans:oe,mode:s,top:k,baseline:n.baseline,plotL:Y,plotW:W,y0:V}),f.jsx("rect",{x:Y,y:V,width:W,height:fi,fill:"transparent",className:"cn-mini-track",onPointerDown:K=>{const[ae]=ge(K),_e=j[1]-j[0],Fe=(ae-Y)/W*rt;vt(Ou([Fe-_e/2,Fe+_e/2],0))}}),Dl&&f.jsxs("g",{className:"cn-mini-window",children:[f.jsx("rect",{x:Tt.x0,y:V-1,width:Math.max(Tt.x1-Tt.x0,4),height:fi+2,rx:6,onPointerDown:K=>In(K,"move"),className:"cn-mini-win"}),[0,1].map(K=>f.jsx("rect",{x:(K===0?Tt.x0:Tt.x1)-4,y:V+fi/2-9,width:8,height:18,rx:4,className:"cn-mini-handle",onPointerDown:ae=>In(ae,K)},K))]})]}),Yt&&R&&f.jsxs(ms,{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":lc(fn),"aria-hidden":!0}),Yt.call,f.jsx("span",{className:"ctip-sub",children:Yt.copies})]}),Yt.alleles&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Alleles"}),f.jsx("b",{children:Yt.alleles})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Region"}),f.jsx("b",{className:"mono",children:Yt.span})]}),Yt.log2&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"log2 ratio"}),f.jsx("b",{children:Yt.log2})]}),f.jsx("span",{className:"ctip-note",children:"Click to list the mutations in this segment"})]}),dn&&U!==null&&f.jsxs(ms,{x:J(dn.x),y:Be+10,width:x,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("i",{children:dn.gene}),dn.changes&&f.jsx("span",{className:"ctip-sub",children:dn.changes})]}),(()=>{const K=Wd(Jd(n,dn.chrom,dn.pos),s);return K!==null?f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Copy number here"}),f.jsx("b",{children:K})]}):null})(),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function Rr({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 fN({envelope:n,loading:s,picked:i,sampleLabel:r,drivers:u,focus:d,locate:h,onSegment:m,onGene:p}){var M;const[y,x]=C.useState("total"),[v,b]=C.useState({window:[0,rt],smooth:!1}),w=((M=n==null?void 0:n.data)==null?void 0:M.allele_specific)??!1,j=WC(...v.window),N=C.useCallback(()=>b({window:[0,rt],smooth:!0}),[]);return f.jsx(HC,{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:[j&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:j}),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(zj,{size:15,"aria-hidden":!0})})]}),f.jsx(Ri,{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(Rr,{color:"var(--gain)",label:"Gain"}),f.jsx(Rr,{color:"var(--gain-strong)",label:"Amplification"}),f.jsx(Rr,{color:"var(--loss)",label:"Loss"})]}):f.jsxs(f.Fragment,{children:[f.jsx(Rr,{color:"var(--ink-2)",label:"Major allele"}),f.jsx(Rr,{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(cN,{data:R,mode:w?y:"total",drivers:u,focus:d,locate:h,view:v,onView:b,onSegment:m,onGene:p})})}function dN(n){const[s,i]=n.range;return[[s,0],...n.bins.map(r=>[(r.x0+r.x1)/2,r.n]),[i,0]]}function eh(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 hN(n){return n==="ccf"?"CCF":"VAF"}function _l(n,s){return Math.min(Math.max(s,n.range[0]),n.range[1])}function mN(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 gN(n,s){return n.measure==="ccf"?s===1?"1.0":s.toFixed(2).replace(/0$/,""):s.toFixed(1)}const Ja=14,pN=22,Tr=118,vN=40,si=19,Ry=n=>Math.round(n*100)/100;function yN({data:n,range:s,focus:i,onRange:r,onGene:u}){const[d,h]=Oi(),m=C.useId(),p=C.useRef(null),[y,x]=C.useState(null),[v,b]=C.useState(null),[w,j]=n.range,N=h-pN,M=V=>Ja+(V-w)/(j-w)*(N-Ja),R=V=>w+(V-Ja)/(N-Ja)*(j-w),E=C.useMemo(()=>dN(n),[n]),U=Math.max(1,...E.map(V=>V[1])),T=V=>V*si+8+Tr,H=(V,te)=>T(V)-te/(U*1.1)*Tr,D=C.useMemo(()=>[...n.drivers].sort((V,te)=>V.value-te.value),[n.drivers]),O=D.map(V=>({left:M(_l(n,V.value))-wa(V.gene??"?",11.5,600)/2-6,width:wa(V.gene??"?",11.5,600)+12})),I=Kh(O,4),ee=D.length?Math.max(...I)+1:0,k=T(ee),ne=k+vN,oe=E.map(([V,te])=>[M(V),H(ee,te)]),ie=aN(oe),Y=`${ie} L${M(j).toFixed(2)},${k} L${M(w).toFixed(2)},${k} Z`,W=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,X=y?W(y):s,J=V=>{const te=p.current.getBoundingClientRect();return R(Math.min(Math.max(V-te.left,Ja),N))},le=(V,te,ue)=>{V.preventDefault(),V.stopPropagation();let me=te(J(V.clientX));x(me),Zh(V,(Se,Ce)=>{me=ue(me,J(Ce.clientX)),x(me)},()=>{const[Se,Ce]=W(me);if(x(null),M(Ce)-M(Se)<4)return r(null);r([Ry(_l(n,Se)),Ry(_l(n,Ce))])})},ve=(V,te)=>V.kind==="move"?V:{...V,to:te},je=(V,te)=>{if(V.kind!=="move")return V;const ue=V.range[1]-V.range[0],me=Math.min(Math.max(V.range[0]+(te-V.grab),w),j-ue);return{...V,grab:te,range:[me,me+ue]}},Le=X?[M(_l(n,X[0])),M(_l(n,X[1]))]:null,Be=hN(n.measure),Xe=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":`${Be} 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&&le(V,te=>({kind:"new",from:te,to:te}),ve)},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:Le&&f.jsx("rect",{x:Le[0],y:0,width:Math.max(Le[1]-Le[0],0),height:ne})})]}),mN(n).map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:M(V),x2:M(V),y1:ee*si+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:gN(n,V)})]},V)),n.measure==="ccf"&&w<=1&&j>=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":Le?"":void 0,children:[f.jsx("path",{d:Y,fill:`url(#${m}-fill)`}),f.jsx("path",{d:ie,className:"dens-line"})]}),Le&&f.jsx("g",{className:"dens-curve dens-lit",children:f.jsxs("g",{clipPath:`url(#${m}-spot)`,children:[f.jsx("path",{d:Y,fill:`url(#${m}-fill)`}),f.jsx("path",{d:ie,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,te)=>{const ue=_l(n,V.value),me=M(ue),Se=H(ee,eh(E,ue)),Ce=V.gene??"?",ce=wa(Ce,11.5,600)+12,ge=8+I[te]*si,ct=v===te;return f.jsxs("g",{className:"dens-driver","data-on":ct||void 0,onPointerDown:vt=>vt.stopPropagation(),onMouseEnter:()=>b(te),onMouseLeave:()=>b(null),onClick:()=>V.gene&&u(V.gene),children:[f.jsx("line",{x1:me,x2:me,y1:ge+15,y2:Se,className:"dens-leader"}),f.jsx("rect",{x:me-ce/2,y:ge,width:ce,height:16,rx:8,className:"dens-chip"}),f.jsx("text",{x:me,y:ge+11.5,textAnchor:"middle",className:"dens-gene",children:Ce}),f.jsx("circle",{cx:me,cy:Se,r:ct?7:5.5,className:"dens-dot"})]},`${Ce}-${te}`)}),Xe!=null&&f.jsx("g",{className:"dens-focus",pointerEvents:"none",children:(()=>{const V=_l(n,Xe),te=M(V),ue=H(ee,eh(E,V)),me=`${(i==null?void 0:i.gene)??"?"} ${Xe.toFixed(2)}`,Se=wa(me,11,600)+14,Ce=te+12+Se>h;return f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:te,x2:te,y1:ue,y2:k,className:"dens-focus-line"}),f.jsx("circle",{cx:te,cy:ue,r:6.5,className:"dens-focus-dot"}),f.jsxs("g",{transform:`translate(${Ce?te-12-Se:te+12} ${ue-11})`,children:[f.jsx("rect",{width:Se,height:22,rx:7,className:"dens-focus-chip"}),f.jsx("text",{x:7,y:15,className:"dens-focus-text",children:me})]})]})})()}),X&&Le&&f.jsxs("g",{className:"dens-brush",children:[f.jsx("rect",{x:Le[0],y:ee*si+4,width:Math.max(Le[1]-Le[0],0),height:Tr+8,className:"dens-sel",onPointerDown:V=>le(V,te=>({kind:"move",grab:te,range:X}),je)}),[0,1].map(V=>f.jsxs("g",{children:[f.jsx("line",{x1:Le[V],x2:Le[V],y1:ee*si+4,y2:k,className:"dens-sel-edge"}),f.jsx("rect",{x:Le[V]-5,y:ee*si+4,width:10,height:Tr+8,className:"dens-edge",onPointerDown:te=>le(te,()=>({kind:"edge",fixed:X[1-V],to:X[V]}),ve)}),f.jsx("rect",{x:Le[V]-3,y:k-Tr/2-10,width:6,height:20,rx:3,className:"dens-grip",pointerEvents:"none"})]},V)),f.jsxs("g",{transform:`translate(${Math.min(Math.max((Le[0]+Le[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:[X[0].toFixed(2)," – ",X[1].toFixed(2)]})]})]})]}),A&&v!==null&&f.jsxs(ms,{x:M(_l(n,A.value)),y:H(ee,eh(E,_l(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:Be}),f.jsx("b",{children:A.value.toFixed(2)})]}),f.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function xN({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(Ri,{label:"Measure",value:i,onChange:r,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),f.jsx(to,{label:p,envelope:n,loading:s,skeletonHeight:180,children:x=>f.jsx(yN,{data:x,range:u,focus:d,onRange:h,onGene:m})})]})}const SN=Object.keys(t1),bN=Object.keys(n1);function Ty(n,s){return n.includes(s)?n.filter(i=>i!==s):[...n,s]}function th({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(Vx,{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 wN({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"}),SN.map(h=>f.jsx(th,{label:t1[h],count:r==null?void 0:r[h],active:n.effects.includes(h),onClick:()=>i({effects:Ty(n.effects,h)})},h))]}),f.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[f.jsx("span",{className:"facet-title",children:"Flags"}),bN.map(h=>f.jsx(th,{label:n1[h],count:u==null?void 0:u[h],active:n.flags.includes(h),onClick:()=>i({flags:Ty(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(th,{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(Ju,{size:13,"aria-hidden":!0})})]})]}),e1(n)>0&&f.jsx("button",{type:"button",className:"facet-clear",onClick:()=>i({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}/**
266
+ */const Xw=$e("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 Kw(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 Pw(n){return n.status==="failed"?"Failed":n.status==="skipped"?"Not in this mode":"Not run"}const Zw=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short",year:"numeric"});function s1(n){if(!n)return"";const a=new Date(n);return Number.isNaN(a.getTime())?"":Zw.format(a)}function Em(n,a){return n.startsWith(`${a}_`)?n.slice(a.length+1):n}function em(n){return n==null?"–":n.toFixed(2)}const My={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 Jw(n,a){const i=(n??a??"").split("&")[0];if(!i)return"–";if(My[i])return My[i];const o=i.replace(/_/g," ");return o.charAt(0).toUpperCase()+o.slice(1)}function lr(n,a){return`chr${n}:${a.toLocaleString("en-US")}`}const Hn=[["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]],tm=.0025,Ww=Hn.reduce((n,[,a])=>n+a,0),eN=1-tm*Hn.length,fc=(()=>{const n={};let a=tm/2;for(const[i,o]of Hn){const u=o/Ww*eN;n[i]=[a,a+u],a+=u+tm}return n})(),_y=Object.fromEntries(Hn);function ec(n,a){const i=n.replace(/^chr/,""),o=fc[i];if(!o)return null;const u=Math.min(Math.max(a,0),_y[i]);return o[0]+u/_y[i]*(o[1]-o[0])}function Ty(n,a,i,o){const u=o*2*Math.PI-Math.PI/2;return[n+i*Math.cos(u),a+i*Math.sin(u)]}function th(n,a,i,o,u){const[d,h]=Ty(n,a,i,o),[m,g]=Ty(n,a,i,u),y=u-o>.5?1:0;return`M${d.toFixed(2)},${h.toFixed(2)} A${i},${i} 0 ${y} 1 ${m.toFixed(2)},${g.toFixed(2)}`}function nm(n,a="start"){let i=null;for(const d of Hn){const[h,m]=d,[g,y]=fc[h];if(n<g&&a==="end"&&i)return{chrom:i[0],pos:i[1]};if(n<=y)return{chrom:h,pos:Math.round(Math.max(0,(n-g)/(y-g))*m)};i=d}const[o,u]=Hn[Hn.length-1];return{chrom:o,pos:u}}function Po(n,a){const i=a>=1e6?0:a>=1e5?1:2;return`${(n/1e6).toFixed(i)} Mb`}const tN={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}},Ry=.004,Ay=.003;function nN(n,a,i){const o=ec(n,a),u=ec(n,i);return o===null||u===null?null:u-o<Ry?[o,o+Ry]:[o,u]}function nh(n){return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function lN(n,a,i){return n===1?`one ${a}`:`${n} ${i}`}function i1(n){const i=[["amp","amplification","amplifications"],["gain","gain","gains"],["loss","loss","losses"]].flatMap(([h,m,g])=>{const y=n.events.filter(j=>j.kind===h);if(y.length===0)return[];const x=[...new Set(y.map(j=>j.chrom))],v=x.length>6?[...x.slice(0,6),`${x.length-6} more`]:x,S=x.length===1?`chromosome ${x[0]}`:`chromosomes ${nh(v)}`,w=h==="amp"&&y.length===1&&y[0].total_cn!==null?` (${Math.round(y[0].total_cn)} copies)`:"";return[`${lN(y.length,m,g)} on ${S}${w}`]}),o=i.length?nh(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 ${nh(u)}.`:"No drivers.";return`${o.charAt(0).toUpperCase()}${o.slice(1)}. ${d}`}function Mm({fingerprint:n,size:a,title:i,subtitle:o,className:u}){const d=tN[a],h=d.box/2,m=(n==null?void 0:n.events)??[],g=(n==null?void 0:n.drivers)??[],y=n?`Genome fingerprint: ${i1(n)}`:"No copy-number data";return c.jsxs("svg",{viewBox:`0 0 ${d.box} ${d.box}`,role:a==="mini"?void 0:"img","aria-label":a==="mini"?void 0:y,"aria-hidden":a==="mini"?!0:void 0,className:u,children:[c.jsxs("g",{fill:"none",strokeLinecap:"butt",children:[Object.entries(fc).map(([x,[v,S]])=>c.jsx("path",{className:"r-neu",strokeWidth:d.ringW,d:th(h,h,d.ring,v,S)},x)),m.map((x,v)=>{const S=nN(x.chrom,x.start,x.end);if(!S)return null;const w=x.kind==="loss"?d.loss:x.kind==="amp"?d.amp:d.gain,j=x.kind==="loss"?d.lossW:x.kind==="amp"?d.ampW:d.gainW;return c.jsx("path",{className:`r-${x.kind}`,strokeWidth:j,d:th(h,h,w,S[0],S[1])},`${x.chrom}-${x.start}-${v}`)}),d.drvW>0&&g.map((x,v)=>{const S=ec(x.chrom,x.pos);return S===null?null:c.jsx("path",{className:"r-drv",strokeWidth:d.drvW,d:th(h,h,d.drv,S-Ay/2,S+Ay/2)},`${x.gene}-${x.pos}-${v}`)})]}),a==="hero"&&i&&c.jsxs(c.Fragment,{children:[c.jsx("text",{className:"t-ink",x:h,y:h-2,textAnchor:"middle",fontSize:"24",fontWeight:"800",children:i}),o&&c.jsx("text",{className:"t-faint",x:h,y:h+18,textAnchor:"middle",fontSize:"12",fontWeight:"600",children:o})]})]})}const aN={"DNA|WG":{label:"WGS",icon:uc},"RNA|WT":{label:"RNA",icon:Tw}};function Oy({children:n}){return c.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 sN({sex:n}){const a=n==null?void 0:n.toUpperCase();return a==="MALE"?c.jsxs(Oy,{children:[c.jsx("circle",{cx:"12",cy:"9",r:"4.5"}),c.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"}),c.jsx("path",{d:"M3.5 21a8.5 7.5 0 0 1 17 0"}),c.jsx("path",{d:"m10 15.6 2 2.2 2-2.2"})]}):a==="FEMALE"?c.jsxs(Oy,{children:[c.jsx("circle",{cx:"12",cy:"9.2",r:"3.4"}),c.jsx("path",{d:"M6.3 14.2C4.6 9 6.6 2.8 12 2.8s7.4 6.2 5.7 11.4"}),c.jsx("path",{d:"M5 21.2a7 6.3 0 0 1 14 0"})]}):c.jsx(Qw,{size:16,"aria-hidden":!0})}const o1="wgts-patient-root";function iN(n,a){const i=n.getBoundingClientRect(),o=n.closest(".topbar"),u=o==null?void 0:o.parentElement,d=o&&u?u.getBoundingClientRect().top-o.getBoundingClientRect().top:0;return{x:i.left-a.left+i.width/2,y:i.top+d-a.top+i.height/2}}const r1=8;function lh(n,a,i,o){const u=i>=n.x?1:-1,d=Math.min(r1,Math.abs(i-n.x)/2,(a-n.y-14)/2);return[`M${n.x},${n.y+14}`,`V${a-d}`,`Q${n.x},${a} ${n.x+u*d},${a}`,`H${i-u*d}`,`Q${i},${a} ${i},${a+d}`,`V${o}`].join(" ")}function oN(n,a,i){const o=i.x>a.x?1:-1,u=Math.min(r1,Math.abs(i.x-a.x)/2,(a.top-n)/2);return[`M${a.x},${a.top}`,`V${n+u}`,`Q${a.x},${n} ${a.x+o*u},${n}`,`H${i.x-o*u}`,`Q${i.x},${n} ${i.x},${n+u}`,`V${i.top}`].join(" ")}function rN(n,a,i){const o=a.left+a.width/2,u=i.left+i.width/2,d=n-7,m=(n-25-.25*d)/.75;return`M${o},${d} C${o},${m} ${u},${m} ${u},${d}`}function uN(n,a){var o,u;const i=n.samples.find(d=>d.id===a);for(const d of(i==null?void 0:i.experiments)??[]){const h=(o=n.experiments[d])==null?void 0:o.normal,m=h?(u=n.experiments[h])==null?void 0:u.sample:void 0;if(m&&m!==a)return m}return null}function cN({data:n,sampleId:a,fingerprint:i,onSample:o}){const u=E.useRef(null),[d,h]=E.useState(null),[m,g]=E.useState(!1);E.useEffect(()=>{if(!d||m)return;const A=requestAnimationFrame(()=>g(!0));return()=>cancelAnimationFrame(A)},[d,m]);const y=new Set(n.failures.map(A=>A.sample)),x=E.useRef(a),[v,S]=E.useState(null);E.useEffect(()=>{if(x.current===a)return;const A=x.current;x.current=a,S(C=>({from:A,to:a,n:((C==null?void 0:C.n)??0)+1}))},[a]);const w=uN(n,a);E.useLayoutEffect(()=>{const A=u.current;if(!A)return;const C=()=>{const O=A.getBoundingClientRect(),z=document.getElementById(o1);if(!z)return;const _=Array.from(A.querySelectorAll("[data-sample]")).map(K=>{const $=K.getBoundingClientRect();return{id:K.dataset.sample,x:$.left-O.left+22,left:$.left-O.left,width:$.width,top:$.top-O.top,bottom:$.bottom-O.top}}),R=iN(z,O),Q=Math.min(..._.map(K=>K.top));h({root:R,trunk:Q-12,tabs:_})};if(C(),typeof ResizeObserver>"u")return;const D=new ResizeObserver(C);return D.observe(A),()=>D.disconnect()},[n,a]);const j=d==null?void 0:d.tabs.find(A=>A.id===a),N=w?d==null?void 0:d.tabs.find(A=>A.id===w):void 0,M=v?d==null?void 0:d.tabs.find(A=>A.id===v.from):void 0;return c.jsxs("div",{ref:u,className:"ltabs",children:[d&&c.jsxs("svg",{className:"ltabs-links","aria-hidden":!0,children:[d.tabs.map(A=>c.jsx("path",{d:lh(d.root,d.trunk,A.x,A.top)},A.id)),j&&c.jsxs(c.Fragment,{children:[c.jsx("path",{className:"ltabs-haze","data-moving":m,style:{d:`path("${lh(d.root,d.trunk,j.x,j.top)}")`}}),c.jsx("path",{className:"ltabs-on","data-moving":m,style:{d:`path("${lh(d.root,d.trunk,j.x,j.top)}")`}}),M&&v&&v.to===j.id&&c.jsx("path",{className:"ltabs-bead",pathLength:1,d:oN(d.trunk,M,j)},`bead-${v.n}`)]}),j&&N&&c.jsxs("g",{className:"ltabs-match",children:[c.jsx("path",{d:rN(d.trunk,j,N)}),c.jsx("text",{x:(j.left+j.width/2+N.left+N.width/2)/2,y:d.trunk-27,children:"matched normal"})]})]}),j&&c.jsx("span",{className:"ltabs-thumb","data-moving":m,"aria-hidden":!0,style:{width:j.width,height:j.bottom-j.top,transform:`translate(${j.left}px, ${j.top}px)`}}),c.jsx("div",{className:"ltabs-row",role:"tablist","aria-label":"Samples",children:n.samples.map(A=>{const C=A.id===a,D=i==null?void 0:i.samples.find(z=>z.sample===A.id),O=A.experiments.map(z=>({id:z,...n.experiments[z]})).filter(z=>z.technique);return c.jsxs("button",{type:"button",role:"tab","data-sample":A.id,"aria-selected":C,className:"ltab",onClick:()=>o(A.id),children:[c.jsxs("span",{className:"ltab-name",children:[A.category==="TUMOR"?c.jsx(Mm,{fingerprint:D,size:"mini",className:"h-[18px] w-[18px] flex-none"}):c.jsx(l1,{size:15,"aria-hidden":!0,className:"flex-none"}),Em(A.id,n.individual.id)," ",A.category==="TUMOR"?"tumour":"normal",y.has(A.id)&&c.jsx("span",{className:"ltab-warn",title:"A module failed for this sample","aria-label":"A module failed"})]}),c.jsxs("span",{className:"ltab-exps",children:[O.length===0&&c.jsx("span",{children:"No experiments"}),O.map(z=>{const _=aN[z.technique],R=(_==null?void 0:_.icon)??uc;return c.jsxs("span",{title:z.id,children:[c.jsx(R,{size:12,"aria-hidden":!0}),(_==null?void 0:_.label)??z.technique]},z.id)})]})]},A.id)})})]})}function fN({data:n,sampleId:a,fingerprint:i,onSample:o}){return c.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 c.jsxs("button",{type:"button",role:"tab","aria-selected":u.id===a,className:"ctab",onClick:()=>o(u.id),children:[u.category==="TUMOR"?c.jsx(Mm,{fingerprint:d,size:"mini",className:"h-[16px] w-[16px] flex-none"}):c.jsx(l1,{size:14,"aria-hidden":!0,className:"flex-none"}),Em(u.id,n.individual.id)," ",u.category==="TUMOR"?"tumour":"normal"]},u.id)})})}function Jo(n){let a=n;const i=new Set;return{get:()=>a,set:o=>{Object.is(o,a)||(a=o,i.forEach(u=>u()))},subscribe:o=>(i.add(o),()=>i.delete(o))}}function dc(n){return E.useSyncExternalStore(n.subscribe,n.get,n.get)}const _m=Jo(!1),ar=()=>_m.set(!0),Gu=()=>_m.set(!1),dN=Jo(!0);function u1({individualId:n,subtitle:a,patientIcon:i,report:o,compact:u,headerInView:d=dN}){const h=!dc(d),[m,g]=E.useState(!1),[y,x]=E.useState(!1);E.useEffect(()=>{const S=()=>x(window.scrollY>4);return S(),window.addEventListener("scroll",S,{passive:!0}),()=>window.removeEventListener("scroll",S)},[]);async function v(){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 c.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:[c.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 items-center gap-2 text-[13.5px]",children:[c.jsx("button",{type:"button",className:"crumb",onClick:ar,title:"Browse projects and patients",children:"Patients"}),n&&c.jsxs(c.Fragment,{children:[c.jsx(Cm,{size:14,"aria-hidden":!0,style:{color:"var(--chev)"}}),i&&c.jsx("span",{id:o1,className:"ltabs-icon",children:i}),c.jsx("h1",{className:"m-0 text-[20px] font-semibold tracking-tight",style:{color:"var(--ink)"},children:n}),a&&c.jsx("span",{className:"ml-1.5 truncate text-[13.5px]",style:{color:"var(--muted)"},children:a})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o,c.jsx("button",{type:"button",className:"sc-ib","aria-label":"Copy a link to this view",onClick:v,children:c.jsx(Uw,{size:16,"aria-hidden":!0})}),c.jsx("span",{"aria-live":"polite",className:"text-xs",style:{color:"var(--muted)"},children:m?"Link copied":""})]}),u&&c.jsx("div",{className:"topbar-compact","data-open":h,inert:!h,"aria-hidden":!h,children:c.jsx("div",{children:u})})]})}function hN(){const n=Nm(),[a,i]=E.useState("");return c.jsxs("div",{className:`wgts ${Kn.theme}`,children:[c.jsx("aside",{className:"side","aria-label":"Navigation",children:c.jsxs("div",{className:"side-brand",children:[c.jsx("span",{className:"side-badge","aria-hidden":!0,children:c.jsx(uc,{size:17,strokeWidth:2})}),c.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),c.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients",onClick:ar,children:c.jsx(Wu,{size:17,"aria-hidden":!0})})]})}),c.jsxs("div",{className:"page",children:[c.jsx(u1,{}),c.jsxs("main",{className:"flex flex-col gap-4 px-8 pt-8 pb-10",children:[c.jsx("h1",{className:"m-0 text-[28px] font-semibold tracking-tight",children:"Open a patient"}),c.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."}),c.jsx("div",{children:c.jsxs("button",{type:"button",className:"sc-btn sc-b1 gap-2",onClick:ar,children:[c.jsx(Dw,{size:16,"aria-hidden":!0}),"Browse projects and patients"]})}),c.jsxs("form",{className:"flex flex-wrap gap-2",onSubmit:o=>{o.preventDefault(),a.trim()&&n(`/${a.trim()}`)},children:[c.jsxs("div",{className:"field w-[340px] max-w-full",children:[c.jsx(Wu,{size:16,"aria-hidden":!0,style:{color:"var(--chev)"}}),c.jsx("label",{className:"sr-only",htmlFor:"open-id",children:"Individual id"}),c.jsx("input",{id:"open-id",placeholder:"IID_H000001",value:a,onChange:o=>i(o.target.value)})]}),c.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:!a.trim(),children:"Open"})]})]})]})]})}class hc extends Error{}class c1 extends Error{}function mN(){try{return localStorage.getItem(Jh)}catch{return null}}function f1(n){try{n?localStorage.setItem(Jh,n):localStorage.removeItem(Jh)}catch{}}function d1(){const n=mN();return{Accept:"application/json",...n?{Authorization:`Token ${n}`}:{}}}async function Pn(n,a={}){const i=new URLSearchParams;for(const[d,h]of Object.entries(a))h&&i.set(d,h);const o=i.toString(),u=await fetch(`${Kn.apiHost}/wgts/api/${n}${o?`?${o}`:""}`,{headers:d1()});if(u.status===401)throw new hc;if(u.status===403){const d=await u.json().catch(()=>({}));throw new c1(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 gN(n){if(!(await fetch(`${Kn.apiHost}/api/v1/auth/`,{headers:{Accept:"application/json",Authorization:`Token ${n}`}})).ok)throw new Error("Isabl did not accept that token.");f1(n)}async function pN(n,a){const i=await fetch(`${Kn.apiHost}/api/v1/rest-auth/login/`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({username:n,password:a})});if(!i.ok)throw new Error("Isabl did not accept that username and password.");const o=await i.json();f1(o.key)}async function h1(n){const a=await fetch(`${Kn.apiHost}/wgts/api/${n}`,{headers:d1()});if(a.status===401)throw new hc;if(!a.ok)throw new Error(`The dashboard API answered ${a.status}.`);return await a.json()}const vN=()=>h1("projects/"),yN=n=>h1(`projects/${n}/individuals/`);function lm(n){const a=n.toUpperCase();return a.startsWith("BATTENBERG")||a.startsWith("CNV_")?"cn":a.startsWith("ANNOT_SNVS")||a.startsWith("ANNOT_INDELS")||a.startsWith("FFPERASE")?"mut":a.startsWith("MSISENSOR")?"msi":"other"}function Fi(n){return`fam-${lm(n)}`}function m1(n){return n.pk?`${n.app} #${n.pk}`:n.app}function Gt(n){return`${n.app}#${n.pk??""}`}const g1={drivers:"gene",coding:"position",all:"position"},xN=100;function zy(){return{scope:"drivers",sort:g1.drivers,q:"",effects:[],flags:[],range:null,ffpe:!1}}function p1(n){return(n.q.trim()?1:0)+n.effects.length+n.flags.length+(n.range?1:0)}function SN(n){const a={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&&(a[`${n.range.measure}_min`]=String(n.range.low),a[`${n.range.measure}_max`]=String(n.range.high)),a}const v1={missense:"Missense",truncating:"Truncating",splice:"Splice",inframe:"In-frame",synonymous:"Synonymous",other:"Other"},y1={hotspot:"Hotspot",in_dmp:"In DMP",oncogene:"Oncogene",tsg:"Tumour suppressor"};function bN(n){return`${n.chrom}:${n.pos}:${n.ref}>${n.alt}`}const x1=/^(?:chr)?([0-9]{1,2}|[XYxy]):([0-9,]+)(?:-([0-9,]+))?$/;function jN(n){return x1.test(n.trim())}function wN(n,a,i){return`chr${n}:${a.toLocaleString("en-US")}-${i.toLocaleString("en-US")}`}const NN={GENOMIC_EXACT:"exact match",GENOMIC_POS:"same position",CODON:"same codon",GENE:"same gene"};function CN(n){var d;if(!n)return null;const a=n.split(";"),i=(d=n.match(/SOM=(\d+)/))==null?void 0:d[1],o=NN[a[0]];return!i&&!o?n:[i?`${Number(i).toLocaleString("en-US")} somatic ${i==="1"?"sample":"samples"}`:"",o].filter(Boolean).join(", ")}function EN(n){const a=n==null?void 0:n.match(/^(\d+)\/(\d+)$/);return a?`${a[1]} of ${a[2]} ${a[2]==="1"?"copy":"copies"}`:n}function MN(n){return n.oncogene&&n.tsg?"Oncogene and TSG":n.oncogene?"Oncogene":n.tsg?"TSG":null}const Nn=(n,a)=>!(a instanceof hc)&&n<2;function _N(n,a){return Un({queryKey:["individual",n,a??null],queryFn:()=>Pn(`individuals/${encodeURIComponent(n)}/`,{version:a}),retry:Nn})}function TN(n,a,i){return Un({queryKey:["metrics",n,a,i??null],queryFn:()=>Pn(`individuals/${encodeURIComponent(n)}/metrics/`,{sample:a,version:i}),enabled:!!a,retry:Nn})}function RN(n,a){return Un({queryKey:["fingerprint",n,a??null],queryFn:()=>Pn(`individuals/${encodeURIComponent(n)}/fingerprint/`,{version:a}),retry:Nn})}const Aa=(n,a)=>`individuals/${encodeURIComponent(n)}/${a}/`;function AN(n,a,i){return Un({queryKey:["cn",n,a,i??null],queryFn:()=>Pn(Aa(n,"cn"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function ON(n,a,i,o,u){return Un({queryKey:["ccf",n,a,i,o,u??null],queryFn:()=>Pn(Aa(n,"ccf"),{sample:a,measure:i,version:u,ffpe:o?"all":void 0}),enabled:!!a,retry:Nn})}function zN(n,a,i){return Un({queryKey:["signatures",n,a,i??null],queryFn:()=>Pn(Aa(n,"signatures"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function DN(n,a,i){return Un({queryKey:["context",n,a,i??null],queryFn:()=>Pn(Aa(n,"context"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function LN(n,a,i){return Un({queryKey:["fga",n,a,i??null],queryFn:()=>Pn(Aa(n,"fga"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function HN(n,a,i){return Un({queryKey:["tmb",n,a,i??null],queryFn:()=>Pn(Aa(n,"tmb"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function UN(n,a,i){return Un({queryKey:["svs",n,a,i??null],queryFn:()=>Pn(Aa(n,"svs"),{sample:a,version:i}),enabled:!!a,retry:Nn})}function $N(n,a,i,o){return Ej({queryKey:["variants",n,a,i,o??null],queryFn:({pageParam:u})=>Pn(Aa(n,"variants"),{sample:a,version:o,...SN(i),page:String(u),page_size:String(xN)}),initialPageParam:1,getNextPageParam:(u,d,h)=>u.status!=="ok"||!u.data?void 0:d.reduce((g,y)=>g+(y.status==="ok"&&y.data?y.data.rows.length:0),0)<u.data.total?h+1:void 0,enabled:!!a,placeholderData:Ex,retry:Nn})}function VN(){return Un({queryKey:["picker","projects"],queryFn:vN,staleTime:6e4,retry:Nn})}function FN(n){return Un({queryKey:["picker","patients",n],queryFn:()=>yN(n),staleTime:6e4,placeholderData:Ex,retry:Nn})}const Ci=6,kN=16,S1=7,tc=6;function ah(n){const a=Math.min(S1,(n-tc)/2);return`M${Ci},${tc} V${n-a}`}function sh(n){const a=Math.min(S1,(n-tc)/2);return`M${Ci},${n-a} Q${Ci},${n} ${Ci+a},${n} H${kN}`}function BN(n,a){return`M${Ci},${n} V${a}`}function GN(n,a,i,o){const[u,d]=E.useState(null),[h,m]=E.useState([]),[g,y]=E.useState(!1),[x,v]=E.useState(null),[S,w]=E.useState(280),j=n.map(_=>`${_.key}:${_.available}`).join();E.useLayoutEffect(()=>{if(!u)return;const _=()=>{const Q=Array.from(u.querySelectorAll(i));m(n.flatMap((K,$)=>{const le=Q[$];if(!le)return[];const oe=le.offsetTop,te=le.offsetHeight;return[{key:K.key,cy:oe+te/2,top:oe,height:te,available:K.available}]}))};if(_(),typeof ResizeObserver>"u")return;const R=new ResizeObserver(_);return R.observe(u),()=>R.disconnect()},[u,j,i,o]);const N=h.find(_=>_.key===a&&_.available),M=N?{top:N.top,height:N.height}:null;E.useEffect(()=>{if(!N||g)return;const _=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(_)},[N,g]);const[A,C]=E.useState(a);E.useEffect(()=>{if(A===a)return;const _=A;C(a),_&&a&&v(R=>({from:_,to:a,n:((R==null?void 0:R.n)??0)+1}))},[a,A]);const D=x?h.find(_=>_.key===x.from):void 0,[O,z]=E.useState(null);return E.useLayoutEffect(()=>{if(N&&O!==null&&O!==N.cy){const _=Math.abs(N.cy-O)/38;w(Math.round(Math.min(620,240+80*_)))}z(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:g,hop:x,leaving:D,duration:S}}function qN({tree:n,on:a,light:i,glides:o,hop:u,leaving:d}){return c.jsxs(c.Fragment,{children:[n.length>0&&c.jsxs("svg",{className:"ltabs-links side-tree","aria-hidden":!0,children:[c.jsx("circle",{cx:Ci,cy:tc,r:"2.5",className:"side-root"}),c.jsx("path",{d:ah(n[n.length-1].cy)}),n.map(h=>c.jsx("path",{d:sh(h.cy),"data-off":h.available?void 0:"true"},h.key)),a&&c.jsxs(c.Fragment,{children:[c.jsx("path",{className:"ltabs-haze","data-moving":o,style:{d:`path("${ah(a.cy)}")`}}),c.jsx("path",{className:"ltabs-on","data-moving":o,style:{d:`path("${ah(a.cy)}")`}})]}),n.map(h=>c.jsxs("g",{className:"side-stub","data-active":h.key===(a==null?void 0:a.key)||void 0,children:[c.jsx("path",{className:"ltabs-haze",d:sh(h.cy)}),c.jsx("path",{className:"ltabs-on",d:sh(h.cy)})]},h.key)),a&&d&&u&&u.to===a.key&&c.jsx("path",{className:"ltabs-bead",pathLength:1,d:BN(d.cy,a.cy)},`bead-${u.n}`)]}),c.jsx("span",{className:"side-light","aria-hidden":!0,"data-on":i?"true":void 0,"data-glides":o||void 0,style:i?{transform:`translateY(${i.top}px)`,height:i.height}:void 0})]})}const ih=[{key:"overview",label:"Overview",icon:Hw},{key:"copyNumber",label:"Copy number",icon:Mw},{key:"mutations",label:"Mutations",icon:Vw},{key:"structuralVariants",label:"Structural variants",icon:qw},{key:"signatures",label:"Signatures and HRD",icon:Rw},{key:"rna",label:"RNA",icon:Iw,soon:!0},{key:"germline",label:"Germline",icon:Gw,soon:!0},{key:"quality",label:"Quality",icon:Ow,soon:!0}],Dy="wgts-side-collapsed";function QN(){const[n,a]=E.useState(()=>{try{return localStorage.getItem(Dy)==="1"}catch{return!1}});return[n,o=>{a(o);try{localStorage.setItem(Dy,o?"1":"0")}catch{}}]}function YN({analyses:n,onPage:a,sampleLabel:i,picked:o,onPick:u,sections:d,activeStore:h,onSection:m}){const g=dc(h),[y,x]=QN(),{setBox:v,...S}=GN(ih.map(({key:R})=>({key:R,available:d.has(R)})),g,".sc-nav",y),[w,j]=E.useState(!1),[N,M]=E.useState(!1),A=["cn","mut","msi","other"],C=(R,Q)=>A.indexOf(lm(R.app))-A.indexOf(lm(Q.app))||R.app.localeCompare(Q.app),D=N||o!==null;E.useEffect(()=>{const R=Q=>{Q.key.toLowerCase()==="k"&&(Q.metaKey||Q.ctrlKey)&&(Q.preventDefault(),ar())};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[]);const O=n.filter(R=>R.role==="input"),z=O.filter(R=>a.has(Gt(R))).sort(C),_=[...O.filter(R=>!a.has(Gt(R))).sort(C),...n.filter(R=>R.role==="cohort")];return c.jsxs("aside",{className:"side","aria-label":"Patient navigation","data-collapsed":y||void 0,children:[c.jsxs("div",{className:"side-brand",children:[c.jsx("span",{className:"side-badge","aria-hidden":!0,children:c.jsx(uc,{size:17,strokeWidth:2})}),c.jsx("span",{className:"side-text side-title",children:"WGTS Reports"}),c.jsx("button",{type:"button",className:"side-search-icon","aria-label":"Browse projects and patients",title:"Browse projects and patients (Ctrl or ⌘ K)",onClick:ar,children:c.jsx(Wu,{size:17,"aria-hidden":!0})}),c.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?c.jsx(Bw,{size:17,"aria-hidden":!0}):c.jsx(kw,{size:17,"aria-hidden":!0})})]}),c.jsxs("nav",{ref:v,"aria-label":"Patient sections",className:"side-nav",style:{"--duration":`${S.duration}ms`},children:[c.jsx(qN,{...S}),ih.map(({key:R,label:Q,icon:K,soon:$},le)=>{const oe=d.has(R);return c.jsxs("div",{className:"contents",children:[$&&!ih[le-1].soon&&c.jsx("span",{className:"side-group",children:"Coming soon"}),c.jsxs("button",{type:"button",className:"sc-nav","aria-current":oe&&g===R?"location":void 0,"aria-label":Q,disabled:!oe,title:y?Q:oe?void 0:"Not available for this sample yet",onClick:()=>m(R),children:[c.jsx(K,{size:17,strokeWidth:1.7,"aria-hidden":!0}),c.jsx("span",{className:"side-text",children:Q})]})]},R)})]}),c.jsx("div",{className:"flex-auto"}),c.jsxs("section",{"aria-label":"Analyses on this page",className:"side-sources",children:[c.jsxs("button",{type:"button",className:"side-fold","aria-expanded":D,onClick:()=>M(R=>!R),children:["Analyses on this page",c.jsx("span",{className:"side-count",children:z.length}),c.jsx(t1,{size:14,"aria-hidden":!0,"data-open":D})]}),D&&z.length===0&&c.jsxs("span",{className:"px-3 text-xs",style:{color:"var(--menu-muted)"},children:["Nothing on this page reads an analysis for ",i||"this sample","."]}),D&&z.map(R=>{const Q=Gt(R),K=R.state==="failed",$=R.modules.filter(le=>le.status==="failed");return c.jsxs("button",{type:"button",className:`tb-src${K?" fail":""}`,"aria-pressed":o===Q,title:K?$.map(le=>`${le.label} failed`).join("; "):"Show what it feeds",onClick:()=>u(o===Q?null:Q),children:[K?c.jsx(a1,{size:12,strokeWidth:2.6,"aria-hidden":!0,style:{color:"var(--fail-d)",margin:"0 -2px"}}):c.jsx("span",{className:`tb-dot ${Fi(R.app)}`,"aria-hidden":!0}),c.jsxs("span",{className:"truncate",children:[R.app," ",R.version??""]}),K&&c.jsx("span",{className:"sr-only",children:", failed"}),c.jsx("span",{className:"tb-n",children:R.pk?`#${R.pk}`:""})]},Q)}),D&&_.length>0&&c.jsxs(c.Fragment,{children:[c.jsxs("button",{type:"button",className:"tb-src","aria-expanded":w,onClick:()=>j(R=>!R),children:[c.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),w?"Hide":"Show"," ",_.length," more for ",i||"this sample"]}),w&&_.map(R=>c.jsxs("span",{className:"tb-src",style:{cursor:"default"},children:[c.jsx("span",{className:`tb-dot ${Fi(R.app)}`,"aria-hidden":!0}),c.jsx("span",{className:"truncate",children:R.role==="cohort"?`${R.app}${R.project?`, project ${R.project}`:""}`:`${R.app} ${R.version??""}`}),c.jsx("span",{className:"tb-n",children:R.pk?`#${R.pk}`:""})]},Gt(R)))]}),D&&c.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 os({envelope:n}){const a=n.status==="error",i=a?Aw:zw;return c.jsxs("div",{className:"flex items-start gap-2.5 text-sm",style:{color:"var(--ink-2)"},children:[c.jsx(i,{size:18,"aria-hidden":!0,style:{color:a?"var(--warn-ink)":"var(--chev)",flex:"none"}}),c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx("span",{className:"font-semibold",style:{color:"var(--ink)"},children:a?"This panel could not be read":"Nothing to show here"}),n.warnings.map(o=>c.jsx("span",{children:o},o))]})]})}const am={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:"Amplified and lost genes",paragraphs:["The oncogenes the report calls amplified and the tumour suppressors it calls homozygously lost, from the copy number over each gene, in chromosome order. The row of cells shows the copy number (all eight filled means eight copies or more). When the sample has RNA, each gene also shows its expression against each expression cohort: the log2 of this sample's level over the cohort's mean, so +1 is twice the cohort's level. Point at a gene to mark it on the plot; click it to glide to its chromosome."]},{heading:"Fraction of genome altered against the cohort",paragraphs:["The tumour's FGA (the share of the genome whose copy number differs from the baseline) set against every tumour in the project's FGA table, by disease, as the report draws it: only diseases with at least five tumours, plus this tumour's own, highest median first, with some disease labels merged (OSOS and CHOS as OS, MFH as US, LIHB as HBL). Each box spans the middle half of a disease's tumours, the line in it is the median, the whiskers reach the furthest tumours within one and a half box-lengths, and each dot is one tumour. The pin is this tumour; hover a disease for its numbers and, in the tumour's own disease, where it ranks.","The cohort is the one the report compared with when it ran. It does not grow as the project does; rerun the report to compare with the cohort as it is now."]},{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:"Coding mutations against reference cohorts",paragraphs:["At the foot of the card, the tumour's coding SNVs and indels set against reference tumours of the same disease, as the report's TMB figure draws them: Grobner and colleagues' published pan-cancer cohort, where the disease has a match there, and MSK's TMB reference project. Each cohort is a violin cut at its smallest and largest tumour; two cohorts share one violin, one on each side. The bar inside marks the middle half and the circle the median. The line across is this tumour; hover a cohort for its numbers and where the tumour ranks.","Counts are coding mutations as the report counts them (after the FFPE filter for FFPE samples), the same numbers as the Coding tab. The MSK cohort leaves out tumours far above its 99th percentile, as the report does. The cohorts are the ones the report compared with when it ran; rerun the report to compare with them as they are now."]},{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:"96 mutational contexts",paragraphs:["Every substitution is one of six kinds (C>A, C>G, C>T, T>A, T>C, T>G, naming the pyrimidine base of the pair) and sits between two neighbouring bases, which gives 96 contexts. The top panel counts the tumour's SNVs in each, as WGSPOST's MutationalPatterns step does. The middle panel is what the fitted signatures rebuild: each signature's probabilities for the 96 contexts, weighted by its contribution above and added up. The bottom panel is the first minus the second, so a bar above the line is a context with more SNVs than the signatures explain.","Share draws each profile as percentages of its own total, which is how the report's figure compares the two; Count draws SNVs. Both profiles share one scale, and the difference its own. Click a class in the header to open it and name its sixteen contexts, written as the base before, the mutated base in colour, and the base after. Hover a column to read all three panels at once.","Cosine similarity and RSS are the report's own measures of the fit: the closer to 1 (cosine) and to 0 (RSS), the better the signatures explain the tumour. They are computed by the report from the relative profiles, as MutationalPatterns does. For an FFPE sample, switch between the run the report uses (its FFPE-filtered calls) and the unfiltered one. When the report did not include the signature matrix its fit used, only the observed profile is drawn."]},{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."]]}]}},IN={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 of FGA: the tumour's own FGA, and the cohort the FGA figure compares it with, as it was when the report ran.",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_SNVS cohort":"The TMB reference project's coding SNVs: MSK's reference tumours for the disease, counted for the TMB figure, as they were when the report ran.","ANNOT_INDELS cohort":"The TMB reference project's coding indels, counted for the TMB figure like its SNVs.",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 SNV counts in the 96 mutational contexts, 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 XN(n,a){const i=a.role==="cohort"||a.app.endsWith("Project Application"),o=a.app.replace(/ Project Application$/,""),u=IN[n];return(i?u[`${o} cohort`]:u[o])??(i?"A project-wide run the report reads for comparison with the cohort.":"An analysis the report reads to build this card.")}function KN({topic:n,lineage:a,subject:i,onClose:o}){const u=am[n],d=E.useId(),h=E.useRef(null),m=a.filter(O=>O.role!=="cohort"&&!O.app.endsWith("Project Application")),g=a.filter(O=>!m.includes(O)),y=E.useRef(o);y.current=o,E.useEffect(()=>{var Q;const O=document.activeElement;(Q=h.current)==null||Q.focus();const z=document.documentElement,_=z.style.overflow;z.style.overflow="hidden";const R=K=>{K.key==="Escape"&&y.current()};return document.addEventListener("keydown",R),()=>{document.removeEventListener("keydown",R),z.style.overflow=_,O==null||O.focus()}},[]);const x=[...u.sections.map(O=>O.heading),"Sources"],v=x.map((O,z)=>`${d}-s${z}`),[S,w]=E.useState(0),j=E.useRef(null),N=E.useRef(!1),M=E.useRef(null),A=E.useRef(0);E.useEffect(()=>{const O=j.current;if(!O)return;const z=24,_=()=>{const K=O.getBoundingClientRect().top,$=Math.max(0,O.scrollHeight-O.clientHeight),le=v.map(ee=>{const X=document.getElementById(ee);return X?X.getBoundingClientRect().top-K:1/0}),oe=Math.max(0,...le.map(ee=>Number.isFinite(ee)?ee+O.scrollTop-$-z:0)),te=z+($>0?oe*Math.min(1,O.scrollTop/$):0);let Y=0;le.forEach((ee,X)=>{ee<=te&&(Y=X)}),w(Y)},R=()=>{if(N.current){M.current===null?(window.clearTimeout(A.current),A.current=window.setTimeout(()=>M.current=O.scrollTop,160)):Math.abs(O.scrollTop-M.current)>4&&(N.current=!1,M.current=null,_());return}_()},Q=()=>{N.current&&M.current===null&&(window.clearTimeout(A.current),N.current=!1,_())};return _(),O.addEventListener("scroll",R,{passive:!0}),O.addEventListener("wheel",Q,{passive:!0}),O.addEventListener("touchstart",Q,{passive:!0}),()=>{window.clearTimeout(A.current),O.removeEventListener("scroll",R),O.removeEventListener("wheel",Q),O.removeEventListener("touchstart",Q)}},[]);const C=O=>{var _;const z=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;N.current=!0,M.current=null,w(O),window.clearTimeout(A.current),A.current=window.setTimeout(()=>{var R;return M.current=((R=j.current)==null?void 0:R.scrollTop)??0},160),(_=document.getElementById(v[O]))==null||_.scrollIntoView({behavior:z?"auto":"smooth",block:"start"})},D=O=>c.jsxs("li",{className:"info-source",children:[c.jsx("span",{className:`tb-dot ${Fi(O.app)}`,"aria-hidden":!0}),c.jsxs("span",{className:"info-source-text",children:[O.pk?c.jsxs("a",{className:"info-source-name info-source-link",href:Zx(O.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[c.jsxs("span",{className:"mono",children:[O.app,O.version?` ${O.version}`:""]}),c.jsxs("span",{className:"mono info-source-pk",children:["#",O.pk]}),c.jsx(_w,{size:13,"aria-hidden":!0,className:"info-source-arrow"})]}):c.jsxs("span",{className:"info-source-name",children:[c.jsxs("span",{className:"mono",children:[O.app,O.version?` ${O.version}`:""]}),O.project?c.jsxs("span",{className:"info-source-pk",children:["project ",O.project]}):null]}),c.jsx("span",{className:"info-source-role",children:XN(n,O)})]})]},Gt(O));return jm.createPortal(c.jsx("div",{className:`info-backdrop ${Kn.theme}`,onMouseDown:O=>O.target===O.currentTarget&&o(),children:c.jsxs("div",{className:"info-dialog",role:"dialog","aria-modal":"true","aria-labelledby":d,children:[c.jsx("button",{ref:h,type:"button",className:"info-close","aria-label":"Close",onClick:o,children:c.jsx(cc,{size:18,"aria-hidden":!0})}),c.jsxs("nav",{className:"info-rail","aria-label":"Contents",children:[c.jsx("span",{className:"info-kicker",children:i??"About"}),c.jsx("h2",{id:d,children:u.title}),c.jsx("ol",{children:x.map((O,z)=>c.jsx("li",{children:c.jsx("button",{type:"button","aria-current":z===S?"true":void 0,onClick:()=>C(z),children:O})},O))})]}),c.jsxs("div",{ref:j,className:"info-main",children:[c.jsx("p",{className:"info-intro",children:u.intro}),u.sections.map((O,z)=>{var _;return c.jsxs("section",{id:v[z],className:"info-section",children:[c.jsx("h3",{children:O.heading}),(_=O.paragraphs)==null?void 0:_.map(R=>c.jsx("p",{children:R},R)),O.terms&&c.jsx("dl",{children:O.terms.map(([R,Q])=>c.jsxs("div",{children:[c.jsx("dt",{children:R}),c.jsx("dd",{children:Q})]},R))})]},O.heading)}),c.jsxs("section",{id:v[v.length-1],className:"info-section","aria-label":"Sources",children:[c.jsx("h3",{children:"Sources"}),c.jsx("p",{children:"The analyses this card reads, with their version and Isabl id, and what each one is responsible for."}),a.length===0&&c.jsx("p",{children:"No analyses recorded for this card."}),c.jsx("ul",{className:"info-sources",children:m.map(D)}),g.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("h4",{children:"Cohort runs"}),c.jsx("ul",{className:"info-sources",children:g.map(D)})]})]})]})]})}),document.body)}function Ly(n){return n.split(" ").map(a=>/^[A-Z0-9]{2,}$/.test(a)?a:a.toLowerCase()).join(" ")}function b1({topic:n,lineage:a,subject:i}){const[o,u]=E.useState(!1);return c.jsxs(c.Fragment,{children:[c.jsx("button",{type:"button",className:"sc-ib sm info-trigger","aria-label":`About ${Ly(am[n].title)}`,title:`About ${Ly(am[n].title)}`,"aria-haspopup":"dialog",onClick:()=>u(!0),children:c.jsx(Lw,{size:15,"aria-hidden":!0})}),o&&c.jsx(KN,{topic:n,lineage:a,subject:i,onClose:()=>u(!1)})]})}function PN({lineage:n,children:a}){const[i,o]=E.useState(!1),u=n.filter(h=>h.role!=="cohort"),d=n.filter(h=>h.role==="cohort");return c.jsxs("div",{className:"sc-cf",children:[a,a&&c.jsx("span",{className:"flex-auto"}),n.length>0&&c.jsx("span",{className:"text-xs",style:{color:"var(--muted)"},children:"Sources"}),u.map(h=>h.pk?c.jsxs("a",{className:"sc-src sc-src-link",href:Zx(h.pk),target:"_blank",rel:"noopener noreferrer",title:"Open this analysis in Isabl",children:[c.jsx("span",{className:`tb-dot ${Fi(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""," #",h.pk]},Gt(h)):c.jsxs("span",{className:"sc-src",children:[c.jsx("span",{className:`tb-dot ${Fi(h.app)}`,"aria-hidden":!0}),h.app," ",h.version??""]},Gt(h))),d.length>0&&c.jsxs("button",{type:"button",className:"sc-src",style:{border:0,cursor:"pointer"},"aria-expanded":i,onClick:()=>o(h=>!h),children:[i?"Hide":"+"," ",d.length," cohort ",d.length===1?"run":"runs"]}),i&&d.map(h=>c.jsxs("span",{className:"sc-src",children:[c.jsx("span",{className:"tb-dot fam-other","aria-hidden":!0}),h.app,h.project?`, project ${h.project}`:""," ",h.pk?`#${h.pk}`:""]},Gt(h)))]})}function mc(...n){const a=new Map;for(const i of n.flat())i&&!a.has(Gt(i))&&a.set(Gt(i),i);return[...a.values()]}const gc=E.forwardRef(function({title:a,subtitle:i,controls:o,lineage:u,picked:d,footer:h,className:m="",info:g,expandable:y,children:x},v){const S=!!d&&u.some(N=>Gt(N)===d),[w,j]=ZN();return c.jsxs(c.Fragment,{children:[w&&c.jsx("div",{className:"sc-full-backdrop","aria-hidden":!0,onClick:()=>j(!1)}),c.jsxs("section",{ref:v,className:`sc-card flex flex-col ${m}`,"data-picked":S,"data-full":w||void 0,"aria-label":a,children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 px-5 pt-5 pb-4",children:[c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx("h2",{className:"m-0 text-[19px] font-semibold tracking-tight",children:a}),i&&c.jsx("span",{className:"text-[13px]",style:{color:"var(--muted)"},children:i})]}),(o||g||y)&&c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o,y&&c.jsx("button",{type:"button",className:"sc-ib","aria-label":w?"Exit full screen":`Expand ${a.toLowerCase()} to full screen`,title:w?"Exit full screen (Esc)":"Expand to full screen","aria-pressed":w,onClick:()=>j(!w),children:w?c.jsx(Fw,{size:16,"aria-hidden":!0}):c.jsx($w,{size:16,"aria-hidden":!0})}),g&&c.jsx(b1,{topic:g,lineage:u,subject:typeof i=="string"?i:void 0})]})]}),c.jsx("div",{className:"min-w-0 flex-auto",children:x}),(u.length>0||h)&&c.jsx(PN,{lineage:u,children:h})]})]})});function ZN(){const[n,a]=E.useState(!1);return E.useEffect(()=>{if(!n)return;const i=document.documentElement,o=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")||a(!1))};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),i.style.overflow=o}},[n]),[n,a]}function dr({label:n,envelope:a,loading:i,skeletonHeight:o=160,children:u}){return c.jsxs(c.Fragment,{children:[i&&!a&&c.jsx("div",{className:"px-5 py-3",children:c.jsx("div",{className:"skeleton",style:{height:o},"aria-label":`Loading ${n}`})}),a&&a.status!=="ok"&&c.jsx("div",{className:"px-5 py-4",children:c.jsx(os,{envelope:a})}),(a==null?void 0:a.status)==="ok"&&a.data!==null&&u(a.data),(a==null?void 0:a.status)==="ok"&&a.warnings.length>0&&c.jsx("div",{className:"px-5 pb-1 text-xs",style:{color:"var(--warn-ink)"},children:a.warnings.join(" ")})]})}function JN({title:n,subtitle:a,controls:i,envelope:o,loading:u,picked:d,skeletonHeight:h=160,footer:m,className:g="",info:y,moreLineage:x,children:v}){return c.jsx(gc,{title:n,subtitle:a,controls:i,lineage:mc(o==null?void 0:o.lineage,x),picked:d,footer:m,className:g,info:y,children:c.jsx(dr,{label:n,envelope:o,loading:u,skeletonHeight:h,children:v})})}function WN(n,a){const[i,o]=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"]');o(y?{x:y.offsetLeft,y:y.offsetTop,width:y.offsetWidth,height:y.offsetHeight}:null)};if(m(),typeof ResizeObserver>"u")return;const g=new ResizeObserver(m);g.observe(h);for(const y of Array.from(h.children))g.observe(y);return()=>g.disconnect()},[n,a]),E.useEffect(()=>{if(i&&!u){const h=requestAnimationFrame(()=>d(!0));return()=>cancelAnimationFrame(h)}},[i,u]),{thumb:i,moving:u}}function Ss({label:n,options:a,value:i,onChange:o,className:u=""}){const d=E.useRef(null),{thumb:h,moving:m}=WN(d,i);return c.jsxs("div",{ref:d,className:`sc-track ${u}`,role:"group","aria-label":n,children:[h&&c.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)`}}),a.map(g=>c.jsx("button",{type:"button",className:"sc-seg","aria-pressed":g.value===i,disabled:g.disabled,title:g.title,onClick:()=>o(g.value),children:g.label},g.value))]})}function eC(n){var i;const a=[];return n.mode==="unmatched"&&a.push("Tumour only"),n.individual.germline_consent&&a.push("Germline consented"),(i=n.individual.dmp_id)!=null&&i.startsWith("P-")&&a.push("DMP linked"),a}function tC({data:n,onVersion:a}){const i=n.report,[o,u]=E.useState(!1),d=E.useRef(null);E.useEffect(()=>{if(!o)return;const m=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)},g=y=>{y.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",g)}},[o]);const h=eC(n);return c.jsxs("div",{ref:d,className:"report-menu",children:[c.jsxs("button",{type:"button",className:"sc-btn sc-b2","aria-expanded":o,"aria-haspopup":"dialog",onClick:()=>u(m=>!m),children:["Report ",i.version,c.jsx(t1,{size:14,"aria-hidden":!0})]}),o&&c.jsxs("div",{className:"report-pop",role:"dialog","aria-label":"Report",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[c.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--muted)"},children:"Report version"}),c.jsx(Ss,{label:"Report version",value:i.version,onChange:m=>{a(m),u(!1)},options:n.versions.map(m=>({value:m.version,label:m.version}))})]}),c.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 ${s1(i.built)}`:""]}),h.length>0&&c.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(m=>c.jsx("span",{className:"sc-chip",children:m},m))})]})]})}const sm=["purity","ploidy","coverage","tmb","msi","fga"];function nC({value:n}){const i=2*Math.PI*13,o=Math.min(Math.max(n,0),1);return c.jsxs("svg",{viewBox:"0 0 34 34",className:"kpi-glyph h-[34px] w-[34px]","aria-hidden":!0,children:[c.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",className:"kpi-track"}),c.jsx("circle",{cx:"17",cy:"17",r:13,fill:"none",strokeWidth:"4",strokeLinecap:"round",className:"kpi-fill",strokeDasharray:`${o*i} ${i}`,transform:"rotate(-90 17 17)"})]})}function Hy({value:n,min:a,max:i,ticks:o,reference:u}){const d=h=>4+(Math.min(Math.max(h,a),i)-a)/(i-a)*64;return c.jsxs("svg",{viewBox:"0 0 72 20",className:"kpi-glyph h-[18px] w-[60px]","aria-hidden":!0,children:[c.jsx("line",{x1:"4",x2:"68",y1:"12",y2:"12",className:"kpi-track",strokeWidth:"2",strokeLinecap:"round"}),o.map(h=>c.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)),c.jsx("circle",{cx:d(n),cy:"12",r:"4.5",className:"kpi-dot",strokeWidth:"2"})]})}function lC({metric:n}){const a=n.value;if(a===null)return null;switch(n.key){case"purity":case"fga":return c.jsx(nC,{value:a});case"ploidy":return c.jsx(Hy,{value:a,min:1,max:6,ticks:[1,2,3,4,5,6],reference:2});case"tmb":return c.jsx(Hy,{value:Math.log10(Math.max(a,.01)),min:-2,max:2,ticks:[-2,-1,0,1,2]});default:return null}}const aC={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 sC({metric:n,picked:a}){const i=n.value===null&&!n.text,o=!!a&&n.sources.some(u=>Gt(u)===a);return c.jsxs("div",{className:"kpi","data-picked":o,title:aC[n.key],children:[c.jsxs("span",{className:"kpi-top",children:[c.jsx("span",{className:"kpi-label",children:n.label}),c.jsx(lC,{metric:n})]}),c.jsx("span",{className:"kpi-value","data-empty":i,children:i?Pw(n):Kw(n)}),n.sources.length>0?c.jsx("span",{className:"flex flex-col gap-0.5",children:n.sources.map(u=>c.jsxs("span",{className:"kpi-src",children:[c.jsx("span",{className:`tb-dot ${Fi(u.app)}`,"aria-hidden":!0}),c.jsx("span",{className:"min-w-0",children:m1(u)})]},Gt(u)))}):c.jsx("span",{className:"kpi-src",children:n.etl?`from ${n.etl}`:"no source"})]})}function iC({sampleLabel:n,fingerprint:a,metrics:i,picked:o,lineage:u=[]}){var h;const d=(((h=i==null?void 0:i.data)==null?void 0:h.metrics)??[]).filter(m=>sm.includes(m.key));return c.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:[c.jsx("span",{className:"absolute top-3 right-3",children:c.jsx(b1,{topic:"summary",lineage:u,subject:n})}),c.jsx(Mm,{fingerprint:a,size:"hero",title:n.split(" ")[0],subtitle:"tumour",className:"h-[210px] w-[210px] max-w-full flex-none"}),c.jsxs("div",{className:"flex min-w-0 flex-[1_1_230px] flex-col gap-3",children:[c.jsxs("h2",{className:"m-0 text-lg font-semibold tracking-tight",children:["Genome fingerprint of ",n]}),c.jsx("p",{className:"m-0 max-w-[46ch] text-[14.5px] leading-relaxed",style:{color:"var(--ink-2)"},children:a?i1(a):"No copy-number data for this sample."}),c.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-[12.5px]",style:{color:"var(--ink-2)"},children:[c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--gain)"}}),"Gains, outer track"]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-[5px] w-3.5 rounded-[3px]",style:{background:"var(--loss)"}}),"Losses, inner track"]}),c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-3 w-[5px] rounded-sm",style:{background:"var(--ink)"}}),"Drivers"]})]}),c.jsx("span",{className:"text-[12.5px]",style:{color:"var(--muted)"},children:"Chromosome 1 starts at the top and the ring runs clockwise to X."})]}),c.jsxs("div",{className:"kpi-grid min-w-0 flex-[1.4_1_420px]",children:[i===void 0&&sm.map(m=>c.jsx("div",{className:"kpi","aria-hidden":!0,children:c.jsx("div",{className:"skeleton h-[70px]"})},m)),i&&i.status!=="ok"&&c.jsx("div",{className:"col-span-full",children:c.jsx(os,{envelope:i})}),d.map(m=>c.jsx(sC,{metric:m,picked:o},m.key))]})]})}function oC({sampleLabel:n,failures:a,analyses:i}){return a.length===0?null:c.jsx("div",{className:"flex flex-col gap-2.5",children:a.map(o=>{const u=i.filter(d=>d.modules.some(h=>h.etl===o.etl&&h.status==="failed"));return c.jsxs("div",{className:"sc-card flex flex-wrap items-center gap-x-4 gap-y-3 px-[18px] py-3.5",role:"status",children:[c.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:c.jsx(a1,{size:18,"aria-hidden":!0})}),c.jsxs("div",{className:"flex min-w-0 flex-[1_1_360px] flex-col gap-0.5",children:[c.jsxs("span",{className:"text-[14.5px] font-semibold",children:[o.label," failed for ",n]}),c.jsx("span",{className:"text-[13.5px]",style:{color:"var(--ink-2)"},children:o.message.split(`
267
+ `)[0]}),u.length>0&&c.jsxs("span",{className:"mono text-[11.5px]",style:{color:"var(--muted)"},children:["Reading ",u.map(m1).join(", ")]})]})]},`${o.etl}-${o.node}`)})})}function rC({onSignedIn:n}){const[a,i]=E.useState("password"),[o,u]=E.useState(""),[d,h]=E.useState(""),[m,g]=E.useState(""),[y,x]=E.useState(null),[v,S]=E.useState(!1),w=a==="password"?!!o&&!!d:!!m.trim();return c.jsxs("form",{className:"sc-card mx-auto mt-16 flex w-[380px] max-w-full flex-col gap-3 p-6",onSubmit:async j=>{j.preventDefault(),S(!0),x(null);try{a==="password"?await pN(o,d):await gN(m.trim()),n()}catch(N){x(N.message)}finally{S(!1)}},children:[c.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Sign in to Isabl"}),c.jsx("p",{className:"m-0 text-sm",style:{color:"var(--ink-2)"},children:"The WGTS dashboard uses your Isabl account."}),a==="password"?c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"username",children:["Username",c.jsx("span",{className:"field",children:c.jsx("input",{id:"username",autoComplete:"username",value:o,onChange:j=>u(j.target.value)})})]}),c.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"password",children:["Password",c.jsx("span",{className:"field",children:c.jsx("input",{id:"password",type:"password",autoComplete:"current-password",value:d,onChange:j=>h(j.target.value)})})]})]}):c.jsxs("label",{className:"flex flex-col gap-1 text-[13px] font-semibold",htmlFor:"token",children:["API token",c.jsx("span",{className:"field",children:c.jsx("input",{id:"token",type:"password",autoComplete:"off",spellCheck:!1,value:m,onChange:j=>g(j.target.value)})}),c.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&&c.jsx("p",{className:"m-0 text-sm",style:{color:"var(--warn-ink)"},role:"alert",children:y}),c.jsx("button",{type:"submit",className:"sc-btn sc-b1",disabled:v||!w,children:v?"Signing in":"Sign in"}),c.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(a==="password"?"token":"password"),x(null)},children:a==="password"?"Use an API token instead":"Use a username and password instead"})]})}const at=1e3,im=.35,uC=8,nc=.1;function Pu(n,a){return(ec(n,a)??0)*at}function hl(n){const[a,i]=fc[n.replace(/^chr/,"")];return[a*at,i*at]}function oh(n,a,i){const[o,u]=n,d=Math.min(at,Math.max(im,(u-o)*i)),h=Math.min(Math.max(a-(a-o)/(u-o)*d,0),at-d);return[h,h+d]}function qu(n,a){const i=n[1]-n[0],o=Math.min(Math.max(n[0]+a,0),at-i);return[o,o+i]}function cC(n,a,i){const o=Math.min(Math.max(i,0),at);return a===0?[Math.min(o,n[1]-im),n[1]]:[n[0],Math.max(o,n[0]+im)]}function fC(n,a,i){const o=(n[0]+n[1])/2+((a[0]+a[1])/2-(n[0]+n[1])/2)*i,[u,d]=[n[1]-n[0],a[1]-a[0]],h=Math.exp(Math.log(u)+(Math.log(d)-Math.log(u))*i),m=Math.min(Math.max(o-h/2,0),at-h);return[m,m+h]}function Uy(n){return n[1]-n[0]<at-.5}function dC(n){for(const[a]of Hn){const[i,o]=hl(a);if(n>=i&&n<=o)return a}return null}function hC(n,a){const i=n.segments.flatMap(u=>a==="total"?[u.total_cn]:[u.major_cn,u.minor_cn]),o=Math.max(...i.map(u=>u??0));return Math.min(uC,Math.max(n.baseline+2,Math.ceil(o)))}function mC(n){const a=10**Math.floor(Math.log10(n)),i=n/a;return(i<1.5?1:i<3.5?2:i<7.5?5:10)*a}function gC(n,a,i=5){const o=Hn.filter(([S])=>{const[w,j]=hl(S);return j>n&&w<a});if(o.length!==1)return o.map(([S])=>{const[w,j]=hl(S);return{value:(w+j)/2,label:S}});const[u,d]=o[0],[h,m]=hl(u),g=(Math.max(n,h)-h)/(m-h)*d,y=(Math.min(a,m)-h)/(m-h)*d,x=mC(Math.max(y-g,1)/i),v=[];for(let S=Math.ceil(g/x)*x;S<=y;S+=x)v.push({value:h+S/d*(m-h),label:Po(S,x)});return v}function pC(n,a){if(n<=.5&&a>=at-.5)return null;const i=nm(n/at,"start"),o=nm(a/at,"end");if(i.chrom===o.chrom){const u=(o.pos-i.pos)/10;return`chr${i.chrom}: ${Po(i.pos,u).replace(" Mb","")}–${Po(o.pos,u)}`}return`chr${i.chrom}:${Po(i.pos,1e6)} – chr${o.chrom}:${Po(o.pos,1e6)}`}function vC(n){const{chrom:a,pos:i}=nm(Math.min(Math.max(n,0),at)/at,"start");return`chr${a} · ${(i/1e6).toFixed(1)} Mb`}const pc=n=>n.call??"neutral",yC={neutral:"Neutral",gain:"Gain",amp:"Amplification",loss:"Loss"},j1={neutral:"var(--chev)",gain:"var(--gain)",amp:"var(--gain-strong)",loss:"var(--loss)"};function xC(n){return{call:yC[pc(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 SC(n){const a=new Map;for(const i of n){const o=i.gene??"?",u=a.get(o)??{gene:o,x:Pu(i.chrom,i.pos),chrom:i.chrom,pos:i.pos,changes:"",list:[]};i.protein_change&&u.list.push(i.protein_change),a.set(o,u)}return[...a.values()].map(({list:i,...o})=>({...o,changes:i.join(", ")})).sort((i,o)=>i.x-o.x)}function rh(n,a,i){const o=a.replace(/^chr/,"");return n.segments.find(u=>u.chrom===o&&u.start<=i&&i<=u.end)}function uh(n,a){return n?a==="total"?n.total_cn:n.major_cn:null}function bC(n){const a=n.length;if(a===0)return"";const i=m=>m.toFixed(2);if(a===1)return`M${i(n[0][0])},${i(n[0][1])}`;const o=n.slice(1).map((m,g)=>m[0]-n[g][0]),u=n.slice(1).map((m,g)=>o[g]===0?0:(m[1]-n[g][1])/o[g]),d=n.map((m,g)=>g===0?u[0]:g===a-1?u[a-2]:u[g-1]*u[g]<=0?0:(u[g-1]+u[g])/2);for(let m=0;m<a-1;m++){if(u[m]===0){d[m]=0,d[m+1]=0;continue}const g=d[m]/u[m],y=d[m+1]/u[m],x=Math.hypot(g,y);x>3&&(d[m]=3*g*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<a-1;m++){const[g,y]=n[m],[x,v]=n[m+1];h+=` C${i(g+o[m]/3)},${i(y+d[m]*o[m]/3)} ${i(x-o[m]/3)},${i(v-d[m+1]*o[m]/3)} ${i(x)},${i(v)}`}return h}function om(n,a){const i=[],o=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+a<=n[u].left);d===-1&&(d=i.push(0)-1),i[d]=n[u].left+n[u].width,o[u]=d}),o}function Tm(n,a=4){const i=Math.max(n,1)/a,o=10**Math.floor(Math.log10(i)),u=i/o,d=Math.max(1,(u<=1?1:u<=2?2:u<=5?5:10)*o),h=[];for(let m=0;m<Math.max(n,1)+d&&(h.push(m),!(m>=n&&h.length>1));m+=d);return h}const jC=n=>1-(1-n)**3;function _a(n,a,i=500){return n.length*a*(i>=600?.6:.56)}function Ul({x:n,y:a,width:i,above:o=!1,children:u}){const d=n>i-320,h=o?Math.min(Math.max(n,110),i-110):n,m=o?"translate(-50%, calc(-100% - 6px))":`translate(${d?"calc(-100% - 14px)":"14px"}, -50%)`;return c.jsx("div",{className:"ctip",style:{left:h,top:a,transform:m},role:"presentation",children:u})}function rm(n,a,i){const o=n.clientX;let u=!1;const d=m=>{const g=m.clientX-o;Math.abs(g)>3&&(u=!0),a(g,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 Oa(n=640){const a=E.useRef(null),[i,o]=E.useState(n);return E.useLayoutEffect(()=>{const u=a.current;if(!u)return;const d=()=>o(Math.round(u.clientWidth)||n);if(d(),typeof ResizeObserver>"u")return;const h=new ResizeObserver(d);return h.observe(u),()=>h.disconnect()},[n]),[a,i]}const $y=36,wC=14,Zo=232,Vy=22,wi=28,Fy=19,NC=480,CC=E.memo(function({segments:a,spans:i,mode:o,shown:u,geo:d,hover:h,grad:m,onHover:g,onClick:y}){const x=u[1]-u[0],v=j=>d.plotL+(j-u[0])/x*d.plotW,S=j=>d.plotTop+(1-Math.min(Math.max(j,0),d.top)/d.top)*Zo,w=S(d.baseline);return c.jsx("g",{children:a.map((j,N)=>{const[M,A]=i[N];if(A<u[0]-1||M>u[1]+1)return null;const C=pc(j),D=v(M),O=Math.max(v(A)-D,C==="neutral"?2:7),z=h===N;if(o==="total"){if(j.total_cn===null)return null;const Q=S(j.total_cn);return c.jsxs("g",{className:"cn-seg","data-call":C,"data-on":z||void 0,children:[C!=="neutral"&&c.jsx("rect",{x:D,y:Math.min(Q,w),width:O,height:Math.abs(Q-w),fill:`url(#${m[C]})`,className:"cn-col"}),c.jsx("line",{x1:D,x2:D+O,y1:Q,y2:Q,style:{stroke:j1[C]},className:"cn-line"}),c.jsx("rect",{x:D-2,y:Math.min(Q,w)-9,width:O+4,height:Math.abs(Q-w)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>g({index:N,x:D+O/2,y:Q}),onMouseLeave:()=>g(null),onClick:()=>y(j)})]},N)}if(j.major_cn===null||j.minor_cn===null)return null;const _=S(j.major_cn+nc),R=S(j.minor_cn-nc);return c.jsxs("g",{className:"cn-seg","data-on":z||void 0,children:[c.jsx("line",{x1:D,x2:D+O,y1:R,y2:R,className:"cn-line cn-minor"}),c.jsx("line",{x1:D,x2:D+O,y1:_,y2:_,className:"cn-line cn-major"}),c.jsx("rect",{x:D-2,y:Math.min(_,R)-9,width:O+4,height:Math.abs(_-R)+18,fill:"transparent",className:"cn-hit",onMouseEnter:()=>g({index:N,x:D+O/2,y:_}),onMouseLeave:()=>g(null),onClick:()=>y(j)})]},N)})})}),EC=E.memo(function({segments:a,spans:i,mode:o,top:u,baseline:d,plotL:h,plotW:m,y0:g}){const y=x=>g+3+(1-Math.min(x,u)/u)*(wi-6);return c.jsxs("g",{pointerEvents:"none",children:[Hn.map(([x],v)=>{const[S,w]=hl(x);return v%2===0?c.jsx("rect",{x:h+S/at*m,y:g,width:(w-S)/at*m,height:wi,className:"cn-mini-band"},x):null}),c.jsx("line",{x1:h,x2:h+m,y1:y(d),y2:y(d),className:"cn-mini-base"}),a.map((x,v)=>{const S=o==="total"?x.total_cn:x.major_cn;if(S===null)return null;const w=pc(x),j=h+i[v][0]/at*m,N=Math.max((i[v][1]-i[v][0])/at*m,w==="neutral"?1:2);return c.jsx("line",{x1:j,x2:j+N,y1:y(S),y2:y(S),className:"cn-mini-line",style:{stroke:o==="total"?j1[w]:"var(--ink-2)"}},v)})]})});function MC({data:n,mode:a,drivers:i,focus:o,locate:u,view:d,onView:h,onSegment:m,onGene:g}){const[y,x]=Oa(900),v=E.useRef(null),S=E.useId(),w={gain:`${S}-gain`,amp:`${S}-amp`,loss:`${S}-loss`},[j,N]=E.useState(d.window),M=E.useRef(j);M.current=j,E.useLayoutEffect(()=>{const J=d.window,se=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(!d.smooth||se){N(J);return}const je=M.current,Ve=performance.now();let ke=0;const wt=lt=>{const We=Math.min(1,(lt-Ve)/NC);N(fC(je,J,jC(We))),We<1&&(ke=requestAnimationFrame(wt))};return ke=requestAnimationFrame(wt),()=>cancelAnimationFrame(ke)},[d]);const[A,C]=E.useState(null),[D,O]=E.useState(null),[z,_]=E.useState(null),[R,Q]=E.useState(!1),K=E.useRef(!1),$=E.useMemo(()=>hC(n,a),[n,a]),le=E.useMemo(()=>n.segments.some(J=>Math.max(J.total_cn??0,J.major_cn??0)>$),[n,$]),oe=E.useMemo(()=>n.segments.map(J=>[Pu(J.chrom,J.start),Pu(J.chrom,J.end)]),[n]),te=E.useMemo(()=>SC(i),[i]),Y=$y,ee=Math.max(x-$y-wC,200),X=j[1]-j[0],W=J=>Y+(J-j[0])/X*ee,ae=J=>j[0]+(J-Y)/ee*X,ve=J=>_a(J,11.5,600)+14,xe=E.useMemo(()=>{const J=te.map(se=>({left:Y+se.x/at*ee-ve(se.gene)/2,width:ve(se.gene)}));return te.length?Math.max(...om(J,4))+1:0},[te,Y,ee]),Fe=(xe?xe*Fy+8:4)+4,Ye=Fe+Zo,L=Ye+10,V=L+Vy+12,ne=V+wi+6,re={plotL:Y,plotW:ee,plotTop:Fe,top:$,baseline:n.baseline},me=J=>Fe+(1-Math.min(Math.max(J,0),$)/$)*Zo,be=te.map((J,se)=>({m:J,index:se,x:W(J.x)})).filter(({x:J})=>J>=Y-4&&J<=Y+ee+4),Ce=om(be.map(({m:J,x:se})=>({left:se-ve(J.gene)/2,width:ve(J.gene)})),4),ue=(J,se)=>J>=Y&&J<=Y+ee&&se>=Fe&&se<=Ye,ge=J=>{const se=v.current.getBoundingClientRect();return[J.clientX-se.left,J.clientY-se.top]},rt=E.useCallback(J=>h({window:J,smooth:!1}),[h]),jt=E.useCallback(J=>h({window:J,smooth:!0}),[h]),mn=E.useRef({shown:j,plotL:Y,plotW:ee,plotTop:Fe,plotBottom:Ye,move:rt});mn.current={shown:j,plotL:Y,plotW:ee,plotTop:Fe,plotBottom:Ye,move:rt},E.useEffect(()=>{const J=y.current;if(!J)return;const se=je=>{if(!je.ctrlKey||!v.current)return;const Ve=v.current.getBoundingClientRect(),ke=je.clientX-Ve.left,wt=je.clientY-Ve.top,lt=mn.current;if(ke<lt.plotL||ke>lt.plotL+lt.plotW||wt<lt.plotTop||wt>lt.plotBottom)return;je.preventDefault();const We=lt.shown[0]+(ke-lt.plotL)/lt.plotW*(lt.shown[1]-lt.shown[0]),Jn=Math.max(-50,Math.min(50,je.deltaY));lt.move(oh(lt.shown,We,Math.exp(Jn*.01)))};return J.addEventListener("wheel",se,{passive:!1}),()=>J.removeEventListener("wheel",se)},[y]),E.useEffect(()=>{u&&/^(\d+|X)$/.test(u.chrom.replace(/^chr/,""))&&jt(hl(u.chrom))},[u,jt]);const Et=J=>{if(J.button!==0)return;const[se,je]=ge(J);if(!ue(se,je)||!Uy(j))return;J.preventDefault();const Ve=j;Q(!0),rm(J,ke=>rt(qu(Ve,-(ke/ee)*(Ve[1]-Ve[0]))),ke=>{Q(!1),ke&&(K.current=!0,setTimeout(()=>K.current=!1,0))})},mt=J=>{const[se,je]=ge(J);_(ue(se,je)?se:null)},Ie=J=>{const[se,je]=ge(J);if(!ue(se,je))return;const Ve=dC(ae(se));Ve&&jt(hl(Ve))},Mt=J=>{const se=(j[0]+j[1])/2;if(J.key==="ArrowLeft"||J.key==="ArrowRight")J.preventDefault(),rt(qu(j,(J.key==="ArrowLeft"?-.15:.15)*X));else if(J.key==="+"||J.key==="=")jt(oh(j,se,.6));else if(J.key==="-")jt(oh(j,se,1/.6));else if(J.key==="0"||J.key==="Home")jt([0,at]);else return;J.key!=="ArrowLeft"&&J.key!=="ArrowRight"&&J.preventDefault()},Cn=E.useCallback(J=>{K.current||m(J)},[m]),Pt=Hn.map(([J],se)=>{const[je,Ve]=hl(J);return{chrom:J,i:se,x0:W(je),x1:W(Ve)}}).filter(({x0:J,x1:se})=>se>Y&&J<Y+ee),pt=Pt.length===1?Pt[0]:null,$l=pt?gC(j[0],j[1],Math.max(2,Math.round(ee/120))):[],ut=(()=>{if(!o)return null;const J=Pu(o.chrom,o.pos);if(J<j[0]||J>j[1])return null;const se=rh(n,o.chrom,o.pos),je=uh(se,a),Ve=a==="allele"&&je!==null?nc:0;return{x:W(J),y:me((je??n.baseline)+Ve),copies:(se==null?void 0:se.total_cn)??null}})(),Zn=A?n.segments[A.index]:null,Ot=Zn?xC(Zn):null,zt=D!==null?te[D]:null,za=J=>Y+J/at*ee,qt={x0:za(j[0]),x1:za(j[1])},$n=Uy(j),gl=(J,se)=>{J.stopPropagation(),J.preventDefault();const je=j;Q(!0),rm(J,Ve=>{const ke=Ve/ee*at;rt(se==="move"?qu(je,ke):cC(je,se,je[se]+ke))},()=>Q(!1))};return c.jsxs("div",{ref:y,className:"cn","data-dragging":R||void 0,"data-zoomed":$n||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:Mt,children:[c.jsxs("svg",{ref:v,width:x,height:ne,"aria-hidden":!0,onPointerDown:Et,onPointerMove:mt,onPointerLeave:()=>_(null),onDoubleClick:Ie,children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:w.gain,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:"var(--gain)"},stopOpacity:.46}),c.jsx("stop",{offset:"1",style:{stopColor:"var(--gain)"},stopOpacity:.04})]}),c.jsxs("linearGradient",{id:w.amp,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:"var(--gain-strong)"},stopOpacity:.62}),c.jsx("stop",{offset:"1",style:{stopColor:"var(--gain-strong)"},stopOpacity:.05})]}),c.jsxs("linearGradient",{id:w.loss,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:"var(--loss)"},stopOpacity:.04}),c.jsx("stop",{offset:"1",style:{stopColor:"var(--loss)"},stopOpacity:.46})]}),c.jsx("clipPath",{id:`${S}-plot`,children:c.jsx("rect",{x:Y-4,y:Fe-2,width:ee+8,height:Zo+4})})]}),c.jsx("g",{clipPath:`url(#${S}-plot)`,children:Hn.map(([J],se)=>{const[je,Ve]=hl(J),ke=W(je),wt=W(Ve);return se%2===0&&wt>Y&&ke<Y+ee?c.jsx("rect",{x:ke,y:Fe,width:wt-ke,height:Zo,className:"cn-band"},J):null})}),Array.from({length:$+1},(J,se)=>c.jsxs("g",{children:[c.jsx("line",{x1:Y,x2:Y+ee,y1:me(se),y2:me(se),className:"cn-grid"}),c.jsx("text",{x:Y-10,y:me(se)+4,textAnchor:"end",className:"cn-tick",children:se===$&&le?`${se}+`:se})]},se)),c.jsx("line",{x1:Y,x2:Y+ee,y1:me(n.baseline),y2:me(n.baseline),className:"cn-baseline"}),c.jsxs("text",{x:Y+8,y:me(n.baseline)-7,className:"cn-baseline-label",children:[n.baseline," copies"]}),c.jsx("g",{className:"cn-reveal",children:c.jsx("g",{clipPath:`url(#${S}-plot)`,children:c.jsx(CC,{segments:n.segments,spans:oe,mode:a,shown:j,geo:re,hover:A?A.index:null,grad:w,onHover:C,onClick:Cn})})}),z!==null&&!R&&!A&&D===null&&c.jsxs("g",{pointerEvents:"none",children:[c.jsx("line",{x1:z,x2:z,y1:Fe,y2:Ye,className:"cn-guide"}),c.jsxs("g",{transform:`translate(${Math.min(Math.max(z,Y+52),Y+ee-52)} ${Ye-24})`,children:[c.jsx("rect",{x:-50,width:100,height:18,rx:9,className:"cn-readout"}),c.jsx("text",{y:12.5,textAnchor:"middle",className:"cn-readout-text",children:vC(ae(z))})]})]}),be.map(({m:J,x:se,index:je},Ve)=>{const ke=rh(n,J.chrom,J.pos),wt=uh(ke,a),lt=me((wt??n.baseline)+(a==="allele"&&wt!==null?nc:0)),We=ve(J.gene),Jn=4+Ce[Ve]*Fy,Vl=D===je;return c.jsxs("g",{className:"cn-driver","data-on":Vl||void 0,onPointerDown:Da=>Da.stopPropagation(),onMouseEnter:()=>O(je),onMouseLeave:()=>O(null),onClick:()=>g(J.gene),children:[c.jsx("line",{x1:se,x2:se,y1:Jn+16,y2:lt,className:"cn-leader"}),c.jsx("rect",{x:se-We/2,y:Jn,width:We,height:16,rx:8,className:"cn-chip"}),c.jsx("text",{x:se,y:Jn+11.5,textAnchor:"middle",className:"cn-gene",children:J.gene}),c.jsx("circle",{cx:se,cy:lt,r:Vl?6.5:5,className:"cn-dot"})]},J.gene)}),ut&&o&&c.jsxs("g",{pointerEvents:"none",children:[c.jsx("line",{x1:ut.x,x2:ut.x,y1:Fe,y2:Ye,className:"cn-focus-line"}),c.jsx("circle",{cx:ut.x,cy:ut.y,r:6.5,className:"cn-focus-dot"}),(()=>{const J=`${o.gene??"?"}${ut.copies!==null?` ${ut.copies} copies`:""}`,se=_a(J,11.5,600)+14,je=ut.x+12+se>Y+ee;return c.jsxs("g",{transform:`translate(${je?ut.x-12-se:ut.x+12} ${ut.y-12})`,children:[c.jsx("rect",{width:se,height:22,rx:7,className:"cn-focus-chip"}),c.jsx("text",{x:7,y:15,className:"cn-focus-text",children:J})]})})()]}),c.jsxs("g",{className:"cn-strip",children:[Pt.map(({chrom:J,i:se,x0:je,x1:Ve})=>{const ke=Math.max(je,Y),wt=Math.min(Ve,Y+ee),lt=wt-ke,We=pt?`chr${J}`:J;return c.jsxs("g",{className:"cn-pill",onClick:()=>jt(hl(J)),role:"presentation",children:[c.jsx("title",{children:`Zoom to chromosome ${J}`}),c.jsx("rect",{x:ke+.5,y:L,width:Math.max(lt-1,1),height:Vy,rx:7,"data-odd":se%2?"":void 0}),lt>=_a(We,11,600)+3&&c.jsx("text",{x:pt?ke+10:(ke+wt)/2,y:L+15,textAnchor:pt?"start":"middle",children:We})]},J)}),pt&&$l.map(J=>{const se=W(J.value);return se>Math.max(pt.x0,Y)+70&&se<Y+ee-20?c.jsxs("g",{pointerEvents:"none",children:[c.jsx("line",{x1:se,x2:se,y1:L+3,y2:L+9,className:"cn-mb-tick"}),c.jsx("text",{x:se,y:L+18,textAnchor:"middle",className:"cn-mb",children:J.label})]},J.value):null})]}),c.jsx(EC,{segments:n.segments,spans:oe,mode:a,top:$,baseline:n.baseline,plotL:Y,plotW:ee,y0:V}),c.jsx("rect",{x:Y,y:V,width:ee,height:wi,fill:"transparent",className:"cn-mini-track",onPointerDown:J=>{const[se]=ge(J),je=j[1]-j[0],Ve=(se-Y)/ee*at;jt(qu([Ve-je/2,Ve+je/2],0))}}),$n&&c.jsxs("g",{className:"cn-mini-window",children:[c.jsx("rect",{x:qt.x0,y:V-1,width:Math.max(qt.x1-qt.x0,4),height:wi+2,rx:6,onPointerDown:J=>gl(J,"move"),className:"cn-mini-win"}),[0,1].map(J=>c.jsx("rect",{x:(J===0?qt.x0:qt.x1)-4,y:V+wi/2-9,width:8,height:18,rx:4,className:"cn-mini-handle",onPointerDown:se=>gl(se,J)},J))]})]}),Ot&&A&&c.jsxs(Ul,{x:A.x+0,y:A.y+0,width:x,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"cn-call-dot","data-call":pc(Zn),"aria-hidden":!0}),Ot.call,c.jsx("span",{className:"ctip-sub",children:Ot.copies})]}),Ot.alleles&&c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Alleles"}),c.jsx("b",{children:Ot.alleles})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Region"}),c.jsx("b",{className:"mono",children:Ot.span})]}),Ot.log2&&c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"log2 ratio"}),c.jsx("b",{children:Ot.log2})]}),c.jsx("span",{className:"ctip-note",children:"Click to list the mutations in this segment"})]}),zt&&D!==null&&c.jsxs(Ul,{x:W(zt.x),y:Fe+10,width:x,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("i",{children:zt.gene}),zt.changes&&c.jsx("span",{className:"ctip-sub",children:zt.changes})]}),(()=>{const J=uh(rh(n,zt.chrom,zt.pos),a);return J!==null?c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Copy number here"}),c.jsx("b",{children:J})]}):null})(),c.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}const _C={"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 ky(n,a="short"){var i;return((i=_C[n])==null?void 0:i[a])??n}const ch=8;function TC(n){const a=n.find(u=>u.group==="sample")??n[0],i=[...(a==null?void 0:a.signatures)??[]].sort((u,d)=>(d.proportion??0)-(u.proportion??0)).map(u=>u.signature),o=i.length>ch?ch-1:ch;return{shown:i.slice(0,o),other:i.slice(o)}}function By(n){return n.group==="sample"?"This tumour":`${n.label.replace(/\(\d+\)$/,"")} cohort${n.cohort_n?`, n = ${n.cohort_n}`:""}`}const Gy=["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],RC="#a3a3ab";function AC(n){const{shown:a,other:i}=TC(n),o=n.find(g=>g.group==="sample")??n[0],u=n.find(g=>g.group==="cohort")??null,d=(g,y,x)=>g?g.signatures.filter(v=>y.includes(v.signature)).reduce((v,S)=>v+(S[x]??0),0):null,h=(g,y,x)=>{var v,S;return{name:g,members:y,colour:x,share:d(o,y,"proportion")??0,cohortShare:d(u,y,"proportion"),count:d(o,y,"count")??0,cohortCount:d(u,y,"count"),aetiology:y.length===1?((v=o==null?void 0:o.signatures.find(w=>w.signature===g))==null?void 0:v.aetiology)??((S=u==null?void 0:u.signatures.find(w=>w.signature===g))==null?void 0:S.aetiology)??null:`${y.length} smaller signatures`}},m=a.map((g,y)=>h(g,[g],Gy[y%Gy.length]));return i.length&&m.push(h("Other",i,RC)),m}function va(n){return n.cohortShare===null?null:(n.share-n.cohortShare)*100}function qy(n,a,i){const o=Math.max(a-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*o,g={y0:d,y1:d+m};return d+=m+i,g})}function OC(n,a,i,o){const u=(n+i)/2,d=h=>h.toFixed(2);return`M${d(n)},${d(a.y0)} C${d(u)},${d(a.y0)} ${d(u)},${d(o.y0)} ${d(i)},${d(o.y0)} L${d(i)},${d(o.y1)} C${d(u)},${d(o.y1)} ${d(u)},${d(a.y1)} ${d(n)},${d(a.y1)} Z`}function ml(n,a){const i=(n.length-1)*a,o=Math.floor(i),u=Math.ceil(i);return n[o]+(n[u]-n[o])*(i-o)}function w1(n){var u;const a=n.cohort.filter(d=>d!==null&&Number.isFinite(d)).sort((d,h)=>d-h);if(a.length===0)return null;const i=((u=n.sample)==null?void 0:u.value)??null,o=[...a];if(i!==null){const d=o.indexOf(i);d>=0&&o.splice(d,1)}return{values:a,q1:ml(a,.25),median:ml(a,.5),q3:ml(a,.75),tumour:i,above:i===null?null:o.filter(d=>d<i).length,others:o.length}}function zC(n,a=64){const i=n.length,o=n.reduce((y,x)=>y+x,0)/i,u=Math.sqrt(n.reduce((y,x)=>y+(x-o)**2,0)/Math.max(i-1,1)),d=Math.min(u,(ml(n,.75)-ml(n,.25))/1.34)||u||.1,h=Math.max(.9*d*i**-.2,.02),m=Array.from({length:a+1},(y,x)=>{const v=x/a;return{x:v,y:n.reduce((S,w)=>S+Math.exp(-.5*((v-w)/h)**2),0)}}),g=Math.max(...m.map(y=>y.y))||1;return m.map(y=>({x:y.x,y:y.y/g}))}function DC(n,a){const i=[],o=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])<a);)d+=1;i.push({x:n[u],level:d}),o[u]=d}),o}function fh(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 Ni(n,a,i,o){const u=Math.PI*(1-Math.min(Math.max(o,0),1));return{x:n+i*Math.cos(u),y:a-i*Math.sin(u)}}function um(n){const a=n.filter(h=>h!==null&&Number.isFinite(h)).sort((h,m)=>h-m);if(!a.length)return null;const i=ml(a,.25),o=ml(a,.75),u=1.5*(o-i),d=a.filter(h=>h>=i-u&&h<=o+u);return{n:a.length,min:a[0],max:a[a.length-1],q1:i,median:ml(a,.5),q3:o,low:d[0]??i,high:d[d.length-1]??o}}function LC(n,a=48){const i=n.filter(j=>j!==null&&Number.isFinite(j));if(i.length<2)return[];const o=Math.min(...i),u=Math.max(...i);if(u===o)return[];const d=i.length,h=i.reduce((j,N)=>j+N,0)/d,m=Math.sqrt(i.reduce((j,N)=>j+(N-h)**2,0)/(d-1)),g=[...i].sort((j,N)=>j-N),y=ml(g,.75)-ml(g,.25),x=Math.min(m,y/1.34)||m||(u-o)/4,v=Math.max(.9*x*d**-.2,(u-o)/200),S=Array.from({length:a+1},(j,N)=>{const M=o+(u-o)*N/a;return{v:M,d:i.reduce((A,C)=>A+Math.exp(-.5*((M-C)/v)**2),0)}}),w=Math.max(...S.map(j=>j.d))||1;return S.map(j=>({v:j.v,d:j.d/w}))}function N1(n,a,i){if(n===null)return"";const o=a.filter(d=>d!==null&&Number.isFinite(d));if(!o.length)return"";const u=o.filter(d=>d<n).length;return u===o.length?`Higher than every ${i}`:u===0?`Lower than every ${i}`:`Higher than ${u} of ${o.length} ${i}s`}function HC(n,a){const i=[],o=new Array(n.length).fill(0),u=[...n.keys()].sort((d,h)=>n[d]-n[h]);for(const d of u){let h=0;const m=g=>g===0?0:g%2?-Math.ceil(g/2):g/2;for(;i.some(g=>g.slot===m(h)&&Math.abs(g.y-n[d])<a);)h+=1;i.push({y:n[d],slot:m(h)}),o[d]=m(h)}return o}const di=46,hi=30,mi=210,Qy=30,UC=58,$C=132,Yy=6,gi=n=>`${Math.round(n*100)}%`;function VC({data:n}){var O,z;const[a,i]=Oa(760),[o,u]=E.useState(((O=n.projects[0])==null?void 0:O.project)??null),[d,h]=E.useState(null),m=n.projects.find(_=>_.project===o)??n.projects[0],g=m.diseases,y=i-di-8,x=Math.min($C,Math.max(UC,y/Math.max(g.length,1))),v=x*g.length,S=Math.max(i,di+v+8),w=di+Math.max(0,(y-v)/2),j=Math.max(y,v),N=_=>hi+mi*(1-Math.min(Math.max(_,0),1)),M=m.tumour?g.findIndex(_=>{var R;return _.disease===((R=m.tumour)==null?void 0:R.disease)}):-1,A=E.useMemo(()=>g.map(_=>{const R=_.values.filter(K=>K!==null),Q=R.map(K=>N(K));return{disease:_,stats:um(R),values:R,py:Q,slots:HC(Q,Yy)}}),[g]),C=d===null?null:A[d],D=((z=m.tumour)==null?void 0:z.fga)??null;return c.jsxs("section",{className:"fga sig-section","aria-label":"Fraction of genome altered against the cohort",children:[c.jsxs("div",{className:"ctx-head",children:[c.jsxs("h3",{className:"sv-h",children:["Fraction of genome altered against the cohort",c.jsxs("span",{className:"sv-h-n",children:["project ",m.project,", n = ",m.n]})]}),c.jsxs("div",{className:"ctx-controls",children:[c.jsx("span",{className:"snap",title:"Cohorts show the samples the report compared with when it ran. Rerun the report to compare with the cohort as it is now.",children:"Cohort as of the report run"}),n.projects.length>1&&c.jsx(Ss,{label:"Project",value:m.project??"",onChange:_=>u(_),options:n.projects.map(_=>({value:_.project??"",label:`Project ${_.project}`}))})]})]}),c.jsx("div",{className:"fga-wrap",children:c.jsxs("div",{ref:a,className:"fga-plot",onMouseLeave:()=>h(null),children:[c.jsx("div",{className:"fga-scroll",children:c.jsxs("svg",{width:S,height:hi+mi+Qy,role:"img","aria-label":`FGA by disease in project ${m.project}`,children:[[0,.25,.5,.75,1].map(_=>c.jsxs("g",{children:[c.jsx("line",{x1:di,x2:di+j,y1:N(_),y2:N(_),className:_===0?"ctx-base":"ctx-grid"}),c.jsx("text",{x:di-8,y:N(_)+4,textAnchor:"end",className:"ctx-tick",children:gi(_)})]},_)),A.map(({disease:_,stats:R,values:Q,py:K,slots:$},le)=>{const oe=w+x*le+x/2,te=Math.min(30,x*.46),Y=le===M;return c.jsxs("g",{className:"fga-col","data-on":d===le||void 0,"data-mine":Y||void 0,children:[c.jsx("rect",{x:w+x*le+2,y:hi-6,width:x-4,height:mi+12,rx:10,className:"fga-band"}),R&&c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:oe,x2:oe,y1:N(R.high),y2:N(R.low),className:"fga-whisker"}),c.jsx("rect",{x:oe-te/2,y:N(R.q3),width:te,height:Math.max(N(R.q1)-N(R.q3),1.5),rx:5,className:"fga-box"}),c.jsx("line",{x1:oe-te/2,x2:oe+te/2,y1:N(R.median),y2:N(R.median),className:"fga-median"})]}),Q.map((ee,X)=>c.jsx("circle",{cx:oe+$[X]*(Yy+1),cy:K[X],r:2.8,className:"fga-dot"},X)),c.jsx("text",{x:oe,y:hi+mi+20,textAnchor:"middle",className:"fga-label",children:_.disease}),c.jsx("rect",{x:w+x*le,y:hi-8,width:x,height:mi+Qy+8,fill:"transparent",tabIndex:0,"aria-label":`${_.name??_.disease}: ${Q.length} samples`,onMouseEnter:()=>h(le),onFocus:()=>h(le),onBlur:()=>h(null)})]},_.disease)}),M>=0&&D!==null&&c.jsxs("g",{className:"fga-pin",pointerEvents:"none",transform:`translate(${w+x*M+x/2} ${N(D)})`,children:[c.jsx("circle",{r:8,className:"fga-pin-dot"}),c.jsxs("g",{transform:"translate(0 -18)",children:[c.jsx("rect",{x:-44,y:-11,width:88,height:20,rx:10,className:"fga-pin-chip"}),c.jsxs("text",{y:3.5,textAnchor:"middle",className:"fga-pin-text",children:["This tumour ",gi(D)]})]})]})]})}),C&&d!==null&&c.jsxs(Ul,{x:Math.min(w+x*d+x/2,i-10),y:hi+mi/2,width:i,children:[c.jsx("span",{className:"ctip-title",children:C.disease.name??C.disease.disease}),C.stats&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Samples"}),c.jsx("b",{children:C.stats.n})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Median"}),c.jsx("b",{children:gi(C.stats.median)})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Middle half"}),c.jsxs("b",{children:[gi(C.stats.q1),"–",gi(C.stats.q3)]})]})]}),d===M&&D!==null&&c.jsxs("span",{className:"ctip-note",children:["This tumour ",gi(D),"."," ",N1(D,FC(C.values,D),`${C.disease.disease} sample`)]})]})]})})]})}function FC(n,a){const i=n.indexOf(a);return i<0?n:[...n.slice(0,i),...n.slice(i+1)]}const Iy=8,Xy=n=>`chr${n.chrom} · ${(n.start/1e6).toFixed(1)} Mb`;function kC({gene:n}){const a=n.copy_number??0,i=Math.min(Math.round(a),Iy);return c.jsx("span",{className:"cng-meter","data-alteration":n.alteration,"aria-hidden":!0,children:Array.from({length:Iy},(o,u)=>c.jsx("span",{"data-on":u<i||void 0},u))})}function BC({project:n,value:a}){if(a===null)return null;const i=a>=0;return c.jsxs("span",{className:"cng-expr","data-up":i||void 0,title:`RNA expression against the project ${n} cohort: log2 of this sample's level over the cohort mean`,children:[c.jsx("span",{className:"cng-arrow","aria-hidden":!0,children:i?"▲":"▼"}),i?"+":"−",Math.abs(a).toFixed(1),c.jsxs("i",{children:["p",n]})]})}function GC({genes:n,onHover:a,onLocate:i}){const o=n.filter(d=>d.alteration==="amplification").length,u=n.length-o;return c.jsxs("section",{className:"cng sig-section","aria-label":"Amplified and lost genes",children:[c.jsxs("h3",{className:"sv-h",children:["Amplified and lost genes",c.jsx("span",{className:"sv-h-n",children:n.length?`${o} amplified oncogene${o===1?"":"s"}, ${u} lost tumour suppressor${u===1?"":"s"}`:"none"})]}),n.length===0?c.jsx("p",{className:"sv-empty",children:"The report calls no amplified oncogenes or homozygously lost tumour suppressors."}):c.jsx("ul",{className:"cng-list",onMouseLeave:()=>a(null),children:n.map(d=>c.jsx("li",{children:c.jsxs("button",{type:"button",className:"cng-row","data-alteration":d.alteration,onMouseEnter:()=>a(d),onFocus:()=>a(d),onBlur:()=>a(null),onClick:()=>i(d),"aria-label":`${d.gene}, ${d.alteration}, ${d.copy_number??"unknown"} copies, ${Xy(d)}: show on the plot`,children:[c.jsx("span",{className:"cng-gene",children:d.gene}),c.jsx("span",{className:"cng-where mono",children:Xy(d)}),c.jsxs("span",{className:"cng-copies",children:[c.jsx(kC,{gene:d}),c.jsxs("span",{className:"cng-n",children:[d.copy_number===null?"?":d.copy_number,c.jsx("small",{children:d.copy_number===1?" copy":" copies"})]})]}),c.jsx("span",{className:"cng-call",children:d.alteration==="amplification"?"Amplified":"Lost"}),c.jsx("span",{className:"cng-exprs",children:d.expression.map(h=>c.jsx(BC,{project:h.project,value:h.log2_fold},h.project))})]})},d.gene))})]})}function Vo({color:n,label:a}){return c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"h-1 w-3.5 rounded-sm",style:{background:n}}),a]})}function qC({envelope:n,loading:a}){return(n==null?void 0:n.status)==="ok"&&n.data?c.jsx(VC,{data:n.data}):(n==null?void 0:n.status)==="missing"&&n.warnings.some(i=>i.includes("Rerun"))?c.jsxs("section",{className:"sig-section","aria-label":"Fraction of genome altered against the cohort",children:[c.jsx("h3",{className:"sv-h",children:"Fraction of genome altered against the cohort"}),c.jsx("p",{className:"sv-empty",children:n.warnings.join(" ")})]}):a&&!n?c.jsx("div",{className:"px-5 py-3",children:c.jsx("div",{className:"skeleton",style:{height:200},"aria-label":"Loading the FGA cohort figure"})}):null}function QC({envelope:n,loading:a,picked:i,sampleLabel:o,drivers:u,focus:d,locate:h,onSegment:m,onGene:g,fga:y,fgaLoading:x=!1}){var Q;const[v,S]=E.useState("total"),[w,j]=E.useState(null),[N,M]=E.useState(null),A=K=>({chrom:K.chrom,pos:Math.round((K.start+K.end)/2),gene:K.gene}),C=E.useMemo(()=>N&&(!h||N.nonce>h.nonce)?N:h,[h,N]),[D,O]=E.useState({window:[0,at],smooth:!1}),z=((Q=n==null?void 0:n.data)==null?void 0:Q.allele_specific)??!1,_=pC(...D.window),R=E.useCallback(()=>O({window:[0,at],smooth:!0}),[]);return c.jsx(JN,{title:"Copy number",subtitle:`Copy number across the genome, ${o}`,info:"copyNumber",envelope:n,loading:a,picked:i,skeletonHeight:250,moreLineage:y==null?void 0:y.lineage,controls:c.jsxs(c.Fragment,{children:[_&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mono text-xs",style:{color:"var(--ink-2)"},"aria-live":"polite",children:_}),c.jsx("button",{type:"button",className:"sc-ib sm","aria-label":"Show the whole genome",title:"Show the whole genome",onClick:R,children:c.jsx(Xw,{size:15,"aria-hidden":!0})})]}),c.jsx(Ss,{label:"Copy number view",value:z?v:"total",onChange:S,options:[{value:"total",label:"Total"},{value:"allele",label:"Allele-specific",disabled:!z}]})]}),footer:c.jsxs("span",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px]",style:{color:"var(--ink-2)"},children:[v==="total"||!z?c.jsxs(c.Fragment,{children:[c.jsx(Vo,{color:"var(--gain)",label:"Gain"}),c.jsx(Vo,{color:"var(--gain-strong)",label:"Amplification"}),c.jsx(Vo,{color:"var(--loss)",label:"Loss"})]}):c.jsxs(c.Fragment,{children:[c.jsx(Vo,{color:"var(--ink-2)",label:"Major allele"}),c.jsx(Vo,{color:"var(--chev)",label:"Minor allele"})]}),c.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:K=>c.jsxs(c.Fragment,{children:[c.jsx(MC,{data:K,mode:z?v:"total",drivers:u,focus:w??d,locate:C,view:D,onView:O,onSegment:m,onGene:g}),K.genes&&c.jsx(GC,{genes:K.genes,onHover:$=>j($?A($):null),onLocate:$=>M({...A($),nonce:Date.now()})}),c.jsx(qC,{envelope:y,loading:x})]})})}function YC(n){const[a,i]=n.range;return[[a,0],...n.bins.map(o=>[(o.x0+o.x1)/2,o.n]),[i,0]]}function dh(n,a){for(let i=1;i<n.length;i++){const[o,u]=n[i-1],[d,h]=n[i];if(a<=d)return d===o?h:u+(a-o)/(d-o)*(h-u)}return n[n.length-1][1]}function IC(n){return n==="ccf"?"CCF":"VAF"}function Ol(n,a){return Math.min(Math.max(a,n.range[0]),n.range[1])}function XC(n){const a=n.measure==="ccf"?.25:.1,i=[];for(let o=n.range[0];o<=n.range[1]+1e-9;o+=a)i.push(Math.round(o*100)/100);return i}function KC(n,a){return n.measure==="ccf"?a===1?"1.0":a.toFixed(2).replace(/0$/,""):a.toFixed(1)}const as=14,PC=22,Fo=118,ZC=40,pi=19,Ky=n=>Math.round(n*100)/100;function JC({data:n,range:a,focus:i,onRange:o,onGene:u}){const[d,h]=Oa(),m=E.useId(),g=E.useRef(null),[y,x]=E.useState(null),[v,S]=E.useState(null),[w,j]=n.range,N=h-PC,M=V=>as+(V-w)/(j-w)*(N-as),A=V=>w+(V-as)/(N-as)*(j-w),C=E.useMemo(()=>YC(n),[n]),D=Math.max(1,...C.map(V=>V[1])),O=V=>V*pi+8+Fo,z=(V,ne)=>O(V)-ne/(D*1.1)*Fo,_=E.useMemo(()=>[...n.drivers].sort((V,ne)=>V.value-ne.value),[n.drivers]),R=_.map(V=>({left:M(Ol(n,V.value))-_a(V.gene??"?",11.5,600)/2-6,width:_a(V.gene??"?",11.5,600)+12})),Q=om(R,4),K=_.length?Math.max(...Q)+1:0,$=O(K),le=$+ZC,oe=C.map(([V,ne])=>[M(V),z(K,ne)]),te=bC(oe),Y=`${te} L${M(j).toFixed(2)},${$} L${M(w).toFixed(2)},${$} 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,X=y?ee(y):a,W=V=>{const ne=g.current.getBoundingClientRect();return A(Math.min(Math.max(V-ne.left,as),N))},ae=(V,ne,re)=>{V.preventDefault(),V.stopPropagation();let me=ne(W(V.clientX));x(me),rm(V,(be,Ce)=>{me=re(me,W(Ce.clientX)),x(me)},()=>{const[be,Ce]=ee(me);if(x(null),M(Ce)-M(be)<4)return o(null);o([Ky(Ol(n,be)),Ky(Ol(n,Ce))])})},ve=(V,ne)=>V.kind==="move"?V:{...V,to:ne},xe=(V,ne)=>{if(V.kind!=="move")return V;const re=V.range[1]-V.range[0],me=Math.min(Math.max(V.range[0]+(ne-V.grab),w),j-re);return{...V,grab:ne,range:[me,me+re]}},He=X?[M(Ol(n,X[0])),M(Ol(n,X[1]))]:null,Fe=IC(n.measure),Ye=i?n.measure==="ccf"?i.ccf:i.vaf:null,L=v!==null?_[v]:null;return c.jsxs("div",{ref:d,className:"dens","data-brushing":y?"":void 0,children:[c.jsxs("svg",{ref:g,width:h,height:le,role:"img","aria-label":`${Fe} 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&&ae(V,ne=>({kind:"new",from:ne,to:ne}),ve)},children:[c.jsxs("defs",{children:[c.jsxs("linearGradient",{id:`${m}-fill`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.42}),c.jsx("stop",{offset:"1",style:{stopColor:"var(--ccf-fill)"},stopOpacity:.03})]}),c.jsx("clipPath",{id:`${m}-spot`,children:He&&c.jsx("rect",{x:He[0],y:0,width:Math.max(He[1]-He[0],0),height:le})})]}),XC(n).map(V=>c.jsxs("g",{children:[c.jsx("line",{x1:M(V),x2:M(V),y1:K*pi+8,y2:$,className:"dens-grid","data-clonal":n.measure==="ccf"&&V===1?"":void 0}),c.jsx("text",{x:M(V),y:$+18,textAnchor:"middle",className:"dens-tick",children:KC(n,V)})]},V)),n.measure==="ccf"&&w<=1&&j>=1&&c.jsx("text",{x:M(1),y:$+31,textAnchor:"middle",className:"dens-clonal",children:"clonal"}),c.jsxs("g",{className:"dens-curve","data-dim":He?"":void 0,children:[c.jsx("path",{d:Y,fill:`url(#${m}-fill)`}),c.jsx("path",{d:te,className:"dens-line"})]}),He&&c.jsx("g",{className:"dens-curve dens-lit",children:c.jsxs("g",{clipPath:`url(#${m}-spot)`,children:[c.jsx("path",{d:Y,fill:`url(#${m}-fill)`}),c.jsx("path",{d:te,className:"dens-line"})]})}),c.jsx("line",{x1:as,x2:N,y1:$,y2:$,className:"dens-axis"}),n.median!==null&&c.jsx("path",{d:`M${M(n.median)},${$+1} l4.5,-6 l-4.5,-6 l-4.5,6 z`,className:"dens-median",children:c.jsx("title",{children:`Median ${n.median.toFixed(2)}`})}),_.map((V,ne)=>{const re=Ol(n,V.value),me=M(re),be=z(K,dh(C,re)),Ce=V.gene??"?",ue=_a(Ce,11.5,600)+12,ge=8+Q[ne]*pi,rt=v===ne;return c.jsxs("g",{className:"dens-driver","data-on":rt||void 0,onPointerDown:jt=>jt.stopPropagation(),onMouseEnter:()=>S(ne),onMouseLeave:()=>S(null),onClick:()=>V.gene&&u(V.gene),children:[c.jsx("line",{x1:me,x2:me,y1:ge+15,y2:be,className:"dens-leader"}),c.jsx("rect",{x:me-ue/2,y:ge,width:ue,height:16,rx:8,className:"dens-chip"}),c.jsx("text",{x:me,y:ge+11.5,textAnchor:"middle",className:"dens-gene",children:Ce}),c.jsx("circle",{cx:me,cy:be,r:rt?7:5.5,className:"dens-dot"})]},`${Ce}-${ne}`)}),Ye!=null&&c.jsx("g",{className:"dens-focus",pointerEvents:"none",children:(()=>{const V=Ol(n,Ye),ne=M(V),re=z(K,dh(C,V)),me=`${(i==null?void 0:i.gene)??"?"} ${Ye.toFixed(2)}`,be=_a(me,11,600)+14,Ce=ne+12+be>h;return c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:ne,x2:ne,y1:re,y2:$,className:"dens-focus-line"}),c.jsx("circle",{cx:ne,cy:re,r:6.5,className:"dens-focus-dot"}),c.jsxs("g",{transform:`translate(${Ce?ne-12-be:ne+12} ${re-11})`,children:[c.jsx("rect",{width:be,height:22,rx:7,className:"dens-focus-chip"}),c.jsx("text",{x:7,y:15,className:"dens-focus-text",children:me})]})]})})()}),X&&He&&c.jsxs("g",{className:"dens-brush",children:[c.jsx("rect",{x:He[0],y:K*pi+4,width:Math.max(He[1]-He[0],0),height:Fo+8,className:"dens-sel",onPointerDown:V=>ae(V,ne=>({kind:"move",grab:ne,range:X}),xe)}),[0,1].map(V=>c.jsxs("g",{children:[c.jsx("line",{x1:He[V],x2:He[V],y1:K*pi+4,y2:$,className:"dens-sel-edge"}),c.jsx("rect",{x:He[V]-5,y:K*pi+4,width:10,height:Fo+8,className:"dens-edge",onPointerDown:ne=>ae(ne,()=>({kind:"edge",fixed:X[1-V],to:X[V]}),ve)}),c.jsx("rect",{x:He[V]-3,y:$-Fo/2-10,width:6,height:20,rx:3,className:"dens-grip",pointerEvents:"none"})]},V)),c.jsxs("g",{transform:`translate(${Math.min(Math.max((He[0]+He[1])/2,as+48),N-48)} ${$-30})`,pointerEvents:"none",children:[c.jsx("rect",{x:-48,y:0,width:96,height:20,rx:10,className:"dens-readout"}),c.jsxs("text",{y:14,textAnchor:"middle",className:"dens-readout-text",children:[X[0].toFixed(2)," – ",X[1].toFixed(2)]})]})]})]}),L&&v!==null&&c.jsxs(Ul,{x:M(Ol(n,L.value)),y:z(K,dh(C,Ol(n,L.value)))-22,width:h,above:!0,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("i",{children:L.gene??"?"}),L.protein_change&&c.jsxs("span",{className:"ctip-sub",children:[" ",L.protein_change]})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:Fe}),c.jsx("b",{children:L.value.toFixed(2)})]}),c.jsx("span",{className:"ctip-note",children:"Driver. Click to find it in the table"})]})]})}function WC({envelope:n,loading:a,measure:i,onMeasure:o,range:u,focus:d,onRange:h,onGene:m}){const g=i==="ccf"?"Cancer cell fraction":"Variant allele fraction",y=(n==null?void 0:n.status)==="ok"?n.data:null;return c.jsxs("div",{className:"strip",children:[c.jsxs("div",{className:"strip-head",children:[c.jsx("span",{className:"text-[13px] font-semibold",children:g}),y&&c.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."]}),c.jsx("span",{className:"flex-auto"}),c.jsx(Ss,{label:"Measure",value:i,onChange:o,options:[{value:"ccf",label:"CCF"},{value:"vaf",label:"VAF"}]})]}),c.jsx(dr,{label:g,envelope:n,loading:a,skeletonHeight:180,children:x=>c.jsx(JC,{data:x,range:u,focus:d,onRange:h,onGene:m})})]})}const eE=Object.keys(v1),tE=Object.keys(y1);function Py(n,a){return n.includes(a)?n.filter(i=>i!==a):[...n,a]}function hh({label:n,count:a,active:i,onClick:o}){return c.jsxs("button",{type:"button",className:"facet","aria-pressed":i,"data-empty":!i&&a===0,onClick:o,children:[c.jsx("span",{className:"facet-check","aria-hidden":!0,children:i&&c.jsx(e1,{size:11,strokeWidth:3})}),c.jsx("span",{className:"truncate",children:n}),c.jsx("span",{className:"facet-n",children:a===void 0?"":a.toLocaleString("en-US")})]})}function nE({table:n,data:a,onChange:i}){const o=a==null?void 0:a.facets.effects,u=a==null?void 0:a.facets.flags,d=n.range;return c.jsxs("aside",{className:"facets","aria-label":"Filters",children:[c.jsxs("div",{className:"facet-group",role:"group","aria-label":"Effect",children:[c.jsx("span",{className:"facet-title",children:"Effect"}),eE.map(h=>c.jsx(hh,{label:v1[h],count:o==null?void 0:o[h],active:n.effects.includes(h),onClick:()=>i({effects:Py(n.effects,h)})},h))]}),c.jsxs("div",{className:"facet-group",role:"group","aria-label":"Flags",children:[c.jsx("span",{className:"facet-title",children:"Flags"}),tE.map(h=>c.jsx(hh,{label:y1[h],count:u==null?void 0:u[h],active:n.flags.includes(h),onClick:()=>i({flags:Py(n.flags,h)})},h))]}),(a==null?void 0:a.ffpe)&&c.jsxs("div",{className:"facet-group",role:"group","aria-label":"FFPE filter",children:[c.jsx("span",{className:"facet-title",children:"FFPE filter"}),c.jsx(hh,{label:"Show filtered calls",count:a.ffpe.removed,active:n.ffpe,onClick:()=>i({ffpe:!n.ffpe})}),c.jsx("span",{className:"facet-note",children:a.ffpe.threshold!==null?`As in the report, calls FFPERASE scores above ${a.ffpe.threshold} are left out of the counts.`:"As in the report, calls its FFPE filter removes are left out of the counts."})]}),d&&c.jsxs("div",{className:"facet-group",role:"group","aria-label":"Range",children:[c.jsxs("span",{className:"facet-title",children:[d.measure==="ccf"?"CCF":"VAF"," range"]}),c.jsxs("span",{className:"facet-range",children:[c.jsxs("span",{className:"mono",children:[d.low.toFixed(2)," – ",d.high.toFixed(2)]}),c.jsx("button",{type:"button",className:"sc-ib xs","aria-label":"Remove the range",title:"Remove the range",onClick:()=>i({range:null}),children:c.jsx(cc,{size:13,"aria-hidden":!0})})]})]}),p1(n)>0&&c.jsx("button",{type:"button",className:"facet-clear",onClick:()=>i({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]})}const mh=48,ko=16,Bo=200,lE=26,vi=["#1baf7a","#eda100"],gh=[{key:"snvs",label:"SNVs"},{key:"indels",label:"Indels"}];function aE({data:n}){const[a,i]=Oa(760),[o,u]=E.useState(null),d=n.cohorts,h=d.length>1,m=(i-mh-8)/gh.length,g=Math.min(m*.34,90),y=j=>{const N=[...d.flatMap(A=>A[j]),n.tumour[j]].filter(A=>A!==null),M=Tm(Math.max(...N,1),4);return{ticks:M,top:M[M.length-1]}},x=o?d[o.cohort]:null,v=o&&x?x[o.event]:[],S=um(v),w=o?n.tumour[o.event]:null;return c.jsxs("section",{className:"tmbc sig-section","aria-label":"Coding mutations against reference cohorts",children:[c.jsxs("div",{className:"ctx-head",children:[c.jsxs("h3",{className:"sv-h",children:["Coding mutations against reference cohorts",n.disease&&c.jsx("span",{className:"sv-h-n",children:n.disease})]}),c.jsxs("div",{className:"ctx-controls",children:[c.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[d.map((j,N)=>c.jsxs("li",{children:[c.jsx("span",{className:"sv-swatch",style:{background:vi[N%vi.length]},"aria-hidden":!0}),j.cohort,j.n!==null&&c.jsx("span",{className:"sv-key-n",children:j.n})]},j.cohort??N)),c.jsxs("li",{children:[c.jsx("span",{className:"hrd-key-pin","aria-hidden":!0}),"This tumour"]})]}),c.jsx("span",{className:"snap",title:"Cohorts show the samples the report compared with when it ran. Rerun the report to compare with the cohort as it is now.",children:"Cohort as of the report run"})]})]}),c.jsx("div",{className:"fga-wrap",children:c.jsxs("div",{ref:a,className:"fga-plot",onMouseLeave:()=>u(null),children:[c.jsx("svg",{width:i,height:ko+Bo+lE,role:"img","aria-label":`Coding SNVs and indels against ${d.map(j=>j.cohort).join(" and ")}`,children:gh.map(({key:j,label:N},M)=>{const{ticks:A,top:C}=y(j),D=mh+m*M,O=D+m/2,z=R=>ko+Bo*(1-R/C),_=n.tumour[j];return c.jsxs("g",{children:[A.map(R=>c.jsxs("g",{children:[c.jsx("line",{x1:D+6,x2:D+m-6,y1:z(R),y2:z(R),className:R===0?"ctx-base":"ctx-grid"}),c.jsx("text",{x:D,y:z(R)+4,textAnchor:"end",className:"ctx-tick",children:R.toLocaleString("en-US")})]},R)),d.map((R,Q)=>{const K=LC(R[j]),$=h?Q===0?-1:1:0,le=vi[Q%vi.length],oe=K.length?$===0?[...K.map(X=>`${O+X.d*g},${z(X.v)}`),...[...K].reverse().map(X=>`${O-X.d*g},${z(X.v)}`)]:[`${O},${z(K[0].v)}`,...K.map(X=>`${O+$*X.d*g},${z(X.v)}`),`${O},${z(K[K.length-1].v)}`]:[],te=um(R[j]),Y=(o==null?void 0:o.event)===j&&o.cohort===Q,ee=$===0?O:O+$*6;return c.jsxs("g",{className:"tmb-violin","data-on":Y||void 0,onMouseEnter:()=>u({event:j,cohort:Q}),children:[oe.length>0&&c.jsx("polygon",{points:oe.join(" "),style:{fill:le,stroke:le},className:"tmb-shape"}),te&&c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:ee,x2:ee,y1:z(te.q1),y2:z(te.q3),className:"tmb-iqr"}),c.jsx("circle",{cx:ee,cy:z(te.median),r:3,className:"tmb-median"})]}),!oe.length&&R[j].map((X,W)=>X===null?null:c.jsx("circle",{cx:O+$*10,cy:z(X),r:3,style:{fill:le}},W)),c.jsx("rect",{x:$===1?O:O-g-4,y:ko,width:$===0?g*2+8:g+4,height:Bo,fill:"transparent"})]},R.cohort??Q)}),_!==null&&c.jsxs("g",{pointerEvents:"none",className:"tmb-tumour",children:[c.jsx("line",{x1:O-g-10,x2:O+g+10,y1:z(_),y2:z(_),className:"tmb-tumour-line"}),c.jsx("circle",{cx:O,cy:z(_),r:7,className:"fga-pin-dot"}),c.jsx("text",{x:O+12,y:z(_)-9,className:"tmb-tumour-text",children:_.toLocaleString("en-US")})]}),c.jsx("text",{x:O,y:ko+Bo+19,textAnchor:"middle",className:"fga-label",children:N})]},j)})}),o&&x&&c.jsxs(Ul,{x:mh+m*gh.findIndex(j=>j.key===o.event)+m/2+(h?o.cohort===0?-g/2:g/2:0),y:ko+Bo/2,width:i,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"sv-swatch",style:{background:vi[o.cohort%vi.length]},"aria-hidden":!0}),x.cohort,", coding ",o.event==="snvs"?"SNVs":"indels"]}),S&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Tumours"}),c.jsx("b",{children:S.n})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Median"}),c.jsx("b",{children:Math.round(S.median).toLocaleString("en-US")})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Middle half"}),c.jsxs("b",{children:[Math.round(S.q1).toLocaleString("en-US"),"–",Math.round(S.q3).toLocaleString("en-US")]})]})]}),w!==null&&c.jsxs("span",{className:"ctip-note",children:["This tumour ",w.toLocaleString("en-US"),". ",N1(w,v,`${x.cohort} tumour`)]})]})]})})]})}/**
268
268
  * table-core
269
269
  *
270
270
  * Copyright (c) TanStack
@@ -273,10 +273,10 @@ Error generating stack: `+a.message+`
273
273
  * LICENSE.md file in the root directory of this source tree.
274
274
  *
275
275
  * @license MIT
276
- */function ja(n,s){return typeof n=="function"?n(s):n}function wn(n,s){return i=>{s.setState(r=>({...r,[n]:ja(i,r[n])}))}}function ac(n){return n instanceof Function}function jN(n){return Array.isArray(n)&&n.every(s=>typeof s=="number")}function CN(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 be(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=(j,N)=>{for(j=String(j);j.length<N;)j=" "+j;return j};console.info(`%c⏱ ${w(v,5)} /${w(x,5)} ms`,`
276
+ */function Ta(n,a){return typeof n=="function"?n(a):n}function wn(n,a){return i=>{a.setState(o=>({...o,[n]:Ta(i,o[n])}))}}function vc(n){return n instanceof Function}function sE(n){return Array.isArray(n)&&n.every(a=>typeof a=="number")}function iE(n,a){const i=[],o=u=>{u.forEach(d=>{i.push(d);const h=a(d);h!=null&&h.length&&o(h)})};return o(n),i}function we(n,a,i){let o=[],u;return d=>{let h;i.key&&i.debug&&(h=Date.now());const m=n(d);if(!(m.length!==o.length||m.some((x,v)=>o[v]!==x)))return u;o=m;let y;if(i.key&&i.debug&&(y=Date.now()),u=a(...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,S=v/16,w=(j,N)=>{for(j=String(j);j.length<N;)j=" "+j;return j};console.info(`%c⏱ ${w(v,5)} /${w(x,5)} ms`,`
277
277
  font-size: .6rem;
278
278
  font-weight: bold;
279
- color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,i==null?void 0:i.key)}return u}}function we(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 NN(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:be(()=>[n,i,s,d],(h,m,p,y)=>({table:h,column:m,row:p,cell:y,getValue:y.getValue,renderValue:y.renderValue}),we(n.options,"debugCells"))};return n._features.forEach(h=>{h.createCell==null||h.createCell(d,i,s,n)},{}),d}function EN(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 j;w=(j=w)==null?void 0:j[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:be(()=>[!0],()=>{var b;return[v,...(b=v.columns)==null?void 0:b.flatMap(w=>w.getFlatColumns())]},we(n.options,"debugColumns")),getLeafColumns:be(()=>[n._getOrderColumnsFn()],b=>{var w;if((w=v.columns)!=null&&w.length){let j=v.columns.flatMap(N=>N.getLeafColumns());return b(j)}return[v]},we(n.options,"debugColumns"))};for(const b of n._features)b.createColumn==null||b.createColumn(v,n);return v}const Gt="debugHeaders";function Ay(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 MN={createTable:n=>{n.getHeaderGroups=be(()=>[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 zu(s,[...m,...y,...p],n)},we(n.options,Gt)),n.getCenterHeaderGroups=be(()=>[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))),zu(s,i,n,"center")),we(n.options,Gt)),n.getLeftHeaderGroups=be(()=>[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 zu(s,d,n,"left")},we(n.options,Gt)),n.getRightHeaderGroups=be(()=>[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 zu(s,d,n,"right")},we(n.options,Gt)),n.getFooterGroups=be(()=>[n.getHeaderGroups()],s=>[...s].reverse(),we(n.options,Gt)),n.getLeftFooterGroups=be(()=>[n.getLeftHeaderGroups()],s=>[...s].reverse(),we(n.options,Gt)),n.getCenterFooterGroups=be(()=>[n.getCenterHeaderGroups()],s=>[...s].reverse(),we(n.options,Gt)),n.getRightFooterGroups=be(()=>[n.getRightHeaderGroups()],s=>[...s].reverse(),we(n.options,Gt)),n.getFlatHeaders=be(()=>[n.getHeaderGroups()],s=>s.map(i=>i.headers).flat(),we(n.options,Gt)),n.getLeftFlatHeaders=be(()=>[n.getLeftHeaderGroups()],s=>s.map(i=>i.headers).flat(),we(n.options,Gt)),n.getCenterFlatHeaders=be(()=>[n.getCenterHeaderGroups()],s=>s.map(i=>i.headers).flat(),we(n.options,Gt)),n.getRightFlatHeaders=be(()=>[n.getRightHeaderGroups()],s=>s.map(i=>i.headers).flat(),we(n.options,Gt)),n.getCenterLeafHeaders=be(()=>[n.getCenterFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),we(n.options,Gt)),n.getLeftLeafHeaders=be(()=>[n.getLeftFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),we(n.options,Gt)),n.getRightLeafHeaders=be(()=>[n.getRightFlatHeaders()],s=>s.filter(i=>{var r;return!((r=i.subHeaders)!=null&&r.length)}),we(n.options,Gt)),n.getLeafHeaders=be(()=>[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()},we(n.options,Gt))}};function zu(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(j=>j.getIsVisible()).forEach(j=>{var N;(N=j.columns)!=null&&N.length&&m(j.columns,w+1)},0)};m(n);let p=[];const y=(b,w)=>{const j={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},N=[];b.forEach(M=>{const R=[...N].reverse()[0],E=M.column.depth===j.depth;let U,T=!1;if(E&&M.column.parent?U=M.column.parent:(U=M.column,T=!0),R&&(R==null?void 0:R.column)===U)R.subHeaders.push(M);else{const H=Ay(i,U,{id:[r,w,U.id,M==null?void 0:M.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${N.filter(D=>D.column===U).length}`:void 0,depth:w,index:N.length});H.subHeaders.push(M),N.push(H)}j.headers.push(M),M.headerGroup=j}),p.push(j),w>0&&y(N,w-1)},x=s.map((b,w)=>Ay(i,b,{depth:h,index:w}));y(x,h-1),p.reverse();const v=b=>b.filter(j=>j.column.getIsVisible()).map(j=>{let N=0,M=0,R=[0];j.subHeaders&&j.subHeaders.length?(R=[],v(j.subHeaders).forEach(U=>{let{colSpan:T,rowSpan:H}=U;N+=T,R.push(H)})):N=1;const E=Math.min(...R);return M=M+E,j.colSpan=N,j.rowSpan=M,{colSpan:N,rowSpan:M}});return v((u=(d=p[0])==null?void 0:d.headers)!=null?u:[]),p}const _N=(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:()=>CN(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:be(()=>[n.getAllLeafColumns()],p=>p.map(y=>NN(n,m,y,y.id)),we(n.options,"debugRows")),_getAllCellsByColumnId:be(()=>[m.getAllCells()],p=>p.reduce((y,x)=>(y[x.column.id]=x,y),{}),we(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},RN={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()}}},o1=(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))};o1.autoRemove=n=>Gn(n);const u1=(n,s,i)=>{var r;return!!(!((r=n.getValue(s))==null||(r=r.toString())==null)&&r.includes(i))};u1.autoRemove=n=>Gn(n);const c1=(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())};c1.autoRemove=n=>Gn(n);const f1=(n,s,i)=>{var r;return(r=n.getValue(s))==null?void 0:r.includes(i)};f1.autoRemove=n=>Gn(n);const d1=(n,s,i)=>!i.some(r=>{var u;return!((u=n.getValue(s))!=null&&u.includes(r))});d1.autoRemove=n=>Gn(n)||!(n!=null&&n.length);const h1=(n,s,i)=>i.some(r=>{var u;return(u=n.getValue(s))==null?void 0:u.includes(r)});h1.autoRemove=n=>Gn(n)||!(n!=null&&n.length);const m1=(n,s,i)=>n.getValue(s)===i;m1.autoRemove=n=>Gn(n);const g1=(n,s,i)=>n.getValue(s)==i;g1.autoRemove=n=>Gn(n);const vm=(n,s,i)=>{let[r,u]=i;const d=n.getValue(s);return d>=r&&d<=u};vm.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]};vm.autoRemove=n=>Gn(n)||Gn(n[0])&&Gn(n[1]);const Al={includesString:o1,includesStringSensitive:u1,equalsString:c1,arrIncludes:f1,arrIncludesAll:d1,arrIncludesSome:h1,equals:m1,weakEquals:g1,inNumberRange:vm};function Gn(n){return n==null||n===""}const TN={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:wn("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"?Al.includesString:typeof r=="number"?Al.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Al.equals:Array.isArray(r)?Al.arrIncludes:Al.weakEquals},n.getFilterFn=()=>{var i,r;return ac(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:Al[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=ja(i,d?d.value:void 0);if(Oy(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=ja(s,u))==null?void 0:d.filter(h=>{const m=i.find(p=>p.id===h.id);if(m){const p=m.getFilterFn();if(Oy(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 Oy(n,s,i){return(n&&n.autoRemove?n.autoRemove(s,i):!1)||typeof s>"u"||typeof s=="string"&&!s}const AN=(n,s,i)=>i.reduce((r,u)=>{const d=u.getValue(n);return r+(typeof d=="number"?d:0)},0),ON=(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},zN=(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},DN=(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]},HN=(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},LN=(n,s)=>{if(!s.length)return;const i=s.map(d=>d.getValue(n));if(!jN(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},UN=(n,s)=>Array.from(new Set(s.map(i=>i.getValue(n))).values()),VN=(n,s)=>new Set(s.map(i=>i.getValue(n))).size,$N=(n,s)=>s.length,nh={sum:AN,min:ON,max:zN,extent:DN,mean:HN,median:LN,unique:UN,uniqueCount:VN,count:$N},FN={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:wn("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 nh.sum;if(Object.prototype.toString.call(r)==="[object Date]")return nh.extent},n.getAggregationFn=()=>{var i,r;if(!n)throw new Error;return ac(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:nh[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 BN(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 kN={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:wn("columnOrder",n)}),createColumn:(n,s)=>{n.getIndex=be(i=>[Br(s,i)],i=>i.findIndex(r=>r.id===n.id),we(s.options,"debugColumns")),n.getIsFirstColumn=i=>{var r;return((r=Br(s,i)[0])==null?void 0:r.id)===n.id},n.getIsLastColumn=i=>{var r;const u=Br(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=be(()=>[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 BN(d,i,r)},we(n.options,"debugTable"))}},lh=()=>({left:[],right:[]}),GN={getInitialState:n=>({columnPinning:lh(),...n}),getDefaultOptions:n=>({onColumnPinningChange:wn("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=be(()=>[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))},we(s.options,"debugRows")),n.getLeftVisibleCells=be(()=>[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"})),we(s.options,"debugRows")),n.getRightVisibleCells=be(()=>[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"})),we(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?lh():(i=(r=n.initialState)==null?void 0:r.columnPinning)!=null?i:lh())},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=be(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),we(n.options,"debugColumns")),n.getRightLeafColumns=be(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(s,i)=>(i??[]).map(r=>s.find(u=>u.id===r)).filter(Boolean),we(n.options,"debugColumns")),n.getCenterLeafColumns=be(()=>[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))},we(n.options,"debugColumns"))}};function qN(n){return n||(typeof document<"u"?document:null)}const Du={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ah=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),QN={getDefaultColumnDef:()=>Du,getInitialState:n=>({columnSizing:{},columnSizingInfo:ah(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:wn("columnSizing",n),onColumnSizingInfoChange:wn("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:Du.minSize,(r=d??n.columnDef.size)!=null?r:Du.size),(u=n.columnDef.maxSize)!=null?u:Du.maxSize)},n.getStart=be(i=>[i,Br(s,i),s.getState().columnSizing],(i,r)=>r.slice(0,n.getIndex(i)).reduce((u,d)=>u+d.getSize(),0),we(s.options,"debugColumns")),n.getAfter=be(i=>[i,Br(s,i),s.getState().columnSizing],(i,r)=>r.slice(n.getIndex(i)+1).reduce((u,d)=>u+d.getSize(),0),we(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(),sh(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=sh(d)?Math.round(d.touches[0].clientX):d.clientX,y={},x=(R,E)=>{typeof E=="number"&&(s.setColumnSizingInfo(U=>{var T,H;const D=s.options.columnResizeDirection==="rtl"?-1:1,O=(E-((T=U==null?void 0:U.startOffset)!=null?T:0))*D,I=Math.max(O/((H=U==null?void 0:U.startSize)!=null?H:0),-.999999);return U.columnSizingStart.forEach(ee=>{let[k,ne]=ee;y[k]=Math.round(Math.max(ne+ne*I,0)*100)/100}),{...U,deltaOffset:O,deltaPercentage:I}}),(s.options.columnResizeMode==="onChange"||R==="end")&&s.setColumnSizing(U=>({...U,...y})))},v=R=>x("move",R),b=R=>{x("end",R),s.setColumnSizingInfo(E=>({...E,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=qN(i),j={moveHandler:R=>v(R.clientX),upHandler:R=>{w==null||w.removeEventListener("mousemove",j.moveHandler),w==null||w.removeEventListener("mouseup",j.upHandler),b(R.clientX)}},N={moveHandler:R=>(R.cancelable&&(R.preventDefault(),R.stopPropagation()),v(R.touches[0].clientX),!1),upHandler:R=>{var E;w==null||w.removeEventListener("touchmove",N.moveHandler),w==null||w.removeEventListener("touchend",N.upHandler),R.cancelable&&(R.preventDefault(),R.stopPropagation()),b((E=R.touches[0])==null?void 0:E.clientX)}},M=YN()?{passive:!1}:!1;sh(d)?(w==null||w.addEventListener("touchmove",N.moveHandler,M),w==null||w.addEventListener("touchend",N.upHandler,M)):(w==null||w.addEventListener("mousemove",j.moveHandler,M),w==null||w.addEventListener("mouseup",j.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?ah():(i=n.initialState.columnSizingInfo)!=null?i:ah())},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 Hu=null;function YN(){if(typeof Hu=="boolean")return Hu;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 Hu=n,Hu}function sh(n){return n.type==="touchstart"}const IN={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:wn("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=be(()=>[n.getAllCells(),s.getState().columnVisibility],i=>i.filter(r=>r.column.getIsVisible()),we(s.options,"debugRows")),n.getVisibleCells=be(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(i,r,u)=>[...i,...r,...u],we(s.options,"debugRows"))},createTable:n=>{const s=(i,r)=>be(()=>[r(),r().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(d=>d.getIsVisible==null?void 0:d.getIsVisible()),we(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 Br(n,s){return s?s==="center"?n.getCenterVisibleLeafColumns():s==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const XN={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()}}},KN={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:wn("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=()=>Al.includesString,n.getGlobalFilterFn=()=>{var s,i;const{globalFilterFn:r}=n.options;return ac(r)?r:r==="auto"?n.getGlobalAutoFilterFn():(s=(i=n.options.filterFns)==null?void 0:i[r])!=null?s:Al[r]},n.setGlobalFilter=s=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(s)},n.resetGlobalFilter=s=>{n.setGlobalFilter(s?void 0:n.initialState.globalFilter)}}},ZN={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:wn("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()}}}},Ph=0,Jh=10,ih=()=>({pageIndex:Ph,pageSize:Jh}),PN={getInitialState:n=>({...n,pagination:{...ih(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:wn("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=>ja(r,d);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=r=>{var u;n.setPagination(r?ih():(u=n.initialState.pagination)!=null?u:ih())},n.setPageIndex=r=>{n.setPagination(u=>{let d=ja(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?Ph:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageIndex)!=null?u:Ph)},n.resetPageSize=r=>{var u,d;n.setPageSize(r?Jh:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageSize)!=null?u:Jh)},n.setPageSize=r=>{n.setPagination(u=>{const d=Math.max(1,ja(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=ja(r,(d=n.options.pageCount)!=null?d:-1);return typeof h=="number"&&(h=Math.max(-1,h)),{...u,pageCount:h}}),n.getPageOptions=be(()=>[n.getPageCount()],r=>{let u=[];return r&&r>0&&(u=[...new Array(r)].fill(null).map((d,h)=>h)),u},we(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}}},rh=()=>({top:[],bottom:[]}),JN={getInitialState:n=>({rowPinning:rh(),...n}),getDefaultOptions:n=>({onRowPinningChange:wn("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,j;return{top:[...((w=p==null?void 0:p.top)!=null?w:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)],bottom:((j=p==null?void 0:p.bottom)!=null?j:[]).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?rh():(i=(r=n.initialState)==null?void 0:r.rowPinning)!=null?i:rh())},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=be(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(s,i)=>n._getPinnedRows(s,i,"top"),we(n.options,"debugRows")),n.getBottomRows=be(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(s,i)=>n._getPinnedRows(s,i,"bottom"),we(n.options,"debugRows")),n.getCenterRows=be(()=>[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))},we(n.options,"debugRows"))}},WN={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:wn("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=>{Wh(u,d.id,r,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=be(()=>[n.getState().rowSelection,n.getCoreRowModel()],(s,i)=>Object.keys(s).length?oh(n,i):{rows:[],flatRows:[],rowsById:{}},we(n.options,"debugTable")),n.getFilteredSelectedRowModel=be(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(s,i)=>Object.keys(s).length?oh(n,i):{rows:[],flatRows:[],rowsById:{}},we(n.options,"debugTable")),n.getGroupedSelectedRowModel=be(()=>[n.getState().rowSelection,n.getSortedRowModel()],(s,i)=>Object.keys(s).length?oh(n,i):{rows:[],flatRows:[],rowsById:{}},we(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 Wh(m,n.id,i,(h=r==null?void 0:r.selectChildren)!=null?h:!0,s),m})},n.getIsSelected=()=>{const{rowSelection:i}=s.getState();return ym(n,i)},n.getIsSomeSelected=()=>{const{rowSelection:i}=s.getState();return em(n,i)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=s.getState();return em(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)}}}},Wh=(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=>Wh(n,m.id,i,r,u))};function oh(n,s){const i=n.getState().rowSelection,r=[],u={},d=function(h,m){return h.map(p=>{var y;const x=ym(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 ym(n,s){var i;return(i=s[n.id])!=null?i:!1}function em(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()&&(ym(h,s)?d=!0:u=!1),h.subRows&&h.subRows.length)){const m=em(h,s);m==="all"?d=!0:(m==="some"&&(d=!0),u=!1)}}),u?"all":d?"some":!1}const tm=/([0-9]+)/gm,eE=(n,s,i)=>p1(Ca(n.getValue(i)).toLowerCase(),Ca(s.getValue(i)).toLowerCase()),tE=(n,s,i)=>p1(Ca(n.getValue(i)),Ca(s.getValue(i))),nE=(n,s,i)=>xm(Ca(n.getValue(i)).toLowerCase(),Ca(s.getValue(i)).toLowerCase()),lE=(n,s,i)=>xm(Ca(n.getValue(i)),Ca(s.getValue(i))),aE=(n,s,i)=>{const r=n.getValue(i),u=s.getValue(i);return r>u?1:r<u?-1:0},sE=(n,s,i)=>xm(n.getValue(i),s.getValue(i));function xm(n,s){return n===s?0:n>s?1:-1}function Ca(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function p1(n,s){const i=n.split(tm).filter(Boolean),r=s.split(tm).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 Ar={alphanumeric:eE,alphanumericCaseSensitive:tE,text:nE,textCaseSensitive:lE,datetime:aE,basic:sE},iE={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:wn("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 Ar.datetime;if(typeof d=="string"&&(r=!0,d.split(tm).length>1))return Ar.alphanumeric}return r?Ar.text:Ar.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 ac(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:Ar[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())}},rE=[MN,IN,kN,GN,RN,TN,XN,KN,iE,FN,ZN,PN,JN,WN,QN];function oE(n){var s,i;const r=[...rE,...(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=ja(b,u.options);u.options=h(w)},getState:()=>u.options.state,setState:b=>{u.options.onStateChange==null||u.options.onStateChange(b)},_getRowId:(b,w,j)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(b,w,j))!=null?N:`${j?[j.id,w].join("."):w}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(b,w)=>{let j=(w?u.getPrePaginationRowModel():u.getRowModel()).rowsById[b];if(!j&&(j=u.getCoreRowModel().rowsById[b],!j))throw new Error;return j},_getDefaultColumnDef:be(()=>[u.options.defaultColumn],b=>{var w;return b=(w=b)!=null?w:{},{header:j=>{const N=j.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:j=>{var N,M;return(N=(M=j.renderValue())==null||M.toString==null?void 0:M.toString())!=null?N:null},...u._features.reduce((j,N)=>Object.assign(j,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...b}},we(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:be(()=>[u._getColumnDefs()],b=>{const w=function(j,N,M){return M===void 0&&(M=0),j.map(R=>{const E=EN(u,R,M,N),U=R;return E.columns=U.columns?w(U.columns,E,M+1):[],E})};return w(b)},we(n,"debugColumns")),getAllFlatColumns:be(()=>[u.getAllColumns()],b=>b.flatMap(w=>w.getFlatColumns()),we(n,"debugColumns")),_getAllFlatColumnsById:be(()=>[u.getAllFlatColumns()],b=>b.reduce((w,j)=>(w[j.id]=j,w),{}),we(n,"debugColumns")),getAllLeafColumns:be(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(b,w)=>{let j=b.flatMap(N=>N.getLeafColumns());return w(j)},we(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 v1(){return n=>be(()=>[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=_N(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},we(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function y1(){return n=>be(()=>[n.getState().expanded,n.getPreExpandedRowModel(),n.options.paginateExpandedRows],(s,i,r)=>!i.rows.length||s!==!0&&!Object.keys(s??{}).length||!r?i:uE(i),we(n.options,"debugTable"))}function uE(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 cE(){return n=>be(()=>[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 j=d[w],N=h[j.id],M=N.sortUndefined,R=(b=j==null?void 0:j.desc)!=null?b:!1;let E=0;if(M){const U=x.getValue(j.id),T=v.getValue(j.id),H=U===void 0,D=T===void 0;if(H||D){if(M==="first")return H?-1:1;if(M==="last")return H?1:-1;E=H&&D?0:H?M:-M}}if(E===0&&(E=N.sortingFn(x,v,j.id)),E!==0)return R&&(E*=-1),N.invertSorting&&(E*=-1),E}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}},we(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
279
+ color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,i==null?void 0:i.key)}return u}}function Ne(n,a,i,o){return{debug:()=>{var u;return(u=n==null?void 0:n.debugAll)!=null?u:n[a]},key:!1,onChange:o}}function oE(n,a,i,o){const u=()=>{var h;return(h=d.getValue())!=null?h:n.options.renderFallbackValue},d={id:`${a.id}_${i.id}`,row:a,column:i,getValue:()=>a.getValue(o),renderValue:u,getContext:we(()=>[n,i,a,d],(h,m,g,y)=>({table:h,column:m,row:g,cell:y,getValue:y.getValue,renderValue:y.renderValue}),Ne(n.options,"debugCells"))};return n._features.forEach(h=>{h.createCell==null||h.createCell(d,i,a,n)},{}),d}function rE(n,a,i,o){var u,d;const m={...n._getDefaultColumnDef(),...a},g=m.accessorKey;let y=(u=(d=m.id)!=null?d:g?typeof String.prototype.replaceAll=="function"?g.replaceAll(".","_"):g.replace(/\./g,"_"):void 0)!=null?u:typeof m.header=="string"?m.header:void 0,x;if(m.accessorFn?x=m.accessorFn:g&&(g.includes(".")?x=S=>{let w=S;for(const N of g.split(".")){var j;w=(j=w)==null?void 0:j[N]}return w}:x=S=>S[m.accessorKey]),!y)throw new Error;let v={id:`${String(y)}`,accessorFn:x,parent:o,depth:i,columnDef:m,columns:[],getFlatColumns:we(()=>[!0],()=>{var S;return[v,...(S=v.columns)==null?void 0:S.flatMap(w=>w.getFlatColumns())]},Ne(n.options,"debugColumns")),getLeafColumns:we(()=>[n._getOrderColumnsFn()],S=>{var w;if((w=v.columns)!=null&&w.length){let j=v.columns.flatMap(N=>N.getLeafColumns());return S(j)}return[v]},Ne(n.options,"debugColumns"))};for(const S of n._features)S.createColumn==null||S.createColumn(v,n);return v}const Xt="debugHeaders";function Zy(n,a,i){var o;let d={id:(o=i.id)!=null?o:a.id,column:a,index:i.index,isPlaceholder:!!i.isPlaceholder,placeholderId:i.placeholderId,depth:i.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const h=[],m=g=>{g.subHeaders&&g.subHeaders.length&&g.subHeaders.map(m),h.push(g)};return m(d),h},getContext:()=>({table:n,header:d,column:a})};return n._features.forEach(h=>{h.createHeader==null||h.createHeader(d,n)}),d}const uE={createTable:n=>{n.getHeaderGroups=we(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(a,i,o,u)=>{var d,h;const m=(d=o==null?void 0:o.map(v=>i.find(S=>S.id===v)).filter(Boolean))!=null?d:[],g=(h=u==null?void 0:u.map(v=>i.find(S=>S.id===v)).filter(Boolean))!=null?h:[],y=i.filter(v=>!(o!=null&&o.includes(v.id))&&!(u!=null&&u.includes(v.id)));return Qu(a,[...m,...y,...g],n)},Ne(n.options,Xt)),n.getCenterHeaderGroups=we(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(a,i,o,u)=>(i=i.filter(d=>!(o!=null&&o.includes(d.id))&&!(u!=null&&u.includes(d.id))),Qu(a,i,n,"center")),Ne(n.options,Xt)),n.getLeftHeaderGroups=we(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(a,i,o)=>{var u;const d=(u=o==null?void 0:o.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return Qu(a,d,n,"left")},Ne(n.options,Xt)),n.getRightHeaderGroups=we(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(a,i,o)=>{var u;const d=(u=o==null?void 0:o.map(h=>i.find(m=>m.id===h)).filter(Boolean))!=null?u:[];return Qu(a,d,n,"right")},Ne(n.options,Xt)),n.getFooterGroups=we(()=>[n.getHeaderGroups()],a=>[...a].reverse(),Ne(n.options,Xt)),n.getLeftFooterGroups=we(()=>[n.getLeftHeaderGroups()],a=>[...a].reverse(),Ne(n.options,Xt)),n.getCenterFooterGroups=we(()=>[n.getCenterHeaderGroups()],a=>[...a].reverse(),Ne(n.options,Xt)),n.getRightFooterGroups=we(()=>[n.getRightHeaderGroups()],a=>[...a].reverse(),Ne(n.options,Xt)),n.getFlatHeaders=we(()=>[n.getHeaderGroups()],a=>a.map(i=>i.headers).flat(),Ne(n.options,Xt)),n.getLeftFlatHeaders=we(()=>[n.getLeftHeaderGroups()],a=>a.map(i=>i.headers).flat(),Ne(n.options,Xt)),n.getCenterFlatHeaders=we(()=>[n.getCenterHeaderGroups()],a=>a.map(i=>i.headers).flat(),Ne(n.options,Xt)),n.getRightFlatHeaders=we(()=>[n.getRightHeaderGroups()],a=>a.map(i=>i.headers).flat(),Ne(n.options,Xt)),n.getCenterLeafHeaders=we(()=>[n.getCenterFlatHeaders()],a=>a.filter(i=>{var o;return!((o=i.subHeaders)!=null&&o.length)}),Ne(n.options,Xt)),n.getLeftLeafHeaders=we(()=>[n.getLeftFlatHeaders()],a=>a.filter(i=>{var o;return!((o=i.subHeaders)!=null&&o.length)}),Ne(n.options,Xt)),n.getRightLeafHeaders=we(()=>[n.getRightFlatHeaders()],a=>a.filter(i=>{var o;return!((o=i.subHeaders)!=null&&o.length)}),Ne(n.options,Xt)),n.getLeafHeaders=we(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(a,i,o)=>{var u,d,h,m,g,y;return[...(u=(d=a[0])==null?void 0:d.headers)!=null?u:[],...(h=(m=i[0])==null?void 0:m.headers)!=null?h:[],...(g=(y=o[0])==null?void 0:y.headers)!=null?g:[]].map(x=>x.getLeafHeaders()).flat()},Ne(n.options,Xt))}};function Qu(n,a,i,o){var u,d;let h=0;const m=function(S,w){w===void 0&&(w=1),h=Math.max(h,w),S.filter(j=>j.getIsVisible()).forEach(j=>{var N;(N=j.columns)!=null&&N.length&&m(j.columns,w+1)},0)};m(n);let g=[];const y=(S,w)=>{const j={depth:w,id:[o,`${w}`].filter(Boolean).join("_"),headers:[]},N=[];S.forEach(M=>{const A=[...N].reverse()[0],C=M.column.depth===j.depth;let D,O=!1;if(C&&M.column.parent?D=M.column.parent:(D=M.column,O=!0),A&&(A==null?void 0:A.column)===D)A.subHeaders.push(M);else{const z=Zy(i,D,{id:[o,w,D.id,M==null?void 0:M.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${N.filter(_=>_.column===D).length}`:void 0,depth:w,index:N.length});z.subHeaders.push(M),N.push(z)}j.headers.push(M),M.headerGroup=j}),g.push(j),w>0&&y(N,w-1)},x=a.map((S,w)=>Zy(i,S,{depth:h,index:w}));y(x,h-1),g.reverse();const v=S=>S.filter(j=>j.column.getIsVisible()).map(j=>{let N=0,M=0,A=[0];j.subHeaders&&j.subHeaders.length?(A=[],v(j.subHeaders).forEach(D=>{let{colSpan:O,rowSpan:z}=D;N+=O,A.push(z)})):N=1;const C=Math.min(...A);return M=M+C,j.colSpan=N,j.rowSpan=M,{colSpan:N,rowSpan:M}});return v((u=(d=g[0])==null?void 0:d.headers)!=null?u:[]),g}const cE=(n,a,i,o,u,d,h)=>{let m={id:a,index:o,original:i,depth:u,parentId:h,_valuesCache:{},_uniqueValuesCache:{},getValue:g=>{if(m._valuesCache.hasOwnProperty(g))return m._valuesCache[g];const y=n.getColumn(g);if(y!=null&&y.accessorFn)return m._valuesCache[g]=y.accessorFn(m.original,o),m._valuesCache[g]},getUniqueValues:g=>{if(m._uniqueValuesCache.hasOwnProperty(g))return m._uniqueValuesCache[g];const y=n.getColumn(g);if(y!=null&&y.accessorFn)return y.columnDef.getUniqueValues?(m._uniqueValuesCache[g]=y.columnDef.getUniqueValues(m.original,o),m._uniqueValuesCache[g]):(m._uniqueValuesCache[g]=[m.getValue(g)],m._uniqueValuesCache[g])},renderValue:g=>{var y;return(y=m.getValue(g))!=null?y:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>iE(m.subRows,g=>g.subRows),getParentRow:()=>m.parentId?n.getRow(m.parentId,!0):void 0,getParentRows:()=>{let g=[],y=m;for(;;){const x=y.getParentRow();if(!x)break;g.push(x),y=x}return g.reverse()},getAllCells:we(()=>[n.getAllLeafColumns()],g=>g.map(y=>oE(n,m,y,y.id)),Ne(n.options,"debugRows")),_getAllCellsByColumnId:we(()=>[m.getAllCells()],g=>g.reduce((y,x)=>(y[x.column.id]=x,y),{}),Ne(n.options,"debugRows"))};for(let g=0;g<n._features.length;g++){const y=n._features[g];y==null||y.createRow==null||y.createRow(m,n)}return m},fE={createColumn:(n,a)=>{n._getFacetedRowModel=a.options.getFacetedRowModel&&a.options.getFacetedRowModel(a,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():a.getPreFilteredRowModel(),n._getFacetedUniqueValues=a.options.getFacetedUniqueValues&&a.options.getFacetedUniqueValues(a,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=a.options.getFacetedMinMaxValues&&a.options.getFacetedMinMaxValues(a,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},C1=(n,a,i)=>{var o,u;const d=i==null||(o=i.toString())==null?void 0:o.toLowerCase();return!!(!((u=n.getValue(a))==null||(u=u.toString())==null||(u=u.toLowerCase())==null)&&u.includes(d))};C1.autoRemove=n=>Xn(n);const E1=(n,a,i)=>{var o;return!!(!((o=n.getValue(a))==null||(o=o.toString())==null)&&o.includes(i))};E1.autoRemove=n=>Xn(n);const M1=(n,a,i)=>{var o;return((o=n.getValue(a))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(i==null?void 0:i.toLowerCase())};M1.autoRemove=n=>Xn(n);const _1=(n,a,i)=>{var o;return(o=n.getValue(a))==null?void 0:o.includes(i)};_1.autoRemove=n=>Xn(n);const T1=(n,a,i)=>!i.some(o=>{var u;return!((u=n.getValue(a))!=null&&u.includes(o))});T1.autoRemove=n=>Xn(n)||!(n!=null&&n.length);const R1=(n,a,i)=>i.some(o=>{var u;return(u=n.getValue(a))==null?void 0:u.includes(o)});R1.autoRemove=n=>Xn(n)||!(n!=null&&n.length);const A1=(n,a,i)=>n.getValue(a)===i;A1.autoRemove=n=>Xn(n);const O1=(n,a,i)=>n.getValue(a)==i;O1.autoRemove=n=>Xn(n);const Rm=(n,a,i)=>{let[o,u]=i;const d=n.getValue(a);return d>=o&&d<=u};Rm.resolveFilterValue=n=>{let[a,i]=n,o=typeof a!="number"?parseFloat(a):a,u=typeof i!="number"?parseFloat(i):i,d=a===null||Number.isNaN(o)?-1/0:o,h=i===null||Number.isNaN(u)?1/0:u;if(d>h){const m=d;d=h,h=m}return[d,h]};Rm.autoRemove=n=>Xn(n)||Xn(n[0])&&Xn(n[1]);const Ll={includesString:C1,includesStringSensitive:E1,equalsString:M1,arrIncludes:_1,arrIncludesAll:T1,arrIncludesSome:R1,equals:A1,weakEquals:O1,inNumberRange:Rm};function Xn(n){return n==null||n===""}const dE={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:wn("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,a)=>{n.getAutoFilterFn=()=>{const i=a.getCoreRowModel().flatRows[0],o=i==null?void 0:i.getValue(n.id);return typeof o=="string"?Ll.includesString:typeof o=="number"?Ll.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Ll.equals:Array.isArray(o)?Ll.arrIncludes:Ll.weakEquals},n.getFilterFn=()=>{var i,o;return vc(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(i=(o=a.options.filterFns)==null?void 0:o[n.columnDef.filterFn])!=null?i:Ll[n.columnDef.filterFn]},n.getCanFilter=()=>{var i,o,u;return((i=n.columnDef.enableColumnFilter)!=null?i:!0)&&((o=a.options.enableColumnFilters)!=null?o:!0)&&((u=a.options.enableFilters)!=null?u:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var i;return(i=a.getState().columnFilters)==null||(i=i.find(o=>o.id===n.id))==null?void 0:i.value},n.getFilterIndex=()=>{var i,o;return(i=(o=a.getState().columnFilters)==null?void 0:o.findIndex(u=>u.id===n.id))!=null?i:-1},n.setFilterValue=i=>{a.setColumnFilters(o=>{const u=n.getFilterFn(),d=o==null?void 0:o.find(x=>x.id===n.id),h=Ta(i,d?d.value:void 0);if(Jy(u,h,n)){var m;return(m=o==null?void 0:o.filter(x=>x.id!==n.id))!=null?m:[]}const g={id:n.id,value:h};if(d){var y;return(y=o==null?void 0:o.map(x=>x.id===n.id?g:x))!=null?y:[]}return o!=null&&o.length?[...o,g]:[g]})}},createRow:(n,a)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=a=>{const i=n.getAllLeafColumns(),o=u=>{var d;return(d=Ta(a,u))==null?void 0:d.filter(h=>{const m=i.find(g=>g.id===h.id);if(m){const g=m.getFilterFn();if(Jy(g,h.value,m))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(o)},n.resetColumnFilters=a=>{var i,o;n.setColumnFilters(a?[]:(i=(o=n.initialState)==null?void 0:o.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 Jy(n,a,i){return(n&&n.autoRemove?n.autoRemove(a,i):!1)||typeof a>"u"||typeof a=="string"&&!a}const hE=(n,a,i)=>i.reduce((o,u)=>{const d=u.getValue(n);return o+(typeof d=="number"?d:0)},0),mE=(n,a,i)=>{let o;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(o>d||o===void 0&&d>=d)&&(o=d)}),o},gE=(n,a,i)=>{let o;return i.forEach(u=>{const d=u.getValue(n);d!=null&&(o<d||o===void 0&&d>=d)&&(o=d)}),o},pE=(n,a,i)=>{let o,u;return i.forEach(d=>{const h=d.getValue(n);h!=null&&(o===void 0?h>=h&&(o=u=h):(o>h&&(o=h),u<h&&(u=h)))}),[o,u]},vE=(n,a)=>{let i=0,o=0;if(a.forEach(u=>{let d=u.getValue(n);d!=null&&(d=+d)>=d&&(++i,o+=d)}),i)return o/i},yE=(n,a)=>{if(!a.length)return;const i=a.map(d=>d.getValue(n));if(!sE(i))return;if(i.length===1)return i[0];const o=Math.floor(i.length/2),u=i.sort((d,h)=>d-h);return i.length%2!==0?u[o]:(u[o-1]+u[o])/2},xE=(n,a)=>Array.from(new Set(a.map(i=>i.getValue(n))).values()),SE=(n,a)=>new Set(a.map(i=>i.getValue(n))).size,bE=(n,a)=>a.length,ph={sum:hE,min:mE,max:gE,extent:pE,mean:vE,median:yE,unique:xE,uniqueCount:SE,count:bE},jE={getDefaultColumnDef:()=>({aggregatedCell:n=>{var a,i;return(a=(i=n.getValue())==null||i.toString==null?void 0:i.toString())!=null?a:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:wn("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,a)=>{n.toggleGrouping=()=>{a.setGrouping(i=>i!=null&&i.includes(n.id)?i.filter(o=>o!==n.id):[...i??[],n.id])},n.getCanGroup=()=>{var i,o;return((i=n.columnDef.enableGrouping)!=null?i:!0)&&((o=a.options.enableGrouping)!=null?o:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var i;return(i=a.getState().grouping)==null?void 0:i.includes(n.id)},n.getGroupedIndex=()=>{var i;return(i=a.getState().grouping)==null?void 0:i.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const i=n.getCanGroup();return()=>{i&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const i=a.getCoreRowModel().flatRows[0],o=i==null?void 0:i.getValue(n.id);if(typeof o=="number")return ph.sum;if(Object.prototype.toString.call(o)==="[object Date]")return ph.extent},n.getAggregationFn=()=>{var i,o;if(!n)throw new Error;return vc(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(i=(o=a.options.aggregationFns)==null?void 0:o[n.columnDef.aggregationFn])!=null?i:ph[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=a=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(a),n.resetGrouping=a=>{var i,o;n.setGrouping(a?[]:(i=(o=n.initialState)==null?void 0:o.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,a)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=i=>{if(n._groupingValuesCache.hasOwnProperty(i))return n._groupingValuesCache[i];const o=a.getColumn(i);return o!=null&&o.columnDef.getGroupingValue?(n._groupingValuesCache[i]=o.columnDef.getGroupingValue(n.original),n._groupingValuesCache[i]):n.getValue(i)},n._groupingValuesCache={}},createCell:(n,a,i,o)=>{n.getIsGrouped=()=>a.getIsGrouped()&&a.id===i.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&a.getIsGrouped(),n.getIsAggregated=()=>{var u;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((u=i.subRows)!=null&&u.length)}}};function wE(n,a,i){if(!(a!=null&&a.length)||!i)return n;const o=n.filter(d=>!a.includes(d.id));return i==="remove"?o:[...a.map(d=>n.find(h=>h.id===d)).filter(Boolean),...o]}const NE={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:wn("columnOrder",n)}),createColumn:(n,a)=>{n.getIndex=we(i=>[Wo(a,i)],i=>i.findIndex(o=>o.id===n.id),Ne(a.options,"debugColumns")),n.getIsFirstColumn=i=>{var o;return((o=Wo(a,i)[0])==null?void 0:o.id)===n.id},n.getIsLastColumn=i=>{var o;const u=Wo(a,i);return((o=u[u.length-1])==null?void 0:o.id)===n.id}},createTable:n=>{n.setColumnOrder=a=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(a),n.resetColumnOrder=a=>{var i;n.setColumnOrder(a?[]:(i=n.initialState.columnOrder)!=null?i:[])},n._getOrderColumnsFn=we(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(a,i,o)=>u=>{let d=[];if(!(a!=null&&a.length))d=u;else{const h=[...a],m=[...u];for(;m.length&&h.length;){const g=h.shift(),y=m.findIndex(x=>x.id===g);y>-1&&d.push(m.splice(y,1)[0])}d=[...d,...m]}return wE(d,i,o)},Ne(n.options,"debugTable"))}},vh=()=>({left:[],right:[]}),CE={getInitialState:n=>({columnPinning:vh(),...n}),getDefaultOptions:n=>({onColumnPinningChange:wn("columnPinning",n)}),createColumn:(n,a)=>{n.pin=i=>{const o=n.getLeafColumns().map(u=>u.id).filter(Boolean);a.setColumnPinning(u=>{var d,h;if(i==="right"){var m,g;return{left:((m=u==null?void 0:u.left)!=null?m:[]).filter(v=>!(o!=null&&o.includes(v))),right:[...((g=u==null?void 0:u.right)!=null?g:[]).filter(v=>!(o!=null&&o.includes(v))),...o]}}if(i==="left"){var y,x;return{left:[...((y=u==null?void 0:u.left)!=null?y:[]).filter(v=>!(o!=null&&o.includes(v))),...o],right:((x=u==null?void 0:u.right)!=null?x:[]).filter(v=>!(o!=null&&o.includes(v)))}}return{left:((d=u==null?void 0:u.left)!=null?d:[]).filter(v=>!(o!=null&&o.includes(v))),right:((h=u==null?void 0:u.right)!=null?h:[]).filter(v=>!(o!=null&&o.includes(v)))}})},n.getCanPin=()=>n.getLeafColumns().some(o=>{var u,d,h;return((u=o.columnDef.enablePinning)!=null?u:!0)&&((d=(h=a.options.enableColumnPinning)!=null?h:a.options.enablePinning)!=null?d:!0)}),n.getIsPinned=()=>{const i=n.getLeafColumns().map(m=>m.id),{left:o,right:u}=a.getState().columnPinning,d=i.some(m=>o==null?void 0:o.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"left":h?"right":!1},n.getPinnedIndex=()=>{var i,o;const u=n.getIsPinned();return u?(i=(o=a.getState().columnPinning)==null||(o=o[u])==null?void 0:o.indexOf(n.id))!=null?i:-1:0}},createRow:(n,a)=>{n.getCenterVisibleCells=we(()=>[n._getAllVisibleCells(),a.getState().columnPinning.left,a.getState().columnPinning.right],(i,o,u)=>{const d=[...o??[],...u??[]];return i.filter(h=>!d.includes(h.column.id))},Ne(a.options,"debugRows")),n.getLeftVisibleCells=we(()=>[n._getAllVisibleCells(),a.getState().columnPinning.left],(i,o)=>(o??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"left"})),Ne(a.options,"debugRows")),n.getRightVisibleCells=we(()=>[n._getAllVisibleCells(),a.getState().columnPinning.right],(i,o)=>(o??[]).map(d=>i.find(h=>h.column.id===d)).filter(Boolean).map(d=>({...d,position:"right"})),Ne(a.options,"debugRows"))},createTable:n=>{n.setColumnPinning=a=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(a),n.resetColumnPinning=a=>{var i,o;return n.setColumnPinning(a?vh():(i=(o=n.initialState)==null?void 0:o.columnPinning)!=null?i:vh())},n.getIsSomeColumnsPinned=a=>{var i;const o=n.getState().columnPinning;if(!a){var u,d;return!!((u=o.left)!=null&&u.length||(d=o.right)!=null&&d.length)}return!!((i=o[a])!=null&&i.length)},n.getLeftLeafColumns=we(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(a,i)=>(i??[]).map(o=>a.find(u=>u.id===o)).filter(Boolean),Ne(n.options,"debugColumns")),n.getRightLeafColumns=we(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(a,i)=>(i??[]).map(o=>a.find(u=>u.id===o)).filter(Boolean),Ne(n.options,"debugColumns")),n.getCenterLeafColumns=we(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(a,i,o)=>{const u=[...i??[],...o??[]];return a.filter(d=>!u.includes(d.id))},Ne(n.options,"debugColumns"))}};function EE(n){return n||(typeof document<"u"?document:null)}const Yu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},yh=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),ME={getDefaultColumnDef:()=>Yu,getInitialState:n=>({columnSizing:{},columnSizingInfo:yh(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:wn("columnSizing",n),onColumnSizingInfoChange:wn("columnSizingInfo",n)}),createColumn:(n,a)=>{n.getSize=()=>{var i,o,u;const d=a.getState().columnSizing[n.id];return Math.min(Math.max((i=n.columnDef.minSize)!=null?i:Yu.minSize,(o=d??n.columnDef.size)!=null?o:Yu.size),(u=n.columnDef.maxSize)!=null?u:Yu.maxSize)},n.getStart=we(i=>[i,Wo(a,i),a.getState().columnSizing],(i,o)=>o.slice(0,n.getIndex(i)).reduce((u,d)=>u+d.getSize(),0),Ne(a.options,"debugColumns")),n.getAfter=we(i=>[i,Wo(a,i),a.getState().columnSizing],(i,o)=>o.slice(n.getIndex(i)+1).reduce((u,d)=>u+d.getSize(),0),Ne(a.options,"debugColumns")),n.resetSize=()=>{a.setColumnSizing(i=>{let{[n.id]:o,...u}=i;return u})},n.getCanResize=()=>{var i,o;return((i=n.columnDef.enableResizing)!=null?i:!0)&&((o=a.options.enableColumnResizing)!=null?o:!0)},n.getIsResizing=()=>a.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,a)=>{n.getSize=()=>{let i=0;const o=u=>{if(u.subHeaders.length)u.subHeaders.forEach(o);else{var d;i+=(d=u.column.getSize())!=null?d:0}};return o(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 o=a.getColumn(n.column.id),u=o==null?void 0:o.getCanResize();return d=>{if(!o||!u||(d.persist==null||d.persist(),xh(d)&&d.touches&&d.touches.length>1))return;const h=n.getSize(),m=n?n.getLeafHeaders().map(A=>[A.column.id,A.column.getSize()]):[[o.id,o.getSize()]],g=xh(d)?Math.round(d.touches[0].clientX):d.clientX,y={},x=(A,C)=>{typeof C=="number"&&(a.setColumnSizingInfo(D=>{var O,z;const _=a.options.columnResizeDirection==="rtl"?-1:1,R=(C-((O=D==null?void 0:D.startOffset)!=null?O:0))*_,Q=Math.max(R/((z=D==null?void 0:D.startSize)!=null?z:0),-.999999);return D.columnSizingStart.forEach(K=>{let[$,le]=K;y[$]=Math.round(Math.max(le+le*Q,0)*100)/100}),{...D,deltaOffset:R,deltaPercentage:Q}}),(a.options.columnResizeMode==="onChange"||A==="end")&&a.setColumnSizing(D=>({...D,...y})))},v=A=>x("move",A),S=A=>{x("end",A),a.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=EE(i),j={moveHandler:A=>v(A.clientX),upHandler:A=>{w==null||w.removeEventListener("mousemove",j.moveHandler),w==null||w.removeEventListener("mouseup",j.upHandler),S(A.clientX)}},N={moveHandler:A=>(A.cancelable&&(A.preventDefault(),A.stopPropagation()),v(A.touches[0].clientX),!1),upHandler:A=>{var C;w==null||w.removeEventListener("touchmove",N.moveHandler),w==null||w.removeEventListener("touchend",N.upHandler),A.cancelable&&(A.preventDefault(),A.stopPropagation()),S((C=A.touches[0])==null?void 0:C.clientX)}},M=_E()?{passive:!1}:!1;xh(d)?(w==null||w.addEventListener("touchmove",N.moveHandler,M),w==null||w.addEventListener("touchend",N.upHandler,M)):(w==null||w.addEventListener("mousemove",j.moveHandler,M),w==null||w.addEventListener("mouseup",j.upHandler,M)),a.setColumnSizingInfo(A=>({...A,startOffset:g,startSize:h,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:o.id}))}}},createTable:n=>{n.setColumnSizing=a=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(a),n.setColumnSizingInfo=a=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(a),n.resetColumnSizing=a=>{var i;n.setColumnSizing(a?{}:(i=n.initialState.columnSizing)!=null?i:{})},n.resetHeaderSizeInfo=a=>{var i;n.setColumnSizingInfo(a?yh():(i=n.initialState.columnSizingInfo)!=null?i:yh())},n.getTotalSize=()=>{var a,i;return(a=(i=n.getHeaderGroups()[0])==null?void 0:i.headers.reduce((o,u)=>o+u.getSize(),0))!=null?a:0},n.getLeftTotalSize=()=>{var a,i;return(a=(i=n.getLeftHeaderGroups()[0])==null?void 0:i.headers.reduce((o,u)=>o+u.getSize(),0))!=null?a:0},n.getCenterTotalSize=()=>{var a,i;return(a=(i=n.getCenterHeaderGroups()[0])==null?void 0:i.headers.reduce((o,u)=>o+u.getSize(),0))!=null?a:0},n.getRightTotalSize=()=>{var a,i;return(a=(i=n.getRightHeaderGroups()[0])==null?void 0:i.headers.reduce((o,u)=>o+u.getSize(),0))!=null?a:0}}};let Iu=null;function _E(){if(typeof Iu=="boolean")return Iu;let n=!1;try{const a={get passive(){return n=!0,!1}},i=()=>{};window.addEventListener("test",i,a),window.removeEventListener("test",i)}catch{n=!1}return Iu=n,Iu}function xh(n){return n.type==="touchstart"}const TE={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:wn("columnVisibility",n)}),createColumn:(n,a)=>{n.toggleVisibility=i=>{n.getCanHide()&&a.setColumnVisibility(o=>({...o,[n.id]:i??!n.getIsVisible()}))},n.getIsVisible=()=>{var i,o;const u=n.columns;return(i=u.length?u.some(d=>d.getIsVisible()):(o=a.getState().columnVisibility)==null?void 0:o[n.id])!=null?i:!0},n.getCanHide=()=>{var i,o;return((i=n.columnDef.enableHiding)!=null?i:!0)&&((o=a.options.enableHiding)!=null?o:!0)},n.getToggleVisibilityHandler=()=>i=>{n.toggleVisibility==null||n.toggleVisibility(i.target.checked)}},createRow:(n,a)=>{n._getAllVisibleCells=we(()=>[n.getAllCells(),a.getState().columnVisibility],i=>i.filter(o=>o.column.getIsVisible()),Ne(a.options,"debugRows")),n.getVisibleCells=we(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(i,o,u)=>[...i,...o,...u],Ne(a.options,"debugRows"))},createTable:n=>{const a=(i,o)=>we(()=>[o(),o().filter(u=>u.getIsVisible()).map(u=>u.id).join("_")],u=>u.filter(d=>d.getIsVisible==null?void 0:d.getIsVisible()),Ne(n.options,"debugColumns"));n.getVisibleFlatColumns=a("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=a("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=a("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=a("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=a("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=i=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(i),n.resetColumnVisibility=i=>{var o;n.setColumnVisibility(i?{}:(o=n.initialState.columnVisibility)!=null?o:{})},n.toggleAllColumnsVisible=i=>{var o;i=(o=i)!=null?o:!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 o;n.toggleAllColumnsVisible((o=i.target)==null?void 0:o.checked)}}};function Wo(n,a){return a?a==="center"?n.getCenterVisibleLeafColumns():a==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const RE={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()}}},AE={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:wn("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:a=>{var i;const o=(i=n.getCoreRowModel().flatRows[0])==null||(i=i._getAllCellsByColumnId()[a.id])==null?void 0:i.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(n,a)=>{n.getCanGlobalFilter=()=>{var i,o,u,d;return((i=n.columnDef.enableGlobalFilter)!=null?i:!0)&&((o=a.options.enableGlobalFilter)!=null?o:!0)&&((u=a.options.enableFilters)!=null?u:!0)&&((d=a.options.getColumnCanGlobalFilter==null?void 0:a.options.getColumnCanGlobalFilter(n))!=null?d:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>Ll.includesString,n.getGlobalFilterFn=()=>{var a,i;const{globalFilterFn:o}=n.options;return vc(o)?o:o==="auto"?n.getGlobalAutoFilterFn():(a=(i=n.options.filterFns)==null?void 0:i[o])!=null?a:Ll[o]},n.setGlobalFilter=a=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(a)},n.resetGlobalFilter=a=>{n.setGlobalFilter(a?void 0:n.initialState.globalFilter)}}},OE={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:wn("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let a=!1,i=!1;n._autoResetExpanded=()=>{var o,u;if(!a){n._queue(()=>{a=!0});return}if((o=(u=n.options.autoResetAll)!=null?u:n.options.autoResetExpanded)!=null?o:!n.options.manualExpanding){if(i)return;i=!0,n._queue(()=>{n.resetExpanded(),i=!1})}},n.setExpanded=o=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(o),n.toggleAllRowsExpanded=o=>{o??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=o=>{var u,d;n.setExpanded(o?{}:(u=(d=n.initialState)==null?void 0:d.expanded)!=null?u:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const o=n.getState().expanded;return o===!0||Object.values(o).some(Boolean)},n.getIsAllRowsExpanded=()=>{const o=n.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||n.getRowModel().flatRows.some(u=>!u.getIsExpanded()))},n.getExpandedDepth=()=>{let o=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(d=>{const h=d.split(".");o=Math.max(o,h.length)}),o},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,a)=>{n.toggleExpanded=i=>{a.setExpanded(o=>{var u;const d=o===!0?!0:!!(o!=null&&o[n.id]);let h={};if(o===!0?Object.keys(a.getRowModel().rowsById).forEach(m=>{h[m]=!0}):h=o,i=(u=i)!=null?u:!d,!d&&i)return{...h,[n.id]:!0};if(d&&!i){const{[n.id]:m,...g}=h;return g}return o})},n.getIsExpanded=()=>{var i;const o=a.getState().expanded;return!!((i=a.options.getIsRowExpanded==null?void 0:a.options.getIsRowExpanded(n))!=null?i:o===!0||o!=null&&o[n.id])},n.getCanExpand=()=>{var i,o,u;return(i=a.options.getRowCanExpand==null?void 0:a.options.getRowCanExpand(n))!=null?i:((o=a.options.enableExpanding)!=null?o:!0)&&!!((u=n.subRows)!=null&&u.length)},n.getIsAllParentsExpanded=()=>{let i=!0,o=n;for(;i&&o.parentId;)o=a.getRow(o.parentId,!0),i=o.getIsExpanded();return i},n.getToggleExpandedHandler=()=>{const i=n.getCanExpand();return()=>{i&&n.toggleExpanded()}}}},cm=0,fm=10,Sh=()=>({pageIndex:cm,pageSize:fm}),zE={getInitialState:n=>({...n,pagination:{...Sh(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:wn("pagination",n)}),createTable:n=>{let a=!1,i=!1;n._autoResetPageIndex=()=>{var o,u;if(!a){n._queue(()=>{a=!0});return}if((o=(u=n.options.autoResetAll)!=null?u:n.options.autoResetPageIndex)!=null?o:!n.options.manualPagination){if(i)return;i=!0,n._queue(()=>{n.resetPageIndex(),i=!1})}},n.setPagination=o=>{const u=d=>Ta(o,d);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(u)},n.resetPagination=o=>{var u;n.setPagination(o?Sh():(u=n.initialState.pagination)!=null?u:Sh())},n.setPageIndex=o=>{n.setPagination(u=>{let d=Ta(o,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=o=>{var u,d;n.setPageIndex(o?cm:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageIndex)!=null?u:cm)},n.resetPageSize=o=>{var u,d;n.setPageSize(o?fm:(u=(d=n.initialState)==null||(d=d.pagination)==null?void 0:d.pageSize)!=null?u:fm)},n.setPageSize=o=>{n.setPagination(u=>{const d=Math.max(1,Ta(o,u.pageSize)),h=u.pageSize*u.pageIndex,m=Math.floor(h/d);return{...u,pageIndex:m,pageSize:d}})},n.setPageCount=o=>n.setPagination(u=>{var d;let h=Ta(o,(d=n.options.pageCount)!=null?d:-1);return typeof h=="number"&&(h=Math.max(-1,h)),{...u,pageCount:h}}),n.getPageOptions=we(()=>[n.getPageCount()],o=>{let u=[];return o&&o>0&&(u=[...new Array(o)].fill(null).map((d,h)=>h)),u},Ne(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:o}=n.getState().pagination,u=n.getPageCount();return u===-1?!0:u===0?!1:o<u-1},n.previousPage=()=>n.setPageIndex(o=>o-1),n.nextPage=()=>n.setPageIndex(o=>o+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 o;return(o=n.options.pageCount)!=null?o:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var o;return(o=n.options.rowCount)!=null?o:n.getPrePaginationRowModel().rows.length}}},bh=()=>({top:[],bottom:[]}),DE={getInitialState:n=>({rowPinning:bh(),...n}),getDefaultOptions:n=>({onRowPinningChange:wn("rowPinning",n)}),createRow:(n,a)=>{n.pin=(i,o,u)=>{const d=o?n.getLeafRows().map(g=>{let{id:y}=g;return y}):[],h=u?n.getParentRows().map(g=>{let{id:y}=g;return y}):[],m=new Set([...h,n.id,...d]);a.setRowPinning(g=>{var y,x;if(i==="bottom"){var v,S;return{top:((v=g==null?void 0:g.top)!=null?v:[]).filter(N=>!(m!=null&&m.has(N))),bottom:[...((S=g==null?void 0:g.bottom)!=null?S:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)]}}if(i==="top"){var w,j;return{top:[...((w=g==null?void 0:g.top)!=null?w:[]).filter(N=>!(m!=null&&m.has(N))),...Array.from(m)],bottom:((j=g==null?void 0:g.bottom)!=null?j:[]).filter(N=>!(m!=null&&m.has(N)))}}return{top:((y=g==null?void 0:g.top)!=null?y:[]).filter(N=>!(m!=null&&m.has(N))),bottom:((x=g==null?void 0:g.bottom)!=null?x:[]).filter(N=>!(m!=null&&m.has(N)))}})},n.getCanPin=()=>{var i;const{enableRowPinning:o,enablePinning:u}=a.options;return typeof o=="function"?o(n):(i=o??u)!=null?i:!0},n.getIsPinned=()=>{const i=[n.id],{top:o,bottom:u}=a.getState().rowPinning,d=i.some(m=>o==null?void 0:o.includes(m)),h=i.some(m=>u==null?void 0:u.includes(m));return d?"top":h?"bottom":!1},n.getPinnedIndex=()=>{var i,o;const u=n.getIsPinned();if(!u)return-1;const d=(i=u==="top"?a.getTopRows():a.getBottomRows())==null?void 0:i.map(h=>{let{id:m}=h;return m});return(o=d==null?void 0:d.indexOf(n.id))!=null?o:-1}},createTable:n=>{n.setRowPinning=a=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(a),n.resetRowPinning=a=>{var i,o;return n.setRowPinning(a?bh():(i=(o=n.initialState)==null?void 0:o.rowPinning)!=null?i:bh())},n.getIsSomeRowsPinned=a=>{var i;const o=n.getState().rowPinning;if(!a){var u,d;return!!((u=o.top)!=null&&u.length||(d=o.bottom)!=null&&d.length)}return!!((i=o[a])!=null&&i.length)},n._getPinnedRows=(a,i,o)=>{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=>a.find(m=>m.id===h))).filter(Boolean).map(h=>({...h,position:o}))},n.getTopRows=we(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(a,i)=>n._getPinnedRows(a,i,"top"),Ne(n.options,"debugRows")),n.getBottomRows=we(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(a,i)=>n._getPinnedRows(a,i,"bottom"),Ne(n.options,"debugRows")),n.getCenterRows=we(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(a,i,o)=>{const u=new Set([...i??[],...o??[]]);return a.filter(d=>!u.has(d.id))},Ne(n.options,"debugRows"))}},LE={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:wn("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=a=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(a),n.resetRowSelection=a=>{var i;return n.setRowSelection(a?{}:(i=n.initialState.rowSelection)!=null?i:{})},n.toggleAllRowsSelected=a=>{n.setRowSelection(i=>{a=typeof a<"u"?a:!n.getIsAllRowsSelected();const o={...i},u=n.getPreGroupedRowModel().flatRows;return a?u.forEach(d=>{d.getCanSelect()&&(o[d.id]=!0)}):u.forEach(d=>{delete o[d.id]}),o})},n.toggleAllPageRowsSelected=a=>n.setRowSelection(i=>{const o=typeof a<"u"?a:!n.getIsAllPageRowsSelected(),u={...i};return n.getRowModel().rows.forEach(d=>{dm(u,d.id,o,!0,n)}),u}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=we(()=>[n.getState().rowSelection,n.getCoreRowModel()],(a,i)=>Object.keys(a).length?jh(n,i):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getFilteredSelectedRowModel=we(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(a,i)=>Object.keys(a).length?jh(n,i):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getGroupedSelectedRowModel=we(()=>[n.getState().rowSelection,n.getSortedRowModel()],(a,i)=>Object.keys(a).length?jh(n,i):{rows:[],flatRows:[],rowsById:{}},Ne(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const a=n.getFilteredRowModel().flatRows,{rowSelection:i}=n.getState();let o=!!(a.length&&Object.keys(i).length);return o&&a.some(u=>u.getCanSelect()&&!i[u.id])&&(o=!1),o},n.getIsAllPageRowsSelected=()=>{const a=n.getPaginationRowModel().flatRows.filter(u=>u.getCanSelect()),{rowSelection:i}=n.getState();let o=!!a.length;return o&&a.some(u=>!i[u.id])&&(o=!1),o},n.getIsSomeRowsSelected=()=>{var a;const i=Object.keys((a=n.getState().rowSelection)!=null?a:{}).length;return i>0&&i<n.getFilteredRowModel().flatRows.length},n.getIsSomePageRowsSelected=()=>{const a=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:a.filter(i=>i.getCanSelect()).some(i=>i.getIsSelected()||i.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>a=>{n.toggleAllRowsSelected(a.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>a=>{n.toggleAllPageRowsSelected(a.target.checked)}},createRow:(n,a)=>{n.toggleSelected=(i,o)=>{const u=n.getIsSelected();a.setRowSelection(d=>{var h;if(i=typeof i<"u"?i:!u,n.getCanSelect()&&u===i)return d;const m={...d};return dm(m,n.id,i,(h=o==null?void 0:o.selectChildren)!=null?h:!0,a),m})},n.getIsSelected=()=>{const{rowSelection:i}=a.getState();return Am(n,i)},n.getIsSomeSelected=()=>{const{rowSelection:i}=a.getState();return hm(n,i)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:i}=a.getState();return hm(n,i)==="all"},n.getCanSelect=()=>{var i;return typeof a.options.enableRowSelection=="function"?a.options.enableRowSelection(n):(i=a.options.enableRowSelection)!=null?i:!0},n.getCanSelectSubRows=()=>{var i;return typeof a.options.enableSubRowSelection=="function"?a.options.enableSubRowSelection(n):(i=a.options.enableSubRowSelection)!=null?i:!0},n.getCanMultiSelect=()=>{var i;return typeof a.options.enableMultiRowSelection=="function"?a.options.enableMultiRowSelection(n):(i=a.options.enableMultiRowSelection)!=null?i:!0},n.getToggleSelectedHandler=()=>{const i=n.getCanSelect();return o=>{var u;i&&n.toggleSelected((u=o.target)==null?void 0:u.checked)}}}},dm=(n,a,i,o,u)=>{var d;const h=u.getRow(a,!0);i?(h.getCanMultiSelect()||Object.keys(n).forEach(m=>delete n[m]),h.getCanSelect()&&(n[a]=!0)):delete n[a],o&&(d=h.subRows)!=null&&d.length&&h.getCanSelectSubRows()&&h.subRows.forEach(m=>dm(n,m.id,i,o,u))};function jh(n,a){const i=n.getState().rowSelection,o=[],u={},d=function(h,m){return h.map(g=>{var y;const x=Am(g,i);if(x&&(o.push(g),u[g.id]=g),(y=g.subRows)!=null&&y.length&&(g={...g,subRows:d(g.subRows)}),x)return g}).filter(Boolean)};return{rows:d(a.rows),flatRows:o,rowsById:u}}function Am(n,a){var i;return(i=a[n.id])!=null?i:!1}function hm(n,a,i){var o;if(!((o=n.subRows)!=null&&o.length))return!1;let u=!0,d=!1;return n.subRows.forEach(h=>{if(!(d&&!u)&&(h.getCanSelect()&&(Am(h,a)?d=!0:u=!1),h.subRows&&h.subRows.length)){const m=hm(h,a);m==="all"?d=!0:(m==="some"&&(d=!0),u=!1)}}),u?"all":d?"some":!1}const mm=/([0-9]+)/gm,HE=(n,a,i)=>z1(Ra(n.getValue(i)).toLowerCase(),Ra(a.getValue(i)).toLowerCase()),UE=(n,a,i)=>z1(Ra(n.getValue(i)),Ra(a.getValue(i))),$E=(n,a,i)=>Om(Ra(n.getValue(i)).toLowerCase(),Ra(a.getValue(i)).toLowerCase()),VE=(n,a,i)=>Om(Ra(n.getValue(i)),Ra(a.getValue(i))),FE=(n,a,i)=>{const o=n.getValue(i),u=a.getValue(i);return o>u?1:o<u?-1:0},kE=(n,a,i)=>Om(n.getValue(i),a.getValue(i));function Om(n,a){return n===a?0:n>a?1:-1}function Ra(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function z1(n,a){const i=n.split(mm).filter(Boolean),o=a.split(mm).filter(Boolean);for(;i.length&&o.length;){const u=i.shift(),d=o.shift(),h=parseInt(u,10),m=parseInt(d,10),g=[h,m].sort();if(isNaN(g[0])){if(u>d)return 1;if(d>u)return-1;continue}if(isNaN(g[1]))return isNaN(h)?-1:1;if(h>m)return 1;if(m>h)return-1}return i.length-o.length}const Go={alphanumeric:HE,alphanumericCaseSensitive:UE,text:$E,textCaseSensitive:VE,datetime:FE,basic:kE},BE={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:wn("sorting",n),isMultiSortEvent:a=>a.shiftKey}),createColumn:(n,a)=>{n.getAutoSortingFn=()=>{const i=a.getFilteredRowModel().flatRows.slice(10);let o=!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 Go.datetime;if(typeof d=="string"&&(o=!0,d.split(mm).length>1))return Go.alphanumeric}return o?Go.text:Go.basic},n.getAutoSortDir=()=>{const i=a.getFilteredRowModel().flatRows[0];return typeof(i==null?void 0:i.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var i,o;if(!n)throw new Error;return vc(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(i=(o=a.options.sortingFns)==null?void 0:o[n.columnDef.sortingFn])!=null?i:Go[n.columnDef.sortingFn]},n.toggleSorting=(i,o)=>{const u=n.getNextSortingOrder(),d=typeof i<"u"&&i!==null;a.setSorting(h=>{const m=h==null?void 0:h.find(w=>w.id===n.id),g=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()&&o?m?x="toggle":x="add":h!=null&&h.length&&g!==h.length-1?x="replace":m?x="toggle":x="replace",x==="toggle"&&(d||u||(x="remove")),x==="add"){var S;y=[...h,{id:n.id,desc:v}],y.splice(0,y.length-((S=a.options.maxMultiSortColCount)!=null?S: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,o;return((i=(o=n.columnDef.sortDescFirst)!=null?o:a.options.sortDescFirst)!=null?i:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=i=>{var o,u;const d=n.getFirstSortDir(),h=n.getIsSorted();return h?h!==d&&((o=a.options.enableSortingRemoval)==null||o)&&(!(i&&(u=a.options.enableMultiRemove)!=null)||u)?!1:h==="desc"?"asc":"desc":d},n.getCanSort=()=>{var i,o;return((i=n.columnDef.enableSorting)!=null?i:!0)&&((o=a.options.enableSorting)!=null?o:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var i,o;return(i=(o=n.columnDef.enableMultiSort)!=null?o:a.options.enableMultiSort)!=null?i:!!n.accessorFn},n.getIsSorted=()=>{var i;const o=(i=a.getState().sorting)==null?void 0:i.find(u=>u.id===n.id);return o?o.desc?"desc":"asc":!1},n.getSortIndex=()=>{var i,o;return(i=(o=a.getState().sorting)==null?void 0:o.findIndex(u=>u.id===n.id))!=null?i:-1},n.clearSorting=()=>{a.setSorting(i=>i!=null&&i.length?i.filter(o=>o.id!==n.id):[])},n.getToggleSortingHandler=()=>{const i=n.getCanSort();return o=>{i&&(o.persist==null||o.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?a.options.isMultiSortEvent==null?void 0:a.options.isMultiSortEvent(o):!1))}}},createTable:n=>{n.setSorting=a=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(a),n.resetSorting=a=>{var i,o;n.setSorting(a?[]:(i=(o=n.initialState)==null?void 0:o.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())}},GE=[uE,TE,NE,CE,fE,dE,RE,AE,BE,jE,OE,zE,DE,LE,ME];function qE(n){var a,i;const o=[...GE,...(a=n._features)!=null?a:[]];let u={_features:o};const d=u._features.reduce((S,w)=>Object.assign(S,w.getDefaultOptions==null?void 0:w.getDefaultOptions(u)),{}),h=S=>u.options.mergeOptions?u.options.mergeOptions(d,S):{...d,...S};let g={...{},...(i=n.initialState)!=null?i:{}};u._features.forEach(S=>{var w;g=(w=S.getInitialState==null?void 0:S.getInitialState(g))!=null?w:g});const y=[];let x=!1;const v={_features:o,options:{...d,...n},initialState:g,_queue:S=>{y.push(S),x||(x=!0,Promise.resolve().then(()=>{for(;y.length;)y.shift()();x=!1}).catch(w=>setTimeout(()=>{throw w})))},reset:()=>{u.setState(u.initialState)},setOptions:S=>{const w=Ta(S,u.options);u.options=h(w)},getState:()=>u.options.state,setState:S=>{u.options.onStateChange==null||u.options.onStateChange(S)},_getRowId:(S,w,j)=>{var N;return(N=u.options.getRowId==null?void 0:u.options.getRowId(S,w,j))!=null?N:`${j?[j.id,w].join("."):w}`},getCoreRowModel:()=>(u._getCoreRowModel||(u._getCoreRowModel=u.options.getCoreRowModel(u)),u._getCoreRowModel()),getRowModel:()=>u.getPaginationRowModel(),getRow:(S,w)=>{let j=(w?u.getPrePaginationRowModel():u.getRowModel()).rowsById[S];if(!j&&(j=u.getCoreRowModel().rowsById[S],!j))throw new Error;return j},_getDefaultColumnDef:we(()=>[u.options.defaultColumn],S=>{var w;return S=(w=S)!=null?w:{},{header:j=>{const N=j.header.column.columnDef;return N.accessorKey?N.accessorKey:N.accessorFn?N.id:null},cell:j=>{var N,M;return(N=(M=j.renderValue())==null||M.toString==null?void 0:M.toString())!=null?N:null},...u._features.reduce((j,N)=>Object.assign(j,N.getDefaultColumnDef==null?void 0:N.getDefaultColumnDef()),{}),...S}},Ne(n,"debugColumns")),_getColumnDefs:()=>u.options.columns,getAllColumns:we(()=>[u._getColumnDefs()],S=>{const w=function(j,N,M){return M===void 0&&(M=0),j.map(A=>{const C=rE(u,A,M,N),D=A;return C.columns=D.columns?w(D.columns,C,M+1):[],C})};return w(S)},Ne(n,"debugColumns")),getAllFlatColumns:we(()=>[u.getAllColumns()],S=>S.flatMap(w=>w.getFlatColumns()),Ne(n,"debugColumns")),_getAllFlatColumnsById:we(()=>[u.getAllFlatColumns()],S=>S.reduce((w,j)=>(w[j.id]=j,w),{}),Ne(n,"debugColumns")),getAllLeafColumns:we(()=>[u.getAllColumns(),u._getOrderColumnsFn()],(S,w)=>{let j=S.flatMap(N=>N.getLeafColumns());return w(j)},Ne(n,"debugColumns")),getColumn:S=>u._getAllFlatColumnsById()[S]};Object.assign(u,v);for(let S=0;S<u._features.length;S++){const w=u._features[S];w==null||w.createTable==null||w.createTable(u)}return u}function D1(){return n=>we(()=>[n.options.data],a=>{const i={rows:[],flatRows:[],rowsById:{}},o=function(u,d,h){d===void 0&&(d=0);const m=[];for(let y=0;y<u.length;y++){const x=cE(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 g;x.originalSubRows=n.options.getSubRows(u[y],y),(g=x.originalSubRows)!=null&&g.length&&(x.subRows=o(x.originalSubRows,d+1,x))}}return m};return i.rows=o(a),i},Ne(n.options,"debugTable","getRowModel",()=>n._autoResetPageIndex()))}function L1(){return n=>we(()=>[n.getState().expanded,n.getPreExpandedRowModel(),n.options.paginateExpandedRows],(a,i,o)=>!i.rows.length||a!==!0&&!Object.keys(a??{}).length||!o?i:QE(i),Ne(n.options,"debugTable"))}function QE(n){const a=[],i=o=>{var u;a.push(o),(u=o.subRows)!=null&&u.length&&o.getIsExpanded()&&o.subRows.forEach(i)};return n.rows.forEach(i),{rows:a,flatRows:n.flatRows,rowsById:n.rowsById}}function YE(){return n=>we(()=>[n.getState().sorting,n.getPreSortedRowModel()],(a,i)=>{if(!i.rows.length||!(a!=null&&a.length))return i;const o=n.getState().sorting,u=[],d=o.filter(g=>{var y;return(y=n.getColumn(g.id))==null?void 0:y.getCanSort()}),h={};d.forEach(g=>{const y=n.getColumn(g.id);y&&(h[g.id]={sortUndefined:y.columnDef.sortUndefined,invertSorting:y.columnDef.invertSorting,sortingFn:y.getSortingFn()})});const m=g=>{const y=g.map(x=>({...x}));return y.sort((x,v)=>{for(let w=0;w<d.length;w+=1){var S;const j=d[w],N=h[j.id],M=N.sortUndefined,A=(S=j==null?void 0:j.desc)!=null?S:!1;let C=0;if(M){const D=x.getValue(j.id),O=v.getValue(j.id),z=D===void 0,_=O===void 0;if(z||_){if(M==="first")return z?-1:1;if(M==="last")return z?1:-1;C=z&&_?0:z?M:-M}}if(C===0&&(C=N.sortingFn(x,v,j.id)),C!==0)return A&&(C*=-1),N.invertSorting&&(C*=-1),C}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}},Ne(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/**
280
280
  * react-table
281
281
  *
282
282
  * Copyright (c) TanStack
@@ -285,4 +285,4 @@ Error generating stack: `+a.message+`
285
285
  * LICENSE.md file in the root directory of this source tree.
286
286
  *
287
287
  * @license MIT
288
- */function Qu(n,s){return n?fE(n)?C.createElement(n,s):n:null}function fE(n){return dE(n)||typeof n=="function"||hE(n)}function dE(n){return typeof n=="function"&&(()=>{const s=Object.getPrototypeOf(n);return s.prototype&&s.prototype.isReactComponent})()}function hE(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function x1(n){const s={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[i]=C.useState(()=>({current:oE(s)})),[r,u]=C.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 Yu({value:n,onChange:s,label:i="Search mutations",placeholder:r="Search gene, change or locus",shortcut:u=!0,delay:d=250}){const[h,m]=C.useState(n),p=C.useRef(null),y=C.useRef(s);y.current=s,C.useEffect(()=>m(n),[n]),C.useEffect(()=>{if(h===n)return;const v=window.setTimeout(()=>y.current(h),d);return()=>window.clearTimeout(v)},[h,n,d]),C.useEffect(()=>{if(!u)return;const v=b=>{var w,j,N;b.key!=="/"||b.metaKey||b.ctrlKey||b.altKey||(j=(w=b.target)==null?void 0:w.closest)!=null&&j.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(Bu,{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(Ju,{size:14,"aria-hidden":!0})}):u?f.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"}):null]})}const uh=n=>n.toLocaleString("en-US");function sc({shown:n,total:s,noun:i,loaded:r=!1,note:u}){const h=n>=s?`${uh(s)} ${s===1?i[0]:i[1]}`:`${uh(n)} of ${uh(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 mE(n){return typeof n=="object"?n.key:n}function gE(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 ii(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 zy(n,s){if(n===void 0)throw new Error("Unexpected undefined");return n}const Dy=(n,s)=>Math.abs(n-s)<1.01,pE=(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 Or;const ch=()=>{if(Or!==void 0)return Or;if(typeof navigator>"u")return Or=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Or=!0;const n=navigator.maxTouchPoints;return Or=navigator.platform==="MacIntel"&&n!==void 0&&n>0},Hy=n=>{const{offsetWidth:s,offsetHeight:i}=n;return{width:s,height:i}},vE=n=>n,yE=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},xE=(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(Hy(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(Hy(i))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(m):m()});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},Iu={passive:!0},SE=typeof window>"u"?!0:"onscrollend"in window,bE=(n,s,i)=>{const r=n.scrollElement;if(!r)return;const u=n.targetWindow;if(!u)return;const d=n.options.useScrollendEvent&&SE;let h=0;const m=d?null:pE(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,Iu),d&&r.addEventListener("scrollend",x,Iu),()=>{r.removeEventListener("scroll",y),d&&r.removeEventListener("scrollend",x),m==null||m.cancel()}},wE=(n,s)=>bE(n,s,i=>{const{horizontal:r,isRtl:u}=n.options;return r?i.scrollLeft*(u&&-1||1):i.scrollTop}),jE=(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"]},CE=(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})},NE=CE;function EE(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 ME{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:vE,rangeExtractor:yE,onChange:()=>{},measureElement:jE,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(),j=((r=this._singleLaneMeasurements)==null?void 0:r.items)??w,N=T=>mE(j[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||EE(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:j,getItemKey:N}=this.options;let M=0;for(;M<j&&N(M)!==v;)M++;if(M<j){const R=w[M];if(R){const E=Math.max(0,R.start+b);!m&&E!==this.scrollOffset&&(x=E-this.scrollOffset,this.scrollOffset=E,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=ii(()=>(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,!(!ch()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};h.addEventListener("touchstart",m,Iu),h.addEventListener("touchend",p,Iu),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&&(ch()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?y!==0&&(this._iosDeferredAdjustment+=y):((r=this.scrollState)==null?void 0:r.behavior)==="smooth"&&!Dy(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=ii(()=>[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=ii(()=>[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 E of this.laneAssignments.keys())E>=i&&this.laneAssignments.delete(E);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(E=>{this.itemSizeCache.set(E.key,E.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===i&&(this.lanesSettling=!1),m===1){const E=i*2;let U=(v=this._singleLaneMeasurements)==null?void 0:v.flat;if(!U||U.length<E){const O=new Float64Array(E);U&&w>0&&O.set(U.subarray(0,w*2)),U=O}const T=w===0?new Array(i):this._singleLaneMeasurements.items.slice();let H;if(w===0)H=r+u;else{const O=w-1;H=U[O*2]+U[O*2+1]+y}for(let O=w;O<i;O++){const I=d(O);T[O]=I;const ee=b.get(I),k=typeof ee=="number"?ee:this.options.estimateSize(O);U[O*2]=H,U[O*2+1]=k,H+=k+y}this._singleLaneMeasurements={flat:U,items:T};const D=gE(T,U);return this.measurementsCache=D,D}const j=this.measurementsCache.slice(0,w),N=new Array(m).fill(void 0),M=new Float64Array(m);let R=0;for(let E=0;E<w;E++){const U=j[E];U&&(N[U.lane]===void 0&&R++,N[U.lane]=E,M[U.lane]=U.end)}for(let E=w;E<i;E++){const U=d(E),T=this.laneAssignments.get(E);let H,D;const O=p==="estimate"||b.has(U);if(T!==void 0&&this.options.lanes>1){H=T;const ne=N[H],oe=ne!==void 0?j[ne]:void 0;D=oe?oe.end+y:r+u}else if(R===m){let ne=0,oe=M[0],ie=N[0];for(let Y=1;Y<m;Y++){const W=M[Y];(W<oe||W===oe&&N[Y]<ie)&&(ne=Y,oe=W,ie=N[Y])}H=ne,D=oe+y,O&&this.laneAssignments.set(E,H)}else H=E%this.options.lanes,D=r+u,O&&this.laneAssignments.set(E,H);const I=b.get(U),ee=typeof I=="number"?I:this.options.estimateSize(E),k=D+ee;j[E]={index:E,start:D,size:ee,end:k,key:U,lane:H},N[H]===void 0&&R++,N[H]=E,M[H]=k}return this.measurementsCache=j,j},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ii(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i,r,u,d)=>i.length===0||r===0?(this.range=null,null):(this.range=RE(i,r,u,d,d===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ii(()=>{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,j=w?this.getTotalSize():0,N=this.getScrollOffset()+this.scrollAdjustments,R=!this.itemSizeCache.has(y)?p<N:p+v<=N&&this.scrollDirection!=="backward",E=((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 U=!1;w?U=this.applyScrollAdjustment(this.getTotalSize()-j):E&&(U=this.applyScrollAdjustment(b)),this.notify(U),this._retryClampedAdjustment()}},this.getVirtualItems=ii(()=>[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=S1(0,u.length-1,h?p=>d[p*2]:p=>zy(u[p]).start,i);return zy(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(ch()&&(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&&Dy(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 S1=(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 _E(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 RE(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=_E(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=S1(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 fh=typeof document<"u"?C.useLayoutEffect:C.useEffect;function TE({useFlushSync:n=!0,directDomUpdates:s=!1,directDomUpdatesMode:i="transform",...r}){const u=C.useReducer(v=>v+1,0)[1],d=C.useRef({enabled:s,mode:i,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});d.current.enabled=s,d.current.mode=i;const h=C.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 j=v.options.horizontal?"width":"height";b.container.style[j]=`${w}px`}},p=v=>{const b=d.current;if(!b.enabled||!b.container)return;m(v);const w=!!v.options.horizontal,j=b.mode==="transform",N=w?"left":"top",M=v.options.scrollMargin,R=v.getVirtualItems();for(const E of R){const U=E.start-M,T=v.elementsCache.get(E.key);T&&b.lastPositions.get(T)!==U&&(b.lastPositions.set(T,U),j?T.style.transform=w?`translate3d(${U}px, 0, 0)`:`translate3d(0, ${U}px, 0)`:T.style[N]=`${U}px`)}},y={...r,onChange:(v,b)=>{var w;const j=d.current;let N=!0;if(j.enabled){p(v);const M=v.range,R=j.prevRange;N=!R||R.isScrolling!==v.isScrolling||R.startIndex!==(M==null?void 0:M.startIndex)||R.endIndex!==(M==null?void 0:M.endIndex),N&&(j.prevRange=M?{startIndex:M.startIndex,endIndex:M.endIndex,isScrolling:v.isScrolling}:null)}N&&(n&&b&&!h.current?um.flushSync(u):u()),(w=r.onChange)==null||w.call(r,v,b)}},[x]=C.useState(()=>{const v=new ME(y),b=v.measureElement;return v.measureElement=w=>{h.current=!0;try{b(w)}finally{h.current=!1}},Object.assign(v,{containerRef:w=>{const j=d.current;if(j.container=w,j.lastSize=null,w&&j.enabled){const N=v.getTotalSize();j.lastSize=N;const M=v.options.horizontal?"width":"height";w.style[M]=`${N}px`}}})});return x.setOptions(y),fh(()=>x._didMount(),[]),fh(()=>(m(x),x._willUpdate())),fh(()=>{p(x)}),x}function AE(n){return TE({observeElementRect:xE,observeElementOffset:wE,scrollToFn:NE,...n})}const b1=33,ri=32,OE=25;function w1({items:n,scrollRef:s,columnCount:i,getKey:r,render:u,onEndReached:d,endThreshold:h=15,rowHeight:m=b1}){var M;const p=AE({count:n.length,getScrollElement:()=>s.current,estimateSize:()=>m,overscan:8,scrollMargin:ri,getItemKey:R=>r(n[R],R),initialRect:{width:1e3,height:ri+m*10}}),y=!((M=p.scrollRect)!=null&&M.height),x=y?n.slice(0,OE).map((R,E)=>({key:r(R,E),index:E,start:ri+E*m,end:ri+(E+1)*m})):p.getVirtualItems(),v=x[0],b=x[x.length-1],w=(b==null?void 0:b.index)??-1;C.useEffect(()=>{d&&w>=0&&w>=n.length-h&&d()},[w,n.length,h,d]);const j=!y&&v?v.start-ri:0,N=!y&&b?p.getTotalSize()-(b.end-ri):0;return f.jsxs(f.Fragment,{children:[j>0&&f.jsx("tbody",{"aria-hidden":!0,children:f.jsx("tr",{className:"vt-spacer",style:{height:j},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 hs({text:n,query:s}){const i=s.trim();if(!i||rC(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 Ly({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:kh(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 zE({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 DE(n){return`${n.ref}>${n.alt}`}function HE({variant:n,onLocate:s}){const[i,r]=C.useState(!1),u=`chr${n.chrom}:${n.pos}`,d=[["Variant",`${n.kind==="snv"?"SNV":n.kind==="indel"?"Indel":n.kind}, ${DE(n)}`],...n.depth!==null?[["Reads",`${n.alt_reads??"?"} of ${n.depth}`]]:[],["Normal VAF",kh(n.normal_vaf)],["Mutant copies",fC(n.mut_alleles)??"–"],["Consequence",(n.consequence??n.effect??"–").replace(/&/g,", ")],["COSMIC",cC(n.cosmic)??"–"],...n.ffpe_score!==null||n.ffpe_removed?[["FFPE artifact score",n.ffpe_score!==null?kh(n.ffpe_score):"Not scored"]]:[],["Expression",n.gene_tpm!==null?`${n.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",dC(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(Bh,{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(Fx,{size:14,"aria-hidden":!0}),i?"Copied":"Copy locus"]})]})]})}function LE({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(Fu,{size:12,"aria-hidden":!0}):r?f.jsx(Ux,{size:12,"aria-hidden":!0}):f.jsx(Fu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function UE({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]=C.useState({}),w=d.q,j=d.scope!=="drivers",N=C.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:O=>{O.stopPropagation(),D.toggleExpanded()},onFocus:()=>y(D.original),children:f.jsx(dm,{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(hs,{text:D.gene??"–",query:w})}),f.jsx("span",{className:"vt-sub mono",children:Yr(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(hs,{text:D.protein_change??"–",query:w})}),D.cdna_change&&f.jsx("span",{className:"vt-sub mono",children:f.jsx(hs,{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:Uj(D.consequence,D.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:D}})=>f.jsx(Ly,{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(Ly,{value:D.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:D}})=>f.jsx(zE,{variant:D,showDriver:j})}],[w,j,m,y]),M=x1({data:s,columns:N,getRowId:iC,getCoreRowModel:v1(),getExpandedRowModel:y1(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:v},onExpandedChange:b}),R=d.sort.replace(/^-/,""),E=M.getVisibleLeafColumns().length,U=e1(d)>0,T=C.useRef(null),H=JSON.stringify([d.scope,d.sort,d.q,d.effects,d.flags,d.range,d.ffpe]);return C.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(Yu,{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(O=>{var k;const I=O.column.columnDef.meta,ee=(k=I==null?void 0:I.sorts)==null?void 0:k.some(ne=>ne.key===R);return f.jsx("th",{className:I==null?void 0:I.className,"aria-sort":ee?d.sort.startsWith("-")?"descending":"ascending":void 0,children:I!=null&&I.sorts?f.jsx("span",{className:"vt-sorts",children:I.sorts.map(ne=>f.jsx(LE,{sort:ne,current:d.sort,onSort:oe=>p({sort:oe})},ne.key))}):Qu(O.column.columnDef.header,O.getContext())},O.id)})},D.id))}),f.jsx(w1,{items:M.getRowModel().rows,scrollRef:T,columnCount:E,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(O=>{var I;return f.jsx("td",{className:(I=O.column.columnDef.meta)==null?void 0:I.className,children:Qu(O.column.columnDef.cell,O.getContext())},O.id)})}),D.getIsExpanded()&&f.jsx("tr",{className:"vt-detail",children:f.jsx("td",{colSpan:E,children:f.jsx(HE,{variant:D.original,onLocate:x})})})]})}),s.length===0&&f.jsx("tbody",{children:f.jsx("tr",{children:f.jsx("td",{colSpan:E,children:f.jsx("div",{className:"vt-empty",children:U?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(sc,{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 VE=C.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:j,hovered:N,onHover:M,onLocate:R,showCcf:E},U){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,O=(p==null?void 0:p.status)==="ok"?(ne=p.data)==null?void 0:ne.ffpe:null,I=oe=>oe===void 0?"":oe.toLocaleString("en-US"),ee=w.range&&w.range.measure===v?[w.range.low,w.range.high]:null;return f.jsxs(nc,{ref:U,title:"Mutations",subtitle:D!==void 0?`${I(D)} PASS SNVs and indels${O&&!O.shown?", after the FFPE filter":""}`:void 0,lineage:pm(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(Ri,{label:"Which mutations",value:w.scope,onChange:oe=>j({scope:oe,sort:Wx[oe]}),options:[{value:"drivers",label:f.jsxs(f.Fragment,{children:["Drivers",f.jsx("span",{className:"seg-n",children:I(H==null?void 0:H.drivers)})]})},{value:"coding",label:f.jsxs(f.Fragment,{children:["Coding",f.jsx("span",{className:"seg-n",children:I(H==null?void 0:H.coding)})]})},{value:"all",label:f.jsxs(f.Fragment,{children:["All",f.jsx("span",{className:"seg-n",children:I(H==null?void 0:H.all)})]})}]})}),children:[f.jsx(xN,{envelope:p,loading:y,measure:v,onMeasure:b,range:ee,focus:N,onRange:oe=>{!oe&&!w.range||j({range:oe?{measure:v,low:oe[0],high:oe[1]}:null})},onGene:oe=>j({q:oe})}),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(wN,{table:w,data:T,onChange:j}),f.jsx(UE,{data:T,rows:i,hasMore:r,loadingMore:u,onMore:d,table:w,fetching:m,showCcf:E,onTable:j,onHover:M,onLocate:R})]}):f.jsx("div",{className:"mut-rule",children:f.jsx(to,{label:"mutations",envelope:s,loading:h,skeletonHeight:240,children:()=>null})})]})}),Sm={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},j1=["oncogene","tsg","both"],bm={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},$E={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function FE(n){return n?$E[n]??n:""}const BE={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function wm(n){return n?BE[n]??n:"–"}function kE(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 GE(n){return n.some(s=>s.left_expression||s.right_expression||s.expression)}function qE(n){const s={oncogene:0,tsg:0,both:0};for(const i of n)i.role&&(s[i.role]+=1);return s}function QE(n){const s=n.trim().match(l1);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 YE(n,s){const i=s.trim().toLowerCase();if(!i)return!0;const r=QE(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,wm(n.sv_type),n.role?Sm[n.role]:null].some(u=>u==null?void 0:u.toLowerCase().includes(i))}const es={deletion:"var(--sv-del)","tandem-duplication":"var(--sv-dup)",inversion:"var(--sv-inv)",translocation:"var(--sv-tra)"},IE={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."},XE={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function KE(n){return n.size?XE[n.size]??n.size:""}function Uy(n){const s=`${n.clustered?"Clustered":"Dispersed"} ${bm[n.sv_class].toLowerCase()}s`;return n.size?`${s}, ${FE(n.size)}`:s}function ZE(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 PE(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 JE=45;function WE({role:n}){return n?f.jsx("span",{className:`sc-pill p-${n==="oncogene"?"onco":n}`,children:Sm[n]}):f.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function eM({rows:n,shown:s,onToggle:i}){const r=qE(n);return f.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:j1.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:[Sm[u],f.jsx("span",{className:"sv-legend-n",children:r[u]})]},u))})}function Vy({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(hs,{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?Yr(s,i):"–"})]})}function C1(n){return n?n.replace(/,\s*/g,", "):"–"}function tM({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(Fu,{size:12,"aria-hidden":!0}):s==="asc"?f.jsx(Ux,{size:12,"aria-hidden":!0}):f.jsx(Fu,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function nM({row:n,onLocate:s}){const[i,r]=C.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",wm(n.sv_type)],["Left breakpoint",u?`${Yr(u.chrom,u.pos)}${n.left_loc?`, ${n.left_loc}`:""}`:"–"],["Right breakpoint",d?`${Yr(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",C1(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(Bh,{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(Bh,{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(Fx,{size:14,"aria-hidden":!0}),i?"Copied":"Copy IGV loci"]})]})]})}function $y({kind:n,rows:s,total:i=s.length,query:r="",onLocate:u}){const[d,h]=C.useState({}),[m,p]=C.useState([]),y=C.useRef(null),x=GE(s);C.useEffect(()=>{y.current&&(y.current.scrollTop=0)},[r,s.length]);const v=C.useMemo(()=>{const N={id:"expand",header:()=>f.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:E})=>f.jsx("button",{type:"button",className:"vt-expand","aria-expanded":E.getIsExpanded(),"aria-label":`Details of ${E.original.gene??[E.original.left_gene,E.original.right_gene].filter(Boolean).join(" and ")}`,onClick:U=>{U.stopPropagation(),E.toggleExpanded()},children:f.jsx(dm,{size:14,"aria-hidden":!0})})},M=[{id:"type",header:"Type",accessorFn:E=>E.sv_type??"",cell:({row:{original:E}})=>wm(E.sv_type)},{id:"role",header:"Role",accessorFn:E=>E.role?j1.indexOf(E.role):9,cell:({row:{original:E}})=>f.jsx(WE,{role:E.role})},{id:"callers",header:"Callers",accessorFn:E=>E.callers??"",cell:({row:{original:E}})=>f.jsx("span",{className:"text-[12.5px]",children:C1(E.callers)})},{id:"support",header:"Support",accessorFn:E=>E.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:E}})=>f.jsx("span",{className:"mono",children:E.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:E}})=>f.jsx("span",{className:"mono text-[12px]",children:[E.left_pileup,E.right_pileup].filter(Boolean).join(" · ")||"–"})}],R=x?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:E}})=>n==="whole_gene"?f.jsx("span",{className:"text-[12.5px]",children:E.expression??"–"}):f.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[f.jsx("span",{children:E.left_expression??"–"}),f.jsx("span",{style:{color:"var(--muted)"},children:E.right_expression??"–"})]})}]:[];return n==="whole_gene"?[N,{id:"gene",header:"Gene",accessorFn:E=>E.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:E}})=>f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"vt-gene",children:f.jsx(hs,{text:E.gene??"–",query:r})}),f.jsx("span",{className:"vt-sub mono",children:E.left_chrom&&E.left_pos!==null&&E.right_pos!==null?`${Yr(E.left_chrom,E.left_pos)}–${E.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:E=>E.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:E}})=>f.jsx("span",{className:"mono",children:kE(E.length)})},...M,...R]:[N,{id:"left",header:"Left",accessorFn:E=>E.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:E}})=>f.jsx(Vy,{gene:E.left_gene,chrom:E.left_chrom,pos:E.left_pos,loc:E.left_loc,query:r})},{id:"right",header:"Right",accessorFn:E=>E.right_gene??"",cell:({row:{original:E}})=>f.jsx(Vy,{gene:E.right_gene,chrom:E.right_chrom,pos:E.right_pos,loc:E.right_loc,query:r})},...M,...R]},[n,x,r]),b=x1({data:s,columns:v,getRowId:N=>`${n}-${N.row}`,getCoreRowModel:v1(),getSortedRowModel:cE(),getExpandedRowModel:y1(),getRowCanExpand:()=>!0,state:{expanded:d,sorting:m},onExpandedChange:h,onSortingChange:p}),w=b.getVisibleLeafColumns().length,j=n==="onco"?JE:b1;return f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:y,className:"vt-scroll vt-viewport",style:{"--row-h":`${j}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,E=M.column.getIsSorted();return f.jsx("th",{className:R==null?void 0:R.className,"aria-sort":E?E==="desc"?"descending":"ascending":void 0,children:M.column.getCanSort()?f.jsx(tM,{label:String(M.column.columnDef.header),sorted:E,onClick:M.column.getToggleSortingHandler()}):Qu(M.column.columnDef.header,M.getContext())},M.id)})},N.id))}),f.jsx(w1,{items:b.getRowModel().rows,scrollRef:y,columnCount:w,rowHeight:j,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:Qu(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(nM,{row:N.original,onLocate:u})})})]})})]})}),f.jsx(sc,{shown:s.length,total:i,noun:["row","rows"]})]})}const zr=176,dh=34,hh=7,mh=22,Lu=30,lM={deletion:"Del","tandem-duplication":"Dup",inversion:"Inv",translocation:"Tra"};function aM(n,s){return[bm[n],IE[n],lM[n]].find(r=>wa(r,12)+8<=s)??""}function sM(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 iM({categories:n,total:s,litClass:i}){const[r,u]=Oi(),d=C.useId(),[h,m]=C.useState(null),p=ZE(n),y=Math.max(0,...n.map(k=>k.count)),x=r1(y,3),v=x[x.length-1],b=n.length,w=(p.length-1)*hh,j=n.some(k=>k.clustered)&&n.some(k=>!k.clustered),N=Math.max((u-Lu-6-w-(j?mh-hh:0))/b,4),M=Math.min(26,N*.64),R=[],E=[];let U=Lu;p.forEach((k,ne)=>{ne>0&&(U+=p[ne-1].clustered!==k.clustered?mh:hh);const oe=U;for(let W=k.start;W<=k.end;W++)R[W]=U+(N-M)/2,U+=N;const ie=E.find(W=>W.clustered===k.clustered&&W.x1>=oe-mh-1),Y=n.slice(k.start,k.end+1).reduce((W,X)=>W+X.count,0);ie?(ie.x1=U,ie.count+=Y):E.push({clustered:k.clustered,x0:oe,x1:U,count:Y})});const T=k=>dh+zr-k/v*zr,H=dh+zr,D=k=>h!==null?k===h:i?n[k].sv_class===i:!0,O=h===null?null:n[h],I=O&&s?Math.round(O.count/s*100):0,ee=H+62;return f.jsxs("div",{ref:r,className:"rs","data-lit":h!==null||i?"":void 0,children:[f.jsxs("svg",{width:u,height:ee,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(es).map(k=>f.jsxs("linearGradient",{id:`${d}-${k}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[f.jsx("stop",{offset:"0",style:{stopColor:es[k]}}),f.jsx("stop",{offset:"1",style:{stopColor:es[k]},stopOpacity:.72})]},k))}),E.map(k=>f.jsxs("g",{children:[j&&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"}),j&&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:Lu-4,x2:u,y1:T(k),y2:T(k),className:k===0?"rs-base":"rs-grid"}),f.jsx("text",{x:Lu-10,y:T(k)+4,textAnchor:"end",className:"rs-tick",children:k.toLocaleString("en-US")})]},k)),n.map((k,ne)=>{const oe=k.count/v*zr,ie=D(ne);return f.jsxs("g",{className:"rs-bar","data-off":ie?void 0:"",children:[k.count>0?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:sM(R[ne],T(k.count),M,oe,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:es[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:KE(k)}),f.jsx("rect",{x:R[ne]-(N-M)/2,y:dh-8,width:N,height:zr+30,fill:"transparent",tabIndex:0,"aria-label":`${Uy(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],oe=R[k.end]+M,ie=aM(k.sv_class,oe-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:oe,y1:H+26,y2:H+26,style:{stroke:es[k.sv_class]},className:"rs-bracket"}),f.jsx("text",{x:(ne+oe)/2,y:H+44,textAnchor:"middle",className:"rs-class-name",children:ie})]},`${k.clustered}-${k.sv_class}`)})]}),O&&h!==null&&f.jsxs(ms,{x:R[h]+M/2,y:Math.max(T(O.count)-8,40),width:u,above:!0,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:es[O.sv_class],opacity:O.clustered?.5:1},"aria-hidden":!0}),Uy(O)]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Rearrangements"}),f.jsx("b",{children:O.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:[I===0&&O.count>0?"<1":I,"%"]})]})]})]})}function N1(n,s,i){return`${n.toLocaleString("en-US")} ${n===1?s:i}`}function rM({categories:n,total:s}){const[i,r]=C.useState(null),u=PE(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:N1(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:es[d]},"aria-hidden":!0}),bm[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(iM,{categories:n,total:s,litClass:i})})]})}function oM({data:n,query:s,onQuery:i,onLocate:r}){const[u,d]=C.useState([]),h=w=>d(j=>j.includes(w)?j.filter(N=>N!==w):[...j,w]),m=w=>w.filter(j=>YE(j,s)),p=w=>u.length?w.filter(j=>j.role&&u.includes(j.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(eM,{rows:x,shown:u,onToggle:h}),f.jsx(Yu,{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($y,{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($y,{kind:"whole_gene",rows:b,total:n.whole_gene.length,query:s,onLocate:r})]})]})}const uM=C.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]=C.useState("");return f.jsx(nc,{ref:d,title:"Structural variants",subtitle:h?N1(h.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(s==null?void 0:s.lineage)??[],picked:r,info:"structuralVariants",className:"svs",expandable:!0,children:f.jsx(to,{label:"structural variants",envelope:s,loading:i,skeletonHeight:220,children:y=>f.jsxs("div",{className:"sv-body",children:[f.jsx(oM,{data:y,query:m,onQuery:p,onLocate:u}),y.signatures&&f.jsx(rM,{categories:y.signatures.categories,total:y.signatures.total})]})})})}),Uu={"C>A":"#03bcee","C>G":"#222222","C>T":"#e32926","T>A":"#999999","T>C":"#a1ce63","T>G":"#e9a9a5"};function cM(n,s){const i=n.contexts.every(p=>p.reconstructed!==null),r=n.contexts.reduce((p,y)=>p+y.observed,0),u=i?n.contexts.reduce((p,y)=>p+(y.reconstructed??0),0):0,d=n.contexts.map(p=>s==="share"?r?p.observed/r*100:0:p.observed),h=i?n.contexts.map(p=>s==="share"?u?(p.reconstructed??0)/u*100:0:p.reconstructed??0):null,m=h?d.map((p,y)=>p-h[y]):null;return{observed:d,reconstructed:h,difference:m,top:Math.max(0,...d,...h??[]),reach:m?Math.max(0,...m.map(Math.abs)):0}}function fM(n){const s=[];return n.forEach((i,r)=>{const u=s[s.length-1];u&&u.substitution===i.substitution?u.end=r:s.push({substitution:i.substitution,start:r,end:r})}),s}function dM(n,s,i,r=10){const u=s-r*(n.length-1),d=v=>v.end-v.start+1,h=n.reduce((v,b)=>v+d(b),0),m=i?n.find(v=>v.substitution===i):void 0,p=m?Math.min(.62,Math.max(.4,d(m)*30/u)):0,y=[];let x=0;for(const v of n){const b=d(v),w=m?v===m?u*p:u*(1-p)*b/(h-d(m)):u*b/h,j=w/b;for(let N=0;N<b;N++)y.push({x:x+N*j+j*.11,width:j*.78});x+=w+r}return y}function gh(n){return[n.five_prime,n.substitution[0],n.three_prime]}function ph(n,s){return s==="count"?Math.round(n).toLocaleString("en-US"):`${n.toFixed(n>=10?1:2)}%`}function Fy(n,s){return n==="cosine"?s.toFixed(3):s.toExponential(2).replace("e-","e−").replace("e+","e")}const un=46,hM=6,Wa=28,vh=14,Rl=96,oi=84,mM=["This tumour","Rebuilt from its signatures","Difference"],gM={reported:"Reported run",unfiltered:"Unfiltered"};function pM({data:n}){const[s,i]=Oi(760),[r,u]=C.useState("share"),[d,h]=C.useState("reported"),[m,p]=C.useState(null),[y,x]=C.useState(null),v=n.runs.find(ie=>ie.source===d)??n.runs[0],b=n.reconstructed&&v.contexts.every(ie=>ie.reconstructed!==null),w=C.useMemo(()=>cM(v,r),[v,r]),j=C.useMemo(()=>fM(v.contexts),[v]),N=Math.max(i-un-hM,240),M=C.useMemo(()=>dM(j,N,m,vh),[j,N,m]),R=b?3:1,E=m?22:0,U=[Wa,Wa+Rl+vh,Wa+2*(Rl+vh)],T=(b?U[2]+oi:U[0]+Rl)+E+8,H=r==="share"?"%":"",D=r1(w.top,2),O=D[D.length-1],I=Math.max(w.reach*1.15,r==="share"?.5:1),ee=(ie,Y)=>Y===2?oi/2*(1-ie/I):Rl*(1-ie/O),k=[w.observed,w.reconstructed,w.difference],ne=y===null?null:v.contexts[y],oe=ie=>un+M[ie].x+M[ie].width/2;return f.jsxs("section",{className:"ctx sig-section","aria-label":"96 mutational contexts",children:[f.jsxs("div",{className:"ctx-head",children:[f.jsxs("h3",{className:"sv-h",children:["96 mutational contexts",f.jsxs("span",{className:"sv-h-n",children:[Math.round(v.total).toLocaleString("en-US")," SNVs"]})]}),f.jsxs("div",{className:"ctx-controls",children:[b&&n.fit&&f.jsxs("span",{className:"ctx-fit",title:"How well the fitted signatures rebuild the profile, as the report measures it",children:[n.fit.cosine!==null&&f.jsxs("span",{children:["Cosine similarity ",f.jsx("b",{children:Fy("cosine",n.fit.cosine)})]}),n.fit.rss!==null&&f.jsxs("span",{children:["RSS ",f.jsx("b",{children:Fy("rss",n.fit.rss)})]})]}),n.runs.length>1&&f.jsx(Ri,{label:"Run",value:d,onChange:h,options:n.runs.map(ie=>({value:ie.source,label:gM[ie.source]}))}),f.jsx(Ri,{label:"Profile measure",value:r,onChange:u,options:[{value:"share",label:"Share"},{value:"count",label:"Count"}]})]})]}),f.jsx("div",{className:"ctx-wrap",children:f.jsxs("div",{ref:s,className:"ctx-plot",onMouseLeave:()=>x(null),children:[f.jsxs("svg",{width:i,height:T,role:"img","aria-label":`SNVs in the 96 mutational contexts${b?", observed and rebuilt from signatures":""}`,children:[f.jsx("g",{transform:`translate(${un} 0)`,children:j.map(ie=>{const Y=M[ie.start],W=M[ie.end],X=Y.x-Y.width*.14,J=W.x+W.width*1.14,le=m===ie.substitution;return f.jsxs("g",{className:"ctx-chip","data-on":le||void 0,role:"button",tabIndex:0,"aria-pressed":le,"aria-label":`${ie.substitution}: ${le?"show all classes":"label its sixteen contexts"}`,onClick:()=>p(le?null:ie.substitution),onKeyDown:ve=>{(ve.key==="Enter"||ve.key===" ")&&(ve.preventDefault(),p(le?null:ie.substitution))},children:[f.jsx("rect",{x:X,y:0,width:Math.max(J-X,1),height:22,rx:11}),f.jsx("circle",{cx:X+11,cy:11,r:4.5,fill:Uu[ie.substitution]}),f.jsx("text",{x:X+22,y:15,children:ie.substitution})]},ie.substitution)})}),Array.from({length:R},(ie,Y)=>{const W=U[Y],X=Y===2?oi:Rl,J=k[Y];return J?f.jsxs("g",{transform:`translate(0 ${W})`,className:"ctx-panel",children:[Y<2?D.map(le=>f.jsxs("g",{children:[f.jsx("line",{x1:un,x2:un+N,y1:ee(le,Y),y2:ee(le,Y),className:le===0?"ctx-base":"ctx-grid"}),f.jsxs("text",{x:un-8,y:ee(le,Y)+4,textAnchor:"end",className:"ctx-tick",children:[le,H]})]},le)):f.jsxs(f.Fragment,{children:[f.jsx("line",{x1:un,x2:un+N,y1:X/2,y2:X/2,className:"ctx-base"}),f.jsx("text",{x:un-8,y:X/2+4,textAnchor:"end",className:"ctx-tick",children:"0"})]}),f.jsx("text",{x:un+2,y:12,className:"ctx-name",children:mM[Y]}),f.jsx("g",{className:"ctx-bars","data-hover":y!==null||void 0,children:J.map((le,ve)=>{const je=M[ve],Le=un+je.x,Be=Y===2?X/2:X,Xe=ee(le,Y),A=Uu[v.contexts[ve].substitution],V=Math.abs(Be-Xe);return f.jsx("rect",{x:Le,y:Math.min(Xe,Be),width:je.width,height:Math.max(V,le===0?0:.8),rx:Math.min(2,je.width/2),fill:A,className:"ctx-bar","data-on":y===ve||void 0,"data-dim":m&&v.contexts[ve].substitution!==m?"":void 0},ve)})})]},Y):null}),y!==null&&f.jsx("rect",{x:un+M[y].x-2,y:Wa-4,width:M[y].width+4,height:(b?U[2]+oi:U[0]+Rl)-Wa+8,rx:4,className:"ctx-column",pointerEvents:"none"}),m&&v.contexts.map((ie,Y)=>ie.substitution===m?f.jsxs("text",{x:un+M[Y].x+M[Y].width/2,y:(b?U[2]+oi:U[0]+Rl)+16,textAnchor:"middle",className:"ctx-tri",children:[gh(ie)[0],f.jsx("tspan",{className:"ctx-tri-mid",style:{fill:Uu[ie.substitution]},children:gh(ie)[1]}),gh(ie)[2]]},Y):null),M.map((ie,Y)=>f.jsx("rect",{x:un+ie.x-(ie.width*.14+1),y:Wa,width:ie.width*1.28+2,height:(b?U[2]+oi:U[0]+Rl)-Wa,fill:"transparent",className:"ctx-hit",tabIndex:0,"aria-label":`${v.contexts[Y].context}: ${v.contexts[Y].observed} SNVs`,onMouseEnter:()=>x(Y),onFocus:()=>x(Y),onBlur:()=>x(null)},Y))]}),ne&&y!==null&&f.jsxs(ms,{x:oe(y),y:U[0]+Rl/2,width:i,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:Uu[ne.substitution]},"aria-hidden":!0}),f.jsx("span",{className:"mono",children:ne.context})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Observed"}),f.jsxs("b",{children:[ph(w.observed[y],r),f.jsxs("i",{children:[" ",r==="share"?`${ne.observed.toLocaleString("en-US")} SNVs`:""]})]})]}),w.reconstructed&&w.difference&&f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Rebuilt"}),f.jsx("b",{children:ph(w.reconstructed[y],r)})]}),f.jsxs("span",{className:"ctip-note",children:[w.difference[y]>=0?"Observed above":"Observed below"," the signatures by"," ",ph(Math.abs(w.difference[y]),r).replace("%",r==="share"?" points":"")]})]})]})]})}),!b&&f.jsx("p",{className:"ctx-note",children:"Only the observed profile is shown: this report did not include the signature matrix its fit used, so what the signatures rebuild cannot be drawn."})]})}const vM={"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 By(n,s="short"){var i;return((i=vM[n])==null?void 0:i[s])??n}const yh=8;function yM(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>yh?yh-1:yh;return{shown:i.slice(0,r),other:i.slice(r)}}function ky(n){return n.group==="sample"?"This tumour":`${n.label.replace(/\(\d+\)$/,"")} cohort${n.cohort_n?`, n = ${n.cohort_n}`:""}`}const Gy=["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],xM="#a3a3ab";function SM(n){const{shown:s,other:i}=yM(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],Gy[y%Gy.length]));return i.length&&m.push(h("Other",i,xM)),m}function fa(n){return n.cohortShare===null?null:(n.share-n.cohortShare)*100}function qy(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 bM(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 kr(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 E1(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:kr(s,.25),median:kr(s,.5),q3:kr(s,.75),tumour:i,above:i===null?null:r.filter(d=>d<i).length,others:r.length}}function wM(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,(kr(n,.75)-kr(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 jM(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 xh(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 di(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 da=n=>n==null?"–":n.toFixed(2),CM=8,NM=250,qe={w:232,h:148,cx:116,cy:122,r:92};function Sh(n,s){const i=di(qe.cx,qe.cy,qe.r,n),r=di(qe.cx,qe.cy,qe.r,s);return`M${i.x.toFixed(2)},${i.y.toFixed(2)} A${qe.r},${qe.r} 0 0 1 ${r.x.toFixed(2)},${r.y.toFixed(2)}`}function EM({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:[di(qe.cx,qe.cy,qe.r-14,r),di(qe.cx,qe.cy,qe.r+14,r),di(qe.cx,qe.cy,qe.r+27,r)],d=s===null?null:di(qe.cx,qe.cy,qe.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:qe.w,height:qe.h,viewBox:`0 0 ${qe.w} ${qe.h}`,role:"img","aria-label":`${n.name} ${s===null?"has no score":`scores ${da(n.value)}`}${n.rating?`, rated ${n.rating}`:""}`,className:"hrd-gauge",children:[f.jsx("path",{d:Sh(0,1),pathLength:1,className:"hrd-track"}),r!==null&&f.jsx("path",{d:Sh(r,1),pathLength:1,className:"hrd-zone"}),s!==null&&f.jsx("path",{d:Sh(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:qe.cx,y:qe.cy-10,textAnchor:"middle",className:"hrd-num",children:s===null?"–":da(n.value)}),f.jsx("text",{x:qe.cx-qe.r,y:qe.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"0"}),f.jsx("text",{x:qe.cx+qe.r,y:qe.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 MM(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 _M="var(--font)";function RM({features:n}){var U;const[s,i]=Oi(720),[r,u]=C.useState(null),d=n.map(T=>({feature:T,stats:E1(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,j=b+38,N=30,M=d.length*w+14,R=M+22,E=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:_M},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 ie;const O=D*w,I=By(T.feature),ee=H&&H.values.length<=NM?H.values:[],k=jM(ee.map(v),7.5),ne=H&&H.values.length>=CM?wM(H.values):null,oe=H&&H.tumour!==null?v(H.tumour):null;return f.jsxs("g",{transform:`translate(0 ${O})`,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)},${j} ${ne.map(Y=>`L${v(Y.x).toFixed(1)},${(j-Y.y*N).toFixed(1)}`).join(" ")} L${v(1)},${j} Z`,className:"cloud-area"}),f.jsx("path",{d:ne.map((Y,W)=>`${W?"L":"M"}${v(Y.x).toFixed(1)},${(j-Y.y*N).toFixed(1)}`).join(" "),className:"cloud-line"})]}),ee.map((Y,W)=>f.jsx("circle",{cx:v(Y),cy:j+11+Math.min(k[W],2)*7,r:3,className:"cloud-dot"},W)),oe!==null&&f.jsxs("g",{className:"cloud-pin",transform:`translate(${oe} 0)`,children:[f.jsx("line",{y1:b+8,y2:j,className:"cloud-stem"}),f.jsx("circle",{cy:j,r:8,className:"cloud-pin-dot"})]})]}),f.jsx("text",{x:h?4:6,y:h?18:j-6,className:"cloud-name",children:I}),!h&&f.jsxs("text",{x:6,y:j+10,className:"cloud-raw",children:["raw ",da((ie=T.sample)==null?void 0:ie.raw)]}),H&&f.jsx("text",{x:i-4,y:h?18:j-6,textAnchor:"end",className:"cloud-rank",children:xh(H)}),!h&&H&&f.jsxs("text",{x:i-4,y:j+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"})]})]}),E&&r!==null&&E.stats&&f.jsxs(ms,{x:E.stats.tumour!==null?v(E.stats.tumour):v(E.stats.median),y:r*w+j,width:i,children:[f.jsx("span",{className:"ctip-title",children:By(E.feature.feature,"long")}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[da((U=E.feature.sample)==null?void 0:U.raw)," ",f.jsxs("i",{children:["scaled ",da(E.stats.tumour)]})]})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort median"}),f.jsx("b",{children:da(E.stats.median)})]}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Middle half"}),f.jsxs("b",{children:[da(E.stats.q1),"–",da(E.stats.q3)]})]}),xh(E.stats)&&f.jsx("span",{className:"ctip-note",children:xh(E.stats)})]})]})}const Dr=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,Hr=n=>Math.round(n).toLocaleString("en-US"),TM=n=>`${n>=0?"+":"−"}${Math.abs(n).toFixed(Math.abs(n)>=10?0:1)}`,Qy=3,ui=26,ci=52;function AM({groups:n,bands:s,lit:i,onLight:r}){const[u,d]=Oi(),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=qy(s.map(D=>D.share),v,Qy),w=p?qy(s.map(D=>D.cohortShare??0),v,Qy):[],j=p?x:0,N=d-x-ui,M=j+ui,R=N,E=s.find(D=>D.name===i)??null,U=E?s.indexOf(E):-1,T=U<0?0:ci+((b[U].y0+b[U].y1)/2+(p?(w[U].y0+w[U].y1)/2:(b[U].y0+b[U].y1)/2))/2,H=(D,O,I,ee,k,ne)=>{const oe=D.y1-D.y0;if(!y||oe<17)return null;const ie=ci+(D.y0+D.y1)/2,Y=oe>=36;return f.jsxs("text",{x:k,y:ie,textAnchor:ne,className:"flow-label",children:[f.jsxs("tspan",{x:k,dy:Y?"-0.35em":"0.35em",className:"flow-name",children:[O.name,!Y&&f.jsxs("tspan",{className:"flow-share",children:[" ",Dr(I)]})]}),Y&&f.jsxs("tspan",{x:k,dy:"1.35em",className:"flow-share",children:[Dr(I),ee]})]})};return f.jsxs("div",{ref:u,className:"flow","data-lit":i??void 0,children:[f.jsxs("svg",{width:d,height:ci+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:ky(h)}),f.jsxs("text",{x:0,y:34,className:"flow-sub",children:[Hr(h.total)," mutations"]}),m&&f.jsxs(f.Fragment,{children:[f.jsx("text",{x:d,y:16,textAnchor:"end",className:"flow-col",children:ky(m)}),f.jsxs("text",{x:d,y:34,textAnchor:"end",className:"flow-sub",children:["about ",Hr(m.total)," each, on average"]})]})]}),p&&f.jsx("g",{className:"flow-ribs",transform:`translate(0 ${ci})`,children:s.map((D,O)=>f.jsx("path",{d:bM(M,b[O],R,w[O]),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,O)=>{const I=i===D.name||void 0,ee=(k,ne)=>k.y1-k.y0>.4&&f.jsx("rect",{x:ne,y:ci+k.y0,width:ui,height:k.y1-k.y0,rx:Math.min(5,(k.y1-k.y0)/2),fill:D.colour,className:"flow-seg","data-on":I,tabIndex:0,"aria-label":`${D.name}, ${Dr(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":I,children:[ee(b[O],j),p&&ee(w[O],N),H(b[O],D,D.share,D.count?` · ${Hr(D.count)}`:"",p?j-10:j+ui+10,p?"end":"start"),p&&H(w[O],D,D.cohortShare??0,"",N+ui+10,"start")]},D.name)}),p&&d>=520&&s.map((D,O)=>{const I=fa(D),ee=b[O],k=w[O];if(I===null||Math.abs(I)<5||Math.min(ee.y1-ee.y0,k.y1-k.y0)<22)return null;const ne=(M+R)/2,oe=ci+(ee.y0+ee.y1+k.y0+k.y1)/4;return f.jsxs("g",{transform:`translate(${ne} ${oe})`,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:[TM(I)," pts"]})]},D.name)})]}),E&&f.jsxs(ms,{x:p?d/2:j+ui+x+20,y:T,width:d,children:[f.jsxs("span",{className:"ctip-title",children:[f.jsx("span",{className:"sv-swatch",style:{background:E.colour},"aria-hidden":!0}),E.name]}),E.aetiology&&f.jsx("span",{className:"ctip-sub",children:E.aetiology}),f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"This tumour"}),f.jsxs("b",{children:[Dr(E.share)," ",f.jsxs("i",{children:[Hr(E.count)," mutations"]})]})]}),E.cohortShare!==null&&f.jsxs("span",{className:"ctip-row",children:[f.jsx("span",{children:"Cohort"}),f.jsxs("b",{children:[Dr(E.cohortShare)," ",f.jsx("i",{children:E.cohortCount!==null?`about ${Hr(E.cohortCount)} each`:""})]})]}),fa(E)!==null&&f.jsx("span",{className:"ctip-note",children:Math.abs(fa(E))<1?"About the same as its cohort":`${Math.abs(fa(E)).toFixed(Math.abs(fa(E))>=10?0:1)} points ${fa(E)>0?"above":"below"} its cohort`})]})]})}const Yy=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,M1=n=>Math.round(n).toLocaleString("en-US");function OM({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 zM({groups:n}){const[s,i]=C.useState(null),r=C.useMemo(()=>SM(n),[n]),u=n.find(h=>h.group==="cohort"),d=Math.max(10,...r.map(h=>Math.abs(fa(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(AM,{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=fa(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:Yy(h.share)}),f.jsx("span",{className:"sig-count",children:M1(h.count)})]}),u&&f.jsx("td",{className:"n mono",children:Yy(h.cohortShare??0)}),u&&f.jsx("td",{children:f.jsxs("span",{className:"lead-cell",children:[f.jsx(OM,{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(sc,{shown:r.length,total:r.length,noun:["signature","signatures"]})]})]})]})}function DM({envelope:n,loading:s}){return(n==null?void 0:n.status)==="ok"&&n.data?f.jsx(pM,{data:n.data}):n?f.jsxs("section",{className:"sig-section","aria-label":"96 mutational contexts",children:[f.jsx("h3",{className:"sv-h",children:"96 mutational contexts"}),f.jsx("p",{className:"sv-empty",children:n.warnings.join(" ")||"No 96-context profile for this sample."})]}):s?f.jsxs("section",{className:"sig-section","aria-label":"96 mutational contexts",children:[f.jsx("h3",{className:"sv-h",children:"96 mutational contexts"}),f.jsx("div",{className:"px-5 pb-3",children:f.jsx("div",{className:"skeleton",style:{height:220},"aria-label":"Loading 96 mutational contexts"})})]}):null}function HM({hrd:n}){const s=C.useMemo(()=>MM(n.features.map(i=>({feature:i,stats:E1(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(EM,{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(RM,{features:n.features})]})]})]})}const LM=C.forwardRef(function({envelope:s,loading:i,contextEnvelope:r,contextLoading:u=!1,picked:d},h){var y;const m=(s==null?void 0:s.status)==="ok"?s.data:null,p=(y=m==null?void 0:m.signatures)==null?void 0:y.find(x=>x.group==="sample");return f.jsx(nc,{ref:h,title:"Signatures and HRD",subtitle:p?`${M1(p.total)} mutations attributed to signatures`:void 0,lineage:pm(s==null?void 0:s.lineage,r==null?void 0:r.lineage),picked:d,info:"signaturesHrd",className:"sigs",children:f.jsx(to,{label:"signatures and HRD",envelope:s,loading:i,skeletonHeight:300,children:x=>f.jsxs("div",{className:"sig-body",children:[x.signatures?f.jsx(zM,{groups:x.signatures}):f.jsx("p",{className:"sv-empty",children:"No signature contributions for this sample."}),f.jsx(DM,{envelope:r,loading:u}),x.hrd&&f.jsx(HM,{hrd:x.hrd})]})})})});function UM(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 VM=[];function $M(n){const s=C.useRef(!1);return C.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)}},[]),C.useCallback(i=>{(i===null||!s.current)&&n(i)},[n])}function FM(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 Lr(n,s){const i=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;n==null||n.scrollIntoView({behavior:i?"auto":"smooth",block:s})}const Iy=160;function BM(n,s){const i=C.useRef(n);i.current=n;const r=C.useRef(null),u=C.useRef(null),d=C.useRef(0),h=C.useRef(()=>{}),m=C.useRef(()=>{});C.useEffect(()=>{let x=0;const v=()=>{var H;if(x=0,r.current)return;const M=i.current.filter(([,D])=>D.current).map(([D,O])=>[D,O.current.getBoundingClientRect().top]),R=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),E=Math.max(0,...M.map(([,D])=>D+window.scrollY-R-Iy)),U=Iy+(R>0?E*Math.min(1,window.scrollY/R):0);let T=((H=M[0])==null?void 0:H[0])??null;for(const[D,O]of M)O<=U&&(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))},j=()=>{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",j,{passive:!0}),window.addEventListener("touchstart",j,{passive:!0}),window.addEventListener("keydown",j),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w),window.removeEventListener("wheel",j),window.removeEventListener("touchstart",j),window.removeEventListener("keydown",j),window.clearTimeout(d.current),x&&cancelAnimationFrame(x)}},[]);const p=C.useRef("");return C.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 kM({held:n,sampleId:s,...i}){const r=ec(n);return f.jsx(Kj,{...i,sampleId:r??s})}function GM(){var ae,_e,Fe,ke,jt,it,et,Xn,Hl,Na,Ea,no,zi,lo,ao,Ll;const{individual:n=""}=Fw(),[s,i]=rj(),r=s.get("version")??void 0,[u,d]=C.useState(null),[h,m]=C.useState(null),[p,y]=C.useState(by),[x,v]=C.useState(null),b=$M(v),[w,j]=C.useState(null),N=C.useRef(null),[M,R]=C.useState(null),E=C.useRef(Fr(!0)).current,U=C.useRef(null),T=C.useRef(null),H=C.useRef(null),D=C.useRef(null),O=C.useRef(Fr(null)).current,I=BM([["overview",T],["copyNumber",N],["mutations",U],["structuralVariants",H],["signatures",D]],O),ee=ix();C.useEffect(()=>{const re=M;if(!re||typeof IntersectionObserver>"u")return;const Qe=new IntersectionObserver(([nt])=>E.set(nt.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return Qe.observe(re),()=>Qe.disconnect()},[M]);const k=C.useCallback(re=>y(Qe=>({...Qe,...re})),[]),ne=C.useCallback(re=>{k({q:oC(re.chrom,re.start,re.end),scope:"all",sort:"position"}),Lr(U.current,"start")},[k]),oe=C.useCallback(re=>{k({q:re}),Lr(U.current,"start")},[k]),ie=C.useCallback(re=>{j({chrom:re.chrom,pos:re.pos,gene:re.gene,nonce:Date.now()}),Lr(N.current,"center")},[]),Y=C.useCallback(re=>{j({...re,nonce:Date.now()}),Lr(N.current,"center")},[]),W=hC(n,r),X=W.data,J=(X==null?void 0:X.status)==="ok"?X.data??void 0:void 0,le=s.get("sample")??(J?UM(J):void 0),ve=J==null?void 0:J.samples.find(re=>re.id===le),je=(ve==null?void 0:ve.category)==="TUMOR"?le:void 0,Le=h??((J==null?void 0:J.mode)==="unmatched"?"vaf":"ccf"),Be=mC(n,J?le:void 0,r),Xe=gC(n,r),A=pC(n,je,r),V=vC(n,je,Le,p.ffpe,r),te=bC(n,je,p,r),ue=(ae=te.data)==null?void 0:ae.pages[0],me=C.useMemo(()=>{var re;return((re=te.data)==null?void 0:re.pages.flatMap(Qe=>Qe.status==="ok"&&Qe.data?Qe.data.rows:[]))??[]},[te.data]),{fetchNextPage:Se}=te,Ce=C.useCallback(()=>void Se(),[Se]),ce=SC(n,je,r),ge=yC(n,je,r),ct=xC(n,je,r),vt=(Fe=(_e=Xe.data)==null?void 0:_e.data)==null?void 0:Fe.samples.find(re=>re.sample===le),Dn=C.useMemo(()=>(vt==null?void 0:vt.drivers)??VM,[vt]),en=C.useMemo(()=>x?{chrom:x.chrom,pos:x.pos,gene:x.gene}:w,[x,w]),st=C.useRef(null),$e=C.useRef(Fr(null)).current,Qt=(re,Qe)=>{var nt;(nt=st.current)==null||nt.toggleAttribute("data-gliding",re),st.current&&(st.current.style.minHeight=re&&Qe?`${Qe}px`:"")},Ft=C.useRef(null);C.useEffect(()=>()=>{var re;return(re=Ft.current)==null?void 0:re.call(Ft)},[]);const tn=re=>{var Kn,_a;if(re===le)return;(Kn=Ft.current)==null||Kn.call(Ft);const Qe=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches,nt=50;if(Qe||window.scrollY<=nt)return window.scrollTo({top:0,behavior:"auto"}),Bt("sample",re);const Di=window.scrollY,ic=Math.min(520,240+Di*.12),rc=performance.now();Qt(!0,document.documentElement.scrollHeight-(((_a=st.current)==null?void 0:_a.getBoundingClientRect().top)??0)-Di),$e.set(le??null),I("overview"),C.startTransition(()=>Bt("sample",re));let Ul=0;function hn(){cancelAnimationFrame(Ul),window.removeEventListener("wheel",hn),window.removeEventListener("touchstart",hn),window.removeEventListener("keydown",hn),Ft.current=null,$e.set(null),Qt(!1)}const Ma=Ra=>{const Hi=Math.min(1,(Ra-rc)/ic),so=Di*(1-Hi)**3;window.scrollTo({top:so,behavior:"instant"}),so<=nt&&$e.set(null),Hi<1?Ul=requestAnimationFrame(Ma):hn()};window.addEventListener("wheel",hn,{passive:!0}),window.addEventListener("touchstart",hn,{passive:!0}),window.addEventListener("keydown",hn),Ft.current=hn,Ul=requestAnimationFrame(Ma)},Bt=(re,Qe)=>{const nt=new URLSearchParams(s);nt.set(re,Qe),i(nt,{replace:!1}),d(null),y(by()),v(null),j(null)},dl=[W,Be,Xe,A,V,te,ce,ge,ct].map(re=>re.error);if(dl.some(re=>re instanceof tc))return f.jsx("div",{className:`wgts ${qn.theme}`,children:f.jsx("main",{className:"page",children:f.jsx(QC,{onSignedIn:()=>ee.invalidateQueries()})})});const ht=dl.find(re=>re instanceof Xx),fn=ve&&J?hm(ve.id,J.individual.id):"",Yt=new Set(J?je?["overview","copyNumber","mutations","structuralVariants","signatures"]:["overview"]:[]),dn=re=>{if(I(re),re==="overview"){const nt=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:nt?"auto":"smooth"});return}const Qe={copyNumber:N,mutations:U,structuralVariants:H,signatures:D}[re];Lr((Qe==null?void 0:Qe.current)??null,"start")},Yn=J&&le&&J.analyses[le]||[],Tt=(J==null?void 0:J.failures.filter(re=>re.sample===le))??[],Dl=new Set(Yn.map($t)),In=new Set,K=re=>re==null?void 0:re.forEach(Qe=>Dl.has($t(Qe))&&In.add($t(Qe)));for(const re of((jt=(ke=Be.data)==null?void 0:ke.data)==null?void 0:jt.metrics)??[])Ih.includes(re.key)&&K(re.sources);K((it=Xe.data)==null?void 0:it.lineage),K((et=A.data)==null?void 0:et.lineage),K((Xn=V.data)==null?void 0:Xn.lineage),K(ue==null?void 0:ue.lineage),K((Hl=ce.data)==null?void 0:Hl.lineage),K((Na=ge.data)==null?void 0:Na.lineage),K((Ea=ct.data)==null?void 0:Ea.lineage);for(const re of Yn)re.state==="failed"&&Tt.length>0&&In.add($t(re));return f.jsxs("div",{className:`wgts ${qn.theme}`,children:[f.jsx(RC,{analyses:Yn,onPage:In,sampleLabel:fn,picked:u,onPick:d,sections:Yt,activeStore:O,onSection:dn}),f.jsxs("div",{ref:st,className:"page",children:[f.jsx(Ix,{individualId:n,subtitle:[FM(J),(no=J==null?void 0:J.individual.sex)==null?void 0:no.toLowerCase(),(J==null?void 0:J.mode)==="unmatched"?"tumour only":void 0].filter(Boolean).join(", ")||void 0,patientIcon:J?f.jsx(qj,{sex:J.individual.sex}):void 0,report:J?f.jsx(VC,{data:J,onVersion:re=>Bt("version",re)}):void 0,compact:J&&le?f.jsx(Zj,{data:J,sampleId:le,fingerprint:((zi=Xe.data)==null?void 0:zi.data)??void 0,onSample:tn}):void 0,headerInView:E}),f.jsxs("main",{className:"flex flex-1 flex-col",children:[J&&le&&f.jsx("div",{className:"px-8 pt-1",children:f.jsx("div",{ref:R,children:f.jsx(kM,{held:$e,data:J,sampleId:le,fingerprint:((lo=Xe.data)==null?void 0:lo.data)??void 0,onSample:re=>Bt("sample",re)})})}),f.jsxs("div",{className:"sheet",children:[W.isPending&&f.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),ht&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(ts,{envelope:{status:"error",data:null,lineage:[],warnings:[ht.message]}})}),W.isError&&!ht&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(ts,{envelope:{status:"error",data:null,lineage:[],warnings:[W.error.message]}})}),X&&X.status!=="ok"&&f.jsx("div",{className:"sc-card px-6 py-5",children:f.jsx(ts,{envelope:X})}),(X==null?void 0:X.status)==="ok"&&X.warnings.length>0&&f.jsx("div",{className:"sc-card px-6 py-4",children:f.jsx(ts,{envelope:{...X,status:"missing"}})}),J&&le&&f.jsxs(f.Fragment,{children:[f.jsx(qC,{sampleLabel:fn,failures:Tt,analyses:Yn}),je?f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:T,className:"page-section",children:f.jsx(GC,{sampleLabel:`${fn} tumour`,fingerprint:vt,metrics:Be.data,picked:u,lineage:pm((ao=Be.data)==null?void 0:ao.lineage,(Ll=Xe.data)==null?void 0:Ll.lineage)})}),f.jsx("div",{ref:N,className:"page-section",children:f.jsx(fN,{envelope:A.data,loading:A.isPending,picked:u,sampleLabel:fn,drivers:Dn,focus:en,locate:w,onSegment:ne,onGene:oe})}),f.jsx(VE,{ref:U,variants:ue,rows:me,hasMore:te.hasNextPage,loadingMore:te.isFetchingNextPage,onMore:Ce,variantsLoading:te.isPending,variantsFetching:te.isFetching&&te.isPlaceholderData,density:V.data,densityLoading:V.isPending,picked:u,measure:Le,onMeasure:re=>{m(re),p.range&&p.range.measure!==re&&k({range:null})},table:p,onTable:k,hovered:x,onHover:b,onLocate:ie,showCcf:J.mode!=="unmatched"}),f.jsx(uM,{ref:H,envelope:ce.data,loading:ce.isPending,picked:u,onLocate:Y}),f.jsx(LM,{ref:D,envelope:ge.data,loading:ge.isPending,contextEnvelope:ct.data,contextLoading:ct.isPending,picked:u})]}):f.jsx("div",{ref:T,className:"sc-card px-6 py-5",children:f.jsx(ts,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${fn} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})]})}const bh=200,_1="wgts-picker-scope";function qM(){try{const n=localStorage.getItem(_1);return n&&/^\d+$/.test(n)?Number(n):"all"}catch{return"all"}}function QM(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 YM(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 wh=n=>n.toLocaleString("en-US");function IM(){return ec(gm)?f.jsx(XM,{}):null}function XM(){var k,ne,oe,ie;const n=fm(),s=((k=Vw("/:individual"))==null?void 0:k.params.individual)??"",i=C.useId(),r=C.useRef(null),[u,d]=C.useState(qM),[h,m]=C.useState(""),[p,y]=C.useState(""),[x,v]=C.useState(0),b=wC(),w=jC(u);C.useEffect(()=>{const Y=document.activeElement,W=document.documentElement,X=W.style.overflow;return W.style.overflow="hidden",requestAnimationFrame(()=>{var J;return(J=document.querySelector(".pick-main .tsearch input"))==null?void 0:J.focus()}),()=>{W.style.overflow=X,Y==null||Y.focus()}},[]);const j=Y=>{d(Y),y(""),v(0);try{localStorage.setItem(_1,String(Y))}catch{}requestAnimationFrame(()=>{var W;return(W=document.querySelector(".pick-main .tsearch input"))==null?void 0:W.focus()})},N=((ne=b.data)==null?void 0:ne.results)??[],M=C.useMemo(()=>YM(N,h),[N,h]),R=u==="all"?null:N.find(Y=>Y.pk===u)??((oe=w.data)==null?void 0:oe.project)??null,E=((ie=w.data)==null?void 0:ie.results)??[],U=C.useMemo(()=>QM(E,p),[E,p]),T=U.slice(0,bh),H=C.useRef(null),D=Y=>{Au(),Y.individual!==s&&n(`/${encodeURIComponent(Y.individual)}`)};C.useEffect(()=>{var Y,W,X;(X=(W=(Y=H.current)==null?void 0:Y.querySelector(`[data-index="${x}"]`))==null?void 0:W.scrollIntoView)==null||X.call(W,{block:"nearest"})},[x]),C.useEffect(()=>v(0),[p]);const O=Y=>{const W=Y.target,X=W instanceof HTMLInputElement&&!!W.closest(".pick-main");if(Y.key==="Escape"){if(W instanceof HTMLInputElement&&W.value)return;Au()}else if(X&&Y.key==="ArrowDown")Y.preventDefault(),v(J=>Math.min(J+1,T.length-1));else if(X&&Y.key==="ArrowUp")Y.preventDefault(),v(J=>Math.max(J-1,0));else if(X&&Y.key==="Enter"&&T[x])Y.preventDefault(),D(T[x]);else if(W instanceof HTMLInputElement&&W.closest(".pick-rail")&&Y.key==="Enter"){Y.preventDefault();const J=M[0];J&&j(J.pk)}},I=b.isPending,ee=b.isError||w.isError;return um.createPortal(f.jsx("div",{className:`info-backdrop ${qn.theme}`,onMouseDown:Y=>Y.target===Y.currentTarget&&Au(),children:f.jsxs("div",{className:"info-dialog pick",role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,onKeyDown:O,children:[f.jsx("button",{ref:r,type:"button",className:"info-close","aria-label":"Close",onClick:Au,children:f.jsx(Ju,{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(Yu,{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:()=>j("all"),children:[f.jsx("span",{className:"pick-name",children:f.jsxs("span",{children:[f.jsx(Aj,{size:14,"aria-hidden":!0}),"All patients"]})}),f.jsx("span",{className:"pick-n",children:b.data?wh(b.data.total):""})]})}),M.map(Y=>f.jsx("li",{children:f.jsxs("button",{type:"button","aria-current":u===Y.pk?"true":void 0,onClick:()=>j(Y.pk),title:Y.short_title?`${Y.title} (${Y.short_title})`:Y.title,children:[f.jsx("span",{className:"pick-name",children:Y.title}),f.jsx("span",{className:"pick-n",children:wh(Y.patients)})]})},Y.pk))]}),I&&f.jsx("p",{className:"pick-note",children:"Loading projects…"}),!I&&N.length>0&&M.length===0&&f.jsxs("p",{className:"pick-note",children:["No project matches “",h,"”."]}),!I&&!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(Yu,{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:ee?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((Y,W)=>f.jsxs("button",{type:"button",className:"pick-row","data-index":W,"data-active":W===x||void 0,"data-current":Y.individual===s||void 0,onMouseEnter:()=>v(W),onClick:()=>D(Y),children:[f.jsx("span",{className:"pick-id mono",children:f.jsx(hs,{text:Y.individual,query:p})}),f.jsx("span",{className:"pick-diseases",children:Y.diseases.length>0?Y.diseases.map(X=>f.jsx("span",{className:"sc-chip",children:f.jsx(hs,{text:X,query:p})},X)):f.jsx("span",{className:"pick-faint",children:"No tumour disease recorded"})}),f.jsx("span",{className:"pick-aside",children:Y.individual===s?f.jsxs("span",{className:"pick-here",children:[f.jsx(Vx,{size:13,"aria-hidden":!0}),"On this page"]}):f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[wh(Y.samples)," ",Y.samples===1?"sample":"samples"]}),f.jsxs("span",{className:"pick-faint",children:["report ",Y.report_version,Y.built?`, ${Gx(Y.built)}`:""]})]})})]},Y.individual))}),w.data&&f.jsx(sc,{shown:U.length,total:E.length,noun:["patient","patients"],note:U.length>bh?`Showing the first ${bh}; search to narrow`:void 0})]})]})}),document.body)}const KM=new ew({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function ZM(){return f.jsx(M2,{client:KM,children:f.jsxs(ij,{basename:qn.basePath,children:[f.jsxs(nj,{children:[f.jsx(Uh,{path:"/",element:f.jsx(Jj,{})}),f.jsx(Uh,{path:"/:individual",element:f.jsx(GM,{})})]}),f.jsx(IM,{})]})})}E2.createRoot(document.getElementById("root")).render(f.jsx(C.StrictMode,{children:f.jsx(ZM,{})}));
288
+ */function lc(n,a){return n?IE(n)?E.createElement(n,a):n:null}function IE(n){return XE(n)||typeof n=="function"||KE(n)}function XE(n){return typeof n=="function"&&(()=>{const a=Object.getPrototypeOf(n);return a.prototype&&a.prototype.isReactComponent})()}function KE(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function H1(n){const a={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[i]=E.useState(()=>({current:qE(a)})),[o,u]=E.useState(()=>i.current.initialState);return i.current.setOptions(d=>({...d,...n,state:{...o,...n.state},onStateChange:h=>{u(h),n.onStateChange==null||n.onStateChange(h)}})),i.current}function ac({value:n,onChange:a,label:i="Search mutations",placeholder:o="Search gene, change or locus",shortcut:u=!0,delay:d=250}){const[h,m]=E.useState(n),g=E.useRef(null),y=E.useRef(a);y.current=a,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=S=>{var w,j,N;S.key!=="/"||S.metaKey||S.ctrlKey||S.altKey||(j=(w=S.target)==null?void 0:w.closest)!=null&&j.call(w,"input, textarea, select, [contenteditable]")||(S.preventDefault(),(N=g.current)==null||N.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[u]);const x=()=>{m(""),a("")};return c.jsxs("div",{className:"tsearch",children:[c.jsx(Wu,{size:15,"aria-hidden":!0}),c.jsx("input",{ref:g,type:"search","aria-label":i,placeholder:o,value:h,onChange:v=>{m(v.target.value),d===0&&a(v.target.value)},onKeyDown:v=>{v.key==="Escape"&&x(),v.key==="Enter"&&a(h)}}),h?c.jsx("button",{type:"button",className:"search-clear","aria-label":"Clear the search",onClick:x,children:c.jsx(cc,{size:14,"aria-hidden":!0})}):u?c.jsx("kbd",{className:"kbd","aria-hidden":!0,children:"/"}):null]})}const wh=n=>n.toLocaleString("en-US");function yc({shown:n,total:a,noun:i,loaded:o=!1,note:u}){const h=n>=a?`${wh(a)} ${a===1?i[0]:i[1]}`:`${wh(n)} of ${wh(a)} ${i[1]}${o?" loaded":""}`;return c.jsxs("div",{className:"vt-foot",role:"status",children:[u?c.jsx("span",{className:"vt-foot-note",children:u}):null,c.jsx("span",{className:"vt-foot-count",children:h})]})}function PE(n){return typeof n=="object"?n.key:n}function ZE(n,a){const i=n.length;return new Proxy(n,{get(o,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 g=o[m];if(typeof g!="object"){const y=a[m*2];g=o[m]={index:m,key:g,start:y,size:a[m*2+1],end:y+a[m*2+1],lane:0}}return g}}if(u==="length")return i}return Reflect.get(o,u,d)}})}function yi(n,a,i){let o=i.initialDeps??[],u,d=!0;function h(){const m=n();return(m.length!==o.length||m.some((y,x)=>o[x]!==y))&&(o=m,u=a(...m),i!=null&&i.onChange&&!(d&&i.skipInitialOnChange)&&i.onChange(u),d=!1),u}return h.updateDeps=m=>{o=m},h}function Wy(n,a){if(n===void 0)throw new Error("Unexpected undefined");return n}const ex=(n,a)=>Math.abs(n-a)<1.01,JE=(n,a,i)=>{let o;return Object.assign(function(...u){n.clearTimeout(o),o=n.setTimeout(()=>a.apply(this,u),i)},{cancel:()=>{n.clearTimeout(o)}})};let qo;const Nh=()=>{if(qo!==void 0)return qo;if(typeof navigator>"u")return qo=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return qo=!0;const n=navigator.maxTouchPoints;return qo=navigator.platform==="MacIntel"&&n!==void 0&&n>0},tx=n=>{const{offsetWidth:a,offsetHeight:i}=n;return{width:a,height:i}},WE=n=>n,eM=n=>{const a=Math.max(n.startIndex-n.overscan,0),o=Math.min(n.endIndex+n.overscan,n.count-1)-a+1,u=new Array(o);for(let d=0;d<o;d++)u[d]=a+d;return u},tM=(n,a)=>{const i=n.scrollElement;if(!i)return;const o=n.targetWindow;if(!o)return;const u=h=>{const{width:m,height:g}=h;a({width:Math.round(m),height:Math.round(g)})};if(u(tx(i)),!o.ResizeObserver)return()=>{};const d=new o.ResizeObserver(h=>{const m=()=>{const g=h[0];if(g!=null&&g.borderBoxSize){const y=g.borderBoxSize[0];if(y){u({width:y.inlineSize,height:y.blockSize});return}}u(tx(i))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(m):m()});return d.observe(i,{box:"border-box"}),()=>{d.unobserve(i)}},sc={passive:!0},nM=typeof window>"u"?!0:"onscrollend"in window,lM=(n,a,i)=>{const o=n.scrollElement;if(!o)return;const u=n.targetWindow;if(!u)return;const d=n.options.useScrollendEvent&&nM;let h=0;const m=d?null:JE(u,()=>a(i(o),!1),n.options.isScrollingResetDelay),g=v=>()=>{h=i(o),m==null||m(),a(h,v)},y=g(!0),x=g(!1);return o.addEventListener("scroll",y,sc),d&&o.addEventListener("scrollend",x,sc),()=>{o.removeEventListener("scroll",y),d&&o.removeEventListener("scrollend",x),m==null||m.cancel()}},aM=(n,a)=>lM(n,a,i=>{const{horizontal:o,isRtl:u}=n.options;return o?i.scrollLeft*(u&&-1||1):i.scrollTop}),sM=(n,a,i)=>{if(i.options.useCachedMeasurements){const o=i.indexFromElement(n),u=i.options.getItemKey(o);return i.itemSizeCache.get(u)??i.options.estimateSize(o)}if(a!=null&&a.borderBoxSize){const o=a.borderBoxSize[0];if(o)return Math.round(o[i.options.horizontal?"inlineSize":"blockSize"])}if(!a){const o=i.indexFromElement(n),u=i.options.getItemKey(o),d=i.itemSizeCache.get(u);if(d!==void 0)return d}return n[i.options.horizontal?"offsetWidth":"offsetHeight"]},iM=(n,{adjustments:a=0,behavior:i},o)=>{var u,d;(d=(u=o.scrollElement)==null?void 0:u.scrollTo)==null||d.call(u,{[o.options.horizontal?"left":"top"]:n+a,behavior:i})},oM=iM;function rM(n,a,i,o){if(a===0)return!1;const u=o(0),d=new Set;let h=0;for(;h<n;){const g=i(h);if(g===u)break;d.add(g),h++}const m=n-h;if(m===0||m>=a)return!1;for(let g=0;g<m;g++)if(o(g)!==i(h+g))return!1;for(let g=m;g<a;g++)if(d.has(o(g)))return!1;return!0}class uM{constructor(a){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,o,u;return((u=(o=(i=this.targetWindow)==null?void 0:i.performance)==null?void 0:o.now)==null?void 0:u.call(o))??Date.now()},this.observer=(()=>{let i=null;const o=()=>i||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i=new this.targetWindow.ResizeObserver(u=>{u.forEach(d=>{const h=()=>{const m=d.target,g=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(g)&&this.shouldMeasureDuringScroll(g)&&this.resizeItem(g,this.options.measureElement(m,d,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(h):h()})}));return{disconnect:()=>{var u;(u=o())==null||u.disconnect(),i=null},observe:u=>{var d;return(d=o())==null?void 0:d.observe(u,{box:"border-box"})},unobserve:u=>{var d;return(d=o())==null?void 0:d.unobserve(u)}}})(),this.range=null,this.setOptions=i=>{var o;const u={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:WE,rangeExtractor:eM,onChange:()=>{},measureElement:sM,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 S=i[v];S!==void 0&&(u[v]=S)}const d=this.options;let h=null,m=null,g=!1;if(d!==void 0&&d.enabled&&u.enabled&&u.anchorTo==="end"&&this.scrollElement!==null){const v=d.count,S=u.count,w=this.getMeasurements(),j=((o=this._singleLaneMeasurements)==null?void 0:o.items)??w,N=O=>PE(j[O]),M=v>0?N(0):null,A=v>0?N(v-1):null;if(S!==v||v>0&&S>0&&(u.getItemKey(0)!==M||u.getItemKey(S-1)!==A)){g=!0;const O=v>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;O&&(h=[O.key,this.getScrollOffset()-O.start]);const z=u.followOnAppend===!0?"auto":u.followOnAppend||null;z&&S>0&&this.isAtEnd(d.scrollEndThreshold)&&(v===0||u.getItemKey(S-1)!==A)&&(S>v||rM(v,S,N,u.getItemKey))&&(m=z)}}this.options=u,g&&(this.pendingMin=0,this.itemSizeCacheVersion++);let y=!1,x=0;if(h&&this.scrollOffset!==null){const[v,S]=h,w=this.getMeasurements(),{count:j,getItemKey:N}=this.options;let M=0;for(;M<j&&N(M)!==v;)M++;if(M<j){const A=w[M];if(A){const C=Math.max(0,A.start+S);!m&&C!==this.scrollOffset&&(x=C-this.scrollOffset,this.scrollOffset=C,y=!0)}}}(y||m)&&(this.pendingScrollAnchor=[y?h[0]:null,y?h[1]:0,m,x])},this.notify=i=>{var o,u;(u=(o=this.options).onChange)==null||u.call(o,this,i)},this.maybeNotify=yi(()=>(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,o;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 g=this.getScrollOffset();this.scrollDirection=m?g===h?this.scrollDirection:g<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)},g=()=>{this._iosTouching=!1,!(!Nh()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};h.addEventListener("touchstart",m,sc),h.addEventListener("touchend",g,sc),this.unsubs.push(()=>{h.removeEventListener("touchstart",m),h.removeEventListener("touchend",g),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,g,y]=d;h!==null&&!g&&(Nh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?y!==0&&(this._iosDeferredAdjustment+=y):((o=this.scrollState)==null?void 0:o.behavior)==="smooth"&&!ex(this.getScrollOffset()-y,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),g&&this.scrollToEnd({behavior:g})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:i,maxAtWrite:o}=this._clampedAdjustment,u=this.getMaxScrollOffset();u>o+.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(),o=this.getMaxScrollOffset();if(i<0||i>o)return;if(this._iosDeferredAdjustment<0&&i>=o-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=yi(()=>[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,o,u,d,h,m,g,y)=>(this.prevLanes!==void 0&&this.prevLanes!==m&&(this.lanesChangedFlag=!0),this.prevLanes=m,this.pendingMin=null,{count:i,paddingStart:o,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:g,gap:y}),{key:!1}),this.isIndexInRange=i=>i>=0&&i<this.options.count,this.getMeasurements=yi(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:i,paddingStart:o,scrollMargin:u,getItemKey:d,enabled:h,lanes:m,laneAssignmentMode:g,gap:y},x)=>{var v;const S=this.itemSizeCache;if(!h)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>i)for(const C of this.laneAssignments.keys())C>=i&&this.laneAssignments.delete(C);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(C=>{this.itemSizeCache.set(C.key,C.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 C=i*2;let D=(v=this._singleLaneMeasurements)==null?void 0:v.flat;if(!D||D.length<C){const R=new Float64Array(C);D&&w>0&&R.set(D.subarray(0,w*2)),D=R}const O=w===0?new Array(i):this._singleLaneMeasurements.items.slice();let z;if(w===0)z=o+u;else{const R=w-1;z=D[R*2]+D[R*2+1]+y}for(let R=w;R<i;R++){const Q=d(R);O[R]=Q;const K=S.get(Q),$=typeof K=="number"?K:this.options.estimateSize(R);D[R*2]=z,D[R*2+1]=$,z+=$+y}this._singleLaneMeasurements={flat:D,items:O};const _=ZE(O,D);return this.measurementsCache=_,_}const j=this.measurementsCache.slice(0,w),N=new Array(m).fill(void 0),M=new Float64Array(m);let A=0;for(let C=0;C<w;C++){const D=j[C];D&&(N[D.lane]===void 0&&A++,N[D.lane]=C,M[D.lane]=D.end)}for(let C=w;C<i;C++){const D=d(C),O=this.laneAssignments.get(C);let z,_;const R=g==="estimate"||S.has(D);if(O!==void 0&&this.options.lanes>1){z=O;const le=N[z],oe=le!==void 0?j[le]:void 0;_=oe?oe.end+y:o+u}else if(A===m){let le=0,oe=M[0],te=N[0];for(let Y=1;Y<m;Y++){const ee=M[Y];(ee<oe||ee===oe&&N[Y]<te)&&(le=Y,oe=ee,te=N[Y])}z=le,_=oe+y,R&&this.laneAssignments.set(C,z)}else z=C%this.options.lanes,_=o+u,R&&this.laneAssignments.set(C,z);const Q=S.get(D),K=typeof Q=="number"?Q:this.options.estimateSize(C),$=_+K;j[C]={index:C,start:_,size:K,end:$,key:D,lane:z},N[z]===void 0&&A++,N[z]=C,M[z]=$}return this.measurementsCache=j,j},{key:!1,debug:()=>this.options.debug}),this.calculateRange=yi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i,o,u,d)=>i.length===0||o===0?(this.range=null,null):(this.range=fM(i,o,u,d,d===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=yi(()=>{let i=null,o=null;const u=this.calculateRange();return u&&(i=u.startIndex,o=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,i,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,i,o]},(i,o,u,d,h)=>d===null||h===null?[]:i({startIndex:d,endIndex:h,overscan:o,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=i=>{const o=this.options.indexAttribute,u=i.getAttribute(o);return u?parseInt(u,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=i=>{var o;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const u=this.scrollState.index??((o=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:o.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 o=this.indexFromElement(i);if(!this.isIndexInRange(o))return;const u=this.options.getItemKey(o),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(o)&&this.resizeItem(o,this.options.measureElement(i,void 0,this))},this.resizeItem=(i,o)=>{var u,d,h;if(!this.isIndexInRange(i))return;let m,g,y;const x=(u=this._singleLaneMeasurements)==null?void 0:u.flat;if(this.options.lanes===1&&x!=null)y=this.options.getItemKey(i),g=x[i*2],m=x[i*2+1];else{const w=this.measurementsCache[i];if(!w)return;y=w.key,g=w.start,m=w.size}const v=this.itemSizeCache.get(y)??m,S=o-v;if(S!==0){const w=this.options.anchorTo==="end"&&((d=this.scrollState)==null?void 0:d.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,j=w?this.getTotalSize():0,N=this.getScrollOffset()+this.scrollAdjustments,A=!this.itemSizeCache.has(y)?g<N:g+v<=N&&this.scrollDirection!=="backward",C=((h=this.scrollState)==null?void 0:h.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[i]??{index:i,key:y,start:g,size:m,end:g+m,lane:0},S,this):A);(this.pendingMin===null||i<this.pendingMin)&&(this.pendingMin=i),this.itemSizeCache.set(y,o),this.itemSizeCacheVersion++;let D=!1;w?D=this.applyScrollAdjustment(this.getTotalSize()-j):C&&(D=this.applyScrollAdjustment(S)),this.notify(D),this._retryClampedAdjustment()}},this.getVirtualItems=yi(()=>[this.getVirtualIndexes(),this.getMeasurements()],(i,o)=>{const u=[];for(let d=0,h=i.length;d<h;d++){const m=i[d],g=o[m];u.push(g)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=i=>{var o;const u=this.getMeasurements();if(u.length===0)return;const d=(o=this._singleLaneMeasurements)==null?void 0:o.flat,h=this.options.lanes===1&&d!=null,m=U1(0,u.length-1,h?g=>d[g*2]:g=>Wy(u[g]).start,i);return Wy(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,o,u=0)=>{if(!this.scrollElement)return 0;const d=this.getSize(),h=this.getScrollOffset();o==="auto"&&(o=i>=h+d?"end":"start"),o==="center"?i+=(u-d)/2:o==="end"&&(i-=d);const m=this.getMaxScrollOffset();return Math.max(Math.min(m,i),0)},this.getOffsetForIndex=(i,o="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(o==="auto")if(h.end>=d+u-this.options.scrollPaddingEnd)o="end";else if(h.start<=d+this.options.scrollPaddingStart)o="start";else return[d,o];if(o==="end"&&i===this.options.count-1)return[this.getMaxScrollOffset(),o];const m=o==="end"?h.end+this.options.scrollPaddingEnd:h.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(m,o,h.size),o]},this.scrollToOffset=(i,{align:o="start",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0;const d=this.getOffsetForAlignment(i,o),h=this.now();this.scrollState={index:null,align:o,behavior:u,startedAt:h,lastTargetOffset:d,stableFrames:0},this._scrollToOffset(d,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollToIndex=(i,{align:o="auto",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0,i=Math.max(0,Math.min(i,this.options.count-1));const d=this.getOffsetForIndex(i,o);if(!d)return;const[h,m]=d,g=this.now();this.scrollState={index:i,align:m,behavior:u,startedAt:g,lastTargetOffset:h,stableFrames:0},this._scrollToOffset(h,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollBy=(i,{behavior:o="auto"}={})=>{const u=this.getScrollOffset()+i,d=this.now();this.scrollState={index:null,align:"start",behavior:o,startedAt:d,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:o}),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,o;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=((o=u[h])==null?void 0:o.end)??0}else{const h=Array(this.options.lanes).fill(null);let m=u.length-1;for(;m>=0&&h.some(g=>g===null);){const g=u[m];h[g.lane]===null&&(h[g.lane]=g.end),m--}d=Math.max(...h.filter(g=>g!==null))}return Math.max(d-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const i=[];if(this.itemSizeCache.size===0)return i;const o=this.getMeasurements();for(const u of o)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:o,behavior:u})=>{this._intendedScrollOffset=i+(o??0),this.options.scrollToFn(i,{behavior:u,adjustments:o},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(a)}applyScrollAdjustment(a,i){if(a===0)return!1;if(Nh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=a,!1;{const o=this.getScrollOffset()+this.scrollAdjustments+a,u=this.scrollElement,d=u!==null&&("scrollHeight"in u||"document"in u)?this.getMaxScrollOffset():null;return this._clampedAdjustment=d!==null&&o>d+.5?{target:o,maxAtWrite:d}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,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 o=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,u=o?o[0]:this.scrollState.lastTargetOffset,d=1,h=u!==this.scrollState.lastTargetOffset;if(!h&&ex(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,g=Math.abs(u-this.getScrollOffset()),y=this.scrollState.behavior==="smooth"&&g>m;this.scrollState.lastTargetOffset=u,y||(this.scrollState.behavior="auto"),this._scrollToOffset(u,{adjustments:void 0,behavior:y?"smooth":"auto"})}this.scheduleScrollReconcile()}}const U1=(n,a,i,o)=>{for(;n<=a;){const u=(n+a)/2|0,d=i(u);if(d<o)n=u+1;else if(d>o)a=u-1;else return u}return n>0?n-1:0};function cM(n,a,i){let o=0;for(;o<=a;){const u=(o+a)/2|0,d=n[u*2];if(d<i)o=u+1;else if(d>i)a=u-1;else return u}return o>0?o-1:0}function fM(n,a,i,o,u){const d=n.length-1;if(n.length<=o)return{startIndex:0,endIndex:d};if(o===1&&u!==null){const y=cM(u,d,i);let x=y;const v=i+a;for(;x<d&&u[x*2]+u[x*2+1]<v;)x++;return{startIndex:y,endIndex:x}}let m=U1(0,d,y=>n[y].start,i),g=m;if(o===1)for(;g<d&&n[g].end<i+a;)g++;else if(o>1){const y=Array(o).fill(0);for(;g<d&&y.some(v=>v<i+a);){const v=n[g];y[v.lane]=v.end,g++}const x=Array(o).fill(i+a);for(;m>=0&&x.some(v=>v>=i);){const v=n[m];x[v.lane]=v.start,m--}m=Math.max(0,m-m%o),g=Math.min(d,g+(o-1-g%o))}return{startIndex:m,endIndex:g}}const Ch=typeof document<"u"?E.useLayoutEffect:E.useEffect;function dM({useFlushSync:n=!0,directDomUpdates:a=!1,directDomUpdatesMode:i="transform",...o}){const u=E.useReducer(v=>v+1,0)[1],d=E.useRef({enabled:a,mode:i,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});d.current.enabled=a,d.current.mode=i;const h=E.useRef(!1),m=v=>{const S=d.current;if(!S.enabled||!S.container)return;const w=v.getTotalSize();if(w!==S.lastSize){S.lastSize=w;const j=v.options.horizontal?"width":"height";S.container.style[j]=`${w}px`}},g=v=>{const S=d.current;if(!S.enabled||!S.container)return;m(v);const w=!!v.options.horizontal,j=S.mode==="transform",N=w?"left":"top",M=v.options.scrollMargin,A=v.getVirtualItems();for(const C of A){const D=C.start-M,O=v.elementsCache.get(C.key);O&&S.lastPositions.get(O)!==D&&(S.lastPositions.set(O,D),j?O.style.transform=w?`translate3d(${D}px, 0, 0)`:`translate3d(0, ${D}px, 0)`:O.style[N]=`${D}px`)}},y={...o,onChange:(v,S)=>{var w;const j=d.current;let N=!0;if(j.enabled){g(v);const M=v.range,A=j.prevRange;N=!A||A.isScrolling!==v.isScrolling||A.startIndex!==(M==null?void 0:M.startIndex)||A.endIndex!==(M==null?void 0:M.endIndex),N&&(j.prevRange=M?{startIndex:M.startIndex,endIndex:M.endIndex,isScrolling:v.isScrolling}:null)}N&&(n&&S&&!h.current?jm.flushSync(u):u()),(w=o.onChange)==null||w.call(o,v,S)}},[x]=E.useState(()=>{const v=new uM(y),S=v.measureElement;return v.measureElement=w=>{h.current=!0;try{S(w)}finally{h.current=!1}},Object.assign(v,{containerRef:w=>{const j=d.current;if(j.container=w,j.lastSize=null,w&&j.enabled){const N=v.getTotalSize();j.lastSize=N;const M=v.options.horizontal?"width":"height";w.style[M]=`${N}px`}}})});return x.setOptions(y),Ch(()=>x._didMount(),[]),Ch(()=>(m(x),x._willUpdate())),Ch(()=>{g(x)}),x}function hM(n){return dM({observeElementRect:tM,observeElementOffset:aM,scrollToFn:oM,...n})}const $1=33,xi=32,mM=25;function V1({items:n,scrollRef:a,columnCount:i,getKey:o,render:u,onEndReached:d,endThreshold:h=15,rowHeight:m=$1}){var M;const g=hM({count:n.length,getScrollElement:()=>a.current,estimateSize:()=>m,overscan:8,scrollMargin:xi,getItemKey:A=>o(n[A],A),initialRect:{width:1e3,height:xi+m*10}}),y=!((M=g.scrollRect)!=null&&M.height),x=y?n.slice(0,mM).map((A,C)=>({key:o(A,C),index:C,start:xi+C*m,end:xi+(C+1)*m})):g.getVirtualItems(),v=x[0],S=x[x.length-1],w=(S==null?void 0:S.index)??-1;E.useEffect(()=>{d&&w>=0&&w>=n.length-h&&d()},[w,n.length,h,d]);const j=!y&&v?v.start-xi:0,N=!y&&S?g.getTotalSize()-(S.end-xi):0;return c.jsxs(c.Fragment,{children:[j>0&&c.jsx("tbody",{"aria-hidden":!0,children:c.jsx("tr",{className:"vt-spacer",style:{height:j},children:c.jsx("td",{colSpan:i})})}),x.map(A=>c.jsx("tbody",{"data-index":A.index,ref:y?void 0:g.measureElement,children:u(n[A.index],A.index)},A.key)),N>0&&c.jsx("tbody",{"aria-hidden":!0,children:c.jsx("tr",{className:"vt-spacer",style:{height:N},children:c.jsx("td",{colSpan:i})})})]})}function xs({text:n,query:a}){const i=a.trim();if(!i||jN(i))return c.jsx(c.Fragment,{children:n});const o=[],u=n.toLowerCase(),d=i.toLowerCase();let h=0;for(let m=u.indexOf(d);m!==-1;m=u.indexOf(d,h))m>h&&o.push(n.slice(h,m)),o.push(c.jsx("mark",{children:n.slice(m,m+i.length)},m)),h=m+i.length;return o.push(n.slice(h)),c.jsx(c.Fragment,{children:o})}function nx({value:n,max:a,clonal:i}){return n===null?c.jsx("span",{style:{color:"var(--chev)"},children:"–"}):c.jsxs("span",{className:"vbar",children:[c.jsx("span",{className:"vbar-n",children:em(n)}),c.jsxs("span",{className:"vbar-track","aria-hidden":!0,children:[c.jsx("span",{className:"vbar-fill",style:{width:`${Math.min(n/a,1)*100}%`}}),i&&c.jsx("span",{className:"vbar-tick",style:{left:`${1/a*100}%`}})]})]})}function gM({variant:n,showDriver:a}){return c.jsxs("span",{className:"flex flex-wrap gap-1.5",children:[a&&n.is_driver&&c.jsx("span",{className:"sc-pill p-neu",children:"Driver"}),n.hotspot&&c.jsx("span",{className:"sc-pill p-hot",children:"Hotspot"}),n.in_dmp&&c.jsx("span",{className:"sc-pill p-dmp",children:"In DMP"}),n.ffpe_removed&&c.jsx("span",{className:"sc-pill p-ffpe",title:"Left out of the report's counts by its FFPE artifact filter",children:"FFPE filtered"})]})}function pM(n){return`${n.ref}>${n.alt}`}function vM({variant:n,onLocate:a}){const[i,o]=E.useState(!1),u=`chr${n.chrom}:${n.pos}`,d=[["Variant",`${n.kind==="snv"?"SNV":n.kind==="indel"?"Indel":n.kind}, ${pM(n)}`],...n.depth!==null?[["Reads",`${n.alt_reads??"?"} of ${n.depth}`]]:[],["Normal VAF",em(n.normal_vaf)],["Mutant copies",EN(n.mut_alleles)??"–"],["Consequence",(n.consequence??n.effect??"–").replace(/&/g,", ")],["COSMIC",CN(n.cosmic)??"–"],...n.ffpe_score!==null||n.ffpe_removed?[["FFPE artifact score",n.ffpe_score!==null?em(n.ffpe_score):"Not scored"]]:[],["Expression",n.gene_tpm!==null?`${n.gene_tpm.toFixed(1)} TPM`:"–"],["Gene role",MN(n)??"–"]];return c.jsxs("div",{className:"vt-detail-body",children:[c.jsx("dl",{className:"vt-facts",children:d.map(([h,m])=>c.jsxs("div",{children:[c.jsx("dt",{children:h}),c.jsx("dd",{children:m})]},h))}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>a(n),children:[c.jsx(Wh,{size:14,"aria-hidden":!0}),"Show on copy number"]}),c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(u),o(!0),window.setTimeout(()=>o(!1),1500)}catch{window.prompt("Copy this locus",u)}},children:[c.jsx(n1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy locus"]})]})]})}function yM({sort:n,current:a,onSort:i}){const o=a.replace(/^-/,"")===n.key,u=a.startsWith("-"),d=o?u?n.key:`-${n.key}`:n.descFirst?`-${n.key}`:n.key;return c.jsxs("button",{type:"button",className:"vt-sort","data-active":o,onClick:()=>i(d),title:`Sort by ${n.label.toLowerCase()}`,children:[n.label,o&&u?c.jsx(Ju,{size:12,"aria-hidden":!0}):o?c.jsx(Wx,{size:12,"aria-hidden":!0}):c.jsx(Ju,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function xM({data:n,rows:a,hasMore:i,loadingMore:o,onMore:u,table:d,fetching:h,showCcf:m,onTable:g,onHover:y,onLocate:x}){const[v,S]=E.useState({}),w=d.q,j=d.scope!=="drivers",N=E.useMemo(()=>[{id:"expand",header:()=>c.jsx("span",{className:"sr-only",children:"Details"}),meta:{className:"pin vt-x"},cell:({row:_})=>c.jsx("button",{type:"button",className:"vt-expand","aria-expanded":_.getIsExpanded(),"aria-label":`Details of ${_.original.gene??"this mutation"} ${_.original.protein_change??""}`.trim(),onClick:R=>{R.stopPropagation(),_.toggleExpanded()},onFocus:()=>y(_.original),children:c.jsx(Cm,{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:_}})=>c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"vt-gene",children:c.jsx(xs,{text:_.gene??"–",query:w})}),c.jsx("span",{className:"vt-sub mono",children:lr(_.chrom,_.pos)})]})},{id:"change",header:"Change",cell:({row:{original:_}})=>c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mono text-[12.5px] font-medium",children:c.jsx(xs,{text:_.protein_change??"–",query:w})}),_.cdna_change&&c.jsx("span",{className:"vt-sub mono",children:c.jsx(xs,{text:_.cdna_change,query:w})})]})},{id:"effect",header:"Effect",meta:{sorts:[{key:"effect",label:"Effect"}]},cell:({row:{original:_}})=>c.jsx("span",{className:_.effect_class==="truncating"?"font-semibold":void 0,children:Jw(_.consequence,_.effect)})},{id:"vaf",header:"VAF",meta:{className:"n",sorts:[{key:"vaf",label:"VAF",descFirst:!0}]},cell:({row:{original:_}})=>c.jsx(nx,{value:_.vaf,max:1})},...m?[{id:"ccf",header:"CCF",meta:{className:"n",sorts:[{key:"ccf",label:"CCF",descFirst:!0}]},cell:({row:{original:_}})=>c.jsx(nx,{value:_.ccf,max:1.25,clonal:!0})}]:[],{id:"flags",header:"Flags",cell:({row:{original:_}})=>c.jsx(gM,{variant:_,showDriver:j})}],[w,j,m,y]),M=H1({data:a,columns:N,getRowId:bN,getCoreRowModel:D1(),getExpandedRowModel:L1(),getRowCanExpand:()=>!0,manualPagination:!0,state:{expanded:v},onExpandedChange:S}),A=d.sort.replace(/^-/,""),C=M.getVisibleLeafColumns().length,D=p1(d)>0,O=E.useRef(null),z=JSON.stringify([d.scope,d.sort,d.q,d.effects,d.flags,d.range,d.ffpe]);return E.useEffect(()=>{O.current&&(O.current.scrollTop=0)},[z]),c.jsxs("div",{className:"flex min-w-0 flex-col",children:[c.jsx("div",{className:"tbar",children:c.jsx(ac,{value:d.q,onChange:_=>g({q:_})})}),c.jsxs("div",{ref:O,className:"vt-scroll vt-viewport",onMouseLeave:()=>y(null),"aria-busy":h,children:[h&&c.jsx("div",{className:"vt-progress","aria-hidden":!0}),c.jsxs("table",{className:"vt",children:[c.jsx("thead",{children:M.getHeaderGroups().map(_=>c.jsx("tr",{children:_.headers.map(R=>{var $;const Q=R.column.columnDef.meta,K=($=Q==null?void 0:Q.sorts)==null?void 0:$.some(le=>le.key===A);return c.jsx("th",{className:Q==null?void 0:Q.className,"aria-sort":K?d.sort.startsWith("-")?"descending":"ascending":void 0,children:Q!=null&&Q.sorts?c.jsx("span",{className:"vt-sorts",children:Q.sorts.map(le=>c.jsx(yM,{sort:le,current:d.sort,onSort:oe=>g({sort:oe})},le.key))}):lc(R.column.columnDef.header,R.getContext())},R.id)})},_.id))}),c.jsx(V1,{items:M.getRowModel().rows,scrollRef:O,columnCount:C,getKey:_=>_.id,onEndReached:i&&!o?u:void 0,render:_=>c.jsxs(c.Fragment,{children:[c.jsx("tr",{className:"vt-row","data-expanded":_.getIsExpanded(),onClick:()=>_.toggleExpanded(),onMouseEnter:()=>y(_.original),children:_.getVisibleCells().map(R=>{var Q;return c.jsx("td",{className:(Q=R.column.columnDef.meta)==null?void 0:Q.className,children:lc(R.column.columnDef.cell,R.getContext())},R.id)})}),_.getIsExpanded()&&c.jsx("tr",{className:"vt-detail",children:c.jsx("td",{colSpan:C,children:c.jsx(vM,{variant:_.original,onLocate:x})})})]})}),a.length===0&&c.jsx("tbody",{children:c.jsx("tr",{children:c.jsx("td",{colSpan:C,children:c.jsx("div",{className:"vt-empty",children:D?c.jsxs(c.Fragment,{children:["No mutations match these filters.",c.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>g({q:"",effects:[],flags:[],range:null}),children:"Clear all filters"})]}):`No ${d.scope==="all"?"":`${d.scope} `}mutations in this sample.`})})})})]})]}),n.total>0&&c.jsx(yc,{shown:a.length,total:n.total,noun:["mutation","mutations"],loaded:!0,note:o?"Loading more…":a.length<n.total?"Scroll the table for more":void 0})]})}const SM=E.forwardRef(function({variants:a,rows:i,hasMore:o,loadingMore:u,onMore:d,variantsLoading:h,variantsFetching:m,density:g,densityLoading:y,picked:x,measure:v,onMeasure:S,table:w,onTable:j,hovered:N,onHover:M,onLocate:A,showCcf:C,tmb:D},O){var le,oe;const z=(a==null?void 0:a.status)==="ok"?a.data??void 0:void 0,_=z==null?void 0:z.counts,R=(g==null?void 0:g.status)==="ok"?(le=g.data)==null?void 0:le.total:void 0,Q=(g==null?void 0:g.status)==="ok"?(oe=g.data)==null?void 0:oe.ffpe:null,K=te=>te===void 0?"":te.toLocaleString("en-US"),$=w.range&&w.range.measure===v?[w.range.low,w.range.high]:null;return c.jsxs(gc,{ref:O,title:"Mutations",subtitle:R!==void 0?`${K(R)} PASS SNVs and indels${Q&&!Q.shown?", after the FFPE filter":""}`:void 0,lineage:mc(g==null?void 0:g.lineage,a==null?void 0:a.lineage,D==null?void 0:D.lineage),picked:x,className:"mut",info:"mutations",expandable:!0,controls:c.jsx(c.Fragment,{children:c.jsx(Ss,{label:"Which mutations",value:w.scope,onChange:te=>j({scope:te,sort:g1[te]}),options:[{value:"drivers",label:c.jsxs(c.Fragment,{children:["Drivers",c.jsx("span",{className:"seg-n",children:K(_==null?void 0:_.drivers)})]})},{value:"coding",label:c.jsxs(c.Fragment,{children:["Coding",c.jsx("span",{className:"seg-n",children:K(_==null?void 0:_.coding)})]})},{value:"all",label:c.jsxs(c.Fragment,{children:["All",c.jsx("span",{className:"seg-n",children:K(_==null?void 0:_.all)})]})}]})}),children:[c.jsx(WC,{envelope:g,loading:y,measure:v,onMeasure:S,range:$,focus:N,onRange:te=>{!te&&!w.range||j({range:te?{measure:v,low:te[0],high:te[1]}:null})},onGene:te=>j({q:te})}),z&&a&&a.warnings.length>0&&c.jsx("div",{className:"px-5 py-2 text-xs",role:"note",style:{color:"var(--warn-ink)"},children:a.warnings.join(" ")}),z?c.jsxs("div",{className:"mut-body",children:[c.jsx(nE,{table:w,data:z,onChange:j}),c.jsx(xM,{data:z,rows:i,hasMore:o,loadingMore:u,onMore:d,table:w,fetching:m,showCcf:C,onTable:j,onHover:M,onLocate:A})]}):c.jsx("div",{className:"mut-rule",children:c.jsx(dr,{label:"mutations",envelope:a,loading:h,skeletonHeight:240,children:()=>null})}),(D==null?void 0:D.status)==="ok"&&D.data&&c.jsx(aE,{data:D.data}),(D==null?void 0:D.status)==="missing"&&D.warnings.some(te=>te.includes("Rerun"))&&c.jsxs("section",{className:"sig-section","aria-label":"Coding mutations against reference cohorts",children:[c.jsx("h3",{className:"sv-h",children:"Coding mutations against reference cohorts"}),c.jsx("p",{className:"sv-empty",children:D.warnings.join(" ")})]})]})}),zm={oncogene:"Oncogene",tsg:"Tumour suppressor",both:"Oncogene and TSG"},F1=["oncogene","tsg","both"],Dm={deletion:"Deletion","tandem-duplication":"Tandem duplication",inversion:"Inversion",translocation:"Translocation"},bM={"<1kb":"<1 kb","1kb-10kb":"1–10 kb","10kb-100kb":"10–100 kb","100kb-1Mb":"100 kb–1 Mb",">1Mb":">1 Mb"};function jM(n){return n?bM[n]??n:""}const wM={DEL:"Deletion",DUP:"Duplication",INV:"Inversion",TRA:"Translocation",BND:"Breakend",INS:"Insertion"};function Lm(n){return n?wM[n]??n:"–"}function NM(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 CM(n){return n.some(a=>a.left_expression||a.right_expression||a.expression)}function EM(n){const a={oncogene:0,tsg:0,both:0};for(const i of n)i.role&&(a[i.role]+=1);return a}function MM(n){const a=n.trim().match(x1);if(!a)return null;const i=Number(a[2].replace(/,/g,"")),o=a[3]?Number(a[3].replace(/,/g,"")):i;return{chrom:a[1].toUpperCase(),start:Math.min(i,o),end:Math.max(i,o)}}function _M(n,a){const i=a.trim().toLowerCase();if(!i)return!0;const o=MM(a);if(o){const u=(d,h)=>(d==null?void 0:d.toUpperCase())===o.chrom&&h!==null&&h>=o.start&&h<=o.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,Lm(n.sv_type),n.role?zm[n.role]:null].some(u=>u==null?void 0:u.toLowerCase().includes(i))}const is={deletion:"var(--sv-del)","tandem-duplication":"var(--sv-dup)",inversion:"var(--sv-inv)",translocation:"var(--sv-tra)"},TM={deletion:"Deletion","tandem-duplication":"Tandem dup.",inversion:"Inversion",translocation:"Transl."},RM={"<1kb":"<1k","1kb-10kb":"10k","10kb-100kb":"100k","100kb-1Mb":"1M",">1Mb":">1M"};function AM(n){return n.size?RM[n.size]??n.size:""}function lx(n){const a=`${n.clustered?"Clustered":"Dispersed"} ${Dm[n.sv_class].toLowerCase()}s`;return n.size?`${a}, ${jM(n.size)}`:a}function OM(n){const a=[];return n.forEach((i,o)=>{const u=a[a.length-1];u&&u.clustered===i.clustered&&u.sv_class===i.sv_class?u.end=o:a.push({clustered:i.clustered,sv_class:i.sv_class,start:o,end:o})}),a}function zM(n){const a=new Map;for(const i of n)a.set(i.sv_class,(a.get(i.sv_class)??0)+i.count);return[...a].map(([i,o])=>({sv_class:i,count:o}))}const DM=45;function LM({role:n}){return n?c.jsx("span",{className:`sc-pill p-${n==="oncogene"?"onco":n}`,children:zm[n]}):c.jsx("span",{style:{color:"var(--chev)"},children:"–"})}function HM({rows:n,shown:a,onToggle:i}){const o=EM(n);return c.jsx("div",{className:"sv-legend",role:"group","aria-label":"Show rows by gene role",children:F1.filter(u=>o[u]>0).map(u=>c.jsxs("button",{type:"button",className:`sv-legend-item p-${u==="oncogene"?"onco":u}`,"aria-pressed":a.includes(u),onClick:()=>i(u),children:[zm[u],c.jsx("span",{className:"sv-legend-n",children:o[u]})]},u))})}function ax({gene:n,chrom:a,pos:i,loc:o,query:u}){return c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"sv-end",children:[c.jsx("span",{className:"vt-gene",children:c.jsx(xs,{text:n||"–",query:u})}),o&&c.jsx("span",{className:"sv-loc",children:o})]}),c.jsx("span",{className:"vt-sub stack mono",children:a&&i!==null?lr(a,i):"–"})]})}function k1(n){return n?n.replace(/,\s*/g,", "):"–"}function UM({label:n,sorted:a,onClick:i}){return c.jsxs("button",{type:"button",className:"vt-sort","data-active":!!a,onClick:i,title:`Sort by ${n.toLowerCase()}`,children:[n,a==="desc"?c.jsx(Ju,{size:12,"aria-hidden":!0}):a==="asc"?c.jsx(Wx,{size:12,"aria-hidden":!0}):c.jsx(Ju,{size:12,"aria-hidden":!0,className:"vt-sort-idle"})]})}function $M({row:n,onLocate:a}){const[i,o]=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",Lm(n.sv_type)],["Left breakpoint",u?`${lr(u.chrom,u.pos)}${n.left_loc?`, ${n.left_loc}`:""}`:"–"],["Right breakpoint",d?`${lr(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",k1(n.callers)]],m=n.gene??n.left_gene,g=n.gene??n.right_gene;return c.jsxs("div",{className:"vt-detail-body",children:[c.jsx("dl",{className:"vt-facts",children:h.map(([y,x])=>c.jsxs("div",{children:[c.jsx("dt",{children:y}),c.jsx("dd",{children:x})]},y))}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u&&c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>a({...u,gene:m}),children:[c.jsx(Wh,{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)&&c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>a({...d,gene:g}),children:[c.jsx(Wh,{size:14,"aria-hidden":!0}),"Show right breakpoint on copy number"]}),n.igv_locus&&c.jsxs("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.igv_locus??""),o(!0),window.setTimeout(()=>o(!1),1500)}catch{window.prompt("Copy these IGV loci",n.igv_locus??"")}},children:[c.jsx(n1,{size:14,"aria-hidden":!0}),i?"Copied":"Copy IGV loci"]})]})]})}function sx({kind:n,rows:a,total:i=a.length,query:o="",onLocate:u}){const[d,h]=E.useState({}),[m,g]=E.useState([]),y=E.useRef(null),x=CM(a);E.useEffect(()=>{y.current&&(y.current.scrollTop=0)},[o,a.length]);const v=E.useMemo(()=>{const N={id:"expand",header:()=>c.jsx("span",{className:"sr-only",children:"Details"}),enableSorting:!1,meta:{className:"pin vt-x"},cell:({row:C})=>c.jsx("button",{type:"button",className:"vt-expand","aria-expanded":C.getIsExpanded(),"aria-label":`Details of ${C.original.gene??[C.original.left_gene,C.original.right_gene].filter(Boolean).join(" and ")}`,onClick:D=>{D.stopPropagation(),C.toggleExpanded()},children:c.jsx(Cm,{size:14,"aria-hidden":!0})})},M=[{id:"type",header:"Type",accessorFn:C=>C.sv_type??"",cell:({row:{original:C}})=>Lm(C.sv_type)},{id:"role",header:"Role",accessorFn:C=>C.role?F1.indexOf(C.role):9,cell:({row:{original:C}})=>c.jsx(LM,{role:C.role})},{id:"callers",header:"Callers",accessorFn:C=>C.callers??"",cell:({row:{original:C}})=>c.jsx("span",{className:"text-[12.5px]",children:k1(C.callers)})},{id:"support",header:"Support",accessorFn:C=>C.max_support??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:C}})=>c.jsx("span",{className:"mono",children:C.max_support??"–"})},{id:"pileups",header:"Pileups",enableSorting:!1,cell:({row:{original:C}})=>c.jsx("span",{className:"mono text-[12px]",children:[C.left_pileup,C.right_pileup].filter(Boolean).join(" · ")||"–"})}],A=x?[{id:"expression",header:"Expression",enableSorting:!1,cell:({row:{original:C}})=>n==="whole_gene"?c.jsx("span",{className:"text-[12.5px]",children:C.expression??"–"}):c.jsxs("span",{className:"flex flex-col text-[12.5px] leading-snug",children:[c.jsx("span",{children:C.left_expression??"–"}),c.jsx("span",{style:{color:"var(--muted)"},children:C.right_expression??"–"})]})}]:[];return n==="whole_gene"?[N,{id:"gene",header:"Gene",accessorFn:C=>C.gene??"",meta:{className:"pin vt-g"},cell:({row:{original:C}})=>c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"vt-gene",children:c.jsx(xs,{text:C.gene??"–",query:o})}),c.jsx("span",{className:"vt-sub mono",children:C.left_chrom&&C.left_pos!==null&&C.right_pos!==null?`${lr(C.left_chrom,C.left_pos)}–${C.right_pos.toLocaleString("en-US")}`:"–"})]})},{id:"length",header:"Length",accessorFn:C=>C.length??-1,sortDescFirst:!0,meta:{className:"n"},cell:({row:{original:C}})=>c.jsx("span",{className:"mono",children:NM(C.length)})},...M,...A]:[N,{id:"left",header:"Left",accessorFn:C=>C.left_gene??"",meta:{className:"pin vt-g"},cell:({row:{original:C}})=>c.jsx(ax,{gene:C.left_gene,chrom:C.left_chrom,pos:C.left_pos,loc:C.left_loc,query:o})},{id:"right",header:"Right",accessorFn:C=>C.right_gene??"",cell:({row:{original:C}})=>c.jsx(ax,{gene:C.right_gene,chrom:C.right_chrom,pos:C.right_pos,loc:C.right_loc,query:o})},...M,...A]},[n,x,o]),S=H1({data:a,columns:v,getRowId:N=>`${n}-${N.row}`,getCoreRowModel:D1(),getSortedRowModel:YE(),getExpandedRowModel:L1(),getRowCanExpand:()=>!0,state:{expanded:d,sorting:m},onExpandedChange:h,onSortingChange:g}),w=S.getVisibleLeafColumns().length,j=n==="onco"?DM:$1;return c.jsxs(c.Fragment,{children:[c.jsx("div",{ref:y,className:"vt-scroll vt-viewport",style:{"--row-h":`${j}px`},children:c.jsxs("table",{className:"vt",children:[c.jsx("thead",{children:S.getHeaderGroups().map(N=>c.jsx("tr",{children:N.headers.map(M=>{const A=M.column.columnDef.meta,C=M.column.getIsSorted();return c.jsx("th",{className:A==null?void 0:A.className,"aria-sort":C?C==="desc"?"descending":"ascending":void 0,children:M.column.getCanSort()?c.jsx(UM,{label:String(M.column.columnDef.header),sorted:C,onClick:M.column.getToggleSortingHandler()}):lc(M.column.columnDef.header,M.getContext())},M.id)})},N.id))}),c.jsx(V1,{items:S.getRowModel().rows,scrollRef:y,columnCount:w,rowHeight:j,getKey:N=>N.id,render:N=>c.jsxs(c.Fragment,{children:[c.jsx("tr",{className:"vt-row","data-expanded":N.getIsExpanded(),onClick:()=>N.toggleExpanded(),children:N.getVisibleCells().map(M=>{var A;return c.jsx("td",{className:(A=M.column.columnDef.meta)==null?void 0:A.className,children:lc(M.column.columnDef.cell,M.getContext())},M.id)})}),N.getIsExpanded()&&c.jsx("tr",{className:"vt-detail",children:c.jsx("td",{colSpan:w,children:c.jsx($M,{row:N.original,onLocate:u})})})]})})]})}),c.jsx(yc,{shown:a.length,total:i,noun:["row","rows"]})]})}const Qo=176,Eh=34,Mh=7,_h=22,Xu=30,VM={deletion:"Del","tandem-duplication":"Dup",inversion:"Inv",translocation:"Tra"};function FM(n,a){return[Dm[n],TM[n],VM[n]].find(o=>_a(o,12)+8<=a)??""}function kM(n,a,i,o,u){const d=Math.min(u,i/2,o);return`M${n},${a+o} V${a+d} Q${n},${a} ${n+d},${a} H${n+i-d} Q${n+i},${a} ${n+i},${a+d} V${a+o} Z`}function BM({categories:n,total:a,litClass:i}){const[o,u]=Oa(),d=E.useId(),[h,m]=E.useState(null),g=OM(n),y=Math.max(0,...n.map($=>$.count)),x=Tm(y,3),v=x[x.length-1],S=n.length,w=(g.length-1)*Mh,j=n.some($=>$.clustered)&&n.some($=>!$.clustered),N=Math.max((u-Xu-6-w-(j?_h-Mh:0))/S,4),M=Math.min(26,N*.64),A=[],C=[];let D=Xu;g.forEach(($,le)=>{le>0&&(D+=g[le-1].clustered!==$.clustered?_h:Mh);const oe=D;for(let ee=$.start;ee<=$.end;ee++)A[ee]=D+(N-M)/2,D+=N;const te=C.find(ee=>ee.clustered===$.clustered&&ee.x1>=oe-_h-1),Y=n.slice($.start,$.end+1).reduce((ee,X)=>ee+X.count,0);te?(te.x1=D,te.count+=Y):C.push({clustered:$.clustered,x0:oe,x1:D,count:Y})});const O=$=>Eh+Qo-$/v*Qo,z=Eh+Qo,_=$=>h!==null?$===h:i?n[$].sv_class===i:!0,R=h===null?null:n[h],Q=R&&a?Math.round(R.count/a*100):0,K=z+62;return c.jsxs("div",{ref:o,className:"rs","data-lit":h!==null||i?"":void 0,children:[c.jsxs("svg",{width:u,height:K,role:"img","aria-label":`Rearrangement signatures: ${n.filter($=>$.count>0).map($=>`${$.category} ${$.count}`).join(", ")}`,children:[c.jsx("defs",{children:Object.keys(is).map($=>c.jsxs("linearGradient",{id:`${d}-${$}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[c.jsx("stop",{offset:"0",style:{stopColor:is[$]}}),c.jsx("stop",{offset:"1",style:{stopColor:is[$]},stopOpacity:.72})]},$))}),C.map($=>c.jsxs("g",{children:[j&&$.clustered&&c.jsx("rect",{x:$.x0-6,y:0,width:$.x1-$.x0+12,height:z+56,rx:14,className:"rs-zone"}),j&&c.jsxs("text",{x:$.x0,y:17,className:"rs-zone-name",children:[$.clustered?"Clustered":"Dispersed",c.jsxs("tspan",{className:"rs-zone-n",children:[" ",$.count.toLocaleString("en-US")]})]})]},$.clustered?"c":"d")),x.map($=>c.jsxs("g",{children:[c.jsx("line",{x1:Xu-4,x2:u,y1:O($),y2:O($),className:$===0?"rs-base":"rs-grid"}),c.jsx("text",{x:Xu-10,y:O($)+4,textAnchor:"end",className:"rs-tick",children:$.toLocaleString("en-US")})]},$)),n.map(($,le)=>{const oe=$.count/v*Qo,te=_(le);return c.jsxs("g",{className:"rs-bar","data-off":te?void 0:"",children:[$.count>0?c.jsxs(c.Fragment,{children:[c.jsx("path",{d:kM(A[le],O($.count),M,oe,6),fill:`url(#${d}-${$.sv_class})`,fillOpacity:$.clustered?.5:1}),c.jsx("text",{x:A[le]+M/2,y:O($.count)-7,textAnchor:"middle",className:"rs-count",children:$.count.toLocaleString("en-US")})]}):c.jsx("rect",{x:A[le],y:z-3,width:M,height:3,rx:1.5,style:{fill:is[$.sv_class]},fillOpacity:.28}),$.size&&N>=26&&c.jsx("text",{x:A[le]+M/2,y:z+16,textAnchor:"middle",className:"rs-size",children:AM($)}),c.jsx("rect",{x:A[le]-(N-M)/2,y:Eh-8,width:N,height:Qo+30,fill:"transparent",tabIndex:0,"aria-label":`${lx($)}: ${$.count}`,onMouseEnter:()=>m(le),onMouseLeave:()=>m(null),onFocus:()=>m(le),onBlur:()=>m(null)})]},$.category)}),g.map($=>{const le=A[$.start],oe=A[$.end]+M,te=FM($.sv_class,oe-le+(N-M));return c.jsxs("g",{className:"rs-class","data-off":i&&i!==$.sv_class?"":void 0,children:[c.jsx("line",{x1:le,x2:oe,y1:z+26,y2:z+26,style:{stroke:is[$.sv_class]},className:"rs-bracket"}),c.jsx("text",{x:(le+oe)/2,y:z+44,textAnchor:"middle",className:"rs-class-name",children:te})]},`${$.clustered}-${$.sv_class}`)})]}),R&&h!==null&&c.jsxs(Ul,{x:A[h]+M/2,y:Math.max(O(R.count)-8,40),width:u,above:!0,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"sv-swatch",style:{background:is[R.sv_class],opacity:R.clustered?.5:1},"aria-hidden":!0}),lx(R)]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Rearrangements"}),c.jsx("b",{children:R.count.toLocaleString("en-US")})]}),a>0&&c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Of all of them"}),c.jsxs("b",{children:[Q===0&&R.count>0?"<1":Q,"%"]})]})]})]})}function B1(n,a,i){return`${n.toLocaleString("en-US")} ${n===1?a:i}`}function GM({categories:n,total:a}){const[i,o]=E.useState(null),u=zM(n);return c.jsxs("div",{className:"sv-sigs",children:[c.jsxs("div",{className:"sv-sigs-head",children:[c.jsxs("h3",{className:"sv-h",children:["Rearrangement signatures",c.jsx("span",{className:"sv-h-n",children:B1(a,"rearrangement","rearrangements")})]}),c.jsxs("ul",{className:"sv-sigs-key","aria-label":"Classes",onMouseLeave:()=>o(null),children:[u.map(({sv_class:d,count:h})=>c.jsxs("li",{"data-on":i===d||void 0,onMouseEnter:()=>o(d),children:[c.jsx("span",{className:"sv-swatch",style:{background:is[d]},"aria-hidden":!0}),Dm[d],c.jsx("span",{className:"sv-key-n",children:h.toLocaleString("en-US")})]},d)),c.jsx("li",{className:"sv-sigs-note",children:"Lighter bars: clustered"})]})]}),c.jsx("div",{className:"sv-sigs-plot",children:c.jsx(BM,{categories:n,total:a,litClass:i})})]})}function qM({data:n,query:a,onQuery:i,onLocate:o}){const[u,d]=E.useState([]),h=w=>d(j=>j.includes(w)?j.filter(N=>N!==w):[...j,w]),m=w=>w.filter(j=>_M(j,a)),g=w=>u.length?w.filter(j=>j.role&&u.includes(j.role)):w,y=[...n.onco,...n.whole_gene],x=[...m(n.onco),...m(n.whole_gene)],v=g(m(n.onco)),S=g(m(n.whole_gene));return y.length===0?c.jsx("p",{className:"sv-empty",children:"No rearrangements with breakpoints in oncogenes or tumour suppressors."}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"tbar",children:[x.length>0&&c.jsx(HM,{rows:x,shown:u,onToggle:h}),c.jsx(ac,{value:a,onChange:i,label:"Search structural variants",placeholder:"Search gene, caller or locus",shortcut:!1})]}),x.length===0&&c.jsxs("div",{className:"vt-empty sv-empty",children:["No rows match this search.",c.jsx("button",{type:"button",className:"sc-btn sc-b2 sm",onClick:()=>i(""),children:"Clear the search"})]}),v.length>0&&c.jsxs("section",{className:"sv-table","aria-label":"Rearranged oncogenes and tumour suppressors",children:[c.jsx("h3",{className:"sv-h",children:"Rearranged oncogenes and tumour suppressors"}),c.jsx(sx,{kind:"onco",rows:v,total:n.onco.length,query:a,onLocate:o})]}),S.length>0&&c.jsxs("section",{className:"sv-table","aria-label":"Whole-gene rearrangements",children:[c.jsx("h3",{className:"sv-h",children:"Whole-gene rearrangements"}),c.jsx(sx,{kind:"whole_gene",rows:S,total:n.whole_gene.length,query:a,onLocate:o})]})]})}const QM=E.forwardRef(function({envelope:a,loading:i,picked:o,onLocate:u},d){const h=(a==null?void 0:a.status)==="ok"?a.data:null,[m,g]=E.useState("");return c.jsx(gc,{ref:d,title:"Structural variants",subtitle:h?B1(h.rearrangements,"rearrangement","rearrangements"):void 0,lineage:(a==null?void 0:a.lineage)??[],picked:o,info:"structuralVariants",className:"svs",expandable:!0,children:c.jsx(dr,{label:"structural variants",envelope:a,loading:i,skeletonHeight:220,children:y=>c.jsxs("div",{className:"sv-body",children:[c.jsx(qM,{data:y,query:m,onQuery:g,onLocate:u}),y.signatures&&c.jsx(GM,{categories:y.signatures.categories,total:y.signatures.total})]})})})}),Ku={"C>A":"#03bcee","C>G":"#222222","C>T":"#e32926","T>A":"#999999","T>C":"#a1ce63","T>G":"#e9a9a5"};function YM(n,a){const i=n.contexts.every(g=>g.reconstructed!==null),o=n.contexts.reduce((g,y)=>g+y.observed,0),u=i?n.contexts.reduce((g,y)=>g+(y.reconstructed??0),0):0,d=n.contexts.map(g=>a==="share"?o?g.observed/o*100:0:g.observed),h=i?n.contexts.map(g=>a==="share"?u?(g.reconstructed??0)/u*100:0:g.reconstructed??0):null,m=h?d.map((g,y)=>g-h[y]):null;return{observed:d,reconstructed:h,difference:m,top:Math.max(0,...d,...h??[]),reach:m?Math.max(0,...m.map(Math.abs)):0}}function IM(n){const a=[];return n.forEach((i,o)=>{const u=a[a.length-1];u&&u.substitution===i.substitution?u.end=o:a.push({substitution:i.substitution,start:o,end:o})}),a}function XM(n,a,i,o=10){const u=a-o*(n.length-1),d=v=>v.end-v.start+1,h=n.reduce((v,S)=>v+d(S),0),m=i?n.find(v=>v.substitution===i):void 0,g=m?Math.min(.62,Math.max(.4,d(m)*30/u)):0,y=[];let x=0;for(const v of n){const S=d(v),w=m?v===m?u*g:u*(1-g)*S/(h-d(m)):u*S/h,j=w/S;for(let N=0;N<S;N++)y.push({x:x+N*j+j*.11,width:j*.78});x+=w+o}return y}function Th(n){return[n.five_prime,n.substitution[0],n.three_prime]}function Rh(n,a){return a==="count"?Math.round(n).toLocaleString("en-US"):`${n.toFixed(n>=10?1:2)}%`}function ix(n,a){return n==="cosine"?a.toFixed(3):a.toExponential(2).replace("e-","e−").replace("e+","e")}const dn=46,KM=6,ss=28,Ah=14,zl=96,Si=84,PM=["This tumour","Rebuilt from its signatures","Difference"],ZM={reported:"Reported run",unfiltered:"Unfiltered"};function JM({data:n}){const[a,i]=Oa(760),[o,u]=E.useState("share"),[d,h]=E.useState("reported"),[m,g]=E.useState(null),[y,x]=E.useState(null),v=n.runs.find(te=>te.source===d)??n.runs[0],S=n.reconstructed&&v.contexts.every(te=>te.reconstructed!==null),w=E.useMemo(()=>YM(v,o),[v,o]),j=E.useMemo(()=>IM(v.contexts),[v]),N=Math.max(i-dn-KM,240),M=E.useMemo(()=>XM(j,N,m,Ah),[j,N,m]),A=S?3:1,C=m?22:0,D=[ss,ss+zl+Ah,ss+2*(zl+Ah)],O=(S?D[2]+Si:D[0]+zl)+C+8,z=o==="share"?"%":"",_=Tm(w.top,2),R=_[_.length-1],Q=Math.max(w.reach*1.15,o==="share"?.5:1),K=(te,Y)=>Y===2?Si/2*(1-te/Q):zl*(1-te/R),$=[w.observed,w.reconstructed,w.difference],le=y===null?null:v.contexts[y],oe=te=>dn+M[te].x+M[te].width/2;return c.jsxs("section",{className:"ctx sig-section","aria-label":"96 mutational contexts",children:[c.jsxs("div",{className:"ctx-head",children:[c.jsxs("h3",{className:"sv-h",children:["96 mutational contexts",c.jsxs("span",{className:"sv-h-n",children:[Math.round(v.total).toLocaleString("en-US")," SNVs"]})]}),c.jsxs("div",{className:"ctx-controls",children:[S&&n.fit&&c.jsxs("span",{className:"ctx-fit",title:"How well the fitted signatures rebuild the profile, as the report measures it",children:[n.fit.cosine!==null&&c.jsxs("span",{children:["Cosine similarity ",c.jsx("b",{children:ix("cosine",n.fit.cosine)})]}),n.fit.rss!==null&&c.jsxs("span",{children:["RSS ",c.jsx("b",{children:ix("rss",n.fit.rss)})]})]}),n.runs.length>1&&c.jsx(Ss,{label:"Run",value:d,onChange:h,options:n.runs.map(te=>({value:te.source,label:ZM[te.source]}))}),c.jsx(Ss,{label:"Profile measure",value:o,onChange:u,options:[{value:"share",label:"Share"},{value:"count",label:"Count"}]})]})]}),c.jsx("div",{className:"ctx-wrap",children:c.jsxs("div",{ref:a,className:"ctx-plot",onMouseLeave:()=>x(null),children:[c.jsxs("svg",{width:i,height:O,role:"img","aria-label":`SNVs in the 96 mutational contexts${S?", observed and rebuilt from signatures":""}`,children:[c.jsx("g",{transform:`translate(${dn} 0)`,children:j.map(te=>{const Y=M[te.start],ee=M[te.end],X=Y.x-Y.width*.14,W=ee.x+ee.width*1.14,ae=m===te.substitution;return c.jsxs("g",{className:"ctx-chip","data-on":ae||void 0,role:"button",tabIndex:0,"aria-pressed":ae,"aria-label":`${te.substitution}: ${ae?"show all classes":"label its sixteen contexts"}`,onClick:()=>g(ae?null:te.substitution),onKeyDown:ve=>{(ve.key==="Enter"||ve.key===" ")&&(ve.preventDefault(),g(ae?null:te.substitution))},children:[c.jsx("rect",{x:X,y:0,width:Math.max(W-X,1),height:22,rx:11}),c.jsx("circle",{cx:X+11,cy:11,r:4.5,fill:Ku[te.substitution]}),c.jsx("text",{x:X+22,y:15,children:te.substitution})]},te.substitution)})}),Array.from({length:A},(te,Y)=>{const ee=D[Y],X=Y===2?Si:zl,W=$[Y];return W?c.jsxs("g",{transform:`translate(0 ${ee})`,className:"ctx-panel",children:[Y<2?_.map(ae=>c.jsxs("g",{children:[c.jsx("line",{x1:dn,x2:dn+N,y1:K(ae,Y),y2:K(ae,Y),className:ae===0?"ctx-base":"ctx-grid"}),c.jsxs("text",{x:dn-8,y:K(ae,Y)+4,textAnchor:"end",className:"ctx-tick",children:[ae,z]})]},ae)):c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:dn,x2:dn+N,y1:X/2,y2:X/2,className:"ctx-base"}),c.jsx("text",{x:dn-8,y:X/2+4,textAnchor:"end",className:"ctx-tick",children:"0"})]}),c.jsx("text",{x:dn+2,y:12,className:"ctx-name",children:PM[Y]}),c.jsx("g",{className:"ctx-bars","data-hover":y!==null||void 0,children:W.map((ae,ve)=>{const xe=M[ve],He=dn+xe.x,Fe=Y===2?X/2:X,Ye=K(ae,Y),L=Ku[v.contexts[ve].substitution],V=Math.abs(Fe-Ye);return c.jsx("rect",{x:He,y:Math.min(Ye,Fe),width:xe.width,height:Math.max(V,ae===0?0:.8),rx:Math.min(2,xe.width/2),fill:L,className:"ctx-bar","data-on":y===ve||void 0,"data-dim":m&&v.contexts[ve].substitution!==m?"":void 0},ve)})})]},Y):null}),y!==null&&c.jsx("rect",{x:dn+M[y].x-2,y:ss-4,width:M[y].width+4,height:(S?D[2]+Si:D[0]+zl)-ss+8,rx:4,className:"ctx-column",pointerEvents:"none"}),m&&v.contexts.map((te,Y)=>te.substitution===m?c.jsxs("text",{x:dn+M[Y].x+M[Y].width/2,y:(S?D[2]+Si:D[0]+zl)+16,textAnchor:"middle",className:"ctx-tri",children:[Th(te)[0],c.jsx("tspan",{className:"ctx-tri-mid",style:{fill:Ku[te.substitution]},children:Th(te)[1]}),Th(te)[2]]},Y):null),M.map((te,Y)=>c.jsx("rect",{x:dn+te.x-(te.width*.14+1),y:ss,width:te.width*1.28+2,height:(S?D[2]+Si:D[0]+zl)-ss,fill:"transparent",className:"ctx-hit",tabIndex:0,"aria-label":`${v.contexts[Y].context}: ${v.contexts[Y].observed} SNVs`,onMouseEnter:()=>x(Y),onFocus:()=>x(Y),onBlur:()=>x(null)},Y))]}),le&&y!==null&&c.jsxs(Ul,{x:oe(y),y:D[0]+zl/2,width:i,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"sv-swatch",style:{background:Ku[le.substitution]},"aria-hidden":!0}),c.jsx("span",{className:"mono",children:le.context})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Observed"}),c.jsxs("b",{children:[Rh(w.observed[y],o),c.jsxs("i",{children:[" ",o==="share"?`${le.observed.toLocaleString("en-US")} SNVs`:""]})]})]}),w.reconstructed&&w.difference&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Rebuilt"}),c.jsx("b",{children:Rh(w.reconstructed[y],o)})]}),c.jsxs("span",{className:"ctip-note",children:[w.difference[y]>=0?"Observed above":"Observed below"," the signatures by"," ",Rh(Math.abs(w.difference[y]),o).replace("%",o==="share"?" points":"")]})]})]})]})}),!S&&c.jsx("p",{className:"ctx-note",children:"Only the observed profile is shown: this report did not include the signature matrix its fit used, so what the signatures rebuild cannot be drawn."})]})}const ya=n=>n==null?"–":n.toFixed(2),WM=8,e_=250,Ge={w:232,h:148,cx:116,cy:122,r:92};function Oh(n,a){const i=Ni(Ge.cx,Ge.cy,Ge.r,n),o=Ni(Ge.cx,Ge.cy,Ge.r,a);return`M${i.x.toFixed(2)},${i.y.toFixed(2)} A${Ge.r},${Ge.r} 0 0 1 ${o.x.toFixed(2)},${o.y.toFixed(2)}`}function t_({score:n}){const a=n.value===null?null:Math.min(Math.max(n.value,0),1),i=n.rating==="HIGH",o=n.threshold,u=o===null?null:[Ni(Ge.cx,Ge.cy,Ge.r-14,o),Ni(Ge.cx,Ge.cy,Ge.r+14,o),Ni(Ge.cx,Ge.cy,Ge.r+27,o)],d=a===null?null:Ni(Ge.cx,Ge.cy,Ge.r,a);return c.jsxs("div",{className:"hrd-score","data-high":i||void 0,children:[c.jsxs("div",{className:"hrd-score-head",children:[c.jsx("span",{className:"hrd-name",children:n.name}),n.rating&&c.jsx("span",{className:`sc-pill ${i?"p-warn":"p-neu"}`,children:n.rating})]}),c.jsxs("svg",{width:Ge.w,height:Ge.h,viewBox:`0 0 ${Ge.w} ${Ge.h}`,role:"img","aria-label":`${n.name} ${a===null?"has no score":`scores ${ya(n.value)}`}${n.rating?`, rated ${n.rating}`:""}`,className:"hrd-gauge",children:[c.jsx("path",{d:Oh(0,1),pathLength:1,className:"hrd-track"}),o!==null&&c.jsx("path",{d:Oh(o,1),pathLength:1,className:"hrd-zone"}),a!==null&&c.jsx("path",{d:Oh(0,1),pathLength:1,className:"hrd-fill",style:{"--v":a}}),u&&c.jsxs(c.Fragment,{children:[c.jsx("line",{x1:u[0].x,y1:u[0].y,x2:u[1].x,y2:u[1].y,className:"hrd-tick"}),c.jsx("text",{x:u[2].x,y:u[2].y+4,textAnchor:"middle",className:"hrd-tick-label",children:o})]}),d&&c.jsx("circle",{cx:d.x,cy:d.y,r:8.5,className:"hrd-end"}),c.jsx("text",{x:Ge.cx,y:Ge.cy-10,textAnchor:"middle",className:"hrd-num",children:a===null?"–":ya(n.value)}),c.jsx("text",{x:Ge.cx-Ge.r,y:Ge.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"0"}),c.jsx("text",{x:Ge.cx+Ge.r,y:Ge.cy+18,textAnchor:"middle",className:"hrd-end-label",children:"1"})]}),n.threshold!==null&&c.jsxs("span",{className:"hrd-rule",children:["High at ",n.threshold," and above"]})]})}function n_(n){const a=n.filter(i=>i.stats&&i.stats.tumour!==null);return{above:a.filter(i=>i.stats.tumour>i.stats.median).length,of:a.length}}const l_="var(--font)";function a_({features:n}){var D;const[a,i]=Oa(720),[o,u]=E.useState(null),d=n.map(O=>({feature:O,stats:w1(O)})),h=i<640,m=h?0:116,g=h?0:168,y=m+10,x=i-g-14,v=O=>y+O*(x-y),S=h?28:0,w=h?100:70,j=S+38,N=30,M=d.length*w+14,A=M+22,C=o===null?null:d[o];return c.jsxs("div",{ref:a,className:"clouds",onMouseLeave:()=>u(null),children:[c.jsxs("svg",{width:i,height:A,role:"img","aria-label":"HRDetect features against the cohort",style:{fontFamily:l_},children:[[0,.25,.5,.75,1].map(O=>c.jsx("line",{x1:v(O),x2:v(O),y1:0,y2:M,className:"cloud-grid","data-major":O===0||O===1||void 0},O)),d.map(({feature:O,stats:z},_)=>{var te;const R=_*w,Q=ky(O.feature),K=z&&z.values.length<=e_?z.values:[],$=DC(K.map(v),7.5),le=z&&z.values.length>=WM?zC(z.values):null,oe=z&&z.tumour!==null?v(z.tumour):null;return c.jsxs("g",{transform:`translate(0 ${R})`,className:"cloud-row","data-on":o===_||void 0,onMouseEnter:()=>u(_),children:[c.jsx("rect",{x:0,y:2,width:i,height:w-4,rx:12,className:"cloud-hit"}),z&&c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:v(z.q1),y:S+4,width:Math.max(v(z.q3)-v(z.q1),2),height:w-S-10,rx:8,className:"cloud-iqr"}),c.jsx("line",{x1:v(z.median),x2:v(z.median),y1:S+10,y2:w-14,className:"cloud-median"}),le&&c.jsxs(c.Fragment,{children:[c.jsx("path",{d:`M${v(0)},${j} ${le.map(Y=>`L${v(Y.x).toFixed(1)},${(j-Y.y*N).toFixed(1)}`).join(" ")} L${v(1)},${j} Z`,className:"cloud-area"}),c.jsx("path",{d:le.map((Y,ee)=>`${ee?"L":"M"}${v(Y.x).toFixed(1)},${(j-Y.y*N).toFixed(1)}`).join(" "),className:"cloud-line"})]}),K.map((Y,ee)=>c.jsx("circle",{cx:v(Y),cy:j+11+Math.min($[ee],2)*7,r:3,className:"cloud-dot"},ee)),oe!==null&&c.jsxs("g",{className:"cloud-pin",transform:`translate(${oe} 0)`,children:[c.jsx("line",{y1:S+8,y2:j,className:"cloud-stem"}),c.jsx("circle",{cy:j,r:8,className:"cloud-pin-dot"})]})]}),c.jsx("text",{x:h?4:6,y:h?18:j-6,className:"cloud-name",children:Q}),!h&&c.jsxs("text",{x:6,y:j+10,className:"cloud-raw",children:["raw ",ya((te=O.sample)==null?void 0:te.raw)]}),z&&c.jsx("text",{x:i-4,y:h?18:j-6,textAnchor:"end",className:"cloud-rank",children:fh(z)}),!h&&z&&c.jsxs("text",{x:i-4,y:j+10,textAnchor:"end",className:"cloud-raw",children:["of ",z.values.length," in the cohort"]})]},O.feature)}),c.jsxs("g",{transform:`translate(0 ${M})`,className:"cloud-axis",children:[c.jsx("text",{x:v(0),y:12,textAnchor:"start",children:"0 · cohort lowest"}),c.jsx("text",{x:v(.5),y:12,textAnchor:"middle",children:"0.5"}),c.jsx("text",{x:v(1),y:12,textAnchor:"end",children:"cohort highest · 1"})]})]}),C&&o!==null&&C.stats&&c.jsxs(Ul,{x:C.stats.tumour!==null?v(C.stats.tumour):v(C.stats.median),y:o*w+j,width:i,children:[c.jsx("span",{className:"ctip-title",children:ky(C.feature.feature,"long")}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"This tumour"}),c.jsxs("b",{children:[ya((D=C.feature.sample)==null?void 0:D.raw)," ",c.jsxs("i",{children:["scaled ",ya(C.stats.tumour)]})]})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Cohort median"}),c.jsx("b",{children:ya(C.stats.median)})]}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Middle half"}),c.jsxs("b",{children:[ya(C.stats.q1),"–",ya(C.stats.q3)]})]}),fh(C.stats)&&c.jsx("span",{className:"ctip-note",children:fh(C.stats)})]})]})}const Yo=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,Io=n=>Math.round(n).toLocaleString("en-US"),s_=n=>`${n>=0?"+":"−"}${Math.abs(n).toFixed(Math.abs(n)>=10?0:1)}`,ox=3,bi=26,ji=52;function i_({groups:n,bands:a,lit:i,onLight:o}){const[u,d]=Oa(),h=n.find(_=>_.group==="sample")??n[0],m=n.find(_=>_.group==="cohort")??null,g=m!==null,y=d>=440,x=y?d>=620?118:92:0,v=g?330:230,S=qy(a.map(_=>_.share),v,ox),w=g?qy(a.map(_=>_.cohortShare??0),v,ox):[],j=g?x:0,N=d-x-bi,M=j+bi,A=N,C=a.find(_=>_.name===i)??null,D=C?a.indexOf(C):-1,O=D<0?0:ji+((S[D].y0+S[D].y1)/2+(g?(w[D].y0+w[D].y1)/2:(S[D].y0+S[D].y1)/2))/2,z=(_,R,Q,K,$,le)=>{const oe=_.y1-_.y0;if(!y||oe<17)return null;const te=ji+(_.y0+_.y1)/2,Y=oe>=36;return c.jsxs("text",{x:$,y:te,textAnchor:le,className:"flow-label",children:[c.jsxs("tspan",{x:$,dy:Y?"-0.35em":"0.35em",className:"flow-name",children:[R.name,!Y&&c.jsxs("tspan",{className:"flow-share",children:[" ",Yo(Q)]})]}),Y&&c.jsxs("tspan",{x:$,dy:"1.35em",className:"flow-share",children:[Yo(Q),K]})]})};return c.jsxs("div",{ref:u,className:"flow","data-lit":i??void 0,children:[c.jsxs("svg",{width:d,height:ji+v+4,role:"img","aria-label":"Signature shares, tumour against cohort",children:[c.jsxs("g",{className:"flow-head",children:[c.jsx("text",{x:0,y:16,className:"flow-col",children:By(h)}),c.jsxs("text",{x:0,y:34,className:"flow-sub",children:[Io(h.total)," mutations"]}),m&&c.jsxs(c.Fragment,{children:[c.jsx("text",{x:d,y:16,textAnchor:"end",className:"flow-col",children:By(m)}),c.jsxs("text",{x:d,y:34,textAnchor:"end",className:"flow-sub",children:["about ",Io(m.total)," each, on average"]})]})]}),g&&c.jsx("g",{className:"flow-ribs",transform:`translate(0 ${ji})`,children:a.map((_,R)=>c.jsx("path",{d:OC(M,S[R],A,w[R]),fill:_.colour,className:"flow-rib","data-on":i===_.name||void 0,onMouseEnter:()=>o(_.name),onMouseLeave:()=>o(null)},_.name))}),a.map((_,R)=>{const Q=i===_.name||void 0,K=($,le)=>$.y1-$.y0>.4&&c.jsx("rect",{x:le,y:ji+$.y0,width:bi,height:$.y1-$.y0,rx:Math.min(5,($.y1-$.y0)/2),fill:_.colour,className:"flow-seg","data-on":Q,tabIndex:0,"aria-label":`${_.name}, ${Yo(_.share)} of this tumour`,onMouseEnter:()=>o(_.name),onMouseLeave:()=>o(null),onFocus:()=>o(_.name),onBlur:()=>o(null)});return c.jsxs("g",{className:"flow-band","data-on":Q,children:[K(S[R],j),g&&K(w[R],N),z(S[R],_,_.share,_.count?` · ${Io(_.count)}`:"",g?j-10:j+bi+10,g?"end":"start"),g&&z(w[R],_,_.cohortShare??0,"",N+bi+10,"start")]},_.name)}),g&&d>=520&&a.map((_,R)=>{const Q=va(_),K=S[R],$=w[R];if(Q===null||Math.abs(Q)<5||Math.min(K.y1-K.y0,$.y1-$.y0)<22)return null;const le=(M+A)/2,oe=ji+(K.y0+K.y1+$.y0+$.y1)/4;return c.jsxs("g",{transform:`translate(${le} ${oe})`,className:"flow-delta","data-on":i===_.name||void 0,children:[c.jsx("rect",{x:-30,y:-10,width:60,height:20,rx:10}),c.jsxs("text",{y:4,textAnchor:"middle",children:[s_(Q)," pts"]})]},_.name)})]}),C&&c.jsxs(Ul,{x:g?d/2:j+bi+x+20,y:O,width:d,children:[c.jsxs("span",{className:"ctip-title",children:[c.jsx("span",{className:"sv-swatch",style:{background:C.colour},"aria-hidden":!0}),C.name]}),C.aetiology&&c.jsx("span",{className:"ctip-sub",children:C.aetiology}),c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"This tumour"}),c.jsxs("b",{children:[Yo(C.share)," ",c.jsxs("i",{children:[Io(C.count)," mutations"]})]})]}),C.cohortShare!==null&&c.jsxs("span",{className:"ctip-row",children:[c.jsx("span",{children:"Cohort"}),c.jsxs("b",{children:[Yo(C.cohortShare)," ",c.jsx("i",{children:C.cohortCount!==null?`about ${Io(C.cohortCount)} each`:""})]})]}),va(C)!==null&&c.jsx("span",{className:"ctip-note",children:Math.abs(va(C))<1?"About the same as its cohort":`${Math.abs(va(C)).toFixed(Math.abs(va(C))>=10?0:1)} points ${va(C)>0?"above":"below"} its cohort`})]})]})}const rx=n=>`${(n*100).toFixed(n>=.1||n===0?0:1)}%`,G1=n=>Math.round(n).toLocaleString("en-US");function o_({points:n,reach:a}){if(n===null)return null;const i=Math.min(Math.abs(n)/a,1)*100;return c.jsx("span",{className:"lead","aria-hidden":!0,children:c.jsx("span",{className:"lead-bar","data-up":n>=0||void 0,style:{width:`${Math.max(i,n===0?0:3)}%`}})})}function r_({groups:n}){const[a,i]=E.useState(null),o=E.useMemo(()=>AC(n),[n]),u=n.find(h=>h.group==="cohort"),d=Math.max(10,...o.map(h=>Math.abs(va(h)??0)));return c.jsxs("section",{className:"sig-section","aria-label":"Mutational signatures",children:[c.jsx("h3",{className:"sv-h",children:"Mutational signatures"}),c.jsxs("div",{className:"sig-grid",children:[c.jsx(i_,{groups:n,bands:o,lit:a,onLight:i}),c.jsxs("div",{className:"sig-tablebox",children:[c.jsxs("table",{className:"sig-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Signature"}),c.jsx("th",{className:"n",children:"This tumour"}),u&&c.jsx("th",{className:"n",children:"Cohort"}),u&&c.jsx("th",{className:"lead-h",children:"Against cohort"})]})}),c.jsx("tbody",{children:o.map(h=>{const m=va(h);return c.jsxs("tr",{"data-lit":a===h.name||void 0,onMouseEnter:()=>i(h.name),onMouseLeave:()=>i(null),children:[c.jsxs("td",{children:[c.jsxs("span",{className:"sig-name",title:h.members.length>1?h.members.join(", "):void 0,children:[c.jsx("span",{className:"sv-swatch",style:{background:h.colour},"aria-hidden":!0}),h.name]}),h.aetiology&&c.jsx("span",{className:"sig-aetiology",children:h.aetiology})]}),c.jsxs("td",{className:"n",children:[c.jsx("span",{className:"mono",children:rx(h.share)}),c.jsx("span",{className:"sig-count",children:G1(h.count)})]}),u&&c.jsx("td",{className:"n mono",children:rx(h.cohortShare??0)}),u&&c.jsx("td",{children:c.jsxs("span",{className:"lead-cell",children:[c.jsx(o_,{points:m,reach:d}),c.jsx("span",{className:"lead-n mono",children:m===null?"":`${m>=0?"+":"−"}${Math.abs(m).toFixed(0)}`})]})})]},h.name)})})]}),c.jsx(yc,{shown:o.length,total:o.length,noun:["signature","signatures"]})]})]})]})}function u_({envelope:n,loading:a}){return(n==null?void 0:n.status)==="ok"&&n.data?c.jsx(JM,{data:n.data}):n?c.jsxs("section",{className:"sig-section","aria-label":"96 mutational contexts",children:[c.jsx("h3",{className:"sv-h",children:"96 mutational contexts"}),c.jsx("p",{className:"sv-empty",children:n.warnings.join(" ")||"No 96-context profile for this sample."})]}):a?c.jsxs("section",{className:"sig-section","aria-label":"96 mutational contexts",children:[c.jsx("h3",{className:"sv-h",children:"96 mutational contexts"}),c.jsx("div",{className:"px-5 pb-3",children:c.jsx("div",{className:"skeleton",style:{height:220},"aria-label":"Loading 96 mutational contexts"})})]}):null}function c_({hrd:n}){const a=E.useMemo(()=>n_(n.features.map(i=>({feature:i,stats:w1(i)}))),[n.features]);return c.jsxs("section",{className:"sig-section","aria-label":"Homologous recombination deficiency",children:[c.jsx("h3",{className:"sv-h",children:"Homologous recombination deficiency"}),c.jsxs("div",{className:"hrd-body",children:[n.scores.length>0&&c.jsx("div",{className:"hrd-scores",children:n.scores.map(i=>c.jsx(t_,{score:i},i.name))}),n.features.length>0&&c.jsxs("div",{className:"hrd-chart",children:[c.jsxs("div",{className:"sv-sigs-head",children:[c.jsxs("h4",{className:"hrd-sub",children:["HRDetect features against the cohort",n.cohort_n?c.jsxs("span",{className:"sv-h-n",children:["n = ",n.cohort_n]}):null]}),c.jsxs("ul",{className:"sv-sigs-key","aria-label":"Key",children:[c.jsxs("li",{children:[c.jsx("span",{className:"hrd-key-pin","aria-hidden":!0}),"This tumour"]}),c.jsxs("li",{children:[c.jsx("span",{className:"hrd-key-dot","aria-hidden":!0}),"Cohort sample"]}),c.jsxs("li",{children:[c.jsx("span",{className:"hrd-key-band","aria-hidden":!0}),"Middle half of the cohort"]})]})]}),a.of>0&&c.jsxs("p",{className:"hrd-lede",children:["Above the cohort median on ",c.jsx("b",{children:a.above})," of ",a.of," features"]}),c.jsx(a_,{features:n.features})]})]})]})}const f_=E.forwardRef(function({envelope:a,loading:i,contextEnvelope:o,contextLoading:u=!1,picked:d},h){var y;const m=(a==null?void 0:a.status)==="ok"?a.data:null,g=(y=m==null?void 0:m.signatures)==null?void 0:y.find(x=>x.group==="sample");return c.jsx(gc,{ref:h,title:"Signatures and HRD",subtitle:g?`${G1(g.total)} mutations attributed to signatures`:void 0,lineage:mc(a==null?void 0:a.lineage,o==null?void 0:o.lineage),picked:d,info:"signaturesHrd",className:"sigs",children:c.jsx(dr,{label:"signatures and HRD",envelope:a,loading:i,skeletonHeight:300,children:x=>c.jsxs("div",{className:"sig-body",children:[x.signatures?c.jsx(r_,{groups:x.signatures}):c.jsx("p",{className:"sv-empty",children:"No signature contributions for this sample."}),c.jsx(u_,{envelope:o,loading:u}),x.hrd&&c.jsx(c_,{hrd:x.hrd})]})})})});function d_(n){var o;const a=n.samples.filter(u=>u.category==="TUMOR");return(o=a.find(u=>Object.values(u.datasets??{}).some(d=>Object.values(d).includes("ok")))??a[0]??n.samples[0])==null?void 0:o.id}const h_=[];function m_(n){const a=E.useRef(!1);return E.useEffect(()=>{let i=0;const o=()=>{a.current=!0,window.clearTimeout(i),i=window.setTimeout(()=>a.current=!1,150)};return window.addEventListener("scroll",o,{passive:!0}),()=>{window.removeEventListener("scroll",o),window.clearTimeout(i)}},[]),E.useCallback(i=>{(i===null||!a.current)&&n(i)},[n])}function g_(n){var i,o;const a=(o=(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:o.name;return a?a.charAt(0)+a.slice(1).toLowerCase():void 0}function Xo(n,a){const i=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;n==null||n.scrollIntoView({behavior:i?"auto":"smooth",block:a})}const ux=160;function p_(n,a){const i=E.useRef(n);i.current=n;const o=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 z;if(x=0,o.current)return;const M=i.current.filter(([,_])=>_.current).map(([_,R])=>[_,R.current.getBoundingClientRect().top]),A=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),C=Math.max(0,...M.map(([,_])=>_+window.scrollY-A-ux)),D=ux+(A>0?C*Math.min(1,window.scrollY/A):0);let O=((z=M[0])==null?void 0:z[0])??null;for(const[_,R]of M)R<=D&&(O=_);a.set(O)},S=()=>{o.current=null,u.current=null,v()};m.current=()=>{u.current=window.scrollY};const w=()=>{if(o.current){u.current===null?(window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)):Math.abs(window.scrollY-u.current)>4&&S();return}x||(x=requestAnimationFrame(v))},j=()=>{o.current&&u.current===null&&(window.clearTimeout(d.current),S())};return h.current=v,v(),window.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),window.addEventListener("wheel",j,{passive:!0}),window.addEventListener("touchstart",j,{passive:!0}),window.addEventListener("keydown",j),()=>{window.removeEventListener("scroll",w),window.removeEventListener("resize",w),window.removeEventListener("wheel",j),window.removeEventListener("touchstart",j),window.removeEventListener("keydown",j),window.clearTimeout(d.current),x&&cancelAnimationFrame(x)}},[]);const g=E.useRef("");return E.useEffect(()=>{const x=n.filter(([,v])=>v.current).map(([v])=>v).join();x!==g.current&&(g.current=x,h.current())}),x=>{o.current=x,u.current=null,a.set(x),window.clearTimeout(d.current),d.current=window.setTimeout(m.current,160)}}function v_({held:n,sampleId:a,...i}){const o=dc(n);return c.jsx(cN,{...i,sampleId:o??a})}function y_(){var Ve,ke,wt,lt,We,Jn,Vl,Da,La,hr,Bi,mr,gr,Fl,Qt,Vn,Yt,pr;const{individual:n=""}=tw(),[a,i]=jw(),o=a.get("version")??void 0,[u,d]=E.useState(null),[h,m]=E.useState(null),[g,y]=E.useState(zy),[x,v]=E.useState(null),S=m_(v),[w,j]=E.useState(null),N=E.useRef(null),[M,A]=E.useState(null),C=E.useRef(Jo(!0)).current,D=E.useRef(null),O=E.useRef(null),z=E.useRef(null),_=E.useRef(null),R=E.useRef(Jo(null)).current,Q=p_([["overview",O],["copyNumber",N],["mutations",D],["structuralVariants",z],["signatures",_]],R),K=jx();E.useEffect(()=>{const de=M;if(!de||typeof IntersectionObserver>"u")return;const st=new IntersectionObserver(([Dt])=>C.set(Dt.isIntersecting),{rootMargin:"-72px 0px 0px 0px",threshold:0});return st.observe(de),()=>st.disconnect()},[M]);const $=E.useCallback(de=>y(st=>({...st,...de})),[]),le=E.useCallback(de=>{$({q:wN(de.chrom,de.start,de.end),scope:"all",sort:"position"}),Xo(D.current,"start")},[$]),oe=E.useCallback(de=>{$({q:de}),Xo(D.current,"start")},[$]),te=E.useCallback(de=>{j({chrom:de.chrom,pos:de.pos,gene:de.gene,nonce:Date.now()}),Xo(N.current,"center")},[]),Y=E.useCallback(de=>{j({...de,nonce:Date.now()}),Xo(N.current,"center")},[]),ee=_N(n,o),X=ee.data,W=(X==null?void 0:X.status)==="ok"?X.data??void 0:void 0,ae=a.get("sample")??(W?d_(W):void 0),ve=W==null?void 0:W.samples.find(de=>de.id===ae),xe=(ve==null?void 0:ve.category)==="TUMOR"?ae:void 0,He=h??((W==null?void 0:W.mode)==="unmatched"?"vaf":"ccf"),Fe=TN(n,W?ae:void 0,o),Ye=RN(n,o),L=AN(n,xe,o),V=ON(n,xe,He,g.ffpe,o),ne=$N(n,xe,g,o),re=(Ve=ne.data)==null?void 0:Ve.pages[0],me=E.useMemo(()=>{var de;return((de=ne.data)==null?void 0:de.pages.flatMap(st=>st.status==="ok"&&st.data?st.data.rows:[]))??[]},[ne.data]),{fetchNextPage:be}=ne,Ce=E.useCallback(()=>void be(),[be]),ue=UN(n,xe,o),ge=zN(n,xe,o),rt=DN(n,xe,o),jt=LN(n,xe,o),mn=HN(n,xe,o),Et=(wt=(ke=Ye.data)==null?void 0:ke.data)==null?void 0:wt.samples.find(de=>de.sample===ae),mt=E.useMemo(()=>(Et==null?void 0:Et.drivers)??h_,[Et]),Ie=E.useMemo(()=>x?{chrom:x.chrom,pos:x.pos,gene:x.gene}:w,[x,w]),Mt=E.useRef(null),Cn=E.useRef(Jo(null)).current,Pt=(de,st)=>{var Dt;(Dt=Mt.current)==null||Dt.toggleAttribute("data-gliding",de),Mt.current&&(Mt.current.style.minHeight=de&&st?`${st}px`:"")},pt=E.useRef(null);E.useEffect(()=>()=>{var de;return(de=pt.current)==null?void 0:de.call(pt)},[]);const $l=de=>{var vr,qi;if(de===ae)return;(vr=pt.current)==null||vr.call(pt);const st=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches,Dt=50;if(st||window.scrollY<=Dt)return window.scrollTo({top:0,behavior:"auto"}),ut("sample",de);const kl=window.scrollY,js=Math.min(520,240+kl*.12),pl=performance.now();Pt(!0,document.documentElement.scrollHeight-(((qi=Mt.current)==null?void 0:qi.getBoundingClientRect().top)??0)-kl),Cn.set(ae??null),Q("overview"),E.startTransition(()=>ut("sample",de));let Bl=0;function an(){cancelAnimationFrame(Bl),window.removeEventListener("wheel",an),window.removeEventListener("touchstart",an),window.removeEventListener("keydown",an),pt.current=null,Cn.set(null),Pt(!1)}const Gi=Qi=>{const Gl=Math.min(1,(Qi-pl)/js),yr=kl*(1-Gl)**3;window.scrollTo({top:yr,behavior:"instant"}),yr<=Dt&&Cn.set(null),Gl<1?Bl=requestAnimationFrame(Gi):an()};window.addEventListener("wheel",an,{passive:!0}),window.addEventListener("touchstart",an,{passive:!0}),window.addEventListener("keydown",an),pt.current=an,Bl=requestAnimationFrame(Gi)},ut=(de,st)=>{const Dt=new URLSearchParams(a);Dt.set(de,st),i(Dt,{replace:!1}),d(null),y(zy()),v(null),j(null)},Zn=[ee,Fe,Ye,L,V,ne,ue,ge,rt,jt,mn].map(de=>de.error);if(Zn.some(de=>de instanceof hc))return c.jsx("div",{className:`wgts ${Kn.theme}`,children:c.jsx("main",{className:"page",children:c.jsx(rC,{onSignedIn:()=>K.invalidateQueries()})})});const Ot=Zn.find(de=>de instanceof c1),zt=ve&&W?Em(ve.id,W.individual.id):"",za=new Set(W?xe?["overview","copyNumber","mutations","structuralVariants","signatures"]:["overview"]:[]),qt=de=>{if(Q(de),de==="overview"){const Dt=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;window.scrollTo({top:0,behavior:Dt?"auto":"smooth"});return}const st={copyNumber:N,mutations:D,structuralVariants:z,signatures:_}[de];Xo((st==null?void 0:st.current)??null,"start")},$n=W&&ae&&W.analyses[ae]||[],gl=(W==null?void 0:W.failures.filter(de=>de.sample===ae))??[],J=new Set($n.map(Gt)),se=new Set,je=de=>de==null?void 0:de.forEach(st=>J.has(Gt(st))&&se.add(Gt(st)));for(const de of((We=(lt=Fe.data)==null?void 0:lt.data)==null?void 0:We.metrics)??[])sm.includes(de.key)&&je(de.sources);je((Jn=Ye.data)==null?void 0:Jn.lineage),je((Vl=L.data)==null?void 0:Vl.lineage),je((Da=V.data)==null?void 0:Da.lineage),je(re==null?void 0:re.lineage),je((La=ue.data)==null?void 0:La.lineage),je((hr=ge.data)==null?void 0:hr.lineage),je((Bi=rt.data)==null?void 0:Bi.lineage),je((mr=jt.data)==null?void 0:mr.lineage),je((gr=mn.data)==null?void 0:gr.lineage);for(const de of $n)de.state==="failed"&&gl.length>0&&se.add(Gt(de));return c.jsxs("div",{className:`wgts ${Kn.theme}`,children:[c.jsx(YN,{analyses:$n,onPage:se,sampleLabel:zt,picked:u,onPick:d,sections:za,activeStore:R,onSection:qt}),c.jsxs("div",{ref:Mt,className:"page",children:[c.jsx(u1,{individualId:n,subtitle:[g_(W),(Fl=W==null?void 0:W.individual.sex)==null?void 0:Fl.toLowerCase(),(W==null?void 0:W.mode)==="unmatched"?"tumour only":void 0].filter(Boolean).join(", ")||void 0,patientIcon:W?c.jsx(sN,{sex:W.individual.sex}):void 0,report:W?c.jsx(tC,{data:W,onVersion:de=>ut("version",de)}):void 0,compact:W&&ae?c.jsx(fN,{data:W,sampleId:ae,fingerprint:((Qt=Ye.data)==null?void 0:Qt.data)??void 0,onSample:$l}):void 0,headerInView:C}),c.jsxs("main",{className:"flex flex-1 flex-col",children:[W&&ae&&c.jsx("div",{className:"px-8 pt-1",children:c.jsx("div",{ref:A,children:c.jsx(v_,{held:Cn,data:W,sampleId:ae,fingerprint:((Vn=Ye.data)==null?void 0:Vn.data)??void 0,onSample:de=>ut("sample",de)})})}),c.jsxs("div",{className:"sheet",children:[ee.isPending&&c.jsx("div",{className:"skeleton h-24","aria-label":"Loading the patient"}),Ot&&c.jsx("div",{className:"sc-card px-6 py-5",children:c.jsx(os,{envelope:{status:"error",data:null,lineage:[],warnings:[Ot.message]}})}),ee.isError&&!Ot&&c.jsx("div",{className:"sc-card px-6 py-5",children:c.jsx(os,{envelope:{status:"error",data:null,lineage:[],warnings:[ee.error.message]}})}),X&&X.status!=="ok"&&c.jsx("div",{className:"sc-card px-6 py-5",children:c.jsx(os,{envelope:X})}),(X==null?void 0:X.status)==="ok"&&X.warnings.length>0&&c.jsx("div",{className:"sc-card px-6 py-4",children:c.jsx(os,{envelope:{...X,status:"missing"}})}),W&&ae&&c.jsxs(c.Fragment,{children:[c.jsx(oC,{sampleLabel:zt,failures:gl,analyses:$n}),xe?c.jsxs(c.Fragment,{children:[c.jsx("div",{ref:O,className:"page-section",children:c.jsx(iC,{sampleLabel:`${zt} tumour`,fingerprint:Et,metrics:Fe.data,picked:u,lineage:mc((Yt=Fe.data)==null?void 0:Yt.lineage,(pr=Ye.data)==null?void 0:pr.lineage)})}),c.jsx("div",{ref:N,className:"page-section",children:c.jsx(QC,{envelope:L.data,loading:L.isPending,picked:u,sampleLabel:zt,drivers:mt,focus:Ie,locate:w,onSegment:le,onGene:oe,fga:jt.data,fgaLoading:jt.isPending})}),c.jsx(SM,{ref:D,variants:re,rows:me,hasMore:ne.hasNextPage,loadingMore:ne.isFetchingNextPage,onMore:Ce,variantsLoading:ne.isPending,variantsFetching:ne.isFetching&&ne.isPlaceholderData,density:V.data,densityLoading:V.isPending,picked:u,measure:He,onMeasure:de=>{m(de),g.range&&g.range.measure!==de&&$({range:null})},table:g,onTable:$,hovered:x,onHover:S,onLocate:te,showCcf:W.mode!=="unmatched",tmb:mn.data}),c.jsx(QM,{ref:z,envelope:ue.data,loading:ue.isPending,picked:u,onLocate:Y}),c.jsx(f_,{ref:_,envelope:ge.data,loading:ge.isPending,contextEnvelope:rt.data,contextLoading:rt.isPending,picked:u})]}):c.jsx("div",{ref:O,className:"sc-card px-6 py-5",children:c.jsx(os,{envelope:{status:"missing",data:null,lineage:[],warnings:[`${zt} is a normal sample. Its germline and quality panels arrive with those sections.`]}})})]})]})]})]})]})}const zh=200,q1="wgts-picker-scope";function x_(){try{const n=localStorage.getItem(q1);return n&&/^\d+$/.test(n)?Number(n):"all"}catch{return"all"}}function S_(n,a){const i=a.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(o=>{const u=`${o.individual} ${o.diseases.join(" ")} ${o.report_version}`.toLowerCase();return i.every(d=>u.includes(d))})}function b_(n,a){const i=a.toLowerCase().split(/\s+/).filter(Boolean);return i.length===0?n:n.filter(o=>{const u=`${o.title} ${o.short_title??""} ${o.description??""}`.toLowerCase();return i.every(d=>u.includes(d))})}const Dh=n=>n.toLocaleString("en-US");function j_(){return dc(_m)?c.jsx(w_,{}):null}function w_(){var $,le,oe,te;const n=Nm(),a=(($=Wj("/:individual"))==null?void 0:$.params.individual)??"",i=E.useId(),o=E.useRef(null),[u,d]=E.useState(x_),[h,m]=E.useState(""),[g,y]=E.useState(""),[x,v]=E.useState(0),S=VN(),w=FN(u);E.useEffect(()=>{const Y=document.activeElement,ee=document.documentElement,X=ee.style.overflow;return ee.style.overflow="hidden",requestAnimationFrame(()=>{var W;return(W=document.querySelector(".pick-main .tsearch input"))==null?void 0:W.focus()}),()=>{ee.style.overflow=X,Y==null||Y.focus()}},[]);const j=Y=>{d(Y),y(""),v(0);try{localStorage.setItem(q1,String(Y))}catch{}requestAnimationFrame(()=>{var ee;return(ee=document.querySelector(".pick-main .tsearch input"))==null?void 0:ee.focus()})},N=((le=S.data)==null?void 0:le.results)??[],M=E.useMemo(()=>b_(N,h),[N,h]),A=u==="all"?null:N.find(Y=>Y.pk===u)??((oe=w.data)==null?void 0:oe.project)??null,C=((te=w.data)==null?void 0:te.results)??[],D=E.useMemo(()=>S_(C,g),[C,g]),O=D.slice(0,zh),z=E.useRef(null),_=Y=>{Gu(),Y.individual!==a&&n(`/${encodeURIComponent(Y.individual)}`)};E.useEffect(()=>{var Y,ee,X;(X=(ee=(Y=z.current)==null?void 0:Y.querySelector(`[data-index="${x}"]`))==null?void 0:ee.scrollIntoView)==null||X.call(ee,{block:"nearest"})},[x]),E.useEffect(()=>v(0),[g]);const R=Y=>{const ee=Y.target,X=ee instanceof HTMLInputElement&&!!ee.closest(".pick-main");if(Y.key==="Escape"){if(ee instanceof HTMLInputElement&&ee.value)return;Gu()}else if(X&&Y.key==="ArrowDown")Y.preventDefault(),v(W=>Math.min(W+1,O.length-1));else if(X&&Y.key==="ArrowUp")Y.preventDefault(),v(W=>Math.max(W-1,0));else if(X&&Y.key==="Enter"&&O[x])Y.preventDefault(),_(O[x]);else if(ee instanceof HTMLInputElement&&ee.closest(".pick-rail")&&Y.key==="Enter"){Y.preventDefault();const W=M[0];W&&j(W.pk)}},Q=S.isPending,K=S.isError||w.isError;return jm.createPortal(c.jsx("div",{className:`info-backdrop ${Kn.theme}`,onMouseDown:Y=>Y.target===Y.currentTarget&&Gu(),children:c.jsxs("div",{className:"info-dialog pick",role:"dialog","aria-modal":"true","aria-labelledby":i,tabIndex:-1,onKeyDown:R,children:[c.jsx("button",{ref:o,type:"button",className:"info-close","aria-label":"Close",onClick:Gu,children:c.jsx(cc,{size:18,"aria-hidden":!0})}),c.jsxs("nav",{className:"info-rail pick-rail","aria-label":"Projects",children:[c.jsx("span",{className:"info-kicker",children:"Browse"}),c.jsx("h2",{id:i,children:"Projects"}),c.jsx(ac,{value:h,onChange:m,label:"Search projects",placeholder:"Search projects",shortcut:!1,delay:0}),c.jsxs("ol",{children:[c.jsx("li",{children:c.jsxs("button",{type:"button","aria-current":u==="all"?"true":void 0,onClick:()=>j("all"),children:[c.jsx("span",{className:"pick-name",children:c.jsxs("span",{children:[c.jsx(Yw,{size:14,"aria-hidden":!0}),"All patients"]})}),c.jsx("span",{className:"pick-n",children:S.data?Dh(S.data.total):""})]})}),M.map(Y=>c.jsx("li",{children:c.jsxs("button",{type:"button","aria-current":u===Y.pk?"true":void 0,onClick:()=>j(Y.pk),title:Y.short_title?`${Y.title} (${Y.short_title})`:Y.title,children:[c.jsx("span",{className:"pick-name",children:Y.title}),c.jsx("span",{className:"pick-n",children:Dh(Y.patients)})]})},Y.pk))]}),Q&&c.jsx("p",{className:"pick-note",children:"Loading projects…"}),!Q&&N.length>0&&M.length===0&&c.jsxs("p",{className:"pick-note",children:["No project matches “",h,"”."]}),!Q&&!S.isError&&N.length===0&&c.jsx("p",{className:"pick-note",children:"No project has a dashboard yet. “All patients” lists every one."})]}),c.jsxs("div",{className:"pick-main",children:[c.jsxs("header",{className:"pick-head",children:[c.jsx("span",{className:"info-kicker",children:(A==null?void 0:A.short_title)??(u==="all"?"Every project":"Project")}),c.jsx("h3",{children:(A==null?void 0:A.title)??"All patients"}),(A==null?void 0:A.description)&&c.jsx("p",{children:A.description})]}),c.jsx("div",{className:"tbar",children:c.jsx(ac,{value:g,onChange:y,label:"Search patients",placeholder:"Search id or disease",shortcut:!1,delay:0})}),c.jsx("div",{ref:z,className:"pick-list",role:"group","aria-label":"Patients","aria-busy":w.isFetching,children:K?c.jsx("p",{className:"pick-note",children:"The patients could not be loaded. Close this window and try again."}):w.isPending?c.jsx("p",{className:"pick-note",children:"Loading patients…"}):O.length===0?c.jsx("p",{className:"pick-note",children:g?`No patient matches “${g}”.`:"No patients with a dashboard in this project yet."}):O.map((Y,ee)=>c.jsxs("button",{type:"button",className:"pick-row","data-index":ee,"data-active":ee===x||void 0,"data-current":Y.individual===a||void 0,onMouseEnter:()=>v(ee),onClick:()=>_(Y),children:[c.jsx("span",{className:"pick-id mono",children:c.jsx(xs,{text:Y.individual,query:g})}),c.jsx("span",{className:"pick-diseases",children:Y.diseases.length>0?Y.diseases.map(X=>c.jsx("span",{className:"sc-chip",children:c.jsx(xs,{text:X,query:g})},X)):c.jsx("span",{className:"pick-faint",children:"No tumour disease recorded"})}),c.jsx("span",{className:"pick-aside",children:Y.individual===a?c.jsxs("span",{className:"pick-here",children:[c.jsx(e1,{size:13,"aria-hidden":!0}),"On this page"]}):c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[Dh(Y.samples)," ",Y.samples===1?"sample":"samples"]}),c.jsxs("span",{className:"pick-faint",children:["report ",Y.report_version,Y.built?`, ${s1(Y.built)}`:""]})]})})]},Y.individual))}),w.data&&c.jsx(yc,{shown:D.length,total:C.length,noun:["patient","patients"],note:D.length>zh?`Showing the first ${zh}; search to narrow`:void 0})]})]})}),document.body)}const N_=new gj({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});function C_(){return c.jsx(B2,{client:N_,children:c.jsxs(bw,{basename:Kn.basePath,children:[c.jsxs(vw,{children:[c.jsx(Kh,{path:"/",element:c.jsx(hN,{})}),c.jsx(Kh,{path:"/:individual",element:c.jsx(y_,{})})]}),c.jsx(j_,{})]})})}k2.createRoot(document.getElementById("root")).render(c.jsx(E.StrictMode,{children:c.jsx(C_,{})}));